Skip to content

Instantly share code, notes, and snippets.

@lezed1
Created July 31, 2016 08:36
Show Gist options
  • Save lezed1/f0e9c3c443207396238c6cac98b39e27 to your computer and use it in GitHub Desktop.
Save lezed1/f0e9c3c443207396238c6cac98b39e27 to your computer and use it in GitHub Desktop.
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