This file contains hidden or 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
#!/usr/bin/env bash | |
# TODO check we are on macOS | |
# TODO https://google.github.io/styleguide/shell.xml | |
INSTANCE_NAME=$INSTANCE_NAME | |
gcloud compute instances start $INSTANCE_NAME | |
IPADDRESS=`gcloud compute instances describe $INSTANCE_NAME | grep natIP | grep -oE '((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])'` | |
printf "%s is at %s\n" $INSTANCE_NAME $IPADDRESS | |
# TODO check Microsoft RDP is installed |
This file contains hidden or 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
#!/usr/bin/env bash | |
shopt -s expand_aliases | |
export EDITOR=vim | |
export VISUAL=vim | |
mkdir -p $HOME/log # TODO: GCP logging shit | |
STARTTIME=`date --iso-8601=minutes --utc` |
This file contains hidden or 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
# If you change this file, run 'update-grub' afterwards to update | |
# /boot/grub/grub.cfg. | |
# For full documentation of the options in this file, see: | |
# info -f grub -n 'Simple configuration' | |
GRUB_DEFAULT=0 | |
GRUB_HIDDEN_TIMEOUT=0 | |
GRUB_TIMEOUT=5 | |
GRUB_TIMEOUT_STYLE=menu | |
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` |
This file contains hidden or 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/bash | |
## | |
## FROM https://github.com/floydhub/dl-docker | |
## | |
## Before running the script change versions and compilation flags below. | |
## If you're having trouble running the whole script, try running | |
## each command separately. | |
## | |
## List of compiled tensorflow packages https://github.com/yaroslavvb/tensorflow-community-wheels/issues |
This file contains hidden or 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
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
This file contains hidden or 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/bash | |
# Fix SSH auth socket location so agent forwarding works with screen. | |
if test "$SSH_AUTH_SOCK" ; then | |
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock | |
fi | |
# Taken from the sshd(8) manpage. | |
if read proto cookie && [ -n "$DISPLAY" ]; then | |
if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then |
This file contains hidden or 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 | |
# https://github.com/lindes/get-location | |
# home is where you throw your rug | |
prog=~/code/get-location/get-location | |
echo "" >> "$1" | |
if [ -x "$prog" ] | |
then | |
$prog >> "$1" | |
else | |
echo "Location: " >> "$1" |
This file contains hidden or 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
Jinja2==2.7.3 | |
MarkupSafe==0.23 | |
PySide==1.2.2 | |
Pygments==2.0.2 | |
astroid==1.3.4 | |
backports.ssl-match-hostname==3.4.0.2 | |
certifi==14.05.14 | |
colorama==0.3.1 | |
doxypypy==0.8.7 | |
httmock==1.2.2 |
This file contains hidden or 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
#!/usr/bin/env python | |
import re, urllib, sys | |
from urlparse import urlparse, urlunparse | |
terms = ['deepmind', 'recursive'] | |
sites = ['http://torch.ch', 'http://www.arcadelearningenvironment.org/'] | |
for site in sites: | |
base_url = urlparse(site) |
This file contains hidden or 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
$.ajaxPrefilter( function( options ) { | |
if ( options.crossDomain ) { | |
var newData = {}; | |
newData.data = $.extend({}, options.data); | |
newData.url = options.url; | |
options = {}; | |
options.url = "http://www.baskettrack.co/proxy.php"; | |
options.data = $.param(newData); | |
options.crossDomain = false; | |
} |