rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
g.insert(image_id = imageId, tag_id = res[0][0])
g.insert(image_id = imageId, tag_id = tagid)
def run_stack_ingestion(g, stackFile, user_id): """ Ingestion of Stack image @param g DBGeneric instance @param stackFile full path to file @param user_id current user DB id """ global log duration_stime = time.time() ipath = os.path.dirname(stackFile) fitsNoExt = os.path.basename(stackFile.replace(FITSEXT, NULLSTRING)) debug("Starting ingestion of stack image: %s" % stackFile) res = g.execute("SELECT dflt_group_id, dflt_mode FROM youpi_siteprofile WHERE user_id=%d" % int(user_id)) perms = {'group_id': res[0][0], 'mode': res[0][1]} # First, do some cleanups... res = g.execute("""select name, checksum, id, ingestion_id from youpi_image where name = "%s";""" % fitsNoExt) # Image name found if res: # Do nothing because the same physical image is already ingested fitsNoExt = freshImageName(fitsNoExt, g) debug("[Warning] A stack image with the same name is already ingested. The stack image will be ingested as '%s'" % fitsNoExt) debug("[Warning] The IMAGEOUT_NAME value will be updated to match '%s' and the stack image will be renamed on disk" % fitsNoExt) g.setTableName('youpi_ingestion') g.insert( start_ingestion_date = getNowDateTime(duration_stime), end_ingestion_date = getNowDateTime(duration_stime), # FIXME email = '', user_id = user_id, label = "Stack %s" % os.path.basename(fitsNoExt), check_fitsverify = 0, check_qso_status = 0, check_multiple_ingestion =0, path = ipath, group_id = perms['group_id'], mode = perms['mode'], exit_code = 0 ) ingestionId = g.con.insert_id() # Get instruments res = g.execute("""select id, name from youpi_instrument;""") instruments = {} for inst in res: instruments[inst[1]] = (inst[0], re.compile(inst[1], re.I)) # MD5 sum computation debug("Computing MD5 checksum...") stime = time.time() checksum = md5.md5(open(stackFile,'rb').read()).hexdigest() etime = time.time() debug("MD5 is %s (in %.2fs)" % (checksum, etime-stime)) r = pyfits.open(stackFile) try: header = getFITSheader(r, stackFile) except IngestionError, e: # Do not process this image debug("No header found, skipping ingestion of %s" % stackFile, WARNING) raise # Keywords checks t = getFITSField(header, 'telescop') detector = getFITSField(header, 'detector') o = getFITSField(header, 'object') e = getFITSField(header, 'exptime') eq = getFITSField(header, 'equinox') channel = getFITSField(header, 'filter') debug("%s data detected" % detector) # Instrument matching instrument_id = -1 for val in instruments.values(): # Compiled pattern cp = val[1] if cp.match(detector): instrument_id = val[0] if instrument_id < 0: debug("Matching instrument '%s' not found in DB. Image ingestion skipped." % detector, WARNING) sys.exit(1) # CHANNEL DATABASE INGESTION res = g.execute("""select name from youpi_channel where name="%s";""" % channel) if not res: g.setTableName('youpi_channel') g.insert( name = channel, instrument_id = instrument_id ) else: debug("Channel %s already existing in DB" % channel) # First gets run and channel IDs q = """ SELECT chan.id, i.id FROM youpi_channel AS chan, youpi_instrument AS i WHERE chan.name = '%s' AND i.name = '%s';""" % (channel, detector) res = g.execute(q) # Then insert image into db g.setTableName('youpi_image') g.insert( name = fitsNoExt, object = o, exptime = e, equinox = eq, ingestion_date = getNowDateTime(), checksum = checksum, path = ipath, channel_id = res[0][0], ingestion_id = ingestionId, instrument_id = res[0][1] ) imageId = g.con.insert_id() # Computing image sky footprint footprint_start = time.time() poly = [] total = range(1, len(r)) if not total: total = [0] for i in total: pix1, pix2 = r[i].header['CRPIX1'], r[i].header['CRPIX2'] val1, val2 = r[i].header['CRVAL1'], r[i].header['CRVAL2'] cd11, cd12, cd21, cd22 = r[i].header['CD1_1'], r[i].header['CD1_2'], r[i].header['CD2_1'], r[i].header['CD2_2'] nax1, nax2 = r[i].header['NAXIS1'], r[i].header['NAXIS2'] x1,y1 = 1 - pix1, 1 - pix2 x2,y2 = nax1 - pix1, 1 - pix2 x3,y3 = nax1 - pix1, nax2 - pix2 x4,y4 = 1 - pix1, nax2 - pix2 ra1, dec1, ra2, dec2, ra3, dec3, ra4, dec4 = ( val1+cd11*x1+cd12*y1, val2+cd21*x1+cd22*y1, val1+cd11*x2+cd12*y2, val2+cd21*x2+cd22*y2, val1+cd11*x3+cd12*y3, val2+cd21*x3+cd22*y3, val1+cd11*x4+cd12*y4, val2+cd21*x4+cd22*y4 ) poly.append("(%.20f %.20f, %.20f %.20f, %.20f %.20f, %.20f %.20f, %.20f %.20f)" % (ra1, dec1, ra2, dec2, ra3, dec3, ra4, dec4, ra1, dec1)) q = "GeomFromText(\"MULTIPOLYGON((" for p in poly: q += "%s, " % p q = q[:-2] + "))\")" g.execute("""UPDATE youpi_image SET skyfootprint=%s WHERE name="%s";""" % (q, fitsNoExt)) # Preparing data to insert centerfield point # FIXME ra = de = 0 cf = "GeomFromText('POINT(%s %s)')" % (ra, de) qu = """UPDATE youpi_image SET centerfield=%s WHERE name="%s";""" % (cf, fitsNoExt) g.execute(qu) debug("Sky footprint/centerfield computation took %.3fs" % (time.time()-footprint_start)) debug("Ingested in database as '%s'" % fitsNoExt) # Image tagging: tag the image with a 'Stack' tag debug("Tagging image with the %s keyword" % TAG_STACK) res = g.execute("SELECT id FROM youpi_tag WHERE name='%s'" % TAG_STACK) if not res: # Add new 'STACK' tag g.setTableName('youpi_tag') g.insert(name = TAG_STACK, style = 'background-color: rgb(53, 106, 160); color:white; border:medium none -moz-use-text-color;', date = getNowDateTime(), comment = 'Used to mark stack images', user_id = user_id, group_id = perms['group_id'], mode = perms['mode'] ) g.setTableName('youpi_rel_tagi') g.insert(image_id = imageId, tag_id = res[0][0]) # Ingestion log duration_etime = time.time() msg = "Stack ingestion done; took %.2fs" % (duration_etime - duration_stime) debug(msg) # Close ingestion g.setTableName('youpi_ingestion') g.update( report = base64.encodestring(zlib.compress(log, 9)).replace('\n', ''), end_ingestion_date = getNowDateTime(duration_etime), wheres = {'id' : ingestionId} ) return fitsNoExt + FITSEXT
1b2fc36fcb0487e6d00344b9f9f6191a60c26898 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/1b2fc36fcb0487e6d00344b9f9f6191a60c26898/stack_ingestion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3772, 67, 310, 6868, 12, 75, 16, 2110, 812, 16, 729, 67, 350, 4672, 3536, 657, 75, 6868, 434, 7283, 1316, 632, 891, 314, 2383, 7014, 791, 632, 891, 2110, 812, 1983, 589, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3772, 67, 310, 6868, 12, 75, 16, 2110, 812, 16, 729, 67, 350, 4672, 3536, 657, 75, 6868, 434, 7283, 1316, 632, 891, 314, 2383, 7014, 791, 632, 891, 2110, 812, 1983, 589, 35...
if sys.argv[1] == '-c':
setup_seattle=False setup_seattlegeni=False if sys.argv[1] == '-cseattle':
def main(): """ <Purpose> Deploys the monitor_processes.py along with all the files needed into a single directory. The directory must already exist. <Exceptions> If OS is not Linux, then setting up crontab will not work. <Side Effect> If the target directory that the user provides is not empty, then this script will delete all the files that already exist in that directory. <Usage> make a folder that lies in the same directory as the trunk director and copy this file and setup_crontab.py in that file. Go to the trunk folder in the svn checkout directory and run the command: python preparetest.py <../folder_name>. Then copy over preparetest.py in that folder as well. PYTHONPATH=$PYTHONPATH:/home/<user_name>/trunk && deploy_monitor_processes.py <target_folder> """ checkArgs() #setup some variables for cron setup cron_setup = False log_dir = "" # -c means we have to setup the crontab with a new cron job if sys.argv[1] == '-c': cron_setup = True sys.argv = sys.argv[1:] checkArgs(cron_setup) log_dir = sys.argv[2] if not( os.path.isdir(log_dir) ): help_exit("given log_foldername is not a directory") #set up all the variables about directory information current_dir = os.getcwd() #ensures that the backslashes and forward slashes are proper for the OS target_dir = os.path.normpath(sys.argv[1]) #make sure svn is up to date and start up preparetest os.chdir(os.path.normpath(current_dir + "/../trunk")) os.system("svn up") os.chdir(current_dir) preparetest.main() if not( os.path.isdir(target_dir) ): help_exit("given foldername is not a directory") #change to target directory and clean up the target directory folder os.chdir(target_dir) files_to_remove = glob.glob("*") for f in files_to_remove: if os.path.isdir(f): shutil.rmtree(f) else: os.remove(f) os.chdir(current_dir) #the next few lines is necessary unless the file is manually copied over preparetest.copy_to_target("../trunk/integrationtests/monitor_scripts/*", target_dir) preparetest.copy_to_target("../trunk/integrationtests/common/*", target_dir) #change directory to the target directory and preprocess the *.mix files os.chdir(target_dir) preparetest.process_mix("repypp.py") #check to see if cron setup was requested, if yes run cron_setup if cron_setup: #create the absolute path for the log file and the file needed for the #cron job cron_tab_dir=os.path.normpath(current_dir + "/" + target_dir) cron_log_dir=os.path.normpath(current_dir + "/" + log_dir) cron_line="*/15 * * * * export GMAIL_USER='seattle.devel@gmail.com' && export GMAIL_PWD='repyrepy' && /usr/bin/python " + cron_tab_dir + "/monitor_processes.py > " + cron_log_dir + "/cron_log.monitor_processes" + os.linesep #setup the cron job setup_crontab.add_crontab(cron_line, "monitor_processes")
352bf0b5c34e7a744995ca6844028cae6de4763f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7274/352bf0b5c34e7a744995ca6844028cae6de4763f/deploy_monitor_processes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 411, 10262, 4150, 34, 4019, 383, 1900, 326, 6438, 67, 18675, 18, 2074, 7563, 598, 777, 326, 1390, 3577, 1368, 279, 2202, 1867, 18, 1021, 1867, 1297, 1818, 1005, 18, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 411, 10262, 4150, 34, 4019, 383, 1900, 326, 6438, 67, 18675, 18, 2074, 7563, 598, 777, 326, 1390, 3577, 1368, 279, 2202, 1867, 18, 1021, 1867, 1297, 1818, 1005, 18, 22...
req_by = ''
req_tmp = []
def _search_dependencies(self, pac): # Search in local repo for pac_name in descriptions files. # If found than pack.name is requied by pack_name deps_stack = [] deps_on = '' deps = '' req_stack = [] req_by = '' req = '' # Get dependencies only from "pac" pac_raw_req_by = self._get_raw_desc(pac, "depends") pac_req_by = self._get_dependencies(pac_raw_req_by) for p in pac_req_by.split(','): p = p.strip() deps_stack.append(p) # Get required by for package in self["local"]: sep = None raw_depends = self._get_raw_desc(package, "depends") depends_on = self._get_dependencies(raw_depends) for p in depends_on.split(','): p = p.strip() if '<=' in p: p, sep, ver = p.partition('<=') if '>=' in p: p, sep, ver = p.partition('>=') if '>' in p: p, sep, ver = p.partition('>') if '<' in p: p, sep, ver = p.partition('<') if '=' in p: p, sep, ver = p.partition('=') if p == pac.name and package.name not in req_stack and package.name != pac.name: if sep: req_stack.append(package.name + sep + ver) else: req_stack.append(package.name) # Get dependencies req_by = self._get_req_by(raw_depends) for p in req_by.split(','): p = p.strip() if '<=' in p: p, sep, ver = p.partition('<=') if '>=' in p: p, sep, ver = p.partition('>=') if '>' in p: p, sep, ver = p.partition('>') if '<' in p: p, sep, ver = p.partition('<') if '=' in p: p, sep, ver = p.partition('=') if p == pac.name and package.name not in deps_stack and package.name != pac.name: if sep: deps_stack.append(package.name + sep + ver) else: deps_stack.append(package.name) for dep_name in deps_stack: deps = deps + ", " + dep_name deps = deps[2:] for req_name in req_stack: req = req + ", " + req_name req = req[2:] return deps, req
fb6fe348a2c97c323c7dd1c1f621b876db96dc15 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2654/fb6fe348a2c97c323c7dd1c1f621b876db96dc15/pacman.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3072, 67, 11037, 12, 2890, 16, 293, 1077, 4672, 468, 5167, 316, 1191, 3538, 364, 293, 1077, 67, 529, 316, 15550, 1390, 18, 468, 971, 1392, 2353, 2298, 18, 529, 353, 10780, 2092, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3072, 67, 11037, 12, 2890, 16, 293, 1077, 4672, 468, 5167, 316, 1191, 3538, 364, 293, 1077, 67, 529, 316, 15550, 1390, 18, 468, 971, 1392, 2353, 2298, 18, 529, 353, 10780, 2092, 6...
lfit.Y = Y
def fit(self, Y, **keywords): """ Full \'fit\' of the model including estimate of covariance matrix, (whitened) residuals and scale.
af7b6951110ce17903406fde26c729dadde75f31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/af7b6951110ce17903406fde26c729dadde75f31/regression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4845, 12, 2890, 16, 1624, 16, 2826, 11771, 4672, 3536, 11692, 7164, 7216, 3730, 434, 326, 938, 6508, 11108, 434, 17366, 3148, 16, 261, 3350, 305, 275, 329, 13, 29252, 471, 3159, 18, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4845, 12, 2890, 16, 1624, 16, 2826, 11771, 4672, 3536, 11692, 7164, 7216, 3730, 434, 326, 938, 6508, 11108, 434, 17366, 3148, 16, 261, 3350, 305, 275, 329, 13, 29252, 471, 3159, 18, 2, ...
limit 1 """, (form['date'],))
limit 1 """, (date,))
def compute_refund(self, cr, uid, ids, mode, context=None): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the account invoice refund’s ID or list of IDs
8710567e1847970b7324e2f92429d386ac40c66a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8710567e1847970b7324e2f92429d386ac40c66a/account_invoice_refund.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 1734, 1074, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1965, 16, 819, 33, 7036, 4672, 3536, 632, 891, 4422, 30, 326, 783, 1027, 16, 628, 326, 2063, 3347, 16, 632, 891, 455...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 1734, 1074, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1965, 16, 819, 33, 7036, 4672, 3536, 632, 891, 4422, 30, 326, 783, 1027, 16, 628, 326, 2063, 3347, 16, 632, 891, 455...
return (bv.grid)
kpts = (bv.grid)
def get_kpts(self): 'return the kpt grid, not the kpts' nc = netCDF(self.nc,'r')
f24feaeeb4f35c2d48bb5fa47d97c4957e1bc034 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5572/f24feaeeb4f35c2d48bb5fa47d97c4957e1bc034/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 79, 1092, 12, 2890, 4672, 296, 2463, 326, 417, 337, 3068, 16, 486, 326, 417, 1092, 11, 8194, 273, 2901, 39, 4577, 12, 2890, 18, 14202, 11189, 86, 6134, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 79, 1092, 12, 2890, 4672, 296, 2463, 326, 417, 337, 3068, 16, 486, 326, 417, 1092, 11, 8194, 273, 2901, 39, 4577, 12, 2890, 18, 14202, 11189, 86, 6134, 2, -100, -100, -100, ...
wrong.append(testname)
def checking_loop(wiki): url = wiki.host while True: #Get all new history pages with pending status info('Lookig for pages') picked_pages = wiki.getMeta('CategoryHistory, overallvalue=pending') info('Found %d pages' % len(picked_pages)) if not picked_pages: info('No pages. Sleeping') time.sleep(10) continue #go thgrough all new pages for page in picked_pages: info('%s: picked %s' % (url, page)) path = tempfile.mkdtemp() os.chdir(path) info("Created tempdir %s" % path) #change the status to picked wiki.setMeta(page, {'overallvalue' : ['picked']}, True) metas = picked_pages[page] user = metas['user'].single().strip('[]') # get the attachment filename from the file meta info('Writing files') for filename in metas['file']: attachment_file = removeLink(filename) #get the source code info("Fetching sourcode from %s" % attachment_file) try: code = wiki.getAttachment(page, attachment_file) except opencollab.wiki.WikiFault, e: if 'There was an error in the wiki side (Nonexisting attachment' in e.args[0]: code = '' else: raise # get rid of the _rev<number> in filenames open(re.sub('(_rev\d+)', '', removeLink(filename)), 'w').write(code) revision = re.search('_rev(\d+)', removeLink(filename)).group(1) #if there is wrong amount of question page linksd, leave #the returned assignment as picked so that other #assignments can be checked. if len(metas['question']) != 1: error('Invalid meta data in %s! There we %d values!\n' % (page, len(metas['question']))) continue #get the question pagenmae question = metas['question'].single(None) question = question.strip('[]') #find associataed answerpages answer_pages = wiki.getMeta(question +'/options').values()[0]['answer'] info("Found %d answer pages" % len(answer_pages)) regex = re.compile('{{{\s*(.*)\s*}}}', re.DOTALL) wrong = list() right = list() outputs = list() for apage in [x.strip('[]') for x in answer_pages]: info('getting answers from %s' % apage) answer_meta = wiki.getMeta(apage).values()[0] testname = answer_meta['testname'].single() outputpage = None inputpage = None if 'output' in answer_meta: outputpage = answer_meta['output'].single().strip('[]') outfilesatt = wiki.listAttachments if 'input' in answer_meta: inputpage = answer_meta['input'].single().strip('[]') args = answer_meta['parameters'].single() input = '' if inputpage: content = wiki.getPage(inputpage) input = regex.search(content).group(1) input_meta = wiki.getMeta(inputpage) filelist = input_meta[inputpage]['file'] for attachment in filelist: filename = removeLink(attachment) content = wiki.getAttachment(inputpage, filename) info('Writing input file %s' % filename) open(os.path.join(path, filename), 'w').write(content) output = '' if outputpage: content = wiki.getPage(outputpage) output = regex.search(content).group(1) output_meta = wiki.getMeta(outputpage) # get output files output_files = dict() filelist = output_meta[outputpage]['file'] for attachment in filelist: filename = removeLink(attachment) content = wiki.getAttachment(outputpage, filename) output_files[filename] = content info('Running test') goutput, gerror, timeout, gfiles = run(args, input, path) goutput = goutput.strip('\n') output = output.strip('\n') goutput = gerror.strip('\n') + goutput if timeout: goutput = goutput + "\n***** TIMEOUT *****\nYOUR PROGRAM TIMED OUT!\n\n" + goutput if len(goutput) > 1024*100: goutput = "***** Your program produced more than 100kB of output data *****\n(Meaning that your program failed)\nPlease check your code before returning it\n" info('Excess output!') passed = True if goutput != output: info("Test %s failed" % testname) wrong.append(testname) failed = False # compare output files for filename, content in output_files.items(): if filename not in gfiles: info("A file is missing") passed = False break if content != gfiles[filename]: info("Output file does not match") passed = False break if passed: info("Test %s succeeded" % testname) right.append(testname) else: info("Test %s failed" % testname) wrong.append(testname) #put user output to wiki. outputs.append('[[%s]]' % (user + '/' + outputpage,)) try: wiki.putPage(user + '/' + outputpage, outputtemplate % (esc(goutput), testname)) for ofilename, ocontent in gfiles.items(): wiki.putAttachment(user + '/' + outputpage, ofilename, ocontent) except opencollab.wiki.WikiFault, error_message: # It's ok if the comment does not change if 'There was an error in the wiki side (You did not change the page content, not saved!)' in error_message: pass elif 'There was an error in the wiki side (Attachment not saved, file exists)' in error_message: pass else: raise # put output file metas to output page wiki.setMeta(user + '/' + outputpage, {'file' : ['[[attachment:%s]]' % x for x in gfiles.keys()]}) info('Removing ' + path) shutil.rmtree(path) metas = dict() #clear old info info('Clearing old metas') wiki.setMeta(page, {'wrong': [], 'right': []}, True) if len(wrong) == 0: metas['overallvalue'] = ['success'] else: metas['overallvalue'] = ['failure'] if outputs: metas['output'] = outputs if wrong: metas['wrong'] = wrong if right: metas['right'] = right info('Setting new metas') #add metas wiki.setMeta(page, metas, True) info('Done') time.sleep(5)
d57661ce85607fd508ce4dfcbecdd8881512f156 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/888/d57661ce85607fd508ce4dfcbecdd8881512f156/testBot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6728, 67, 6498, 12, 13044, 4672, 880, 273, 9050, 18, 2564, 225, 1323, 1053, 30, 468, 967, 777, 394, 4927, 4689, 598, 4634, 1267, 1123, 2668, 9794, 360, 364, 4689, 6134, 25534, 67, 7267, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6728, 67, 6498, 12, 13044, 4672, 880, 273, 9050, 18, 2564, 225, 1323, 1053, 30, 468, 967, 777, 394, 4927, 4689, 598, 4634, 1267, 1123, 2668, 9794, 360, 364, 4689, 6134, 25534, 67, 7267, ...
b_file = file(self.bad_url_cache_name, "w") pickle.dump(self.bad_urls, b_file) b_file.close() h_file = file(self.http_error_cache_name, "w") pickle.dump(self.http_error_urls, h_file) h_file.close()
for name, data in [(self.bad_url_cache_name, self.bad_urls), (self.http_error_cache_name, self.http_error_urls),]: cache = open(name + ".tmp", "w") pickle.dump(data, cache) cache.close() try: os.rename(name + ".tmp", name) except OSError: os.remove(name) os.rename(name + ".tmp", name)
def _save_caches(self): # XXX Note that these caches are never refreshed, which might not # XXX be a good thing long-term (if a previously invalid URL # XXX becomes valid, for example). b_file = file(self.bad_url_cache_name, "w") pickle.dump(self.bad_urls, b_file) b_file.close() h_file = file(self.http_error_cache_name, "w") pickle.dump(self.http_error_urls, h_file) h_file.close()
95895491fb21688291fd1a82789cef7321ee3128 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/95895491fb21688291fd1a82789cef7321ee3128/classifier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 17703, 281, 12, 2890, 4672, 468, 11329, 3609, 716, 4259, 12535, 854, 5903, 27880, 16, 1492, 4825, 486, 468, 11329, 506, 279, 7494, 7757, 1525, 17, 6408, 261, 430, 279, 724...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 17703, 281, 12, 2890, 4672, 468, 11329, 3609, 716, 4259, 12535, 854, 5903, 27880, 16, 1492, 4825, 486, 468, 11329, 506, 279, 7494, 7757, 1525, 17, 6408, 261, 430, 279, 724...
self.extract_entries(entries=self.html_files, destdir=tempdir, correct_file=True)
self.extract_entries(entries=self.html_files, destdir=tempdir, correct=True)
def htmldoc(self, output, format=archmod.CHM2HTML): """CHM to other file formats converter using htmldoc""" # Extract CHM content into temporary directory output = output.replace(' ', '_') tempdir = tempfile.mkdtemp(prefix=output.rsplit('.', 1)[0]) self.extract_entries(entries=self.html_files, destdir=tempdir, correct_file=True) # List of temporary files files = [ os.path.abspath(tempdir + file.lower()) for file in self.html_files ] if format == archmod.CHM2HTML: options = self.chmtohtml # change output from single html file to a directory with html file and images if self.image_files: dirname = archmod.file2dir(output) if os.path.exists(dirname): sys.exit('%s is already exists' % dirname) # Extract image files os.mkdir(dirname) # Extract all images for key, value in self.image_files.items(): self.extract_entry(entry=key, output_file=value, destdir=dirname) # Fix output file name output = os.path.join(dirname, output) elif format == archmod.CHM2PDF: options = self.chmtopdf if self.image_files: # Extract all images for key, value in self.image_files.items(): self.extract_entry(entry=key, output_file=key.lower(), destdir=tempdir) htmldoc(files, self.htmldoc_exec, options, self.toclevels, output) # Remove temporary files shutil.rmtree(path=tempdir)
3be63c17aa7dbbb09b4bbf0251add8eba8886698 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5198/3be63c17aa7dbbb09b4bbf0251add8eba8886698/CHM.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 2434, 12, 2890, 16, 876, 16, 740, 33, 991, 1711, 18, 1792, 49, 22, 4870, 4672, 3536, 1792, 49, 358, 1308, 585, 6449, 6027, 1450, 1729, 2434, 8395, 468, 8152, 6469, 49, 913, 1368,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 2434, 12, 2890, 16, 876, 16, 740, 33, 991, 1711, 18, 1792, 49, 22, 4870, 4672, 3536, 1792, 49, 358, 1308, 585, 6449, 6027, 1450, 1729, 2434, 8395, 468, 8152, 6469, 49, 913, 1368,...
+ self.makeReply(md, errfnRecv)
+ [ Whitespace.NL ] + self.makeReply(md, errfnRecv, routingId=idvar)
def genDtorRecvCase(self, md): lbl = CaseLabel(md.pqMsgId()) case = StmtBlock()
c95f27e461d64b9a59162ef066344e6890d6942d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/c95f27e461d64b9a59162ef066344e6890d6942d/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 40, 13039, 28470, 2449, 12, 2890, 16, 3481, 4672, 14284, 273, 12605, 2224, 12, 1264, 18, 84, 85, 3332, 548, 10756, 648, 273, 13751, 1768, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 40, 13039, 28470, 2449, 12, 2890, 16, 3481, 4672, 14284, 273, 12605, 2224, 12, 1264, 18, 84, 85, 3332, 548, 10756, 648, 273, 13751, 1768, 1435, 2, -100, -100, -100, -100, -100, -10...
if self.active_operation:
if self._mousedown:
def on_canvas_motion_notify_event(self, widget, ev): if self.active_operation: self.updateOperation(self.tool_active, ev.x, ev.y)
bcbfa4e1f582b47498cec1f1ef0411a1110c4a5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2289/bcbfa4e1f582b47498cec1f1ef0411a1110c4a5b/frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15424, 67, 81, 8240, 67, 12336, 67, 2575, 12, 2890, 16, 3604, 16, 2113, 4672, 309, 365, 6315, 29958, 30, 365, 18, 2725, 2988, 12, 2890, 18, 6738, 67, 3535, 16, 2113, 18, 92,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15424, 67, 81, 8240, 67, 12336, 67, 2575, 12, 2890, 16, 3604, 16, 2113, 4672, 309, 365, 6315, 29958, 30, 365, 18, 2725, 2988, 12, 2890, 18, 6738, 67, 3535, 16, 2113, 18, 92,...
name = chooser.get_filename() db_name = os.path.basename(chooser.get_filename())
def ImportDialog(widgetTree, windows_title): import shutil chooser = gtk.FileChooserDialog(title=windows_title,action=gtk.FILE_CHOOSER_ACTION_SAVE, buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK)) r = chooser.run() #name of file to export name = chooser.get_filename() db_name = os.path.basename(chooser.get_filename()) if r == gtk.RESPONSE_OK: if db_name.endswith(".dat"): shutil.copy(chooser.get_filename(), os.path.expanduser("~/.kbi/databases/"+db_name)) else: shutil.copy(chooser.get_filename(), os.path.expanduser("~/.kbi/databases/"+db_name+".dat")) chooser.destroy()
34e4a909130f34821e7a3aad4c0a5b559f079917 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2973/34e4a909130f34821e7a3aad4c0a5b559f079917/kbi_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6164, 6353, 12, 6587, 2471, 16, 9965, 67, 2649, 4672, 1930, 11060, 5011, 13164, 273, 22718, 18, 812, 17324, 6353, 12, 2649, 33, 13226, 67, 2649, 16, 1128, 33, 4521, 79, 18, 3776, 67, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6164, 6353, 12, 6587, 2471, 16, 9965, 67, 2649, 4672, 1930, 11060, 5011, 13164, 273, 22718, 18, 812, 17324, 6353, 12, 2649, 33, 13226, 67, 2649, 16, 1128, 33, 4521, 79, 18, 3776, 67, 2...
print mirror.identifier
print s
def do_list(self, subcmd, opts, *args): """${cmd_name}: list mirrors
27f529252a243b0ec036fe08466b658ad1f14315 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3890/27f529252a243b0ec036fe08466b658ad1f14315/mirrordoctor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1098, 12, 2890, 16, 720, 4172, 16, 1500, 16, 380, 1968, 4672, 3536, 18498, 4172, 67, 529, 6713, 666, 312, 27026, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1098, 12, 2890, 16, 720, 4172, 16, 1500, 16, 380, 1968, 4672, 3536, 18498, 4172, 67, 529, 6713, 666, 312, 27026, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return '%s[%s]' % (self.name(), self.typeDefinition().name())
return 'ED[%s:%s]' % (self.name(), self.typeDefinition().name())
def __str__ (self): return '%s[%s]' % (self.name(), self.typeDefinition().name())
d564904c54eda6ecda7cdea92b5f10e44422c2fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/d564904c54eda6ecda7cdea92b5f10e44422c2fc/structures.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 261, 2890, 4672, 327, 1995, 87, 14451, 87, 3864, 738, 261, 2890, 18, 529, 9334, 365, 18, 723, 1852, 7675, 529, 10756, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 261, 2890, 4672, 327, 1995, 87, 14451, 87, 3864, 738, 261, 2890, 18, 529, 9334, 365, 18, 723, 1852, 7675, 529, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
EXAMPLE:
EXAMPLES:
def branch_weyl_character(chi, R, S, rule="default"): """A Branching rule describes the restriction of representations from a Lie group or algebra G to a smaller one. See for example, R. C. King, Branching rules for classical Lie groups using tensor and spinor methods. J. Phys. A 8 (1975), 429--449 or Howe, Tan and Willenbring, Stable branching rules for classical symmetric pairs, Trans. Amer. Math. Soc. 357 (2005), no. 4, 1601--1626. INPUT: chi - a character of G R - the Weyl Character Ring of G S - the Weyl Character Ring of H rule - a set of r dominant weights in H where r is the rank of G. You may use a predefined rule by specifying rule = one of"levi", "automorphic", "symmetric", "extended", "triality" or "miscellaneous". The use of these rules will be explained next. After the examples we will explain how to write your own branching rules for cases that we have omitted. (Rules for the exceptional groups have not yet been coded.) To explain the predefined rules we survey the most important branching rules. These may be classified into several cases, and once this is understood, the detailed classification can be read off from the Dynkin diagrams. Dynkin classified the maximal subgroups of Lie groups in Mat. Sbornik N.S. 30(72):349-462 (1952). We will list these for the cases where the Dynkin diagram of S is connected. This excludes branching rules such as A3 -> A1 x A1, which are not yet implemented. LEVI TYPE. These can be read off from the Dynkin diagram. If removing a node from the Dynkin diagram produces another Dynkin diagram, there is a branching rule. Currently we require that the smaller diagram be connected. For these rules use the option rule="levi". ['A',r] -> ['A',r-1] ['B',r] -> ['A',r-1] ['B',r] -> ['B',r-1] ['C',r] -> ['A',r-1] ['C',r] -> ['C',r-1] ['D',r] -> ['A',r-1] ['D',r] -> ['D',r-1] ['E',r] -> ['A',r-1] r = 6,7,8 (not implemented yet) ['E',r] -> ['D',r-1] r = 6,7,8 (not implemented yet) ['E',r] -> ['E',r-1] r = 6,7 (not implemented yet) ['F',4] -> ['B',3] (not implemented yet) ['F',4] -> ['C',3] (not implemented yet) ['G',2] -> ['A',1] (short root) (not implemented yet) The other Levi branching rule from G2 -> A1 corresponding to the long root is available by first branching G2 -> A2 then branching to A1. AUTOMORPHIC TYPE. If the Dynkin diagram has a symmetry, then there is an automorphism that is a special case of a branching rule. There is also an exotic"triality" automorphism of D4 having order 3. Use rule="automorphic" or rule="triality" ['A',r] -> ['A',r] ['D',r] -> ['D',r] ['E',6] -> ['E',6] (not implemented yet) SYMMETRIC TYPE. Related to the automorphic type, when the Dynkin diagram has a symmetry there is a branching rule to the subalgebra (or subgroup) of invariants under the automorphism. Use rule="symmetric". ['A',2r+1] -> ['B',r] ['A',2r] -> ['C',r] ['D',r] -> ['B',r-1] ['E',6] -> ['F',4] (not implemented yet) ['D',4] -> ['G',2] (not implemented yet) EXTENDED TYPE. If removing a node from the extended Dynkin diagram results in a Dynkin diagram, then there is a branching rule. Use rule="extended" for these. ['G',2] -> ['A',2] (not implemented yet) ['B',r] -> ['D',r] ['F',4] -> ['B',4] (not implemented yet) ['E',7] -> ['A',7] (not implemented yet) ['E',8] -> ['A',8] (not implemented yet) MISCELLANEOUS: Use rule="miscellaneous" for the following rule, which does not fit into the above framework. ['B',3] -> ['G',2] (Not implemented yet.) ISOMORPHIC TYPE: Although not usually referred to as a branching rule, the effects of the accidental isomorphisms may be handled using rule="isomorphic" ['B',2] -> ['C',2] ['C',2] -> ['B',2] ['A',3] -> ['D',3] ['D',3] -> ['A',3] EXAMPLES: (Levi type) sage: A2 = WeylCharacterRing(['A',2]) sage: B2 = WeylCharacterRing(['B',2]) sage: C2 = WeylCharacterRing(['C',2]) sage: A3 = WeylCharacterRing(['A',3]) sage: B3 = WeylCharacterRing(['B',3]) sage: C3 = WeylCharacterRing(['C',3]) sage: D3 = WeylCharacterRing(['D',3]) sage: A4 = WeylCharacterRing(['A',4]) sage: D4 = WeylCharacterRing(['D',4]) sage: A5 = WeylCharacterRing(['A',5]) sage: D5 = WeylCharacterRing(['D',5]) sage: [B3(w).branch(A2,rule="levi") for w in B3.lattice().fundamental_weights()] [A2(0,0,-1) + A2(0,0,0) + A2(1,0,0), A2(0,-1,-1) + A2(0,0,-1) + A2(0,0,0) + A2(1,0,-1) + A2(1,0,0) + A2(1,1,0), A2(-1/2,-1/2,-1/2) + A2(1/2,-1/2,-1/2) + A2(1/2,1/2,-1/2) + A2(1/2,1/2,1/2)] The last example must be understood as follows. The representation of B3 being branched is spin, which is not a representation of SO(7) but of its double cover spin(7). The group A2 is really GL(3) and the double cover of SO(7) induces a cover of GL(3) that is trivial over SL(3) but not over the center of GL(3). The weight lattice for this GL(3) consists of triples (a,b,c) of half integers such that a-b and b-c are in ZZ, and this is reflected in the last decomposition. sage: [C3(w).branch(A2,rule="levi") for w in C3.lattice().fundamental_weights()] [A2(0,0,-1) + A2(1,0,0), A2(0,-1,-1) + A2(1,0,-1) + A2(1,1,0), A2(-1,-1,-1) + A2(1,-1,-1) + A2(1,1,-1) + A2(1,1,1)] sage: [D4(w).branch(A3,rule="levi") for w in D4.lattice().fundamental_weights()] [A3(0,0,0,-1) + A3(1,0,0,0), A3(0,0,-1,-1) + A3(0,0,0,0) + A3(1,0,0,-1) + A3(1,1,0,0), A3(1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,-1/2), A3(-1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,1/2)] sage: [B3(w).branch(B2,rule="levi") for w in B3.lattice().fundamental_weights()] [2*B2(0,0) + B2(1,0), B2(0,0) + 2*B2(1,0) + B2(1,1), 2*B2(1/2,1/2)] sage: C3 = WeylCharacterRing(['C',3]) sage: [C3(w).branch(C2,rule="levi") for w in C3.lattice().fundamental_weights()] [2*C2(0,0) + C2(1,0), C2(0,0) + 2*C2(1,0) + C2(1,1), C2(1,0) + 2*C2(1,1)] sage: [D5(w).branch(D4,rule="levi") for w in D5.lattice().fundamental_weights()] [2*D4(0,0,0,0) + D4(1,0,0,0), D4(0,0,0,0) + 2*D4(1,0,0,0) + D4(1,1,0,0), D4(1,0,0,0) + 2*D4(1,1,0,0) + D4(1,1,1,0), D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2), D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2)] EXAMPLES: (Automorphic type, including D4 triality) sage: [A3(chi).branch(A3,rule="automorphic") for chi in A3.lattice().fundamental_weights()] [A3(0,0,0,-1), A3(0,0,-1,-1), A3(0,-1,-1,-1)] sage: [D4(chi).branch(D4,rule="automorphic") for chi in D4.lattice().fundamental_weights()] [D4(1,0,0,0), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1/2,1/2,1/2,-1/2)] sage: [D4(chi).branch(D4,rule="triality") for chi in D4.lattice().fundamental_weights()] [D4(1/2,1/2,1/2,-1/2), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1,0,0,0)] EXAMPLES: (Symmetric type) sage: [w.branch(B2,rule="symmetric") for w in [A4(1,0,0,0,0),A4(1,1,0,0,0),A4(1,1,1,0,0),A4(2,0,0,0,0)]] [B2(1,0), B2(1,1), B2(1,1), B2(0,0) + B2(2,0)] sage: [A5(w).branch(C3,rule="symmetric") for w in A5.lattice().fundamental_weights()] [C3(1,0,0), C3(0,0,0) + C3(1,1,0), C3(1,0,0) + C3(1,1,1), C3(0,0,0) + C3(1,1,0), C3(1,0,0)] sage: [A5(w).branch(D3,rule="symmetric") for w in A5.lattice().fundamental_weights()] [D3(1,0,0), D3(1,1,0), D3(1,1,-1) + D3(1,1,1), D3(1,1,0), D3(1,0,0)] sage: [D4(x).branch(B3,rule="symmetric") for x in D4.lattice().fundamental_weights()] [B3(0,0,0) + B3(1,0,0), B3(1,0,0) + B3(1,1,0), B3(1/2,1/2,1/2), B3(1/2,1/2,1/2)] EXAMPLES: (Extended type) sage: [B3(x).branch(D3,rule="extended") for x in B3.lattice().fundamental_weights()] [D3(0,0,0) + D3(1,0,0), D3(1,0,0) + D3(1,1,0), D3(1/2,1/2,-1/2) + D3(1/2,1/2,1/2)] EXAMPLES: (Isomorphic type) sage: [B2(x).branch(C2, rule="isomorphic") for x in B2.lattice().fundamental_weights()] [C2(1,1), C2(1,0)] sage: [C2(x).branch(B2, rule="isomorphic") for x in C2.lattice().fundamental_weights()] [B2(1/2,1/2), B2(1,0)] sage: [A3(x).branch(D3,rule="isomorphic") for x in A3.lattice().fundamental_weights()] [D3(1/2,1/2,1/2), D3(1,0,0), D3(1/2,1/2,-1/2)] sage: [D3(x).branch(A3,rule="isomorphic") for x in D3.lattice().fundamental_weights()] [A3(1/2,1/2,-1/2,-1/2), A3(1/4,1/4,1/4,-3/4), A3(3/4,-1/4,-1/4,-1/4)] Here A3(x,y,z,w) can be understood as a representation of SL(4). The weights x,y,z,w and x+t,y+t,z+t,w+t represent the same representation of SL(4) - though not of GL(4) -- since A3(x+t,y+t,z+t,w+t) is the same as A3(x,y,z,w) tensored with det^t. So as a representation of SL(4), A3(1/4,1/4,1/4,-3/4) is the same as A3(1,1,1,0). The exterior square representation SL(4) --> GL(6) admits an invariant symmetric bilinear form, so is a representation SL(4) --> SO(6) that lifts to an isomorphism SL(4) --> Spin(6). Conversely, there are two isomorphisms SO(6) --> SL(4), of which we've selected one. You may also write your own rules. We may arrange a Cartan subalgebra U of H to be contained in a Cartan subalgebra T of G. This embedding must be chosen in a particular way - the restriction of the positive Weyl chamber in G.lattice() must be contained in the positive Weyl chamber in H.lattice(). The RULE is the adjoint of this embedding U --> T, which is a mapping from the dual space of T, which is the weight space of G, to the weight space of H. EXAMPLE: sage: A3 = WeylCharacterRing(['A',3]) sage: C2 = WeylCharacterRing(['C',2]) sage: rule = lambda x : [x[0]-x[3],x[1]-x[2]] sage: branch_weyl_character(A3([1,1,0,0]),A3,C2,rule) C2(0,0) + C2(1,1) sage: A3(1,1,0,0).branch(C2, rule) == C2(0,0) + C2(1,1) True """ r = R.cartan_type[1] s = S.cartan_type[1] if rule == "levi": if not s == r-1: raise ValueError, "Rank is wrong" if R.cartan_type[0] == 'A': if S.cartan_type[0] == 'A': rule = lambda x : list(x)[:r] else: raise ValueError, "Rule not found" elif R.cartan_type[0] in ['B', 'C', 'D']: if S.cartan_type[0] == 'A': rule = lambda x : x elif S.cartan_type[0] == R.cartan_type[0]: rule = lambda x : list(x)[1:] else: raise ValueError, "Rule not found" elif S.cartan_type[0] == 'E' and R.cartan_type[0] in ['A','D','E']: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" elif S.cartan_type[0] == 'F' and R.cartan_type[0] in ['B','C']: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" elif S.cartan_type[0] == 'G' and R.cartan_type[0] == 'A': raise NotImplementedError, "Exceptional branching rules are yet to be implemented" else: raise ValueError, "Rule not found" elif rule == "automorphic": if not R.cartan_type == S.cartan_type: raise ValueError, "Cartan types must agree for automorphic branching rule" elif R.cartan_type[0] == 'E' and R.cartan_type[1] == 6: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" elif R.cartan_type[0] == 'A': def rule(x) : y = [-i for i in x]; y.reverse(); return y elif R.cartan_type[0] == 'D': def rule(x) : y = R.VS(x); y[len(y)-1] = -y[len(y)-1]; return y elif R.cartan_type[0] == 'E' and R.cartan_type[1] == 6: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" else: raise ValueError, "No automorphism found" elif rule == "triality": if not R.cartan_type == S.cartan_type: raise ValueError, "Triality is an automorphic type (for D4 only)" elif not R.cartan_type[0] == 'D' and r == 4: raise ValueError, "Triality is for D4 only" else: def rule(x): [x1,x2,x3,x4] = x return [(x1+x2+x3+x4)/2,(x1+x2-x3-x4)/2,(x1-x2+x3-x4)/2,(-x1+x2+x3-x4)/2] elif rule == "symmetric": if R.cartan_type[0] == 'A': if (S.cartan_type[0] == 'C' or S.cartan_type[0] == 'D' and r == 2*s-1) or (S.cartan_type[0] == 'B' and r == 2*s): def rule(x): return [x[i]-x[r-i] for i in range(s)] else: print S.cartan_type, r, s raise ValueError, "Rule not found" elif R.cartan_type[0] == 'D' and S.cartan_type[0] == 'B' and s == r-1: rule = lambda x : x[:s] elif R.cartan_type[0] == 'E' and S.cartan_type[0] == '6': raise NotImplementedError, "Exceptional branching rules are yet to be implemented" else: raise ValueError, "Rule not found" elif rule == "extended": if R.cartan_type[0] == 'B' and S.cartan_type[0] == 'D' and s == r: rule = lambda x : x elif R.cartan_type[0] == 'G' and S.cartan_type[0] == 'A' and s == r: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" elif R.cartan_type[0] == 'F' and S.cartan_type[0] == 'B' and s == r: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" elif R.cartan_type[0] == 'E' and S.cartan_type[0] == 'E' and s == r and r >= 7: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" else: raise ValueError, "Rule not found" elif rule == "isomorphic": if R.cartan_type[0] == 'B' and S.cartan_type[0] == 'C' and s == 2 and r == 2: def rule(x): [x1, x2] = x return [x1+x2, x1-x2] elif R.cartan_type[0] == 'C' and S.cartan_type[0] == 'B' and s == 2 and r == 2: def rule(x): [x1, x2] = x return [(x1+x2)/2, (x1-x2)/2] elif R.cartan_type[0] == 'A' and S.cartan_type[0] == 'D' and s == 3 and r == 3: def rule(x): [x1, x2, x3, x4] = x return [(x1+x2-x3-x4)/2, (x1-x2+x3-x4)/2, (x1-x2-x3+x4)/2] elif R.cartan_type[0] == 'D' and S.cartan_type[0] == 'A' and s == 3 and r == 3: def rule(x): [t1, t2, t3] = x return [(t1+t2+t3)/2, (t1-t2-t3)/2, (-t1+t2-t3)/2, (-t1-t2+t3)/2] else: raise ValueError, "Rule not found" mdict = {} for k in chi._mdict: h = tuple(S.VS(rule(k))) if h in mdict: mdict[h] += chi._mdict[k] else: mdict[h] = chi._mdict[k] hdict = S.char_from_weights(mdict) return WeylCharacter(S, hdict, mdict)
da4d6149538661041003f964c0d06f212d52f0f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/da4d6149538661041003f964c0d06f212d52f0f5/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3803, 67, 91, 402, 80, 67, 11560, 12, 24010, 16, 534, 16, 348, 16, 1720, 1546, 1886, 6, 4672, 3536, 37, 15449, 310, 1720, 19605, 326, 9318, 434, 27851, 628, 279, 511, 1385, 1041, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3803, 67, 91, 402, 80, 67, 11560, 12, 24010, 16, 534, 16, 348, 16, 1720, 1546, 1886, 6, 4672, 3536, 37, 15449, 310, 1720, 19605, 326, 9318, 434, 27851, 628, 279, 511, 1385, 1041, 578, ...
value_length = struct.unpack("!I", data[pos:pos+4]) & 0x7fffffff
value_length = struct.unpack("!I", data[pos:pos+4])[0] & 0x7fffffff
def __init__(self, data=""): self.values = [] pos = 0 while pos < len(data): if ord(data[pos]) & 128: name_length = struct.unpack("!I", data[pos:pos+4]) & 0x7fffffff pos += 4 else: name_length = ord(data[pos]) pos += 1 if ord(data[pos]) & 128: value_length = struct.unpack("!I", data[pos:pos+4]) & 0x7fffffff pos += 4 else: value_length = ord(data[pos]) pos += 1 if pos + name_length + value_length > len(data): raise ValueError, "Unexpected end-of-data in NameValueRecord" self.values.append((data[pos:pos+name_length], data[pos+name_length:pos+name_length+value_length])) pos += name_length + value_length
bc96479fe82ed082f5c9d2616befa70f055dbb98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/506/bc96479fe82ed082f5c9d2616befa70f055dbb98/fcgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 1546, 6, 4672, 365, 18, 2372, 273, 5378, 949, 273, 374, 1323, 949, 411, 562, 12, 892, 4672, 309, 4642, 12, 892, 63, 917, 5717, 473, 8038, 30, 508,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 1546, 6, 4672, 365, 18, 2372, 273, 5378, 949, 273, 374, 1323, 949, 411, 562, 12, 892, 4672, 309, 4642, 12, 892, 63, 917, 5717, 473, 8038, 30, 508,...
def __init__(self, wiki, data, write=False):
def __init__(self, wiki, data, write=False, multipart=False):
def __init__(self, wiki, data, write=False): """ wiki - A Wiki object data - API parameters in the form of a dict write - set to True if doing a write query, so it won't try again on error maxlag is set by default to 5 but can be changed format is always set to json """ self.sleep = 5 self.data = data.copy() self.data['format'] = "json" self.iswrite = write if not 'maxlag' in self.data and not wiki.maxlag < 0: self.data['maxlag'] = wiki.maxlag self.encodeddata = urlencode(self.data, 1) self.headers = { "Content-type": "application/x-www-form-urlencoded", "User-agent": wiki.useragent, "Content-length": len(self.encodeddata) } if gzip: self.headers['Accept-Encoding'] = 'gzip' self.wiki = wiki self.response = False self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(wiki.cookies)) self.request = urllib2.Request(wiki.apibase, self.encodeddata, self.headers)
17fc397db9db6702301626ec8cd08dee4eeb473c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10544/17fc397db9db6702301626ec8cd08dee4eeb473c/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9050, 16, 501, 16, 1045, 33, 8381, 16, 10263, 33, 8381, 4672, 3536, 9050, 300, 432, 28268, 733, 501, 300, 1491, 1472, 316, 326, 646, 434, 279, 2065, 1045...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9050, 16, 501, 16, 1045, 33, 8381, 16, 10263, 33, 8381, 4672, 3536, 9050, 300, 432, 28268, 733, 501, 300, 1491, 1472, 316, 326, 646, 434, 279, 2065, 1045...
cursor = self.connection.cursor() cursor.execute("SELECT * FROM %s" % self.dbtablename) for values in cursor:
for values in self.connection.cursor().execute("SELECT * FROM %s" % self.dbtablename):
def __iter__(self): cursor = self.connection.cursor() cursor.execute("SELECT * FROM %s" % self.dbtablename) for values in cursor: yield self._row_from_cols(values)
473e8f82c49994472dd50f3d32660d64e8c24980 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/473e8f82c49994472dd50f3d32660d64e8c24980/dbtables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 364, 924, 316, 365, 18, 4071, 18, 9216, 7675, 8837, 2932, 4803, 380, 4571, 738, 87, 6, 738, 365, 18, 1966, 7032, 14724, 4672, 2824, 365, 6315, 492, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 364, 924, 316, 365, 18, 4071, 18, 9216, 7675, 8837, 2932, 4803, 380, 4571, 738, 87, 6, 738, 365, 18, 1966, 7032, 14724, 4672, 2824, 365, 6315, 492, 67,...
for node in doc.childNodes: if node.nodeType == xml.dom.core.ELEMENT \ and node.tagName == "section": create_module_info(doc, node)
for node in find_all_elements(doc, "section"): create_module_info(doc, node)
def cleanup_synopses(doc): for node in doc.childNodes: if node.nodeType == xml.dom.core.ELEMENT \ and node.tagName == "section": create_module_info(doc, node)
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6686, 67, 11982, 556, 2420, 12, 2434, 4672, 364, 756, 316, 1104, 67, 454, 67, 6274, 12, 2434, 16, 315, 3464, 6, 4672, 752, 67, 2978, 67, 1376, 12, 2434, 16, 756, 13, 282, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6686, 67, 11982, 556, 2420, 12, 2434, 4672, 364, 756, 316, 1104, 67, 454, 67, 6274, 12, 2434, 16, 315, 3464, 6, 4672, 752, 67, 2978, 67, 1376, 12, 2434, 16, 756, 13, 282, 2, -100, ...
rc = Matrix(F,r,c, ([a**(i-1)] * c) + [F(0)]*((r-1)*c) ) ki = Matrix(F,r,c)
rc = Matrix(F, r, c, ([a**(i-1)] * c) + [F(0)]*((r-1)*c) ) ki = Matrix(F, r, c)
def key_schedule(self, kj, i): """ Return $k_i$ for a given $i$ and $k_j$ with $j = i-1$. TESTS: sage: sr = mq.SR(10,4,4,8, star=True, allow_zero_inversions=True) sage: ki = sr.state_array() sage: for i in range(10): ... ki = sr.key_schedule(ki,i+1) sage: print sr.hex_str_matrix(ki) B4 3E 23 6F EF 92 E9 8F 5B E2 51 18 CB 11 CF 8E """ if i < 0: raise TypeError, "i must be >= i"
62424369e932ac59629cb4d40b7e47ae2a712293 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62424369e932ac59629cb4d40b7e47ae2a712293/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 10676, 12, 2890, 16, 417, 78, 16, 277, 4672, 3536, 2000, 271, 79, 67, 77, 8, 364, 279, 864, 271, 77, 8, 471, 271, 79, 67, 78, 8, 598, 271, 78, 273, 277, 17, 21, 8, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 10676, 12, 2890, 16, 417, 78, 16, 277, 4672, 3536, 2000, 271, 79, 67, 77, 8, 364, 279, 864, 271, 77, 8, 471, 271, 79, 67, 78, 8, 598, 271, 78, 273, 277, 17, 21, 8, 18,...
if not rpc.call_bridges_exist(instance.primary_node, brlist):
if not rpc.call_bridges_exist(target_node, brlist):
def CheckPrereq(self): """Check prerequisites.
50ff9a7acf800a15c2ee7704d4f562ad6148bbc1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7542/50ff9a7acf800a15c2ee7704d4f562ad6148bbc1/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 2050, 822, 85, 12, 2890, 4672, 3536, 1564, 30328, 16608, 2997, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 2050, 822, 85, 12, 2890, 4672, 3536, 1564, 30328, 16608, 2997, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def __init__(self, parent = None, desc = None, name = None, modal = 0, fl = 0, env = None, is_dialog = True):
def __init__(self, parent = None, desc = None, name = None, modal = 0, fl = 0, env = None, type = "QDialog"):
def __init__(self, parent = None, desc = None, name = None, modal = 0, fl = 0, env = None, is_dialog = True): if env is None: import env # this is a little weird... probably it'll be ok, and logically it seems correct. self.desc = desc
c73ef807a157ef1b98d95dae6f4d28dad060cbcc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/c73ef807a157ef1b98d95dae6f4d28dad060cbcc/ParameterDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 273, 599, 16, 3044, 273, 599, 16, 508, 273, 599, 16, 13010, 273, 374, 16, 1183, 273, 374, 16, 1550, 273, 599, 16, 618, 273, 315, 53, 6353, 6, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 273, 599, 16, 3044, 273, 599, 16, 508, 273, 599, 16, 13010, 273, 374, 16, 1183, 273, 374, 16, 1550, 273, 599, 16, 618, 273, 315, 53, 6353, 6, 46...
The performance issue from
The performance issue from
... def variance(self, bias = False):
d868e3d99c0565bfa6cb057a2325bd9a9e7b1625 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/d868e3d99c0565bfa6cb057a2325bd9a9e7b1625/basic_stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 12380, 12, 2890, 16, 12005, 273, 1083, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 12380, 12, 2890, 16, 12005, 273, 1083, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def GetNumInvalidValues(self):
def GetNumInvalidValues(self, func):
def GetNumInvalidValues(self): """Overridden from Argument.""" return 2
e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2578, 1941, 1972, 12, 2890, 16, 1326, 4672, 3536, 22042, 2794, 628, 5067, 12123, 327, 576, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2578, 1941, 1972, 12, 2890, 16, 1326, 4672, 3536, 22042, 2794, 628, 5067, 12123, 327, 576, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
sendchannel("Stimme für %s gezählt. Noch %d Stimmen nötig für OP." % (target, difference))
sendchannel("Stimme für %s gezählt. Noch %d \ Stimmen nötig für OP." % (target, difference))
def checkTimeOut(votes): if votes[0][1] + TIMEOUT > time(): return votes # no votes have timed out elif len(votes) > 1: return checkTimeOut(votes[1:]) # oldest vote has timed out, continue checking else: return [] # no valid vote left
17c61548967182a27edf171b75277fa10ff63052 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14907/17c61548967182a27edf171b75277fa10ff63052/scherbengericht.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 950, 1182, 12, 27800, 4672, 309, 19588, 63, 20, 6362, 21, 65, 397, 24374, 405, 813, 13332, 327, 19588, 10792, 468, 1158, 19588, 1240, 7491, 596, 1327, 562, 12, 27800, 13, 405, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 950, 1182, 12, 27800, 4672, 309, 19588, 63, 20, 6362, 21, 65, 397, 24374, 405, 813, 13332, 327, 19588, 10792, 468, 1158, 19588, 1240, 7491, 596, 1327, 562, 12, 27800, 13, 405, 404, ...
pepcons.append(len(hist) == 1 and "X" not in hist)
pepcons.append(len(hist) == 1) pep.append(hist.values()[0])
def findFourFold(aln): """Returns index of all columns in alignment that are completely fourfold degenerate Assumes that columns are already filtered for aligned codons """ # create peptide alignment pepAln = mapalign(aln, valfunc=translate) # find peptide conservation pepcons = [] for i in xrange(pepAln.alignlen()): # get a column from the peptide alignment col = [seq[i] for seq in pepAln.itervalues()] # compute the histogram of the column. # ignore gaps '-' and non-translated 'X' hist = util.histDict(col) if "-" in hist: del hist["-"] if "X" in hist: del hist["X"] # column is conserved if only one AA appears pepcons.append(len(hist) == 1 and "X" not in hist) ind = [] # get peptides of 1st sequence pep = pepAln.values()[0] for i in range(0, len(aln.values()[0]), 3): # process only those columns that are conserved at the peptide level if pepcons[i//3]: degen = AA_DEGEN[pep[i//3]] for j in range(3): if degen[j] == 4: ind.append(i+j) return ind
4e78a3e6dda4524245bc076287f770f0548defe5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8482/4e78a3e6dda4524245bc076287f770f0548defe5/alignlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 42, 477, 15592, 12, 30907, 4672, 3536, 1356, 770, 434, 777, 2168, 316, 8710, 716, 854, 14416, 12792, 16007, 443, 7163, 225, 25374, 716, 2168, 854, 1818, 5105, 364, 13939, 11012, 7008...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 42, 477, 15592, 12, 30907, 4672, 3536, 1356, 770, 434, 777, 2168, 316, 8710, 716, 854, 14416, 12792, 16007, 443, 7163, 225, 25374, 716, 2168, 854, 1818, 5105, 364, 13939, 11012, 7008...
throwstext = " throws "+string.join(self.throws, ", ")
throwstext = " throws " + COMMASPACE.join(self.throws)
def writeSource(self, out): argtext = [] for type, name in self.args[1:]: argtext.append(type+" "+name) if len(self.throws) == 0: throwstext = "" else: throwstext = " throws "+string.join(self.throws, ", ")
c7f30bbce741c6611f67361a2c2901b109a31842 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/c7f30bbce741c6611f67361a2c2901b109a31842/Statement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 1830, 12, 2890, 16, 596, 4672, 1501, 955, 273, 5378, 364, 618, 16, 508, 316, 365, 18, 1968, 63, 21, 30, 14542, 1501, 955, 18, 6923, 12, 723, 9078, 13773, 529, 13, 309, 562, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 1830, 12, 2890, 16, 596, 4672, 1501, 955, 273, 5378, 364, 618, 16, 508, 316, 365, 18, 1968, 63, 21, 30, 14542, 1501, 955, 18, 6923, 12, 723, 9078, 13773, 529, 13, 309, 562, 12,...
dm.setdefault(extra.lower(),[]).extend(parse_requirements(reqs))
if extra: extra = extra.lower() dm.setdefault(extra,[]).extend(parse_requirements(reqs))
def _dep_map(self): try: return self.__dep_map except AttributeError: dm = self.__dep_map = {None: []} for name in 'requires.txt', 'depends.txt': for extra,reqs in split_sections(self._get_metadata(name)): dm.setdefault(extra.lower(),[]).extend(parse_requirements(reqs)) return dm
ed9dc512453e631d6b2893b5cd86072811c2efd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8186/ed9dc512453e631d6b2893b5cd86072811c2efd7/pkg_resources.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15037, 67, 1458, 12, 2890, 4672, 775, 30, 327, 365, 16186, 15037, 67, 1458, 1335, 6394, 30, 9113, 273, 365, 16186, 15037, 67, 1458, 273, 288, 7036, 30, 5378, 97, 364, 508, 316, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15037, 67, 1458, 12, 2890, 4672, 775, 30, 327, 365, 16186, 15037, 67, 1458, 1335, 6394, 30, 9113, 273, 365, 16186, 15037, 67, 1458, 273, 288, 7036, 30, 5378, 97, 364, 508, 316, 29...
sql = "SELECT DISTINCTROW value FROM versions" sql += " WHERE" + makeWhereClause('program', PRODUCTS)
sql = "SELECT DISTINCTROW value FROM versions" sql += " WHERE" + makeWhereClause('program', PRODUCTS)
def convert(_db, _host, _user, _password, _env, _force): activityFields = FieldTranslator() # account for older versions of bugzilla print "Using Bugzilla v%s schema." % BZ_VERSION if BZ_VERSION == 2110: activityFields['removed'] = "oldvalue" activityFields['added'] = "newvalue" # init Bugzilla environment print "Bugzilla MySQL('%s':'%s':'%s':'%s'): connecting..." % \ (_db, _host, _user, ("*" * len(_password))) mysql_con = MySQLdb.connect(host=_host, user=_user, passwd=_password, db=_db, compress=1, cursorclass=MySQLdb.cursors.DictCursor) mysql_cur = mysql_con.cursor() # init Trac environment print "Trac SQLite('%s'): connecting..." % (_env) trac = TracDatabase(_env) # force mode... if _force == 1: print "\nCleaning all tickets..." c = trac.db().cursor() c.execute("DELETE FROM ticket_change") trac.db().commit() c.execute("DELETE FROM ticket") trac.db().commit() c.execute("DELETE FROM attachment") attachments_dir = os.path.join(os.path.normpath(trac.env.path), "attachments") # Straight from the Python documentation. for root, dirs, files in os.walk(attachments_dir, topdown=False): for name in files: os.remove(os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name)) if not os.stat(attachments_dir): os.mkdir(attachments_dir) trac.db().commit() print "All tickets cleaned..." print "\n0. Filtering products..." mysql_cur.execute("SELECT name FROM products") products = [] for line in mysql_cur.fetchall(): product = line['name'] if PRODUCTS and product not in PRODUCTS: continue if product in IGNORE_PRODUCTS: continue products.append(product) PRODUCTS[:] = products print " Using products", " ".join(PRODUCTS) print "\n1. Import severities..." trac.setSeverityList(SEVERITIES) print "\n2. Import components..." if not COMPONENTS_FROM_PRODUCTS: if BZ_VERSION >= 2180: sql = """SELECT DISTINCT c.name AS name, c.initialowner AS owner FROM components AS c, products AS p WHERE c.product_id = p.id AND""" sql += makeWhereClause('p.name', PRODUCTS) else: sql = "SELECT value AS name, initialowner AS owner FROM components" sql += " WHERE" + makeWhereClause('program', PRODUCTS) mysql_cur.execute(sql) components = mysql_cur.fetchall() for component in components: component['owner'] = trac.getLoginName(mysql_cur, component['owner']) trac.setComponentList(components, 'name') else: sql = """SELECT program AS product, value AS comp, initialowner AS owner FROM components""" sql += " WHERE" + makeWhereClause('program', PRODUCTS) mysql_cur.execute(sql) lines = mysql_cur.fetchall() all_components = {} # product -> components all_owners = {} # product, component -> owner for line in lines: product = line['product'] comp = line['comp'] owner = line['owner'] all_components.setdefault(product, []).append(comp) all_owners[(product, comp)] = owner component_list = [] for product, components in all_components.items(): # find best default owner default = None for comp in DEFAULT_COMPONENTS: if comp in components: default = comp break if default is None: default = components[0] owner = all_owners[(product, default)] owner_name = trac.getLoginName(mysql_cur, owner) component_list.append({'product': product, 'owner': owner_name}) trac.setComponentList(component_list, 'product') print "\n3. Import priorities..." trac.setPriorityList(PRIORITIES) print "\n4. Import versions..." if BZ_VERSION >= 2180: sql = """SELECT DISTINCTROW versions.value AS value FROM products, versions""" sql += " WHERE" + makeWhereClause('products.name', PRODUCTS) else: sql = "SELECT DISTINCTROW value FROM versions" sql += " WHERE" + makeWhereClause('program', PRODUCTS) mysql_cur.execute(sql) versions = mysql_cur.fetchall() trac.setVersionList(versions, 'value') print "\n5. Import milestones..." sql = "SELECT DISTINCT value FROM milestones" sql += " WHERE" + makeWhereClause('value', IGNORE_MILESTONES, negative=True) mysql_cur.execute(sql) milestones = mysql_cur.fetchall() trac.setMilestoneList(milestones, 'value') print "\n6. Retrieving bugs..." sql = """SELECT DISTINCT b.*, c.name AS component, p.name AS product FROM bugs AS b, components AS c, products AS p """ sql += " WHERE (" + makeWhereClause('p.name', PRODUCTS) sql += ") AND b.product_id = p.id" sql += " AND b.component_id = c.id" sql += " ORDER BY b.bug_id" mysql_cur.execute(sql) bugs = mysql_cur.fetchall() print "\n7. Import bugs and bug activity..." for bug in bugs: bugid = bug['bug_id'] ticket = {} keywords = [] ticket['id'] = bugid ticket['time'] = bug['creation_ts'] ticket['changetime'] = bug['delta_ts'] if COMPONENTS_FROM_PRODUCTS: ticket['component'] = bug['product'] else: ticket['component'] = bug['component'] ticket['severity'] = bug['bug_severity'] ticket['priority'] = bug['priority'].lower() ticket['owner'] = trac.getLoginName(mysql_cur, bug['assigned_to']) ticket['reporter'] = trac.getLoginName(mysql_cur, bug['reporter']) mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s", bugid) cc_records = mysql_cur.fetchall() cc_list = [] for cc in cc_records: cc_list.append(trac.getLoginName(mysql_cur, cc['who'])) cc_list = [cc for cc in cc_list if '@' in cc and cc not in IGNORE_CC] ticket['cc'] = string.join(cc_list, ', ') ticket['version'] = bug['version'] target_milestone = bug['target_milestone'] if target_milestone in IGNORE_MILESTONES: target_milestone = '' ticket['milestone'] = target_milestone bug_status = bug['bug_status'].lower() ticket['status'] = statusXlator[bug_status] ticket['resolution'] = bug['resolution'].lower() # a bit of extra work to do open tickets if bug_status == 'open': if owner != '': ticket['status'] = 'assigned' else: ticket['status'] = 'new' ticket['summary'] = bug['short_desc'] mysql_cur.execute("SELECT * FROM longdescs WHERE bug_id = %s" % bugid) longdescs = list(mysql_cur.fetchall()) # check for empty 'longdescs[0]' field... if len(longdescs) == 0: ticket['description'] = '' else: ticket['description'] = longdescs[0]['thetext'] del longdescs[0] for desc in longdescs: ignore = False for comment in IGNORE_COMMENTS: if re.match(comment, desc['thetext']): ignore = True if ignore: continue trac.addTicketComment(ticket=bugid, time = desc['bug_when'], author=trac.getLoginName(mysql_cur, desc['who']), value = desc['thetext']) mysql_cur.execute("""SELECT * FROM bugs_activity WHERE bug_id = %s ORDER BY bug_when""" % bugid) bugs_activity = mysql_cur.fetchall() resolution = '' ticketChanges = [] keywords = [] for activity in bugs_activity: field_name = trac.getFieldName(mysql_cur, activity['fieldid']).lower() removed = activity[activityFields['removed']] added = activity[activityFields['added']] # statuses and resolutions are in lowercase in trac if field_name == "resolution" or field_name == "bug_status": removed = removed.lower() added = added.lower() # remember most recent resolution, we need this later if field_name == "resolution": resolution = added.lower() add_keywords = [] remove_keywords = [] # convert bugzilla field names... if field_name == "bug_severity": field_name = "severity" elif field_name == "assigned_to": field_name = "owner" elif field_name == "bug_status": field_name = "status" if removed in STATUS_KEYWORDS: remove_keywords.append(STATUS_KEYWORDS[removed]) if added in STATUS_KEYWORDS: add_keywords.append(STATUS_KEYWORDS[added]) added = statusXlator[added] removed = statusXlator[removed] elif field_name == "short_desc": field_name = "summary" elif field_name == "product" and COMPONENTS_FROM_PRODUCTS: field_name = "component" elif ((field_name == "product" and not COMPONENTS_FROM_PRODUCTS) or (field_name == "component" and COMPONENTS_FROM_PRODUCTS)): if MAP_ALL_KEYWORDS or removed in KEYWORDS_MAPPING: kw = KEYWORDS_MAPPING.get(removed, removed) if kw: remove_keywords.append(kw) if MAP_ALL_KEYWORDS or added in KEYWORDS_MAPPING: kw = KEYWORDS_MAPPING.get(added, added) if kw: add_keywords.append(kw) if field_name == "component": # just keep the keyword change added = removed = "" elif field_name == "target_milestone": field_name = "milestone" if added in IGNORE_MILESTONES: added = "" if removed in IGNORE_MILESTONES: removed = "" ticketChange = {} ticketChange['ticket'] = bugid ticketChange['time'] = activity['bug_when'] ticketChange['author'] = trac.getLoginName(mysql_cur, activity['who']) ticketChange['field'] = field_name ticketChange['oldvalue'] = removed ticketChange['newvalue'] = added if add_keywords or remove_keywords: # ensure removed ones are in old old_keywords = keywords + [kw for kw in remove_keywords if kw not in keywords] # remove from new keywords = [kw for kw in keywords if kw not in remove_keywords] # add to new keywords += [kw for kw in add_keywords if kw not in keywords] if old_keywords != keywords: ticketChangeKw = ticketChange.copy() ticketChangeKw['field'] = "keywords" ticketChangeKw['oldvalue'] = ' '.join(old_keywords) ticketChangeKw['newvalue'] = ' '.join(keywords) ticketChanges.append(ticketChangeKw) if field_name in IGNORED_ACTIVITY_FIELDS: continue # Skip changes that have no effect (think translation!). if added == removed: continue # Bugzilla splits large summary changes into two records. for oldChange in ticketChanges: if (field_name == "summary" and oldChange['field'] == ticketChange['field'] and oldChange['time'] == ticketChange['time'] and oldChange['author'] == ticketChange['author']): oldChange['oldvalue'] += " " + ticketChange['oldvalue'] oldChange['newvalue'] += " " + ticketChange['newvalue'] break # cc sometime appear in different activities with same time if (field_name == "cc" \ and oldChange['time'] == ticketChange['time']): oldChange['newvalue'] += ", " + ticketChange['newvalue'] break else: ticketChanges.append (ticketChange) for ticketChange in ticketChanges: trac.addTicketChange (**ticketChange) # For some reason, bugzilla v2.11 seems to clear the resolution # when you mark a bug as closed. Let's remember it and restore # it if the ticket is closed but there's no resolution. if not ticket['resolution'] and ticket['status'] == "closed": ticket['resolution'] = resolution bug_status = bug['bug_status'] if bug_status in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[bug_status] if kw not in keywords: keywords.append(kw) product = bug['product'] if product in KEYWORDS_MAPPING and not COMPONENTS_FROM_PRODUCTS: kw = KEYWORDS_MAPPING.get(product, product) if kw and kw not in keywords: keywords.append(kw) component = bug['component'] if (COMPONENTS_FROM_PRODUCTS and \ (MAP_ALL_KEYWORDS or component in KEYWORDS_MAPPING)): kw = KEYWORDS_MAPPING.get(component, component) if kw and kw not in keywords: keywords.append(kw) ticket['keywords'] = string.join(keywords) ticketid = trac.addTicket(**ticket) mysql_cur.execute("SELECT * FROM attachments WHERE bug_id = %s" % bugid) attachments = mysql_cur.fetchall() for a in attachments: author = trac.getLoginName(mysql_cur, a['submitter_id']) trac.addAttachment(author, a) print "\n8. Importing users and passwords..." if BZ_VERSION >= 2180: mysql_cur.execute("SELECT login_name, cryptpassword FROM profiles") users = mysql_cur.fetchall() htpasswd = file("htpasswd", 'w') for user in users: if LOGIN_MAP.has_key(user['login_name']): login = LOGIN_MAP[user['login_name']] else: login = user['login_name'] htpasswd.write(login + ":" + user['cryptpassword'] + "\n") htpasswd.close() print " Bugzilla users converted to htpasswd format, see 'htpasswd'." print "\nAll tickets converted."
c27a48bc7d3e33e259dbb1bfcf7789acafcc80b3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/c27a48bc7d3e33e259dbb1bfcf7789acafcc80b3/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 24899, 1966, 16, 389, 2564, 16, 389, 1355, 16, 389, 3664, 16, 389, 3074, 16, 389, 5734, 4672, 5728, 2314, 273, 2286, 12233, 1435, 225, 468, 2236, 364, 12156, 5244, 434, 7934, 15990...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 24899, 1966, 16, 389, 2564, 16, 389, 1355, 16, 389, 3664, 16, 389, 3074, 16, 389, 5734, 4672, 5728, 2314, 273, 2286, 12233, 1435, 225, 468, 2236, 364, 12156, 5244, 434, 7934, 15990...
if self.passes!=1: self.stream=DV_TMP_PATH+self.tmpfilename self.tmpfilename=self.gettmpfilename(DV_TMP_PATH,self.filenamenoext,ext)
if self.stream=='-': if self.passes==1: self.tmppassfile=DV_TMP_PATH+self.gettmpfilename(DV_TMP_PATH,self.filenamenoext,ext) else: self.stream=self.tmppassfile if self.passes!=1: self.tmpfilename=self.gettmpfilename(DV_TMP_PATH,self.filenamenoext,ext)
def run(self): self.abort=False if not self.abort: self.uri=self.uris[0] self.parent.gauge1.SetValue(0.0) self.parent.thisvideo.append(self.parent.videos[self.parent.converting]) self.filename=REGEX_FILE_CLEANUP_FILENAME.sub('',self.parent.meta[self.parent.videos[self.parent.converting]]['name']) self.profile=int(self.parent.meta[self.parent.videos[self.parent.converting]]['profile']) self.outdir=self.parent.prefs.getp(self.profile,'Outdir') if self.outdir[-1:]==os.sep: self.outdir=self.outdir[0:-1] if not os.path.lexists(self.outdir): os.makedirs(self.outdir) elif not os.path.isdir(self.outdir): os.remove(self.outdir) os.makedirs(self.outdir) self.outdir=self.outdir+os.sep if os.path.lexists(self.uri): self.stream=self.uri # It's a file stream, ffmpeg will take care of it else: self.stream='-' # It's another stream, spawn a downloader thread to take care of it and feed the content to ffmpeg via stdin if self.profile==-1: # Do not encode, just copy try: failed=False if self.stream=='-': # Spawn a downloader src=DamnURLPicker(self.uris) total=int(src.info()['Content-Length']) try: tmpuri=src.info()['Content-Disposition'][src.info()['Content-Disposition'].find('filename=')+9:] except: tmpuri='video.avi' # And pray for the best! else: # Just copy the file, lol total=int(os.lstat(self.stream).st_size) src=open(self.stream,'rb') tmpuri=self.stream if REGEX_URI_EXTENSION_EXTRACT.search(tmpuri): ext='.'+REGEX_URI_EXTENSION_EXTRACT.sub('\\1',tmpuri) else: ext='.avi' # And pray for the best again! self.filename=self.getfinalfilename(self.outdir,self.filename,ext) dst=open(self.outdir+self.filename+ext,'wb') keepgoing=True copied=0.0 self.parent.SetStatusText('Copying '+self.parent.meta[self.parent.videos[self.parent.converting]]['name']+' to '+self.filename+ext+'...') while keepgoing and not self.abort: i=src.read(256) if len(i): dst.write(i) copied+=256.0 else: copied=total keepgoing=False self.parent.gauge1.SetValue(min((100.0,copied/total*100.0))) except: failed=True self.grabberrun=False if self.abort or failed: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Failure.' self.parent.list.SetStringItem(self.parent.converting,ID_COL_VIDSTAT,'Failure.') else: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Success!' self.parent.list.SetStringItem(self.parent.converting,ID_COL_VIDSTAT,'Success!') self.parent.go(aborted=self.abort) return os_exe_ext='' if DV_OS_NAME=='nt': os_exe_ext='.exe' elif DV_OS_NAME=='mac': os_exe_ext='osx' self.passes=1 cmd=[DV_BIN_PATH+'ffmpeg'+os_exe_ext,'-i','?DAMNVID_VIDEO_STREAM?','-y','-title',self.parent.meta[self.parent.videos[self.parent.converting]]['name'],'-comment','Converted by DamnVid '+DV_VERSION+'.','-deinterlace','-passlogfile',DV_TMP_PATH+'pass'] for i in DV_PREFERENCES.keys(): if i[0:25]=='damnvid-profile:encoding_': i=i[16:] pref=self.parent.prefs.getp(self.profile,i) if pref: if type(DV_PREFERENCES['damnvid-profile:'+i]['kind']) is type(''): if DV_PREFERENCES['damnvid-profile:'+i]['kind'][0]=='%': pref=str(round(float(pref),0)) # Round if i=='encoding_pass': pref='?DAMNVID_VIDEO_PASS?' cmd.extend(['-'+i[9:],pref]) vidformat=self.parent.prefs.getp(self.profile,'Encoding_f') self.vcodec=self.parent.prefs.getp(self.profile,'Encoding_vcodec') self.totalpasses=self.parent.prefs.getp(self.profile,'Encoding_pass') if not self.totalpasses: self.totalpasses=1 else: self.totalpasses=int(self.totalpasses) if vidformat and DV_FILE_EXT.has_key(vidformat): ext='.'+DV_FILE_EXT[vidformat] else: if self.vcodec and DV_FILE_EXT_BY_CODEC.has_key(self.vcodec): ext='.'+DV_FILE_EXT_BY_CODEC[self.vcodec] else: ext='.avi' flags=[] if self.vcodec and DV_CODEC_ADVANCED_CL.has_key(self.vcodec): for o in DV_CODEC_ADVANCED_CL[self.vcodec]: if type(o) is type(''): if o not in flags: # If the flag is already there, don't add it again flags.append(o) else: if '-'+o[0] not in cmd: # If the option is already there, don't overwrite it cmd.extend(['-'+o[0],o[1]]) if len(flags): cmd.extend(['-flags',''.join(flags)]) self.filename=self.getfinalfilename(self.outdir,self.filename,ext) self.filenamenoext=self.filename self.tmpfilename=self.gettmpfilename(DV_TMP_PATH,self.filenamenoext,ext) cmd.append('?DAMNVID_OUTPUT_FILE?') self.filename=self.filenamenoext+ext self.duration=None self.parent.SetStatusText('Converting '+self.parent.meta[self.parent.videos[self.parent.converting]]['name']+' to '+self.filename+'...') while int(self.passes)<=int(self.totalpasses) and not self.abort: if self.totalpasses!=1: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Pass '+str(self.passes)+'/'+str(self.totalpasses)+'...' self.parent.list.SetStringItem(self.parent.converting,ID_COL_VIDSTAT,'Pass '+str(self.passes)+'/'+str(self.totalpasses)+'...') if self.passes!=1: self.stream=DV_TMP_PATH+self.tmpfilename self.tmpfilename=self.gettmpfilename(DV_TMP_PATH,self.filenamenoext,ext) self.process=DamnSpawner(self.cmd2str(cmd),stderr=subprocess.PIPE,stdin=subprocess.PIPE,cwd=os.path.dirname(DV_TMP_PATH)) if self.stream=='-': self.feeder=DamnDownloader(self.uris,self.process.stdin) self.feeder.start() curline='' while self.process.poll()==None and not self.abort: c=self.process.stderr.read(1) curline+=c if c=="\r" or c=="\n": self.parseLine(curline) curline='' self.passes+=1 self.parent.gauge1.SetValue(100.0) result=self.process.poll() # The process is complete, but .poll() still returns the process's return code time.sleep(.25) # Wait a bit self.grabberrun=False # That'll make the DamnConverterGrabber wake up just in case if result and os.path.lexists(DV_TMP_PATH+self.tmpfilename): os.remove(DV_TMP_PATH+self.tmpfilename) # Delete the output file if ffmpeg has exitted with a bad return code for i in os.listdir(os.path.dirname(DV_TMP_PATH)): if i[0:8]=='damnvid-': i=i[8:] if i==self.tmpfilename and not result: try: os.rename(DV_TMP_PATH+i,self.outdir+self.filename) except: # Maybe the file still isn't unlocked, it happens... Wait moar and retry try: time.sleep(2) os.rename(DV_TMP_PATH+i,self.outdir+self.filename) except: # Now this is really bad, alert the user dlg=wx.MessageDialog(None,'DamnVid successfully converted the file but something prevents it from moving it to the output directory.\nAll hope is not lost, you can still move the file by yourself. It is here:\n'+DV_TMP_PATH+i,'Cannot move file!',wx.OK|wx.ICON_EXCLAMATION) dlg.SetIcon(DV_ICON) dlg.ShowModal() dlg.Destroy() else: try: os.remove(DV_TMP_PATH+i) except: pass if not result: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Success!' self.parent.list.SetStringItem(self.parent.converting,ID_COL_VIDSTAT,'Success!') self.parent.go(aborted=self.abort) return self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Failure.' self.parent.list.SetStringItem(self.parent.converting,ID_COL_VIDSTAT,'Failure.') self.parent.go(aborted=self.abort)
c40fdb2df1fddd26432a1c83c6925db79812c2b0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/c40fdb2df1fddd26432a1c83c6925db79812c2b0/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 365, 18, 18623, 33, 8381, 309, 486, 365, 18, 18623, 30, 365, 18, 1650, 33, 2890, 18, 23510, 63, 20, 65, 365, 18, 2938, 18, 75, 8305, 21, 18, 694, 620, 12, 20,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 365, 18, 18623, 33, 8381, 309, 486, 365, 18, 18623, 30, 365, 18, 1650, 33, 2890, 18, 23510, 63, 20, 65, 365, 18, 2938, 18, 75, 8305, 21, 18, 694, 620, 12, 20,...
self.itemEditChannel.set_visible(True) self.itemRemoveChannel.set_visible(True)
if getattr(self.active_channel, 'ALL_EPISODES_PROXY', False): self.itemEditChannel.set_visible(False) self.itemRemoveChannel.set_visible(False) else: self.itemEditChannel.set_visible(True) self.itemRemoveChannel.set_visible(True)
def on_treeChannels_cursor_changed(self, widget, *args): ( model, iter ) = self.treeChannels.get_selection().get_selected()
3301e92e939ba5c2c4d90d722c41b921c636b993 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12778/3301e92e939ba5c2c4d90d722c41b921c636b993/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3413, 10585, 67, 9216, 67, 6703, 12, 2890, 16, 3604, 16, 380, 1968, 4672, 261, 938, 16, 1400, 262, 273, 365, 18, 3413, 10585, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3413, 10585, 67, 9216, 67, 6703, 12, 2890, 16, 3604, 16, 380, 1968, 4672, 261, 938, 16, 1400, 262, 273, 365, 18, 3413, 10585, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435, ...
return None if not os.path.exists(tmpdir): try: os.makedirs(os.path.dirname(tmpdir), mode=0755)
return (0, None) if chroot != None: tdir = chroot+"/"+tmpdir else: tdir = tmpdir if not os.path.exists(tdir): try: os.makedirs(os.path.dirname(tdir), mode=0755)
def runScript(prog=None, script=None, otherargs=[], force=False, rusage=False, tmpdir="/var/tmp", chroot=None): """Run (script otherargs) with interpreter prog (which can be a list containing initial arguments). Return None, or getrusage() stats of the script if rusage. Disable ldconfig optimization if force. Raise IOError, OSError.""" # FIXME? hardcodes config.rpmconfig usage if prog == None: prog = "/bin/sh" if prog == "/bin/sh" and script == None: return None if not os.path.exists(tmpdir): try: os.makedirs(os.path.dirname(tmpdir), mode=0755) except: pass try: os.makedirs(tmpdir, mode=01777) except: return None if isinstance(prog, TupleType): args = prog else: args = [prog] if not force and args == ["/sbin/ldconfig"] and script == None: if rpmconfig.delayldconfig == 1: rpmconfig.ldconfig += 1 # FIXME: assumes delayldconfig is checked after all runScript # invocations rpmconfig.delayldconfig = 1 return None elif rpmconfig.delayldconfig: rpmconfig.delayldconfig = 0 runScript("/sbin/ldconfig", force=1) if script != None: (fd, tmpfilename) = mkstemp_file(tmpdir, "rpm-tmp.") # test for open fds: # script = "ls -l /proc/$$/fd >> /$$.out\n" + script os.write(fd, script) os.close(fd) fd = None args.append(tmpfilename) args += otherargs (rfd, wfd) = os.pipe() if rusage: rusage_old = resource.getrusage(resource.RUSAGE_CHILDREN) pid = os.fork() if pid == 0: try: if chroot != None: os.chroot(chroot) os.close(rfd) if not os.path.exists("/dev"): os.mkdir("/dev") if not os.path.exists("/dev/null"): os.mknod("/dev/null", 0666, 259) fd = os.open("/dev/null", os.O_RDONLY) if fd != 0: os.dup2(fd, 0) os.close(fd) if wfd != 1: os.dup2(wfd, 1) os.close(wfd) os.dup2(1, 2) os.chdir("/") e = {"HOME": "/", "USER": "root", "LOGNAME": "root", "PATH": "/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin"} os.execve(args[0], args, e) finally: os._exit(255) os.close(wfd) # no need to read in chunks if we don't pass on data to some output func cret = "" cout = os.read(rfd, 8192) while cout: cret += cout cout = os.read(rfd, 8192) os.close(rfd) (cpid, status) = os.waitpid(pid, 0) if rusage: rusage_new = resource.getrusage(resource.RUSAGE_CHILDREN) rusage_val = [rusage_new[i] - rusage_old[i] for i in xrange(len(rusage_new))] else: rusage_val = None if script != None: os.unlink(tmpfilename) if status != 0: #or cret != "": if os.WIFEXITED(status): rpmconfig.printError("Script %s ended with exit code %d:" % \ (str(args), os.WEXITSTATUS(status))) elif os.WIFSIGNALED(status): core = "" if os.WCOREDUMP(status): core = "(with coredump)" rpmconfig.printError("Script %s killed by signal %d%s:" % \ (str(args), os.WTERMSIG(status), core)) elif os.WIFSTOPPED(status): # Can't happen, needs os.WUNTRACED rpmconfig.printError("Script %s stopped with signal %d:" % \ (str(args), os.WSTOPSIG(status))) else: rpmconfig.printError("Script %s ended (fixme: reason unknown):" % \ str(args)) cret.rstrip() rpmconfig.printError("Script %s failed: %s" % (args, cret)) # FIXME: should we be swallowing the script output? return (status, rusage_val)
1fc8cf80445525becdf49d3dac1a462c3136a76c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/1fc8cf80445525becdf49d3dac1a462c3136a76c/functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3651, 12, 14654, 33, 7036, 16, 2728, 33, 7036, 16, 1308, 1968, 22850, 6487, 2944, 33, 8381, 16, 436, 9167, 33, 8381, 16, 20213, 1546, 19, 1401, 19, 5645, 3113, 462, 3085, 33, 703...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3651, 12, 14654, 33, 7036, 16, 2728, 33, 7036, 16, 1308, 1968, 22850, 6487, 2944, 33, 8381, 16, 436, 9167, 33, 8381, 16, 20213, 1546, 19, 1401, 19, 5645, 3113, 462, 3085, 33, 703...
</datafield>
</datafield>
def setUp(self): """Prepare some ideal outputs"""
e392a2b83cce91ef4d27622e150c5c79211c9eae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/e392a2b83cce91ef4d27622e150c5c79211c9eae/bibformat_regression_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3536, 7543, 2690, 23349, 6729, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3536, 7543, 2690, 23349, 6729, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return cursor.fetchall()
try: return cursor.fetchall() except: return []
def execute(self, sql, params=[]): """ Executes the given SQL statement, with optional parameters. If the instance's debug attribute is True, prints out what it executes. """ cursor = connection.cursor() if self.debug: print " = %s" % sql, params cursor.execute(sql, params) return cursor.fetchall()
9381e7b9cdbf9014a98d45cd120adbfeab7a6ed6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13142/9381e7b9cdbf9014a98d45cd120adbfeab7a6ed6/generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1847, 16, 859, 33, 8526, 4672, 3536, 3889, 993, 326, 864, 3063, 3021, 16, 598, 3129, 1472, 18, 971, 326, 791, 1807, 1198, 1566, 353, 1053, 16, 14971, 596, 4121, 518...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1847, 16, 859, 33, 8526, 4672, 3536, 3889, 993, 326, 864, 3063, 3021, 16, 598, 3129, 1472, 18, 971, 326, 791, 1807, 1198, 1566, 353, 1053, 16, 14971, 596, 4121, 518...
return (indent*' '+children[0]+'('+
return (indent*' '+'@'+children[0]+'('+
def to_epytext(tree, indent=0, seclevel=0): """ Convert a DOM tree encoding epytext back to an epytext string. This is the inverse operation from L{parse}. I.e., assuming there are no errors, the following is true: - C{parse(to_epytext(tree)) == tree} The inverse is true, except that whitespace, line wrapping, and character escaping may be done differently. - C{to_epytext(parse(str)) == str} (approximately) @param tree: A DOM tree encoding of an epytext string. @type tree: C{xml.dom.minidom.Element} @param indent: The indentation for the string representation of C{tree}. Each line of the returned string will begin with C{indent} space characters. @type indent: C{int} @param seclevel: The section level that C{tree} appears at. This is used to generate section headings. @type seclevel: C{int} @return: The epytext string corresponding to C{tree}. @rtype: C{string} """ if isinstance(tree, Text): str = re.sub(r'\{', '\0', tree.data) str = re.sub(r'\}', '\1', str) return str if tree.tagName == 'epytext': indent -= 2 if tree.tagName in ('ulist', 'olist', 'fieldlist'): indent -= 2 if tree.tagName == 'section': seclevel += 1 children = [to_epytext(c, indent+2, seclevel) for c in tree.childNodes] childstr = ''.join(children) # Clean up for literal blocks (add the double "::" back) childstr = re.sub(':(\s*)\2', '::\\1', childstr) if tree.tagName == 'para': str = wordwrap(childstr, indent)+'\n' str = re.sub(r'((^|\n)\s*\d+)\.', r'\1E{.}', str) str = re.sub(r'((^|\n)\s*)-', r'\1E{-}', str) str = re.sub(r'((^|\n)\s*)@', r'\1E{@}', str) str = re.sub(r'::(\s*($|\n))', r'E{:}E{:}\1', str) str = re.sub('\0', 'E{lb}', str) str = re.sub('\1', 'E{rb}', str) return str elif tree.tagName == 'li': bulletAttr = tree.getAttributeNode('bullet') if bulletAttr: bullet = bulletAttr.value else: bullet = '-' return indent*' '+ bullet + ' ' + childstr.lstrip() elif tree.tagName == 'heading': str = re.sub('\0', 'E{lb}',childstr) str = re.sub('\1', 'E{rb}', str) uline = len(childstr)*_HEADING_CHARS[seclevel-1] return (indent-2)*' ' + str + '\n' + (indent-2)*' '+uline+'\n' elif tree.tagName == 'doctestblock': str = re.sub('\0', '{', childstr) str = re.sub('\1', '}', str) lines = [' '+indent*' '+line for line in str.split('\n')] return '\n'.join(lines) + '\n\n' elif tree.tagName == 'literalblock': str = re.sub('\0', '{', childstr) str = re.sub('\1', '}', str) lines = [(indent+1)*' '+line for line in str.split('\n')] return '\2' + '\n'.join(lines) + '\n\n' elif tree.tagName == 'field': if (len(tree.childNodes) > 1 and tree.childNodes[1].tagName == 'arg'): return (indent*' '+children[0]+'('+ children[1]+'):\n'+''.join(children[2:])) else: return (indent*' '+children[0]+':\n'+ ''.join(children[1:])) elif tree.tagName == 'target': return '<%s>' % childstr elif tree.tagName in ('fieldlist', 'tag', 'arg', 'epytext', 'section', 'olist', 'ulist', 'name'): return childstr else: for (tag, name) in _COLORIZING_TAGS.items(): if name == tree.tagName: return '%s{%s}' % (tag, childstr) raise ValueError('Unknown DOM element %r' % tree.tagName)
151adf65fde535b5a72c9d869ebf835ce8123891 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/151adf65fde535b5a72c9d869ebf835ce8123891/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 881, 93, 955, 12, 3413, 16, 3504, 33, 20, 16, 1428, 2815, 33, 20, 4672, 3536, 4037, 279, 4703, 2151, 2688, 425, 2074, 955, 1473, 358, 392, 425, 2074, 955, 533, 18, 1220, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 881, 93, 955, 12, 3413, 16, 3504, 33, 20, 16, 1428, 2815, 33, 20, 4672, 3536, 4037, 279, 4703, 2151, 2688, 425, 2074, 955, 1473, 358, 392, 425, 2074, 955, 533, 18, 1220, 353...
self.selectAllSQLWhitelist = "SELECT %s FROM `%s`%s" % (columnSQLWhitelist, tableWhitelist, groupBySQLWhitelist) if tableBlacklist != None: columnSQLBlacklist = '`%s`' % "`, `".join(colsBlacklist)
self.selectAllSQLWhitelist = "SELECT %s FROM `%s`%s" % (columnSQLWhitelist, self.tableWhitelist, groupBySQLWhitelist) if self.tableBlacklist != None:
def start(self): if self.factory == None: raise ParamError("this module need reference to fatory and database connection pool")
2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5428/2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae/ListBW.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 309, 365, 18, 6848, 422, 599, 30, 1002, 3014, 668, 2932, 2211, 1605, 1608, 2114, 358, 284, 8452, 471, 2063, 1459, 2845, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 309, 365, 18, 6848, 422, 599, 30, 1002, 3014, 668, 2932, 2211, 1605, 1608, 2114, 358, 284, 8452, 471, 2063, 1459, 2845, 7923, 2, -100, -100, -100, -100, -100, -100, ...
file.Write(" GenGLObjects<GL%sHelper>(n, %s);\n" %
file.Write(" if (!GenGLObjects<GL%sHelper>(n, %s)) {\n" " return parse_error::kParseInvalidArguments;\n" " }\n" %
def WriteImmediateHandlerImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write(" GenGLObjects<GL%sHelper>(n, %s);\n" % (func.original_name, func.GetLastOriginalArg().name))
8a837bb40249dfd9f0a2736abdab4f64592c99db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/8a837bb40249dfd9f0a2736abdab4f64592c99db/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 1503, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 2932, 225, 309, 16051, 7642, 11261, 4710, 32, 11261, 9, 87, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 1503, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 2932, 225, 309, 16051, 7642, 11261, 4710, 32, 11261, 9, 87, 22...
server = StoppableHttpServer(('', int(port)), StoppableHttpRequestHandler)
server = StoppableHttpServer(('localhost', int(port)), StoppableHttpRequestHandler)
def start_server(port=DEFAULT_PORT): print "Demo application starting on port %s" % port root = os.path.dirname(os.path.abspath(__file__)) os.chdir(root) server = StoppableHttpServer(('', int(port)), StoppableHttpRequestHandler) server.serve_forever()
82bc079334cecdeee503243d1f763e6e7a4b04d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2148/82bc079334cecdeee503243d1f763e6e7a4b04d6/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 3567, 12, 655, 33, 5280, 67, 6354, 4672, 1172, 315, 27126, 2521, 5023, 603, 1756, 738, 87, 6, 738, 1756, 1365, 225, 273, 1140, 18, 803, 18, 12287, 12, 538, 18, 803, 18, 5113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 3567, 12, 655, 33, 5280, 67, 6354, 4672, 1172, 315, 27126, 2521, 5023, 603, 1756, 738, 87, 6, 738, 1756, 1365, 225, 273, 1140, 18, 803, 18, 12287, 12, 538, 18, 803, 18, 5113...
typecode = None if format in (pygame.AUDIO_S8, pygame.AUDIO_S16LSB, pygame.AUDIO_S16MSB): typecode = (numpy.uint8, numpy.uint16, None, numpy.uint32)[fmtbytes - 1] else: typecode = (numpy.int8, numpy.int16, None, numpy.int32)[fmtbytes - 1]
typecode = { 8 : numpy.uint8, 16 : numpy.uint16, -8 : numpy.int8, -16 : numpy.int16 }[info[1]]
def samples (sound): """ """ # Info is a (freq, format, stereo) tuple info = pygame.mixer.get_init () if not info: raise pygame.error, "Mixer not initialized" fmtbytes = (abs (info[1]) & 0xff) >> 3 channels = mixer.get_num_channels () data = sound.get_buffer () shape = (data.length / channels * fmtbytes, ) if channels > 1: shape = (shape[0], 2) typecode = None # Signed or unsigned representation? if format in (pygame.AUDIO_S8, pygame.AUDIO_S16LSB, pygame.AUDIO_S16MSB): typecode = (numpy.uint8, numpy.uint16, None, numpy.uint32)[fmtbytes - 1] else: typecode = (numpy.int8, numpy.int16, None, numpy.int32)[fmtbytes - 1] array = numpy.frombuffer (data, typecode) array.shape = shape return array
da0bcce5e530d0f9eb7bdd9211d2f405671a9945 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1298/da0bcce5e530d0f9eb7bdd9211d2f405671a9945/_numpysndarray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5216, 261, 29671, 4672, 3536, 3536, 468, 3807, 353, 279, 261, 10212, 16, 740, 16, 29558, 13, 3193, 1123, 273, 2395, 13957, 18, 14860, 264, 18, 588, 67, 2738, 1832, 309, 486, 1123, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5216, 261, 29671, 4672, 3536, 3536, 468, 3807, 353, 279, 261, 10212, 16, 740, 16, 29558, 13, 3193, 1123, 273, 2395, 13957, 18, 14860, 264, 18, 588, 67, 2738, 1832, 309, 486, 1123, 30, ...
frame = 1 nc.close() log.info("Current frame number is: %i" % (frame-1))
if hasattr(self,'atoms'): frame = 1 else: frame = 0 log.info("Current frame number is: %i" % (frame-1))
def _set_frame_number(self, frame=None): 'set framenumber in the netcdf file' if frame is None: nc = netCDF(self.nc, 'r') if 'TotalEnergy' in nc.variables: frame = nc.variables['TotalEnergy'].shape[0] # make sure the last energy is reasonable. Sometime # the field is empty if the calculation ran out of # walltime for example. Empty values get returned as # 9.6E36. Dacapos energies should always be negative, # so if the energy is > 1E36, there is definitely # something wrong and a restart is required. if nc.variables.get('TotalEnergy', None)[-1] > 1E36: log.warn("Total energy > 1E36. NC file is incomplete. \ calc.restart required") self.restart() else: frame = 1 nc.close() log.info("Current frame number is: %i" % (frame-1)) self._frame = frame-1 #netCDF starts counting with 1
7d02f026851de4efa926b3c4fa391648177b9443 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/7d02f026851de4efa926b3c4fa391648177b9443/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 3789, 67, 2696, 12, 2890, 16, 2623, 33, 7036, 4672, 296, 542, 21799, 21998, 316, 326, 2901, 24799, 585, 11, 225, 309, 2623, 353, 599, 30, 8194, 273, 2901, 39, 4577, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 3789, 67, 2696, 12, 2890, 16, 2623, 33, 7036, 4672, 296, 542, 21799, 21998, 316, 326, 2901, 24799, 585, 11, 225, 309, 2623, 353, 599, 30, 8194, 273, 2901, 39, 4577, 12, ...
self.startPos = self.roi.lowerRight()
self.startPos = self.roi.lowerRight() - Diff2D(1,1)
def mousePressed(self, x, y, button): if self._painting and button == qt.Qt.RightButton: self._stopPainting() self.setROI(self._oldROI) return if button != qt.Qt.LeftButton: return if self.roi: mousePos = self._viewer.toWindowCoordinates(x, y) wr = self.windowRect() print (mousePos - wr.topLeft()).manhattanLength() if (mousePos - wr.topLeft()).manhattanLength() < 9: self.startPos = self.roi.lowerRight() elif (mousePos - wr.bottomRight()).manhattanLength() < 9: self.startPos = self.roi.upperLeft() else: self.startPos = intPos((x, y)) else: self.startPos = intPos((x, y)) self.mouseMoved(x, y) self._startPainting()
66ec2e44c5ec7238ba11d6b92cd130947baef15e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/66ec2e44c5ec7238ba11d6b92cd130947baef15e/mapdisplay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 24624, 12, 2890, 16, 619, 16, 677, 16, 3568, 4672, 309, 365, 6315, 84, 1598, 310, 471, 3568, 422, 25672, 18, 23310, 18, 4726, 3616, 30, 365, 6315, 5681, 12699, 310, 1435, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 24624, 12, 2890, 16, 619, 16, 677, 16, 3568, 4672, 309, 365, 6315, 84, 1598, 310, 471, 3568, 422, 25672, 18, 23310, 18, 4726, 3616, 30, 365, 6315, 5681, 12699, 310, 1435, 365, 18...
def create(*args): return apply(_quickfix.MemoryStoreFactory_create, args) def destroy(*args): return apply(_quickfix.MemoryStoreFactory_destroy, args) def __init__(self, *args): this = apply(_quickfix.new_MemoryStoreFactory, args)
def create(*args): return _quickfix.MemoryStoreFactory_create(*args) def destroy(*args): return _quickfix.MemoryStoreFactory_destroy(*args) def __init__(self, *args): this = _quickfix.new_MemoryStoreFactory(*args)
def create(*args): return apply(_quickfix.MemoryStoreFactory_create, args)
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 30857, 1968, 4672, 327, 2230, 24899, 19525, 904, 18, 6031, 2257, 1733, 67, 2640, 16, 833, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 30857, 1968, 4672, 327, 2230, 24899, 19525, 904, 18, 6031, 2257, 1733, 67, 2640, 16, 833, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def ApplyConvolution(self, imagedata):
def ApplyConvolution(self, imagedata, update_progress = None):
def ApplyConvolution(self, imagedata): number_filters = len(self.config['convolutionFilters']) if number_filters: update_progress= vtk_utils.ShowProgress(number_filters) for filter in self.config['convolutionFilters']: convolve = vtk.vtkImageConvolve() convolve.SetInput(imagedata) convolve.SetKernel5x5([i/60.0 for i in Kernels[filter]]) convolve.AddObserver("ProgressEvent", lambda obj,evt: update_progress(convolve, "%s ..." % filter)) imagedata = convolve.GetOutput() #convolve.GetOutput().ReleaseDataFlagOn() return imagedata
b6b1506bed151f054fc20b54bb85121814549987 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/b6b1506bed151f054fc20b54bb85121814549987/volume.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5534, 17467, 5889, 12, 2890, 16, 8902, 329, 396, 16, 1089, 67, 8298, 273, 599, 4672, 1300, 67, 6348, 273, 562, 12, 2890, 18, 1425, 3292, 4896, 5889, 5422, 19486, 309, 1300, 67, 6348, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5534, 17467, 5889, 12, 2890, 16, 8902, 329, 396, 16, 1089, 67, 8298, 273, 599, 4672, 1300, 67, 6348, 273, 562, 12, 2890, 18, 1425, 3292, 4896, 5889, 5422, 19486, 309, 1300, 67, 6348, 3...
wmproxy = self.wmproxyInit( wms )
def doWMScancel( self, jobList, service): """ Kill jobs submitted to a given WMS. Does not perform status check """
19380de804a6491834bb51bd1ac64fed6b6d7716 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/19380de804a6491834bb51bd1ac64fed6b6d7716/SchedulerGLiteAPI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 25173, 7972, 2183, 12, 365, 16, 1719, 682, 16, 1156, 4672, 3536, 20520, 6550, 9638, 358, 279, 864, 678, 3537, 18, 9637, 486, 3073, 1267, 866, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 25173, 7972, 2183, 12, 365, 16, 1719, 682, 16, 1156, 4672, 3536, 20520, 6550, 9638, 358, 279, 864, 678, 3537, 18, 9637, 486, 3073, 1267, 866, 3536, 2, -100, -100, -100, -100, -100, ...
""" Returns a list of Boolean columns. """
"""Return a list of Boolean columns."""
def get_bools(self): """ Returns a list of Boolean columns. """ return [col for col in self.model.c.keys() if isinstance(self.model.c[col].type, Boolean)]
8ed969f42696996ee506bc295016810685eb5120 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13203/8ed969f42696996ee506bc295016810685eb5120/formalchemy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1075, 3528, 12, 2890, 4672, 3536, 990, 279, 666, 434, 3411, 2168, 12123, 327, 306, 1293, 364, 645, 316, 365, 18, 2284, 18, 71, 18, 2452, 1435, 309, 1549, 12, 2890, 18, 2284, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1075, 3528, 12, 2890, 4672, 3536, 990, 279, 666, 434, 3411, 2168, 12123, 327, 306, 1293, 364, 645, 316, 365, 18, 2284, 18, 71, 18, 2452, 1435, 309, 1549, 12, 2890, 18, 2284, ...
write=file.write tfile.seek(0) id=self._serial user, desc, ext = self._ude tlen=self._thl pos=self._pos file.seek(pos) tl=tlen+dlen stl=p64(tl) try: write(pack( ">8s" "8s" "c" "H" "H" "H" ,id, stl, 'c', len(user), len(desc), len(ext), )) if user: write(user) if desc: write(desc) if ext: write(ext) cp(tfile, file, dlen) write(stl) file.seek(pos+16) write(self._tstatus) file.flush() if fsync is not None: fsync(file.fileno()) except: file.truncate(pos) self._pos=pos+tl+8
file.seek(self._pos+16) file.write(self._tstatus) file.flush() if fsync is not None: fsync(file.fileno()) self._pos=self._nextpos
def _finish(self, tid, u, d, e): tfile=self._tfile dlen=tfile.tell() if not dlen: return # No data in this trans file=self._file write=file.write tfile.seek(0) id=self._serial user, desc, ext = self._ude
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13749, 12, 2890, 16, 11594, 16, 582, 16, 302, 16, 425, 4672, 268, 768, 33, 2890, 6315, 88, 768, 302, 1897, 33, 88, 768, 18, 88, 1165, 1435, 309, 486, 302, 1897, 30, 327, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13749, 12, 2890, 16, 11594, 16, 582, 16, 302, 16, 425, 4672, 268, 768, 33, 2890, 6315, 88, 768, 302, 1897, 33, 88, 768, 18, 88, 1165, 1435, 309, 486, 302, 1897, 30, 327, 468, ...
self.l0.SetLabel( "resized (%d)" %(ch1.GetId()) )
self.l0.SetLabel( "resized (%d)" %(self.ch1.GetId()) )
def OnTestResizeButton(self, event): curWidth = self.ch1.GetTotalUIExtent() if (self.stepSize == 1): self.stepDir = (-1) else: if (self.stepSize == (-1)): self.stepDir = 1 self.stepSize = self.stepSize + self.stepDir self.ch1.DoSetSize( 20, 40, curWidth + 40 * self.stepSize, 20, 0 ) self.l0.SetLabel( "resized (%d)" %(ch1.GetId()) )
559e8e9b8c0ac49102810f4a0e2e93d1ea05e238 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/559e8e9b8c0ac49102810f4a0e2e93d1ea05e238/ColumnHeader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 4709, 12182, 3616, 12, 2890, 16, 871, 4672, 662, 2384, 273, 365, 18, 343, 21, 18, 967, 5269, 5370, 17639, 1435, 309, 261, 2890, 18, 4119, 1225, 422, 404, 4672, 365, 18, 4119, 162...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 4709, 12182, 3616, 12, 2890, 16, 871, 4672, 662, 2384, 273, 365, 18, 343, 21, 18, 967, 5269, 5370, 17639, 1435, 309, 261, 2890, 18, 4119, 1225, 422, 404, 4672, 365, 18, 4119, 162...
host = user + ':' + passwd + '@' + host
host = quote(user, safe='') + ':' + quote(passwd, safe='') + '@' + host
def retry_http_basic_auth(self, url, realm, data=None): host, selector = splithost(url) i = host.find('@') + 1 host = host[i:] user, passwd = self.get_user_passwd(host, realm, i) if not (user or passwd): return None host = user + ':' + passwd + '@' + host newurl = 'http://' + host + selector if data is None: return self.open(newurl) else: return self.open(newurl, data)
9db85c3337c23b18f5007361dc55da721a182171 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9db85c3337c23b18f5007361dc55da721a182171/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 2505, 67, 13240, 67, 1944, 12, 2890, 16, 880, 16, 11319, 16, 501, 33, 7036, 4672, 1479, 16, 3451, 273, 6121, 483, 669, 12, 718, 13, 277, 273, 1479, 18, 4720, 2668, 36, 6134...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 2505, 67, 13240, 67, 1944, 12, 2890, 16, 880, 16, 11319, 16, 501, 33, 7036, 4672, 1479, 16, 3451, 273, 6121, 483, 669, 12, 718, 13, 277, 273, 1479, 18, 4720, 2668, 36, 6134...
return self.message
return self.msg
def __str__(self): return self.message
b5027f778753355f1d9ebf8cb4725d6056a3f0a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11479/b5027f778753355f1d9ebf8cb4725d6056a3f0a3/NodeSet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 365, 18, 2150, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 365, 18, 2150, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
support.unlink(temp_mod_name + '.py') support.unlink(temp_mod_name + '.pyc') support.unlink(temp_mod_name + '.pyo') support.unlink(init_file_name + '.py') support.unlink(init_file_name + '.pyc') support.unlink(init_file_name + '.pyo')
for ext in ('.py', '.pyc', '.pyo'): support.unlink(temp_mod_name + ext) support.unlink(init_file_name + ext)
def test_issue5604(self): # Test cannot cover imp.load_compiled function. # Martin von Loewis note what shared library cannot have non-ascii # character because init_xxx function cannot be compiled # and issue never happens for dynamic modules. # But sources modified to follow generic way for processing pathes.
86189641773faed2acbe1dd3617488b44d6404fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/86189641773faed2acbe1dd3617488b44d6404fc/test_imp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13882, 4313, 3028, 12, 2890, 4672, 468, 7766, 2780, 5590, 1646, 18, 945, 67, 19397, 445, 18, 468, 490, 485, 267, 331, 265, 3176, 359, 291, 4721, 4121, 5116, 5313, 2780, 1240, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13882, 4313, 3028, 12, 2890, 4672, 468, 7766, 2780, 5590, 1646, 18, 945, 67, 19397, 445, 18, 468, 490, 485, 267, 331, 265, 3176, 359, 291, 4721, 4121, 5116, 5313, 2780, 1240, ...
if rosen == 1: x = 1.5*x y = 0.5 + y
x = 1.5*x y = 0.5 + y
def main(): rosen = 1 x = (arange(XPTS) - (XPTS / 2)) / float(XPTS / 2) y = (arange(YPTS) - (YPTS / 2)) / float(YPTS / 2) if rosen == 1: x = 1.5*x y = 0.5 + y x.shape = (-1,1) r2 = (x*x) + (y*y) z = (1. - x)*(1. - x) + 100 * (x*x - y)*(x*x - y) # The log argument may be zero for just the right grid. */ z = log(choose(greater(z,0.), (exp(-5.), z))) x.shape = (-1,) zmin = min(z.flat) zmax = max(z.flat) nlevel = 10 step = (zmax-zmin)/(nlevel+1) clevel = zmin + step + arange(nlevel)*step plschr(0., 1.8) plwid(1) pladv(0) plvpor(0.0, 1.0, 0.0, 1.0) plwind(-0.43, 0.840, 0.05, 0.48) plcol0(1) plw3d(1.0, 1.0, 1.0, -1.5, 1.5, -0.5, 1.5, zmin, zmax, alt, az) plbox3("bnstu", "", 0.0, 0, "bnstu", "", 0.0, 0, "bcdmnstuv", "", 0.0, 0) plmtex3("zs", 5.0, 1.07, 1.0, "z axis") plcol0(2) # magnitude colored plot with faceted squares cmap1_init(0) plsurf3d(x, y, z, MAG_COLOR | FACETED, ()) # Shading to provide a good background for legend. x1 = 0.10 x2 = 0.8 plvpor(0.0, 1.0, 0.0, 1.0) plwind(0.0, 1.0, 0.0, 1.0) # Completely opaque from 0. to x1 plscol0a(15, 0, 0, 0, 1.0) plcol0(15) x=array([0., 0., x1, x1]) y=array([0., 1., 1., 0.]) plfill(x,y) # Partially opaque (later to be replaced by gradient) from x1 to x2 plscol0a(15, 0, 0, 0, 0.3) plcol0(15) x=array([x1, x1, x2, x2]) plfill(x,y) # Logo Legend plscol0a(15, 255, 255, 255, 1.0) plcol0(15) x1 = 0.03 plschr(0., 2.5) plsfont(PL_FCI_SANS, PL_FCI_UPRIGHT, PL_FCI_BOLD) plptex(x1, 0.57, 1.0, 0.0, 0.0, "PLplot") plschr(0., 1.3) plptex(x1, 0.30, 1.0, 0.0, 0.0, "The ultimate cross-platform plotting library")
27e6ffd3271b6aa3025cba28cd49552fbcd14956 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2933/27e6ffd3271b6aa3025cba28cd49552fbcd14956/plplot_logo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 721, 87, 275, 273, 404, 619, 273, 261, 297, 726, 12, 60, 1856, 55, 13, 300, 261, 60, 1856, 55, 342, 576, 3719, 342, 1431, 12, 60, 1856, 55, 342, 576, 13, 677, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 721, 87, 275, 273, 404, 619, 273, 261, 297, 726, 12, 60, 1856, 55, 13, 300, 261, 60, 1856, 55, 342, 576, 3719, 342, 1431, 12, 60, 1856, 55, 342, 576, 13, 677, 273...
def __init__(self, application, config):
def __init__(self, application, config, dispatching_config=CONFIG):
def __init__(self, application, config): """ This delegates all requests to `application`, adding a *copy* of the configuration `config`. """ def register_config(environ, start_response): popped_config = None if 'paste.config' in environ: popped_config = environ['paste.config']
2e91c6f87a54d2f0b0714bb9d77eb77c5a08462d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2097/2e91c6f87a54d2f0b0714bb9d77eb77c5a08462d/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2521, 16, 642, 16, 3435, 310, 67, 1425, 33, 7203, 4672, 3536, 1220, 22310, 777, 3285, 358, 1375, 3685, 9191, 6534, 279, 380, 3530, 14, 434, 326, 1664, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2521, 16, 642, 16, 3435, 310, 67, 1425, 33, 7203, 4672, 3536, 1220, 22310, 777, 3285, 358, 1375, 3685, 9191, 6534, 279, 380, 3530, 14, 434, 326, 1664, 13...
ctx.Set("alert.assessment.impact.description", source + "has repeated actions taken against it recently at least 5 times. It may have been infected with a worm.")
ctx.Set("alert.assessment.impact.description", source + " has repeated actions taken against it recently at least 5 times. It may have been infected with a worm.")
def run(self, idmef): ctxt = idmef.Get("alert.classification.text") if not ctxt: return
6ef8076667b0ec142470eec5b5f270330696a547 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3386/6ef8076667b0ec142470eec5b5f270330696a547/worm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 612, 3501, 74, 4672, 14286, 273, 612, 3501, 74, 18, 967, 2932, 11798, 18, 20251, 18, 955, 7923, 309, 486, 14286, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 612, 3501, 74, 4672, 14286, 273, 612, 3501, 74, 18, 967, 2932, 11798, 18, 20251, 18, 955, 7923, 309, 486, 14286, 30, 327, 2, -100, -100, -100, -100, -100, -100, -10...
>>> context = Context.from_request(req, 'source', 'trunk/foo.py', 123)
>>> context = Context.from_request(req, 'source', '/trunk/foo.py', 123)
def render_summary(self, req, config, build, step, category): assert category == 'coverage'
5bc70454bfc3d736144870055b656c6286ec5b82 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4547/5bc70454bfc3d736144870055b656c6286ec5b82/coverage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 7687, 12, 2890, 16, 1111, 16, 642, 16, 1361, 16, 2235, 16, 3150, 4672, 1815, 3150, 422, 296, 16356, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 7687, 12, 2890, 16, 1111, 16, 642, 16, 1361, 16, 2235, 16, 3150, 4672, 1815, 3150, 422, 296, 16356, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
from schooltool.calendar.icalendar import RowParser
from schooltool.calendar.icalendar import RowParser, ICalParseError
def test_parseRow(self): from schooltool.calendar.icalendar import RowParser parseRow = RowParser._parseRow self.assertEqual(parseRow("key:"), ("KEY", "", {})) self.assertEqual(parseRow("key:value"), ("KEY", "value", {})) self.assertEqual(parseRow("key:va:lu:e"), ("KEY", "va:lu:e", {})) self.assertRaises(ICalParseError, parseRow, "key but no value") self.assertRaises(ICalParseError, parseRow, ":value but no key") self.assertRaises(ICalParseError, parseRow, "bad name:")
89713591dbf5fbfa1a6fd4867ca2311ab69bca56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/89713591dbf5fbfa1a6fd4867ca2311ab69bca56/test_icalendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2670, 1999, 12, 2890, 4672, 628, 18551, 1371, 6738, 18, 11650, 18, 1706, 2843, 1930, 6556, 2678, 16, 467, 3005, 21004, 1109, 1999, 273, 6556, 2678, 6315, 2670, 1999, 365, 18, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2670, 1999, 12, 2890, 4672, 628, 18551, 1371, 6738, 18, 11650, 18, 1706, 2843, 1930, 6556, 2678, 16, 467, 3005, 21004, 1109, 1999, 273, 6556, 2678, 6315, 2670, 1999, 365, 18, 1...
s_uid = credDict['username'] s_gid = credDict['group'] result = self.findUser(s_uid) if not result['OK']: return result uid = result['Value'] result = self.findGroup(s_gid) if not result['OK']: return result gid = result['Value']
def getReplicas(self,lfns,credDict): """ Get Replicas for the given LFNs """ s_uid = credDict['username'] s_gid = credDict['group'] result = self.findUser(s_uid) if not result['OK']: return result uid = result['Value'] result = self.findGroup(s_gid) if not result['OK']: return result gid = result['Value'] result = checkArgumentFormat(lfns) if not result['OK']: return result arguments = result['Value'] files = arguments.keys() start = time.time() result = self.findFile(files) print "findFiles", time.time()-start start = time.time() fileDict = result['Value'] if not fileDict["Successful"]: return S_OK(fileDict) failed = fileDict['Failed'] successful = {} lfnDict = {} for lfn,id in fileDict['Successful'].items(): if id: lfnDict[id] = lfn fileIDString = ','.join([str(id) for id in lfnDict.keys()]) start = time.time() req = "SELECT FileID, SEID FROM FC_Replicas WHERE FileID in (%s)" % fileIDString result = self._query(req) if not result['OK']: for id,lfn in lfnDict.items(): failed[lfn] = result["Message"] if not result['Value']: for id,lfn in lfnDict.items(): failed[lfn] = 'No replicas found' for row in result['Value']: lfn = lfnDict[int(row[0])] seID = row[1] resSE = self.getSEDefinition(seID) if resSE['OK']: seDict = resSE['Value']['SEDict'] se = resSE['Value']['SEName'] # Construct PFN pfnDict = dict(seDict) pfnDict['FileName'] = lfn result = pfnunparse(pfnDict) if not result['OK']: failed[lfn] = result['Message'] continue if not successful.has_key(lfn): successful[lfn] = {} successful[lfn][se] = result['Value'] else: failed[lfn] = resSE['Message'] print "findReps", time.time()-start return S_OK({'Successful':successful,'Failed':failed})
7c9f9bf86a8a3adc7278acbcec8e46c5cbd104b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/7c9f9bf86a8a3adc7278acbcec8e46c5cbd104b8/FileCatalogDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 10528, 12, 2890, 16, 20850, 2387, 16, 20610, 5014, 4672, 3536, 968, 31222, 364, 326, 864, 18803, 10386, 3536, 225, 563, 273, 10788, 1630, 12, 20850, 2387, 13, 309, 486, 563, 3292, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 10528, 12, 2890, 16, 20850, 2387, 16, 20610, 5014, 4672, 3536, 968, 31222, 364, 326, 864, 18803, 10386, 3536, 225, 563, 273, 10788, 1630, 12, 20850, 2387, 13, 309, 486, 563, 3292, ...
pname = self._text_to_latex(param.name()) str += ' '*10+'\\item[' + self._text_to_latex(pname)
str += ' '*10+'\\item[' + self._text_to_latex(param.name())
def _func_list_box(self, link, cls): str = '' fname = link.name() fuid = link.target() if fuid.is_method() or fuid.is_builtin_method(): container = fuid.cls() # (If container==ClassType, it's (probably) a class method.) inherit = (container != cls and container.value() is not types.ClassType) else: inherit = 0 try: container = fuid.module() except TypeError: container = None
d246bf0e65f24e5066780f8c636107f08490f619 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/d246bf0e65f24e5066780f8c636107f08490f619/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 1098, 67, 2147, 12, 2890, 16, 1692, 16, 2028, 4672, 609, 273, 875, 5299, 273, 1692, 18, 529, 1435, 284, 1911, 273, 1692, 18, 3299, 1435, 309, 284, 1911, 18, 291, 67, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 1098, 67, 2147, 12, 2890, 16, 1692, 16, 2028, 4672, 609, 273, 875, 5299, 273, 1692, 18, 529, 1435, 284, 1911, 273, 1692, 18, 3299, 1435, 309, 284, 1911, 18, 291, 67, 20...
query = subepxr + '\nLIMIT %d,18446744073709551615' % expr.offset
query = subexpr + '\nLIMIT %d,18446744073709551615' % expr.offset
def OffsetLimit(self, expr, subexpr): # Check that we have some kind of SELECT expression in subexpr allowed = [nodes.MapResult, nodes.Select, nodes.Sort, nodes.Distinct] assert expr[0].__class__ in allowed, \ 'OffsetLimit can only be used with the result of MapResult, Select, ' \ 'Distinct or Sort!' # Add LIMIT clause if expr.limit != None: if expr.offset != None: query = subexpr + '\nLIMIT %d,%d' % (expr.offset, expr.limit) else: query = subexpr + '\nLIMIT %d' % expr.limit else: if expr.offset != None: # Note: The MySQL manual actually suggests this number. # Let's hope it's future-proof. query = subepxr + '\nLIMIT %d,18446744073709551615' % expr.offset return query
ddd2842306c57d5b14c394931ef43cbb91123514 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5223/ddd2842306c57d5b14c394931ef43cbb91123514/emit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9874, 3039, 12, 2890, 16, 3065, 16, 720, 8638, 4672, 225, 468, 2073, 716, 732, 1240, 2690, 3846, 434, 9111, 2652, 316, 720, 8638, 2935, 273, 306, 4690, 18, 863, 1253, 16, 2199, 18, 339...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9874, 3039, 12, 2890, 16, 3065, 16, 720, 8638, 4672, 225, 468, 2073, 716, 732, 1240, 2690, 3846, 434, 9111, 2652, 316, 720, 8638, 2935, 273, 306, 4690, 18, 863, 1253, 16, 2199, 18, 339...
uninstaller = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; for subdir in ListRegistryKeys(uninstaller): if (subdir[0]=="{"): dir = GetRegistryKey(uninstaller+"\\"+subdir, "InstallLocation") if (dir != 0): if ((SDK.has_key("DX8")==0) and (os.path.isfile(dir+"\\Include\\d3d8.h")) and (os.path.isfile(dir+"\\Include\\d3dx8.h")) and (os.path.isfile(dir+"\\Lib\\d3d8.lib")) and (os.path.isfile(dir+"\\Lib\\d3dx8.lib"))): SDK["DX8"] = dir.replace("\\", "/").rstrip("/") if ((SDK.has_key("DX9")==0) and (os.path.isfile(dir+"\\Include\\d3d9.h")) and (os.path.isfile(dir+"\\Include\\d3dx9.h")) and (os.path.isfile(dir+"\\Include\\dxsdkver.h")) and (os.path.isfile(dir+"\\Lib\\x86\\d3d9.lib")) and (os.path.isfile(dir+"\\Lib\\x86\\d3dx9.lib"))): SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
if (SDK.has_key("DX9")==0): dir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX\\Microsoft DirectX SDK (March 2009)", "InstallPath") if (dir != 0): SDK["DX9"] = dir.replace("\\", "/").rstrip("/") if (SDK.has_key("DX9")==0 or SDK.has_key("DX8")==0): uninstaller = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; for subdir in ListRegistryKeys(uninstaller): if (subdir[0]=="{"): dir = GetRegistryKey(uninstaller+"\\"+subdir, "InstallLocation") if (dir != 0): if ((SDK.has_key("DX8")==0) and (os.path.isfile(dir+"\\Include\\d3d8.h")) and (os.path.isfile(dir+"\\Include\\d3dx8.h")) and (os.path.isfile(dir+"\\Lib\\d3d8.lib")) and (os.path.isfile(dir+"\\Lib\\d3dx8.lib"))): SDK["DX8"] = dir.replace("\\", "/").rstrip("/") if ((SDK.has_key("DX9")==0) and (os.path.isfile(dir+"\\Include\\d3d9.h")) and (os.path.isfile(dir+"\\Include\\d3dx9.h")) and (os.path.isfile(dir+"\\Include\\dxsdkver.h")) and (os.path.isfile(dir+"\\Lib\\x86\\d3d9.lib")) and (os.path.isfile(dir+"\\Lib\\x86\\d3dx9.lib"))): SDK["DX9"] = dir.replace("\\", "/").rstrip("/")
def SdkLocateDirectX(): if (sys.platform != "win32"): return if (os.path.isdir("sdks/directx8")): SDK["DX8"]="sdks/directx8" if (os.path.isdir("sdks/directx9")): SDK["DX9"]="sdks/directx9" uninstaller = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; for subdir in ListRegistryKeys(uninstaller): if (subdir[0]=="{"): dir = GetRegistryKey(uninstaller+"\\"+subdir, "InstallLocation") if (dir != 0): if ((SDK.has_key("DX8")==0) and (os.path.isfile(dir+"\\Include\\d3d8.h")) and (os.path.isfile(dir+"\\Include\\d3dx8.h")) and (os.path.isfile(dir+"\\Lib\\d3d8.lib")) and (os.path.isfile(dir+"\\Lib\\d3dx8.lib"))): SDK["DX8"] = dir.replace("\\", "/").rstrip("/") if ((SDK.has_key("DX9")==0) and (os.path.isfile(dir+"\\Include\\d3d9.h")) and (os.path.isfile(dir+"\\Include\\d3dx9.h")) and (os.path.isfile(dir+"\\Include\\dxsdkver.h")) and (os.path.isfile(dir+"\\Lib\\x86\\d3d9.lib")) and (os.path.isfile(dir+"\\Lib\\x86\\d3dx9.lib"))): SDK["DX9"] = dir.replace("\\", "/").rstrip("/") if (SDK.has_key("DX9")): SDK["DIRECTCAM"] = SDK["DX9"]
d427b8559f45445bbcac60bc2895b411d93ef9b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/d427b8559f45445bbcac60bc2895b411d93ef9b3/makepandacore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3426, 1333, 340, 5368, 60, 13332, 309, 261, 9499, 18, 9898, 480, 315, 8082, 1578, 6, 4672, 327, 309, 261, 538, 18, 803, 18, 291, 1214, 2932, 20907, 87, 19, 7205, 92, 28, 6, 3719, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3426, 1333, 340, 5368, 60, 13332, 309, 261, 9499, 18, 9898, 480, 315, 8082, 1578, 6, 4672, 327, 309, 261, 538, 18, 803, 18, 291, 1214, 2932, 20907, 87, 19, 7205, 92, 28, 6, 3719, 30,...
{'becquerel':'SI derived unit of radiation.\nDefined to be the activity of a quantity of radioactive material in which one nucleus decays per second.', 'curie':'Defined to be 37*10^9 becquerels.', 'rutherford':'Defined to be 10^6 becquerels.'},
{'becquerel':'SI derived unit of radiation.\nDefined to be the activity of a quantity of radioactive material in which one nucleus decays per second.', 'curie':'Defined to be 37*10^9 becquerels.', 'rutherford':'Defined to be 10^6 becquerels.'},
def evalunitdict(): """ Replace all the string values of the unitdict variable by their evaluated forms, and builds some other tables for ease of use. This function is mainly used internally, for efficiency (and flexibility) purposes, making it easier to describe the units. EXAMPLES:: sage: sage.symbolic.units.evalunitdict() """ from sage.misc.all import sage_eval for key, value in unitdict.iteritems(): unitdict[key] = dict([(a,sage_eval(repr(b))) for a, b in value.iteritems()]) # FEATURE IDEA: create a function that would allow users to add # new entries to the table without having to know anything about # how the table is stored internally. # # Format the table for easier use. # for k, v in unitdict.iteritems(): for a in v: unit_to_type[a] = k for w in unitdict.iterkeys(): for j in unitdict[w].iterkeys(): if type(unitdict[w][j]) == tuple: unitdict[w][j] = unitdict[w][j][0] value_to_unit[w] = dict(zip(unitdict[w].itervalues(), unitdict[w].iterkeys()))
04717bf1b9b9ac138edf5b9001954a2a12d3790d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/04717bf1b9b9ac138edf5b9001954a2a12d3790d/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
self.channel_count = codec_param.info.channel_count
self.channel_count = codec_param.info.channel_cnt
def __init__(self, codec_info, codec_param): self.name = codec_info.id self.priority = codec_info.priority self.clock_rate = codec_param.info.clock_rate self.channel_count = codec_param.info.channel_count self.avg_bps = codec_param.info.avg_bps self.frm_ptime = codec_param.info.frm_ptime self.ptime = codec_param.info.frm_ptime * \ codec_param.setting.frm_per_pkt self.ptime = codec_param.info.pt self.vad_enabled = codec_param.setting.vad self.plc_enabled = codec_param.setting.plc
ab3b8bde18a012a34991ed441fb38c325cb113ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4447/ab3b8bde18a012a34991ed441fb38c325cb113ab/pjsua.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9196, 67, 1376, 16, 9196, 67, 891, 4672, 365, 18, 529, 273, 9196, 67, 1376, 18, 350, 365, 18, 8457, 273, 9196, 67, 1376, 18, 8457, 365, 18, 18517, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9196, 67, 1376, 16, 9196, 67, 891, 4672, 365, 18, 529, 273, 9196, 67, 1376, 18, 350, 365, 18, 8457, 273, 9196, 67, 1376, 18, 8457, 365, 18, 18517, 67, ...
control.style, control.styles = self.styles([], defaultControlStyle)
control.style, control.styles = self.styles([], thisDefaultStyle) if self.token==",": self.getToken() control.styleEx, control.stylesEx = self.styles([], defaultControlStyleEx)
def controls(self, dlg): if self.token=="BEGIN": self.getToken() while self.token!="END": control = ControlDef() control.controlType = self.token; #print self.token self.getToken() if self.token[0:1]=='"': control.label = self.token[1:-1] self.getCommaToken() self.getToken() elif self.token.isdigit(): control.label = self.token self.getCommaToken() self.getToken() # msvc seems to occasionally replace "IDC_STATIC" with -1 if self.token=='-': if self.getToken() != '1': raise RuntimeError, \ "Negative literal in rc script (other than -1) - don't know what to do" self.token = "IDC_STATIC" control.id = self.token control.idNum = self.addId(control.id) self.getCommaToken() if control.controlType == "CONTROL": self.getToken() control.subType = self.token[1:-1] # Styles self.getCommaToken() self.getToken() control.style, control.styles = self.styles([], defaultControlStyle) #self.getToken() #, # Rect control.x = int(self.getToken()) self.getCommaToken() control.y = int(self.getToken()) self.getCommaToken() control.w = int(self.getToken()) self.getCommaToken() self.getToken() control.h = int(self.token) self.getToken() if self.token==",": self.getToken() control.style, control.styles = self.styles([], defaultControlStyle) #print control.toString() dlg.controls.append(control)
6607b8df7f10522d254a3356f18efd66dfcaef31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/6607b8df7f10522d254a3356f18efd66dfcaef31/win32rcparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11022, 12, 2890, 16, 25840, 4672, 309, 365, 18, 2316, 31713, 16061, 6877, 365, 18, 588, 1345, 1435, 1323, 365, 18, 2316, 5, 1546, 4415, 6877, 3325, 273, 8888, 3262, 1435, 3325, 18, 7098,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11022, 12, 2890, 16, 25840, 4672, 309, 365, 18, 2316, 31713, 16061, 6877, 365, 18, 588, 1345, 1435, 1323, 365, 18, 2316, 5, 1546, 4415, 6877, 3325, 273, 8888, 3262, 1435, 3325, 18, 7098,...
sage: print {L : 0}
sage: {L : 0}
def set_immutable(self): """ A latin square is immutable if the underlying matrix is immutable.
0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 381, 5146, 12, 2890, 4672, 3536, 432, 30486, 8576, 353, 11732, 309, 326, 6808, 3148, 353, 11732, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 381, 5146, 12, 2890, 4672, 3536, 432, 30486, 8576, 353, 11732, 309, 326, 6808, 3148, 353, 11732, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if diffhelpers.testhunk(old, self.lines, start) == 0:
if self.skew == 0 and diffhelpers.testhunk(old, self.lines, start) == 0:
def apply(self, h): if not h.complete(): raise PatchError(_("bad hunk #%d %s (%d %d %d %d)") % (h.number, h.desc, len(h.a), h.lena, len(h.b), h.lenb))
0f196125119ac38a360d5bcd5231bc8a0e967297 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/0f196125119ac38a360d5bcd5231bc8a0e967297/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 366, 4672, 309, 486, 366, 18, 6226, 13332, 1002, 12042, 668, 24899, 2932, 8759, 366, 1683, 31974, 72, 738, 87, 6142, 72, 738, 72, 738, 72, 738, 72, 2225, 13, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 366, 4672, 309, 486, 366, 18, 6226, 13332, 1002, 12042, 668, 24899, 2932, 8759, 366, 1683, 31974, 72, 738, 87, 6142, 72, 738, 72, 738, 72, 738, 72, 2225, 13, 738, ...
fmts = self.db.FIELD_MAP['formats']
fmts = FM['formats']
def stanza(self, search=None, sortby=None, authorid=None, tagid=None, seriesid=None, offset=0): 'Feeds to read calibre books on a ipod with stanza.' books = [] updated = self.db.last_modified() offset = int(offset) cherrypy.response.headers['Last-Modified'] = self.last_modified(updated) cherrypy.response.headers['Content-Type'] = 'text/xml' # Main feed if not sortby and not search and not authorid and not tagid and not seriesid: return self.stanza_main(updated) if sortby in ('byseries', 'byauthor', 'bytag'): return self.stanza_sortby_subcategory(updated, sortby, offset)
37bfe8109d9f641424f8ff122cea79b8ee9f279e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/37bfe8109d9f641424f8ff122cea79b8ee9f279e/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21650, 12, 2890, 16, 1623, 33, 7036, 16, 1524, 1637, 33, 7036, 16, 2869, 350, 33, 7036, 16, 1047, 350, 33, 7036, 16, 4166, 350, 33, 7036, 16, 1384, 33, 20, 4672, 296, 8141, 87, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21650, 12, 2890, 16, 1623, 33, 7036, 16, 1524, 1637, 33, 7036, 16, 2869, 350, 33, 7036, 16, 1047, 350, 33, 7036, 16, 4166, 350, 33, 7036, 16, 1384, 33, 20, 4672, 296, 8141, 87, 358, ...
def testEcho (self):
def test_echo(self): """Basic test of an SSL client connecting to a server"""
def testEcho (self):
cb62a4cb12d8f0f9904d111d93c76ea857434a52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/cb62a4cb12d8f0f9904d111d93c76ea857434a52/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 19704, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 19704, 261, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if self.entry.flags() & gtk.HAS_FOCUS == True and intfocus == False: x -= focus_width y -= focus_width width += 2 * focus_width height += 2 * focus_width
if self.entry.flags() & gtk.HAS_FOCUS == gtk.HAS_FOCUS and intfocus == False: x -= focuswidth y -= focuswidth width += 2 * focuswidth height += 2 * focuswidth
def __cb_expose(self, widget, data): "Draws the widget borders on expose"
38cfd53714c267fc1dad586b6f8ccc61c6d58cd1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/38cfd53714c267fc1dad586b6f8ccc61c6d58cd1/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 7358, 67, 338, 4150, 12, 2890, 16, 3604, 16, 501, 4672, 315, 25113, 326, 3604, 24028, 603, 15722, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 7358, 67, 338, 4150, 12, 2890, 16, 3604, 16, 501, 4672, 315, 25113, 326, 3604, 24028, 603, 15722, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
output = [""] * 18
cols = Columns(18)
def shlomif_main(args): print_ts = 0 if (args[1] == "-t"): print_ts = 1 args.pop(0) game_num = long(args[1]) if (len(args) >= 3): which_game = args[2] else: which_game = "freecell" game_chooser = WhichGame() game_class = game_chooser.lookup(which_game) if ((which_game == "der_katz") or (which_game == "der_katzenschwantz") or (which_game == "die_schlange") or (which_game == "gypsy")): orig_cards = createCards(2, print_ts) else: orig_cards = createCards(1, print_ts) if game_num <= 32000: r = LCRandom31() r.setSeed(game_num) fcards = [] if (len(orig_cards) == 52): for i in range(13): for j in (0, 39, 26, 13): fcards.append(orig_cards[i + j]) orig_cards = fcards r.shuffle(orig_cards) else: r = LCRandom64() r.setSeed(game_num) r.shuffle(orig_cards) cards = [] for i in range(len(orig_cards)): cards.append(orig_cards[len(orig_cards)-i-1]) if game_class == "der_katz": if (which_game == "die_schlange"): print "Foundations: H-A S-A D-A C-A H-A S-A D-A C-A" output = "" for card in cards: if ((card & 0x0F) == 13): print output output = "" if (not((which_game == "die_schlange") and ((card & 0x0F) == 1))): if (output != ""): output = output + " " output = output + card.to_s(1) print output elif game_class == "freecell": freecells = [] cols = Columns(8); if ((which_game == "forecell") or (which_game == "eight_off")): for i in range(52): if (i < 48): cols.add(i%8, cards[i]) else: if (which_game == "forecell"): freecells.append(cards[i]) else: freecells.append(cards[i]) else: for i in range(52): cols.add(i%8, cards[i]) if ((which_game == "forecell") or (which_game == "eight_off")): print_freecells(freecells) cols.output(); elif game_class == "seahaven": freecells = [] cols = Columns(10) freecells.append(empty_card()) for i in range(52): if (i < 50): cols.add(i%10, cards[i]) else: freecells.append(cards[i]) print_freecells(freecells) cols.output() elif game_class == "bakers_dozen": i, n = 0, 13 kings = [] cards.reverse() for c in cards: if c.is_king(): kings.append(i) i = i + 1 for i in kings: j = i % n while j < i: if not cards[j].is_king(): cards[i], cards[j] = cards[j], cards[i] break j = j + n cols = Columns(13) for i in range(52): cols.add(i%13, cards[i]) cols.output() elif game_class == "gypsy": output = range(8); for i in range(8): output[i] = "" for i in range(24): output[i%8] = output[i%8] + cards[i].to_s() if (i < 16): output[i%8] = output[i%8] + " " talon = "Talon:" for i in range(24,8*13): talon = talon + " " + cards[i].to_s() print talon for i in range(8): print output[i] elif game_class == "klondike": #o = "" #for i in cards: # o = o + " " + i.to_s() #print o output = range(7); for i in range(7): output[i] = "" card_num = 0 for r in range(1,7): for s in range(7-r): output[s] = output[s] + cards[card_num].to_s() card_num = card_num + 1 for s in range(7): output[s] = output[s] + cards[card_num].to_s() card_num = card_num + 1 talon = "Talon: " while card_num < 52: talon = talon + cards[card_num].to_s() card_num = card_num + 1 print talon if (not (which_game == "small_harp")): output.reverse(); for i in output: print i elif game_class == "simple_simon": card_num = 0 cols = Columns(10) num_cards = 9 while num_cards >= 3: for s in range(num_cards): cols.add(s, cards[card_num]) card_num = card_num + 1 num_cards = num_cards - 1 for s in range(10): cols.add(s, cards[card_num]) card_num = card_num + 1 cols.output() elif game_class == "yukon": card_num = 0 output = range(7) for i in range(7): output[i] = "" for i in range(1, 7): for j in range(i, 7): output[j] = output[j] + cards[card_num].to_s() card_num = card_num + 1 for i in range(4): for j in range(1,7): output[j] = output[j] + cards[card_num].to_s() card_num = card_num + 1 for i in range(7): output[i] = output[i] + cards[card_num].to_s() card_num = card_num + 1 for i in output: print i elif game_class == "beleaguered_castle": if (which_game == "beleaguered_castle") or (which_game == "citadel"): new_cards = [] for c in cards: if (c & 0x0F != 1): new_cards.append(c) cards = new_cards; output = range(8) for i in range(8): output[i] = "" card_num = 0 if (which_game == "beleaguered_castle") or (which_game == "citadel"): foundations = [1,1,1,1] else: foundations = [0,0,0,0] for i in range(6): for s in range(8): if (which_game == "citadel"): if (foundations[cards[card_num] >> 4]+1 == (cards[card_num] & 0x0F)): foundations[cards[card_num] >> 4] = foundations[cards[card_num] >> 4] + 1; card_num = card_num + 1 continue output[s] = output[s] + cards[card_num].to_s() card_num = card_num + 1 if (card_num == len(cards)): break if (which_game == "streets_and_alleys"): for s in range(4): output[s] = output[s] + " " + cards[card_num].to_s() card_num = card_num + 1 f_str = "Foundations:" for f in [2,0,3,1]: if (foundations[f] != 0): f_str = f_str + " " + get_card_suit(f) + "-" + get_card_num(foundations[f]) if (f_str != "Foundations:"): print f_str for i in output: print i elif game_class == "fan": output = [""] * 18 for i in range(52-1): output[i%17] = output[i%17] + cards[i].to_s() output[17] = output[17] + cards[i+1].to_s(); for i in output: print i else: print "Unknown game type " + which_game + "\n"
4dc67ff01e485de10dd8b31089e52a02e7f542a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2756/4dc67ff01e485de10dd8b31089e52a02e7f542a4/make_pysol_freecell_board.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 699, 80, 362, 430, 67, 5254, 12, 1968, 4672, 1172, 67, 3428, 273, 374, 309, 261, 1968, 63, 21, 65, 422, 3701, 88, 6, 4672, 1172, 67, 3428, 273, 404, 833, 18, 5120, 12, 20, 13, 7920...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 699, 80, 362, 430, 67, 5254, 12, 1968, 4672, 1172, 67, 3428, 273, 374, 309, 261, 1968, 63, 21, 65, 422, 3701, 88, 6, 4672, 1172, 67, 3428, 273, 404, 833, 18, 5120, 12, 20, 13, 7920...
dbg("bits = %s" % repr(bits))
ddbg("bits = %s" % repr(bits))
def parse_telnet(self, data): odata = data data = re.sub(BareLF, '\\1', data) data = data.replace('\015\000', '') data = data.replace('\000', '')
528aaa06b6d1da43df857560969166229ecd0f23 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1032/528aaa06b6d1da43df857560969166229ecd0f23/debugserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 19261, 2758, 12, 2890, 16, 501, 4672, 320, 892, 273, 501, 501, 273, 283, 18, 1717, 12, 31242, 9105, 16, 3718, 21, 2187, 501, 13, 501, 273, 501, 18, 2079, 2668, 64, 1611, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 19261, 2758, 12, 2890, 16, 501, 4672, 320, 892, 273, 501, 501, 273, 283, 18, 1717, 12, 31242, 9105, 16, 3718, 21, 2187, 501, 13, 501, 273, 501, 18, 2079, 2668, 64, 1611, 25...
self.assertEqual(p.ppid, 0)
self.assertTrue(p.ppid in (0, 1))
def test_pid_0(self): # Process(0) is supposed to work on all platforms even if with # some differences p = psutil.Process(0) if WINDOWS: self.assertEqual(p.name, 'System Idle Process') elif LINUX: self.assertEqual(p.name, 'sched') elif BSD: self.assertEqual(p.name, 'swapper') elif OSX: self.assertEqual(p.name, 'kernel_task')
efaff43ee063317b59131fcf5773d186f744f464 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7296/efaff43ee063317b59131fcf5773d186f744f464/test_psutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6610, 67, 20, 12, 2890, 4672, 468, 4389, 12, 20, 13, 353, 18405, 358, 1440, 603, 777, 17422, 5456, 309, 598, 468, 2690, 16440, 293, 273, 27024, 18, 2227, 12, 20, 13, 309, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6610, 67, 20, 12, 2890, 4672, 468, 4389, 12, 20, 13, 353, 18405, 358, 1440, 603, 777, 17422, 5456, 309, 598, 468, 2690, 16440, 293, 273, 27024, 18, 2227, 12, 20, 13, 309, 2...
def gaussian_binomial(n,k,q):
def gaussian_binomial(n,k,q=None):
def gaussian_binomial(n,k,q): r""" Return the gaussian binomial $$ \binom{n}{k}_q = \frac{(1-q^m)(1-q^{m-1})\cdots (1-q^{m-r+1})} {(1-q)(1-q^2)\cdots (1-q^r)}. $$ EXAMPLES: sage: gaussian_binomial(5,1,2) 31 AUTHOR: David Joyner and William Stein """ n = integer_ring.ZZ(misc.prod([1 - q**i for i in range((n-k+1),n+1)])) d = integer_ring.ZZ(misc.prod([1 - q**i for i in range(1,k+1)])) return n / d
c9a0605a9346b0ae7e5c2960e6b36593a0c8f095 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/c9a0605a9346b0ae7e5c2960e6b36593a0c8f095/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21490, 67, 4757, 11496, 12, 82, 16, 79, 16, 85, 33, 7036, 4672, 436, 8395, 2000, 326, 21490, 4158, 11496, 5366, 521, 4757, 362, 95, 82, 8637, 79, 9044, 85, 273, 521, 22187, 95, 12, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21490, 67, 4757, 11496, 12, 82, 16, 79, 16, 85, 33, 7036, 4672, 436, 8395, 2000, 326, 21490, 4158, 11496, 5366, 521, 4757, 362, 95, 82, 8637, 79, 9044, 85, 273, 521, 22187, 95, 12, 2...
field = str(message.get_payload())
field = self.__get_body(message)
def get_messages(self):
a3b48f3ff1e058545c86b5f6370bb7be548abfcd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10886/a3b48f3ff1e058545c86b5f6370bb7be548abfcd/analyzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6833, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6833, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
instr = project.JokosherObjectFromString("I" + self.instr_id)
instr = project.JokosherObjectFromString("I" + str(self.instr_id))
def Execute(self, project): instr = project.JokosherObjectFromString("I" + self.instr_id) instr.addEventFromURL(self.event_start, self.url)
68f561deef28b6cb0ef8d9cff44db074cd30b067 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10033/68f561deef28b6cb0ef8d9cff44db074cd30b067/IncrementalSave.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 12, 2890, 16, 1984, 4672, 16170, 273, 1984, 18, 46, 601, 538, 1614, 921, 9193, 2932, 45, 6, 397, 609, 12, 2890, 18, 267, 701, 67, 350, 3719, 16170, 18, 1289, 1133, 1265, 1785, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 12, 2890, 16, 1984, 4672, 16170, 273, 1984, 18, 46, 601, 538, 1614, 921, 9193, 2932, 45, 6, 397, 609, 12, 2890, 18, 267, 701, 67, 350, 3719, 16170, 18, 1289, 1133, 1265, 1785, ...
param_nodes[param].insert(1, nodes.Text(' (%s)' % type))
param_nodes[param][1:1] = type
def handle_doc_fields(node, env): # don't traverse, only handle field lists that are immediate children for child in node.children: if not isinstance(child, nodes.field_list): continue params = None param_nodes = {} param_types = {} new_list = nodes.field_list() for field in child: fname, fbody = field try: typ, obj = fname.astext().split(None, 1) typdesc = _(doc_fields_with_arg[typ]) if len(fbody.children) == 1 and \ isinstance(fbody.children[0], nodes.paragraph): children = fbody.children[0].children else: children = fbody.children if typdesc == '%param': if not params: pfield = nodes.field() pfield += nodes.field_name('', _('Parameters')) pfield += nodes.field_body() params = nodes.bullet_list() pfield[1] += params new_list += pfield dlitem = nodes.list_item() dlpar = nodes.paragraph() dlpar += nodes.emphasis(obj, obj) dlpar += nodes.Text(' -- ', ' -- ') dlpar += children param_nodes[obj] = dlpar dlitem += dlpar params += dlitem elif typdesc == '%type': param_types[obj] = fbody.astext() else: fieldname = typdesc + ' ' nfield = nodes.field() nfieldname = nodes.field_name(fieldname, fieldname) nfield += nfieldname node = nfieldname if typ in doc_fields_with_linked_arg: node = addnodes.pending_xref(obj, reftype='obj', refcaption=False, reftarget=obj, modname=env.currmodule, classname=env.currclass) nfieldname += node node += nodes.Text(obj, obj) nfield += nodes.field_body() nfield[1] += fbody.children new_list += nfield except (KeyError, ValueError): fnametext = fname.astext() try: typ = _(doc_fields_without_arg[fnametext]) except KeyError: # at least capitalize the field name typ = fnametext.capitalize() fname[0] = nodes.Text(typ) new_list += field for param, type in param_types.iteritems(): if param in param_nodes: param_nodes[param].insert(1, nodes.Text(' (%s)' % type)) child.replace_self(new_list)
44b0929669b2fd7992ebda4e1d4e70134e3cb50e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5532/44b0929669b2fd7992ebda4e1d4e70134e3cb50e/desc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2434, 67, 2821, 12, 2159, 16, 1550, 4672, 468, 2727, 1404, 10080, 16, 1338, 1640, 652, 6035, 716, 854, 14483, 2325, 364, 1151, 316, 756, 18, 5906, 30, 309, 486, 1549, 12, 362...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2434, 67, 2821, 12, 2159, 16, 1550, 4672, 468, 2727, 1404, 10080, 16, 1338, 1640, 652, 6035, 716, 854, 14483, 2325, 364, 1151, 316, 756, 18, 5906, 30, 309, 486, 1549, 12, 362...
f(1, 2, 3, *UserList([4, 5])
f(1, 2, 3, *UserList([4, 5]))
def h(j=1, a=2, h=3): print j, a, h
003663d78372a33ddbc57594d0176fa39996a84d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/003663d78372a33ddbc57594d0176fa39996a84d/test_extcall.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 12, 78, 33, 21, 16, 279, 33, 22, 16, 366, 33, 23, 4672, 1172, 525, 16, 279, 16, 366, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 12, 78, 33, 21, 16, 279, 33, 22, 16, 366, 33, 23, 4672, 1172, 525, 16, 279, 16, 366, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Die('Missing stable ebuild in %s' % root)
Die('Missing stable ebuild in %s' % os.path.dirname(path))
def _FindStableEBuilds(files): """Return a list of stable ebuilds from specified list of files. Args: files: List of files. """ workon_dir = False stable_ebuilds = [] unstable_ebuilds = [] for path in files: if path.endswith('.ebuild') and not os.path.islink(path): ebuild = _EBuild(path) if ebuild.is_workon: workon_dir = True if ebuild.is_stable: stable_ebuilds.append(ebuild) else: unstable_ebuilds.append(ebuild) # If we found a workon ebuild in this directory, apply some sanity checks. if workon_dir: if len(unstable_ebuilds) > 1: Die('Found multiple unstable ebuilds in %s' % root) if len(stable_ebuilds) > 1: stable_ebuilds = [_BestEBuild(stable_ebuilds)] # Print a warning if multiple stable ebuilds are found in the same # directory. Storing multiple stable ebuilds is error-prone because # the older ebuilds will not get rev'd. # # We make a special exception for x11-drivers/xf86-video-msm for legacy # reasons. if stable_ebuilds[0].package != 'x11-drivers/xf86-video-msm': Warning('Found multiple stable ebuilds in %s' % root) if not unstable_ebuilds: Die('Missing 9999 ebuild in %s' % root) if not stable_ebuilds: Die('Missing stable ebuild in %s' % root) if stable_ebuilds: return stable_ebuilds[0] else: return None
804ad7df2772bbb0df99bab523e0e6acca66ef39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/804ad7df2772bbb0df99bab523e0e6acca66ef39/cros_mark_as_stable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3125, 30915, 41, 7746, 12, 2354, 4672, 3536, 990, 279, 666, 434, 14114, 425, 27324, 628, 1269, 666, 434, 1390, 18, 225, 6634, 30, 1390, 30, 987, 434, 1390, 18, 3536, 1440, 265, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3125, 30915, 41, 7746, 12, 2354, 4672, 3536, 990, 279, 666, 434, 14114, 425, 27324, 628, 1269, 666, 434, 1390, 18, 225, 6634, 30, 1390, 30, 987, 434, 1390, 18, 3536, 1440, 265, 67...
handle_unknown_callback(url)
if url == None: handle_unknown_callback(old_url) else: handle_unknown_callback(url)
def _callback(url, contentType="video/flv", additional=additional): if url: if additional == None: additional = {"title": url} entry = _build_entry(url, contentType, additional) download_video(entry) return
9dd655a19b63594510e3c23c3362648d0210922b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/9dd655a19b63594510e3c23c3362648d0210922b/singleclick.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3394, 12, 718, 16, 5064, 1546, 9115, 19, 2242, 90, 3113, 3312, 33, 13996, 4672, 309, 880, 30, 309, 3312, 422, 599, 30, 3312, 273, 12528, 2649, 6877, 880, 97, 1241, 273, 389, 3510,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3394, 12, 718, 16, 5064, 1546, 9115, 19, 2242, 90, 3113, 3312, 33, 13996, 4672, 309, 880, 30, 309, 3312, 422, 599, 30, 3312, 273, 12528, 2649, 6877, 880, 97, 1241, 273, 389, 3510,...
if not sp['pbid']
if not sp['pbid']:
def OnJ(self, action, data, match=None): # COD4 stores the PBID in the log file codguid = match.group('guid') cid = match.group('cid') pbid = ''
7a14beb2f2a2a264c31dfddc4f567e1e7fadd345 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12909/7a14beb2f2a2a264c31dfddc4f567e1e7fadd345/cod4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 46, 12, 2890, 16, 1301, 16, 501, 16, 845, 33, 7036, 4672, 468, 385, 1212, 24, 9064, 326, 20819, 734, 316, 326, 613, 585, 11012, 14066, 273, 845, 18, 1655, 2668, 14066, 6134, 7504...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 46, 12, 2890, 16, 1301, 16, 501, 16, 845, 33, 7036, 4672, 468, 385, 1212, 24, 9064, 326, 20819, 734, 316, 326, 613, 585, 11012, 14066, 273, 845, 18, 1655, 2668, 14066, 6134, 7504...
def is_isomorphic(self, other, proof=False):
def is_isomorphic(self, other, proof=False, verbosity=0):
def is_isomorphic(self, other, proof=False): """ Tests for isomorphism between self and other. INPUT: proof -- if True, then output is (a,b), where a is a boolean and b is either a map or None. EXAMPLES: sage: D = graphs.DodecahedralGraph() sage: E = D.copy() sage: gamma = SymmetricGroup(20).random_element() sage: E.relabel(gamma) sage: D.is_isomorphic(E) True
d67a023472152bc59356bb215a37f04255fdd99a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/d67a023472152bc59356bb215a37f04255fdd99a/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 291, 362, 18435, 12, 2890, 16, 1308, 16, 14601, 33, 8381, 16, 11561, 33, 20, 4672, 3536, 7766, 87, 364, 353, 362, 7657, 6228, 3086, 365, 471, 1308, 18, 225, 12943, 30, 14601, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 291, 362, 18435, 12, 2890, 16, 1308, 16, 14601, 33, 8381, 16, 11561, 33, 20, 4672, 3536, 7766, 87, 364, 353, 362, 7657, 6228, 3086, 365, 471, 1308, 18, 225, 12943, 30, 14601, ...
sage: r.install_package('Hmisc')
sage: r.install_package('Hmisc')
def install_packages(self, package_name): """ Install an R package into Sage's R installation.
f1cd5773fe3e88b0bf0433c53477cfdf6c99bd08 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/f1cd5773fe3e88b0bf0433c53477cfdf6c99bd08/r.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 10308, 12, 2890, 16, 2181, 67, 529, 4672, 3536, 10284, 392, 534, 2181, 1368, 348, 410, 1807, 534, 13193, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 10308, 12, 2890, 16, 2181, 67, 529, 4672, 3536, 10284, 392, 534, 2181, 1368, 348, 410, 1807, 534, 13193, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return http.Response(stream=msg)
return HTMLResponse(stream=msg)
def render(self, ctx): id = self.id(ctx)
86a4ed9cb0aba48a11523b820246bf1c9d9e7be2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/86a4ed9cb0aba48a11523b820246bf1c9d9e7be2/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 612, 273, 365, 18, 350, 12, 5900, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 612, 273, 365, 18, 350, 12, 5900, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
cache['%s.metadata' % name] = self.build_metadata(csv)
cache['%s.metadata' % name] = csv.build_metadata()
def new(self, **kw): Folder.new(self, **kw) cache = self.cache # Versions csv = Versions() csv.add_row([u'1.0', False]) csv.add_row([u'2.0', False]) cache['versions.csv'] = csv cache['versions.csv.metadata'] = self.build_metadata(csv) # Other Tables tables = [ ('modules.csv', [u'Documentation', u'Unit Tests', u'Programming Interface', u'Command Line Interface', u'Visual Interface']), ('types.csv', [u'Bug', u'New Feature', u'Security Issue', u'Stability Issue', u'Data Corruption Issue', u'Performance Improvement', u'Technology Upgrade']), ('priorities.csv', [u'High', u'Medium', u'Low']), ('states.csv', [u'Open', u'Fixed', u'Closed'])] for name, values in tables: csv = SelectTable() cache[name] = csv for title in values: csv.add_row([title]) cache['%s.metadata' % name] = self.build_metadata(csv) # Pre-defined stored searches open = StoredSearch(state=0) not_assigned = StoredSearch(assigned_to='nobody') high_priority = StoredSearch(state=0, priority=0) i = 0 for search, title in [(open, u'Open Issues'), (not_assigned, u'Not Assigned'), (high_priority, u'High Priority')]: cache['s%s' % i] = search kw = {} kw['dc:title'] = {'en': title} cache['s%s.metadata' % i] = self.build_metadata(search, **kw) i += 1
3ce933dd0b6747a9c5ebd6aa6765fb94fdde695f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/3ce933dd0b6747a9c5ebd6aa6765fb94fdde695f/tracker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 12, 2890, 16, 2826, 9987, 4672, 12623, 18, 2704, 12, 2890, 16, 2826, 9987, 13, 1247, 273, 365, 18, 2493, 468, 28375, 6101, 273, 28375, 1435, 6101, 18, 1289, 67, 492, 3816, 89, 11,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 12, 2890, 16, 2826, 9987, 4672, 12623, 18, 2704, 12, 2890, 16, 2826, 9987, 13, 1247, 273, 365, 18, 2493, 468, 28375, 6101, 273, 28375, 1435, 6101, 18, 1289, 67, 492, 3816, 89, 11,...
'dimension_id' : fields.many2one('product.variant.dimension.type', 'Dimension Type', required=True),
'dimension_id' : fields.many2one('product.variant.dimension.type', 'Dimension Type', required=True, ondelete='cascade'),
def _get_dimension_values(self, cr, uid, ids, context={}): result = [] for type in self.pool.get('product.variant.dimension.type').browse(cr, uid, ids, context=context): for value in type.value_ids: result.append(value.id) return result
0e9f365be05ba5ca53e4244892baa8af51ee98de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/0e9f365be05ba5ca53e4244892baa8af51ee98de/product_variant.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 11808, 67, 2372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 563, 273, 5378, 364, 618, 316, 365, 18, 6011, 18, 588, 2668, 5896, 18, 8688, 18, 11808, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 11808, 67, 2372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 563, 273, 5378, 364, 618, 316, 365, 18, 6011, 18, 588, 2668, 5896, 18, 8688, 18, 11808, 1...
("'", "''"),
("'", "\\'"),
def __repr__(self): if self: return 'TRUE' else: return 'FALSE'
a42ecfcfa92d15402aa126c87c2444aecc3f0d56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/a42ecfcfa92d15402aa126c87c2444aecc3f0d56/converters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 309, 365, 30, 327, 296, 18724, 11, 469, 30, 327, 296, 21053, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 309, 365, 30, 327, 296, 18724, 11, 469, 30, 327, 296, 21053, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if not self.tabnanny(filename): return
def run_module_event(self, event): """Run the module after setting up the environment.
8b7d4d0720f57ab71fcbeeaf0f212a5931f97365 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8b7d4d0720f57ab71fcbeeaf0f212a5931f97365/ScriptBinding.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 2978, 67, 2575, 12, 2890, 16, 871, 4672, 3536, 1997, 326, 1605, 1839, 3637, 731, 326, 3330, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 2978, 67, 2575, 12, 2890, 16, 871, 4672, 3536, 1997, 326, 1605, 1839, 3637, 731, 326, 3330, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
val[0] = -bernoulli(k) / (2*k) R = QQ[['q']]
val[0] = a0 R = K[['q']]
def eisenstein_series_qexp(k, prec=10, K=QQ): r""" Return the $q$-expansion of the weight $k$ Eisenstein series to precision prec in the field $K$. Here's a rough description of how the algorithm works: we know $E_k = const + \sum_n sigma(n,k-1) q^n$. Now, we basically just compute all the $\sigma(n,k-1)$ simultaneously, as $\sigma$ is multiplicative. INPUT: k -- even positive integer prec -- nonnegative integer K -- a ring in which B_k/(2*k) is invertible EXAMPLES: sage: eisenstein_series_qexp(2,5) -1/24 + q + 3*q^2 + 4*q^3 + 7*q^4 + O(q^5) sage: eisenstein_series_qexp(2,0) O(q^0) AUTHORS: -- William Stein: original implementation -- Craig Citro (2007-06-01): rewrote for massive speedup """ k = Integer(k) if k%2 or k < 2: raise ValueError, "k (=%s) must be an even positive integer"%k prec = int(prec) if prec < 0: raise ValueError, "prec (=%s) must be an even nonnegative integer"%prec if (prec == 0): R = QQ[['q']] return R(0).add_bigoh(0) one = Integer(1) val = [one] * prec expt = k - one for p in prime_range(1,prec): int_p = int(p) ppow = int_p mult = p**expt term = mult*mult last = mult while (ppow < prec): ind = ppow while (ind < prec): val[ind] = (val[ind]*(term-one)).divide_knowing_divisible_by(last - one) ind += ppow ppow *= int_p last = term term *= mult val[0] = -bernoulli(k) / (2*k) R = QQ[['q']] return R(val, prec=prec, check=False)
ae0a4f1be121d0b5cd96f36d12d796a7dabacb15 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/ae0a4f1be121d0b5cd96f36d12d796a7dabacb15/eis_series.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 291, 275, 334, 13685, 67, 10222, 67, 85, 2749, 12, 79, 16, 13382, 33, 2163, 16, 1475, 33, 53, 53, 4672, 436, 8395, 2000, 326, 271, 85, 8, 17, 2749, 12162, 434, 326, 3119, 271, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 291, 275, 334, 13685, 67, 10222, 67, 85, 2749, 12, 79, 16, 13382, 33, 2163, 16, 1475, 33, 53, 53, 4672, 436, 8395, 2000, 326, 271, 85, 8, 17, 2749, 12162, 434, 326, 3119, 271, ...
Def atlas():
def atlas():
def cblas(): if os.environ.has_key('SAGE_CBLAS'): return os.environ['SAGE_CBLAS'] elif os.path.exists('/usr/lib/libcblas.dylib') or \ os.path.exists('/usr/lib/libcblas.so'): return 'cblas' elif os.path.exists('/usr/lib/libblas.dll.a'): # untested. return 'blas' else: # This is very slow (?), but *guaranteed* to be available. return 'gslcblas'
a1b917785f1b5c11013b680adff924e809dcf296 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a1b917785f1b5c11013b680adff924e809dcf296/cython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 9521, 13332, 309, 1140, 18, 28684, 18, 5332, 67, 856, 2668, 55, 2833, 67, 8876, 2534, 55, 11, 4672, 327, 1140, 18, 28684, 3292, 55, 2833, 67, 8876, 2534, 55, 3546, 1327, 1140, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 9521, 13332, 309, 1140, 18, 28684, 18, 5332, 67, 856, 2668, 55, 2833, 67, 8876, 2534, 55, 11, 4672, 327, 1140, 18, 28684, 3292, 55, 2833, 67, 8876, 2534, 55, 3546, 1327, 1140, 18...
self.body.append('\n\\end{verbatim}\\end{quote}\n')
self.body.append('\n\\end{verbatim}')
def depart_literal_block(self, node): if self.verbatim: self.body.append('\n\\end{verbatim}\\end{quote}\n') self.verbatim = 0 else: if self.active_table.is_open(): self.body.append('\n}\n') else: self.body.append('\n') self.body.append('}\\end{quote}\n') self.insert_none_breaking_blanks = 0 self.literal_block = 0 # obey end: self.body.append('}\n')
194c1c0447cd76e9f3c993ca97a602b255db1e68 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1278/194c1c0447cd76e9f3c993ca97a602b255db1e68/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 13107, 67, 2629, 12, 2890, 16, 756, 4672, 309, 365, 18, 16629, 22204, 30, 365, 18, 3432, 18, 6923, 2668, 64, 82, 1695, 409, 95, 16629, 22204, 1713, 13, 365, 18, 16629, 22204...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 13107, 67, 2629, 12, 2890, 16, 756, 4672, 309, 365, 18, 16629, 22204, 30, 365, 18, 3432, 18, 6923, 2668, 64, 82, 1695, 409, 95, 16629, 22204, 1713, 13, 365, 18, 16629, 22204...
gLogger.info("Succeded setting request for %s at %s" % (requestName,status,url)) result["Server"] = url return result
gLogger.info("Succeded setting request for %s at %s" % (requestName,url)) res["Server"] = url return res
def setRequest(self,requestType,requestName,requestString,requestStatus='ToDo',url=''): """ Set request. URL can be supplied if not a all VOBOXes will be tried in random order. """ try: urls = [] if url: urls[url] urls.append(self.voBoxUrls) for url in urls: requestRPCClient = DISETClient(url) res = requestRPCClient.setRequest(requestType,requestName,requestStatus,requestString) if res['OK']: gLogger.info("Succeded setting request for %s at %s" % (requestName,status,url)) result["Server"] = url return result else: errKey = "Failed setting request at %s" % url errExpl = " : for %s because: %s" % (requestName,res['Message']) gLogger.error(errKey,errExpl) errKey = "Completely failed setting request" errExpl = " : %s\n%s\n%s" % (requestName,requestType,requestString) gLogger.fatal(errKey,errExpl) return S_ERROR(errKey) except Exception,x: errKey = "Completely failed setting request" errExpl = " : for %s with exception %s" % (requestName,str(x)) gLogger.exception(errKey,errExpl) return S_ERROR(errKey)
e04ab9ecb893477f9aaadb286d4551c45f21c342 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/e04ab9ecb893477f9aaadb286d4551c45f21c342/Request.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12475, 12, 2890, 16, 2293, 559, 16, 2293, 461, 16, 2293, 780, 16, 2293, 1482, 2218, 774, 3244, 2187, 718, 2218, 11, 4672, 3536, 1000, 590, 18, 1976, 848, 506, 4580, 309, 486, 279, 777,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12475, 12, 2890, 16, 2293, 559, 16, 2293, 461, 16, 2293, 780, 16, 2293, 1482, 2218, 774, 3244, 2187, 718, 2218, 11, 4672, 3536, 1000, 590, 18, 1976, 848, 506, 4580, 309, 486, 279, 777,...
scripts.append('ipython/kernel/scripts/ipengine') scripts.append('ipython/kernel/scripts/ipcontroller') scripts.append('ipython/kernel/scripts/ipcluster')
scripts.append('IPython/kernel/scripts/ipengine') scripts.append('IPython/kernel/scripts/ipcontroller') scripts.append('IPython/kernel/scripts/ipcluster')
def find_scripts(): """ Find IPython's scripts. """ scripts = [] scripts.append('ipython/kernel/scripts/ipengine') scripts.append('ipython/kernel/scripts/ipcontroller') scripts.append('ipython/kernel/scripts/ipcluster') scripts.append('scripts/ipython') scripts.append('scripts/pycolor') scripts.append('scripts/irunner') # Script to be run by the windows binary installer after the default setup # routine, to add shortcuts and similar windows-only things. Windows # post-install scripts MUST reside in the scripts/ dir, otherwise distutils # doesn't find them. if 'bdist_wininst' in sys.argv: if len(sys.argv) > 2 and ('sdist' in sys.argv or 'bdist_rpm' in sys.argv): print >> sys.stderr,"ERROR: bdist_wininst must be run alone. Exiting." sys.exit(1) scripts.append('scripts/ipython_win_post_install.py') return scripts
cc85cf9653b5f504575fc93af200f0c652f87faa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3900/cc85cf9653b5f504575fc93af200f0c652f87faa/setupbase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 12827, 13332, 3536, 4163, 26085, 1807, 8873, 18, 3536, 8873, 273, 5378, 8873, 18, 6923, 2668, 2579, 18490, 19, 8111, 19, 12827, 19, 625, 8944, 6134, 8873, 18, 6923, 2668, 2579, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 12827, 13332, 3536, 4163, 26085, 1807, 8873, 18, 3536, 8873, 273, 5378, 8873, 18, 6923, 2668, 2579, 18490, 19, 8111, 19, 12827, 19, 625, 8944, 6134, 8873, 18, 6923, 2668, 2579, ...
name=self.datetimeimplemenation)
name=self.datetimeimplementation)
def _readDateTimeFromForm(self, instance, form, fieldname): date = form.get('%s_date' % fieldname) time = form.get('%s_time' % fieldname) tzinfo = ITimezoneFactory(instance) try: value = IIntelliDateTime(self).convert(date, time=time, locale='de', tzinfo=tzinfo) except DateTimeConversionError, e: return None # correct DST, dont add one hour! value = value.replace(tzinfo=tzinfo.normalize(value).tzinfo) print fieldname, self.datetimeimplementation value = queryAdapter(value, IDateTimeImplementation, name=self.datetimeimplemenation) return value
7366077cf6ac44467bfbe258082843235ed38e4b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5657/7366077cf6ac44467bfbe258082843235ed38e4b/widget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 5096, 1265, 1204, 12, 2890, 16, 791, 16, 646, 16, 14680, 4672, 1509, 273, 646, 18, 588, 29909, 87, 67, 712, 11, 738, 14680, 13, 813, 273, 646, 18, 588, 29909, 87, 67, 957, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 5096, 1265, 1204, 12, 2890, 16, 791, 16, 646, 16, 14680, 4672, 1509, 273, 646, 18, 588, 29909, 87, 67, 712, 11, 738, 14680, 13, 813, 273, 646, 18, 588, 29909, 87, 67, 957, ...
knownempties=["rfc", "declaremodule", "appendix",
knownempties=["appendix",
def main(): if len(sys.argv) == 2: ifp = open(sys.argv[1]) ofp = sys.stdout elif len(sys.argv) == 3: ifp = open(sys.argv[1]) ofp = open(sys.argv[2], "w") else: usage() sys.exit(2) convert(ifp, ofp, { # entries are name # -> ([list of attribute names], first_is_optional, empty) "cfuncdesc": (["type", "name", ("args",)], 0, 0), "chapter": ([("title",)], 0, 0), "chapter*": ([("title",)], 0, 0), "classdesc": (["name", ("constructor-args",)], 0, 0), "ctypedesc": (["name"], 0, 0), "cvardesc": (["type", "name"], 0, 0), "datadesc": (["name"], 0, 0), "declaremodule": (["id", "type", "name"], 1, 1), "deprecated": (["release"], 0, 1), "documentclass": (["classname"], 0, 1), "excdesc": (["name"], 0, 0), "funcdesc": (["name", ("args",)], 0, 0), "funcdescni": (["name", ("args",)], 0, 0), "indexii": (["ie1", "ie2"], 0, 1), "indexiii": (["ie1", "ie2", "ie3"], 0, 1), "indexiv": (["ie1", "ie2", "ie3", "ie4"], 0, 1), "input": (["source"], 0, 1), "item": ([("leader",)], 1, 0), "label": (["id"], 0, 1), "manpage": (["name", "section"], 0, 1), "memberdesc": (["class", "name"], 1, 0), "methoddesc": (["class", "name", ("args",)], 1, 0), "methoddescni": (["class", "name", ("args",)], 1, 0), "opcodedesc": (["name", "var"], 0, 0), "par": ([], 0, 1), "rfc": (["number"], 0, 1), "section": ([("title",)], 0, 0), "seemodule": (["ref", "name"], 1, 0), "tableii": (["colspec", "style", "head1", "head2"], 0, 0), "tableiii": (["colspec", "style", "head1", "head2", "head3"], 0, 0), "tableiv": (["colspec", "style", "head1", "head2", "head3", "head4"], 0, 0), "versionadded": (["version"], 0, 1), "versionchanged": (["version"], 0, 1), # "ABC": "ABC", "ASCII": "ASCII", "C": "C", "Cpp": "Cpp", "EOF": "EOF", "e": "backslash", "ldots": "ldots", "NULL": "NULL", "POSIX": "POSIX", "UNIX": "Unix", # # Things that will actually be going away! # "fi": ([], 0, 1), "ifhtml": ([], 0, 1), "makeindex": ([], 0, 1), "makemodindex": ([], 0, 1), "maketitle": ([], 0, 1), "noindent": ([], 0, 1), "tableofcontents": ([], 0, 1), }, discards=["fi", "ifhtml", "makeindex", "makemodindex", "maketitle", "noindent", "tableofcontents"], autoclosing=["chapter", "section", "subsection", "subsubsection", "paragraph", "subparagraph", ], knownempties=["rfc", "declaremodule", "appendix", "maketitle", "makeindex", "makemodindex", "localmoduletable", "manpage", "input"])
177c5005c27b072f67098dea66be9f3528dd0fe8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/177c5005c27b072f67098dea66be9f3528dd0fe8/latex2esis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 562, 12, 9499, 18, 19485, 13, 422, 576, 30, 309, 84, 273, 1696, 12, 9499, 18, 19485, 63, 21, 5717, 434, 84, 273, 2589, 18, 10283, 1327, 562, 12, 9499, 18, 19485, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 562, 12, 9499, 18, 19485, 13, 422, 576, 30, 309, 84, 273, 1696, 12, 9499, 18, 19485, 63, 21, 5717, 434, 84, 273, 2589, 18, 10283, 1327, 562, 12, 9499, 18, 19485, 13...
raise NameError, "ERROR: problems in output stage-out"
raise NameError, "ERROR: problems in output stage-out. Could not read output file: '%s'" % output_files_orig[i]
def findsetype(sitesrm): setype= 'NULL' if sitesrm.find('castor')>=0: setype = 'CASTOR' elif sitesrm.find('dpm')>=0: setype = 'DPM' elif sitesrm.find('pnfs')>=0: setype = 'DCACHE' elif sitesrm.find('/nfs/')>=0: setype = 'NFS' return setype
d7bfe8937a92ce862fafbd3d61f42398155a5dc8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/d7bfe8937a92ce862fafbd3d61f42398155a5dc8/ganga-stage-in-out-dq2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 542, 388, 12, 12180, 8864, 4672, 444, 388, 33, 296, 8560, 11, 225, 309, 9180, 8864, 18, 4720, 2668, 4155, 280, 6134, 34, 33, 20, 30, 444, 388, 273, 296, 21871, 916, 11, 1327, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 542, 388, 12, 12180, 8864, 4672, 444, 388, 33, 296, 8560, 11, 225, 309, 9180, 8864, 18, 4720, 2668, 4155, 280, 6134, 34, 33, 20, 30, 444, 388, 273, 296, 21871, 916, 11, 1327, 9...
band_num = int(argv[i+1])
band_nums.append( int(argv[i+1]) )
def Usage(): print 'Usage: gdal2xyz.py [-skip factor] [-srcwin xoff yoff width height]' print ' [-band b] srcfile [dstfile]' print sys.exit( 1 )
1751af84fcb417916499ba1d8ab65443a46d0eba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10290/1751af84fcb417916499ba1d8ab65443a46d0eba/gdal2xyz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10858, 13332, 1172, 296, 5357, 30, 15551, 287, 22, 17177, 18, 2074, 23059, 7457, 5578, 65, 23059, 4816, 8082, 619, 3674, 677, 3674, 1835, 2072, 3864, 1172, 296, 10402, 23059, 12752, 324, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10858, 13332, 1172, 296, 5357, 30, 15551, 287, 22, 17177, 18, 2074, 23059, 7457, 5578, 65, 23059, 4816, 8082, 619, 3674, 677, 3674, 1835, 2072, 3864, 1172, 296, 10402, 23059, 12752, 324, 6...
runner.run(self._dt_test, out=nooutput)
runner.run(self._dt_test)
def debug(self): r"""Run the test case without results and without catching exceptions
cbc966784c40379a497d47f64c6966c873b21087 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cbc966784c40379a497d47f64c6966c873b21087/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 12, 2890, 4672, 436, 8395, 1997, 326, 1842, 648, 2887, 1686, 471, 2887, 1044, 310, 4798, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 12, 2890, 4672, 436, 8395, 1997, 326, 1842, 648, 2887, 1686, 471, 2887, 1044, 310, 4798, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Lose(1)
self.Lose(1)
def loop (self): isSig=0 if (self.you.isNull()): self.Lose (1) return if (self.arrived==3): if (not self.istarget): curun=VS.getUnit(self.curiter) if (self.enemy): if (curun==self.enemy): self.enemy.setTarget(self.you) self.curiter+=1 if (you.isNull()): self.Lose(1) return if (self.enemy.isNull()): self.Win(you,1) return elif (self.arrived==2): if (VS.getSystemFile()==self.adjsys.DestinationSystem()): self.arrived=3 else: VS.ResetTimeCompression() if (self.you.isNull()): Lose(1) return if (self.enemy.isNull()): Win(you,1) return elif (self.arrived==1): significant=self.significant if (significant.isNull ()): print "sig null" VS.terminateMission(0) else: if (you.getSignificantDistance(significant)<10000.0): if (self.newship==""): self.newship=faction_ships.getRandomFighter(faction) self.enemy=launch.launch_wave_around_unit("Base",self.faction,self.newship,"default",1+self.difficulty,3000.0,4000.0,self.significant) if (self.enemy): if (runaway): self.enemy.setTarget(significant) self.enemy.Jump() self.arrived=2 else: self.arrived=3 else: if (self.adjsys.Execute()): self.arrived=1 self.newship=faction_ships.getRandomFighter(faction) localdestination=self.significant.getName() self.adjsys=go_somewhere_significant(self.you,0,500) VS.IOmessage (0,"bounty mission",self.mplay,"You must destroy the %s unit in this system." % (self.newship)) self.obj=VS.addObjective("Destroy the %s unit" % (self.newship)) if (runaway): #ADD OTHER JUMPING IF STATEMENT CODE HERE VS.IOmessage (3,"bounty mission",self.mplay,"He is running towards the jump point. Catch him!") VS.IOmessage (4,"bounty mission",self.mplay,"he is going to %s" % (localdestination)) else: VS.IOmessage (3,"bounty mission",self.mplay,"Scanners are picking up a metallic object!") VS.IOmessage (4,"bounty mission",self.mplay,"Coordinates appear near %s" % (localdestination))
a537f39c17600bf6b993994cfcfafc164c3f274f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/a537f39c17600bf6b993994cfcfafc164c3f274f/bounty.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 261, 2890, 4672, 353, 8267, 33, 20, 309, 261, 2890, 18, 19940, 18, 291, 2041, 1435, 4672, 365, 18, 1504, 307, 261, 21, 13, 327, 309, 261, 2890, 18, 5399, 2950, 631, 23, 4672, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 261, 2890, 4672, 353, 8267, 33, 20, 309, 261, 2890, 18, 19940, 18, 291, 2041, 1435, 4672, 365, 18, 1504, 307, 261, 21, 13, 327, 309, 261, 2890, 18, 5399, 2950, 631, 23, 4672, 3...
def _check_for_process(self):
def _check_for_process(self):
def _check_for_process(self):
125d57cee90301b91158819cfcabe18e45c6fae4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1563/125d57cee90301b91158819cfcabe18e45c6fae4/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 1884, 67, 2567, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 1884, 67, 2567, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.bugzilla.updatecc(self.bug_id,cclist,'delete',comment)
self.bugzilla._updatecc(self.bug_id,cclist,'delete',comment)
def deletecc(self,cclist,comment=''): '''Removes the given email addresses from the CC list for this bug.''' self.bugzilla.updatecc(self.bug_id,cclist,'delete',comment)
4162cd637465b4ab492822d2673ed0761ced06e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5050/4162cd637465b4ab492822d2673ed0761ced06e4/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6578, 24410, 12, 2890, 16, 71, 830, 376, 16, 3469, 2218, 11, 4672, 9163, 6220, 326, 864, 2699, 6138, 628, 326, 16525, 666, 364, 333, 7934, 1093, 6309, 365, 18, 925, 15990, 18, 2725, 95...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6578, 24410, 12, 2890, 16, 71, 830, 376, 16, 3469, 2218, 11, 4672, 9163, 6220, 326, 864, 2699, 6138, 628, 326, 16525, 666, 364, 333, 7934, 1093, 6309, 365, 18, 925, 15990, 18, 2725, 95...
req.hdf.setValue('ticket.changes.%d.new' % idx, wiki_to_html(new, req.hdf, self.env, self.db))
changes[-1]['comment'] = wiki_to_html(new, req.hdf, self.env, self.db) elif field == 'description': changes[-1]['fields'][field] = {}
def insert_ticket_data(self, req, id, ticket, reporter_id): """Insert ticket data into the hdf""" evals = util.mydict(zip(ticket.keys(), map(lambda x: util.escape(x), ticket.values()))) util.add_to_hdf(evals, req.hdf, 'ticket')
5af93da622cd2c46b60f11ea1671d6da1dbfaf15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/5af93da622cd2c46b60f11ea1671d6da1dbfaf15/Ticket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 16282, 67, 892, 12, 2890, 16, 1111, 16, 612, 16, 9322, 16, 11528, 67, 350, 4672, 3536, 4600, 9322, 501, 1368, 326, 24217, 8395, 22654, 273, 1709, 18, 4811, 1576, 12, 4450, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 16282, 67, 892, 12, 2890, 16, 1111, 16, 612, 16, 9322, 16, 11528, 67, 350, 4672, 3536, 4600, 9322, 501, 1368, 326, 24217, 8395, 22654, 273, 1709, 18, 4811, 1576, 12, 4450, 12...
ctx_model = context.get('model', None) ctx_res_id = context.get('res_id', None)
ctx_model = context.get('model', None) ctx_res_id = context.get('res_id', None)
def export_cal(self, cr, uid, ids, vobj='vevent', context=None): """ Export Calendar @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of calendar’s IDs @param context: A standard dictionary for contextual values """ if not context: context = {} ctx_model = context.get('model', None) ctx_res_id = context.get('res_id', None) ical = vobject.iCalendar() for cal in self.browse(cr, uid, ids): for line in cal.line_ids: if ctx_model and ctx_model != line.object_id.model: continue if line.name in ('valarm', 'attendee'): continue domain = eval(line.domain) if ctx_res_id: domain += [('id','=',ctx_res_id)] mod_obj = self.pool.get(line.object_id.model) data_ids = mod_obj.search(cr, uid, domain, context=context) datas = mod_obj.read(cr, uid, data_ids, context=context) context.update({'model': line.object_id.model, 'calendar_id': cal.id }) self.__attribute__ = get_attribute_mapping(cr, uid, line.name, context) self.create_ics(cr, uid, datas, line.name, ical, context=context) return ical.serialize()
1263dd94aec18dc93f2c1301bed8d5db4810ef61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1263dd94aec18dc93f2c1301bed8d5db4810ef61/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 771, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 331, 2603, 2218, 537, 616, 2187, 819, 33, 7036, 4672, 3536, 11054, 5542, 632, 891, 365, 30, 1021, 733, 4407, 632, 891, 4422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 771, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 331, 2603, 2218, 537, 616, 2187, 819, 33, 7036, 4672, 3536, 11054, 5542, 632, 891, 365, 30, 1021, 733, 4407, 632, 891, 4422, ...