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
| import time | |
| from timeit import default_timer as timer | |
| from datetime import timedelta | |
| t_start = timer() | |
| time.sleep(1) | |
| #print(timer()-t_start) | |
| print(timedelta(seconds=timer()-t_start)) |
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
| ''' | |
| trying keras to be random seeded | |
| Switch backends by changin ~/.keras/keras.json: | |
| Theano: https://drive.google.com/open?id=0B-FcStylmYuVU1E5S25QX2JXcGs | |
| TensorFlow: https://drive.google.com/open?id=0B-FcStylmYuVNnpfZERoeUo0QnM | |
| Keras Backend: | |
| *Theano (1 epoch, GPU): | |
| Test loss: 0.111780489241 |
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
| description "Jupyter Upstart script" | |
| start on filesystem or runlevel [2345] | |
| stop on shutdown | |
| script | |
| export HOME="/home/shay" cd $HOME/ | |
| echo $$ > /var/run/jupyter_start.pid | |
| #exec jupyter-notebook --config='$HOME/.jupyter/jupyter_notebook.config.py' | |
| #exec ipython notebook |
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
| import numpy | |
| print('numpy.__version__') | |
| print(numpy.__version__) | |
| import theano | |
| print('theano.__version__') | |
| print(theano.__version__) | |
| import tensorflow | |
| print('tensorflow.__version__') | |
| print(tensorflow.__version__) | |
| import keras |
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
| #!/bin/bash | |
| # this script installs GCC 4.9.4 | |
| # to use it navigate to your home directory and type: | |
| # sh install-gcc-4.9.4.sh | |
| # download and install gcc 4.9.4 | |
| wget https://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.gz | |
| tar xzf gcc-4.9.4.tar.gz | |
| cd gcc-4.9.4 |
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
| ~ 50-character subject line ~ | |
| ~ 72-character wrapped longer description. ~ | |
| # Description of why, not how. | |
| # Feel free to be detailed. | |
| # nano: use `ctrl+c` to get line/character position |
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
| #Trim terminal command prefix | |
| #ORIGINAL: | |
| #export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ " | |
| export PS1="\[\033[01;34m\]\w\[\033[00m\]\$ " #path only | |
| # --------------------------------------------------------------------- | |
| # DL cuda stuff | |
| # --------------------------------------------------------------------- | |
| source /home/shay/DL_cuda_stuff.sh |
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
| #!/bin/bash | |
| echo "THIS IS THE ROOT 'pip'!" | |
| echo "(The original was renamed to 'pip_ROOT')." | |
| echo "" | |
| echo "Please use a virtual environment to install packages!" | |
| echo "You can activate a vm using 'workon'." |
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
| [[snippets]] | |
| description = "edit pet configs and snippets" | |
| command = "code ~/.config/pet/snippet.toml" | |
| tag = ["pet"] | |
| output = "" | |
| [[snippets]] | |
| description = "edit snippets_menu jupyter plugin configuration" | |
| command = "code ~/.local/share/jupyter/nbextensions/snippets_menu/my_snippets.js" | |
| tag = ["python", "jupyter"] |
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
| // ==UserScript== | |
| // @name Slack RTL | |
| // @namespace http://blah | |
| // @version 0.1 | |
| // @description Support RTL/Hebrew in slack.com, from here: https://github.com/gregvish/slackrtl | |
| // @author | |
| // @match https://*.slack.com/* | |
| // @grant GPL | |
| // ==/UserScript== | |
| /* jshint -W097 */ |