brew update
brew install pyenv
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 bash | |
| # mostly from http://word.bitly.com/post/31921713978/static-analysis | |
| function cfmt { | |
| if [[ $# -ne 1 ]]; then | |
| echo "Usage: cfmt <file>" | |
| else | |
| astyle \ | |
| --style=1tbs \ | |
| --lineend=linux \ | |
| --convert-tabs \ |
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
| model_G = nn.Sequential() | |
| model_G:add(nn.JoinTable(2, 2)) | |
| model_G:add(cudnn.SpatialConvolutionUpsample(3+1, 64, 7, 7, 1, 1)):add(cudnn.ReLU(true)) | |
| model_G:add(nn.SpatialBatchNormalization(64, nil, nil, false)) | |
| model_G:add(cudnn.SpatialConvolutionUpsample(64, 368, 7, 7, 1, 4)):add(cudnn.ReLU(true)) | |
| model_G:add(nn.SpatialBatchNormalization(368, nil, nil, false)) | |
| model_G:add(nn.SpatialDropout(0.5)) | |
| model_G:add(cudnn.SpatialConvolutionUpsample(368, 128, 7, 7, 1, 4)):add(cudnn.ReLU(true)) | |
| model_G:add(nn.SpatialBatchNormalization(128, nil, nil, false)) | |
| model_G:add(nn.FeatureLPPooling(2,2,2,true)) |
Do the whole thing:
PYTHONPATH='.' luigi --module small Small --local-scheduler
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 python | |
| from sys import stdin, stdout | |
| import csv | |
| rdr = csv.reader(stdin, delimiter='\t') | |
| wrt = csv.writer(stdout, delimiter='\t') | |
| vals = [] | |
| rows = [] | |
| for row in rdr: |
## ngram following http://tidytextmining.com/ngrams.html
library(dplyr)
library(tidytext)
library(tidyr)
# load manually downloaded web of science data dump
tt <- jsonlite::stream_in(file("data/wos_total.json"), verbose = FALSE) %>%
filter(!is.na(AB))Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh
Easily checkout local copies of pull requests from remotes:
git pr 4- creates local branchpr/4from the githubupstream(if it exists) ororiginremote and checks it outgit pr 4 someremote- creates local branchpr/4fromsomeremoteremote and checks it 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
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |