This file contains 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 python | |
class Lut3DGenerator: | |
def __init__(self): | |
pass | |
def gen_identity_3dlut(self, lut_size, output_fname): | |
lut_size_f = float(lut_size) | |
# Generate an identity 3D LUT and write to output file. |
This file contains 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
[DEBUG] 2013/07/28 12:45:38 cli(127.0.0.1:53365) connected, total 1 clients | |
[>>>>>] 2013/07/28 12:45:38 cli(127.0.0.1:53365) request GET www.taobao.com:80/ | |
[DEBUG] 2013/07/28 12:45:39 cli(127.0.0.1:53365) connected to www.taobao.com:80 1 concurrent connections | |
[<<<<<] 2013/07/28 12:45:39 cli(127.0.0.1:53365) response GET www.taobao.com:80/ 200 OK | |
[DEBUG] 2013/07/28 12:45:39 cli(127.0.0.1:53365) close idle connections, remains 1 | |
[DEBUG] 2013/07/28 12:45:39 cli(127.0.0.1:53367) connected, total 2 clients | |
[DEBUG] 2013/07/28 12:45:39 cli(127.0.0.1:53368) connected, total 3 clients | |
[DEBUG] 2013/07/28 12:45:39 cli(127.0.0.1:53369) connected, total 4 clients | |
[>>>>>] 2013/07/28 12:45:39 cli(127.0.0.1:53367) request GET g.tbcdn.cn:80/??tb/global/1.0.5/global-min.css,tb/fp/1.1.4/first-screen-min.css,tb/fp/1.1.4/second-screen-min.css?t=20130711 | |
[>>>>>] 2013/07/28 12:45:39 cli(127.0.0.1:53368) request GET g.tbcdn.cn:80/??tb/conve/0.0.5/common-min.css,tcc/tbr/1.0.18/tbr/common.css,tcc/tbr/1.0.18/tbr/widget/phone/phone. |
This file contains 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
// run with go test -test.bench Bench | |
package main | |
import ( | |
// "fmt" | |
"runtime" | |
"sync" | |
"sync/atomic" | |
"testing" |
This file contains 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 <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
// This code can now only work on Linux system. | |
// It has some problem on OS X. Maybe I'll fix it someday. | |
#if __WORDSIZE != 64 || !defined(__x86_64__) | |
#error "This program only works on IA64 machine." |
This file contains 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
pipe-size: pipe-size.o | |
$(CC) $< -o $@ |
This file contains 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/python | |
# Author: Chen Yufei | |
# Convert git diff to svn patch compatible format. | |
import subprocess | |
import sys | |
import re | |
def check_output(cmd): |
This file contains 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 <stdio.h> | |
#include <cstdlib> | |
#include <cerrno> | |
#include <limits> | |
#include <cmath> | |
#include <cassert> | |
#include <cstring> | |
static const char* AtofPrecise(const char* p, double* out) { | |
char* end; |
This file contains 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
#!/bin/bash | |
list=" | |
http://speedtest.newark.linode.com/100MB-newark.bin | |
http://speedtest.atlanta.linode.com/100MB-atlanta.bin | |
http://speedtest.dallas.linode.com/100MB-dallas.bin | |
http://speedtest.fremont.linode.com/100MB-fremont.bin | |
http://speedtest.frankfurt.linode.com/100MB-frankfurt.bin | |
http://speedtest.london.linode.com/100MB-london.bin | |
http://speedtest.singapore.linode.com/100MB-singapore.bin |
This file contains 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
cmake_minimum_required (VERSION 2.8) | |
add_subdirectory(pybind11) | |
pybind11_add_module(test_gil test_gil.cc) |
This file contains 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 ruby | |
# Find duplicate files in specified directories and files and use | |
# hardlink to keep only one copy. | |
require 'digest' | |
if ARGV.length < 1 | |
name = `basename #{__FILE__}` | |
puts "Usage: #{name.chomp} <path1> [path2 ...]" |
NewerOlder