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 json | |
# import joblib | |
import requests | |
# result1 = open('result1.json') | |
# result2 = open('result2.json') | |
# result3 = open('result3.json') |
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
""" | |
A simple selenium test example written by python | |
""" | |
import unittest | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
class TestTemplate(unittest.TestCase): | |
"""Include test cases on a given url""" |
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
""" | |
A simple selenium test example written by python | |
""" | |
import unittest | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
class TestTemplate(unittest.TestCase): | |
"""Include test cases on a given url""" |
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 numpy as np | |
import cv2 | |
FILE_ORG = "calibrated_output_background2.m4v" | |
WINDOW_ORG = "Orginal_frame" | |
FRAME_RATE = 30 # fps | |
class LocationDetector: | |
def __init__(self, |
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 cv2 | |
import numpy as np | |
#動画ファイルパス | |
ESC_KEY = 27 # Escキー | |
INTERVAL= 33 # インターバル | |
FRAME_RATE = 30 # fps | |
#ウインドウ名の定義 |
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 cv2 | |
from datetime import datetime | |
# camera number | |
class CaptureMethod: | |
def __init__(self, imagesize, x_axis=False, y_axis=False): | |
self.x_axis = x_axis | |
self.y_axis = y_axis | |
self.fourcc = cv2.VideoWriter_fourcc('m','p','4','v') | |
self.imagesize = imagesize |
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 cv2 | |
# camera number | |
class CaptureMethod: | |
def __init__(self, number=2, x_axis=False, y_axis=False): | |
self.camera_number = number | |
self.x_axis = x_axis | |
self.y_axis = y_axis | |
def capture_camera(self, mirror=True, size=None): |
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 pandas as pd | |
origin_data = pd.read_csv("使用するデータ.csv") | |
weekday_dummy = pd.get_dummies(origin_data['曜日'], drop_first = True) | |
dummy_data = pd.merge(origin_data, weekday_dummy, left_index=True, right_index=True) | |
dummy_data.to_csv("put_true_dummy_weekday.csv", index=False) |
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
#include <ArduinoJson.h> | |
const int BUTTON = 11; // プッシュボタンが接続されているピン | |
const int led_1 = 9; // 7segLED the one's place | |
const int led_10 = 10; // 7segLED the ten's place | |
const int led_100 = 11; | |
const int led_1000 = 12; | |
int val = 0; // 入力ピンの状態がこの変数(val)に記憶される | |
int old_val = 0; // valの前の値を保存しておく変数 |