As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/bin/sh | |
| # print 1st field with awk pipe to sed and remove double quotes | |
| VBoxManage list vms | awk '{print $1}' | sed 's/\"//g' | |
rsync (Everyone seems to like -z, but it is much slower for me)
| Options +ExecCGI | |
| AddHandler cgi-script .cgi | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule ^(.*)$ flask.cgi/$1 [QSA,L] |
| def smart_procrustes_align_gensim(base_embed, other_embed, words=None): | |
| """Procrustes align two gensim word2vec models (to allow for comparison between same word across models). | |
| Code ported from HistWords <https://github.com/williamleif/histwords> by William Hamilton <[email protected]>. | |
| (With help from William. Thank you!) | |
| First, intersect the vocabularies (see `intersection_align_gensim` documentation). | |
| Then do the alignment on the other_embed model. | |
| Replace the other_embed model's syn0 and syn0norm numpy matrices with the aligned version. | |
| Return other_embed. |
NetworkManager supports WiFi powersaving but the function is rather undocumented.
From the source code: wifi.powersave can have the following value:
Taken from: [https://groups.google.com/forum/#!topic/devpi-dev/S-3ioWILTiY]).
We wanted to do some python developpement but we had a problem : our working network is completely isolated from any internet access, only having servers providing services like distribution packages repository mirror and web servers. The question then was how to make a full pypi mirror for usig pip install and pip search.
This is possible to be done using devpi, a web server, bandersnatch and an external hard drive. The idea is to dump all pypi packages with bandersnatch, transfer them to the server with the hard drive,
| def measure_semantic_shift_by_neighborhood(model1,model2,word,k=25,verbose=False): | |
| """ | |
| Basic implementation of William Hamilton (@williamleif) et al's measure of semantic change | |
| proposed in their paper "Cultural Shift or Linguistic Drift?" (https://arxiv.org/abs/1606.02821), | |
| which they call the "local neighborhood measure." They find this measure better suited to understand | |
| the semantic change of nouns owing to "cultural shift," or changes in meaning "local" to that word, | |
| rather than global changes in language ("linguistic drift") use that are better suited to a | |
| Procrustes-alignment method (also described in the same paper.) | |
| Arguments are: |