start new:
tmux
start new with session name:
tmux new -s myname
# -*- coding: utf-8 -*- | |
import unicodedata | |
""" Normalise (normalize) unicode data in Python to remove umlauts, accents etc. """ | |
data = u'naïve café' | |
normal = unicodedata.normalize('NFKD', data).encode('ASCII', 'ignore') | |
print normal | |
import numpy as np | |
def symdirichlet(alpha, n): | |
v = np.zeros(n)+alpha | |
return np.random.dirichlet(v) | |
def exp_digamma(x): | |
if x < 0.1: | |
return x/100 |
Copyright (c) 2013 Jamz Tang <[email protected]> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is furnished | |
to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
#!/bin/bash | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
# Fix agent forwarding | |
# https://gist.github.com/martijnvermaat/8070533 | |
# http://techblog.appnexus.com/2011/managing-ssh-sockets-in-gnu-screen/ | |
# See .ssh/rc for socket linking | |
unsetenv SSH_AUTH_SOCK | |
setenv SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock.$HOSTNAME |
Please petition Github to support HTTPS on github pages: https://github.com/contact
Here's what I wrote:
Obviously, a lot of people want HTTPS for github pages:
Until recently, that would be difficult to implement but, as it turns out, the implementation is pretty much complete:
Speaker: Mike Walfish
Reccomended reading: http://www.eecs.harvard.edu/htk/phdadvice/
""" | |
TreeLSTM[1] implementation in Pytorch | |
Based on dynet benchmarks : | |
https://github.com/neulab/dynet-benchmark/blob/master/dynet-py/treenn.py | |
https://github.com/neulab/dynet-benchmark/blob/master/chainer/treenn.py | |
Other References: | |
https://github.com/pytorch/examples/tree/master/word_language_model | |
https://github.com/pfnet/chainer/blob/29c67fe1f2140fa8637201505b4c5e8556fad809/chainer/functions/activation/slstm.py | |
https://github.com/stanfordnlp/treelstm |