Skip to content

Instantly share code, notes, and snippets.

View GaZ3ll3's full-sized avatar

Yimin GaZ3ll3

View GitHub Profile
@GaZ3ll3
GaZ3ll3 / jing_fm_tunes.py
Last active October 7, 2015 10:18
show music tunes addresses from jing.fm in .m4a file.
"""
Created on June 19th, 2013. via. Sublime Text 2
@author: lurker
"""
#!/usr/bin/env python
# -*- coding: utf8 -*-
import urllib2,httplib
@GaZ3ll3
GaZ3ll3 / 19.json
Created May 18, 2013 04:17
use gmail to reply metro bus route 19/FW schedule...
{
"SOUTH": {"1":"5:39","2":"6:29","3":"6:56","4":"7:31","5":"8:06","6":"8:41","7":"9:14","8":"9:49","9":"10:24","10":"11:30","11":"12:36","12":"13:42","13":"14:46","14":"15:52","15":"16:32","16":"17:19","17":"17:56", "18":"18:33","19":"19:07","20":"19:44","21":"20:44","22":"21:44"},
"NORTH": {"1":"5:46", "2":"6:26","3": "6:17","4": "7:52","5": "8:27","6":"9:02","7": "10:11", "8":"11:19","9":"12:25","10": "13:31","11":"14:37", "12":"15:49", "13":"16:30","14": "16:55", "15":"17:35","16": "18:22","17":"19:33","18": "20:33", "19":"21:33", "20":"22:33"}
}
@GaZ3ll3
GaZ3ll3 / program
Created October 26, 2013 20:46
JIngFM CL using C#
using System;
using System.Collections.Generic;
using System.Data;
using System.Net;
using System.Reflection;
using GLib;
using Gst;
using Gst.BasePlugins;
using Newtonsoft.Json;
using System.Diagnostics;
@GaZ3ll3
GaZ3ll3 / ai.js
Created December 8, 2014 05:49
code game AI 1.0
// debug
// right :3 oclock , up: 12 oclock, left : 9oclock, down 6 oclock
// Basic functions
function isequal(u, v) {
if (u[0] === v[0] && u[1] === v[1]) {
return true;
} else{
return false;
}
}
@GaZ3ll3
GaZ3ll3 / pi_runner.c
Last active August 29, 2015 14:16
pi runner
#include <curses.h>
#include <iostream>
#include <string>
using namespace std;
int main()
{
initscr(); // init curses
start_color();
@GaZ3ll3
GaZ3ll3 / a.py
Created April 11, 2015 07:47
google code jam 2015 qround
import sys
cases = int(raw_input())
for c in xrange(cases):
# read in misc problem constants
x, y = map(str, raw_input().split())
m = 0
x = int(x)
s = int(y[0])
@GaZ3ll3
GaZ3ll3 / c.py
Created April 11, 2015 07:49
google code jam 2015 qround
import sys
def func(a, sign, b):
if a == '1':
return (b, sign)
if b == '1':
return (a, sign)
if a == 'i' and b == 'j':
return ('k', sign)
if a == 'j' and b == 'i':
@GaZ3ll3
GaZ3ll3 / d.py
Created April 11, 2015 07:50
google code jam 2015 qround
import sys
cases = int(raw_input())
for c in xrange(cases):
# read in misc problem constants
x, y, z = map(int, raw_input().split())
if x == 1:
print "Case #%d: GABRIEL" % ((c+1))
if x == 2:
@GaZ3ll3
GaZ3ll3 / b.py
Created April 11, 2015 17:16
google code jam 2015 qround
import math
cases = int(raw_input())
for c in xrange(cases):
x = map(int, raw_input())
y = map(int, raw_input().split())
y = sorted(y, reverse=True)
m = y[0]
res = y[0]
for r in range(1, m + 1):
move = 0
Stable build requested.
Starting build...
Downloading http://cython.org/release/Cython-0.19.2.tar.gz...
[=========================] 100.0% (1.3MB of 1.3MB) 0.340MB/s ETA 0s
[cython] Building cython/avukqxjtxt3d, follow log with:
[cython] tail -f /Users/elsie/.hashdist/tmp/cython-avukqxjtxt3d/_hashdist/build.log
Downloading https://pypi.python.org/packages/source/d/docutils/docutils-0.10.tar.gz...
[=========================] 100.0% (1.5MB of 1.5MB) 0.342MB/s ETA 0s
[docutils] Building docutils/7srggk6bdkqa, follow log with: