アプリケーションに求められる要件をまとめる。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding:utf-8; -*- | |
#DependencyResolvor.py | |
""" | |
ModuleManager detail implement. | |
""" | |
import os.path as path | |
from os import mkdir | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def overloaded(a): | |
print(a) | |
def overloaded(a, b): | |
print(a, b) | |
#------ | |
>>> overloaded(1) | |
Traceback (most recent call last): | |
File "<pyshell#6>", line 1, in <module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Overload{ | |
public static void Main(String args[]){ | |
method(1); | |
method("abc"); | |
method(1, 2) | |
} | |
void method(int a){ | |
System.out.println(a); | |
System.out.println("Integer"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*-coding: utf-8;-*- | |
""" | |
Overloaded function for python | |
""" | |
import enum | |
class _cfs(enum.Enum): | |
OPTIMIZED = 0x001 | |
NEWLOCALS = 0x002 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*-coding: utf-8;-*- | |
from overload import overload | |
@overload | |
def test(a: int, b: int): | |
print(a + b) | |
@overload | |
def test(a: str, b:str): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from flask import Flask, request, render_template | |
app = Flask(__name__) | |
temperature = float("NaN") | |
pressure = float("NaN") | |
humidity = float("NaN") | |
@app.route("/",methods=['POST']) | |
def info(): | |
global temperature, pressure, humidity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*-coding: utf-8;-*- | |
""" | |
Overloaded function for python | |
""" | |
from sys import _getframe as gf | |
from inspect import signature as sig, _ParameterKind as kind, _empty as empty | |
class _function: | |
def __init__(self, func): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os.path import dirname, join, exists | |
from os import makedirs | |
from docx import Document | |
from .storage import load, storage, add_storage | |
try: | |
load() | |
except: | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sys import _getframe as gf | |
class DataClass: | |
pass | |
def data(cls): | |
""" | |
Data class annotation | |
Usage: | |
```Python |
OlderNewer