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
self._close_to_level(close_to)
def finish_starttag(self, tag, attrs): self.scan_xmlns(attrs) if tag in EMPTY_HTML_TAGS: print "<%s>" % tag self.pop_xmlns() elif tag in CLOSING_BLOCK_LEVEL_HTML_TAGS: close_to = -1 for i in range(len(self.tagstack)): t = self.tagstack[i] if t in CLOSING_BLOCK_LEVEL_HTML_TAGS: close_to = i elif t in BLOCK_LEVEL_HTML_TAGS: close_to = -1 self._close_to_level(close_to) self.tagstack.append(tag) elif tag in PARA_LEVEL_HTML_TAGS + BLOCK_LEVEL_HTML_TAGS: close_to = -1 for i in range(len(self.tagstack)): if self.tagstack[i] in BLOCK_LEVEL_HTML_TAGS: close_to = -1 elif self.tagstack[i] in PARA_LEVEL_HTML_TAGS: if close_to == -1: close_to = i self.tagstack.append(tag) self._close_to_level(close_to) else: self.tagstack.append(tag) self.gen.emitStartTag(tag, attrs)
8d8e57a51c5bd48a4a4d431cc457cd206866ad79 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8d8e57a51c5bd48a4a4d431cc457cd206866ad79/HTMLTALParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 1937, 2692, 12, 2890, 16, 1047, 16, 3422, 4672, 365, 18, 9871, 67, 16741, 12, 7039, 13, 309, 1047, 316, 8984, 67, 4870, 67, 29915, 30, 1172, 3532, 9, 87, 2984, 738, 1047, 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, 4076, 67, 1937, 2692, 12, 2890, 16, 1047, 16, 3422, 4672, 365, 18, 9871, 67, 16741, 12, 7039, 13, 309, 1047, 316, 8984, 67, 4870, 67, 29915, 30, 1172, 3532, 9, 87, 2984, 738, 1047, 3...
self.points = orangemds.FloatListList(matrixmultiply(Ut,Dt))
self.points = orange.FloatListList(matrixmultiply(Ut,Dt))
def Torgerson(self): # Torgerson's initial approximation O=array([m for m in self.distances]) B = matrixmultiply(O,O) # double-center B cavg = sum(B)/(self.n+0.0) # column sum ravg = sum(B,1)/(self.n+0.0) # row sum tavg = sum(cavg)/(self.n+0.0) # total sum # B[row][column] for i in xrange(self.n): for j in xrange(self.n): B[i][j] += -cavg[j]-ravg[i] B = -0.5*(B+tavg)
c474478c97cb0593e748e02c9775117c045b1180 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/c474478c97cb0593e748e02c9775117c045b1180/orngMDS.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 399, 3341, 3565, 12, 2890, 4672, 468, 399, 3341, 3565, 1807, 2172, 24769, 531, 33, 1126, 3816, 81, 364, 312, 316, 365, 18, 25834, 5717, 605, 273, 3148, 7027, 1283, 12, 51, 16, 51, 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, 399, 3341, 3565, 12, 2890, 4672, 468, 399, 3341, 3565, 1807, 2172, 24769, 531, 33, 1126, 3816, 81, 364, 312, 316, 365, 18, 25834, 5717, 605, 273, 3148, 7027, 1283, 12, 51, 16, 51, 13, ...
label = "Stack %s" % os.path.basename(fitsNoExt),
label = ing_label,
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'] ) tagid = g.con.insert_id() else: tagid = res[0][0] g.setTableName('youpi_rel_tagi') g.insert(image_id = imageId, tag_id = tagid) # 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
77bc1bab697b9a405a53c05f33cb1b5adbc547da /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/77bc1bab697b9a405a53c05f33cb1b5adbc547da/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...
def __init__(self, func = list.append, start = lambda: [], bucket = None, reduce = 0):
def __init__(self, func = lambda lst, val: lst.append(val) or lst, start = lambda: [], bucket = None, reduce = 1):
def __init__(self, func = list.append, start = lambda: [], bucket = None, reduce = 0): if not bucket: bucket = id(self) self.bucket = str(bucket) self.start = start self.func = func self.reduce = reduce
de18f32a9b8f70faab51a8b069912c20d375f284 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/de18f32a9b8f70faab51a8b069912c20d375f284/flow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1326, 273, 3195, 9441, 16, 1244, 30, 9441, 18, 6923, 12, 1125, 13, 578, 9441, 16, 787, 273, 3195, 30, 5378, 16, 2783, 273, 599, 16, 5459, 273, 404, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1326, 273, 3195, 9441, 16, 1244, 30, 9441, 18, 6923, 12, 1125, 13, 578, 9441, 16, 787, 273, 3195, 30, 5378, 16, 2783, 273, 599, 16, 5459, 273, 404, 467...
infile, outfile, errfile = os.popen3(command + ' ' + args, mode)
infile, outfile, errfile, kid = open_pipe(command + ' ' + args, mode)
def spawn_process(command, binary_mode=0,stdin_lines=None, *varargs): args = ' '.join(map(_quote_arg, varargs)) # Log the command line if verbose_mode: print 'CMD:', os.path.basename(command) + ' ' + args, if binary_mode: mode = 'b' else: mode = 't' infile, outfile, errfile = os.popen3(command + ' ' + args, mode) if stdin_lines: map(infile.write, stdin_lines) infile.close() stdout_lines = outfile.readlines() stderr_lines = errfile.readlines() outfile.close() errfile.close() exit_code = 0 if platform_with_os_wait: pid, wait_code = os.wait() if os.WIFSIGNALED(wait_code): exit_signal = os.WTERMSIG(wait_code) sys.stdout.write("".join(stdout_lines)) sys.stderr.write("".join(stderr_lines)) if verbose_mode: # show the whole path to make it easier to start a debugger sys.stderr.write("CMD: %s terminated by signal %d\n" % (command, exit_signal)) raise SVNProcessTerminatedBySignal else: exit_code = os.WEXITSTATUS(wait_code) if exit_code and verbose_mode: sys.stderr.write("CMD: %s exited with %d\n" % (command, exit_code)) return exit_code, stdout_lines, stderr_lines
fc4c6af27dc5cac46541286b147d6239dcd54ef9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1387/fc4c6af27dc5cac46541286b147d6239dcd54ef9/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12560, 67, 2567, 12, 3076, 16, 3112, 67, 3188, 33, 20, 16, 21772, 67, 3548, 33, 7036, 16, 380, 1401, 1968, 4672, 833, 273, 296, 2418, 5701, 12, 1458, 24899, 6889, 67, 3175, 16, 19732, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12560, 67, 2567, 12, 3076, 16, 3112, 67, 3188, 33, 20, 16, 21772, 67, 3548, 33, 7036, 16, 380, 1401, 1968, 4672, 833, 273, 296, 2418, 5701, 12, 1458, 24899, 6889, 67, 3175, 16, 19732, ...
topics = forum.topics.order_by('-sticky').select_related()
topics = forum.topics.order_by('-sticky', '-updated').select_related()
def show_forum(request, forum_id, full=True): forum = Forum.objects.get(pk=forum_id) if not forum.category.has_access(request.user): return HttpResponseForbidden() topics = forum.topics.order_by('-sticky').select_related() moderator = request.user.is_superuser or\ request.user in forum.moderators.all() if full: return {'categories': Category.objects.all(), 'forum': forum, 'topics': topics, 'paged_qs': topics, 'posts': forum.posts.count(), 'topics': forum.topics.count(), 'moderator': moderator, } else: pages, paginator, paged_list_name = paginate(topics, request, forum_settings.FORUM_PAGE_SIZE) return {'categories': Category.objects.all(), 'forum': forum, 'posts': forum.posts.count(), 'moderator': moderator, 'pages': pages, 'paginator': paginator, 'topics': paged_list_name, }, 'forum/lofi/forum.html'
a77209fb52c1606e6e7b39d7ce49d0ab215dd725 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13701/a77209fb52c1606e6e7b39d7ce49d0ab215dd725/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 11725, 12, 2293, 16, 11283, 67, 350, 16, 1983, 33, 5510, 4672, 11283, 273, 2457, 379, 18, 6911, 18, 588, 12, 5465, 33, 11725, 67, 350, 13, 309, 486, 11283, 18, 4743, 18, 53...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2405, 67, 11725, 12, 2293, 16, 11283, 67, 350, 16, 1983, 33, 5510, 4672, 11283, 273, 2457, 379, 18, 6911, 18, 588, 12, 5465, 33, 11725, 67, 350, 13, 309, 486, 11283, 18, 4743, 18, 53...
security.declareProtected(ManagePortal, 'manage_overview')
security.declareProtected(ManagePortal, 'setExpirationTimeout')
def resetPassword(self, userid, randomstring, password): """Set the password (in 'password') for the user who maps to the string in 'randomstring' iff the entered 'userid' is equal to the mapped userid. (This can be turned off with the 'toggleUserCheck' method.)
efe2f15e5c766d88f8c869bfb357a6d093527b8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12219/efe2f15e5c766d88f8c869bfb357a6d093527b8e/PasswordResetTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 3913, 12, 2890, 16, 6709, 16, 2744, 1080, 16, 2201, 4672, 3536, 694, 326, 2201, 261, 267, 296, 3664, 6134, 364, 326, 729, 10354, 7565, 358, 326, 533, 316, 296, 9188, 1080, 11, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2715, 3913, 12, 2890, 16, 6709, 16, 2744, 1080, 16, 2201, 4672, 3536, 694, 326, 2201, 261, 267, 296, 3664, 6134, 364, 326, 729, 10354, 7565, 358, 326, 533, 316, 296, 9188, 1080, 11, 21...
self.assertEqual(-(0x7fffffff), -2147483647)
if platform_long_is_32_bits: self.assertEqual(-(0x7fffffff), -2147483647) else: self.assertEqual(-(0x7fffffffffffffff), -9223372036854775807)
def test_hex_baseline(self): # Baseline tests self.assertEqual(0x0, 0) self.assertEqual(0x10, 16) self.assertEqual(0x7fffffff, 2147483647) # Ditto with a minus sign and parentheses self.assertEqual(-(0x0), 0) self.assertEqual(-(0x10), -16) self.assertEqual(-(0x7fffffff), -2147483647) # Ditto with a minus sign and NO parentheses self.assertEqual(-0x0, 0) self.assertEqual(-0x10, -16) self.assertEqual(-0x7fffffff, -2147483647)
9b3db2c2c77b9dc37cb1cf9e9135dfe7bfec4d7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9b3db2c2c77b9dc37cb1cf9e9135dfe7bfec4d7c/test_hexoct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7118, 67, 27818, 12, 2890, 4672, 468, 605, 345, 3027, 7434, 365, 18, 11231, 5812, 12, 20, 92, 20, 16, 374, 13, 365, 18, 11231, 5812, 12, 20, 92, 2163, 16, 2872, 13, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7118, 67, 27818, 12, 2890, 4672, 468, 605, 345, 3027, 7434, 365, 18, 11231, 5812, 12, 20, 92, 20, 16, 374, 13, 365, 18, 11231, 5812, 12, 20, 92, 2163, 16, 2872, 13, 365, ...
def setStartByte (self, fullTextLine): charsBeforeThisItem = fullTextLine[:self.startCharOnLine]
def setStartByte (self, visibleTextLine): charsBeforeThisItem = visibleTextLine[:self.startCharOnLine]
def setStartByte (self, fullTextLine): charsBeforeThisItem = fullTextLine[:self.startCharOnLine] self.startByteOnLine = len (charsBeforeThisItem.encode ('utf-8'))
94c1886b22a74c09d75be95009f161fc58142c71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9028/94c1886b22a74c09d75be95009f161fc58142c71/candy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18171, 3216, 261, 2890, 16, 6021, 1528, 1670, 4672, 5230, 4649, 2503, 1180, 273, 6021, 1528, 1670, 10531, 2890, 18, 1937, 2156, 1398, 1670, 65, 365, 18, 1937, 3216, 1398, 1670, 273, 562, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18171, 3216, 261, 2890, 16, 6021, 1528, 1670, 4672, 5230, 4649, 2503, 1180, 273, 6021, 1528, 1670, 10531, 2890, 18, 1937, 2156, 1398, 1670, 65, 365, 18, 1937, 3216, 1398, 1670, 273, 562, ...
sizeof_char = ctypes.sizeof(ctypes.c_char)
sizeof_char = ctypes.sizeof(ctypes.c_char)
def GetLogicalDriveStringsA(): _GetLogicalDriveStringsA = ctypes.windll.kernel32.GetLogicalDriveStringsA _GetLogicalDriveStringsA.argtypes = [DWORD, LPSTR] _GetLogicalDriveStringsA.restype = DWORD _GetLogicalDriveStringsA.errcheck = RaiseIfZero nBufferLength = (4 * 26) + 1 # "X:\\\0" from A to Z plus empty string lpBuffer = ctypes.create_string_buffer('', nBufferLength) _GetLogicalDriveStringsA(nBufferLength, lpBuffer) drive_strings = list() string_p = ctypes.addressof(lpBuffer) sizeof_char = ctypes.sizeof(ctypes.c_char) while True: string_v = ctypes.string_at(string_p) if string_v == '': break drive_strings.append(string_v) string_p += len(string_v) + sizeof_char return drive_strings
f98c5847265f8281bb0afcc54b3b41c478c6e292 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7261/f98c5847265f8281bb0afcc54b3b41c478c6e292/kernel32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 17955, 24681, 7957, 37, 13332, 389, 967, 17955, 24681, 7957, 37, 273, 6983, 18, 10094, 2906, 18, 8111, 1578, 18, 967, 17955, 24681, 7957, 37, 389, 967, 17955, 24681, 7957, 37, 18, 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, 968, 17955, 24681, 7957, 37, 13332, 389, 967, 17955, 24681, 7957, 37, 273, 6983, 18, 10094, 2906, 18, 8111, 1578, 18, 967, 17955, 24681, 7957, 37, 389, 967, 17955, 24681, 7957, 37, 18, 3...
_verify('TWOPI', 6.28318530718)
_verify('TWOPI', TWOPI, 6.28318530718)
def _verify(name, expected): computed = eval(name) if abs(computed - expected) > 1e-7: raise ValueError( "computed value for %s deviates too much " "(computed %g, expected %g)" % (name, computed, expected))
a48e62f725c02cd10574520450468099787abd11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a48e62f725c02cd10574520450468099787abd11/random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8705, 12, 529, 16, 2665, 4672, 8470, 273, 5302, 12, 529, 13, 309, 2417, 12, 20307, 300, 2665, 13, 405, 404, 73, 17, 27, 30, 1002, 2068, 12, 315, 20307, 460, 364, 738, 87, 27492,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8705, 12, 529, 16, 2665, 4672, 8470, 273, 5302, 12, 529, 13, 309, 2417, 12, 20307, 300, 2665, 13, 405, 404, 73, 17, 27, 30, 1002, 2068, 12, 315, 20307, 460, 364, 738, 87, 27492,...
while current_rev:
while current_rev is not None:
def sync(self): self.log.debug("Checking whether sync with repository is needed") youngest_stored = self.repos.get_youngest_rev_in_cache(self.db) if youngest_stored != str(self.repos.youngest_rev): kindmap = dict(zip(_kindmap.values(), _kindmap.keys())) actionmap = dict(zip(_actionmap.values(), _actionmap.keys())) self.log.info("Syncing with repository (%s to %s)" % (youngest_stored, self.repos.youngest_rev)) cursor = self.db.cursor() if youngest_stored: current_rev = self.repos.next_rev(youngest_stored) else: current_rev = self.repos.oldest_rev while current_rev: changeset = self.repos.get_changeset(current_rev) cursor.execute("INSERT INTO revision (rev,time,author,message) " "VALUES (%s,%s,%s,%s)", (current_rev, changeset.date, changeset.author, changeset.message)) for path,kind,action,base_path,base_rev in changeset.get_changes(): self.log.debug("Caching node change in [%s]: %s" % (current_rev, (path, kind, action, base_path, base_rev))) kind = kindmap[kind] action = actionmap[action] cursor.execute("INSERT INTO node_change (rev,path,kind," "change,base_path,base_rev) " "VALUES (%s,%s,%s,%s,%s,%s)", (current_rev, path, kind, action, base_path, base_rev)) current_rev = self.repos.next_rev(current_rev) self.db.commit()
7641a2c84ff6f0f1fd03c5cf238e6e2f29a67bcd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/7641a2c84ff6f0f1fd03c5cf238e6e2f29a67bcd/cache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 12, 2890, 4672, 365, 18, 1330, 18, 4148, 2932, 14294, 2856, 3792, 598, 3352, 353, 3577, 7923, 677, 465, 17592, 67, 22601, 273, 365, 18, 15564, 18, 588, 67, 93, 465, 17592, 67, 90...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3792, 12, 2890, 4672, 365, 18, 1330, 18, 4148, 2932, 14294, 2856, 3792, 598, 3352, 353, 3577, 7923, 677, 465, 17592, 67, 22601, 273, 365, 18, 15564, 18, 588, 67, 93, 465, 17592, 67, 90...
def guessedBefore(phenny,input):
def guessedBefore(phenny,input,exact=False):
def guessedBefore(phenny,input): guesses = phenny.wordsplay['used'] for word in guesses: if input in word: return True return False
3a49895979cb8c2fbde4983b5839d2449dac650c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12838/3a49895979cb8c2fbde4983b5839d2449dac650c/wordsplay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3058, 281, 730, 4649, 12, 13819, 18538, 16, 2630, 16, 17165, 33, 8381, 4672, 7274, 281, 273, 21484, 18538, 18, 3753, 1601, 3292, 3668, 3546, 364, 2076, 316, 7274, 281, 30, 309, 810, 316,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3058, 281, 730, 4649, 12, 13819, 18538, 16, 2630, 16, 17165, 33, 8381, 4672, 7274, 281, 273, 21484, 18538, 18, 3753, 1601, 3292, 3668, 3546, 364, 2076, 316, 7274, 281, 30, 309, 810, 316,...
self.quiz = Weighted_Quiz(self.quizlist)
self.quiz = Weighted_Quiz(self.quizlist, score)
def __init__(self): xml = gtk.glade.XML(self.GLADE_FILE, "main_window", APP) gw = xml.get_widget ## widgets self.main_window = gw("main_window") self.word_treeview = gw("word_treeview") self.multi_answer_vbuttonbox = gw("multi_answer_vbuttonbox") self.simple_answer_entry = gw("simple_answer_entry") self.multi_question_label = gw("multi_question_label") self.simple_question_label = gw("simple_question_label") self.multi_question_buttons = [ gw("button11"), gw("button12"), gw("button13"), gw("button14"), gw("button15"), gw("button16"), gw("button17") ] self.simple_question_button = gw("simple_question_button") self.progressbar1 = gw("progressbar1") self.subquiz_combobox = gw("subquiz_combobox") ### start quiz self.read_quiz_list(self.quiz_file_path) self.quiz = Weighted_Quiz(self.quizlist) self.next_question() ## signals xml.signal_autoconnect(self)
f83347779c866b85d5ee11731f0644ad6d72119f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2313/f83347779c866b85d5ee11731f0644ad6d72119f/quizdrill.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2025, 273, 22718, 18, 7043, 2486, 18, 4201, 12, 2890, 18, 43, 2534, 1639, 67, 3776, 16, 315, 5254, 67, 5668, 3113, 9146, 13, 14662, 273, 2025, 18, 588,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 2025, 273, 22718, 18, 7043, 2486, 18, 4201, 12, 2890, 18, 43, 2534, 1639, 67, 3776, 16, 315, 5254, 67, 5668, 3113, 9146, 13, 14662, 273, 2025, 18, 588,...
superinit(description=description)
superinit()
def __init__(self, description, conflict_handler): superinit = super(_ActionsContainer, self).__init__ superinit(description=description)
ed38c580bae46dac2535cb285657374fcafb401e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9086/ed38c580bae46dac2535cb285657374fcafb401e/argparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2477, 16, 7546, 67, 4176, 4672, 2240, 2738, 273, 2240, 24899, 6100, 2170, 16, 365, 2934, 972, 2738, 972, 2240, 2738, 12, 3384, 33, 3384, 13, 2, 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, 1, 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, 2738, 972, 12, 2890, 16, 2477, 16, 7546, 67, 4176, 4672, 2240, 2738, 273, 2240, 24899, 6100, 2170, 16, 365, 2934, 972, 2738, 972, 2240, 2738, 12, 3384, 33, 3384, 13, 2, -100, -10...
if (connectionProblem) and (CurrentBundle.nItems==0) and (response.get_code() == 0):
if (connectionProblem or HasMoreOutstandingRecord) and (CurrentBundle.nItems==0) and (response.get_code() == 0):
def Send(record): global failedSendCount global suppressedCount global successfulSendCount try: DebugPrint(0, "***********************************************************") DebugPrint(4, "DEBUG: In Send(record)") DebugPrint(4, "DEBUG: Printing record to send") record.Print() DebugPrint(4, "DEBUG: Printing record to send: OK") if (failedSendCount + len(OutstandingRecord)) >= Config.get_MaxPendingFiles(): responseString = "Fatal Error: too many pending files" DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString # Assemble the record into xml DebugPrint(4, "DEBUG: Creating XML") record.XmlCreate() DebugPrint(4, "DEBUG: Creating XML: OK") # Parse it into nodes, etc (transitional: this will eventually be native format) DebugPrint(4, "DEBUG: parsing XML") xmlDoc = safeParseXML(string.join(record.XmlData,"")) DebugPrint(4, "DEBUG: parsing XML: OK") if not xmlDoc: responseString = "Internal Error: cannot parse internally generated XML record" DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString DebugPrint(4, "DEBUG: Checking XML content") if not CheckXmlDoc(xmlDoc,False): DebugPrint(4, "DEBUG: Checking XML content: BAD") xmlDoc.unlink() responseString = "No unsuppressed usage records in this packet: not sending" suppressedCount += 1 DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString DebugPrint(4, "DEBUG: Checking XML content: OK") DebugPrint(4, "DEBUG: Normalizing XML document") xmlDoc.normalize() DebugPrint(4, "DEBUG: Normalizing XML document: OK") # Generate the XML DebugPrint(4, "DEBUG: Generating data to send") record.XmlData = safeEncodeXML(xmlDoc).splitlines(True) DebugPrint(4, "DEBUG: Generating data to send: OK") # Close and clean up the document2 xmlDoc.unlink() dirIndex = 0 success = False f = 0 DebugPrint(4, "DEBUG: Back up record to send") while not success: (f,dirIndex) = OpenNewRecordFile(dirIndex) DebugPrint(1,"Will save in the record in:",f.name) DebugPrint(3,"DirIndex=",dirIndex) if f.name != "<stdout>": try: for line in record.XmlData: f.write(line) f.flush() if f.tell() > 0: success = True DebugPrint(0, 'Saved record to ' + f.name) else: DebugPrint(0,"failed to fill: ",f.name) if f.name != "<stdout>": RemoveFile(f.name) f.close() except: DebugPrint(0,"failed to fill with exception: ",f.name,"--", sys.exc_info(),"--",sys.exc_info()[0],"++",sys.exc_info()[1]) DebugPrint(4, "DEBUG: Backing up record to send: OK") # Currently, the recordXml is in a list format, with each item being a line of xml. # the collector web service requires the xml to be sent as a string. # This logic here turns the xml list into a single xml string. usageXmlString = "" for line in record.XmlData: usageXmlString = usageXmlString + line DebugPrint(3, 'UsageXml: ' + usageXmlString) connectionProblem = (__connectionRetries > 0) or (__connectionError) if (BundleSize > 1 and f.name != "<stdout>"): # Delay the sending until we have 'bundleSize' records. (responseString, response) = CurrentBundle.addRecord(f.name, usageXmlString) else: # Attempt to send the record to the collector response = __sendUsageXML(Config.get_ProbeName(), usageXmlString) responseString = response.get_message() DebugPrint(0, 'Response code: ' + str(response.get_code())) DebugPrint(0, 'Response message: ' + response.get_message()) # Determine if the call was successful based on the response # code. Currently, 0 = success if response.get_code() == 0: DebugPrint(1, 'Response indicates success, ' + f.name + ' will be deleted') successfulSendCount += 1 RemoveFile(f.name) else: failedSendCount += 1 if (f.name == "<stdout>"): DebugPrint(0, 'Record send failed and no backup made: record lost!') responseString += "\nFatal: failed record lost!" match = re.search(r'^<(?:[^:]*:)?RecordIdentity.*/>$', usageXmlString, re.MULTILINE) if match: DebugPrint(0, match.group(0)) responseString += "\n", match.group(0) match = re.search(r'^<(?:[^:]*:)?GlobalJobId.*/>$', usageXmlString, re.MULTILINE) if match: DebugPrint(0, match.group(0)) responseString += "\n", match.group(0) responseString += "\n" + usageXmlString else: DebugPrint(1, 'Response indicates failure, ' + f.name + ' will not be deleted') DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") if (connectionProblem) and (CurrentBundle.nItems==0) and (response.get_code() == 0): # Reprocess failed records before attempting more new ones SearchOutstandingRecord() Reprocess() return responseString except Exception, e: DebugPrint (0, "ERROR: " + str(e) + " exception caught while processing record ") DebugPrint (0, " This record has been LOST") DebugPrintTraceback() return "ERROR: record lost due to internal error!"
afa5b9e606e09a707c71dbf4e8fb865d25aa5dd9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/637/afa5b9e606e09a707c71dbf4e8fb865d25aa5dd9/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2479, 12, 3366, 4672, 2552, 2535, 3826, 1380, 2552, 24448, 1380, 2552, 6873, 3826, 1380, 225, 775, 30, 4015, 5108, 12, 20, 16, 315, 5021, 19482, 636, 7388, 13, 4015, 5108, 12, 24, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2479, 12, 3366, 4672, 2552, 2535, 3826, 1380, 2552, 24448, 1380, 2552, 6873, 3826, 1380, 225, 775, 30, 4015, 5108, 12, 20, 16, 315, 5021, 19482, 636, 7388, 13, 4015, 5108, 12, 24, 16, ...
out += """<br>&nbsp;&nbsp;&nbsp; <a href="%s/admin/webaccess/">%s</a>""" % (weburl, _("Configure WebAccess"))
out += """<br>&nbsp;&nbsp;&nbsp; <a href="%s/admin/webaccess/?ln=%s">%s</a>""" % (weburl, ln, _("Configure WebAccess"))
def tmpl_account_adminactivities(self, ln, weburl, uid, guest, roles, activities): """ Displays the admin activities block for this user
3a0a1175062a33241e371559b1e5cbfaec2cd7e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/3a0a1175062a33241e371559b1e5cbfaec2cd7e9/websession_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 4631, 67, 3666, 24745, 12, 2890, 16, 7211, 16, 3311, 718, 16, 4555, 16, 13051, 16, 4900, 16, 17259, 4672, 3536, 9311, 87, 326, 3981, 17259, 1203, 364, 333, 729, 2, 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, 1, 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, 10720, 67, 4631, 67, 3666, 24745, 12, 2890, 16, 7211, 16, 3311, 718, 16, 4555, 16, 13051, 16, 4900, 16, 17259, 4672, 3536, 9311, 87, 326, 3981, 17259, 1203, 364, 333, 729, 2, -100, -10...
str = '' if width >= 9: names = day_name else: names = day_abbr for i in range(7): if str: str = str + ' ' str = str + _center(names[i%7][:width], width) return str def prmonth(year, month, w = 0, l = 0):
if width >= 9: names = day_name else: names = day_abbr days = [] for i in range(_firstweekday, _firstweekday + 7): days.append(_center(names[i%7][:width], width)) return ' '.join(days) def prmonth(theyear, themonth, w=0, l=0):
def weekheader(width): """Return a header for a week.""" str = '' if width >= 9: names = day_name else: names = day_abbr for i in range(7): if str: str = str + ' ' str = str + _center(names[i%7][:width], width) return str
ad3bc44d52b9b9c1f1c7449d0991138fed5fe978 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ad3bc44d52b9b9c1f1c7449d0991138fed5fe978/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4860, 3374, 12, 2819, 4672, 3536, 990, 279, 1446, 364, 279, 4860, 12123, 609, 273, 875, 309, 1835, 1545, 2468, 30, 1257, 273, 2548, 67, 529, 469, 30, 1257, 273, 2548, 67, 30754, 364, 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, 4860, 3374, 12, 2819, 4672, 3536, 990, 279, 1446, 364, 279, 4860, 12123, 609, 273, 875, 309, 1835, 1545, 2468, 30, 1257, 273, 2548, 67, 529, 469, 30, 1257, 273, 2548, 67, 30754, 364, 2...
if namespaces != []:
if namespaces:
def main(): template_names = [] resolve = False remove = False namespaces = [] customSummary = False editSummary = '' acceptAll = False # If xmlfilename is None, references will be loaded from the live wiki. xmlfilename = None new = None # read command line parameters for arg in wikipedia.handleArgs(): if arg == '-remove': remove = True elif arg.startswith('-xml'): if len(arg) == 4: xmlfilename = wikipedia.input(u'Please enter the XML dump\'s filename: ') else: xmlfilename = arg[5:] elif arg.startswith('-namespace:'): namespaces.append(int(arg[len('-namespace:'):])) elif arg.startswith('-summary:'): customSummary = True editSummary = arg[len('-summary:'):] elif arg.startswith('-always'): acceptAll = True else: template_names.append(arg) if len(template_names) == 0 or len(template_names) > 2: wikipedia.showHelp() sys.exit() old = template_names[0] if len(template_names) == 2: new = template_names[1] mysite = wikipedia.getSite() ns = mysite.template_namespace() oldTemplate = wikipedia.Page(mysite, ns + ':' + old) if xmlfilename: gen = XmlDumpTemplatePageGenerator(oldTemplate, xmlfilename) else: gen = pagegenerators.ReferringPageGenerator(oldTemplate, onlyTemplateInclusion = True) if namespaces != []: gen = pagegenerators.NamespaceFilterPageGenerator(gen, namespaces) preloadingGen = pagegenerators.PreloadingGenerator(gen) bot = TemplateRobot(preloadingGen, old, new, remove, customSummary, editSummary, acceptAll) bot.run()
0418baf3bd91dc26d5ca592a2fae8506b0e3cd54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/0418baf3bd91dc26d5ca592a2fae8506b0e3cd54/template.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1542, 67, 1973, 273, 5378, 2245, 273, 1083, 1206, 273, 1083, 7728, 273, 5378, 1679, 4733, 273, 1083, 3874, 4733, 273, 875, 2791, 1595, 273, 1083, 468, 971, 2025, 3459, 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, 2774, 13332, 1542, 67, 1973, 273, 5378, 2245, 273, 1083, 1206, 273, 1083, 7728, 273, 5378, 1679, 4733, 273, 1083, 3874, 4733, 273, 875, 2791, 1595, 273, 1083, 468, 971, 2025, 3459, 353, ...
if not replicas.has_key(lfn):
if not replicas.has_key( lfn ):
def __getNewReplicas(self): """ This obtains the New replicas from the Replicas table and for each LFN the requested storage element """ # First obtain the New replicas from the Replicas table res = self.stagerClient.getReplicasWithStatus('New') if not res['OK']: gLogger.error("RequestPreparation.__getNewReplicas: Failed to get replicas with New status.", res['Message']) return res if not res['Value']: gLogger.debug("RequestPreparation.__getNewReplicas: No New replicas found to process.") return S_OK() else: gLogger.debug("RequestPreparation.__getNewReplicas: Obtained %s New replicas(s) to process." % len(res['Value'])) replicas = {} replicaIDs = {} for replicaID,info in res['Value'].items(): lfn = info['LFN'] storageElement = info['SE'] if not replicas.has_key(lfn): replicas[lfn] = {} replicas[lfn][storageElement] = replicaID replicaIDs[replicaID] = (lfn,storageElement) return S_OK({'Replicas':replicas,'ReplicaIDs':replicaIDs})
d68cb60fd991fa9f206177d2794f8d04f940cd00 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d68cb60fd991fa9f206177d2794f8d04f940cd00/RequestPreparationAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1908, 17248, 12, 2890, 4672, 3536, 1220, 3768, 16598, 326, 1166, 21545, 628, 326, 31222, 1014, 471, 364, 1517, 18803, 50, 326, 3764, 2502, 930, 3536, 468, 5783, 7161, 326, 1166,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 1908, 17248, 12, 2890, 4672, 3536, 1220, 3768, 16598, 326, 1166, 21545, 628, 326, 31222, 1014, 471, 364, 1517, 18803, 50, 326, 3764, 2502, 930, 3536, 468, 5783, 7161, 326, 1166,...
html += "<div class='formHelp'>%s</div>" % super(BaseWidget, self).hint
html += "<div class='formHelp'>%s</div>" % translate(super(BaseWidget, self).hint, context=self.request)
def __call__( self ): """Render the widget to HTML.""" value = self._getFormValue() html = "<label for='%s'>%s</label>\n" % (self.name , super(BaseWidget,self).label) if self.__required: html += "<span class='fieldRequired' title='%s' > %s </span>" % ( translate(_(u'title_required'),context=self.request), translate(_(u'title_required'),context=self.request)) if super(BaseWidget, self).hint: html += "<div class='formHelp'>%s</div>" % super(BaseWidget, self).hint if super(BaseWidget, self).error() != '': html += "<div>%s</div>" % super(BaseWidget, self).error() if value == 'on': kw = {'checked': 'checked'} else: kw = {} return "%s %s %s" % ( renderElement(self.tag, type='hidden', name=self.name+".used", id=self.name+".used", value="" ), renderElement(self.tag, type=self.type, name=self.name, id=self.name, cssClass=self.cssClass, extra=self.extra, value="on", **kw), html
f815367044b4876066e9603ab78072a7e423eea8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12236/f815367044b4876066e9603ab78072a7e423eea8/checkboxwidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 365, 262, 30, 3536, 3420, 326, 3604, 358, 3982, 12123, 460, 273, 365, 6315, 588, 1204, 620, 1435, 1729, 273, 3532, 1925, 364, 28713, 87, 11, 9822, 87, 1757, 1925, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1991, 972, 12, 365, 262, 30, 3536, 3420, 326, 3604, 358, 3982, 12123, 460, 273, 365, 6315, 588, 1204, 620, 1435, 1729, 273, 3532, 1925, 364, 28713, 87, 11, 9822, 87, 1757, 1925, ...
filename.write(linkWay(child))
filename.write(linkWay(child)+" ")
def AddrTreeRecurse (top, wayback="» "):
cda6679173391cb972f4060eef8750b9189454a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4644/cda6679173391cb972f4060eef8750b9189454a7/initialParse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10216, 2471, 426, 17682, 261, 3669, 16, 4031, 823, 1546, 131, 124, 315, 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...
[ 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, 10216, 2471, 426, 17682, 261, 3669, 16, 4031, 823, 1546, 131, 124, 315, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.channel.set_metadata({'song': str(song)})
self.channel.set_metadata({'song': str(song.encode('utf-8'))})
def run(self): q = self.q while True: it = q.get(1) if self.lp == 0: self.logger.write('Error : Station ' + self.short_name + ' have no media to stream !') break media = self.get_next_media() self.counter += 1 q.task_done()
08877d9a45bbc21b32734c5dc9cf6b267558aa71 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12047/08877d9a45bbc21b32734c5dc9cf6b267558aa71/deefuzz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1043, 273, 365, 18, 85, 1323, 1053, 30, 518, 273, 1043, 18, 588, 12, 21, 13, 309, 365, 18, 9953, 422, 374, 30, 365, 18, 4901, 18, 2626, 2668, 668, 294, 934, 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, 1086, 12, 2890, 4672, 1043, 273, 365, 18, 85, 1323, 1053, 30, 518, 273, 1043, 18, 588, 12, 21, 13, 309, 365, 18, 9953, 422, 374, 30, 365, 18, 4901, 18, 2626, 2668, 668, 294, 934, 3...
'product_uom' : fields.many2one('product.uom', 'UoM', required=True, help = "Unit of Measure used to show the quanities of stock calculation." \
'product_uom': fields.many2one('product.uom', 'UoM', required=True, help = "Unit of Measure used to show the quanities of stock calculation." \
coeff = coeff_uom2def * coeff_def2uom
6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 11943, 273, 11943, 67, 89, 362, 22, 536, 380, 11943, 67, 536, 22, 89, 362, 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, 11943, 273, 11943, 67, 89, 362, 22, 536, 380, 11943, 67, 536, 22, 89, 362, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
new_numberOfBasePairs = self.propMgr.numberOfBasePairsSpinBox.value() endPoint1, endPoint2 = self.struct.getAxisEndPoints() if endPoint1 is None or endPoint2 is None: return 0 original_duplex_length = vlen(endPoint1 - endPoint2) original_numberOfBasePairs = getNumberOfBasePairsFromDuplexLength('B-DNA', original_duplex_length, duplexRise = duplexRise ) numberOfBasesToAddOrRemove = new_numberOfBasePairs - original_numberOfBasePairs if numberOfBasesToAddOrRemove > 0: numberOfBasesToAddOrRemove += 1
numberOfBasesToAddOrRemove = 0 if self.grabbedHandle is not None: currentPosition = self.grabbedHandle.currentPosition fixedEndOfStructure = self.grabbedHandle.fixedEndOfStructure changedLength = vlen(currentPosition - self.grabbedHandle.origin) direction_of_drag = norm(self.grabbedHandle.currentPosition - \ self.grabbedHandle.origin) if changedLength < 0.2*duplexRise: return 0 if changedLength < duplexRise and \ dot(self.grabbedHandle.direction, direction_of_drag) > 0: return 0 numberOfBasesToAddOrRemove = \ getNumberOfBasePairsFromDuplexLength( 'B-DNA', changedLength, duplexRise = duplexRise) if dot(self.grabbedHandle.direction, direction_of_drag) < 0: numberOfBasesToAddOrRemove = - numberOfBasesToAddOrRemove if numberOfBasesToAddOrRemove > 0: pass else: new_numberOfBasePairs = self.propMgr.numberOfBasePairsSpinBox.value() endPoint1, endPoint2 = self.struct.getAxisEndPoints() if endPoint1 is None or endPoint2 is None: return 0 original_duplex_length = vlen(endPoint1 - endPoint2) original_numberOfBasePairs = self.struct.getNumberOfBasePairs() numberOfBasesToAddOrRemove = new_numberOfBasePairs - original_numberOfBasePairs if numberOfBasesToAddOrRemove > 0: numberOfBasesToAddOrRemove += 1
def _determine_numberOfBasePairs_to_change(self): """ """ duplexRise = self.struct.getDuplexRise()
640dbc297db41f44690e85ab063dbd8ead85887b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/640dbc297db41f44690e85ab063dbd8ead85887b/DnaSegment_EditCommand.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 24661, 67, 2696, 951, 2171, 10409, 67, 869, 67, 3427, 12, 2890, 4672, 3536, 3536, 302, 2268, 92, 54, 784, 273, 365, 18, 1697, 18, 588, 40, 2268, 92, 54, 784, 1435, 2, 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, 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, 389, 24661, 67, 2696, 951, 2171, 10409, 67, 869, 67, 3427, 12, 2890, 4672, 3536, 3536, 302, 2268, 92, 54, 784, 273, 365, 18, 1697, 18, 588, 40, 2268, 92, 54, 784, 1435, 2, -100, -100...
self.log(InvalidMediaHash({"parent":self.parent.name, "element":self.name, "attr":"algo", "value":self.value}))
self.log(InvalidMediaHash({"parent":self.parent.name, "element":self.name, "algo":self.algo, "value":self.value}))
def validate(self): self.value = self.value.strip() if not re.match("^[0-9A-Za-z]+$",self.value): self.log(InvalidMediaHash({"parent":self.parent.name, "element":self.name, "attr":"algo", "value":self.value})) else: if self.algo == 'sha-1': if len(self.value) != 40: self.log(InvalidMediaHash({"parent":self.parent.name, "element":self.name, "attr":"algo", "value":self.value})) else: if len(self.value) != 32: self.log(InvalidMediaHash({"parent":self.parent.name, "element":self.name, "attr":"algo", "value":self.value}))
b108b6c7f3fff8340958cc52862cc52de37aceb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5012/b108b6c7f3fff8340958cc52862cc52de37aceb3/media.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 4672, 365, 18, 1132, 273, 365, 18, 1132, 18, 6406, 1435, 309, 486, 283, 18, 1916, 2932, 66, 63, 20, 17, 29, 37, 17, 15948, 17, 94, 3737, 8, 3113, 2890, 18, 1132, 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, 1954, 12, 2890, 4672, 365, 18, 1132, 273, 365, 18, 1132, 18, 6406, 1435, 309, 486, 283, 18, 1916, 2932, 66, 63, 20, 17, 29, 37, 17, 15948, 17, 94, 3737, 8, 3113, 2890, 18, 1132, 46...
parse.execute_command(cmd, args, globals_dict, locals_dict)
parse.execute_command(cmd, args, global_dict, local_dict)
def do_cmd(self, rest_of_line, cmd=command): globals_dict, locals_dict = parse.get_twill_glocals()
f5c27c61d876611e93d4ea94e0568100541bbe35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8598/f5c27c61d876611e93d4ea94e0568100541bbe35/shell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4172, 12, 2890, 16, 3127, 67, 792, 67, 1369, 16, 1797, 33, 3076, 4672, 10941, 67, 1576, 16, 8985, 67, 1576, 273, 1109, 18, 588, 67, 11246, 737, 67, 75, 17977, 1435, 2, 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, 741, 67, 4172, 12, 2890, 16, 3127, 67, 792, 67, 1369, 16, 1797, 33, 3076, 4672, 10941, 67, 1576, 16, 8985, 67, 1576, 273, 1109, 18, 588, 67, 11246, 737, 67, 75, 17977, 1435, 2, -100,...
self.failUnless( skins_tool._setup_called )
self.failUnless( site._skin_setup_called )
def test_fragment_skip_purge(self):
602f054babd4fcf667987bd5ada457ed274c4361 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/602f054babd4fcf667987bd5ada457ed274c4361/test_skins.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11956, 67, 7457, 67, 26422, 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, ...
[ 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, 1842, 67, 11956, 67, 7457, 67, 26422, 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,...
def WeakKeyedKeyIterator(weakdict): for wr in weakdict.data.iterkeys(): obj = wr() if obj is not None: yield obj def WeakKeyedItemIterator(weakdict): for wr, value in weakdict.data.iteritems(): key = wr() if key is not None: yield key, value def WeakValuedValueIterator(weakdict): for wr in weakdict.data.itervalues(): obj = wr() if obj is not None: yield obj def WeakValuedItemIterator(weakdict): for wr in weakdict.data.itervalues(): value = wr() if value is not None: yield wr.key, value
def update(self, dict=None, **kwargs): d = self.data if dict is not None: if not hasattr(dict, "items"): dict = type({})(dict) for key, value in dict.items(): d[ref(key, self._remove)] = value if len(kwargs): self.update(kwargs)
61146790992e0a00b76a6bf6ecc9e53289a1ecd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/61146790992e0a00b76a6bf6ecc9e53289a1ecd7/weakref.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 2065, 33, 7036, 16, 2826, 4333, 4672, 302, 273, 365, 18, 892, 309, 2065, 353, 486, 599, 30, 309, 486, 3859, 12, 1576, 16, 315, 3319, 6, 4672, 2065, 273, 618, 2350...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1089, 12, 2890, 16, 2065, 33, 7036, 16, 2826, 4333, 4672, 302, 273, 365, 18, 892, 309, 2065, 353, 486, 599, 30, 309, 486, 3859, 12, 1576, 16, 315, 3319, 6, 4672, 2065, 273, 618, 2350...
if not connection.isRegistred(): self.widgets["ratedGameCheck"].set_active(False) self.widgets["ratedGameCheck"].hide() else: self.widgets["ratedGameCheck"].show()
if not self.connection.isRegistred(): self.chainbox.active = False self.widgets["chainAlignment"].set_sensitive(False) self.widgets["chainAlignment"].set_tooltip_text( _("You can't play rated games because you are logged in as a guest, ") + _("and therefore, the chain button is not applicable"))
def chainboxSetter (widget, is_active): self.chainbox.active = is_active
d1986716756bd3ab698c1a3ca65ebbe935e13af3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/d1986716756bd3ab698c1a3ca65ebbe935e13af3/ICLounge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2687, 2147, 8465, 261, 6587, 16, 353, 67, 3535, 4672, 365, 18, 5639, 2147, 18, 3535, 273, 353, 67, 3535, 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, 2687, 2147, 8465, 261, 6587, 16, 353, 67, 3535, 4672, 365, 18, 5639, 2147, 18, 3535, 273, 353, 67, 3535, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if o.bank_id.bank_code: res = o.bank_id.bank_code
if bank.bank_code: res = bank.bank_code
def _get_ref(self, o): res = '' if o.bank_id.bank_code: res = o.bank_id.bank_code return self._mod10r(res+o.number.rjust(26-len(res), '0'))
ad1032e992df2270077592ddb081acb2b4e6cdcd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/ad1032e992df2270077592ddb081acb2b4e6cdcd/bvr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1734, 12, 2890, 16, 320, 4672, 400, 273, 875, 309, 11218, 18, 10546, 67, 710, 30, 400, 273, 11218, 18, 10546, 67, 710, 327, 365, 6315, 1711, 2163, 86, 12, 455, 15, 83, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 67, 1734, 12, 2890, 16, 320, 4672, 400, 273, 875, 309, 11218, 18, 10546, 67, 710, 30, 400, 273, 11218, 18, 10546, 67, 710, 327, 365, 6315, 1711, 2163, 86, 12, 455, 15, 83, ...
if (a1 < 0):
if a1 < 0:
def wigner_3j(j_1, j_2, j_3, m_1, m_2, m_3, prec=None): r""" Calculate the Wigner 3j symbol `Wigner3j(j_1,j_2,j_3,m_1,m_2,m_3)`. INPUT: - ``j_1``, ``j_2``, ``j_3``, ``m_1``, ``m_2``, ``m_3`` - integer or half integer - ``prec`` - precision, default: None. Providing a precision can drastically speed up the calculation. OUTPUT: rational number times the square root of a rational number (if prec=None), or real number if a precision is given EXAMPLES:: sage: wigner_3j(2, 6, 4, 0, 0, 0) sqrt(5/143) sage: wigner_3j(2, 6, 4, 0, 0, 1) 0 sage: wigner_3j(0.5, 0.5, 1, 0.5, -0.5, 0) sqrt(1/6) sage: wigner_3j(40, 100, 60, -10, 60, -50) 95608/18702538494885*sqrt(21082735836735314343364163310/220491455010479533763) sage: wigner_3j(2500, 2500, 5000, 2488, 2400, -4888, prec=64) 7.60424456883448589e-12 It is an error to have arguments that are not integer or half integer values:: sage: wigner_3j(2.1, 6, 4, 0, 0, 0) Traceback (most recent call last): ... ValueError: j values must be integer or half integer sage: wigner_3j(2, 6, 4, 1, 0, -1.1) Traceback (most recent call last): ... ValueError: m values must be integer or half integer NOTES: The Wigner 3j symbol obeys the following symmetry rules: - invariant under any permutation of the columns (with the exception of a sign change where `J:=j_1+j_2+j_3`): .. math:: Wigner3j(j_1,j_2,j_3,m_1,m_2,m_3) =Wigner3j(j_3,j_1,j_2,m_3,m_1,m_2) =Wigner3j(j_2,j_3,j_1,m_2,m_3,m_1) =(-1)^J Wigner3j(j_3,j_2,j_1,m_3,m_2,m_1) =(-1)^J Wigner3j(j_1,j_3,j_2,m_1,m_3,m_2) =(-1)^J Wigner3j(j_2,j_1,j_3,m_2,m_1,m_3) - invariant under space inflection, i. e. .. math:: Wigner3j(j_1,j_2,j_3,m_1,m_2,m_3) =(-1)^J Wigner3j(j_1,j_2,j_3,-m_1,-m_2,-m_3) - symmetric with respect to the 72 additional symmetries based on the work by [Regge58] - zero for `j_1`, `j_2`, `j_3` not fulfilling triangle relation - zero for `m_1+m_2+m_3\neq 0` - zero for violating any one of the conditions `j_1\ge|m_1|`, `j_2\ge|m_2|`, `j_3\ge|m_3|` ALGORITHM: This function uses the algorithm of [Edmonds74] to calculate the value of the 3j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03]. REFERENCES: - [Regge58] 'Symmetry Properties of Clebsch-Gordan Coefficients', T. Regge, Nuovo Cimento, Volume 10, pp. 544 (1958) - [Edmonds74] 'Angular Momentum in Quantum Mechanics', A. R. Edmonds, Princeton University Press (1974) - [Rasch03] 'Efficient Storage Scheme for Pre-calculated Wigner 3j, 6j and Gaunt Coefficients', J. Rasch and A. C. H. Yu, SIAM J. Sci. Comput. Volume 25, Issue 4, pp. 1416-1428 (2003) AUTHORS: - Jens Rasch (2009-03-24): initial version """ if int(j_1 * 2) != j_1 * 2 or int(j_2 * 2) != j_2 * 2 or \ int(j_3 * 2) != j_3 * 2: raise ValueError("j values must be integer or half integer") if int(m_1 * 2) != m_1 * 2 or int(m_2 * 2) != m_2 * 2 or \ int(m_3 * 2) != m_3 * 2: raise ValueError("m values must be integer or half integer") if (m_1 + m_2 + m_3 <> 0): return 0 prefid = Integer((-1) ** (int(j_1 - j_2 - m_3))) m_3 = -m_3 a1 = j_1 + j_2 - j_3 if (a1 < 0): return 0 a2 = j_1 - j_2 + j_3 if (a2 < 0): return 0 a3 = -j_1 + j_2 + j_3 if (a3 < 0): return 0 if (abs(m_1) > j_1) or (abs(m_2) > j_2) or (abs(m_3) > j_3): return 0 maxfact = max(j_1 + j_2 + j_3 + 1, j_1 + abs(m_1), j_2 + abs(m_2), \ j_3 + abs(m_3)) _calc_factlist(maxfact) argsqrt = Integer(_Factlist[int(j_1 + j_2 - j_3)] * \ _Factlist[int(j_1 - j_2 + j_3)] * \ _Factlist[int(-j_1 + j_2 + j_3)] * \ _Factlist[int(j_1 - m_1)] * \ _Factlist[int(j_1 + m_1)] * \ _Factlist[int(j_2 - m_2)] * \ _Factlist[int(j_2 + m_2)] * \ _Factlist[int(j_3 - m_3)] * \ _Factlist[int(j_3 + m_3)]) / \ _Factlist[int(j_1 + j_2 + j_3 + 1)] ressqrt = argsqrt.sqrt(prec) if type(ressqrt) is ComplexNumber: ressqrt = ressqrt.real() imin = max(-j_3 + j_1 + m_2, -j_3 + j_2 - m_1, 0) imax = min(j_2 + m_2, j_1 - m_1, j_1 + j_2 - j_3) sumres = 0 for ii in range(imin, imax + 1): den = _Factlist[ii] * \ _Factlist[int(ii + j_3 - j_1 - m_2)] * \ _Factlist[int(j_2 + m_2 - ii)] * \ _Factlist[int(j_1 - ii - m_1)] * \ _Factlist[int(ii + j_3 - j_2 + m_1)] * \ _Factlist[int(j_1 + j_2 - j_3 - ii)] sumres = sumres + Integer((-1) ** ii) / den res = ressqrt * sumres * prefid return res
2aae1a34350173041dcaa920c230128b23fb8288 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/2aae1a34350173041dcaa920c230128b23fb8288/wigner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 724, 264, 67, 23, 78, 12, 78, 67, 21, 16, 525, 67, 22, 16, 525, 67, 23, 16, 312, 67, 21, 16, 312, 67, 22, 16, 312, 67, 23, 16, 13382, 33, 7036, 4672, 436, 8395, 9029, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 341, 724, 264, 67, 23, 78, 12, 78, 67, 21, 16, 525, 67, 22, 16, 525, 67, 23, 16, 312, 67, 21, 16, 312, 67, 22, 16, 312, 67, 23, 16, 13382, 33, 7036, 4672, 436, 8395, 9029, 326,...
from optparse import OptionParser
def main(): from optparse import OptionParser p = OptionParser(usage="usage: %prog [options] [name] [version]", description=__doc__) p.add_option("--config", action="store_true", help="display the configuration and exit") p.add_option('-f', "--force", action="store_true", help="force install the main package " "(not it's dependencies, see --forceall)") p.add_option("--forceall", action="store_true", help="force install of all packages " "(i.e. including dependencies)") p.add_option('-i', "--info", action="store_true", help="show information about a package") p.add_option('-l', "--list", action="store_true", help="list the packages currently installed on the system") p.add_option('-n', "--dry-run", action="store_true", help="show what would have been downloaded/removed/installed") p.add_option('-N', "--no-deps", action="store_true", help="neither download nor install dependencies") p.add_option("--path", action="store_true", help="based on the configuration, display how to set the " "PATH and PYTHONPATH environment variables") p.add_option("--prefix", action="store", help="install prefix (disregarding of any settings in " "the config file)", metavar='PATH') p.add_option("--proxy", action="store", help="use a proxy for downloads", metavar='URL') p.add_option("--remove", action="store_true", help="remove a package") p.add_option('-s', "--search", action="store_true", help="search the index in the repo (chain) of packages " "and display versions available.") p.add_option("--sys-prefix", action="store_true", help="use sys.prefix as the install prefix") p.add_option('-v', "--verbose", action="store_true") p.add_option('--version', action="store_true") p.add_option("--whats-new", action="store_true", help="display to which installed packages updates are " "available") opts, args = p.parse_args() if len(args) > 0 and (opts.config or opts.path): p.error("Option takes no arguments") if opts.prefix and opts.sys_prefix: p.error("Options --prefix and --sys-prefix exclude each ohter") if opts.force and opts.forceall: p.error("Options --force and --forceall exclude each ohter") pat = None if (opts.list or opts.search) and args: pat = re.compile(args[0], re.I) if opts.version: # --version from enstaller import __version__ print "Enstaller version:", __version__ return if opts.config: # --config config.print_config() return if opts.proxy: # --proxy from proxy.api import setup_proxy setup_proxy(opts.proxy) if config.get_path() is None: # create config file if it dosn't exist config.write(opts.proxy) conf = config.read() # conf if (not opts.proxy) and conf['proxy']: from proxy.api import setup_proxy setup_proxy(conf['proxy']) global prefix, dry_run, noapp, version # set globals if opts.sys_prefix: prefix = sys.prefix elif opts.prefix: prefix = opts.prefix else: prefix = conf['prefix'] dry_run = opts.dry_run noapp = conf['noapp'] version = opts.version if opts.path: # --path print_path() return if opts.list: # --list list_option(pat) return c = Chain(conf['IndexedRepos'], verbose) # init chain if opts.search: # --search search(c, pat) return if opts.info: # --info if len(args) != 1: p.error("Option requires one argument (name of package)") info_option(conf['info_url'], c, canonical(args[0])) return if opts.whats_new: # --whats-new if args: p.error("Option requires no arguments") whats_new(c) return if len(args) == 0: p.error("Requirement (name and optional version) missing") if len(args) > 2: p.error("A requirement is a name and an optional version") req = Req(' '.join(args)) print "prefix:", prefix check_write() if opts.remove: # --remove remove_req(req) return dists = get_dists(c, req, # dists recur=not opts.no_deps) # Warn the user about packages which depend on what will be updated depend_warn([filename_dist(d) for d in dists]) # Packages which are installed currently sys_inst = set(egginst.get_installed(sys.prefix)) if prefix == sys.prefix: prefix_inst = sys_inst else: prefix_inst = set(egginst.get_installed(prefix)) all_inst = sys_inst | prefix_inst # These are the packahes which are being excluded from being installed if opts.forceall: exclude = set() else: exclude = all_inst if opts.force: exclude.discard(filename_dist(dists[-1])) # Fetch distributions if not isdir(conf['local']): os.makedirs(conf['local']) for dist, fn in iter_dists_excl(dists, exclude): c.fetch_dist(dist, conf['local'], check_md5=opts.force or opts.forceall, dry_run=dry_run) # Remove packages (in reverse install order) for dist in dists[::-1]: fn = filename_dist(dist) if fn in all_inst: # if the distribution (which needs to be installed) is already # installed don't remove it continue cname = cname_fn(fn) # Only remove packages installed in prefix for fn_inst in prefix_inst: if cname == cname_fn(fn_inst): call_egginst(fn_inst, remove=True) # Install packages installed_something = False for dist, fn in iter_dists_excl(dists, exclude): installed_something = True call_egginst(join(conf['local'], fn)) if not installed_something: print "No update necessary, %s is up-to-date." % req print_installed_info(req.name)
0ea235ea4e6a9cc87e99f7a47d52e5a3265e3302 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7707/0ea235ea4e6a9cc87e99f7a47d52e5a3265e3302/enpkg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 293, 273, 18862, 12, 9167, 1546, 9167, 30, 738, 14654, 306, 2116, 65, 306, 529, 65, 306, 1589, 65, 3113, 2477, 33, 972, 2434, 972, 13, 225, 293, 18, 1289, 67, 3482, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 293, 273, 18862, 12, 9167, 1546, 9167, 30, 738, 14654, 306, 2116, 65, 306, 529, 65, 306, 1589, 65, 3113, 2477, 33, 972, 2434, 972, 13, 225, 293, 18, 1289, 67, 3482, 2932, ...
if not options.backup :
if not options.backup :
def clean_up_after_optimize(new_filename, backup_filename, filesize_in, options): """clean up the backups, recover from backup if optimization was bad and report on how much we saved""" if new_filename != -1 : try : filesize_out = os.stat(new_filename).st_size if options.verbose : report_percent_saved(filesize_in, filesize_out) if (filesize_out > 0) and (filesize_out < filesize_in) : if not options.backup : try : os.remove(backup_filename) except OSError: pass else : recover_file(backup_filename, new_filename, options) except OSError : recover_file(backup_filename, new_filename, options)
ae6c0c0a32846854ee29ec13f8067be2c1750d99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10314/ae6c0c0a32846854ee29ec13f8067be2c1750d99/picopt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 416, 67, 5205, 67, 29155, 12, 2704, 67, 3459, 16, 5114, 67, 3459, 16, 14104, 67, 267, 16, 702, 4672, 3536, 6200, 731, 326, 22091, 16, 5910, 628, 5114, 309, 14850, 1703, 5570,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2721, 67, 416, 67, 5205, 67, 29155, 12, 2704, 67, 3459, 16, 5114, 67, 3459, 16, 14104, 67, 267, 16, 702, 4672, 3536, 6200, 731, 326, 22091, 16, 5910, 628, 5114, 309, 14850, 1703, 5570,...
maxNu = min(2.0 * min(n1, n2) / (n1 + n2) for n1, n2 in pairs(dist) if n1 != 0 and n2 !=0)
maxNu = min([2.0 * min(n1, n2) / (n1 + n2) for n1, n2 in pairs(dist) if n1 != 0 and n2 !=0] + [self.nu])
def pairs(seq): for i, n1 in enumerate(seq): for n2 in seq[i+1:]: yield n1, n2
537437d941f2fce3cda5bec1ba760d5702505f54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/537437d941f2fce3cda5bec1ba760d5702505f54/orngSVM.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5574, 12, 5436, 4672, 364, 277, 16, 290, 21, 316, 4241, 12, 5436, 4672, 364, 290, 22, 316, 3833, 63, 77, 15, 21, 30, 14542, 2824, 290, 21, 16, 290, 22, 2, 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, 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, 5574, 12, 5436, 4672, 364, 277, 16, 290, 21, 316, 4241, 12, 5436, 4672, 364, 290, 22, 316, 3833, 63, 77, 15, 21, 30, 14542, 2824, 290, 21, 16, 290, 22, 2, -100, -100, -100, -100, -...
pl = plistlib.readPlist(infoPlist) if "CFBundleShortVersionString" in pl: return padVersionString(pl["CFBundleShortVersionString"],5)
pl = plistlib.readPlist(infoPlist) if "CFBundleShortVersionString" in pl: return padVersionString(pl["CFBundleShortVersionString"],5) elif "Bundle versions string, short" in pl: return padVersionString(pl["Bundle versions string, short"],5)
def getExtendedVersion(bundlepath): """ Returns five-part version number like Apple uses in package DB """ versionPlist = os.path.join(bundlepath,"Contents","version.plist") infoPlist = os.path.join(bundlepath,"Contents","Info.plist") pl = {} if os.path.exists(versionPlist): pl = plistlib.readPlist(versionPlist) if pl: shortVers = "0.0.0" sourceVers = "0" buildVers = "0" if "CFBundleShortVersionString" in pl: shortVers = padVersionString(pl["CFBundleShortVersionString"],3) if "SourceVersion" in pl: sourceVers = padVersionString(pl["SourceVersion"],1) if "BuildVersion" in pl: buildVers = padVersionString(pl["BuildVersion"],1) if os.path.exists(infoPlist): pl = plistlib.readPlist(infoPlist) if 'IFMinorVersion' in pl: buildVers = padVersionString(pl['IFMinorVersion'],1) return shortVers + "." + sourceVers + "." + buildVers if os.path.exists(infoPlist): pl = plistlib.readPlist(infoPlist) if "CFBundleShortVersionString" in pl: return padVersionString(pl["CFBundleShortVersionString"],5) else: return "0.0.0.0.0"
1469d4ddaae7ee4dedd45683704db4d8db997e01 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6241/1469d4ddaae7ee4dedd45683704db4d8db997e01/munkicommon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 11456, 1444, 12, 9991, 803, 4672, 3536, 2860, 23714, 17, 2680, 1177, 1300, 3007, 1716, 1802, 4692, 316, 2181, 2383, 3536, 1177, 52, 1098, 273, 1140, 18, 803, 18, 5701, 12, 9991, 803...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 11456, 1444, 12, 9991, 803, 4672, 3536, 2860, 23714, 17, 2680, 1177, 1300, 3007, 1716, 1802, 4692, 316, 2181, 2383, 3536, 1177, 52, 1098, 273, 1140, 18, 803, 18, 5701, 12, 9991, 803...
data['info_', key] = str(value)
data[u'info_' + key] = unicode(value)
def read_metadata(self, item): meta = mutagen.File(item.filename).__dict__ tags = None if '_DictProxy__dict' in meta['tags'].__dict__: tags = meta['tags'].__dict__['_DictProxy__dict'] else: tags = meta['tags'] info = meta['info'].__dict__ data = {} discard = ('MCDI', 'APIC') for key, value in tags.items(): if not key.split(':')[0] in discard: data[str(key)] = str(value) for key, value in info.items(): data['info_', key] = str(value)
9f3966132b1cc7cb778100fac51f1de7b8de51ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/9f3966132b1cc7cb778100fac51f1de7b8de51ec/moviedata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 4165, 12, 2890, 16, 761, 4672, 2191, 273, 4318, 346, 275, 18, 812, 12, 1726, 18, 3459, 2934, 972, 1576, 972, 2342, 273, 599, 309, 2070, 5014, 3886, 972, 1576, 11, 316, 2191, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 67, 4165, 12, 2890, 16, 761, 4672, 2191, 273, 4318, 346, 275, 18, 812, 12, 1726, 18, 3459, 2934, 972, 1576, 972, 2342, 273, 599, 309, 2070, 5014, 3886, 972, 1576, 11, 316, 2191, ...
if __debug__ and self.debug >= 1 and typ in ('NO', 'BAD'): _mesg('%s response: %s' % (typ, dat))
if __debug__: if self.debug >= 1 and typ in ('NO', 'BAD', 'BYE'): _mesg('%s response: %s' % (typ, dat))
def _get_response(self):
4c8f1ad041044141b195bdb266c824261b5d4482 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4c8f1ad041044141b195bdb266c824261b5d4482/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 2740, 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,...
[ 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 2740, 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,...
num_running_processes -= agent.num_processes
def _handle_agents(self): num_running_processes = self.num_running_processes() num_started_this_cycle = 0 have_reached_limit = False # iterate over copy, so we can remove agents during iteration for agent in list(self._agents): if agent.is_done(): print "agent finished" self._agents.remove(agent) num_running_processes -= agent.num_processes continue if not agent.is_running(): if not self._can_start_agent(agent, num_running_processes, num_started_this_cycle, have_reached_limit): have_reached_limit = True continue num_running_processes += agent.num_processes num_started_this_cycle += agent.num_processes agent.tick() print num_running_processes, 'running processes'
ff79a3b5a170339919c88a957c8bea58d40bc852 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/ff79a3b5a170339919c88a957c8bea58d40bc852/monitor_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 23560, 12, 2890, 4672, 818, 67, 8704, 67, 18675, 273, 365, 18, 2107, 67, 8704, 67, 18675, 1435, 818, 67, 14561, 67, 2211, 67, 13946, 273, 374, 1240, 67, 266, 2004, 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, 4110, 67, 23560, 12, 2890, 4672, 818, 67, 8704, 67, 18675, 273, 365, 18, 2107, 67, 8704, 67, 18675, 1435, 818, 67, 14561, 67, 2211, 67, 13946, 273, 374, 1240, 67, 266, 2004, 67, ...
val = eval(arg, globals_dict, locals_dict)
try: val = eval(arg, globals_dict, locals_dict) except NameError: val = arg
def process_args(args, globals_dict, locals_dict): """ Take a list of string arguments parsed via pyparsing, unquote those that are quoted, and evaluate the special variables ('__*'). Return a new list. """ newargs = [] for arg in args: # strip quotes from quoted strings. # don't use string.strip, which will remove more than one... if arg[0] == arg[-1] and arg[0] in "\"'": newargs.append(arg[1:-1]) # __variable substitution. @CTB do we need this? elif arg.startswith('__'): val = eval(arg, globals_dict, locals_dict) newargs.append(val) # $variable substitution elif arg.startswith('$'): val = eval(arg[1:], globals_dict, locals_dict) newargs.append(val) else: newargs.append(arg) return newargs
fe411cdcae8c69c9d9201625934e21b1f4809a0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8598/fe411cdcae8c69c9d9201625934e21b1f4809a0d/parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1968, 12, 1968, 16, 10941, 67, 1576, 16, 8985, 67, 1576, 4672, 3536, 17129, 279, 666, 434, 533, 1775, 2707, 3970, 18951, 297, 2470, 16, 25611, 5348, 716, 854, 9298, 16, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1207, 67, 1968, 12, 1968, 16, 10941, 67, 1576, 16, 8985, 67, 1576, 4672, 3536, 17129, 279, 666, 434, 533, 1775, 2707, 3970, 18951, 297, 2470, 16, 25611, 5348, 716, 854, 9298, 16, 471, ...
self.error_log = self.getPortal().error_log
self.error_log = self.portal.error_log
def afterSetUp(self): # basic data # Put dummy sdm and dummy SESSION object into REQUEST request = self.app.REQUEST self.app._setObject('session_data_manager', DummySessionDataManager()) sdm = self.app.session_data_manager request.set('SESSION', sdm.getSessionData())
1c3c3497944b5973ac8d66d2c446450a3694c36f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/1c3c3497944b5973ac8d66d2c446450a3694c36f/test_functional.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1839, 694, 1211, 12, 2890, 4672, 468, 5337, 501, 468, 4399, 9609, 8349, 81, 471, 9609, 10307, 733, 1368, 12492, 590, 273, 365, 18, 2910, 18, 5519, 365, 18, 2910, 6315, 542, 921, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1839, 694, 1211, 12, 2890, 4672, 468, 5337, 501, 468, 4399, 9609, 8349, 81, 471, 9609, 10307, 733, 1368, 12492, 590, 273, 365, 18, 2910, 18, 5519, 365, 18, 2910, 6315, 542, 921, 2668, ...
except:
finally:
def main(args): filename = '' description = [] keep = False wiki = '' for arg in args: arg = wikipedia.argHandler(arg) if arg: print arg if arg.startswith('-keep'): keep = True elif arg.startswith('-wiki:'): wiki=arg[6:] elif filename == '': filename = arg else: description.append(arg) description = ' '.join(description) bot = UploadRobot(filename, description, wiki, keep) bot.run()
7fd04950ab09249f121d96022ac06b2d23ff3829 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/7fd04950ab09249f121d96022ac06b2d23ff3829/upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 4672, 1544, 273, 875, 2477, 273, 5378, 3455, 273, 1083, 9050, 273, 875, 225, 364, 1501, 316, 833, 30, 1501, 273, 21137, 18, 3175, 1503, 12, 3175, 13, 309, 1501, 30, 117...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 1968, 4672, 1544, 273, 875, 2477, 273, 5378, 3455, 273, 1083, 9050, 273, 875, 225, 364, 1501, 316, 833, 30, 1501, 273, 21137, 18, 3175, 1503, 12, 3175, 13, 309, 1501, 30, 117...
tags = task.get_tags() for tag in tags: if tag.get_attribute("location"): position = eval(tag.get_attribute("location")) if not self.geoclue.compare_position(position[0], position[1], float(self.PROXIMITY_FACTOR)): plugin_api.add_task_to_workview_filter(task.get_id())
if task.is_workable(): tags = task.get_tags() for tag in tags: if tag.get_attribute("location"): position = eval(tag.get_attribute("location")) if not self.geoclue.compare_position(position[0], position[1], float(self.PROXIMITY_FACTOR)): plugin_api.add_task_to_workview_filter(task.get_id())
def filter_workview_by_location(self, plugin_api): # TODO: if the location has a delay in being calculated it may not exist at # this point if self.location.has_key("latitude") and self.location.has_key("longitude"): tasks = plugin_api.get_all_tasks() tasks_with_location = [] tasks_without_location = [] for tid in tasks: task = plugin_api.get_task(tid) tags = task.get_tags() for tag in tags: if "location" in tag.get_all_attributes(): tasks_with_location.append(task) else: tasks_without_location.append(task) for task in tasks_with_location: tags = task.get_tags() for tag in tags: if tag.get_attribute("location"): position = eval(tag.get_attribute("location")) if not self.geoclue.compare_position(position[0], position[1], float(self.PROXIMITY_FACTOR)): plugin_api.add_task_to_workview_filter(task.get_id())
0ec1d166df5ff4aec0ec6e883459b7cc42da836e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/0ec1d166df5ff4aec0ec6e883459b7cc42da836e/geolocalized-tasks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 1252, 1945, 67, 1637, 67, 3562, 12, 2890, 16, 1909, 67, 2425, 4672, 468, 2660, 30, 309, 326, 2117, 711, 279, 4624, 316, 3832, 8894, 518, 2026, 486, 1005, 622, 468, 333, 1634,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1034, 67, 1252, 1945, 67, 1637, 67, 3562, 12, 2890, 16, 1909, 67, 2425, 4672, 468, 2660, 30, 309, 326, 2117, 711, 279, 4624, 316, 3832, 8894, 518, 2026, 486, 1005, 622, 468, 333, 1634,...
if self.timer is not None: self.timer.stop()
self.continue_updating = False
def canceled(self): if self.timer is not None: self.timer.stop() if self.worker is not None: self.worker.canceled = True self.pd.hide() if not self.callback_called: self.callback(self.worker.path, self.failures, self.worker.error) self.callback_called = True
6e43796c9d041552a0b1e2191ab6d3a34876d2d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/6e43796c9d041552a0b1e2191ab6d3a34876d2d4/add.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17271, 12, 2890, 4672, 365, 18, 17143, 67, 5533, 1776, 273, 1083, 309, 365, 18, 10124, 353, 486, 599, 30, 365, 18, 10124, 18, 10996, 329, 273, 1053, 365, 18, 22353, 18, 11248, 1435, 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, 17271, 12, 2890, 4672, 365, 18, 17143, 67, 5533, 1776, 273, 1083, 309, 365, 18, 10124, 353, 486, 599, 30, 365, 18, 10124, 18, 10996, 329, 273, 1053, 365, 18, 22353, 18, 11248, 1435, 30...
if buf: buf.window=self
def set_buffer(self,buf): if self.buffer: self.buffer.window=None self.buffer=buf if buf: buf.window=self if self.win: self.draw_buffer()
15c8f8c34c52496d37a8a99389c07ba9fa01e1df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12768/15c8f8c34c52496d37a8a99389c07ba9fa01e1df/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 4106, 12, 2890, 16, 4385, 4672, 309, 365, 18, 4106, 30, 365, 18, 4106, 18, 5668, 33, 7036, 365, 18, 4106, 33, 4385, 309, 365, 18, 8082, 30, 365, 18, 9446, 67, 4106, 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, 1, 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, 4106, 12, 2890, 16, 4385, 4672, 309, 365, 18, 4106, 30, 365, 18, 4106, 18, 5668, 33, 7036, 365, 18, 4106, 33, 4385, 309, 365, 18, 8082, 30, 365, 18, 9446, 67, 4106, 1435, ...
elif tds[3].find('span').text == u'ab ':
elif tds[3].find('span').text == 'ab ':
def __init__(self, **kwargs): if kwargs.has_key('origin') and kwargs.has_key('destination'): origin = kwargs['origin'] destination = kwargs['destination'] self.date = kwargs.get('date', datetime.now()) deparr = kwargs.get('deparr', 'dep')
dd568e81c1b8182cd4ce3412e911e6ca45e46cbd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7908/dd568e81c1b8182cd4ce3412e911e6ca45e46cbd/bsag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 4333, 4672, 309, 1205, 18, 5332, 67, 856, 2668, 10012, 6134, 471, 1205, 18, 5332, 67, 856, 2668, 10590, 11, 4672, 4026, 273, 1205, 3292, 10012, 3546,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2826, 4333, 4672, 309, 1205, 18, 5332, 67, 856, 2668, 10012, 6134, 471, 1205, 18, 5332, 67, 856, 2668, 10590, 11, 4672, 4026, 273, 1205, 3292, 10012, 3546,...
api_doc.canonical_name is not UNKNOWN):
api_doc.canonical_name not in (None, UNKNOWN)):
def pp_apidoc(api_doc, doublespace=0, depth=5, exclude=(), include=(), backpointers=None): """ @return: A multiline pretty-printed string representation for the given C{APIDoc}. @param doublespace: If true, then extra lines will be inserted to make the output more readable. @param depth: The maximum depth that pp_apidoc will descend into descendent VarDocs. To put no limit on depth, use C{depth=-1}. @param exclude: A list of names of attributes whose values should not be shown. @param backpointers: For internal use. """ pyid = id(api_doc.__dict__) if backpointers is None: backpointers = {} if (hasattr(api_doc, 'canonical_name') and api_doc.canonical_name is not UNKNOWN): name = '%s for %s' % (api_doc.__class__.__name__, api_doc.canonical_name) elif hasattr(api_doc, 'name') and api_doc.name is not UNKNOWN: name = '%s for %s' % (api_doc.__class__.__name__, api_doc.name) else: name = api_doc.__class__.__name__ if pyid in backpointers: return '%s [%s] (defined above)' % (name, backpointers[pyid]) if depth == 0: if hasattr(api_doc, 'name') and api_doc.name is not None: return '%s...' % api_doc.name else: return '...' backpointers[pyid] = len(backpointers) s = '%s [%s]' % (name, backpointers[pyid]) # Only print non-empty fields: fields = [field for field in api_doc.__dict__.keys() if (field in include or (getattr(api_doc, field) is not UNKNOWN and field not in exclude))] if include: fields = [field for field in dir(api_doc) if field in include] else: fields = [field for field in api_doc.__dict__.keys() if (getattr(api_doc, field) is not UNKNOWN and field not in exclude)] fields.sort() for field in fields: fieldval = getattr(api_doc, field) if doublespace: s += '\n |' s += '\n +- %s' % field if (isinstance(fieldval, types.ListType) and len(fieldval)>0 and isinstance(fieldval[0], APIDoc)): s += _pp_list(api_doc, fieldval, doublespace, depth, exclude, include, backpointers, (field is fields[-1])) elif (isinstance(fieldval, types.DictType) and len(fieldval)>0 and isinstance(fieldval.values()[0], APIDoc)): s += _pp_dict(api_doc, fieldval, doublespace, depth, exclude, include, backpointers, (field is fields[-1])) elif isinstance(fieldval, APIDoc): s += _pp_apidoc(api_doc, fieldval, doublespace, depth, exclude, include, backpointers, (field is fields[-1])) else: s += ' = ' + _pp_val(api_doc, fieldval, doublespace, depth, exclude, include, backpointers) return s
adb57530ab175f96f09b401e5638ab522b163f0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/adb57530ab175f96f09b401e5638ab522b163f0f/apidoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8228, 67, 438, 350, 504, 12, 2425, 67, 2434, 16, 31446, 909, 33, 20, 16, 3598, 33, 25, 16, 4433, 33, 9334, 2341, 33, 9334, 1473, 10437, 87, 33, 7036, 4672, 3536, 632, 2463, 30, 432, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8228, 67, 438, 350, 504, 12, 2425, 67, 2434, 16, 31446, 909, 33, 20, 16, 3598, 33, 25, 16, 4433, 33, 9334, 2341, 33, 9334, 1473, 10437, 87, 33, 7036, 4672, 3536, 632, 2463, 30, 432, ...
This method returns a 5-tuple - a permutation groups and 4 morphisms.
def direct_product(self,other,maps=True): """ Wraps GAP's DirectProduct, Embedding, and Projection. Sage calls GAP's DirectProduct, which chooses an efficient representation for the direct product. The direct product of permutation groups will be a permutation group again. For a direct product D, the GAP operation Embedding(D,i) returns the homomorphism embedding the i-th factor into D. The GAP operation Projection(D,i) gives the projection of D onto the i-th factor. INPUT: - ``self, other`` - permutation groups This method returns a 5-tuple - a permutation groups and 4 morphisms. OUTPUT: - ``D`` - a direct product of the inputs, returned as a permutation group as well - ``iota1`` - an embedding of self into D - ``iota2`` - an embedding of other into D - ``pr1`` - the projection of D onto self (giving a splitting 1 - other - D - self - 1) - ``pr2`` - the projection of D onto other (giving a splitting 1 - self - D - other - 1) EXAMPLES:: sage: G = CyclicPermutationGroup(4) sage: D = G.direct_product(G,False) sage: D Permutation Group with generators [(1,2,3,4), (5,6,7,8)] sage: D,iota1,iota2,pr1,pr2 = G.direct_product(G) sage: D; iota1; iota2; pr1; pr2 Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Cyclic group of order 4 as a permutation group --> Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Cyclic group of order 4 as a permutation group --> Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Permutation Group with generators [(1,2,3,4), (5,6,7,8)] --> Cyclic group of order 4 as a permutation group Homomorphism : Permutation Group with generators [(1,2,3,4), (5,6,7,8)] --> Cyclic group of order 4 as a permutation group :: sage: g=D([(1,3),(2,4)]); g (1,3)(2,4) sage: d=D([(1,4,3,2),(5,7),(6,8)]); d (1,4,3,2)(5,7)(6,8) sage: iota1(g); iota2(g); pr1(d); pr2(d) (1,3)(2,4) (5,7)(6,8) (1,4,3,2) (1,3)(2,4) """ from sage.groups.perm_gps.permgroup_morphism import PermutationGroupMorphism_from_gap G1 = self._gap_init_() G2 = other._gap_init_() cmd1 = "G:=DirectProduct("+G1+","+G2+")" cmd2 = "iota1:=Embedding(G,1)" cmd3 = "iota2:=Embedding(G,2)" cmd4 = "pr1:=Projection(G,1)" cmd5 = "pr2:=Projection(G,2)" if not(maps): return PermutationGroup(gap_group=gap.eval(cmd1)) else: D = PermutationGroup_generic(gap_group=gap.eval(cmd1)) iota1 = PermutationGroupMorphism_from_gap(self,D, cmd2, "iota1") iota2 = PermutationGroupMorphism_from_gap(other,D, cmd3, "iota2") pr1 = PermutationGroupMorphism_from_gap(D,self, cmd4, "pr1") pr2 = PermutationGroupMorphism_from_gap(D,other, cmd5, "pr2") return D,iota1,iota2,pr1,pr2
1a05983ebb3835bbd44e7ffd0287f6bbaee2ac36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/1a05983ebb3835bbd44e7ffd0287f6bbaee2ac36/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2657, 67, 5896, 12, 2890, 16, 3011, 16, 10711, 33, 5510, 4672, 3536, 678, 7506, 611, 2203, 1807, 9908, 4133, 16, 14564, 7459, 16, 471, 21288, 18, 225, 348, 410, 4097, 611, 2203, 1807, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2657, 67, 5896, 12, 2890, 16, 3011, 16, 10711, 33, 5510, 4672, 3536, 678, 7506, 611, 2203, 1807, 9908, 4133, 16, 14564, 7459, 16, 471, 21288, 18, 225, 348, 410, 4097, 611, 2203, 1807, ...
last_name = None
last_name = "LDAP"
def get_or_create_user(self, username, password): if DEBUG: print "ldap-auth: User", username, "*************" from django.contrib.auth.models import User, Group try: user = User.objects.get( username = username ) return user except User.DoesNotExist: pass # User does not exist, # => 1. try to fetch the user from ldap # 2. create django user account with group "ldap" if DEBUG: print "ldap-auth: User", username, "does not exist in django." # Connection to ldap try: ldap.set_option( ldap.OPT_X_TLS_CACERTFILE, settings.AD_CERT_FILE ) ldap.set_option( ldap.OPT_REFERRALS, 0 ) # DO NOT TURN THIS OFF OR SEARCH WON'T WORK! # Initialize if DEBUG: print "ldap-auth: ldap.initialize..." l = ldap.initialize( settings.AD_LDAP_URL ) l.set_option( ldap.OPT_PROTOCOL_VERSION, 3 ) if DEBUG: print "ldap-auth: ldap.bind..." binddn = "%s@%s" % ( username, settings.AD_NT4_DOMAIN ) l.bind_s( binddn, password ) except: print "ldap-auth: ldap connection did not work!" return None
42e084f0f7fdb0c507af7d23b776084f89849a6b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4318/42e084f0f7fdb0c507af7d23b776084f89849a6b/ldap-auth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 280, 67, 2640, 67, 1355, 12, 2890, 16, 2718, 16, 2201, 4672, 309, 6369, 30, 1172, 315, 14394, 17, 1944, 30, 225, 2177, 3113, 2718, 16, 315, 1644, 1007, 7388, 628, 13710, 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, 336, 67, 280, 67, 2640, 67, 1355, 12, 2890, 16, 2718, 16, 2201, 4672, 309, 6369, 30, 1172, 315, 14394, 17, 1944, 30, 225, 2177, 3113, 2718, 16, 315, 1644, 1007, 7388, 628, 13710, 18, ...
sage: G._coset_reduction_data_second_coord() {1: [1], 2: [1], 3: [1], 4: [1], 5: [1], 6: [1], 8: [1], 10: [1], 12: [1], 15: [1], 16: [1], 20: [1], 24: [1, 1151], 25: [1, 49], 30: [1]}
sage: K = G._coset_reduction_data_second_coord().keys() ; K.sort() sage: K == divisors(1200) True
def _coset_reduction_data_second_coord(G): """ Compute data used for determining the canonical coset representative of an element of SL_2(Z) modulo G. This function specfically returns data needed for the first part of the reduction step (the first coordinate).
eb301dff111c888467560bbc7545e7b8e22d5329 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/eb301dff111c888467560bbc7545e7b8e22d5329/congroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14445, 278, 67, 1118, 4062, 67, 892, 67, 8538, 67, 5732, 12, 43, 4672, 3536, 8155, 501, 1399, 364, 23789, 326, 7378, 4987, 278, 23174, 434, 392, 930, 434, 348, 48, 67, 22, 12, 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, 14445, 278, 67, 1118, 4062, 67, 892, 67, 8538, 67, 5732, 12, 43, 4672, 3536, 8155, 501, 1399, 364, 23789, 326, 7378, 4987, 278, 23174, 434, 392, 930, 434, 348, 48, 67, 22, 12, 6...
return ('', 'text/plain;charset=utf-8')
return ('', 'text/plain;charset=utf-8', '.txt')
def convert_content(self, req, mimetype, content, key, filename=None, url=None): """Convert the given content to the target MIME type represented by `key`, which can be either a MIME type or a key. Returns a tuple of (content, output_mime_type, extension).""" if not content: return ('', 'text/plain;charset=utf-8')
76cc6ddbf0445d108e6f4e3e2203ecf65dcf00fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/76cc6ddbf0445d108e6f4e3e2203ecf65dcf00fc/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 1745, 12, 2890, 16, 1111, 16, 12595, 16, 913, 16, 498, 16, 1544, 33, 7036, 16, 880, 33, 7036, 4672, 3536, 2723, 326, 864, 913, 358, 326, 1018, 13195, 618, 10584, 635, 1375, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 1745, 12, 2890, 16, 1111, 16, 12595, 16, 913, 16, 498, 16, 1544, 33, 7036, 16, 880, 33, 7036, 4672, 3536, 2723, 326, 864, 913, 358, 326, 1018, 13195, 618, 10584, 635, 1375, ...
res = gConfig.getOptionsDict("%s/%s" % (storageCFGBase,se)) if not res['OK']: return S_ERROR("SE not known") seStatus = {'Read':True,'Write':True} if (res['Value'].has_key("ReadAccess")) and (res['Value']['ReadAccess'] != 'Active'):
res = gConfig.getOptionsDict( "%s/%s" % ( storageCFGBase, se ) ) if not res['OK']: return S_ERROR( "SE not known" ) seStatus = {'Read':True, 'Write':True} if ( res['Value'].has_key( "ReadAccess" ) ) and ( res['Value']['ReadAccess'] != 'Active' ):
def __SEActive(self,se): storageCFGBase = "/Resources/StorageElements" res = gConfig.getOptionsDict("%s/%s" % (storageCFGBase,se)) if not res['OK']: return S_ERROR("SE not known") seStatus = {'Read':True,'Write':True} if (res['Value'].has_key("ReadAccess")) and (res['Value']['ReadAccess'] != 'Active'): seStatus['Read'] = False if (res['Value'].has_key("WriteAccess")) and (res['Value']['WriteAccess'] != 'Active'): seStatus['Write'] = False return S_OK(seStatus)
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1090, 3896, 12, 2890, 16, 307, 4672, 2502, 19727, 2171, 273, 2206, 3805, 19, 3245, 3471, 6, 400, 273, 314, 809, 18, 588, 1320, 5014, 12, 2213, 87, 5258, 87, 6, 738, 261, 2502, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1090, 3896, 12, 2890, 16, 307, 4672, 2502, 19727, 2171, 273, 2206, 3805, 19, 3245, 3471, 6, 400, 273, 314, 809, 18, 588, 1320, 5014, 12, 2213, 87, 5258, 87, 6, 738, 261, 2502, ...
'raw_begin': [
TOKEN_RAW_BEGIN: [
def __init__(self, environment): # shortcuts c = lambda x: re.compile(x, re.M | re.S) e = re.escape
b3b5802349723ab864cc3531ac9b72a230cb841e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14446/b3b5802349723ab864cc3531ac9b72a230cb841e/lexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3330, 4672, 468, 25641, 276, 273, 3195, 619, 30, 283, 18, 11100, 12, 92, 16, 283, 18, 49, 571, 283, 18, 55, 13, 425, 273, 283, 18, 6939, 2, 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, 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, 1001, 2738, 972, 12, 2890, 16, 3330, 4672, 468, 25641, 276, 273, 3195, 619, 30, 283, 18, 11100, 12, 92, 16, 283, 18, 49, 571, 283, 18, 55, 13, 425, 273, 283, 18, 6939, 2, -100, -10...
os.mknod(check_file, 0666)
os.close(os.open(check_file, os.O_CREAT|os.O_RDWR, 0666))
def __init__(self, path, context): self._path = path self._check_path(self._path) self._console = context['console'] self._locked_files = set(()) context['interruptRegistry'].register(self._unlock_files) # invalidate on tool change check_file = os.path.join(path, self._check_file) if context['jobconf'].get("cache/invalidate-on-tool-change", False): if self._checkToolsNewer(path, check_file, context): context['console'].info("Cleaning compile cache, as tool chain is newer") self._cleanCompileCache() # will also remove checkFile # assure check_file if not os.path.isfile(check_file): os.mknod(check_file, 0666)
43b2f761c4f04eca333c65d91a793fcf8b950f8a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/43b2f761c4f04eca333c65d91a793fcf8b950f8a/Cache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 16, 819, 4672, 365, 6315, 803, 540, 273, 589, 365, 6315, 1893, 67, 803, 12, 2890, 6315, 803, 13, 365, 6315, 8698, 1377, 273, 819, 3292, 8698, 3546, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 589, 16, 819, 4672, 365, 6315, 803, 540, 273, 589, 365, 6315, 1893, 67, 803, 12, 2890, 6315, 803, 13, 365, 6315, 8698, 1377, 273, 819, 3292, 8698, 3546, ...
data['name'] = raw_input('Username: ')
data['name'] = input('Username: ')
def send_metadata(self): ''' Send the metadata to the package index server.
2d1ca2dbabde2ed69e06b50ddb2e87b12958d696 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/2d1ca2dbabde2ed69e06b50ddb2e87b12958d696/register.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 4165, 12, 2890, 4672, 9163, 2479, 326, 1982, 358, 326, 2181, 770, 1438, 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, ...
[ 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 4165, 12, 2890, 4672, 9163, 2479, 326, 1982, 358, 326, 2181, 770, 1438, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
elif self.displayHint and self.__objectIdentifier.isSuperTypeOf(self): return str(self)
elif self.displayHint and self.__objectIdentifier.isSuperTypeOf(value): return str(value)
def prettyOut(self, value): # override asn1 type method """Implements DISPLAY-HINT evaluation""" if self.displayHint and self.__integer.isSuperTypeOf(self): t, f = apply(lambda t, f=0: (t, f), split(self.displayHint, '-')) if t == 'x': return '0x%x' % value elif t == 'd': try: return '%.*f' % (int(f), float(value)/pow(10, int(f))) except StandardError, why: raise error.SmiError( 'float num evaluation error: %s' % why ) elif t == 'o': return '0%o' % value elif t == 'b': v = value; r = ['B'] while v: r.insert(0, '%d' % (v&0x01)) v = v>>1 return join(r, '') else: raise error.SmiError( 'Unsupported numeric type spec: %s' % t ) elif self.displayHint and self.__octetString.isSuperTypeOf(self): r = '' v = str(self) d = self.displayHint while v and d: # 1 if d[0] == '*': repeatIndicator = repeatCount = int(v[0]) d = d[1:]; v = v[1:] else: repeatCount = 1; repeatIndicator = None # 2 octetLength = '' while d and d[0] in digits: octetLength = octetLength + d[0] d = d[1:] try: octetLength = int(octetLength) except StandardError, why: raise error.SmiError( 'Bad octet length: %s' % octetLength ) if not d: raise error.SmiError( 'Short octet length: %s' % self.displayHint ) # 3 displayFormat = d[0] d = d[1:]
6e0ae426aa8f975a3b82a43b5a44ff5a4f9bf178 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/587/6e0ae426aa8f975a3b82a43b5a44ff5a4f9bf178/SNMPv2-TC.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7517, 1182, 12, 2890, 16, 460, 4672, 225, 468, 3849, 12211, 21, 618, 707, 3536, 17516, 25214, 17, 44, 3217, 9873, 8395, 309, 365, 18, 5417, 7002, 471, 365, 16186, 7745, 18, 291, 8051, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7517, 1182, 12, 2890, 16, 460, 4672, 225, 468, 3849, 12211, 21, 618, 707, 3536, 17516, 25214, 17, 44, 3217, 9873, 8395, 309, 365, 18, 5417, 7002, 471, 365, 16186, 7745, 18, 291, 8051, ...
yield ('ticket', _("Opened and closed tickets"))
yield ('ticket', _("Tickets opened and closed"))
def get_timeline_filters(self, req): if 'TICKET_VIEW' in req.perm: yield ('ticket', _("Opened and closed tickets")) if self.timeline_details: yield ('ticket_details', _("Ticket updates"), False)
eae356dc3b44cd6106843fb999a9735b4d1d6cba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2831/eae356dc3b44cd6106843fb999a9735b4d1d6cba/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26237, 67, 6348, 12, 2890, 16, 1111, 4672, 309, 296, 56, 16656, 1584, 67, 12145, 11, 316, 1111, 18, 12160, 30, 2824, 7707, 16282, 2187, 389, 2932, 6264, 2413, 10191, 471, 4375, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 26237, 67, 6348, 12, 2890, 16, 1111, 4672, 309, 296, 56, 16656, 1584, 67, 12145, 11, 316, 1111, 18, 12160, 30, 2824, 7707, 16282, 2187, 389, 2932, 6264, 2413, 10191, 471, 4375, ...
for w_key,cell in
for w_key,hash,cell in
def dict_keys__Dict(space, w_self): return space.newlist([ w_key for w_key,cell in w_self.non_empties()])
a9a72cafc2a01ecab085d2980211916bd9911e63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/a9a72cafc2a01ecab085d2980211916bd9911e63/dictobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2065, 67, 2452, 972, 5014, 12, 2981, 16, 341, 67, 2890, 4672, 327, 3476, 18, 2704, 1098, 3816, 341, 67, 856, 364, 341, 67, 856, 16, 2816, 16, 3855, 316, 341, 67, 2890, 18, 5836, 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, 2065, 67, 2452, 972, 5014, 12, 2981, 16, 341, 67, 2890, 4672, 327, 3476, 18, 2704, 1098, 3816, 341, 67, 856, 364, 341, 67, 856, 16, 2816, 16, 3855, 316, 341, 67, 2890, 18, 5836, 67, ...
icons = [os.path.join("Icons",name) for name in Icons]
icons = [os.path.join(package_dir, "Icons",name) for name in Icons] txts = [os.path.join(package_dir, name) for name in txt_files]
def get_source_files(self): # returns the .py files, the .txt files, and the icons icons = [os.path.join("Icons",name) for name in Icons] return build_py.get_source_files(self)+txt_files+icons
3e0edbf4d8cc7728fb75cb23602ca18c0282c192 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3e0edbf4d8cc7728fb75cb23602ca18c0282c192/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3168, 67, 2354, 12, 2890, 4672, 468, 1135, 326, 263, 2074, 1390, 16, 326, 263, 5830, 1390, 16, 471, 326, 17455, 17455, 273, 306, 538, 18, 803, 18, 5701, 12, 5610, 67, 1214, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 3168, 67, 2354, 12, 2890, 4672, 468, 1135, 326, 263, 2074, 1390, 16, 326, 263, 5830, 1390, 16, 471, 326, 17455, 17455, 273, 306, 538, 18, 803, 18, 5701, 12, 5610, 67, 1214, ...
err.code = self.http_code
err.code = code
def _do_perform(self): if self._complete: return try: self.curl_obj.perform() except pycurl.error, e: # XXX - break some of these out a bit more clearly # to other URLGrabErrors from # http://curl.haxx.se/libcurl/c/libcurl-errors.html # this covers e.args[0] == 22 pretty well - which will be common if str(e.args[1]) == '': # fake it until you make it msg = 'HTTP Error %s : %s ' % (self.http_code, self.url) else: msg = str(e.args[1]) err = URLGrabError(14, msg) err.code = self.http_code err.exception = e raise err
81d5f0fe31eb840f5e9b49afbb319d80ab03d107 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7001/81d5f0fe31eb840f5e9b49afbb319d80ab03d107/grabber.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 16092, 12, 2890, 4672, 309, 365, 6315, 6226, 30, 327, 225, 775, 30, 365, 18, 13504, 67, 2603, 18, 16092, 1435, 1335, 2395, 13504, 18, 1636, 16, 425, 30, 468, 11329, 300,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2896, 67, 16092, 12, 2890, 4672, 309, 365, 6315, 6226, 30, 327, 225, 775, 30, 365, 18, 13504, 67, 2603, 18, 16092, 1435, 1335, 2395, 13504, 18, 1636, 16, 425, 30, 468, 11329, 300,...
raise httpexceptions.Forbidden(
raise httpexceptions.HTTPForbidden(
def find_method(self, servlet, ret_value): possible_actions = [] for name, value in servlet.fields.items(): if name == self.action_name: possible_actions.append(value) elif name.startswith(self.action_name): possible_actions.append(name[len(self.action_name):]) if not possible_actions: return event.Continue if len(possible_actions) > 1: raise httpexceptions.HTTPBadRequest( "More than one action received: %s" % ', '.join(map(repr, possible_actions))) action = possible_actions[0] name, method = self.get_method(servlet, action) if name is None: raise httpexceptions.Forbidden( "Action method not found: %r" % action) if not self.valid_method(name, method): raise httpexceptions.Forbidden( "Method not allowed: %r" % action) return method()
70f1fa9f5e88aa9083802b7f575bcf9862da06dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/70f1fa9f5e88aa9083802b7f575bcf9862da06dc/dispatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 2039, 12, 2890, 16, 8100, 16, 325, 67, 1132, 4672, 3323, 67, 4905, 273, 5378, 364, 508, 16, 460, 316, 8100, 18, 2821, 18, 3319, 13332, 309, 508, 422, 365, 18, 1128, 67, 529...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2039, 12, 2890, 16, 8100, 16, 325, 67, 1132, 4672, 3323, 67, 4905, 273, 5378, 364, 508, 16, 460, 316, 8100, 18, 2821, 18, 3319, 13332, 309, 508, 422, 365, 18, 1128, 67, 529...
items[url_unquote_plus(key)] = value
key = url_unquote_plus(key) try: key = str(key) except UnicodeError: pass items[key] = value
def unserialize(cls, string, secret_key): """Load the secure cookie from a serialized string.""" if isinstance(string, unicode): string = string.encode('utf-8', 'ignore') salt = string[:4] try: base64_hash, data = string[4:].split('?', 1) except (ValueError, IndexError): items = () else: items = {} hash = sha1(secret_key + salt) for item in data.split('&'): hash.update('|' + item) if not '=' in item: items = None break key, value = item.split('=', 1) items[url_unquote_plus(key)] = value
3b1cb999459f564c8d2cc15063f878e381d0d355 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14437/3b1cb999459f564c8d2cc15063f878e381d0d355/securecookie.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10954, 12, 6429, 16, 533, 16, 4001, 67, 856, 4672, 3536, 2563, 326, 8177, 3878, 628, 279, 5343, 533, 12123, 309, 1549, 12, 1080, 16, 5252, 4672, 533, 273, 533, 18, 3015, 2668, 3158, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10954, 12, 6429, 16, 533, 16, 4001, 67, 856, 4672, 3536, 2563, 326, 8177, 3878, 628, 279, 5343, 533, 12123, 309, 1549, 12, 1080, 16, 5252, 4672, 533, 273, 533, 18, 3015, 2668, 3158, 17...
pass
delimiter = ':'
def writerows(self, rows): for fields in rows: print >>self.fileobj, self.p.join(fields)
3d83fdb8cfa8c79be20f94178f7d8d15f42187f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3d83fdb8cfa8c79be20f94178f7d8d15f42187f6/rcsv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24736, 87, 12, 2890, 16, 2595, 4672, 364, 1466, 316, 2595, 30, 1172, 1671, 2890, 18, 768, 2603, 16, 365, 18, 84, 18, 5701, 12, 2821, 13, 2, 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, 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, 24736, 87, 12, 2890, 16, 2595, 4672, 364, 1466, 316, 2595, 30, 1172, 1671, 2890, 18, 768, 2603, 16, 365, 18, 84, 18, 5701, 12, 2821, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
message = '\n'.join(str(entry) for entry in queue_entries if not self.get_agents_for_entry(entry)) if message: email_manager.manager.enqueue_notify_email( 'Unrecovered active host queue entries exist', message)
unrecovered_active_hqes = [entry for entry in queue_entries if not self.get_agents_for_entry(entry)] if unrecovered_active_hqes: message = '\n'.join(str(hqe) for hqe in unrecovered_active_hqes) raise SchedulerError( '%d unrecovered active host queue entries:\n%s' % (len(unrecovered_active_hqes), message))
def _check_for_remaining_active_entries(self): queue_entries = HostQueueEntry.fetch( where='active AND NOT complete AND ' '(aborted OR status != "Pending")')
b2e558386e2b58a5d2983a0999f0f8edb4029223 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/b2e558386e2b58a5d2983a0999f0f8edb4029223/monitor_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 1884, 67, 17956, 67, 3535, 67, 8219, 12, 2890, 4672, 2389, 67, 8219, 273, 4893, 26486, 18, 5754, 12, 1625, 2218, 3535, 4116, 4269, 3912, 4116, 296, 7747, 18623, 329, 4869,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 1884, 67, 17956, 67, 3535, 67, 8219, 12, 2890, 4672, 2389, 67, 8219, 273, 4893, 26486, 18, 5754, 12, 1625, 2218, 3535, 4116, 4269, 3912, 4116, 296, 7747, 18623, 329, 4869,...
Return true iff the ordinal is valid and the second line is blank,
Return true if the ordinal is valid and the second line is blank,
def is_enumerated_list_item(self, ordinal, sequence, format): """ Check validity based on the ordinal value and the second line.
2765b9aef144f7a2faab1e4b2164d48524ffb9ac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1532/2765b9aef144f7a2faab1e4b2164d48524ffb9ac/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 7924, 19007, 67, 1098, 67, 1726, 12, 2890, 16, 12675, 16, 3102, 16, 740, 4672, 3536, 2073, 13800, 2511, 603, 326, 12675, 460, 471, 326, 2205, 980, 18, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 7924, 19007, 67, 1098, 67, 1726, 12, 2890, 16, 12675, 16, 3102, 16, 740, 4672, 3536, 2073, 13800, 2511, 603, 326, 12675, 460, 471, 326, 2205, 980, 18, 2, -100, -100, -100, -10...
"\n".join(difflib.ndiff(map(str, expected_events), map(str, events))))
"\n".join(difflib.ndiff([str(x) for x in expected_events], [str(x) for x in events])))
def compare_events(self, line_offset, events, expected_events): events = [(l - line_offset, e) for (l, e) in events] if events != expected_events: self.fail( "events did not match expectation:\n" + "\n".join(difflib.ndiff(map(str, expected_events), map(str, events))))
7e3360acc41e054f8499942c1d1ea56d0739c92c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/7e3360acc41e054f8499942c1d1ea56d0739c92c/test_trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 5989, 12, 2890, 16, 980, 67, 3348, 16, 2641, 16, 2665, 67, 5989, 4672, 2641, 273, 306, 12, 80, 300, 980, 67, 3348, 16, 425, 13, 364, 261, 80, 16, 425, 13, 316, 2641, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3400, 67, 5989, 12, 2890, 16, 980, 67, 3348, 16, 2641, 16, 2665, 67, 5989, 4672, 2641, 273, 306, 12, 80, 300, 980, 67, 3348, 16, 425, 13, 364, 261, 80, 16, 425, 13, 316, 2641, 65, ...
def GetDeviceCaps(self,capability):
def GetDeviceCaps(self):
def GetDeviceCaps(self,capability): """
688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31102, 24193, 12, 2890, 4672, 3536, 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, ...
[ 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, 31102, 24193, 12, 2890, 4672, 3536, 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, ...
answer.features.sort(cmp=lambda x,y: cmp(x.location.start.position, y.location.start.position))
answer.features.sort(key=lambda x : x.location.start.position)
def reverse_complement(self, id=False, name=False, description=False, features=True, annotations=False, letter_annotations=True, dbxrefs=False): """Returns new SeqRecord with reverse complement sequence.
c5d584910ff870f9b169495efdae6dddb7b00789 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/c5d584910ff870f9b169495efdae6dddb7b00789/SeqRecord.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4219, 67, 2919, 806, 12, 2890, 16, 612, 33, 8381, 16, 508, 33, 8381, 16, 2477, 33, 8381, 16, 4467, 33, 5510, 16, 5617, 33, 8381, 16, 9471, 67, 14670, 33, 5510, 16, 1319, 92, 9316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4219, 67, 2919, 806, 12, 2890, 16, 612, 33, 8381, 16, 508, 33, 8381, 16, 2477, 33, 8381, 16, 4467, 33, 5510, 16, 5617, 33, 8381, 16, 9471, 67, 14670, 33, 5510, 16, 1319, 92, 9316, ...
if source.is_pkg(meta, current):
if source.is_package(meta, current):
def complete(self, meta, input_requirements, debug=False): '''Build the transitive closure of all package dependencies
4a35e5a80787b550258992089b7e128de59be1b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11867/4a35e5a80787b550258992089b7e128de59be1b5/Packages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3912, 12, 2890, 16, 2191, 16, 810, 67, 16175, 16, 1198, 33, 8381, 4672, 9163, 3116, 326, 30442, 7213, 434, 777, 2181, 5030, 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, 3912, 12, 2890, 16, 2191, 16, 810, 67, 16175, 16, 1198, 33, 8381, 4672, 9163, 3116, 326, 30442, 7213, 434, 777, 2181, 5030, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
pidfile = self._PIDS_DIR + "/%s" % instance.name
pidfile, pid, alive = self._InstancePidAlive(instance.name)
def _GenerateKVMRuntime(self, instance, block_devices, extra_args): """Generate KVM information to start an instance.
1f8b3a27a5ac27750b6b5fcf43a1b91f6ee112c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/1f8b3a27a5ac27750b6b5fcf43a1b91f6ee112c9/hv_kvm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4625, 47, 7397, 5576, 12, 2890, 16, 791, 16, 1203, 67, 12506, 16, 2870, 67, 1968, 4672, 3536, 4625, 1475, 7397, 1779, 358, 787, 392, 791, 18, 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, 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, 389, 4625, 47, 7397, 5576, 12, 2890, 16, 791, 16, 1203, 67, 12506, 16, 2870, 67, 1968, 4672, 3536, 4625, 1475, 7397, 1779, 358, 787, 392, 791, 18, 2, -100, -100, -100, -100, -100, -100...
data = take(data, order)
data = data[order]
def _makeoutput(self, scale, coords, radii, colors): if len(colors.shape) == 1: # Greyscales ncol = 1 else: ncol = colors.shape[1] # 1 or 3. assert ncol == 3 # RGB values # If one processor says RGB, all must convert ncolthis = array([ncol]) ncolmax = zeros((1,), ncolthis.typecode()) self.mpi.allreduce(ncolthis, ncolmax, self.MPI.max) ncolmax = ncolmax[0] if ncolmax > ncol: assert ncol == 1 colors = colors[:,NewAxis] + zeros(ncolmax)[NewAxis,:] ncol = ncolmax assert colors.shape == (len(coords), ncol) # Now send data from slaves to master data = zeros((len(coords)+1, 4+ncol), float) data[:-1,:3] = coords data[:-1,3] = radii data[-1,-1] = 4+ncol # Used to communicate shape if ncol == 1: data[:-1,4] = colors else: data[:-1,4:] = colors if not self.master: self.mpi.send(data, 0, self.mpitag) else: total = [data[:-1]] # Last row is the dimensions. n = len(coords) colsmin = colsmax = 4+ncol for proc in range(1, self.mpi.size): self._verb("Receiving from processor "+str(proc)) fdat = self.mpi.receive(float, proc, self.mpitag)[0] fdat.shape = (-1, fdat[-1]) fdat = fdat[:-1] # Last row is the dimensions. total.append(fdat) n = n + len(fdat) if fdat.shape[1] < colsmin: colsmin = fdat.shape[1] if fdat.shape[1] > colsmax: colsmax = fdat.shape[1] self._verb("Merging data") # Some processors may have only greyscales whereas others # may have RGB. That will cause difficulties. trouble = colsmax != colsmin data = zeros((n, colsmax), float) if trouble: assert data.shape[1] == 7 else: assert data.shape[1] == 7 or data.shape[1] == 5 i = 0 for d in total: if not trouble or d.shape[1] == 7: data[i:i+len(d)] = d else: assert d.shape[1] == 5 data[i:i+len(d), :5] = d data[i:i+len(d), 5] = d[4] data[i:i+len(d), 6] = d[4] i = i + len(d) assert i == len(data) # Now all data is on the master self._verb("Sorting merged data") order = argsort(data[:,2]) data = take(data, order) coords = data[:,:3] radii = data[:,3] if data.shape[1] == 5: colors = data[:,4] else: colors = data[:,4:] PrimiPlotter._makeoutput(self, scale, coords, radii, colors)
7745a692403d8195a5e06016cb3a4dec0ad0fbb7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1380/7745a692403d8195a5e06016cb3a4dec0ad0fbb7/primiplotter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 2844, 12, 2890, 16, 3159, 16, 6074, 16, 28125, 16, 5740, 4672, 309, 562, 12, 9724, 18, 4867, 13, 422, 404, 30, 468, 611, 266, 1900, 21177, 290, 1293, 273, 404, 469, 30, 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, 6540, 2844, 12, 2890, 16, 3159, 16, 6074, 16, 28125, 16, 5740, 4672, 309, 562, 12, 9724, 18, 4867, 13, 422, 404, 30, 468, 611, 266, 1900, 21177, 290, 1293, 273, 404, 469, 30, 29...
if binned:
if options.binned:
def commands(options, command, args): if command == 'database': if len(args) == 0: raise CommandException import dbinit mydb = dbinit.MyDB(options) if args[0] == 'drop': if len(args) > 2: raise CommandException mydb.admin() mydb.drop() if len(args) == 2 and args[1] == 'init': mydb.create() mydb.connect() mydb.populate() mydb.close() return if args[0] == 'init': if len(args) > 1: raise CommandException mydb.admin() mydb.create() mydb.connect() mydb.populate() mydb.close() return if args[0] == 'clean': if len(args) > 1: raise CommandException mydb.connect() mydb.clean() return raise CommandException import db, info info.source = db.Database() info.source.host = options.host info.source.db = options.db info.source.passwd = options.passwd info.source.user = options.user info.source.connect() info.source.update_dict(globals()) system = info.source.__dict__[options.system] if type(options.get) is str: info.source.get = options.get if options.runs is None: runs = info.source.allRuns else: rx = re.compile(options.runs) runs = [] for run in info.source.allRuns: if rx.match(run.name): runs.append(run) info.display_run = runs[0].run if command == 'runs': user = None opts, args = getopts(args, '-u') if len(args): raise CommandException for o,a in opts: if o == '-u': user = a info.source.listRuns(user) return if command == 'stats': if len(args) == 0: info.source.listStats() elif len(args) == 1: info.source.listStats(args[0]) else: raise CommandException return if command == 'stat': if len(args) != 1: raise CommandException stats = info.source.getStat(args[0]) for stat in stats: if graph: graphdata(runs, stat.name, stat.name, stat) else: print stat.name printdata(runs, stat) return if command == 'bins': if len(args) == 0: info.source.listBins() elif len(args) == 1: info.source.listBins(args[0]) else: raise CommandException return if command == 'formulas': if len(args) == 0: info.source.listFormulas() elif len(args) == 1: info.source.listFormulas(args[0]) else: raise CommandException return if command == 'samples': if len(args): raise CommandException info.source.listTicks(runs) return if len(args): raise CommandException if command == 'usertime': import copy kernel = copy.copy(system.full_cpu.numCycles) kernel.bins = 'kernel' user = copy.copy(system.full_cpu.numCycles) user.bins = 'user' if graph: graphdata(runs, 'usertime', 'User Fraction', user / system.full_cpu.numCycles) else: printdata(runs, user / system.full_cpu.numCycles) return if command == 'ticks': if binned: print 'kernel ticks' system.full_cpu.numCycles.bins = 'kernel' printdata(runs, system.full_cpu.numCycles) print 'idle ticks' system.full_cpu.numCycles.bins = 'idle' printdata(runs, system.full_cpu.numCycles) print 'user ticks' system.full_cpu.numCycles.bins = 'user' printdata(runs, system.full_cpu.numCycles) print 'total ticks' system.full_cpu.numCycles.bins = None printdata(runs, system.full_cpu.numCycles) return if command == 'packets': packets = system.tsunami.nsgige.rxPackets if graph: graphdata(runs, 'packets', 'Packets', packets) else: printdata(runs, packets) return if command == 'ppt' or command == 'tpp': ppt = system.tsunami.nsgige.rxPackets / sim_ticks printdata(runs, ppt, command == 'tpp') return if command == 'pps': pps = system.tsunami.nsgige.rxPackets / sim_seconds if graph: graphdata(runs, 'pps', 'Packets/s', pps) else: printdata(runs, pps) return if command == 'bpt' or command == 'tpb': bytes = system.tsunami.nsgige.rxBytes + system.tsunami.nsgige.txBytes bpt = bytes / sim_ticks * 8 if graph: graphdata(runs, 'bpt', 'bps / Hz', bpt) else: printdata(runs, bpt, command == 'tpb') return if command == 'bptb' or command == 'tpbb': bytes = system.tsunami.nsgige.rxBytes + system.tsunami.nsgige.txBytes print 'kernel stats' bytes.bins = 'kernel' printdata(runs, bytes / ticks) print 'idle stats' bytes.bins = 'idle' printdata(runs, bytes / ticks) print 'user stats' bytes.bins = 'user' printdata(runs, bytes / ticks) return if command == 'bytes': stat = system.tsunami.nsgige.rxBytes + system.tsunami.nsgige.txBytes if binned: print '%s kernel stats' % stat.name stat.bins = 'kernel' printdata(runs, stat) print '%s idle stats' % stat.name stat.bins = 'idle' printdata(runs, stat) print '%s user stats' % stat.name stat.bins = 'user' printdata(runs, stat) print '%s total stats' % stat.name stat.bins = None printdata(runs, stat) return if command == 'rxbps': gbps = system.tsunami.nsgige.rxBandwidth / 1e9 if graph: graphdata(runs, 'rxbps', 'Bandwidth (Gbps)', gbps) else: printdata(runs, gbps) return if command == 'txbps': gbps = system.tsunami.nsgige.txBandwidth / 1e9 if graph: graphdata(runs, 'txbps', 'Bandwidth (Gbps)', gbps) else: printdata(runs, gbps) return if command == 'bps': rxbps = system.tsunami.nsgige.rxBandwidth txbps = system.tsunami.nsgige.txBandwidth gbps = (rxbps + txbps) / 1e9 if graph: graphdata(runs, 'bps', 'Bandwidth (Gbps)', gbps) else: printdata(runs, gbps) return if command == 'misses': stat = system.L3.overall_mshr_misses if binned: print '%s kernel stats' % stat.name stat.bins = 'kernel' printdata(runs, stat) print '%s idle stats' % stat.name stat.bins = 'idle' printdata(runs, stat) print '%s user stats' % stat.name stat.bins = 'user' printdata(runs, stat) print '%s total stats' % stat.name stat.bins = None if graph: graphdata(runs, 'misses', 'Overall MSHR Misses', stat) else: printdata(runs, stat) return if command == 'mpkb': misses = system.L3.overall_mshr_misses rxbytes = system.tsunami.nsgige.rxBytes txbytes = system.tsunami.nsgige.txBytes if binned: print 'mpkb kernel stats' misses.bins = 'kernel' mpkb = misses / ((rxbytes + txbytes) / 1024) printdata(runs, mpkb) print 'mpkb idle stats' misses.bins = 'idle' mpkb = misses / ((rxbytes + txbytes) / 1024) printdata(runs, mpkb) print 'mpkb user stats' misses.bins = 'user' mpkb = misses / ((rxbytes + txbytes) / 1024) printdata(runs, mpkb) print 'mpkb total stats' mpkb = misses / ((rxbytes + txbytes) / 1024) misses.bins = None if graph: graphdata(runs, 'mpkb', 'Misses / KB', mpkb) else: printdata(runs, mpkb) return if command == 'execute': printdata(runs, system.full_cpu.ISSUE__count) return if command == 'commit': printdata(runs, system.full_cpu.COM__count) return if command == 'fetch': printdata(runs, system.full_cpu.FETCH__count) return if command == 'rxbpp': bpp = system.tsunami.nsgige.rxBytes / system.tsunami.nsgige.rxPackets printdata(run, 8 * bpp) return if command == 'txbpp': bpp = system.tsunami.nsgige.txBytes / system.tsunami.nsgige.txPackets printdata(run, 8 * bpp) return raise CommandException
a40715c98d9a53362cc6c6f7ffdedff4e862ba3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6787/a40715c98d9a53362cc6c6f7ffdedff4e862ba3b/stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4364, 12, 2116, 16, 1296, 16, 833, 4672, 309, 1296, 422, 296, 6231, 4278, 309, 562, 12, 1968, 13, 422, 374, 30, 1002, 3498, 503, 225, 1930, 1319, 2738, 3399, 1966, 273, 1319, 2738, 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, 4364, 12, 2116, 16, 1296, 16, 833, 4672, 309, 1296, 422, 296, 6231, 4278, 309, 562, 12, 1968, 13, 422, 374, 30, 1002, 3498, 503, 225, 1930, 1319, 2738, 3399, 1966, 273, 1319, 2738, 18,...
eval_using_file_cutoff=100)
eval_using_file_cutoff=100, init_code = ['X:=ZX.1;'] )
def __init__(self, max_workspace_size=None, maxread=100000, script_subdirectory=None, restart_on_ctrlc = True, logfile=None, server=None):
1584c579af30fd137259b464f9cecc57d9be513c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/1584c579af30fd137259b464f9cecc57d9be513c/kash.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 943, 67, 14915, 67, 1467, 33, 7036, 16, 943, 896, 33, 21, 11706, 16, 2728, 67, 1717, 5149, 33, 7036, 16, 7870, 67, 265, 67, 16277, 71, 273, 1053, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 943, 67, 14915, 67, 1467, 33, 7036, 16, 943, 896, 33, 21, 11706, 16, 2728, 67, 1717, 5149, 33, 7036, 16, 7870, 67, 265, 67, 16277, 71, 273, 1053, 16, ...
print 'onenter_private:', msg
pass
def onenter_private(self, msg='Oops, no message'): print 'onenter_private:', msg
9a2a7fde79271b1524d5543224804ab0bb674713 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/9a2a7fde79271b1524d5543224804ab0bb674713/test_workflow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 2328, 67, 1152, 12, 2890, 16, 1234, 2218, 51, 4473, 16, 1158, 883, 11, 4672, 1172, 296, 265, 2328, 67, 1152, 30, 2187, 1234, 2, 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, 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, 603, 2328, 67, 1152, 12, 2890, 16, 1234, 2218, 51, 4473, 16, 1158, 883, 11, 4672, 1172, 296, 265, 2328, 67, 1152, 30, 2187, 1234, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
raise ValidationError(_('Multiple tags were given.'))
raise forms.ValidationError(_('Multiple tags were given.'))
def clean_name(self): value = self.cleaned_data['name'] tag_names = parse_tag_input(value) if len(tag_names) > 1: raise ValidationError(_('Multiple tags were given.')) elif len(tag_names[0]) > settings.MAX_TAG_LENGTH: raise forms.ValidationError( _('A tag may be no more than %s characters long.') % settings.MAX_TAG_LENGTH) return value
7904a8333189d8b7e9bf6d25a3143e33c6da028e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3660/7904a8333189d8b7e9bf6d25a3143e33c6da028e/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 529, 12, 2890, 4672, 460, 273, 365, 18, 6200, 329, 67, 892, 3292, 529, 3546, 1047, 67, 1973, 273, 1109, 67, 2692, 67, 2630, 12, 1132, 13, 309, 562, 12, 2692, 67, 1973, 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, 2721, 67, 529, 12, 2890, 4672, 460, 273, 365, 18, 6200, 329, 67, 892, 3292, 529, 3546, 1047, 67, 1973, 273, 1109, 67, 2692, 67, 2630, 12, 1132, 13, 309, 562, 12, 2692, 67, 1973, 13, ...
self._progressLabel.setText(msg_text)
self._progressLabel.setText(text)
def _f_progress_msg(self, text): #bruce 081229 refactoring """ Friend method for use only by present implementation of env.history.progress_msg. Display text in our private label widget dedicated to progress messages. """ self._progressLabel.setText(msg_text) return
00cf881c9c68dfdba9a0665b7a9a836f56cf1eb4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11221/00cf881c9c68dfdba9a0665b7a9a836f56cf1eb4/StatusBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 74, 67, 8298, 67, 3576, 12, 2890, 16, 977, 4672, 468, 2848, 3965, 16314, 2138, 5540, 283, 3493, 6053, 3536, 478, 7522, 707, 364, 999, 1338, 635, 3430, 4471, 434, 1550, 18, 8189, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 74, 67, 8298, 67, 3576, 12, 2890, 16, 977, 4672, 468, 2848, 3965, 16314, 2138, 5540, 283, 3493, 6053, 3536, 478, 7522, 707, 364, 999, 1338, 635, 3430, 4471, 434, 1550, 18, 8189, 1...
items = [self.listbox.item(i) for i in range(self.listbox.count())] if not items: return
self.listboxItems = [] return
def setAllListItems(self, items = None): if not items: items = [self.listbox.item(i) for i in range(self.listbox.count())] if not items: return if type(items[0]) == str: # if items contain strings self.listboxItems = [(item, QListWidgetItem(item)) for item in items] else: # if items contain QListWidgetItems self.listboxItems = [(str(item.text()), QListWidgetItem(item)) for item in items]
eecfbb845614a8d02de574e96c18644292147891 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/eecfbb845614a8d02de574e96c18644292147891/OWGUIEx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30213, 682, 3126, 12, 2890, 16, 1516, 273, 599, 4672, 309, 486, 1516, 30, 365, 18, 1098, 2147, 3126, 273, 5378, 327, 309, 618, 12, 3319, 63, 20, 5717, 422, 609, 30, 6647, 468, 309, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 30213, 682, 3126, 12, 2890, 16, 1516, 273, 599, 4672, 309, 486, 1516, 30, 365, 18, 1098, 2147, 3126, 273, 5378, 327, 309, 618, 12, 3319, 63, 20, 5717, 422, 609, 30, 6647, 468, 309, 1...
return str(self.tree)
if self.tree is None: self.parse() return etree.tounicode(self.tree)
def serializeXHTML(self): return str(self.tree)
3bf9ebed2f619a1c24db9c9ba73698de2a5cee81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11472/3bf9ebed2f619a1c24db9c9ba73698de2a5cee81/Sources.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 60, 4870, 12, 2890, 4672, 327, 609, 12, 2890, 18, 3413, 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, 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, 4472, 60, 4870, 12, 2890, 4672, 327, 609, 12, 2890, 18, 3413, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
'''Override the parent version. Specific drawing code for the object. '''
""" Override the parent version. Specific drawing code for the object. """
def drawSelected(self, obj): '''Override the parent version. Specific drawing code for the object. ''' if isinstance(obj, atom) and (obj.element is Singlet): obj.draw_in_abs_coords(self, env.prefs[bondpointHighlightColor_prefs_key])
7828cbef13f84d50298938f6ae339289db2ec006 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/7828cbef13f84d50298938f6ae339289db2ec006/ThumbView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 7416, 12, 2890, 16, 1081, 4672, 3536, 1439, 326, 982, 1177, 18, 23043, 16327, 981, 364, 326, 733, 18, 3536, 309, 1549, 12, 2603, 16, 3179, 13, 471, 261, 2603, 18, 2956, 353, 348,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3724, 7416, 12, 2890, 16, 1081, 4672, 3536, 1439, 326, 982, 1177, 18, 23043, 16327, 981, 364, 326, 733, 18, 3536, 309, 1549, 12, 2603, 16, 3179, 13, 471, 261, 2603, 18, 2956, 353, 348,...
return ("%9f %9f %9f\n" % (m[0][0], m[0][1], m[0][2])) + \ indent + ("%9f %9f %9f\n" % (m[1][0], m[1][1], m[1][2])) + \ indent + ("%9f %9f %9f" % (m[2][0], m[2][1], m[2][2]))
return ("%9f %9f %9f %9f\n" % (m[0][0], m[0][1], m[0][2], 0)) + \ indent + ("%9f %9f %9f %9f\n" % (m[1][0], m[1][1], m[1][2], 0)) + \ indent + ("%9f %9f %9f %9f\n" % (m[2][0], m[2][1], m[2][2], 0)) + \ indent + ("%9f %9f %9f %9f" % ( 0, 0, 0, 1))
def matrix2str(indent, m): return ("%9f %9f %9f\n" % (m[0][0], m[0][1], m[0][2])) + \ indent + ("%9f %9f %9f\n" % (m[1][0], m[1][1], m[1][2])) + \ indent + ("%9f %9f %9f" % (m[2][0], m[2][1], m[2][2]))
559b49f03654ec3d2ae10f82ed05e0a4ef82d62d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2372/559b49f03654ec3d2ae10f82ed05e0a4ef82d62d/bone_export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 22, 701, 12, 9355, 16, 312, 4672, 327, 1850, 7566, 9, 29, 74, 738, 29, 74, 738, 29, 74, 738, 29, 74, 64, 82, 6, 738, 261, 81, 63, 20, 6362, 20, 6487, 312, 63, 20, 6362, 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, 3148, 22, 701, 12, 9355, 16, 312, 4672, 327, 1850, 7566, 9, 29, 74, 738, 29, 74, 738, 29, 74, 738, 29, 74, 64, 82, 6, 738, 261, 81, 63, 20, 6362, 20, 6487, 312, 63, 20, 6362, 2...
if use_filename and os.path.isfile(str(data[0])):
if use_filename: if os.path.isfile(str(data[0])):
def _parse_vtinfo(self, info, use_filename=True): name = None version = None if use_filename and os.path.isfile(info): name = info else: data = info.split(":") if len(data) >= 2: if use_filename and os.path.isfile(str(data[0])): name = str(data[0]) elif not use_filename: name = str(data[0]) # will try to convert version to int # if it fails, it's a tag name try: #maybe a tag name contains ':' in its name #so we need to bring it back together rest = ":".join(data[1:]) version = int(rest) except ValueError: version = str(rest) elif len(data) == 1: if use_filename and os.path.isfile(str(data[0])): name = str(data[0]) elif not use_filename: name = str(data[0]) return (name, version)
81812ac04e85e651f882cf3133818bd36400e26c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/81812ac04e85e651f882cf3133818bd36400e26c/application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 11734, 1376, 12, 2890, 16, 1123, 16, 999, 67, 3459, 33, 5510, 4672, 508, 273, 599, 1177, 273, 599, 309, 999, 67, 3459, 471, 1140, 18, 803, 18, 291, 768, 12, 1376, 4672...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 67, 11734, 1376, 12, 2890, 16, 1123, 16, 999, 67, 3459, 33, 5510, 4672, 508, 273, 599, 1177, 273, 599, 309, 999, 67, 3459, 471, 1140, 18, 803, 18, 291, 768, 12, 1376, 4672...
license=info.get('license', 'GPL-2'),
license='GPL-3',
def add_defaults(self): sdist.sdist.add_defaults(self) if self.distribution.has_pure_modules(): build_py = self.get_finalized_command('build_py') data = [] for package in build_py.packages: src_dir = build_py.get_package_dir(package) data.extend(build_py.find_data_files(package, src_dir)) self.filelist.extend(data)
fc5b371d92a8c28d4d8d226ba6488c6e879f17f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9276/fc5b371d92a8c28d4d8d226ba6488c6e879f17f0/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7606, 12, 2890, 4672, 272, 4413, 18, 87, 4413, 18, 1289, 67, 7606, 12, 2890, 13, 309, 365, 18, 16279, 18, 5332, 67, 84, 594, 67, 6400, 13332, 1361, 67, 2074, 273, 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, 527, 67, 7606, 12, 2890, 4672, 272, 4413, 18, 87, 4413, 18, 1289, 67, 7606, 12, 2890, 13, 309, 365, 18, 16279, 18, 5332, 67, 84, 594, 67, 6400, 13332, 1361, 67, 2074, 273, 365, 18, ...
logging.debug('thread %s starting' % (self.getName()))
logging.debug('%s starting' % (self.getName()))
def run(self): """Delegate main work to a helper method and watch for uncaught exceptions.""" self._start_time = time.time() self._num_tests = 0 try: logging.debug('thread %s starting' % (self.getName())) self._Run(test_runner=None, result_summary=None) logging.debug('thread %s done (%d tests)' % (self.getName(), self.GetNumTests())) except: # Save the exception for our caller to see. self._exception_info = sys.exc_info() self._stop_time = time.time() # Re-raise it and die. logging.error('thread %s dying: %s' % (self.getName(), self._exception_info)) raise self._stop_time = time.time()
40c96f0c5a2f83beb57d9a3497683fb5e2112dfa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/40c96f0c5a2f83beb57d9a3497683fb5e2112dfa/test_shell_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 9586, 2774, 1440, 358, 279, 4222, 707, 471, 4267, 364, 6301, 16510, 4798, 12123, 365, 6315, 1937, 67, 957, 273, 813, 18, 957, 1435, 365, 6315, 2107, 67, 16341...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3536, 9586, 2774, 1440, 358, 279, 4222, 707, 471, 4267, 364, 6301, 16510, 4798, 12123, 365, 6315, 1937, 67, 957, 273, 813, 18, 957, 1435, 365, 6315, 2107, 67, 16341...
def footer(self):
def __del__(self):
def footer(self): self.fd.write('</div>\n') self.fd.write('<p>\n<a href="http://sourceforge.net/projects/pyx12/">pyx12 project page</a>\n</p>\n') self.fd.write('</body>\n</html>\n')
7fbaaeadcaeebaa40baf77b85be7eb834ad6e26e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11528/7fbaaeadcaeebaa40baf77b85be7eb834ad6e26e/error_html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 365, 18, 8313, 18, 2626, 2668, 1757, 2892, 5333, 82, 6134, 365, 18, 8313, 18, 2626, 2668, 32, 84, 5333, 82, 32, 69, 3897, 1546, 2505, 2207, 3168, 1884,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3771, 972, 12, 2890, 4672, 365, 18, 8313, 18, 2626, 2668, 1757, 2892, 5333, 82, 6134, 365, 18, 8313, 18, 2626, 2668, 32, 84, 5333, 82, 32, 69, 3897, 1546, 2505, 2207, 3168, 1884,...
public.write(self._class_tree_item(uid, filter_private=0)) private.write(self._class_tree_item(uid, filter_private=1)) str = '</ul>\n' public.write(str); private.write(str)
self._write_class_tree_item(public, private, uid) _write_if_nonempty(public, private, uids, '</ul>\n') def _write_class_tree_item(self, public, private, uid, depth=2, public_base=1): """ Write HTML code for a list item describing a class and all of its subclasses. This is used by L{_write_class_tree} to write the class hierarchy. @param public: The output stream for the public version of the page. @param private: The output stream for the private version of the page. @param uid: The C{UID} of the class tree to describe @param depth: The indentation depth. @param public_base: True if output should be generated for the public stream. This is prevents public classes with private bases from being listed. @bug: This doesn't generate </li> close tags. """ doc = self._docmap.get(uid) str = ' '*depth + '<li> <b>' + self._uid_to_href(uid)+'</b>' if doc and doc.descr(): str += ': <i>\n' + self._summary(doc, uid) + '</i>' str += '\n' private.write(str) if uid.is_public() and public_base: public.write(str) if doc is None: return subclasses = [l.target() for l in doc.subclasses()] if not subclasses: return str = ' '*depth + ' <ul>\n' if not public_base: private.write(str) else: _write_if_nonempty(public, private, subclasses, str) for subclass in subclasses: self._write_class_tree_item(public, private, subclass, depth, public_base and uid.is_public()) str = ' '*depth + ' </ul>\n' if not public_base: private.write(str) else: _write_if_nonempty(public, private, subclasses, str)
def _write_class_tree(self, public, private): """ @return: The HTML code for the class hierarchy tree. This is used by L{_trees_to_html} to construct the hierarchy page. @rtype: C{string} """ str = '<ul>\n' public.write(str); private.write(str)
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 1106, 67, 3413, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 326, 667, 9360, 2151, 18, 225, 1220, 353, 1399, 635, 511, 95, 67, 17204, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 67, 1106, 67, 3413, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 326, 667, 9360, 2151, 18, 225, 1220, 353, 1399, 635, 511, 95, 67, 17204, ...
flags['relro'] = '0'
flags['relro'] = 0
def get_binary_flags(self, file): """ Function to get binary flags from a file """ flags = {}
db3e09aa0517efc638ded0f40524a2b41dc13d44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11154/db3e09aa0517efc638ded0f40524a2b41dc13d44/binary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8578, 67, 7133, 12, 2890, 16, 585, 4672, 3536, 4284, 358, 336, 3112, 2943, 628, 279, 585, 3536, 2943, 273, 2618, 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, 336, 67, 8578, 67, 7133, 12, 2890, 16, 585, 4672, 3536, 4284, 358, 336, 3112, 2943, 628, 279, 585, 3536, 2943, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "Show pixmap"
def showPixmap(self): print "Show pixmap" self.state = self.SHOWN self.instance.show()
68a0e8a6af4fce4f9873ce7c5c9ac93baffd7af2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/68a0e8a6af4fce4f9873ce7c5c9ac93baffd7af2/Pixmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 21816, 1458, 12, 2890, 4672, 365, 18, 2019, 273, 365, 18, 2664, 51, 5665, 365, 18, 1336, 18, 4500, 1435, 2, 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, 2405, 21816, 1458, 12, 2890, 4672, 365, 18, 2019, 273, 365, 18, 2664, 51, 5665, 365, 18, 1336, 18, 4500, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
(0.1.0101.1)
(0, 1, 0101, 1)
def crochemore_factorization(self): r""" Returns the Crochemore factorization of self as an ordered list of factors. The *Crochemore factorization* of a finite word `w` is the unique factorization: `(x_1, x_2, \ldots, x_n)` of `w` with each `x_i` satisfying either: C1. `x_i` is a letter that does not appear in `u = x_1\ldots x_{i-1}`; C2. `x_i` is the longest prefix of `v = x_i\ldots x_n` that also has an occurrence beginning within `u = x_1\ldots x_{i-1}`. See [1]. .. note::
5d95314847705862dc3fe746c7aff44f4caaa2bf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/5d95314847705862dc3fe746c7aff44f4caaa2bf/word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 303, 1036, 479, 67, 6812, 1588, 12, 2890, 4672, 436, 8395, 2860, 326, 385, 303, 1036, 479, 5578, 1588, 434, 365, 487, 392, 5901, 666, 434, 14490, 18, 225, 1021, 380, 39, 303, 1036...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 276, 303, 1036, 479, 67, 6812, 1588, 12, 2890, 4672, 436, 8395, 2860, 326, 385, 303, 1036, 479, 5578, 1588, 434, 365, 487, 392, 5901, 666, 434, 14490, 18, 225, 1021, 380, 39, 303, 1036...
assert (RPath(self.lc, self.mainprefix, ("sampledir",)).listdir() == ["1", "2", "3", "4"])
dirlist = RPath(self.lc, self.mainprefix, ("sampledir",)).listdir() dirlist.sort() assert dirlist == ["1", "2", "3", "4"], dirlist
def testListdir(self): """Checking dir listings""" assert (RPath(self.lc, self.mainprefix, ("sampledir",)).listdir() == ["1", "2", "3", "4"])
960588457676206b06721d1e6d15a32abb1491f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/783/960588457676206b06721d1e6d15a32abb1491f0/rpathtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 682, 1214, 12, 2890, 4672, 3536, 14294, 1577, 666, 899, 8395, 1815, 261, 54, 743, 12, 2890, 18, 17704, 16, 365, 18, 5254, 3239, 16, 7566, 6358, 1214, 3113, 13, 2934, 1098, 1214, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 682, 1214, 12, 2890, 4672, 3536, 14294, 1577, 666, 899, 8395, 1815, 261, 54, 743, 12, 2890, 18, 17704, 16, 365, 18, 5254, 3239, 16, 7566, 6358, 1214, 3113, 13, 2934, 1098, 1214, ...
D = DiGraph()
G = DiGraph()
def disjunctive_product(self, other): """ Returns the disjunctive product of self and other. The disjunctive product of G and H is the graph L with vertex set V(L) equal to the Cartesian product of the vertices V(G) and V(H), and ((u,v), (w,x)) is an edge iff either - (u, w) is an edge of self, or - (v, x) is an edge of other. EXAMPLES: sage: Z = graphs.CompleteGraph(2) sage: D = Z.disjunctive_product(Z); D Graph on 4 vertices sage: D.plot().save('sage.png') sage: C = graphs.CycleGraph(5) sage: D = C.disjunctive_product(Z); D Graph on 10 vertices sage: D.plot().save('sage.png')
9e5a0b8487ad265ff6722bd2023dae48049f497c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/9e5a0b8487ad265ff6722bd2023dae48049f497c/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1015, 78, 6931, 688, 67, 5896, 12, 2890, 16, 1308, 4672, 3536, 2860, 326, 1015, 78, 6931, 688, 3017, 434, 365, 471, 1308, 18, 225, 1021, 1015, 78, 6931, 688, 3017, 434, 611, 471, 670, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1015, 78, 6931, 688, 67, 5896, 12, 2890, 16, 1308, 4672, 3536, 2860, 326, 1015, 78, 6931, 688, 3017, 434, 365, 471, 1308, 18, 225, 1021, 1015, 78, 6931, 688, 3017, 434, 611, 471, 670, ...
self.maxRescheduling = gConfig.getValue( self.cs_path+'/MaxRescheduling', 30)
self.maxRescheduling = gConfig.getValue( self.cs_path+'/MaxRescheduling', 3 )
def __init__( self, maxQueueSize=10 ): """ Standard Constructor """
da05d7d15c34b8551ea50197837747d640d69631 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/da05d7d15c34b8551ea50197837747d640d69631/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 943, 3183, 1225, 33, 2163, 262, 30, 3536, 8263, 11417, 3536, 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,...
[ 1, 1, 1, 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, 1001, 2738, 972, 12, 365, 16, 943, 3183, 1225, 33, 2163, 262, 30, 3536, 8263, 11417, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
}
'zh': (u'機器人 ', u'正在新增', u'移除', u'修改'), }
def sorted(seq, cmp=None, key=None, reverse=False): """Copy seq and sort and return it. >>> sorted([3, 1, 2]) [1, 2, 3] """ seq2 = copy.copy(seq) if key: if cmp == None: cmp = __builtins__.cmp seq2.sort(lambda x,y: cmp(key(x), key(y))) else: if cmp == None: seq2.sort() else: seq2.sort(cmp) if reverse: seq2.reverse() return seq2
dd07a32676db8232476b37379d97ea228e19f56d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/dd07a32676db8232476b37379d97ea228e19f56d/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3115, 12, 5436, 16, 9411, 33, 7036, 16, 498, 33, 7036, 16, 4219, 33, 8381, 4672, 3536, 2951, 3833, 471, 1524, 471, 327, 518, 18, 4080, 3115, 3816, 23, 16, 404, 16, 576, 5717, 306, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3115, 12, 5436, 16, 9411, 33, 7036, 16, 498, 33, 7036, 16, 4219, 33, 8381, 4672, 3536, 2951, 3833, 471, 1524, 471, 327, 518, 18, 4080, 3115, 3816, 23, 16, 404, 16, 576, 5717, 306, 21...
zopen1 = zipf.open('ones') zopen2 = zipf.open('twos') data1 = zopen1.read(500) data2 = zopen2.read(500) data1 += zopen1.read(500) data2 += zopen2.read(500)
with zipf.open('ones') as zopen1, zipf.open('twos') as zopen2: data1 = zopen1.read(500) data2 = zopen2.read(500) data1 += zopen1.read(500) data2 += zopen2.read(500)
def test_different_file(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. with zipfile.ZipFile(TESTFN2, mode="r") as zipf: zopen1 = zipf.open('ones') zopen2 = zipf.open('twos') data1 = zopen1.read(500) data2 = zopen2.read(500) data1 += zopen1.read(500) data2 += zopen2.read(500) self.assertEqual(data1, b'1'*FIXEDTEST_SIZE) self.assertEqual(data2, b'2'*FIXEDTEST_SIZE)
8fb9b868bd8415347ffa608eec324055ff9f66d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/8fb9b868bd8415347ffa608eec324055ff9f66d7/test_zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30738, 67, 768, 12, 2890, 4672, 468, 8553, 716, 261, 13723, 326, 18364, 353, 316, 3325, 434, 4979, 585, 2184, 13, 468, 3229, 1696, 1435, 4097, 848, 506, 7165, 2887, 1554, 586, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 30738, 67, 768, 12, 2890, 4672, 468, 8553, 716, 261, 13723, 326, 18364, 353, 316, 3325, 434, 4979, 585, 2184, 13, 468, 3229, 1696, 1435, 4097, 848, 506, 7165, 2887, 1554, 586, ...
self._owner.UnregisterHandler('iq',self._DiscoveryHandler,ns=NS_DISCO_INFO) self._owner.UnregisterHandler('iq',self._DiscoveryHandler,ns=NS_DISCO_ITEMS)
self._owner.UnregisterHandler('iq',self._DiscoveryHandler,typ='get',ns=NS_DISCO_INFO) self._owner.UnregisterHandler('iq',self._DiscoveryHandler,typ='get',ns=NS_DISCO_ITEMS)
def plugout(self): """ Unregisters browser's iq handlers from your application dispatcher instance. Used internally.""" self._owner.UnregisterHandler('iq',self._DiscoveryHandler,ns=NS_DISCO_INFO) self._owner.UnregisterHandler('iq',self._DiscoveryHandler,ns=NS_DISCO_ITEMS)
6d400509f1b213c5063975cbee9c8fc3f0c4c1ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7194/6d400509f1b213c5063975cbee9c8fc3f0c4c1ab/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15852, 659, 12, 2890, 4672, 3536, 1351, 22559, 4748, 1807, 24288, 4919, 628, 3433, 2521, 7393, 791, 18, 10286, 12963, 12123, 365, 6315, 8443, 18, 30076, 1503, 2668, 18638, 2187, 2890, 6315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15852, 659, 12, 2890, 4672, 3536, 1351, 22559, 4748, 1807, 24288, 4919, 628, 3433, 2521, 7393, 791, 18, 10286, 12963, 12123, 365, 6315, 8443, 18, 30076, 1503, 2668, 18638, 2187, 2890, 6315, ...
PanedBrowser.Pane.set_restore([sel.split("\t") for sel in selected])
pane_values = [sel.split("\t") for sel in selected] for pane in pane_values: try: if int(pane[0]): pane[0] = None else: del pane[0] except (ValueError, IndexError): pass PanedBrowser.Pane.set_restore(pane_values)
def restore(self): super(PanedBrowser, self).restore() selected = config.get("browsers", "pane_selection").split("\n") PanedBrowser.Pane.set_restore([sel.split("\t") for sel in selected])
65c353a2f58dd189cd3918d5836dbf8ca05e5f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4764/65c353a2f58dd189cd3918d5836dbf8ca05e5f5f/paned.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 12, 2890, 4672, 2240, 12, 4069, 329, 9132, 16, 365, 2934, 13991, 1435, 3170, 273, 642, 18, 588, 2932, 70, 13221, 3113, 315, 29009, 67, 10705, 20387, 4939, 31458, 82, 7923, 12913, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 12, 2890, 4672, 2240, 12, 4069, 329, 9132, 16, 365, 2934, 13991, 1435, 3170, 273, 642, 18, 588, 2932, 70, 13221, 3113, 315, 29009, 67, 10705, 20387, 4939, 31458, 82, 7923, 12913, 3...
cl.desc = f['description']
if cl.local and cl.original_author and cl.desc: pass else: cl.desc = f['description']
def LoadCL(ui, repo, name, web=True): if not GoodCLName(name): return None, "invalid CL name" dir = CodeReviewDir(ui, repo) path = dir + "cl." + name if os.access(path, 0): ff = open(path) text = ff.read() ff.close() cl, lineno, err = ParseCL(text, name) if err != "": return None, "malformed CL data: "+err cl.local = True else: cl = CL(name) if web: try: f = GetSettings(name) except: return None, "cannot load CL %s from code review server: %s" % (name, ExceptionDetail()) if 'reviewers' not in f: return None, "malformed response loading CL data from code review server" cl.reviewer = SplitCommaSpace(f['reviewers']) cl.cc = SplitCommaSpace(f['cc']) cl.desc = f['description'] cl.url = server_url_base + name cl.web = True return cl, ''
a3457ef8d0648352bc776690b76c5c60c8f0010b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5761/a3457ef8d0648352bc776690b76c5c60c8f0010b/codereview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 5017, 12, 4881, 16, 3538, 16, 508, 16, 3311, 33, 5510, 4672, 309, 486, 31732, 5017, 461, 12, 529, 4672, 327, 599, 16, 315, 5387, 14934, 508, 6, 1577, 273, 3356, 9159, 1621, 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, 4444, 5017, 12, 4881, 16, 3538, 16, 508, 16, 3311, 33, 5510, 4672, 309, 486, 31732, 5017, 461, 12, 529, 4672, 327, 599, 16, 315, 5387, 14934, 508, 6, 1577, 273, 3356, 9159, 1621, 12, ...
imd.bundles.append(b)
imd.bundles.add(b)
def merge_additional_groups(self, imd, groups): for group in groups: if group in self.categories and \ self.categories[group] in imd.categories: continue nb, ng, _ = self.groups.get(group, (list(), [group], dict())) for b in nb: if b not in imd.bundles: imd.bundles.append(b) for g in ng: if g not in imd.groups: if g in self.categories and \ self.categories[g] in imd.categories: continue imd.groups.append(g)
da539a752053757bec3d4740269300d8d2b2c74e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/da539a752053757bec3d4740269300d8d2b2c74e/Metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 67, 13996, 67, 4650, 12, 2890, 16, 709, 72, 16, 3252, 4672, 364, 1041, 316, 3252, 30, 309, 1041, 316, 365, 18, 8995, 471, 521, 365, 18, 8995, 63, 1655, 65, 316, 709, 72, 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, 2691, 67, 13996, 67, 4650, 12, 2890, 16, 709, 72, 16, 3252, 4672, 364, 1041, 316, 3252, 30, 309, 1041, 316, 365, 18, 8995, 471, 521, 365, 18, 8995, 63, 1655, 65, 316, 709, 72, 18, ...
chandlerdb = 'release/lib/python2.4/site-packages/chandlerdb'
chandlerdb = 'release/lib/python2.4/site-packages/chandlerdb'
def generateDocs(options, outputDir): if options.verbose: verbosity = 4 else: verbosity = 1 if sys.platform == 'cygwin': chandlerdb = 'release/bin/Lib/site-packages/chandlerdb' queryparser = 'release/bin/Lib/site-packages/QueryParser.py' elif sys.platform == 'darwin': chandlerdb = 'release/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/chandlerdb' queryparser = 'release/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/QueryParser.py' else: chandlerdb = 'release/lib/python2.4/site-packages/chandlerdb' queryparser = 'release/lib/python2.4/site-packages/QueryParser.py' chandlerBin = os.getenv('CHANDLERBIN') chandlerdb = os.path.join(chandlerBin, chandlerdb) queryparser = os.path.join(chandlerBin, queryparser) targetDir = os.path.join(outputDir, 'api') if not os.path.isdir(targetDir): _mkdirs(targetDir) # This is the options dictionary # It is used by most of the epydoc routines and # the contents were determined by examining epydoc/gui.py # and epydoc/cli.py e_options = { 'target': targetDir, 'verbosity': verbosity, 'prj_name': 'Chandler', 'action': 'html', 'tests': { 'basic': 1 }, 'show_imports': 0, 'frames': 1, 'private': 0, 'debug': 0, 'docformat': None, 'top': None, 'inheritance': "listed", 'alphabetical': 1, 'ignore_param_mismatch': 1, 'list_classes_separately': 0, 'modules': ['application', 'crypto', 'i18n', 'parcels/core', 'parcels/feeds', 'parcels/osaf', 'parcels/osaf/app', 'parcels/osaf/examples', 'parcels/osaf/framework', 'parcels/osaf/mail', 'parcels/osaf/pim', 'parcels/osaf/servlets', 'parcels/osaf/sharing', 'parcels/osaf/tests', 'parcels/osaf/views', 'parcels/photos', 'repository', 'samples/skeleton', 'tools', 'util', 'Chandler.py', 'version.py', chandlerdb, # This comes from internal queryparser # This comes from external ], } # based on the code in epydoc's gui.py # with subtle changes made to make it work :) from epydoc.html import HTMLFormatter from epydoc.objdoc import DocMap, report_param_mismatches from epydoc.imports import import_module, find_modules from epydoc.objdoc import set_default_docformat set_default_docformat('epytext') try: modules = [] module_names = e_options['modules'] # walk thru list of modules and expand # any packages found for name in module_names[:]: if os.path.isdir(name): index = module_names.index(name) new_modules = find_modules(name) if new_modules: module_names[index:index+1] = new_modules elif options.verbose: print 'Error: %s is not a package' % name # basic regex to exclude directories from consideration exc = re.compile(".*tests.*|.*scripts.*") for name in module_names: if exc.match(name): continue if options.verbose: print 'IMPORT: %s' % name # try importing the module and # add it to the list if successful try: module = import_module(name) if module not in modules: modules.append(module) elif options.verbose: print ' (duplicate)' except ImportError, e: if options.verbose: print e if len(modules) == 0: print 'Error: no modules successfully loaded!' sys.exit(1) document_bases = 1 document_autogen_vars = 1 inheritance_groups = (e_options['inheritance'] == 'grouped') inherit_groups = (e_options['inheritance'] != 'grouped') # let epydoc create an empty document map d = DocMap(verbosity, document_bases, document_autogen_vars, inheritance_groups, inherit_groups) # walk the module list and let epydoc build the documentation for (module, num) in zip(modules, range(len(modules))): if options.verbose: print '\n***Building docs for %s***' % module.__name__ try: d.add(module) except Exception, e: print "Internal Error: %s" % e except: print "Internal Error" if not e_options['ignore_param_mismatch']: if not report_param_mismatches(d): print ' (To supress these warnings, use --ignore-param-mismatch)' htmldoc = HTMLFormatter(d, **e_options) numfiles = htmldoc.num_files() def progress_callback(path, numfiles=numfiles, progress=None, cancel=None, num=[1]): (dir, file) = os.path.split(path) (root, d) = os.path.split(dir) if d in ('public', 'private'): fname = os.path.join(d, file) else: fname = file if options.verbose: print '\n***Writing %s***' % fname # Write the documentation. print "\n***Saving to %s" % targetDir htmldoc.write(targetDir, progress_callback) except Exception, e: print 'Internal error: ', e raise except: raise
fce62371f5cf16ac95cd91346290b13b91132164 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/fce62371f5cf16ac95cd91346290b13b91132164/gen_docs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12656, 12, 2116, 16, 21412, 4672, 309, 702, 18, 11369, 30, 11561, 273, 1059, 469, 30, 11561, 273, 404, 225, 309, 2589, 18, 9898, 422, 296, 2431, 75, 8082, 4278, 462, 464, 749, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 12656, 12, 2116, 16, 21412, 4672, 309, 702, 18, 11369, 30, 11561, 273, 1059, 469, 30, 11561, 273, 404, 225, 309, 2589, 18, 9898, 422, 296, 2431, 75, 8082, 4278, 462, 464, 749, 19...
"""
r"""
def to_list(self): """ Return self as a list.
4f1a7624d729b435a08de3ec20b5fdfc1c38db63 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/4f1a7624d729b435a08de3ec20b5fdfc1c38db63/partition.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 1098, 12, 2890, 4672, 436, 8395, 2000, 365, 487, 279, 666, 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, 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, 358, 67, 1098, 12, 2890, 4672, 436, 8395, 2000, 365, 487, 279, 666, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
height / lineHeight - 5)
height / lineHeight)
def initializeViewSettings (self, numColumns = 3): width, height = self.GetClientSizeTuple () lineHeight = self.TextHeight (0) charWidth = self.TextWidth (stc.STC_STYLE_DEFAULT, 'a')
d4d5025883f3e177ccf2d2d5f825533c4b0e24a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9028/d4d5025883f3e177ccf2d2d5f825533c4b0e24a4/candy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 1767, 2628, 261, 2890, 16, 30109, 273, 890, 4672, 1835, 16, 2072, 273, 365, 18, 967, 1227, 1225, 9038, 1832, 980, 2686, 273, 365, 18, 1528, 2686, 261, 20, 13, 1149, 2384, 273, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 1767, 2628, 261, 2890, 16, 30109, 273, 890, 4672, 1835, 16, 2072, 273, 365, 18, 967, 1227, 1225, 9038, 1832, 980, 2686, 273, 365, 18, 1528, 2686, 261, 20, 13, 1149, 2384, 273, 36...