Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
notebook: | |
docker run -it --rm -p 8888:8888 -v `pwd`/jupyter:/home/jovyan/work -w /home/jovyan/work jupyter/tensorflow-notebook start-notebook.sh --NotebookApp.token='' |
This file contains 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/python | |
import requests | |
import simplejson as json | |
import logging | |
import argparse | |
def make_request(url, payload): | |
return requests.get(url, data=payload).json |
This file contains 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
function waitForEvent(waitFunction, callback) { | |
if(waitFunction()) { | |
window.setTimeout( | |
function() { | |
waitForEvent(waitFunction, callback); | |
}, 1000); | |
} else { | |
callback(); | |
} | |
} |
This file contains 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 | |
from pyes import * | |
import argparse | |
import logging | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--source', type=str, help='Enter the source index', required=True) | |
parser.add_argument('--dest', type=str, help='Enter the dest index', required=True) | |
parser.add_argument('--type', type=str, help='Enter the type', required=True) |
This file contains 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
conn.search( | |
query=FilteredQuery( | |
TermQuery( | |
'name', | |
'Dave' | |
), | |
ANDFilter([ | |
TermFilter('memberStatus', 'valid'), | |
RangeFilter(ESRangeOp('startDate', 'lt', '2012-01-1')), | |
RangeFilter(ESRangeOp('endDate', 'gte', '2012-01-1')), |
This file contains 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
try: | |
self.config.readfp(open(config_file_path)) | |
except IOError as (errno, strerror): | |
logging.warning('I/O error({0}): {1}'.format(errno, strerror)) | |
logging.warning('Please check that {0} exists'.format(config_file_path)) |