Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
""" | |
MIT License | |
Copyright (c) 2017 Stian Lode, | |
[email protected] | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
from tf_logger import TFLogger | |
""" Example of using TFLogger to save train & dev statistics. To visualize | |
in tensorboard simply do: | |
tensorboard --logdir /path/to/summaries | |
This code does depend on Tensorflow, but does not require that your model | |
is built using Tensorflow. For instance, could build a model in Chainer, then |
require 'open-uri' | |
require 'zlib' | |
require 'yajl' | |
# References | |
# - https://developers.google.com/bigquery/preparing-data-for-bigquery#dataformats | |
# - https://developers.google.com/bigquery/docs/data#nested | |
# | |
def type(t) |
# Simple implementation of the productions for the MIU system | |
open INFILE,"<",$ARGV[0]; | |
while(<INFILE>) { | |
chomp; | |
next if $_ =~ /#.*/; | |
print "$1IU\n" if $_ =~ /^(.+?)I$/; | |
print "M$1$1\n" if $_ =~ /^M(.+)$/; | |
print "$1U$2\n" if $_ =~ /^(.*)III(.*)$/; | |
print "$1$2\n" if $_ =~ /^(.*)UU(.*)$/; |
// Fetch the template HTML from the DOM, hand it over to `Underscore.template`, | |
// assign some variables, and set up a `partial` method. | |
var template = $("#tmpl-main-section").html(), | |
compiledTemplate = _.template( template, { | |
models: aCollectionOfThings, | |
// See template examples below on usage. It's all very complex. | |
partial: function( partialName, variables ) { | |
return _.template( | |
$( "#tmpl-" + partialName ).html(), |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
# Swappable Mixins in CoffeeScript | |
# ================================ | |
# Many thanks to Hashmal, who wrote this to start. | |
# https://gist.github.com/803816/aceed8fc57188c3a19ce2eccdb25acb64f2be94e | |
# Usage | |
# ----- | |
# class Derp extends Mixin |
#!/bin/bash | |
( while read L | |
do echo $L > /tmp/pubkey | |
printf "%-16s => " $(cut -f 3 -d ' ' /tmp/pubkey) | |
ssh-keygen -l -f /tmp/pubkey | |
done | |
rm /tmp/pubkey | |
) < .ssh/authorized_keys |