Skip to content

Instantly share code, notes, and snippets.

View archit12's full-sized avatar

Archit Saxena archit12

  • Software Incubator
  • India
View GitHub Profile
<?php
interface HandlerInterface
{
public function handle($message);
}
interface BufferedHandlerInterface extends HandlerInterface
{
public function flush();
@vfr292
vfr292 / discriminator_on_association_with_eager_loading.py
Created November 25, 2014 07:01
discriminator_on_association_with_eager_loading.py
'''
Created on Oct 22, 2014
@author: Victor
On 20141124 I asked about how to eager load the parent. The code, I submitted with the post is located at:https://gist.github.com/vfr292/a5939418285e4c8bd03b
'''
@eliasah
eliasah / knn.sh
Last active July 7, 2016 21:33
[elasticsearch] compute K-nearest neighbor for training a classifier purposes
##########################################################################################
# use case: training a classifier
#
# Many systems classify documents by assigning “tag” or “category” fields. Classifying
# documents can be a tedious manual process and so in this example we will train a classifier
# to automatically spot keywords in new documents that suggest a suitable category.
curl -XGET "http://localhost:9200/products_fr/_search" -d'
{
"query": {