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
// Based on - https://stackoverflow.com/a/53878/437894 | |
#include <vector> | |
#include <string> | |
using namespace std; | |
vector<string> stringTokenizer(string input, char delimiter){ | |
vector<string> result; | |
if(!input.length()) | |
return result; |
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/python3 | |
import boto3 | |
def get_s3_object(key, keyid, bucket, s3_file_location, local_file): | |
client = boto3.client('s3',aws_access_key_id=keyid,aws_secret_access_key=key) | |
client.download_file(bucket, s3_file_location, local_file) | |
return |
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 subprocess | |
def execute_binary(args): | |
popen = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
stdout,stderr = popen.communicate() | |
if popen.returncode != 0: | |
print("Process exited non zero: {0}".format(popen.returncode)) | |
return False | |
return 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
#!/usr/bin/python3 | |
from pymongo import MongoClient | |
from datetime import datetime, timedelta | |
from pprint import pprint | |
mongo_parameters = { | |
'source_mongo': '', | |
'db' : '', | |
'dest_mongo' : '' | |
} |
NewerOlder