start new:
tmux
start new with session name:
tmux new -s myname
<%@ Application Inherits="HelloFSharp.Global" %> |
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
# Typical setup to include TensorFlow. | |
import tensorflow as tf | |
# Make a queue of file names including all the JPEG images files in the relative | |
# image directory. | |
filename_queue = tf.train.string_input_producer( | |
tf.train.match_filenames_once("./images/*.jpg")) | |
# Read an entire image file which is required since they're JPEGs, if the images | |
# are too large they could be split in advance to smaller files or use the Fixed |
OpenCV does a reasonable job of reading videos from file or webcams. It's simple and mostly works. When it comes to writing videos, it however leaves a lot to be desired. There is little control over the codecs and it is almost impossible to know which codecs are installed. It also wants to know things like the frame size at intailisation. This isn't always a problem, but if you don't know it yet it means you have to set up the video writer inside your main processing loop.
To make something as cross-platform compatible as possible it would be nice to use FFmpeg. There are a few python wrappers around, but as far as I can tell they are mainly used for transcoding type applications. One solution is run FFmpeg as a subprocess and set its input to accept a pipe. Then every video frame is passed through the pipe. You write this yourself, in fact it's only a few lines of code. However, the scikit-video package will do this for us, with some nice boilerplate to ma
#!/usr/bin/env bash | |
TEMP=$(getopt -o hsg --long help,snapshot,gpu -n 'susuage' -- "$@") | |
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi | |
# Note the quotes around `$TEMP': they are essential! | |
eval set -- "$TEMP" | |
SNAPSHOT=false |