This file contains hidden or 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 flask import Flask | |
application = Flask(__name__) | |
@application.route("/") | |
def hello(): | |
return "Hello World!" |
This file contains hidden or 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
""" | |
日付や年月に関する処理 | |
""" | |
import pytest | |
@pytest.mark.parametrize('nengo,year,seireki', [ | |
('平成', 29, 2017), | |
('昭和', 63, 1988) | |
]) |
This file contains hidden or 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
var Test = function () { | |
console.log('hoge'); | |
}; | |
var Klass = function () { | |
this.init = function () { | |
console.log('init'); | |
}; | |
this.f = function () { |
This file contains hidden or 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 a_yield_function(): | |
max = 1000 | |
_i = 0 | |
while True: | |
i = 0 | |
frames = [] | |
for i in range(30): | |
if _i > max: | |
yield (frames, 10) | |
return |
This file contains hidden or 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
import matplotlib | |
def bg_color(value, min_, max_, center_=None): | |
min_ = float(min_) | |
max_ = float(max_) | |
if center_ is None: | |
center_ = (max_ - min_) / 2 | |
cmap = matplotlib.cm.get_cmap('coolwarm') |
This file contains hidden or 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 -*- | |
import smtplib | |
from email.mime.text import MIMEText | |
from email.header import Header | |
server = 'localhost' | |
def send(send_from, send_tos, subject, body): | |
""" |