Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Ashcraft kevashcraft

View GitHub Profile
@damienpontifex
damienpontifex / tf-experiment-template.py
Last active Jun 11, 2020
A template for a custom tensorflow estimator and experiment with python3 typings for desired parameter types
View tf-experiment-template.py
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.
@ilblackdragon
ilblackdragon / seq2seq.py
Last active Apr 29, 2020
Example of Seq2Seq with Attention using all the latest APIs
View seq2seq.py
import logging
import numpy as np
import tensorflow as tf
from tensorflow.contrib import layers
GO_TOKEN = 0
END_TOKEN = 1
UNK_TOKEN = 2
@koaning
koaning / tf.py
Created Mar 9, 2017
tensorflow layer example
View tf.py
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)
@xbb
xbb / README
Last active Aug 12, 2020
IDRAC6 Virtual Console Launcher
View README
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.
@mikoim
mikoim / README.md
Last active Aug 14, 2020
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)
View README.md

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264

@siemanko
siemanko / tf_lstm.py
Last active Jun 3, 2020
Simple implementation of LSTM in Tensorflow in 50 lines (+ 130 lines of data generation and comments)
View tf_lstm.py
"""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:
@keeferrourke
keeferrourke / install-google-fonts.sh
Last active Jul 29, 2020
A bash script to install all Google Fonts, system wide, on debian based systems (ex. Ubuntu)
View install-google-fonts.sh
#!/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"
View How to link Sublime Text Build system to Python 3
@Restuta
Restuta / framework-sizes.md
Last active Aug 8, 2020
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)
View framework-sizes.md

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan  4 22:03 angular2.min.js
You can’t perform that action at this time.