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
# Assumes you have in third_party libsbp, rapidjson, and b64.c (built) | |
g++ -O3 -g -v -stdlib=libstdc++\ | |
-Wall -Werror -Wno-c++11-extensions \ | |
-Ithird_party/rapidjson/include \ | |
-Ithird_party/libsbp/c/include \ | |
-Ithird_party/b64.c/ \ | |
third_party/b64.c/b64 $1; | |
time ./a.out |
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
# python3 bug_categories.py | |
a b c | |
0 foo foo foo | |
1 bar bar bar | |
2 baz baz baz | |
3 foo foo foo | |
4 bar bar bar | |
5 baz baz baz | |
6 foo foo foo |
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
import pandas as pd | |
def read_eni_cap(filename): | |
return pd.read_csv(filename,header=None, sep='\t', names=['name', 'old', 'new']).set_index('name') | |
eni_cap = read_eni_cap('instance-types.txt') | |
def read_enis(filename): | |
enis = pd.read_json(filename, orient='records') | |
return enis.join(enis.Attachment.apply(pd.Series), rsuffix='.attach').set_index('NetworkInterfaceId') |
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
from numpy import linalg as alg | |
import numpy as np | |
arr = np.array([ | |
0.0, 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., | |
0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., | |
0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., | |
0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., |
OlderNewer