Skip to content

Instantly share code, notes, and snippets.

View ixaxaar's full-sized avatar
🏔️

ixaxaar ixaxaar

🏔️
View GitHub Profile
@ixaxaar
ixaxaar / event_export.py
Created February 23, 2016 14:18 — forked from drmarshall/event_export.py
Example Mixpanel raw event export script
#! /usr/bin/env python
#
# Mixpanel, Inc. -- http://mixpanel.com/
#
# Python API client library to consume mixpanel.com analytics data.
import hashlib
import urllib
import time
try:
@ixaxaar
ixaxaar / pmap
Created February 24, 2016 08:09
pmap output
11482: java -jar -Xmx10G -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=50 -Dkamon.auto-start=true -javaagent:/home/ubuntu/.ivy2/cache/org.aspectj/aspectjweaver/jars/aspectjweaver-1.8.2.jar /home/ubuntu/cerebro.jar 0.0.0.0 9998
0000000000400000 4K r-x-- java
0000000000600000 4K rw--- java
0000000001577000 860K rw--- [ anon ]
0000000540000000 7823360K rw--- [ anon ]
000000071d800000 2662400K ----- [ anon ]
00000007c0000000 10240K rw--- [ anon ]
00000007c0a00000 1038336K ----- [ anon ]
00007f06f9d86000 148040K r--s- _1zg.fdt
00007f0724bad000 14104K r--s- _1zg_Lucene50_0.tim
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ixaxaar
ixaxaar / inception_v3.py
Created July 5, 2016 10:38 — forked from neggert/inception_v3.py
Inception-v3 implementation in Keras
from keras.models import Model
from keras.layers import (
Input,
Dense,
Flatten,
merge,
Lambda
)
from keras.layers.convolutional import (
Convolution2D,
curl -v https://dl.bintray.com/sbt/sbt-plugin-releases/org.apache.commons/commons-parent/32/jars/commons-parent.jar
* Trying 108.168.243.150...
* Connected to dl.bintray.com (108.168.243.150) port 443 (#0)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* found 704 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* gnutls_handshake() failed: Error in the pull function.
* Closing connection 0
curl: (35) gnutls_handshake() failed: Error in the pull function.

Traversals

Traversal[S,E] which implements Iterator[E] where S:Start, E:End

Step[S,E] //  an individual function applied to S to yield E . Steps are chained within a traversal.
TraversalStrategy // interceptor methods to alter the execution of the traversal (e.g. query re­writing).
TraversalSideEffects // key/value pairs that can be used to store global information about the traversal.
Traverser[T] // the object propagating through the Traversal currently representing an object of type T .
def beam[T](
data:List[List[T]],
perplexityFn: List[T] => Double,
startNode:T,
beamSize:Int = 10)
:List[(List[T], Double)] = {
var candidates = List((List(startNode), 0d))
data.foreach{ case datum:List[T] =>
@ixaxaar
ixaxaar / beamPermute.scala
Last active March 2, 2017 09:17
Beam over permutations, find the best possible sequence given a perplexity function
def beamPermute[T](
data: List[T],
perplexityFn: List[T] => Double,
startNode: T,
beamSize: Int = 10,
beamWindow: Int = 3
): List[(List[T], Double)] = {
var candidates = List((List(startNode), 0d))
#!/usr/bin/env bash
sudo apt-get install -y python3-pip python3-dev python-dev python-pip
sudo pip install langid
sudo pip2 install langid
sudo pip3 install langid
@ixaxaar
ixaxaar / cassandra.sh
Created October 6, 2014 12:08
Simple bash script to install cassandra cluster
#!/usr/bin/env bash
# A script to install cassandra
# Add the seed nodes here
SEEDS[0]='10.1.1.1'
SEEDS[1]='10.1.1.2'
SEEDS[2]='10.1.1.3'