Commits

Ryan Tracey  committed 5736d94

pozi codes

  • Participants
  • Parent commits 99182cb

Comments (0)

Files changed (1)

File makecodes.py

+#!/usr/bin/env python
+
+import csv
+import random
+
+taverns = [
+	["ZA000296","1017311","Mini's Tavern"],
+	["ZA015309","1028013","Mbe's Place"],
+	["ZA017458","1018857","Freedom Tavern"],
+	["ZA013482","1017910","Mam Tozi's Place"],
+	["ZA011136","1021652","Monica's Place"],
+	["ZA019356","1044207","Soni's Tavern"],
+	["ZA016811","1025134","Mambalis place"],
+	["ZA017306","1007700","Ntina's Place"],
+	["ZA006642","1026193","Pretty's Place"],
+	["ZA009184","1015795","KG Tavern"],
+	["ZA018271","1027824","Velly's Place"],
+	["ZA018400","1044004","Sbongiles inn"],
+	["ZA000158","1027017","Smack down"],
+	["ZA002630","1033697","Pinky's Place"],
+	["ZA014617","1018755","Nester's Tavern"],
+	["ZA014459","1021499","Eunice"],
+	["ZA000875","1027376","Baleseng's Place"],
+	["ZA018611","1042791","Lorato"],
+	["ZA013220","1037767","Gabs Place"],
+	["ZA010423","1019517","Tshidi's Place"],
+	["ZA005722","1045157","Mawasha's"],
+	["ZA013051","1021377","the House Trading"],
+	["ZA019033","1044413","Tlak's Place"],
+	["ZA018957","1041292","Sister Sister"],
+	["ZA014795","1010555","Betty's Tavern"],
+	["ZA005826","1037475","Ketumele Inn"],
+	["ZA006451","1007810","Lacoste"],
+	["ZA003137","35334",  "Naledi By Night"],
+	["ZA017061","33947",  "Olgas Place"],
+	["ZA019222","1043747","Thusi's Place"],
+	["ZA013029","1007636","The Louise Trading"],
+	["ZA006568","1036738","Bugs Place"],
+	["ZA008744","1031221","Mapop's"],
+	["ZA000509","1019676","Khumo"],
+	["ZA003730","1030372","Delly's Place"],
+	["ZA017309","1033227","Rakgadi's Place"],
+	["ZA018678","1043912","Fountain INN"]
+]
+
+masterlist = []
+def mkcode():
+    code = random.randint(100000,999999)
+    if code in masterlist:
+        return mkcode()
+    else:
+        masterlist.append(code)
+        return code
+
+tavcodes = [['InTouch Number','Customer Number','Tavern Name', 'Code']]
+for tavern in taverns:
+    for i in range(880):
+        tavcodes.append(tavern + [mkcode()])
+
+
+f = open('taverncodes.csv', 'w')
+csv_writer = csv.writer(f, quoting=csv.QUOTE_NONNUMERIC)
+csv_writer.writerows(tavcodes)
+f.close()
+