Skip to content

Instantly share code, notes, and snippets.

Reece Selwood Alligator

Block or report user

Report or block Alligator

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
View main
class Wren {
construct new() {
var a = 0
_list = [1,2,3].map{|i|
a = a + 1
return a
}
}
printList() {
View main
class Wren {
construct new() {
var a = 0
_list = [1,2,3].map{|i|
a = a + 1
return a
}
}
printList() {
View gist:dd94d297abd515c8e790
#include <iostream>
#include <map>
using namespace std;
int main() {
map<char, int> stuff;
stuff['a'] = 1;
stuff['b'] = 2;
stuff['c'] = 3;
View a-post.md

what is this

this is a post or something

@Alligator
Alligator / watchfile.sh
Last active Aug 29, 2015 — forked from swarminglogic/watchfile.sh
watchfile modified to work in osx
View watchfile.sh
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
View tq.py
import Queue as queue # like really
import urllib2
import threading
class DoThing(object):
def __init__(self, url):
self.q = queue.Queue()
self.t = threading.Thread(target=self.go, args=(url,))
self.t.start()
View bloomcounter.go
package bloomcounter
import (
"encoding/binary"
"bytes"
"crypto/md5"
)
type BloomCounter struct {
buckets []uint
View bloomfilter.go
package bloomfilter
import (
"crypto/md5"
"encoding/binary"
"bytes"
)
type BloomFilter struct {
buckets []bool
View comero.py
import socket
sock = socket.socket(socket.AF_INET, socket.TCP_NODELAY)
sock.connect(('irc.synirc.net', 6667))
sock.setblocking(0)
def irc_connect():
buff = ''
while 1:
try:
View tsp ga.py
import math
import random
import functools
import sys
# an inefficient ga for the travelling salesman problem
# stuff to think about:
# chromosomes can't be repeated, so crossover and mutation have to be changed
# mutation: swap two elements
# crossover: use ordered crossover
You can’t perform that action at this time.