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
#!/bin/bash | |
declare -a StringArray=('198206' | |
'351642' | |
'660753' | |
'1126120' | |
'1297412' | |
'1428165' | |
'1434549' | |
'1624750' |
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
import csv | |
import sys | |
import re | |
from datetime import datetime | |
csv.field_size_limit(sys.maxsize) | |
field_id = 'ddd:11' | |
dateranges = [("1951-01-01", "1951-12-31"), |
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
from pyelasticsearch import ElasticSearch | |
import json | |
import codecs | |
import glob | |
import os | |
# ElasticSearch settings | |
ES_CLUSTER = 'http://localhost:9200/' | |
ES_INDEX = 'kb' |
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
src_path = "" #here you need to input the directory that contains the file | |
main_file = "" #here you need to input the name of the file | |
import csv | |
import collections | |
import pprint | |
with open(main_file, "rb") as fp: | |
root = csv.reader(fp, delimiter='\t') | |
result = collections.defaultdict(list) | |
for row in root: |