Skip to content

Instantly share code, notes, and snippets.

🤠

Luke Nezda nezda

🤠
Block or report user

Report or block nezda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nezda
nezda / new_100mb_throttle_macduff_stats.json
Created Sep 26, 2016
"lex-macduff-2016-09-21t17:54:15.305481" this was a more typically slow ; yes, somewhat less docs because of an input variation but I don't think that explains delta
View new_100mb_throttle_macduff_stats.json
{
"_shards" : {
"total" : 30,
"successful" : 30,
"failed" : 0
},
"_all" : {
"primaries" : {
"docs" : {
"count" : 20982332,
@nezda
nezda / 100mb_throttle_macduff_stats.json
Created Sep 26, 2016
how was this so fast!? see "lex-macduff-2016-09-17t15:02:04.986962" "all"
View 100mb_throttle_macduff_stats.json
{
"_shards" : {
"total" : 30,
"successful" : 30,
"failed" : 0
},
"_all" : {
"primaries" : {
"docs" : {
"count" : 18808988,
View cleanup_positive_patent_star.py
from bias import bias_after_setup; bias_after_setup(celery.conf); from lexdb.model.motion import dump_motions_for_case; from bias.models import LexSession; from lexdb.model import * ; import logging; logging.basicConfig(level=logging.DEBUG); from bias.tasks.annotate import *;
from lexdb.model.patent import recalculate
case_id=7550; pnum='6245648'
c = LexSession.query(Case).filter(Case.id == case_id).one()
pc = LexSession.query(PatentCitation).filter(PatentCitation.case_id == case_id).filter(PatentCitation.patent_number == pnum).all()
p = LexSession.query(Patent).filter(Patent.number == pnum).one()
recalculate(c, p, pc)
View refresh_ocr.py
import argparse
from first import first
from deus_lib.scripts import initialize_script
from bias.models import (
LexSession,
)
from lexdb.model import (
PatentCitation,
DocketEntry,
MultipleDocument,
@nezda
nezda / index_name_fields_loader_test.sh
Last active Aug 29, 2015
Demonstrate that `store`'d fields with `index_name` in their mapping loaded using `fields` are returned in `hits` objects keyed by their `index_name` (e.g., "name_string", not "name" in this example).
View index_name_fields_loader_test.sh
#!/bin/sh
# Overall purpose of index_name usage here is to work around bug https://github.com/elasticsearch/elasticsearch/issues/5851
echo "Remove old index..."
curl -XDELETE "http://localhost:9200/fml?pretty=true"
echo "Make index and add some data..."
curl -XPOST "http://localhost:9200/fml/"
@nezda
nezda / query_cache_test.sh
Last active Aug 29, 2015
Agg query_cache not working with date filter
View query_cache_test.sh
#!/bin/sh
echo "Remove old index..."
curl -XDELETE "http://localhost:9200/fml?pretty=true"
echo "Make index and add some data - default mappings are fine"
curl -XPOST "http://localhost:9200/fml/widget/?pretty=true" -d '
{
"name": "uno",
"postDate" : "2009-11-15"
@nezda
nezda / filter_term_agg_test.sh
Created Aug 15, 2014
Troubles porting an elasticsearch Terms Facet to a Terms Aggregation
View filter_term_agg_test.sh
#!/bin/sh
# Remove old data
curl -XDELETE "http://localhost:9200/fml?pretty=true"
# Add some data - default mappings are fine
curl -XPOST "http://localhost:9200/fml/widget/?pretty=true" -d '
{
"name": "uno",
"tags": [
You can’t perform that action at this time.