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
""" | |
are Test | |
""" | |
import requests | |
ARE_URI = "https://xxx/sample.do" | |
def main(): | |
headers = { |
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
* = $6000 | |
LDA #0 | |
LDX #0 | |
zeropage_reset: | |
STA *0,X | |
INX | |
CPX #$ff | |
BEQ main: | |
JMP zeropage_reset: |
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 -*- | |
""" | |
6502 cpu driver for python | |
""" | |
from Adafruit.I2C.Adafruit_I2C import Adafruit_I2C | |
from Adafruit.MCP230xx.Adafruit_MCP230xx import Adafruit_MCP230XX as MCP230XX | |
from logging import (getLogger, StreamHandler, DEBUG) | |
import time | |
import os |
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
#!/usr/bin/env python | |
import RPi.GPIO as GPIO | |
import time | |
import random | |
IO_PIN = 15 | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(IO_PIN, GPIO.OUT) | |
try: |
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
#!/usr/bin/python | |
# -*- coding:utf-8 -*- | |
import RPi.GPIO as GPIO | |
import time | |
# 使うGPIOピンの番号 | |
IO_NO = 15 | |
IO_NO2 = 14 | |
IO_NO3 = 18 | |
sleep_time = 0.18 |
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 test_decorator(func): | |
print("now test_decorator") | |
def _wrapper(dl): | |
print("now _wapper func") | |
dl.remove(5) | |
func(dl) | |
return _wrapper | |
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 remove_five(dl): | |
dl.remove(5) | |
return dl | |
def test_decorator(func): | |
print("now test_decorator") | |
def _wrapper(dl): | |
dl = remove_five(dl) | |
return func(dl) |
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
#!/usr/bin/env python | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Hello World!" | |
if __name__ == "__main__": | |
app.run(host='0.0.0.0') |
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
import flask_wtf↲ | |
from wtforms import validators, StringField↲ | |
↲ | |
↲ | |
class SlackForm(flask_wtf.Form):↲ | |
trigger_word = StringField(u'trigger_word', [validators.required(), validators.length(max=10)])↲ | |
text = StringField(u'trigger_word', [validators.required()])↲ | |
user_name = StringField(u'user_name', [validators.required()])↲ | |
token = StringField(u'token', [validators.required()])↲ | |
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
""" | |
Problem of Resigter queue to Manager. | |
""" | |
from multiprocessing import managers, Queue | |
class WrongManager(managers.SyncManager): |
OlderNewer