Skip to content

Instantly share code, notes, and snippets.

🤙
!

Sean Robertson spro

🤙
!
Block or report user

Report or block spro

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
@spro
spro / install-docker-18.09.sh
Last active Aug 23, 2019
Installing Docker 18.09 on Amazon Linux 2 (As of August 22 2019)
View install-docker-18.09.sh
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.68-1.el7.noarch.rpm
sudo yum install -y docker-ce-18.09.5 containerd.io-1.2.2
sudo usermod -a -G docker ec2-user
sudo systemctl start docker
View build-countries-json.rb
require 'countries'
require 'json'
ISO3166.configure do |config|
config.locales = [:en, :cs, :de, :es, :fr, :ja, :nl, :sk]
end
# {
# AF: {
# name: {
View pytorch-conv1d-rnn.py
import torch
from torch import nn
from torch.autograd import Variable
import torch.nn.functional as F
class RNN(nn.Module):
def __init__(self, input_size, hidden_size, output_size, n_layers=1):
super(RNN, self).__init__()
self.input_size = input_size
self.hidden_size = hidden_size
View aws-pytorch-anaconda-cuda.sh
#!/bin/bash
HOSTNAME=$1
# Set up environment
git clone http://github.com/spro/dotfiles
cd dotfiles && ./bin/install-dotfiles
cd ~
sudo hostname $HOSTNAME
source ~/.bash_profile
@spro
spro / espancanese.lua
Created May 24, 2017
Small synthetic language for testing seq2seq model
View espancanese.lua
-- > te grillo wa silencieusement matte iru
-- = your cricket is sleeping silently
genders = {
m={
the='el',
a='un',
my='me',
your='te',
},
@spro
spro / pytorch-simple-rnn.py
Last active Nov 27, 2019
PyTorch RNN training example
View pytorch-simple-rnn.py
import torch
import torch.nn as nn
from torch.nn import functional as F
from torch.autograd import Variable
from torch import optim
import numpy as np
import math, random
# Generating a noisy multi-sin wave
View nalgene-example.txt
> please if the temperature in minnesota is equal to 2 then turn the office light off thanks
( %if
( %condition
( %currentWeather
( $location minnesota ) )
( $operator equal to )
( $number 2 ) )
( %setDeviceState
( $device.name office light )
@spro
spro / dnsmasq OS X.md
Last active Mar 16, 2016 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X
View dnsmasq OS X.md

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.

Requirements

Install

@spro
spro / generated-20160128162937.coffee
Last active Jan 29, 2016
char-rnn generated CoffeeScript; -rnn_size 100 -max_epochs 50 -temperature 0.7
View generated-20160128162937.coffee
somata = new somata.Client
if errors.length
res.send 401
# User account
# ---------------------------------------------------------------------------------------
app.get '/streets/:channel_id/channels.json', (req, res) ->
email_form =
@spro
spro / gist:7c929c5213253e054a04
Created Jun 17, 2015
Overly simple REST API with Bottle.py
View gist:7c929c5213253e054a04
import bottle
import json
all_people = [
{'name': 'Fred Wilson'},
{'name': 'Fred Durst'},
{'name': 'Fred Astaire'},
]
@bottle.get('/people.json')
You can’t perform that action at this time.