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 | |
if [ ! -f convert_mod.py ]; then | |
wget https://gist.github.com/ebenolson/07af5bf0919dfa7f5585577ad073c120/raw/fc15e516ff21a503833d9157f52de9334139ce7b/convert_mod.py | |
fi | |
docker run -it -v `pwd`:`pwd`:rw -w `pwd` ebenolson/kicad:5.0.0 bash -c "python convert_mod.py $1 $2" | |
sudo chown -R $USER $2 |
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 sys | |
from pcbnew import * | |
infile = sys.argv[1] | |
outdir = sys.argv[2] | |
inplugin = IO_MGR.PluginFind(IO_MGR.GuessPluginTypeFromLibPath(infile)) | |
outplugin = IO_MGR.PluginFind(IO_MGR.GuessPluginTypeFromLibPath(outdir)) | |
for name in inplugin.FootprintEnumerate(infile): |
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
javascript:(function(){ | |
function copyStringToClipboard (str) { | |
var el = document.createElement('textarea'); | |
el.value = str; | |
el.setAttribute('readonly', ''); | |
el.style = {position: 'absolute', left: '-9999px'}; | |
document.body.appendChild(el); | |
el.select(); | |
document.execCommand('copy'); | |
document.body.removeChild(el); |
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 | |
docker run -i ebenolson/mscomplex-tri-docker bash -c 'cat > input && mscomplex-tri-cl-tool -o input &> log && cat input.mscomplex.full.bin' < $1 > "$1.mscomplex.full.bin" |
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 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
# Context manager to generate batches in the background via a process pool | |
# Usage: | |
# | |
# def batch(seed): | |
# .... # generate minibatch | |
# return minibatch | |
# | |
# with BatchGenCM(batch) as bg: | |
# minibatch = next(bg) | |
# .... # do something with minibatch |
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 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 theano, numpy | |
from theano import tensor as T | |
import lasagne | |
#fake data, same shapes | |
train_in = numpy.zeros((100,46,30)).astype('float32') | |
train_out = numpy.zeros((100,46)).astype('int32') | |
mask_train = numpy.zeros((100,46)).astype('float32') | |
input_var = T.tensor3('input_var') |
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
FROM ubuntu:trusty | |
######################################## | |
# | |
# openslide 3.4.1 image based on Ubuntu:trusty | |
# | |
####################################### | |
# Set Locale |
NewerOlder