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
1. Go to Sublime Text to: Tools -> Build System -> New Build System | |
and put the next lines: | |
{ | |
"cmd": ["python3", "-i", "-u", "$file"], | |
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)", | |
"selector": "source.python" | |
} | |
Then save it with a meaningful name like: python3.sublime-build |
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 tensorflow as tf | |
import numpy as np | |
import uuid | |
x = tf.placeholder(shape=[None, 3], dtype=tf.float32) | |
nn = tf.layers.dense(x, 3, activation=tf.nn.sigmoid) | |
nn = tf.layers.dense(nn, 5, activation=tf.nn.sigmoid) | |
encoded = tf.layers.dense(nn, 2, activation=tf.nn.sigmoid) | |
nn = tf.layers.dense(encoded, 5, activation=tf.nn.sigmoid) | |
nn = tf.layers.dense(nn, 3, activation=tf.nn.sigmoid) |
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 logging | |
import numpy as np | |
import tensorflow as tf | |
from tensorflow.contrib import layers | |
GO_TOKEN = 0 | |
END_TOKEN = 1 | |
UNK_TOKEN = 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
sudo add-apt-repository ppa:webupd8team/sublime-text-3; | |
sudo apt-get update; | |
sudo apt-get install sublime-text-installer; | |
sudo ln -s /usr/lib/sublime-text-3/sublime_text /usr/local/bin/sublime; |
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 argparse | |
import psutil | |
import tensorflow as tf | |
from typing import Dict, Any, Callable, Tuple | |
## Data Input Function | |
def data_input_fn(data_param, | |
batch_size:int=None, | |
shuffle=False) -> Callable[[], Tuple]: | |
"""Return the input function to get the test data. |
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
var es = require("event-stream"); | |
var gulp = require("gulp"); | |
// Important! If these tasks need to be ran sequentially, then specify the | |
// task(s) that need to be ran prior to these ones as a dependency. | |
gulp.task("move-files", function() { | |
return es.merge([ | |
gulp.src("foo").pipe(gulp.dest("dist/")), | |
gulp.src("bar").pipe(gulp.dest("dist/")), | |
gulp.src("baz").pipe(gulp.dest("dist/")), |
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
wget -O ~/Downloads/crouton http://goo.gl/fd3zc | |
sudo sh -e ~/Downloads/crouton -t x11,audio,keyboard,extension -n i3precise | |
sudo enter-chroot -n i3precise | |
sudo apt-get install i3 | |
echo "exec i3" > ~/.xinitrc | |
sudo apt-get install git vim python python-pip python-dev python-software-properties sshfs | |
sudo pip install virtualenv virtualenvwrapper |
NewerOlder