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
import json | |
import os | |
import time | |
import csv | |
def dump_to_csv(data, filename): | |
with open(filename, 'w', newline='') as csvfile: | |
writer = csv.writer(csvfile, delimiter='\t') |
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
import json | |
import os | |
import time | |
def split_json_by_guid_station(input_file, output_dir, chunk_size_mb): | |
""" | |
Splits a JSON file into smaller files, ensuring that each file | |
contains complete 'guid_station' entries. It avoids splitting a | |
'guid_station' across multiple files. | |
this includes timing and progress output. |
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
class Trie: | |
def __init__(self): | |
self.endword = False | |
self.children = [None]*26 | |
def insert(self,word): | |
print() | |
curr = self |
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
import java.util.Properties; | |
import javax.mail.Message; | |
import javax.mail.MessagingException; | |
import javax.mail.PasswordAuthentication; | |
import javax.mail.Session; | |
import javax.mail.Transport; | |
import javax.mail.internet.InternetAddress; | |
import javax.mail.internet.MimeMessage; |
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
private String[] split_string(String newQuestion){ | |
/* | |
this: | |
"According to Ruzbihan, these 2 tribe | |
s were part of both uzbek and mangits" | |
must be: | |
"According to Ruzbihan, these 2 tribes | |
were part of both uzbek and mangits" | |
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
public class node { | |
int value ; | |
node next ; | |
public node(int newvalue){ | |
value = newvalue ; | |
next = null ; | |
} | |