-
travis ciを使用(.travis.ymlを実行)
- .travis.ymlでinvokeを使用して環境のセットアップやtestコマンドを外部ファイル化(tasks.py)
-
invokeでtasks.pyを実行
-
tasks.pyの内部でnosetestsでテストを実行
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 time | |
import atexit | |
from datetime import datetime, timedelta | |
from neopixel import Adafruit_NeoPixel, Color | |
# LED strip configuration: | |
LED_COUNT = 16 # Number of LED pixels. | |
LED_PIN = 18 # GPIO pin connected to the pixels (must support PWM!). | |
LED_FREQ_HZ = 800000 # LED signal frequency in hertz (usually 800khz) |
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 | |
""" | |
Original Author: Igor Maculan - [email protected] | |
Modified by: Drunkar - [email protected] | |
A Simple mjpg stream http server | |
""" | |
import cv2 | |
from PIL import Image | |
import threading | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer |
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 logging | |
logger = logging.getLogger("")logger.setLevel(logging.DEBUG) | |
stream_handler = logging.StreamHandler() | |
stream_handler.setLevel(logging.DEBUG) | |
logger.addHandler(stream_handler) |
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
module.exports = (robot) -> | |
ORACLE = "疲れからか、不幸にも黒塗りの高級車に追突してしまう。 | |
後輩をかばいすべての責任を負った三浦に対し、車の主、暴力団員谷岡に言い渡された示談の条件とは…。" | |
robot.hear /.+(。|!|!)$/i, (msg) -> | |
msg.send "しかし" + ORACLE | |
robot.hear /(けど(、)?|のに|、|すぎて)$/i, (msg) -> | |
msg.send ORACLE |
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 logging import getLogger | |
logger = getLogger(__name__) |
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 os | |
import logging | |
import logging.handlers | |
root_logger = logging.getLogger("") | |
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") | |
root_logger.setLevel(logging.DEBUG) | |
# stdout handler | |
stream_handler = logging.StreamHandler() |
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
module.exports = (robot) -> | |
robot.hear /ボールを相手のゴールに$/i, (msg) -> | |
msg.reply "シュゥゥゥーッ!!" | |
robot.hear /超(!|!)$/i, (msg) -> | |
msg.reply "エキサイティン!!" |
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 -*- | |
import os | |
import sys | |
from threading import Thread | |
import threading | |
import time | |
import serial |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>speech test</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var recognition = new webkitSpeechRecognition(); |