Skip to content

Instantly share code, notes, and snippets.

View su27's full-sized avatar
🎯
Focusing

su27 su27

🎯
Focusing
View GitHub Profile
#!/usr/bin/env python
def main():
f = open('game_log.tsv', encoding='utf-8')
wf = open('game_log_new.csv', 'w', encoding='utf-8')
for i, l in enumerate(f.readlines()):
if i == 0:
wf.write('event_time,event_lat,event_lng,tracker_trigger,comments\n')
else:
@su27
su27 / comb.py
Last active December 14, 2016 10:34
lock combinations
from collections import Counter
xs = [i for i in range(5) for k in range(5)]
def next_z(ys, zs):
cur_len = len(zs)
if cur_len == 25:
return
@su27
su27 / profiling.py
Created December 9, 2016 06:24
profile for draftjs exporter
# coding: utf-8
import cgi
import cProfile
import re
import urllib
import urlparse
from pstats import Stats
from draftjs_exporter.dom import DOM
[~/dev/flutter/examples/material_gallery (master)] ➔ flutter doctor
Downloading Flutter engine f2d8d75897a5aadcd9be0067a78fce1cea677fd6...
######################################################################## 100.0%
And corresponding services package...
######################################################################## 100.0%
And corresponding toolchain for android-arm...
######################################################################## 100.0%
And corresponding toolchain for darwin-x64...
######################################################################## 100.0%
Building flutter tool...

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

兆赫 id 歌曲 操作 访问来源 DJ 时间
0 印迹 p(播放完毕) mainsite dj_headtailwalk_artist 2014-03-28 17:22:40
0 “何如、何处、何时” p(播放完毕) mainsite dj_headtailwalk_artist 2014-03-28 17:21:07
0 Les Avions en Papier p(播放完毕) mainsite dj_headtailwalk_artist 2014-03-28 17:17:20
0 두손에 两只手 p(播放完毕) mainsite dj_headtailwalk_artist 2014-03-28 17:15:51
0 Sentimental Bus p(播放完毕) mainsite dj_headtailwalk_artist 2014-03-28 17:11:41
0 ANGEL p(播放完毕) mainsite dj_headtailwalk_artist 2014-03-28 17:08:54
0 바나나파티 Banana Party p(播放完毕) mainsite dj_headtailwalk_artist 2014-03-28 17:03:33
0 Goodbye p(播放完毕) mainsite dj_headtailwalk_artist 2014-03-28 17:00:53
0 Der Ewige Sieg p(播放完毕) mainsite dj_headtailwalk_artist 2014-03-28 16:57:27
@su27
su27 / edx-sub.py
Created September 17, 2013 06:08
A tool to fetch subtitles from edx.org
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The edx.org provides video for download, but the subtitle is
only available when watching video online.
This script can help to convert the online subtitle to local srt file.
Usage:
1. Open your Chrome inspector(or other debug tool)