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
# vim: set et sw=4 ts=4 sts=4 fdm=syntax ff=unix fenc=utf8: | |
#!/usr/bin/python | |
import json | |
from subprocess import Popen | |
import urllib2 | |
_url = 'http://douban.fm/j/mine/playlist?type=n&h=&channel=0' | |
req = urllib2.urlopen(urllib2.Request(_url)) | |
obj = json.load(req) |
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
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
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
% Compile the PROPACK package | |
% Copyright LI, Wei(@kuantkid) | |
% detect gfortran | |
switch (lower(computer)) | |
case 'glnxa64' | |
fc = 'gfortran'; | |
suffix = 'mexa64'; | |
case 'glnxa32' | |
fc = 'gfortran'; |