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
#!/usr/bin/env mdl | |
# -*- coding: utf-8 -*- | |
# $File: qr.py | |
# $Author: Xinyu Zhou <[email protected]> | |
# Copyright (c) 2015 Megvii Inc. All rights reserved. | |
import cv2 | |
from scipy.ndimage import interpolation, filters | |
import numpy as np |
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
a52dec 0.7.4-8 | |
abs 2.4.4-2 | |
accerciser 3.14.0-1 | |
acpi 1.7-1 | |
acroread 9.5.5-5 | |
addinclude 0.9-10 | |
aircrack-ng 1.2rc1-1 | |
aisleriot 3.14.2-1 | |
akonadi 1.13.0-3 | |
alex 3.1.4-1 |
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
timing = (msg) -> (method) -> -> | |
startTime = (new Date()).getTime() | |
ret = method.apply @, arguments | |
duration = (new Date()).getTime() - startTime | |
msg = if msg then msg else '' | |
console.log '[timing] ' + msg + ': ' + duration / 1000.0 | |
ret | |
consumeTime = timing('hello') -> | |
s = 0 |
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
X = 0 | |
Y = 0 | |
def wrapper(): | |
X = 1 | |
Y = 1 | |
class C(object): | |
print X, Y # <- what happens at this line? | |
X = 2 | |
wrapper() |
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
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
# $File: push-phone | |
# $Date: Thu Sep 18 11:29:13 2014 +0800 | |
# $Author: Xinyu Zhou <zxytim[at]gmail[dot]com> | |
import sys | |
import getpass | |
import socket | |
import argparse |
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
//#include "opencv_traits.hh" | |
#include <opencv2/core/core.hpp> | |
#include <set> | |
#include <tuple> | |
#include <map> | |
#include <vector> | |
template <typename value_t> |
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
//#include "opencv_traits.hh" | |
#include <opencv2/core/core.hpp> | |
#include <set> | |
#include <tuple> | |
#include <map> | |
#include <vector> | |
struct Value { |
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
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
# $File: prefetch.py | |
# $Date: Tue Aug 26 18:12:01 2014 +0800 | |
# $Author: Xinyu Zhou <zxytim[at]gmail[dot]com> | |
from multiprocessing import Pool | |
from collections import deque | |
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
/* | |
$ g++ a.cc -o a -std=c++1y | |
$ ./a | |
3.1 | |
3.1 | |
3 | |
3.1 | |
3 | |
3.1 |
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
/* | |
* $File: class_uniq_thread_job_pool.hh | |
* $Date: Sat Jan 18 14:33:53 2014 +0800 | |
* $Author: Xinyu Zhou <zxytim[at]gmail[dot]com> | |
*/ | |
#pragma once | |
#include <vector> | |
#include <queue> |
NewerOlder