Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block scturtle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
scturtle /
Created Oct 11, 2011
download ml-class subtitles and convert to srt
# coding: utf-8
import os,sys,re,codecs
def xml2srt(fi,fo):
for i in range(0,len(data)-1):
#print i,data[i]
if data[i]:
scturtle / .vimrc
Created Jan 5, 2012
vimrc for imac
View .vimrc
" configure vundle
set nocompatible " be iMproved
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'The-NERD-Commenter'
Bundle 'taglist.vim'
Bundle 'Conque-Shell'
scturtle /
Created Feb 6, 2012
Download DoubanFM favourite songs
# coding: utf-8
import os, urllib, urllib2, re, json
baseurl = '|subject_id:%s'
musicdir = os.path.abspath('./music')
num_pattern = re.compile(r'(\d+)')
def get_json_by_album(href):
''' get direct url of songs by album url '''
scturtle /
Created Mar 8, 2012
get subtitles of coursera classes
import os, urllib2
game_cookie = 'csrf_token=XXXX; session=XXXX;'
class Sub_downloader:
def __init__(self, cookie):
self.cookie = cookie # 'csrf_token=XXXX; session=XXXX;'
def getname(self, response):
scturtle / reeeder.css
Created Apr 24, 2012
reeeder for stylish
View reeeder.css
@namespace url(;
@-moz-document regexp('https?://www\\.google\\.com/reader/view.*') {
/* 正文变大 */
#viewer-container {
font-size: 130% !important;
/* 增高的条目栏的源和时间的微调 */
scturtle / gist:2575752
Created May 2, 2012
game theory note
View gist:2575752

Game Theory Class on Coursera

chapter 1

  • stable pair of pure strategies
  • constant-sum game
  • strictly(weakly) dominant strategy
  • best response
  • pure strategy Nash equilibrium (if $a_i$ a best response to $a_{-i}$ for all i)
scturtle /
Created May 31, 2012
Number Theory - Mathematics for Computer Science

Number Theory - Mathematics for Computer Science



Lemma 23. The following statements about divisibility hold.

  1. If $a\mid b$, then $a\mid bc$ for all $c$.
  2. If $a\mid b$ and $b\mid c$, then $a\mid c$.
scturtle / gist:2969863
Created Jun 22, 2012
60-Second Science downloader
View gist:2969863
# coding: utf-8
import thread, os, urllib, BeautifulSoup, eyeD3, HTMLParser
from datetime import datetime
html_parser = HTMLParser.HTMLParser()
ue = lambda s: html_parser.unescape(s)
soup = None
filename =None
scturtle / gist:3060332
Created Jul 6, 2012
python 3 语法变化
View gist:3060332
scturtle /
Created Jul 18, 2012
dropbox cheater (mac)
MAC="00:"`echo $RANDOM | md5 | sed 's/\(..\)/&:/g' | cut -c1-14`
MAC2="00:"`echo $RANDOM | md5 | sed 's/\(..\)/&:/g' | cut -c1-20`
echo $MAC
ifconfig en0 ether $MAC
ifconfig en1 ether $MAC
ifconfig fw0 lladdr $MAC2
You can’t perform that action at this time.