Skip to content

Instantly share code, notes, and snippets.

@apetresc
apetresc / foxyproxy.json
Created October 25, 2017 19:01
A FoxyProxy 6.x (for Firefox) version of the AWS EMR filters
{
"mode": "patterns",
"proxySettings": [
{
"title": "EMR SOCKS Proxy",
"type": 3,
"color": "#cc8c2a",
"address": "localhost",
"port": 8157,
"proxyDNS": true,
@chetan
chetan / list_hadoop_codecs.sh
Last active August 11, 2023 12:38
List the available hadoop codecs
#!/usr/bin/env bash
# list_hadoop_codecs.sh
#
# USAGE:
# curl -sL https://gist.github.com/chetan/6524829/raw/list_hadoop_codecs.sh | bash
# make sure hadoop is avail
if [[ -z `which hadoop 2>/dev/null` ]]; then
echo "hadoop command not found!"
import theano
from pylearn2.models import mlp
from pylearn2.training_algorithms import sgd
from pylearn2.termination_criteria import EpochCounter
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
import numpy as np
from random import randint
class XOR(DenseDesignMatrix):