Skip to content

Instantly share code, notes, and snippets.

Nathan Howell NathanHowell

Block or report user

Report or block NathanHowell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
peterroelants /
Last active Sep 19, 2019
Example using TensorFlow Estimator, Experiment & Dataset on MNIST data.
"""Script to illustrate usage of tf.estimator.Estimator in TF v1.3"""
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data as mnist_data
from tensorflow.contrib import slim
from tensorflow.contrib.learn import ModeKeys
from tensorflow.contrib.learn import learn_runner
# Show debugging output
nikitakit /
Last active Aug 16, 2019
Tensorflow Beam Search
Beam decoder for tensorflow
Sample usage:
from tf_beam_decoder import beam_decoder
decoded_sparse, decoded_logprobs = beam_decoder(
nicolasembleton /
Last active Sep 11, 2019
Restart Bluetooth Daemon on Mac OS X without restarting
sudo kextunload -b
sudo kextload -b
mathias-brandewinder / MDL.fs
Last active Nov 12, 2018
Recursive minimal entropy partitioning, based on Fayyad & Irani: break a continuous variable into discrete intervals top-down, maximizing the entropy gained at each step, with a stopping rule using the Minimum Description Length principle.
View MDL.fs
namespace Discretization
// Recursive minimal entropy partitioning,
// based on Fayyad & Irani 1993.
// See the following article, section 3.3,
// for a description of the algorithm:
// Note: this can certainly be optimized.
module MDL =
copumpkin / gist:4759099
Last active Dec 12, 2015
zipWith/foldr challenge!
View gist:4759099
-- This is the type we're working with.
data List a = List (forall r. (a -> r -> r) -> r -> r)
-- Implement this signature. It should not be inefficient, so if you're planning
-- on writing something like tail (notoriously inefficient using foldr) on our
-- List type, think again! It should be possible to write with the same time
-- complexity as the original. And of course, converting to/from a conventional
-- list is cheating :)
zipWith :: (a -> b -> c) -> List a -> List b -> List c
geoffreyanderson /
Created Jun 2, 2011 — forked from fairchild/
A script to rsync a running Linux OS to an image file (specifically, a 10GB image file for deployment to AWS EC2).
# Run this script on a running Linux OS that you want to be put into an image file.
# Ensure that the system you run this on is less than 10GB in size if you wish to
# deploy the image file to AWS EC2.
# Note: This is based on Michael Fairchild's script.
# -
imageFile=${1:-"awsImage-$(date +%m%d%y-%H%M).img"}
anonymous / ants.c
Created Nov 26, 2010
View ants.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "ants.h"
void runSimulation(int steps, int numAnts, int pathLength, double bias, double decay){
// Allocate a block of Nodes and Ants
// Assuming pathLength of 50, it'd be as follows:
// Node[0..49] : path to food A (A)
// Node[50..99] : path to food B (B)
You can’t perform that action at this time.