Skip to content

Instantly share code, notes, and snippets.

View taylor224's full-sized avatar

Taylor Hoshino taylor224

View GitHub Profile
@taylor224
taylor224 / root.py
Last active August 29, 2015 14:14
Social Connect to Flask
# app/views/root.py
# -*- coding: utf-8 -*-
# Check Return data
# Facebook return data (https://developers.facebook.com/docs/reference/api/user/)
# Twitter Verify Credential return data (https://dev.twitter.com/docs/api/1.1/get/account/verify_credentials)
from flask import (
Blueprint,
redirect,
@taylor224
taylor224 / gist:704e46a627519d035eb9
Last active August 29, 2015 14:15
우체국택배 배송정보 가져오는 함수
# -*- coding: utf8 -*-
import urllib, httplib, BeautifulSoup
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
realurl = 'http://service.epost.go.kr/trace.RetrieveRegiPrclDeliv.postal?sid1='
posturl = 'trace.epost.go.kr'
@taylor224
taylor224 / encode.sh
Last active December 25, 2020 08:38
M2T to MOV Script with FFMPEG
for DIR in */ ; do
echo "[ALERT] DIRECTORY - "$DIR;
cd $DIR;
for file in *.M2T *.m2t;
do
name=`echo $file | cut -d'.' -f1`;
if [ ! "$name" == "*" ];
then
echo "[ALERT] File Name - "$name;
if [ ! -f $name.mov ];
@taylor224
taylor224 / m2t2mkv.sh
Last active August 29, 2015 14:15
M2T to MKV Script with FFMPEG
for DIR in */ ; do
echo "[ALERT] DIRECTORY - "$DIR;
cd $DIR;
for file in *.M2T *.m2t;
do
name=`echo $file | cut -d'.' -f1`;
if [ ! "$name" == "*" ];
then
echo "[ALERT] File Name - "$name;
if [ ! -f $name.mkv ];
@taylor224
taylor224 / Kinect_Get_z.cs
Created March 12, 2015 04:16
Get Depth(Z position) of specified coordinate with Kinect v2
public partial class MainWindow : Window
{
private KinectSensor kinectSensor = null;
private CoordinateMapper coordinateMapper = null;
private MultiSourceFrameReader multiFrameSourceReader = null;
public MainWindow()
{
InitializeComponent();
@taylor224
taylor224 / pitches.h
Last active June 1, 2016 18:18
Arduino Fingerprint System
/*************************************************
* Public Constants
*************************************************/
#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#define NOTE_E1 41
@taylor224
taylor224 / wifi.py
Last active February 8, 2024 15:22
Python WiFi Example
# -*- coding: utf-8 -*-
import wifi
def Search():
wifilist = []
cells = wifi.Cell.all('wlan0')
@taylor224
taylor224 / scheme.py
Created April 28, 2015 16:50
WiFi Client Service
# /usr/local/lib/python2.7/dist-packages/wifi/scheme.py
import re
import itertools
import wifi.subprocess_compat as subprocess
from pbkdf2 import PBKDF2
from wifi.utils import ensure_file_exists
from wifi.exceptions import ConnectionError
@taylor224
taylor224 / TouchInject.cs
Last active November 13, 2017 15:24
C# Touch Injection
private void TouchProcess()
{
movedx = 0; // Set Value to move of X
modedy = 0; // Set Value to move of Y
if (TouchIsInitialized == false)
{
contacts[0].PointerInfo.PointerFlags = PointerFlags.INRANGE | PointerFlags.UPDATE;
contacts[0] = MakePointerTouchInfo(relativex, relativey, 2, 1);
bool s = InjectTouch(contacts);
@taylor224
taylor224 / edrs.py
Last active September 16, 2015 05:53
ECU Data Recording System
import obd
import json
import time
import os
import sys
from obd import OBDCommand
from obd.utils import unhex
def rpm(_hex):
v = unhex(_hex) # helper function to convert hex to int