Parameter | YouTube recommends setting |
---|---|
-movflags faststart | moov atom at the front of the file (Fast Start) |
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
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
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
// e.g. console.save({hello: 'world'}) | |
(function(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data') | |
return; | |
} | |
if(!filename) filename = 'console.json' | |
if(typeof data === "object"){ | |
data = JSON.stringify(data, undefined, 4) |
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
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface. | |
You can use the user and password that you use for the web interface. | |
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS. | |
You don't need to install it, just extract it or copy the files in "jre" folder. | |
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor. | |
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture. | |
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs. |
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
"""Short and sweet LSTM implementation in Tensorflow. | |
Motivation: | |
When Tensorflow was released, adding RNNs was a bit of a hack - it required | |
building separate graphs for every number of timesteps and was a bit obscure | |
to use. Since then TF devs added things like `dynamic_rnn`, `scan` and `map_fn`. | |
Currently the APIs are decent, but all the tutorials that I am aware of are not | |
making the best use of the new APIs. | |
Advantages of this implementation: |
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/sh | |
# Written by: Keefer Rourke <https://krourke.org> | |
# Based on AUR package <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-google-fonts-git> | |
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git | |
sudo apt-get install fonts-cantarell ttf-ubuntu-font-family git | |
srcdir="/tmp/google-fonts" | |
pkgdir="/usr/share/fonts/truetype/google-fonts" | |
giturl="git://github.com/google/fonts.git" |
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 |
NewerOlder