This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Use extractDocs.py to parse and index the StackOverflow posts.xml file into an existing index. | |
| Usage: extractDocs.py [options] file | |
| Options: | |
| -h, --help show this help message and exit | |
| -s SERVER, --server=SERVER | |
| ElasticSearch Server | |
| -i INDEX, --index=INDEX | |
| Index name to use | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python2.7 | |
| import csv | |
| from pyes import * | |
| reader = csv.reader(open('npidata_20050523-20130811.csv', 'rb')) | |
| conn = ES('localhost:9200', timeout=20.0) | |
| counter = 0 | |
| for row in reader: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python | |
| import requests | |
| import json | |
| data = [] | |
| limit = 100 | |
| offset = 740 | |
| chunks = 74 | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | curl -XPUT 'localhost:9200/doctors_index' -d ' | |
| { | |
| "settings": { | |
| "number_of_shards": 16, | |
| "number_of_replicas": 0, | |
| "index.refresh_interval": 120, | |
| "analysis": { | |
| "analyzer": { | |
| "autocomplete": { | |
| "type": "custom", | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | "settings" : { | |
| "analysis" : { | |
| "filter" : { | |
| "blocks_filter" : { | |
| "type" : "word_delimiter", | |
| "preserve_original": "true" | |
| }, | |
| "shingle":{ | |
| "type":"shingle", | |
| "max_shingle_size":5, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | curl -XPUT 'localhost:9200/doctors_index' -d ' | |
| { | |
| "settings": { | |
| "analysis": { | |
| "analyzer": { | |
| "autocomplete": { | |
| "type": "custom", | |
| "tokenizer": "standard", | |
| "filter": ["standard", "lowercase", "kstem", "edgeNGram"] | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # all apache files need writeable permissions for this script to run | |
| import sys, inspect, os, shutil | |
| home = os.path.expanduser("~") | |
| top = home + '/git' | |
| apacheRoot = '/Library/WebServer/Documents/' | |
| #first remind user to have proper permissions on /etc/apache2/ | |
| var = raw_input("\nScript requires that /etc/apache2/ is writeable. Running 'sudo chmod -R 777 /etc/apache2' will accomplish this. Enter 'y' to proceed.\n") | |
| if var != 'y': | |
| sys.exit(0) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var globalTimeout = 120000; | |
| /*************************************************************** | |
| ** set configs for protractor tests | |
| ** | |
| ***************************************************************/ | |
| exports.config = { | |
| //directConnect: true, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //Problem: variation of Josephus problem | |
| // Take a second to imagine that you are in a room with 100 chairs arranged in a circle. | |
| //These chairs are numbered sequentially from One to One Hundred. | |
| //At some point in time, the person in chair #1 will be told to leave the room. | |
| //The person in chair #2 will be skipped, and the person in chair #3 will be told to leave. | |
| //Next to go is person in chair #6. In other words, 1 person will be skipped initially, and then 2, 3, 4.. and so on. | |
| //This pattern of skipping will keep going around the circle until there is only one person remaining.. the survivor. | |
| //Note that the chair is removed when the person leaves the room. | |
| // | |
| //Write a program to figure out which chair the survivor is sitting in. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | [ | |
| { | |
| "jmhVersion" : "1.32", | |
| "benchmark" : "com.rallyhealth.mongo.v13.FutureMongoCollectionBench.aggregate", | |
| "mode" : "thrpt", | |
| "threads" : 10, | |
| "forks" : 1, | |
| "jvm" : "/Users/scott.rice/.sdkman/candidates/java/8.0.292.hs-adpt/jre/bin/java", | |
| "jvmArgs" : [ | |
| "-Xmx2G", | 
OlderNewer