Skip to content

Instantly share code, notes, and snippets.

View brickgao's full-sized avatar
🎯
Focusing

Xiongzhi Gao brickgao

🎯
Focusing
View GitHub Profile
@brickgao
brickgao / 问卷一时爽-统计火葬场.py
Created April 21, 2014 10:22
不用自动化问卷系统的人生
# -*- coding: utf-8 -*-
import os
_file_list = os.listdir(u'./data')
_cnt = 0
for _file_name in _file_list:
_cnt += 1
print str(_cnt) + u' start to analyse ' + _file_name
with open(os.path.join(u'./data', _file_name), 'r') as _file:
var usb = require('usb');
var my_drive = usb.findByIds(4901, 49193);
my_drive.open();
interfaces = my_drive.interfaces[0];
interfaces.claim()
@brickgao
brickgao / scatter_prototype.py
Created February 22, 2015 05:52
Prototype for scatter.
# -*- coding: utf-8 -*-
from vispy.scene import SceneCanvas, visuals
import numpy as np
from vispy import app
plots = []
# -*- encoding: utf-8 -*-
import requests
import os
def get_page(lower_bound=1, upper_bound=1000000):
if not os.path.exists('./pages/'):
os.mkdir('./pages')
base_url = 'http://zhidao.baidu.com/question/'
@brickgao
brickgao / POJ-3020 Antenna Placement.cpp
Created August 31, 2012 09:04
POJ-3020 Antenna Placement
//By Brickgao
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
using namespace std;
#define MAXN 50
@brickgao
brickgao / POJ-3026 Borg Maze.cpp
Created September 4, 2012 16:04
POJ-3026 Borg Maze
//By Brickgao
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <queue>
@brickgao
brickgao / POJ-2195 Going Home.cpp
Created September 6, 2012 07:36
POJ-2195 Going Home
//By Brickgao
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <queue>
@brickgao
brickgao / Codeforces Round #137 (Div. 2) D.cpp
Created September 11, 2012 17:32
Codeforces Round #137 (Div. 2) D
//By Brickgao
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
using namespace std;
@brickgao
brickgao / Codeforces Round #137 (Div. 2) A.cpp
Created September 11, 2012 17:30
Codeforces Round #137 (Div. 2) A
//by Brickgao
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
using namespace std;
__int64 a[100100];
@brickgao
brickgao / Codeforces Round #137 (Div. 2) B.cpp
Created September 11, 2012 17:31
Codeforces Round #137 (Div. 2) B
//by Brickgao
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
using namespace std;
int n, m, k;