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
# http://deeplearning.net/software/theano/tutorial/using_gpu.html | |
# -> just make it work with python3 | |
from theano import function, config, shared, sandbox | |
import theano.tensor as T | |
import numpy | |
import time | |
vlen = 10 * 30 * 768 # 10 x #cores x # threads per core | |
iters = 1000 |
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 | |
echo $(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 8 | grep -P "\w") |
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 collections import defaultdict | |
def readfile(filepath): | |
""" | |
A function for reading .e2f, .f2e files | |
returns | |
------- | |
l: list | |
if .e2f, ["english word", "f word", "probability"] |
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
# coding: utf-8 | |
import logging | |
import logging.config | |
import yaml | |
import os | |
def setup_logging(config_path='../config.yaml', default_level=logging.DEBUG): | |
"""Setup logging configuration | |
""" |
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
# -*- coding: utf-8 -*- | |
"""visualizer: basic visualization module for debugging | |
""" | |
import pandas as pd | |
import matplotlib | |
import matplotlib.cm as cm | |
from matplotlib import pyplot as plt | |
from matplotlib import dates as mdates | |
import seaborn as sns |
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
" Sane default settings for MSYS2 environment | |
" (which is too slow to use loads of nice plugins) | |
" 1. git clone https://github.com/w0ng/vim-hybrid | |
" and copy colors dir. to .vim/ | |
" 2. git clone https://github.com/tpope/vim-sensible | |
" and copy plugin dir. to .vim/ | |
set autoindent | |
set backspace=indent,eol,start | |
set complete-=i |
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
#!/bin/bash | |
du -ah --max-depth 3 \ | |
| sort -rh \ | |
| egrep "./(\w+/){2,3}" \ | |
| sed "s@./@$(pwd)/@" > diskusage |
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 | |
pandoc -f markdown_github+tex_math_dollars+pandoc_title_block+ignore_line_breaks -t docx -o $1.docx $1 |
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 | |
find $1 -xdev -printf '%h\n' | | |
sort | | |
uniq -c | | |
sort -k 1 -n -r | | |
tee inodeusage | | |
tr -s " " | | |
cut -f 2 -d " " | | |
python -c"import sys; print(sum(map(int, sys.stdin)))" |
OlderNewer