Skip to content

Instantly share code, notes, and snippets.

View eliasah's full-sized avatar

Elie A. eliasah

View GitHub Profile
@azymnis
azymnis / KMeansJob.scala
Created October 23, 2014 23:07
K-Means in scalding
import com.twitter.algebird.{Aggregator, Semigroup}
import com.twitter.scalding._
import scala.util.Random
/**
* This job is a tutorial of sorts for scalding's Execution[T] abstraction.
* It is a simple implementation of Lloyd's algorithm for k-means on 2D data.
*
* http://en.wikipedia.org/wiki/K-means_clustering
@rmoff
rmoff / gist:379e6ce46eb128110f38
Last active August 14, 2020 18:39
Kibana 3 and Elasticsearch 1.4 - CORS problem

Kibana 3 against ElasticSearch 1.4 throws an Connection Failed screen. The error text says to set http.cors.allow-origin, but it misses out the important http.cors.enabled: true

Working config:

$ grep cors elasticsearch-1.4.0.Beta1/config/elasticsearch.yml
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
@debasishg
debasishg / gist:b4df1648d3f1776abdff
Last active July 27, 2024 14:46
another attempt to organize my ML readings ..
  1. Feature Learning
  1. Deep Learning
@debasishg
debasishg / gist:d9b6d984df3cc4681eb1
Last active November 23, 2022 06:26
Useful links on Convex Optimization
@syhw
syhw / dnn.py
Last active October 19, 2024 08:20
A simple deep neural network with or w/o dropout in one file.
"""
A deep neural network with or w/o dropout in one file.
License: Do What The Fuck You Want to Public License http://www.wtfpl.net/
"""
import numpy, theano, sys, math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams
@staltz
staltz / introrx.md
Last active April 16, 2025 07:21
The introduction to Reactive Programming you've been missing
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active March 27, 2025 17:19
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

require(ggplot2)
# Figure 1
ggplot(GermanCredit, aes(x = Class)) +
geom_bar(aes(y = (..count..)/sum(..count..))) +
labs(y = "prob.")
@stormpython
stormpython / README.md
Last active March 21, 2022 13:45
Data Visualization with Elasticsearch Aggregations and D3 (Tutorial)

Data Visualization with Elasticsearch Aggregations and D3

Link to the Elasticsearch Blog.

@jprante
jprante / ack.txt
Last active August 29, 2015 13:55
JDBC river - start river, run each minute, select orders, put them by created column as _id into Elasticsearch, send acknowledge info back to DB - https://github.com/jprante/elasticsearch-river-jdbc
mysql> select * from ack;
+------+---------------------+------+
| n | t | c |
+------+---------------------+------+
| 1 | 2014-01-31 23:37:00 | 6 |
| 2 | 2014-01-31 23:38:00 | 6 |
| 3 | 2014-01-31 23:39:00 | 6 |
+------+---------------------+------+
3 rows in set (0.00 sec)