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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import yaml | |
import urllib | |
import logging | |
import simplejson | |
# for OAuth |
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
const static CvScalar Black = CV_RGB(0x00, 0x00, 0x00); | |
const static CvScalar Navy = CV_RGB(0x00, 0x00, 0x80); | |
const static CvScalar DarkBlue = CV_RGB(0x00, 0x00, 0x8B); | |
const static CvScalar MediumBlue = CV_RGB(0x00, 0x00, 0xCD); | |
const static CvScalar Blue = CV_RGB(0x00, 0x00, 0xFF); | |
const static CvScalar DarkGreen = CV_RGB(0x00, 0x64, 0x00); | |
const static CvScalar Green = CV_RGB(0x00, 0x80, 0x00); | |
const static CvScalar Teal = CV_RGB(0x00, 0x80, 0x80); | |
const static CvScalar DarkCyan = CV_RGB(0x00, 0x8B, 0x8B); | |
const static CvScalar DeepSkyBlue = CV_RGB(0x00, 0xBF, 0xFF); |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import urllib | |
from collections import namedtuple | |
import BeautifulSoup | |
DictResult = namedtuple("YahooDictResult", "type lemma defins opts") |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import sys | |
import math | |
import array | |
import random | |
import itertools | |
import collections |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy | |
def find_homography(src, dst): | |
# X = (x*h0 +y*h1 + h2) / (x*h6 + y*h7 + 1) | |
# Y = (x*h3 +y*h4 + h5) / (x*h6 + y*h7 + 1) | |
# |
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 isbn10 = function(isbn) { | |
if (isbn && isbn.length == 13) { | |
var c = 0; | |
for (var i = 0; i < 9; i++) | |
c += isbn.charAt(i + 3) * (10 - i) - 0; | |
c = 11 - c % 11; | |
return isbn.substr(3, 9) + ((c == 10) ? "X" : c); | |
} | |
return isbn; | |
}; |
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
package com.mohayonao.SimpleClock; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.widget.TextView; |
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
window.onload = function() { | |
var IsMacChrome = navigator.userAgent.indexOf('Mac') != -1 && | |
navigator.userAgent.indexOf('Chrome') != -1; | |
var samplerate = 48000, channel = 1, stream_length = 4096; | |
var sinwave = function(frequency) { | |
this.phase = 0.0; | |
this.phaseStep = frequency / samplerate; |
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
function setupTypedArray(name) { | |
var fake_typedarray; | |
if (name in window) { | |
return window[name]; | |
} | |
console.warn(name + ' is not defined, so use fake.'); | |
fake_typedarray = function(arg) { | |
var i; |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os, re, optparse | |
import yaml | |
import pyPdf | |
def getprofile(profile): |
OlderNewer