Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if button == options[0]:
pass
if button == options[1]:
webbrowser.open('https://github.com/Jflick58', new=0, autoraise=True)
if button == options[2]:
sys.exit()
msg = "Enter your query information. Output will be in the form of a .csv file"
title = version
fieldNames = [ # NOQA
"Search term (do not include the '#' mark, just the the hashtag text)", "From Account",
"Starting Date (YYYY-MM-DD)", "Ending Date (YYYY-MM-DD)", "Number of Tweets",
"Output File Name"
]
fieldValues = [] # we start with blanks for the values # NOQA
fieldValues = g.multenterbox(msg, title, fieldNames) # NOQA
query = fieldValues[0]
account = fieldValues[1]
starting_date = fieldValues[2]
ending_date = fieldValues[3]
limit = int(fieldValues[4])
output2 = fieldValues[5]
# Scrape Twitter
tweets = query_tweets(
query + '%20from%3A' + account +
'%20since%3A' + starting_date + 'until%3A' + ending_date, limit
)
with open(output2 + '.json', "w") as output:
else: #pre=post test
header=efLines[0]
m1ind=-1
m2ind=-1
splitHead=header.split("\t")
m1=eg.choicebox(title="Select measurement 1",msg="Select which column contains data files corresponding to measurement 1",choices=splitHead)
if m1:
for item in range(0,len(splitHead)):
if m1 in splitHead[item]:
m1ind=item
m2=eg.choicebox(title="Select measurement 2",msg="Select which column contains data files corresponding to measurement 2",choices=splitHead)
if m2:
for item in range(0,len(splitHead)):
if m2 in splitHead[item]:
m2ind=item
setup=eg.multenterbox(title="Analysis settings",msg="Choose the settings you want for this analysis.",fields=["Critical p:","Use Bonferroni correction for multiple comparisons?(y/n)","Permutations per variable","Epoch size(seconds)","Artifact rejection threshold"],values=["0.05","n","10000","10","0.5"])
cond1=[]
cond2=[]
for item in efLines[1:]:
print("Loading session "+str(item))
session1=[]
session2=[]
splitup=item.split("\t")
#get the neurophys data
if True:
physdata1=getPhysData(splitup[m1ind],float(setup[3]),float(setup[4]),("sessions"))
print(str(physdata1))
for index in range(0,len(physdata1)):
session1.append(physdata1[index])
cond1.append(session1)
physdata2=getPhysData(splitup[m2ind],float(setup[3]),float(setup[4]),("sessions"))
if button == options[0]:
pass
if button == options[1]:
webbrowser.open('https://github.com/Jflick58', new=0, autoraise=True)
if button == options[2]:
sys.exit()
msg = "Enter your query information. Output will be in the form of a .json file"
title = version
fieldNames = [ # NOQA
"Search term (do not include the '#' mark, just the the hashtag text)", "From Account",
"Starting Date (YYYY-MM-DD)", "Ending Date (YYYY-MM-DD)", "Number of Tweets",
"Output File Name"
]
fieldValues = [] # we start with blanks for the values # NOQA
fieldValues = g.multenterbox(msg, title, fieldNames) # NOQA
query = fieldValues[0]
account = fieldValues[1]
starting_date = fieldValues[2]
ending_date = fieldValues[3]
limit = int(fieldValues[4])
output2 = fieldValues[5]
# Scrape Twitter
tweets = query_tweets(
query + '%20from%3A' + account +
'%20since%3A' + starting_date + 'until%3A' + ending_date, limit
)
with open(output2 + '.json', "w") as output:
elif workflow == "Tape Ingest 2":
def workstation(number):
add_to_revtmd('//revtmd:codingProcessHistory' + str([number]) + '/revtmd:role', 'Host Computer', revtmd_xmlfile)
add_to_revtmd('//revtmd:codingProcessHistory' + str([number]) + '/revtmd:manufacturer', 'Hewlett Packard', revtmd_xmlfile)
add_to_revtmd('//revtmd:codingProcessHistory' + str([number]) + '/revtmd:modelName', 'Z420 Workstation', revtmd_xmlfile)
add_to_revtmd('//revtmd:codingProcessHistory' + str([number]) + '/revtmd:version', 'ABC123', revtmd_xmlfile)
add_to_revtmd('//revtmd:codingProcessHistory' + str([number]) + '/revtmd:serialNumber', 'CZC4310HP8', revtmd_xmlfile)
# Currently unused, but I'll get around to it :[
else:
no_of_emptyfields = 18
if workflow == "Telecine Grade":
msg = "Interventions post capture"
title = "Interventions post capture?"
fieldNames = ["Colour Alterations","Exposure Alterations","Sound Alterations"]
grade_interventions = [] # we start with blanks for the values
grade_interventions = multenterbox(msg,title, fieldNames)
else:
if workflow == "Scanning":
scanner = 'Scanner'
else:
msg = "Capture Frame Rate"
title = "Capture Frame Rate"
fieldNames = ["15","16","18","20","22","24","25", "Multiple frame rates"]
capture_frame_rate = [] # we start with blanks for the values
capture_frame_rate = choicebox(msg,title, fieldNames)
fps_string = 'Captured at %s fps' % capture_frame_rate
msg ="Telecine Machine"
title = "Choose the telecine machine"
choices = ["Flashtransfer", "Flashscan", "Scanner"]
scanner = choicebox(msg, title, choices)
fieldNames = ["Year",
"Film Title","Copyright",
"Donation Date", "Director", "Reference number of first record", "Accession number of first record "]
fieldValues = [] # we start with blanks for the values
fieldValues = multenterbox(msg,title, fieldNames)
# make sure that none of the fields was left blank
while 1:
if fieldValues == None: break
errmsg = ""
for i in range(len(fieldNames)):
if fieldValues[i].strip() == "":
errmsg = errmsg + ('"%s" is a required field.' % fieldNames[i])
if errmsg == "": break # no problems found
fieldValues = multenterbox(errmsg, title, fieldNames, fieldValues)
msg ="User?"
title = "Pick a name yo!"
choices = ["Fiona Rigney", "Fleur Finley", "Kasandra O'Connell", "Kieran O'Leary"]
user = choicebox(msg, title, choices)
msg ="Type?"
title = "Pick a name yo!"
choices = ["Poster", "Still"]
type = choicebox(msg, title, choices)
print fieldValues[5]
ref = fieldValues[5]
acc_number = int(fieldValues[6])
number = 0 #Inmagic lists the first record as number 0. the second record is number 1 and so on.
#print noofemptyfields
with open(inmagic_xmlfile, "w+") as fo:
def edit_monsters(m1, m2):
while True: # loop until Cancel or having valid values
# easygui.multenterbox(text, titles, fieldls, values)
values = easygui.multenterbox(
"Please edit carefully", "edit monster stats", (
"Monster1: name (text)", "Monster1: attack (float)",
"Monster1: defense (float)", "Monster1: hitpoints (integer)",
"Monster2: name (text)", "Monster2: attack (float)",
"Monster2: defense (float)", "Monster2: hitpoints (integer)"
), (
m1.name, m1.attack, m1.defense, m1.hitpoints, m2.name,
m2.attack, m2.defense, m2.hitpoints
)
)
if values == None or None in values:
easygui.msgbox("nothing changed: empty value or Cancel")
break # break out of the edit loop
else:
try:
m1 = goblin.Monster(
return False
if chce.startswith('New '):
args.subcommand = 'new'
if chce != "New linux machine":
uselxc = False
else:
msg = ("Please select the size of your machine. "
"Memory sizes are in MB, unless you add G "
"(e.g. 1G). Disk sizes are always in GB\n."
"Please start small, you can always resize."
)
title = "Configuring Machine Size"
fieldNames = ["Memory", "# Cores", "Disk Size"]
fieldValues = ['512M', '2', '4G']
fieldValues = easygui.multenterbox(msg, title,
fieldNames, fieldValues)
if fieldValues:
args.mem, args.cores, args.disk = fieldValues
else:
return False
elif chce.startswith('List '):
args.subcommand = 'list'
elif chce.startswith('Start '):
args.subcommand = 'start'
elif chce.startswith('Stop '):
args.subcommand = 'stop'
elif chce.startswith('Modify '):
args.subcommand = 'modify'
elif chce.startswith('Destroy '):
args.subcommand = 'destroy'
video_dir = tkFileDialog.askdirectory(parent=root)
inmagic_xmlfile = 'blablabla.xml'
os.chdir(video_dir)
# Find all image files
video_files = glob('*.tif') + glob('*.jpg') + glob('*.jpeg')
no_of_emptyfields = len(video_files) # the number of inmagic records based on the number of files
msg = "Fill out these things please"
title = "blablablabl"
fieldNames = ["Year",
"Film Title","Copyright",
"Donation Date", "Director", "Reference number of first record", "Accession number of first record "]
fieldValues = [] # we start with blanks for the values
fieldValues = multenterbox(msg,title, fieldNames)
# make sure that none of the fields was left blank
while 1:
if fieldValues == None: break
errmsg = ""
for i in range(len(fieldNames)):
if fieldValues[i].strip() == "":
errmsg = errmsg + ('"%s" is a required field.' % fieldNames[i])
if errmsg == "": break # no problems found
fieldValues = multenterbox(errmsg, title, fieldNames, fieldValues)
msg ="User?"
title = "Pick a name yo!"
choices = ["Fiona Rigney", "Fleur Finley", "Kasandra O'Connell", "Kieran O'Leary"]
user = choicebox(msg, title, choices)
#More interviews
msg ="User?"
title = "Pick a name yo!"
choices = ["Kieran O'Leary", "Gavin Martin",
"Dean Kavanagh", "Raelene Casey",
"Anja Mahler", "Eoin O'Donohoe", "Brian Cash","Unknown"]
user = choicebox(msg, title, choices)
msg = "Fill out these things please"
title = "blablablabl"
fieldNames = ["Source Accession Number",
"Filmographic Reference Number",
"Identifier-Object Entry/Accession Number:"]
# we start with blanks for the values
fieldValues = multenterbox(msg,title, fieldNames)
# make sure that none of the fields was left blank
while 1:
if fieldValues == None: break
errmsg = ""
for i in range(len(fieldNames)):
if fieldValues[i].strip() == "":
errmsg = errmsg + ('"%s" is a required field.' % fieldNames[i])
if errmsg == "": break # no problems found
fieldValues = multenterbox(errmsg, title, fieldNames, fieldValues)
print fieldValues
# Prints info to screen. Make this actually useful!
#print "Reply was:", fieldValues
#print "Your selection was:\n Workflow = %s\n Scanner = %s\n Preparation actions = %s\n User = %s\n" % (workflow,scanner, preparation, user)
# Store md5 checksum.