I hereby claim:
- I am rainyear on github.
- I am yusheng (https://keybase.io/yusheng) on keybase.
- I have a public key ASAkSGe1LXL2CRP8ZzWxzmwzsRxTuUQZwhgZlHaxAZqg9Ao
To claim this, I am signing this object:
local hyper = {'shift', 'cmd'} | |
local hyper2 = {'ctrl', 'cmd'} | |
-- hyper + up maximize the current window | |
hs.hotkey.bind(hyper, 'up', function() | |
hs.grid.maximizeWindow() | |
end) | |
hs.hotkey.bind(hyper, "Left", function() | |
local win = hs.window.focusedWindow() | |
local f = win:frame() |
#!/usr/bin/env python | |
import cv2 | |
import numpy as np | |
def main(): | |
cap = cv2.VideoCapture(0) | |
while(cap.isOpened()): | |
ret, img = cap.read() | |
skinMask = HSVBin(img) |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Source codes of blog post: ; | |
; http://blog.rainy.im/2015/08/27/miller-rabin-rsa/ ; | |
; Scheme runtime: Calysto Scheme ; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; math procedures | |
(define (square x) (* x x)) | |
(define (even? x) (= (remainder x 2) 0)) |
# use C-a, since it's on the home row and easier to hit than C-b | |
set-option -g prefix C-a | |
unbind-key C-a | |
bind-key C-a send-prefix | |
set -g base-index 1 | |
# Easy config reload | |
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." | |
# vi is good |
delete from `TABLE`; | |
select * from sqlite_sequence; | |
update sqlite_sequence set seq=0 where name=`TABLE`; |
I hereby claim:
To claim this, I am signing this object:
################ Scheme Interpreter in Python | |
## (c) Peter Norvig, 2010; See http://norvig.com/lispy2.html | |
################ Symbol, Procedure, classes | |
from __future__ import division | |
import re, sys, StringIO | |
class Symbol(str): pass |
// set the date we're counting down to | |
var target_date = new Date("Aug 15, 2019").getTime(); | |
// variables for time units | |
var days, hours, minutes, seconds; | |
// get tag element | |
var countdown = document.getElementById("countdown"); | |
// update the tag with id "countdown" every 1 second |
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
""" | |
Walking the destination directory(arg3) and using the command(arg2) | |
to process every file. | |
USAGE: | |
Mapwalk `function` /path/to/walk | |
""" | |
import sys |
DEBUG = 1; | |
namePat = 'gender_backup-%d.mat'; | |
numSubjects = 16; | |
nLevels = 5; | |
Ci_up = [0.6914 0.6855 0.6728 0.6404 0.6228]; % upper confidence internal for 5 scale | |
allProportion = zeros(256,256,5,numSubjects); |