Skip to content

Instantly share code, notes, and snippets.

View frodo821's full-sized avatar
:octocat:
Working from home

frodo821

:octocat:
Working from home
View GitHub Profile
@frodo821
frodo821 / DependencyResolvor.py
Last active November 26, 2017 10:07
依存関係解決__import__ラッパー関数
#-*- coding:utf-8; -*-
#DependencyResolvor.py
"""
ModuleManager detail implement.
"""
import os.path as path
from os import mkdir
import sys
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>
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");
}
#-*-coding: utf-8;-*-
"""
Overloaded function for python
"""
import enum
class _cfs(enum.Enum):
OPTIMIZED = 0x001
NEWLOCALS = 0x002
#-*-coding: utf-8;-*-
from overload import overload
@overload
def test(a: int, b: int):
print(a + b)
@overload
def test(a: str, b:str):
# 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
@frodo821
frodo821 / overload.py
Created October 25, 2018 08:14
Python overloading annotation
#-*-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):
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
@frodo821
frodo821 / data.py
Last active March 6, 2019 13:02
Data class decorator for Python!
from sys import _getframe as gf
class DataClass:
pass
def data(cls):
"""
Data class annotation
Usage:
```Python

AEDi アプリケーション計画書

目次

  1. 要件
  2. タスクリスト

要件

アプリケーションに求められる要件をまとめる。