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 <stdlib.h> | |
#include <unistd.h> | |
void print_usage(){ | |
printf("usage: \n"); | |
printf(" -b host path\n"); | |
printf(" -e id\n"); | |
} |
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 | |
# brew install clang-format | |
STYLE=$(git config --get hooks.clangformat.style) | |
if [ -n "${STYLE}" ] ; then | |
STYLEARG="-style=${STYLE}" | |
else | |
STYLEARG="-style=file" | |
fi |
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
import io | |
import bson # this is installed with the pymongo package | |
import matplotlib.pyplot as plt | |
import multiprocessing as mp # will come in handy due to the size of the data | |
from process import process | |
NCORE = 6 | |
prod_to_category = mp.Manager().dict() # note the difference |
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
var Base62 = (function () { | |
var ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | |
var Base62 = function () {}; | |
var _encode = function (value) { | |
if (typeof(value) !== 'number') { | |
throw 'Value is not number!'; |