Skip to content

Instantly share code, notes, and snippets.

a7madgamal /
Last active Oct 20, 2021
Dark mode for Slack on MacOS
stewartpark /
Created Oct 12, 2015
Simple XOR learning with keras
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation
from keras.optimizers import SGD
import numpy as np
X = np.array([[0,0],[0,1],[1,0],[1,1]])
y = np.array([[0],[1],[1],[0]])
model = Sequential()
model.add(Dense(8, input_dim=2))
stuart-warren / es-thrift.go
Created Dec 7, 2014
Example golang code to access Elasticsearch using Thrift
View es-thrift.go
package main
* Example golang code to access Elasticsearch using Thrift
* gen-go directory generated with:
* ``thrift -gen go elasticsearch.thrift``
import (
"" // generated code
paulmach / serve.go
Last active Jun 14, 2022
Simple Static File Server in Go
View serve.go
Serve is a very simple static file server in go
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
package main
View mgoExample.go
package main
import (
type Person struct {
tpope / .gitattributes
Created Oct 24, 2010
Fewer conflicts in your Rails apps
View .gitattributes
Gemfile.lock merge=bundlelock
db/schema.rb merge=railsschema