use start.sh to spawn multiple instances, change eh18-image.py to accept image as parameter
This commit is contained in:
parent
a9bb18e7c3
commit
2060476480
2 changed files with 11 additions and 4 deletions
|
@ -18,9 +18,9 @@ flutheight = 1080
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
s.connect((TCP_IP, TCP_PORT))
|
s.connect((TCP_IP, TCP_PORT))
|
||||||
|
|
||||||
|
image=sys.argv[1] #image name
|
||||||
#Load the Image
|
#Load the Image
|
||||||
im = Image.open("chaoswest-logo.png")
|
im = Image.open(image)
|
||||||
rgb_im = im.convert('RGBA')
|
rgb_im = im.convert('RGBA')
|
||||||
width, height = im.size #get image size
|
width, height = im.size #get image size
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ def randomnumber(pseed,pmin,pmax,v1,v2,v3):
|
||||||
newseed=(int)(time.time()/60) #seed based on timestamp (full minutes)
|
newseed=(int)(time.time()/60) #seed based on timestamp (full minutes)
|
||||||
seed=newseed
|
seed=newseed
|
||||||
|
|
||||||
user=int(sys.argv[1]) #1..n
|
user=int(sys.argv[2]) #1..n
|
||||||
parts=int(sys.argv[2]) #n users
|
parts=int(sys.argv[3]) #n users
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
pixelcoords=[]
|
pixelcoords=[]
|
||||||
|
|
7
start.sh
Normal file
7
start.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
maxCount=10
|
||||||
|
fileName=ctdo.png
|
||||||
|
for i in $( seq 1 $maxCount); do
|
||||||
|
echo starting $i of $maxCount
|
||||||
|
python3 eh18-image.py $fileName $i $maxCount &
|
||||||
|
done
|
Loading…
Add table
Reference in a new issue