Created
July 31, 2016 08:36
-
-
Save lezed1/f0e9c3c443207396238c6cac98b39e27 to your computer and use it in GitHub Desktop.
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 | |
accounts_file = "accounts.txt" | |
locations_file = "locations.txt" | |
runner_template = "nohup python ../../runserver.py -ns -k \"[GMAPS_KEY]\" -l \"{location}\" -u \"{username}\" -p \"{password}\" -st 3 &" | |
starting_line = "nohup python ../../runserver.py -os -k \"[GMAPS_KEY]\" -l \"[SOME LOCATION HERE]\" &" | |
print(starting_line) | |
with open(accounts_file) as accounts_csvfile: | |
with open(locations_file) as locations: | |
accounts = csv.reader(accounts_csvfile) | |
for account, location in zip(accounts, locations): | |
username, password = account | |
# print(username, password, lat, lon) | |
print(runner_template.format(username=username, password=password, location=location.strip())) | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment