rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
sage: time E.rank(), len(E.S_integral_points([3,5,7]))
sage: E.rank(), len(E.S_integral_points([3,5,7]))
def S_integral_points(self, S, mw_base='auto', both_signs=False, verbose=False, proof=None): """ Computes all S-integral points (up to sign) on this elliptic curve. INPUT: S -- list of primes mw_base -- list of EllipticCurvePoint generating the Mordell-Weil group of E (default: 'auto' - calls self.gens()) both_signs -- True/False (default False): if True the output contains both P and -P, otherwise only one of each pair. verbose -- True/False (default False): if True, some details of the computation are output. proof -- True/False (default True): if True ALL S-integral points will be returned. If False, the MW basis will be computed with the proof=False flag, and also the time-consuming final call to S_integral_x_coords_with_abs_bounded_by(abs_bound) is omitted. Use this only if the computation takes too long, but be warned that then it cannot be guaranteed that all S-integral points will be found. OUTPUT: A sorted list of all the S-integral points on E (up to sign unless both_signs is True) NOTES: The complexity increases exponentially in the rank of curve E and in the length of S. The computation time (but not the output!) depends on the Mordell-Weil basis. If mw_base is given but is not a basis for the Mordell-Weil group (modulo torsion), S-integral points which are not in the subgroup generated by the given points will almost certainly not be listed. EXAMPLES: A curve of rank 3 with no torsion points sage: E=EllipticCurve([0,0,1,-7,6]) sage: P1=E.point((2,0)); P2=E.point((-1,3)); P3=E.point((4,6)) sage: a=E.S_integral_points(S=[2,3], mw_base=[P1,P2,P3], verbose=True);a max_S: 3 len_S: 3 len_tors: 1 lambda 0.485997517468082 k1,k2,k3,k4 6.68597129142710e234 1.31952866480763 3.31908110593519e9 2.42767548272846e17 mw_base [(1 : -1 : 1), (2 : 0 : 1), (0 : -3 : 1)] mw_base_log [0.667789378224099, 0.552642660712417, 0.818477222895703] mp [5, 7] mw_base_p_log [[2^2 + 2^3 + 2^6 + 2^7 + 2^8 + 2^9 + 2^14 + 2^15 + 2^18 + 2^19 + O(2^20), 2^2 + 2^3 + 2^5 + 2^6 + 2^9 + 2^11 + 2^12 + 2^14 + 2^15 + 2^16 + 2^18 + O(2^20), 2 + 2^3 + 2^6 + 2^7 + 2^8 + 2^9 + 2^11 + 2^12 + 2^13 + 2^16 + 2^17 + 2^19 + O(2^20)], [2*3^2 + 2*3^5 + 2*3^6 + 2*3^7 + 3^8 + 3^9 + 2*3^10 + 3^12 + 2*3^14 + 3^15 + 3^17 + 2*3^19 + O(3^20), 2*3 + 2*3^2 + 2*3^3 + 2*3^4 + 2*3^6 + 2*3^7 + 2*3^8 + 3^10 + 2*3^12 + 3^13 + 2*3^14 + 3^15 + 3^18 + O(3^20), 3 + 3^2 + 2*3^3 + 3^6 + 2*3^7 + 2*3^8 + 3^9 + 2*3^11 + 2*3^12 + 2*3^13 + 3^15 + 2*3^16 + 3^18 + 2*3^19 + O(3^20)]] k5,k6,k7 0.321154513240167 1.55246328915541 0.161999172489361 initial bound 2.62270974833657e117 bound_list [58, 58, 58] bound_list [8, 9, 9] bound_list [8, 7, 7] bound_list [8, 7, 7] starting search of points using coefficient bound 8 x-coords of S-integral points via linear combination of mw_base and torsion: [-3, -26/9, -8159/2916, -2759/1024, -151/64, -1343/576, -2, -7/4, -1, -47/256, 0, 1/4, 4/9, 9/16, 58/81, 7/9, 6169/6561, 1, 17/16, 2, 33/16, 172/81, 9/4, 25/9, 3, 31/9, 4, 25/4, 1793/256, 8, 625/64, 11, 14, 21, 37, 52, 6142/81, 93, 4537/36, 342, 406, 816, 207331217/4096] starting search of extra S-integer points with absolute value bounded by 3.89321964979420 x-coords of points with bounded absolute value [-3, -2, -1, 0, 1, 2] Total number of S-integral points: 43 [(-3 : 0 : 1), (-26/9 : 28/27 : 1), (-8159/2916 : 233461/157464 : 1), (-2759/1024 : 60819/32768 : 1), (-151/64 : 1333/512 : 1), (-1343/576 : 36575/13824 : 1), (-2 : 3 : 1), (-7/4 : 25/8 : 1), (-1 : 3 : 1), (-47/256 : 9191/4096 : 1), (0 : 2 : 1), (1/4 : 13/8 : 1), (4/9 : 35/27 : 1), (9/16 : 69/64 : 1), (58/81 : 559/729 : 1), (7/9 : 17/27 : 1), (6169/6561 : 109871/531441 : 1), (1 : 0 : 1), (17/16 : -25/64 : 1), (2 : 0 : 1), (33/16 : 17/64 : 1), (172/81 : 350/729 : 1), (9/4 : 7/8 : 1), (25/9 : 64/27 : 1), (3 : 3 : 1), (31/9 : 116/27 : 1), (4 : 6 : 1), (25/4 : 111/8 : 1), (1793/256 : 68991/4096 : 1), (8 : 21 : 1), (625/64 : 14839/512 : 1), (11 : 35 : 1), (14 : 51 : 1), (21 : 95 : 1), (37 : 224 : 1), (52 : 374 : 1), (6142/81 : 480700/729 : 1), (93 : 896 : 1), (4537/36 : 305425/216 : 1), (342 : 6324 : 1), (406 : 8180 : 1), (816 : 23309 : 1), (207331217/4096 : 2985362173625/262144 : 1)]
bb6894cf4ee93670e2b17ed27260b141c1df688c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/bb6894cf4ee93670e2b17ed27260b141c1df688c/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 67, 14970, 23811, 67, 4139, 12, 2890, 16, 348, 16, 14721, 67, 1969, 2218, 6079, 2187, 3937, 67, 2977, 87, 33, 8381, 16, 3988, 33, 8381, 16, 14601, 33, 7036, 4672, 3536, 14169, 281...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 348, 67, 14970, 23811, 67, 4139, 12, 2890, 16, 348, 16, 14721, 67, 1969, 2218, 6079, 2187, 3937, 67, 2977, 87, 33, 8381, 16, 3988, 33, 8381, 16, 14601, 33, 7036, 4672, 3536, 14169, 281...
cls.add_method('EnableLogTo', 'void', [param('char *', 'filename', transfer_ownership=False, is_const=True)], is_pure_virtual=True, is_virtual=True)
def register_Ns3SimulatorImpl_methods(root_module, cls): ## simulator-impl.h: void ns3::SimulatorImpl::Destroy() [member function] cls.add_method('Destroy', 'void', [], is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: void ns3::SimulatorImpl::EnableLogTo(char const * filename) [member function] cls.add_method('EnableLogTo', 'void', [param('char *', 'filename', transfer_ownership=False, is_const=True)], is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: bool ns3::SimulatorImpl::IsFinished() const [member function] cls.add_method('IsFinished', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## simulator-impl.h: ns3::Time ns3::SimulatorImpl::Next() const [member function] cls.add_method('Next', 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## simulator-impl.h: void ns3::SimulatorImpl::Stop() [member function] cls.add_method('Stop', 'void', [], is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: void ns3::SimulatorImpl::Stop(ns3::Time const & time) [member function] cls.add_method('Stop', 'void', [param('ns3::Time&', 'time', is_const=True)], is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: ns3::EventId ns3::SimulatorImpl::Schedule(ns3::Time const & time, ns3::Ptr<ns3::EventImpl> const & event) [member function] cls.add_method('Schedule', 'ns3::EventId', [param('ns3::Time&', 'time', is_const=True), param('ns3::Ptr< ns3::EventImpl >&', 'event', is_const=True)], is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: ns3::EventId ns3::SimulatorImpl::ScheduleNow(ns3::Ptr<ns3::EventImpl> const & event) [member function] cls.add_method('ScheduleNow', 'ns3::EventId', [param('ns3::Ptr< ns3::EventImpl >&', 'event', is_const=True)], is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: ns3::EventId ns3::SimulatorImpl::ScheduleDestroy(ns3::Ptr<ns3::EventImpl> const & event) [member function] cls.add_method('ScheduleDestroy', 'ns3::EventId', [param('ns3::Ptr< ns3::EventImpl >&', 'event', is_const=True)], is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: void ns3::SimulatorImpl::Remove(ns3::EventId const & ev) [member function] cls.add_method('Remove', 'void', [param('ns3::EventId&', 'ev', is_const=True)], is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: void ns3::SimulatorImpl::Cancel(ns3::EventId const & ev) [member function] cls.add_method('Cancel', 'void', [param('ns3::EventId&', 'ev', is_const=True)], is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: bool ns3::SimulatorImpl::IsExpired(ns3::EventId const & ev) const [member function] cls.add_method('IsExpired', 'bool', [param('ns3::EventId&', 'ev', is_const=True)], is_pure_virtual=True, is_const=True, is_virtual=True) ## simulator-impl.h: void ns3::SimulatorImpl::Run() [member function] cls.add_method('Run', 'void', [], is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: ns3::Time ns3::SimulatorImpl::Now() const [member function] cls.add_method('Now', 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## simulator-impl.h: ns3::Time ns3::SimulatorImpl::GetDelayLeft(ns3::EventId const & id) const [member function] cls.add_method('GetDelayLeft', 'ns3::Time', [param('ns3::EventId&', 'id', is_const=True)], is_pure_virtual=True, is_const=True, is_virtual=True) ## simulator-impl.h: ns3::Time ns3::SimulatorImpl::GetMaximumSimulationTime() const [member function] cls.add_method('GetMaximumSimulationTime', 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## simulator-impl.h: void ns3::SimulatorImpl::SetScheduler(ns3::Ptr<ns3::Scheduler> scheduler) [member function] cls.add_method('SetScheduler', 'void', [param('ns3::Ptr< ns3::Scheduler >', 'scheduler')], is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: ns3::Ptr<ns3::Scheduler> ns3::SimulatorImpl::GetScheduler() const [member function] cls.add_method('GetScheduler', 'ns3::Ptr< ns3::Scheduler >', [], is_pure_virtual=True, is_const=True, is_virtual=True) cls.add_constructor([]) return
cf522616aff92c4e202679aa6a0bfe330b1293cb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12851/cf522616aff92c4e202679aa6a0bfe330b1293cb/ns3_module_simulator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 10386, 23, 7993, 11775, 2828, 67, 5163, 12, 3085, 67, 2978, 16, 2028, 4672, 7541, 3142, 11775, 17, 11299, 18, 76, 30, 918, 3153, 23, 2866, 7993, 11775, 2828, 2866, 10740, 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, 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, 1744, 67, 10386, 23, 7993, 11775, 2828, 67, 5163, 12, 3085, 67, 2978, 16, 2028, 4672, 7541, 3142, 11775, 17, 11299, 18, 76, 30, 918, 3153, 23, 2866, 7993, 11775, 2828, 2866, 10740, 1435,...
debug("Matching instrument '%s' not found in DB. Image ingestion skipped." % detector, WARNING) sys.exit(1)
msg = "Matching instrument '%s' not found in DB. Image ingestion skipped." % detector raise ValueError, msg
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) # Check for ingestion label ing_label = 'Stack ' + os.path.basename(fitsNoExt) res = g.execute("""select label from youpi_ingestion where label = "%s";""" % ing_label) if res: ing_label += '_1' 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 = ing_label, check_fitsverify = 0, is_validated = 1, 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
f5bb19b9d9c75bab754a808e8614a8ab991f014c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11651/f5bb19b9d9c75bab754a808e8614a8ab991f014c/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...
context = {
context = Context({
def send(recipient, label, extra_context={}, issue_notice=True): """ Creates a new notice. This is intended to be how other apps create new notices. notification.send(user, 'friends_invite_sent', { 'spam': 'eggs', 'foo': 'bar', ) """ if not isinstance(recipient, (list, tuple)): recipient = (recipient,) notice_type = NoticeType.objects.get(label=label) current_site = Site.objects.get_current() notices_url = u"http://%s%s" % ( unicode(current_site), reverse("notification_notices"), ) context = { "notice": ugettext(notice_type.display), "notices_url": notices_url, "current_site": current_site, } context.update(extra_context) recipients = [] current_language = get_language() formats = ( 'short.txt', 'plain.txt', 'teaser.html', 'full.html', ) # TODO make formats configurable for user in recipient: # get user profiles if available try: profile = user.get_profile() except SiteProfileNotAvailable: profile = None # activate language of user to send message translated if profile is not None: # get language attribute of user profile language = getattr(profile, "language", None) if language is not None: # activate the user's language activate(language) # get prerendered format messages messages = get_formatted_messages(formats, label, context) # Strip newlines from subject subject = ''.join(render_to_string('notification/email_subject.txt', { 'message': messages['short'], }, context).splitlines()) body = render_to_string('notification/email_body.txt', { 'message': messages['plain'], }, context) if issue_notice: notice = Notice.objects.create(user=user, message=messages['teaser'], notice_type=notice_type) if should_send(user, notice_type, "1") and user.email: # Email recipients.append(user.email) send_mail(subject, body, settings.DEFAULT_FROM_EMAIL, recipients) # reset environment to original language activate(current_language)
c8980b1ca4fc3e0284fc4bc7a7cfb31bdf3204e6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11515/c8980b1ca4fc3e0284fc4bc7a7cfb31bdf3204e6/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 20367, 16, 1433, 16, 2870, 67, 2472, 28793, 5672, 67, 20392, 33, 5510, 4672, 3536, 10210, 279, 394, 11690, 18, 225, 1220, 353, 12613, 358, 506, 3661, 1308, 8279, 752, 394, 486,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1366, 12, 20367, 16, 1433, 16, 2870, 67, 2472, 28793, 5672, 67, 20392, 33, 5510, 4672, 3536, 10210, 279, 394, 11690, 18, 225, 1220, 353, 12613, 358, 506, 3661, 1308, 8279, 752, 394, 486,...
if (SDK.has_key(ver)==0) and (PkgSkip(ver)==0):
if (ver not in SDK) and (PkgSkip(ver)==0):
def SdkAutoDisableMaya(): for (ver,key) in MAYAVERSIONINFO: if (SDK.has_key(ver)==0) and (PkgSkip(ver)==0): if (sys.platform == "win32"): WARNINGS.append("The registry does not appear to contain a pointer to the "+ver+" SDK.") else: WARNINGS.append("I cannot locate SDK for "+ver) WARNINGS.append("I have automatically added this command-line option: --no-"+ver.lower()) PkgDisable(ver)
fdcc1205b8a0b6802b88877ecb24913b8464ac72 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/fdcc1205b8a0b6802b88877ecb24913b8464ac72/makepandacore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3426, 4965, 11879, 49, 528, 69, 13332, 364, 261, 502, 16, 856, 13, 316, 490, 5255, 37, 5757, 5923, 30, 309, 261, 502, 486, 316, 3881, 13, 471, 261, 11264, 6368, 12, 502, 13, 631, 20,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3426, 4965, 11879, 49, 528, 69, 13332, 364, 261, 502, 16, 856, 13, 316, 490, 5255, 37, 5757, 5923, 30, 309, 261, 502, 486, 316, 3881, 13, 471, 261, 11264, 6368, 12, 502, 13, 631, 20,...
def __new__(self, value):
def __new__(cls, value):
def __new__(self, value): # we want the number of ticks per byte of data val = convert.toMemoryBandwidth(value) return super(cls, MemoryBandwidth).__new__(cls, val)
107dba2484f0430b19ef2e4b86c30af4e6f8cd2e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7385/107dba2484f0430b19ef2e4b86c30af4e6f8cd2e/params.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 460, 4672, 468, 732, 2545, 326, 1300, 434, 13003, 1534, 1160, 434, 501, 1244, 273, 1765, 18, 869, 6031, 24621, 12, 1132, 13, 327, 2240, 12, 6429, 16, 925...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2704, 972, 12, 6429, 16, 460, 4672, 468, 732, 2545, 326, 1300, 434, 13003, 1534, 1160, 434, 501, 1244, 273, 1765, 18, 869, 6031, 24621, 12, 1132, 13, 327, 2240, 12, 6429, 16, 925...
print_test('floor')
print 'floor'
def testit(name, value, expected): if abs(value-expected) > eps: raise TestFailed, '%s returned %f, expected %f'%\ (name, value, expected)
8c8ac34babc99b5c0ebbd8bdade89f73afabedc0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6753/8c8ac34babc99b5c0ebbd8bdade89f73afabedc0/test_math.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 305, 12, 529, 16, 460, 16, 2665, 4672, 309, 2417, 12, 1132, 17, 3825, 13, 405, 7785, 30, 1002, 7766, 2925, 16, 1995, 87, 2106, 738, 74, 16, 2665, 738, 74, 11, 30671, 261, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 305, 12, 529, 16, 460, 16, 2665, 4672, 309, 2417, 12, 1132, 17, 3825, 13, 405, 7785, 30, 1002, 7766, 2925, 16, 1995, 87, 2106, 738, 74, 16, 2665, 738, 74, 11, 30671, 261, 529, ...
for dump_file in LocateFiles(pattern='*.dmp', root=dump_dir): file_time = os.path.getmtime(dump_file) if file_time < symbol_time: continue
for dump_file in dump_files:
def main_linux(options, args): # minidump_stackwalk is part of Google Breakpad. You may need to checkout # the code and build your own copy. http://google-breakpad.googlecode.com/ LINUX_PROCESSOR = 'minidump_stackwalk' processor_bin = None if options.processor_dir: bin = os.path.join(os.path.expanduser(options.processor_dir), LINUX_PROCESSOR) if os.access(bin, os.X_OK): processor_bin = bin else: for path in os.environ['PATH'].split(':'): bin = os.path.join(path, LINUX_PROCESSOR) if os.access(bin, os.X_OK): processor_bin = bin break if not processor_bin: print 'Cannot find minidump_stackwalk.' return 1 if options.architecture: bits = options.architecture else: bits = struct.calcsize('P') * 8 if bits == 32: symbol_file = 'chrome.breakpad.ia32' elif bits == 64: symbol_file = 'chrome.breakpad.ia64' else: print 'Unknown architecture' return 1 symbol_dir = options.symbol_dir if not options.symbol_dir: symbol_dir = os.curdir symbol_dir = os.path.abspath(os.path.expanduser(symbol_dir)) symbol_file = os.path.join(symbol_dir, symbol_file) if not os.path.exists(symbol_file): print 'Cannot find symbols.' return 1 symbol_time = os.path.getmtime(symbol_file) dump_dir = options.dump_dir if not dump_dir: dump_dir = GetCrashDumpDir() if not dump_dir: print 'Cannot find dump dir.' return 1 temp_dir = tempfile.mkdtemp(suffix='chromedump') if not VerifySymbolAndCopyToTempDir(symbol_file, temp_dir): print 'Cannot parse symbols.' shutil.rmtree(temp_dir) return 1 dump_count = 0 for dump_file in LocateFiles(pattern='*.dmp', root=dump_dir): file_time = os.path.getmtime(dump_file) if file_time < symbol_time: # Ignore dumps older than symbol file. continue processed_dump_file = ProcessDump(dump_file, temp_dir) if not processed_dump_file: continue print '-------------------------' print GetStackTrace(processor_bin, temp_dir, processed_dump_file) print os.remove(processed_dump_file) dump_count += 1 shutil.rmtree(temp_dir) print '%s dumps found' % dump_count return 0
fd4b62df1b8eb5d3a6e2143ed86db144a1c29af2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/fd4b62df1b8eb5d3a6e2143ed86db144a1c29af2/process_dumps_linux.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 67, 20132, 12, 2116, 16, 833, 4672, 468, 1131, 350, 2801, 67, 3772, 11348, 353, 1087, 434, 6124, 17030, 6982, 18, 4554, 2026, 1608, 358, 13926, 468, 326, 981, 471, 1361, 3433, 4953...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 20132, 12, 2116, 16, 833, 4672, 468, 1131, 350, 2801, 67, 3772, 11348, 353, 1087, 434, 6124, 17030, 6982, 18, 4554, 2026, 1608, 358, 13926, 468, 326, 981, 471, 1361, 3433, 4953...
self.checkraises(TypeError, 'abc', '__mul__', '')
if not test_support.is_jython: self.checkraises(TypeError, 'abc', '__mul__', '') else: import operator self.checkraises(TypeError, operator, '__mul__', 'abc', '')
def test_mul(self): self.checkequal('', 'abc', '__mul__', -1) self.checkequal('', 'abc', '__mul__', 0) self.checkequal('abc', 'abc', '__mul__', 1) self.checkequal('abcabcabc', 'abc', '__mul__', 3) self.checkraises(TypeError, 'abc', '__mul__') self.checkraises(TypeError, 'abc', '__mul__', '') # XXX: on a 64-bit system, this doesn't raise an overflow error, # but either raises a MemoryError, or succeeds (if you have 54TiB) #self.checkraises(OverflowError, 10000*'abc', '__mul__', 2000000000)
57a12d519603284555e945ef5c2fe16898b2820a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6753/57a12d519603284555e945ef5c2fe16898b2820a/string_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16411, 12, 2890, 4672, 365, 18, 1893, 9729, 2668, 2187, 296, 18947, 2187, 4940, 16411, 972, 2187, 300, 21, 13, 365, 18, 1893, 9729, 2668, 2187, 296, 18947, 2187, 4940, 16411, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16411, 12, 2890, 4672, 365, 18, 1893, 9729, 2668, 2187, 296, 18947, 2187, 4940, 16411, 972, 2187, 300, 21, 13, 365, 18, 1893, 9729, 2668, 2187, 296, 18947, 2187, 4940, 16411, 9...
print "Image name Normalized: " + imagename
def update_booklist(mountpath, ContentID, filename, title, authors, mime, date, ContentType, ImageID): changed = False # if path_to_ext(filename) in self.FORMATS: try: # lpath = os.path.join(path, filename).partition(self.normalize_path(prefix))[2] # if lpath.startswith(os.sep): # lpath = lpath[len(os.sep):] # lpath = lpath.replace('\\', '/') print "Filename: " + filename filename = self.normalize_path(filename) print "Normalized FileName: " + filename
330c9ef1ba0196d3a1ff41bfd3cce30aff48b922 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/330c9ef1ba0196d3a1ff41bfd3cce30aff48b922/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 3618, 1098, 12, 4778, 803, 16, 3697, 734, 16, 1544, 16, 2077, 16, 14494, 16, 4892, 16, 1509, 16, 11691, 16, 3421, 734, 4672, 3550, 273, 1083, 468, 309, 589, 67, 869, 67, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 3618, 1098, 12, 4778, 803, 16, 3697, 734, 16, 1544, 16, 2077, 16, 14494, 16, 4892, 16, 1509, 16, 11691, 16, 3421, 734, 4672, 3550, 273, 1083, 468, 309, 589, 67, 869, 67, 40...
exclusions.append(pjoin('IPython', 'utils', 'platutils_win32'))
exclusions.append(ipjoin('utils', 'platutils_win32'))
def make_exclude(): # For the IPythonDoctest plugin, we need to exclude certain patterns that # cause testing problems. We should strive to minimize the number of # skipped modules, since this means untested code. As the testing # machinery solidifies, this list should eventually become empty. # These modules and packages will NOT get scanned by nose at all for tests exclusions = [pjoin('IPython', 'external'), pjoin('IPython', 'frontend', 'process', 'winprocess.py'), pjoin('IPython_doctest_plugin'), pjoin('IPython', 'quarantine'), pjoin('IPython', 'deathrow'), pjoin('IPython', 'testing', 'attic'), pjoin('IPython', 'testing', 'tools'), pjoin('IPython', 'testing', 'mkdoctests'), pjoin('IPython', 'lib', 'inputhook'), # Config files aren't really importable stand-alone pjoin('IPython', 'config', 'default'), pjoin('IPython', 'config', 'profile'), ] if not have_wx: exclusions.append(pjoin('IPython', 'gui')) exclusions.append(pjoin('IPython', 'frontend', 'wx')) exclusions.append(pjoin('IPython', 'lib', 'inputhookwx')) if not have_gtk or not have_gobject: exclusions.append(pjoin('IPython', 'lib', 'inputhookgtk')) if not have_wx_aui: exclusions.append(pjoin('IPython', 'gui', 'wx', 'wxIPython')) if not have_objc: exclusions.append(pjoin('IPython', 'frontend', 'cocoa')) if not sys.platform == 'win32': exclusions.append(pjoin('IPython', 'utils', 'platutils_win32')) # These have to be skipped on win32 because the use echo, rm, cd, etc. # See ticket https://bugs.launchpad.net/bugs/366982 if sys.platform == 'win32': exclusions.append(pjoin('IPython', 'testing', 'plugin', 'test_exampleip')) exclusions.append(pjoin('IPython', 'testing', 'plugin', 'dtexample')) if not os.name == 'posix': exclusions.append(pjoin('IPython', 'utils', 'platutils_posix')) if not have_pexpect: exclusions.append(pjoin('IPython', 'scripts', 'irunner')) # This is scary. We still have things in frontend and testing that # are being tested by nose that use twisted. We need to rethink # how we are isolating dependencies in testing. if not (have_twisted and have_zi and have_foolscap): exclusions.append(pjoin('IPython', 'frontend', 'asyncfrontendbase')) exclusions.append(pjoin('IPython', 'frontend', 'prefilterfrontend')) exclusions.append(pjoin('IPython', 'frontend', 'frontendbase')) exclusions.append(pjoin('IPython', 'frontend', 'linefrontendbase')) exclusions.append(pjoin('IPython', 'frontend', 'tests', 'test_linefrontend')) exclusions.append(pjoin('IPython', 'frontend', 'tests', 'test_frontendbase')) exclusions.append(pjoin('IPython', 'frontend', 'tests', 'test_prefilterfrontend')) exclusions.append(pjoin('IPython', 'frontend', 'tests', 'test_asyncfrontendbase')), exclusions.append(pjoin('IPython', 'testing', 'parametric')) exclusions.append(pjoin('IPython', 'testing', 'util')) # This is needed for the reg-exp to match on win32 in the ipdoctest plugin. if sys.platform == 'win32': exclusions = [s.replace('\\','\\\\') for s in exclusions] return exclusions
2b7da9a1bd8876ddac150877e1ae3bd4322848b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3900/2b7da9a1bd8876ddac150877e1ae3bd4322848b6/iptest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 10157, 13332, 225, 468, 2457, 326, 26085, 3244, 299, 395, 1909, 16, 732, 1608, 358, 4433, 8626, 6884, 716, 468, 4620, 7769, 9688, 18, 225, 1660, 1410, 609, 688, 358, 18935, 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, 1221, 67, 10157, 13332, 225, 468, 2457, 326, 26085, 3244, 299, 395, 1909, 16, 732, 1608, 358, 4433, 8626, 6884, 716, 468, 4620, 7769, 9688, 18, 225, 1660, 1410, 609, 688, 358, 18935, 326...
if ((src_port, 'output')) in local_port_specs: output_port_spec = local_port_specs[(src_port, 'output')] else: output_port_spec = \ src_module.get_port_spec(src_port, 'output')
output_port_spec = src_module.get_port_spec(src_port, 'output')
def create_new_connection(src_module, src_port, dst_module, dst_port): # spec -> name, type, signature output_port_id = controller.id_scope.getNewId(Port.vtType) if type(src_port) == type(""): if ((src_port, 'output')) in local_port_specs: output_port_spec = local_port_specs[(src_port, 'output')] else: output_port_spec = \ src_module.get_port_spec(src_port, 'output') output_port = Port(id=output_port_id, spec=output_port_spec, moduleId=src_module.id, moduleName=src_module.name) else: output_port = Port(id=output_port_id, name=src_port.name, type=src_port.type, signature=src_port.signature, moduleId=src_module.id, moduleName=src_module.name)
a86f147e8adf8765e48f01a4a74e983d518ae3a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/a86f147e8adf8765e48f01a4a74e983d518ae3a3/upgradeworkflow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2704, 67, 4071, 12, 4816, 67, 2978, 16, 1705, 67, 655, 16, 3046, 67, 2978, 16, 3046, 67, 655, 4672, 468, 857, 317, 508, 16, 618, 16, 3372, 876, 67, 655, 67, 350, 273, 2596...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 752, 67, 2704, 67, 4071, 12, 4816, 67, 2978, 16, 1705, 67, 655, 16, 3046, 67, 2978, 16, 3046, 67, 655, 4672, 468, 857, 317, 508, 16, 618, 16, 3372, 876, 67, 655, 67, 350, 273, 2596...
a permutation group G. The ordering is that given by GAP.
a permutation group `G`. The ordering is that given by GAP.
def conjugacy_classes_representatives(self): """ Returns a complete list of representatives of conjugacy classes in a permutation group G. The ordering is that given by GAP. EXAMPLES:: sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4)]]) sage: cl = G.conjugacy_classes_representatives(); cl [(), (2,4), (1,2)(3,4), (1,2,3,4), (1,3)(2,4)] sage: cl[3] in G True :: sage: G = SymmetricGroup(5) sage: G.conjugacy_classes_representatives () [(), (1,2), (1,2)(3,4), (1,2,3), (1,2,3)(4,5), (1,2,3,4), (1,2,3,4,5)] AUTHORS:
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, 10550, 637, 3505, 67, 4701, 67, 28205, 8785, 12, 2890, 4672, 3536, 2860, 279, 3912, 666, 434, 2406, 8785, 434, 10550, 637, 3505, 3318, 316, 279, 17440, 1041, 1375, 43, 8338, 1021, 9543, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10550, 637, 3505, 67, 4701, 67, 28205, 8785, 12, 2890, 4672, 3536, 2860, 279, 3912, 666, 434, 2406, 8785, 434, 10550, 637, 3505, 3318, 316, 279, 17440, 1041, 1375, 43, 8338, 1021, 9543, ...
theta = turn_angle * i + theta_offset y = cos(theta) * radius z = sin(theta) * radius vx = i * axial_offset p = p0 + vx + y * cY + z * cZ if 0: handedness = -1 twistPerBase = (handedness * 2 * pi) / basesPerTurn theta = - twistPerBase def tfm(v, theta, xOffset): return EXPERIMENTAL_rotateTranslateXYZ_rotateTranslateXYZ(v, theta, xOffset) xOffset = duplexRise new_ribbon_point = tfm(previous_ribbon_point, theta, xOffset) return new_ribbon_point def EXPERIMENTAL_rotateTranslateXYZ(inXYZ, theta, xOffset): """ Returns the new XYZ coordinate rotated by I{theta} and translated by I{z}. @param inXYZ: The original XYZ coordinate. @type inXYZ: V @param theta: The base twist angle. @type theta: float @param z: The base rise. @type z: float @return: The new XYZ coordinate. @rtype: V """ c, s = cos(theta), sin(theta) x0 = inXYZ[0] + xOffset y0 = inXYZ[1] z0 = inXYZ[2] x = x0 y = c * y0 + s * z0 z = -s * y0 + c * z0 return V(x, y, z) def drawDnaSingleRibbon(endCenter1,
y = height_ribbon1 theta_temp = acos(y/radius) turn_angle = (2 * pi) / basesPerTurn theta_offset = theta_temp - turn_angle*i ribbon1_point = compute_ribbon_point(pointOnAxis, basesPerTurn, duplexRise, unitVectorAlongLength, unitVectorAlongLadderStep, unitDepthVector, peakDeviationFromCenter, numberOfBasesDrawn, theta_offset ) else: phase_angle_ribbon_1 = HALF_PI theta_ribbon_1 = (TWICE_PI * x / T) + phase_angle_ribbon_1 ribbon1_point = compute_ribbon_point(pointOnAxis, basesPerTurn, duplexRise, unitVectorAlongLength, unitVectorAlongLadderStep, unitDepthVector, peakDeviationFromCenter, numberOfBasesDrawn, theta_offset ) while x < ribbonLength: drawPoint(stepColor, pointOnAxis) previousPointOnAxis = pointOnAxis previous_ribbon1_point = ribbon1_point ribbon1_point = compute_ribbon_point(pointOnAxis, basesPerTurn, duplexRise, unitVectorAlongLength, unitVectorAlongLadderStep, unitDepthVector, peakDeviationFromCenter, numberOfBasesDrawn, theta_offset ) drawsphere(ribbon1Color, previous_ribbon1_point, SPHERE_RADIUS, SPHERE_DRAWLEVEL, opacity = SPHERE_OPACITY) pointOnAxis = pointOnAxis + unitVectorAlongLength * duplexRise x += duplexRise numberOfBasesDrawn += 1 if previous_ribbon1_point: drawline(ribbon1Color, previous_ribbon1_point, ribbon1_point, width = ribbonThickness, isSmooth = True ) arrowLengthVector1 = norm(ribbon1_point - previous_ribbon1_point) arrowHeightVector1 = cross(-lineOfSightVector, arrowLengthVector1) drawArrowHead(ribbon1Color, ribbon1_point, arrowDrawingScale, arrowHeightVector1, arrowLengthVector1) drawsphere(AXIS_ENDPOINT_SPHERE_COLOR, previousPointOnAxis, AXIS_ENDPOINT_SPHERE_RADIUS, AXIS_ENDPOINT_SPHERE_DRAWLEVEL, opacity = AXIS_ENDPOINT_SPHERE_OPACITY) glEnable(GL_LIGHTING) def EXPERIMENTAL_drawDnaSingleRibbon(endCenter1,
def _C_points(self): cyl = self.cyl theta_offset = self.theta_offset n = int(self.n) #k type coercion won't be needed once Arg & Option does it radius = cyl.radius * self.radius_ratio rise = self.rise turn = self.turn end1 = self.cyl.end1 axial_offset = cyl.dx * rise # note: cyl.dx == norm(cyl.axisvector) cY = cyl.dy # perp coords to cyl axisvector (which is always along cyl.dx) [#e is it misleading to use x,y,z for these??] cZ = cyl.dz points = [] turn_angle = 2 * pi * turn p0 = end1 #e plus an optional offset along cyl.axisvector? for i in range(n+1): theta = turn_angle * i + theta_offset # in radians y = cos(theta) * radius # y and z are Widths (numbers) z = sin(theta) * radius vx = i * axial_offset # a Vector p = p0 + vx + y * cY + z * cZ points.append(p) return points
aba9c26d293a0fb5e28d6ce2f271a860d26c5f65 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/aba9c26d293a0fb5e28d6ce2f271a860d26c5f65/drawDnaRibbons.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 39, 67, 4139, 12, 2890, 4672, 27331, 273, 365, 18, 2431, 80, 7338, 67, 3348, 273, 365, 18, 14482, 67, 3348, 290, 273, 509, 12, 2890, 18, 82, 13, 468, 79, 618, 1825, 12610, 285, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 39, 67, 4139, 12, 2890, 4672, 27331, 273, 365, 18, 2431, 80, 7338, 67, 3348, 273, 365, 18, 14482, 67, 3348, 290, 273, 509, 12, 2890, 18, 82, 13, 468, 79, 618, 1825, 12610, 285, ...
if object < 0xff:
if object <= 0xff:
def save_int(self, object, pack=struct.pack): if self.bin: # If the int is small enough to fit in a signed 4-byte 2's-comp # format, we can store it more efficiently than the general # case. # First one- and two-byte unsigned ints: if object >= 0: if object < 0xff: self.write(BININT1 + chr(object)) return if object < 0xffff: self.write(BININT2 + chr(object&0xff) + chr(object>>8)) return # Next check for 4-byte signed ints: high_bits = object >> 31 # note that Python shift sign-extends if high_bits == 0 or high_bits == -1: # All high bits are copies of bit 2**31, so the value # fits in a 4-byte signed int. self.write(BININT + pack("<i", object)) return # Text pickle, or int too big to fit in signed 4-byte format. self.write(INT + `object` + '\n')
8fda7bc48d7f58983ff54bf11367ed936767cd72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8fda7bc48d7f58983ff54bf11367ed936767cd72/pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 474, 12, 2890, 16, 733, 16, 2298, 33, 1697, 18, 2920, 4672, 309, 365, 18, 4757, 30, 468, 971, 326, 509, 353, 5264, 7304, 358, 4845, 316, 279, 6726, 1059, 17, 7229, 576, 180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1923, 67, 474, 12, 2890, 16, 733, 16, 2298, 33, 1697, 18, 2920, 4672, 309, 365, 18, 4757, 30, 468, 971, 326, 509, 353, 5264, 7304, 358, 4845, 316, 279, 6726, 1059, 17, 7229, 576, 180...
print "Is it %s ?" % song["text"]
def remove(self, song_id="", text=""): if not song_id == "": self._queue_box.remove(self.queue_keeper[song_id]["label"]) return elif not text == "": print "Trying to remove '%s'" % text for id, song in self.queue_keeper.items(): print "Is it %s ?" % song["text"] if text.startswith(song["text"]): print "Found song id %s" % id self._queue_box.remove(song["label"]) return print "Couldn't remove %s%s" % (song_id, text)
6b6bee13086fc6a9b3edfdb00be39e2f831b717b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11006/6b6bee13086fc6a9b3edfdb00be39e2f831b717b/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 17180, 67, 350, 1546, 3113, 977, 1546, 6, 4672, 309, 486, 17180, 67, 350, 422, 1408, 30, 365, 6315, 4000, 67, 2147, 18, 4479, 12, 2890, 18, 4000, 67, 79, 9868, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1206, 12, 2890, 16, 17180, 67, 350, 1546, 3113, 977, 1546, 6, 4672, 309, 486, 17180, 67, 350, 422, 1408, 30, 365, 6315, 4000, 67, 2147, 18, 4479, 12, 2890, 18, 4000, 67, 79, 9868, 63...
changedAttributesWeCareAbout = self.widget.watchedAttributes.intersection(attributes)
changedAttributesWeCareAbout = watchedAttrs.intersection(attributes)
def onWatchedItemChanged(self, op, item, attributes): # Ignore notifications during stamping or deleting if isitem(item) and item.isMutating(): #logger.debug("%s: ignoring changes to %s during stamping or deletion.", #debugName(self), attributes) return
c8483d8ddfd33989a2c7fe7a2ac62bcd23e5a451 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/c8483d8ddfd33989a2c7fe7a2ac62bcd23e5a451/Detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 5234, 329, 1180, 5033, 12, 2890, 16, 1061, 16, 761, 16, 1677, 4672, 468, 8049, 9208, 4982, 14429, 310, 578, 12993, 309, 353, 1726, 12, 1726, 13, 471, 761, 18, 291, 7420, 1776, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 603, 5234, 329, 1180, 5033, 12, 2890, 16, 1061, 16, 761, 16, 1677, 4672, 468, 8049, 9208, 4982, 14429, 310, 578, 12993, 309, 353, 1726, 12, 1726, 13, 471, 761, 18, 291, 7420, 1776, 133...
classmethod test.test_descrtut.D 1
classmethod <class 'test.test_descrtut.D'> 1
... def foo(cls, y):
738fee0e1b15bc0b31c1ea73ed7b51b2a1796900 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/738fee0e1b15bc0b31c1ea73ed7b51b2a1796900/test_descrtut.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 8431, 12, 6429, 16, 677, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 8431, 12, 6429, 16, 677, 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,...
return isinstance(f, os_mock.FakeDir)
return type(f) == os_mock.FakeDir
def isdir(path): f = os_mock._findFileFromPath(path) return isinstance(f, os_mock.FakeDir)
6d1553d710a84aa33b2dd4302a9d09ec74019279 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10739/6d1553d710a84aa33b2dd4302a9d09ec74019279/os_path_mock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9783, 12, 803, 4672, 284, 273, 1140, 67, 22851, 6315, 4720, 812, 23064, 12, 803, 13, 327, 618, 12, 74, 13, 422, 1140, 67, 22851, 18, 25462, 1621, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9783, 12, 803, 4672, 284, 273, 1140, 67, 22851, 6315, 4720, 812, 23064, 12, 803, 13, 327, 618, 12, 74, 13, 422, 1140, 67, 22851, 18, 25462, 1621, 282, 2, -100, -100, -100, -100, -100, ...
client_running = False client_trigger.pull_trigger() client_exit_event.wait(99)
if client_running: client_running = False client_trigger.pull_trigger() client_exit_event.wait(99)
def client_exit(): global client_running client_running = False client_trigger.pull_trigger() client_exit_event.wait(99)
ff710eb7dc962eda6d1abfe8a6a22d4d1cbcf1c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10048/ff710eb7dc962eda6d1abfe8a6a22d4d1cbcf1c9/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1004, 67, 8593, 13332, 2552, 1004, 67, 8704, 309, 1004, 67, 8704, 30, 1004, 67, 8704, 273, 1083, 1004, 67, 10668, 18, 13469, 67, 10668, 1435, 1004, 67, 8593, 67, 2575, 18, 7048, 12, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1004, 67, 8593, 13332, 2552, 1004, 67, 8704, 309, 1004, 67, 8704, 30, 1004, 67, 8704, 273, 1083, 1004, 67, 10668, 18, 13469, 67, 10668, 1435, 1004, 67, 8593, 67, 2575, 18, 7048, 12, 27...
if type == 'dacapo-text':
if format == 'dacapo-text':
def read(filename, index=-1): p = filename.rfind('@') if p != -1: try: index = string2index(filename[p + 1:]) except ValueError: pass else: filename = filename[:p] type = filetype(filename) if type.startswith('gpw'): from gpaw import Calculator atoms = Calculator(filename, txt=None).get_atoms() atoms.set_calculator(None) return atoms if type == 'xyz': from ase.io.xyz import read_xyz return read_xyz(filename, index) if type == 'traj': from ase.io.trajectory import read_trajectory return read_trajectory(filename, index) if type == 'cube': from ase.io.cube import read_cube return read_cube(filename, index) if type == 'nc': from ase.io.netcdf import read_netcdf return read_netcdf(filename, index) if type == 'gpaw-text': from ase.io.gpawtext import read_gpaw_text return read_gpaw_text(filename, index) if type == 'dacapo-text': from ase.io.dacapo import read_dacapo_text return read_dacapo_text(filename) if type == 'dacapo': from ase.io.dacapo import read_dacapo return read_dacapo(filename) raise RuntimeError('That can *not* happen!')
4812740e71165fed2e5653702a0bff58f855d15c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1380/4812740e71165fed2e5653702a0bff58f855d15c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 3459, 16, 770, 29711, 21, 4672, 293, 273, 1544, 18, 86, 4720, 2668, 36, 6134, 309, 293, 480, 300, 21, 30, 775, 30, 770, 273, 533, 22, 1615, 12, 3459, 63, 84, 397, 404, 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, 855, 12, 3459, 16, 770, 29711, 21, 4672, 293, 273, 1544, 18, 86, 4720, 2668, 36, 6134, 309, 293, 480, 300, 21, 30, 775, 30, 770, 273, 533, 22, 1615, 12, 3459, 63, 84, 397, 404, 30,...
if( v != 0 ):
if v != 0:
def _convert_to_svm_node_array(x): """ convert a sequence or mapping to an svm_node array """ import operator # Find non zero elements iter_range = [] if type(x) == dict: for k, v in x.iteritems(): if( v != 0 ): iter_range.append( k ) elif operator.isSequenceType(x): for j in range(len(x)): if( x[ j ] != 0 ): iter_range.append( j ) else: raise TypeError,"data must be a mapping or a sequence" iter_range.sort() data = svmc.svm_node_array(len(iter_range)+1) svmc.svm_node_array_set(data,len(iter_range),-1,0) j = 0 for k in iter_range: svmc.svm_node_array_set(data,j,k,x[k]) j = j + 1 return data
99db5f3bf5dbeb8cf6ce38d94a3fa1c81afe7316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8619/99db5f3bf5dbeb8cf6ce38d94a3fa1c81afe7316/svm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6283, 67, 869, 67, 87, 3489, 67, 2159, 67, 1126, 12, 92, 4672, 3536, 1765, 279, 3102, 578, 2874, 358, 392, 272, 3489, 67, 2159, 526, 3536, 1930, 3726, 225, 468, 4163, 1661, 3634, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6283, 67, 869, 67, 87, 3489, 67, 2159, 67, 1126, 12, 92, 4672, 3536, 1765, 279, 3102, 578, 2874, 358, 392, 272, 3489, 67, 2159, 526, 3536, 1930, 3726, 225, 468, 4163, 1661, 3634, ...
pan_left = -a0
pan_left = a0
def updatePan(self,a0): sender = self.sender() pan_left = -a0 if pan_left < 0: pan_left = 0
5e4d06fbe51a4f328400a8d7190f59d7118b2ee8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11526/5e4d06fbe51a4f328400a8d7190f59d7118b2ee8/mixer_quatafire.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 4069, 12, 2890, 16, 69, 20, 4672, 5793, 273, 365, 18, 15330, 1435, 2800, 67, 4482, 273, 279, 20, 309, 2800, 67, 4482, 411, 374, 30, 2800, 67, 4482, 273, 374, 2, 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, 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, 1089, 4069, 12, 2890, 16, 69, 20, 4672, 5793, 273, 365, 18, 15330, 1435, 2800, 67, 4482, 273, 279, 20, 309, 2800, 67, 4482, 411, 374, 30, 2800, 67, 4482, 273, 374, 2, -100, -100, -10...
'jigsaw.w3.org': {'/HTTP/Basic/': "normal page", '/HTTP/Digest/': "normal page" },
'www.foo.com': {'/': "Normal", '/2': "Blah"},
def __init__(self, closeCallback=None): self.open = False self.paused = False self.readCallback = None self.closeCallback = closeCallback self.timedOut = False self.connectionErrback = None self.name = "" self.output = '' self.unprocessed = '' self.input = '' self.pendingOutput = '' self.timedOut = False self.pages = { 'participatoryculture.org': {'/democracytest/normalpage.txt': 'I AM A NORMAL PAGE\n', '/democracytest/normalpage2.txt': 'I AM A NORMAL PAGE\n', '/democracytest/normalpage3.txt': 'I AM A NORMAL PAGE\n', '/democracytest/nohead.php': "DYNAMIC CONTENT", '/democracytest/cookie.php': "DYNAMIC CONTENT" }, 'jigsaw.w3.org': {'/HTTP/Basic/': "normal page", '/HTTP/Digest/': "normal page" }, 'www.bar.com': {'/': "Normal", '/2': "Blah" }, 'www.baz.com': {'/': "Normal", '/2': "Blah" }, 'www.froz.com': {'/': "Normal", '/2': "Blah" }, 'www.qux.com': {'/': "Normal", '/2': "Blah" }, 'www.gibill.va.gov': {'/wave/': "Normal" }, }
e30788a9dacabc7a8a0d8e1a962216cf42816d5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/e30788a9dacabc7a8a0d8e1a962216cf42816d5e/httpclienttest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1746, 2428, 33, 7036, 4672, 365, 18, 3190, 273, 1083, 365, 18, 8774, 3668, 273, 1083, 365, 18, 896, 2428, 273, 599, 365, 18, 4412, 2428, 273, 1746, 2428,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1746, 2428, 33, 7036, 4672, 365, 18, 3190, 273, 1083, 365, 18, 8774, 3668, 273, 1083, 365, 18, 896, 2428, 273, 599, 365, 18, 4412, 2428, 273, 1746, 2428,...
if not is_unavailable_exception(e): self.fail("%s\n%s" % (e, e.headers))
self.fail("%s\n%s" % (e, e.headers))
def test_introspection1(self): try: p = xmlrpclib.ServerProxy('http://localhost:%d' % PORT) meth = p.system.listMethods() expected_methods = set(['pow', 'div', 'add', 'system.listMethods', 'system.methodHelp', 'system.methodSignature', 'system.multicall']) self.assertEqual(set(meth), expected_methods) except xmlrpclib.ProtocolError as e: # ignore failures due to non-blocking socket 'unavailable' errors if not is_unavailable_exception(e): # protocol error; provide additional information in test output self.fail("%s\n%s" % (e, e.headers))
80e2d701322fcd5f12786e79e34969ddd3fbc268 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/80e2d701322fcd5f12786e79e34969ddd3fbc268/test_xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 474, 26362, 21, 12, 2890, 4672, 775, 30, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 2668, 2505, 2207, 13014, 5319, 72, 11, 738, 20987, 13, 7917, 273, 293, 18, 4299, 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, 1842, 67, 474, 26362, 21, 12, 2890, 4672, 775, 30, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 2668, 2505, 2207, 13014, 5319, 72, 11, 738, 20987, 13, 7917, 273, 293, 18, 4299, 18,...
c = self.read_chain() count += 1
def expect(self, patterns=[], timeout=None, limit=None): """Read from the Connector and return the index of the first pattern which matches the input chain; otherwise, raise an exception.
38b3e0f222aaf33a953ca0d4d71df6873bb0cb59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5910/38b3e0f222aaf33a953ca0d4d71df6873bb0cb59/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4489, 12, 2890, 16, 6884, 22850, 6487, 2021, 33, 7036, 16, 1800, 33, 7036, 4672, 3536, 1994, 628, 326, 15779, 471, 327, 326, 770, 434, 326, 1122, 1936, 1492, 1885, 326, 810, 2687, 31, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4489, 12, 2890, 16, 6884, 22850, 6487, 2021, 33, 7036, 16, 1800, 33, 7036, 4672, 3536, 1994, 628, 326, 15779, 471, 327, 326, 770, 434, 326, 1122, 1936, 1492, 1885, 326, 810, 2687, 31, ...
print openJournal(id).toprettyxml()
print openJournal(id).toprettyxml().encode("utf-8")
def dumpJournal(id): print openJournal(id).toprettyxml()
e18a79c5909036c9e90e37dee7cf20d0466a3714 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14755/e18a79c5909036c9e90e37dee7cf20d0466a3714/journalling.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 16336, 12, 350, 4672, 1172, 1696, 16336, 12, 350, 2934, 3669, 266, 5512, 2902, 7675, 3015, 2932, 3158, 17, 28, 7923, 225, 2, 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, 4657, 16336, 12, 350, 4672, 1172, 1696, 16336, 12, 350, 2934, 3669, 266, 5512, 2902, 7675, 3015, 2932, 3158, 17, 28, 7923, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.fp = sock.makefile("rb")
self.fp = sock.makefile(sock, "rb")
def __init__(self, sock, debuglevel=0, strict=0, method=None): # If the response includes a content-length header, we # need to make sure that the client doesn't read more than the # specified number of bytes. If it does, it will block until # the server times out and closes the connection. (The only # applies to HTTP/1.1 connections.) This will happen if a self.fp.read() # is done (without a size) whether self.fp is buffered or not. # So, no self.fp.read() by clients unless they know what they are doing. self.fp = sock.makefile("rb") self.debuglevel = debuglevel self.strict = strict self._method = method
eb2948bf704708837dfbeb248f7c12d401643d67 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/eb2948bf704708837dfbeb248f7c12d401643d67/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1198, 2815, 33, 20, 16, 5490, 33, 20, 16, 707, 33, 7036, 4672, 468, 971, 326, 766, 6104, 279, 913, 17, 2469, 1446, 16, 732, 468, 1608, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1198, 2815, 33, 20, 16, 5490, 33, 20, 16, 707, 33, 7036, 4672, 468, 971, 326, 766, 6104, 279, 913, 17, 2469, 1446, 16, 732, 468, 1608, 358, ...
def _write_help(self, directory): """ Write a default help file for the documentation, unless a help file is already present.
def _write_frames(self, directory, progress_callback): """ Write the frames-driven contents files for the project to the given directory. - C{epydoc-frames.html} - C{epydoc-toc.html} - C{epydoc-project-toc.html} - C{I{module}-toc.html}
def _write_help(self, directory): """ Write a default help file for the documentation, unless a help file is already present.
dd7fc26b7d69af6d4765be2a892edca4603899ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/dd7fc26b7d69af6d4765be2a892edca4603899ee/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 5201, 12, 2890, 16, 1867, 4672, 3536, 2598, 279, 805, 2809, 585, 364, 326, 7323, 16, 3308, 279, 2809, 585, 353, 1818, 3430, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 5201, 12, 2890, 16, 1867, 4672, 3536, 2598, 279, 805, 2809, 585, 364, 326, 7323, 16, 3308, 279, 2809, 585, 353, 1818, 3430, 18, 2, -100, -100, -100, -100, -100, -100, -1...
return ['/usr/local/include']
return [os.path.join(get_env("LOCALBASE", "/usr/local"), "include")]
def include_dirs_for_libffi(self): return ['/usr/local/include']
430ab3434dab2063e31712e082083d93eaed4bff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/430ab3434dab2063e31712e082083d93eaed4bff/freebsd7.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2341, 67, 8291, 67, 1884, 67, 2941, 1403, 77, 12, 2890, 4672, 327, 10228, 19, 13640, 19, 3729, 19, 6702, 3546, 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, 2341, 67, 8291, 67, 1884, 67, 2941, 1403, 77, 12, 2890, 4672, 327, 10228, 19, 13640, 19, 3729, 19, 6702, 3546, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.options.label)
self.options.id)
def _delete(self): (self.options, self.args) = self.parser.parse_args() if not self.options.id: print("Group id required. Try --help") sys.exit(0) try: self.cgconn.delete(id=self.options.id) print _(" Successful deleted Consumer Group [ %s ] " % self.options.id) except RestlibException, re: print _(" Deleted operation failed Consumer Group [ %s ] " % \ self.options.label) log.error("Error: %s" % re) sys.exit(-1) except Exception, e: print _(" Deleted operation failed on Consumer Group [ %s ]. " % \ self.options.label) log.error("Error: %s" % e) sys.exit(-1)
f40e11290840965f276cda2e05ccb946d00a6ef4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/f40e11290840965f276cda2e05ccb946d00a6ef4/core_consumergroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3733, 12, 2890, 4672, 261, 2890, 18, 2116, 16, 365, 18, 1968, 13, 273, 365, 18, 4288, 18, 2670, 67, 1968, 1435, 309, 486, 365, 18, 2116, 18, 350, 30, 1172, 2932, 1114, 612, 1931...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3733, 12, 2890, 4672, 261, 2890, 18, 2116, 16, 365, 18, 1968, 13, 273, 365, 18, 4288, 18, 2670, 67, 1968, 1435, 309, 486, 365, 18, 2116, 18, 350, 30, 1172, 2932, 1114, 612, 1931...
"""Dismisses currently shown confirmation dialog.
"""Dismisses currently shown confirmation dialog and returns it's message.
def confirm_action(self): """Dismisses currently shown confirmation dialog.
c1407178555088c5e341b58e7161ecf9df505852 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2148/c1407178555088c5e341b58e7161ecf9df505852/javascript.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6932, 67, 1128, 12, 2890, 4672, 3536, 1669, 3105, 281, 4551, 12188, 14296, 6176, 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,...
[ 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6932, 67, 1128, 12, 2890, 4672, 3536, 1669, 3105, 281, 4551, 12188, 14296, 6176, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
while True: readahead, pending = self._read_chunk() more_line = pending if more_line or not readahead:
while self._read_chunk(): if self._decoded_text:
def readline(self, limit=None): if limit is None: limit = -1 if limit >= 0: # XXX Hack to support limit argument, for backwards compatibility line = self.readline() if len(line) <= limit: return line line, self._decoded_text = \ line[:limit], line[limit:] + self._decoded_text return line
2e00b1ed3eaf2ada4c0cb16b188516bd10ad5f0c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/2e00b1ed3eaf2ada4c0cb16b188516bd10ad5f0c/io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 1800, 33, 7036, 4672, 309, 1800, 353, 599, 30, 1800, 273, 300, 21, 309, 1800, 1545, 374, 30, 468, 11329, 670, 484, 358, 2865, 1800, 1237, 16, 364, 12727, 8926, 980...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12023, 12, 2890, 16, 1800, 33, 7036, 4672, 309, 1800, 353, 599, 30, 1800, 273, 300, 21, 309, 1800, 1545, 374, 30, 468, 11329, 670, 484, 358, 2865, 1800, 1237, 16, 364, 12727, 8926, 980...
dprint(action.__class__.__name__)
def performAction(self, system_state): action = self.actioncls(system_state.frame, mode=system_state.mode) dprint(action.__class__.__name__) action.actionKeystroke(self.evt, self.multiplier)
d77726ef8abb406e3169b9a46422cfcaff76a425 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/d77726ef8abb406e3169b9a46422cfcaff76a425/macro.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 1803, 12, 2890, 16, 2619, 67, 2019, 4672, 1301, 273, 365, 18, 1128, 6429, 12, 4299, 67, 2019, 18, 3789, 16, 1965, 33, 4299, 67, 2019, 18, 3188, 13, 1301, 18, 1128, 653, 16181, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 1803, 12, 2890, 16, 2619, 67, 2019, 4672, 1301, 273, 365, 18, 1128, 6429, 12, 4299, 67, 2019, 18, 3789, 16, 1965, 33, 4299, 67, 2019, 18, 3188, 13, 1301, 18, 1128, 653, 16181, ...
if node.type != "block":
if node == None or node.type != "block":
def combineToCommaExpression(node): if node.type != "block": return node for child in node: if child.type != "semicolon": return node comma = Node(node.tokenizer, "comma") for child in node: # Ignore empty semicolons if hasattr(child, "expression"): # Auto-protect inner comma expressions via parens if child.expression.type == "comma": child.expression.parenthesized = True comma.append(child.expression) semicolon = Node(node.tokenizer, "semicolon") semicolon.append(comma, "expression") parent = node.parent parent.replace(node, semicolon) return semicolon
7685958a9162ed6c56702e13206c9bd4052d1ee4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/7685958a9162ed6c56702e13206c9bd4052d1ee4/BlockReducer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8661, 774, 15594, 2300, 12, 2159, 4672, 309, 756, 422, 599, 578, 756, 18, 723, 480, 315, 2629, 6877, 327, 756, 225, 364, 1151, 316, 756, 30, 309, 1151, 18, 723, 480, 315, 12000, 17280,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8661, 774, 15594, 2300, 12, 2159, 4672, 309, 756, 422, 599, 578, 756, 18, 723, 480, 315, 2629, 6877, 327, 756, 225, 364, 1151, 316, 756, 30, 309, 1151, 18, 723, 480, 315, 12000, 17280,...
except (AttributeError, Tkinter.TclError):
except (KeyboardInterrupt, SystemExit): raise except Exception:
def __del__(self): try: if self.delete_font: self._call("font", "delete", self.name) except (AttributeError, Tkinter.TclError): pass
22a5762e65613569ec0e052ca2bc2c1a5ec48f6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/22a5762e65613569ec0e052ca2bc2c1a5ec48f6c/tkFont.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 775, 30, 309, 365, 18, 3733, 67, 5776, 30, 365, 6315, 1991, 2932, 5776, 3113, 315, 3733, 3113, 365, 18, 529, 13, 1335, 261, 17872, 14126, 16, 25454, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 775, 30, 309, 365, 18, 3733, 67, 5776, 30, 365, 6315, 1991, 2932, 5776, 3113, 315, 3733, 3113, 365, 18, 529, 13, 1335, 261, 17872, 14126, 16, 25454, 46...
segs.append(segments.segment(segment[0], segment[0] + job_length_from_psds(powerjob, extra_psds)))
segs.append(segments.segment(t, t + job_length_from_psds(powerjob, extra_psds)))
def split_segment(powerjob, segment, psds_per_job): """ Split the data segment into correctly-overlaping segments. We try to have the numbers of PSDs in each segment be equal to psds_per_job, but with a short segment at the end if needed. """ joblength = job_length_from_psds(powerjob, psds_per_job) joboverlap = 2 * powerjob.filter_corruption + powerjob.psd_overlap segs = segments.segmentlist() t = segment[0] while t + joblength <= segment[1]: segs.append(segments.segment(t, t + joblength) & segment) t += joblength - joboverlap extra_psds = int(psds_from_job_length(powerjob, float(segment[1] - t))) if extra_psds: segs.append(segments.segment(segment[0], segment[0] + job_length_from_psds(powerjob, extra_psds))) return segs
b71261f275bb805066292aa9a09dd799ddcddd0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/b71261f275bb805066292aa9a09dd799ddcddd0b/power.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 67, 9273, 12, 12238, 4688, 16, 3267, 16, 4250, 2377, 67, 457, 67, 4688, 4672, 3536, 5385, 326, 501, 3267, 1368, 8783, 17, 17946, 310, 5155, 18, 225, 1660, 775, 358, 1240, 326, 56...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1416, 67, 9273, 12, 12238, 4688, 16, 3267, 16, 4250, 2377, 67, 457, 67, 4688, 4672, 3536, 5385, 326, 501, 3267, 1368, 8783, 17, 17946, 310, 5155, 18, 225, 1660, 775, 358, 1240, 326, 56...
self.verbose_logger.log(logginglevels.DEBUG_2, 'Unresolveable requirement %s for %s', niceformatneed, reqpkg[0])
msg = 'Unresolveable requirement %s for %s' % (niceformatneed, reqpkg[0]) self.verbose_logger.log(logginglevels.DEBUG_2, msg)
def _requiringFromInstalled(self, requiringPo, requirement, errorlist): """processes the dependency resolution for a dep where the requiring package is installed"""
a9aba0b9d8a1a88fee9b502fafe2f283b4954afa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5445/a9aba0b9d8a1a88fee9b502fafe2f283b4954afa/depsolve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4523, 11256, 1265, 16747, 12, 2890, 16, 29468, 29198, 16, 12405, 16, 555, 1098, 4672, 3536, 18675, 326, 4904, 7861, 364, 279, 5993, 1625, 326, 29468, 2181, 353, 5876, 8395, 2, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4523, 11256, 1265, 16747, 12, 2890, 16, 29468, 29198, 16, 12405, 16, 555, 1098, 4672, 3536, 18675, 326, 4904, 7861, 364, 279, 5993, 1625, 326, 29468, 2181, 353, 5876, 8395, 2, -100, ...
lookup = np.array(lookup, int)
lookup = fix(lookup)
def run(self, workspace): assert isinstance(workspace, cpw.Workspace) image = workspace.image_set.get_image(self.image_name.value, must_be_grayscale = True) img = image.pixel_data mask = image.mask objects = workspace.object_set.get_objects(self.primary_objects.value) global_threshold = None if self.method == M_DISTANCE_N: has_threshold = False elif self.threshold_method == cpthresh.TM_BINARY_IMAGE: binary_image = workspace.image_set.get_image(self.binary_image.value, must_be_binary = True) local_threshold = numpy.ones(img.shape) local_threshold[binary_image.pixel_data] = 0 global_threshold = otsu(img[mask], self.threshold_range.min, self.threshold_range.max) has_threshold = True else: local_threshold,global_threshold = self.get_threshold(img, mask, None) has_threshold = True if has_threshold: thresholded_image = img > local_threshold # # Get the following labels: # * all edited labels # * labels touching the edge, including small removed # labels_in = objects.unedited_segmented.copy() labels_in[(objects.small_removed_segmented > 0) & (objects.segmented == 0)] = 0 if self.method in (M_DISTANCE_B, M_DISTANCE_N): if self.method == M_DISTANCE_N: distances,(i,j) = scind.distance_transform_edt(labels_in == 0, return_indices = True) labels_out = np.zeros(labels_in.shape,int) dilate_mask = distances <= self.distance_to_dilate.value labels_out[dilate_mask] =\ labels_in[i[dilate_mask],j[dilate_mask]] else: labels_out, distances = propagate(img, labels_in, thresholded_image, 1.0) labels_out[distances>self.distance_to_dilate.value] = 0 labels_out[labels_in > 0] = labels_in[labels_in>0] # # Create the final output labels by removing labels in the # output matrix that are missing from the segmented image # segmented_labels = objects.segmented small_removed_segmented_out = labels_out segmented_out = self.filter_labels(labels_out, objects, workspace) elif self.method == M_PROPAGATION: labels_out, distance = propagate(img, labels_in, thresholded_image, self.regularization_factor.value) small_removed_segmented_out = fill_labeled_holes(labels_out) segmented_out = self.filter_labels(small_removed_segmented_out, objects, workspace) elif self.method == M_WATERSHED_G: # # First, apply the sobel filter to the image (both horizontal # and vertical). The filter measures gradient. # sobel_image = np.abs(scind.sobel(img)) # # Combine the image mask and threshold to mask the watershed # watershed_mask = np.logical_or(thresholded_image, labels_in > 0) watershed_mask = np.logical_and(watershed_mask, mask) # # Perform the first watershed # labels_out = watershed(sobel_image, labels_in, np.ones((3,3),bool), mask=watershed_mask) small_removed_segmented_out = fill_labeled_holes(labels_out) segmented_out = self.filter_labels(small_removed_segmented_out, objects, workspace) elif self.method == M_WATERSHED_I: # # invert the image so that the maxima are filled first # and the cells compete over what's close to the threshold # inverted_img = 1-img # # Same as above, but perform the watershed on the original image # watershed_mask = np.logical_or(thresholded_image, labels_in > 0) watershed_mask = np.logical_and(watershed_mask, mask) # # Perform the watershed # labels_out = watershed(inverted_img, labels_in, np.ones((3,3),bool), mask=watershed_mask) small_removed_segmented_out = fill_labeled_holes(labels_out) segmented_out = self.filter_labels(small_removed_segmented_out, objects, workspace)
0e128c054b8f7247d4fab5c6d760ec134d598a83 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2870/0e128c054b8f7247d4fab5c6d760ec134d598a83/identifysecondaryobjects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 6003, 4672, 1815, 1549, 12, 14915, 16, 3283, 91, 18, 8241, 13, 1316, 273, 6003, 18, 2730, 67, 542, 18, 588, 67, 2730, 12, 2890, 18, 2730, 67, 529, 18, 1132, 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, 1086, 12, 2890, 16, 6003, 4672, 1815, 1549, 12, 14915, 16, 3283, 91, 18, 8241, 13, 1316, 273, 6003, 18, 2730, 67, 542, 18, 588, 67, 2730, 12, 2890, 18, 2730, 67, 529, 18, 1132, 16, ...
etadiff = etastar + 1/(self.ainit*self.bgmodel.yresult[0,2]*(1-self.bgepsilon[0]))
etadiff = etastar + 1/(self.ainit*bgyresult[0,2]*(1-self.bgepsilon[0]))
def getfoystart(self, ts=None, tsix=None): """Model dependent setting of ystart""" self._log.debug("Executing getfoystart to get initial conditions.") #Set variables in standard case: if ts is None or tsix is None: ts, tsix = self.fotstart, self.fotstartindex #Reset starting conditions at new time foystart = np.zeros((len(self.ystart), len(self.k))) #set_trace() #Get values of needed variables at crossing time. astar = self.ainit*np.exp(ts) Hstar = self.bgmodel.yresult[tsix,2] epsstar = self.bgepsilon[tsix] etastar = -1/(astar*Hstar*(1-epsstar)) try: etadiff = etastar - self.etainit except AttributeError: etadiff = etastar + 1/(self.ainit*self.bgmodel.yresult[0,2]*(1-self.bgepsilon[0])) keta = self.k*etadiff #Set bg init conditions based on previous bg evolution try: foystart[0:3] = self.bgmodel.yresult[tsix,:].transpose() except ValueError: foystart[0:3] = self.bgmodel.yresult[tsix,:][:, np.newaxis] #Find 1/asqrt(2k) arootk = np.sqrt(self.k**3/(2*np.pi**2))/(astar*(np.sqrt(2*self.k))) #Find cos and sin(-keta) csketa = np.cos(-keta) snketa = np.sin(-keta) #Set Re\delta\phi_1 initial condition foystart[3,:] = csketa*arootk #set Re\dot\delta\phi_1 ic foystart[4,:] = -arootk*(csketa - (self.k/(astar*Hstar))*snketa) #Set Im\delta\phi_1 foystart[5,:] = snketa*arootk #Set Im\dot\delta\phi_1 foystart[6,:] = -arootk*((self.k/(astar*Hstar))*csketa + snketa) return foystart
1fd93147e159777102a6a1ab5bafbc87a77c00a6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7283/1fd93147e159777102a6a1ab5bafbc87a77c00a6/cosmomodels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 617, 1094, 485, 12, 2890, 16, 3742, 33, 7036, 16, 3742, 697, 33, 7036, 4672, 3536, 1488, 10460, 3637, 434, 677, 1937, 8395, 365, 6315, 1330, 18, 4148, 2932, 22134, 336, 617, 1094, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 617, 1094, 485, 12, 2890, 16, 3742, 33, 7036, 16, 3742, 697, 33, 7036, 4672, 3536, 1488, 10460, 3637, 434, 677, 1937, 8395, 365, 6315, 1330, 18, 4148, 2932, 22134, 336, 617, 1094, ...
if vals.get('parent.party'): party = party_obj.browse(cursor, user, vals['parent.party'],
if vals.get('_parent_invoice.party'): party = party_obj.browse(cursor, user, vals['_parent_invoice.party'],
def on_change_product(self, cursor, user, ids, vals, context=None): product_obj = self.pool.get('product.product') party_obj = self.pool.get('relationship.party') account_obj = self.pool.get('account.account') uom_obj = self.pool.get('product.uom') company_obj = self.pool.get('company.company') currency_obj = self.pool.get('currency.currency') if context is None: context = {} if not vals.get('product'): return {} res = {}
539479e0405abbee5564053fa837d5346bb3c202 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9267/539479e0405abbee5564053fa837d5346bb3c202/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 5896, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 3017, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 5896, 6134, 18285, 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, 603, 67, 3427, 67, 5896, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 3017, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 5896, 6134, 18285, 67,...
return map(lambda x: node_class(self.cr, self.uid, self.path+'/'+x.name, x, False, context=self.context, type='file', root=False), res) + res2
return map(lambda x: node_class(self.cr, self.uid, self.path+'/'+eval('x.'+fobj._rec_name), x, False, context=self.context, type='file', root=False), res) + res2
def _file_get(self, nodename=False): if not self.object: return [] pool = pooler.get_pool(self.cr.dbname) fobj = pool.get('ir.attachment') res2 = [] where = [] if self.object2: where.append( ('res_model','=',self.object2._name) ) where.append( ('res_id','=',self.object2.id) ) else: where.append( ('parent_id','=',self.object.id) ) where.append( ('res_id','=',False) ) if nodename: where.append( (fobj._rec_name,'=',nodename) ) for content in self.object.content_ids: if self.object2 or not content.include_name: if content.include_name: test_nodename = self.object2.name + (content.suffix or '') + (content.extension or '') else: test_nodename = (content.suffix or '') + (content.extension or '') if test_nodename.find('/'): test_nodename=test_nodename.replace('/', '_') path = self.path+'/'+test_nodename if not nodename: n = node_class(self.cr, self.uid,path, self.object2, False, context=self.context, content=content, type='content', root=False) res2.append( n) else: if nodename == test_nodename: n = node_class(self.cr, self.uid, path, self.object2, False, context=self.context, content=content, type='content', root=False) res2.append(n)
d05bfafb5145c24561f9040bb39dba1d10318ea6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/d05bfafb5145c24561f9040bb39dba1d10318ea6/document.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 768, 67, 588, 12, 2890, 16, 14003, 1069, 33, 8381, 4672, 309, 486, 365, 18, 1612, 30, 327, 5378, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 2890, 18, 3353, 18, 20979, 13, 2470...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 768, 67, 588, 12, 2890, 16, 14003, 1069, 33, 8381, 4672, 309, 486, 365, 18, 1612, 30, 327, 5378, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 2890, 18, 3353, 18, 20979, 13, 2470...
def test_negavitelen(self):
def test_negativelen(self):
def test_negavitelen(self): # from issue 3306, previously it segfaulted self.assertRaises(audioop.error, audioop.findmax, ''.join( chr(x) for x in xrange(256)), -2392392)
71262fa363a47e3c6061ca3f733463e0444f890d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/71262fa363a47e3c6061ca3f733463e0444f890d/test_audioop.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 14518, 270, 427, 292, 275, 12, 2890, 4672, 468, 628, 5672, 890, 29490, 16, 7243, 518, 2291, 643, 329, 365, 18, 11231, 12649, 6141, 12, 11509, 556, 18, 1636, 16, 7447, 556, 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, 1842, 67, 14518, 270, 427, 292, 275, 12, 2890, 4672, 468, 628, 5672, 890, 29490, 16, 7243, 518, 2291, 643, 329, 365, 18, 11231, 12649, 6141, 12, 11509, 556, 18, 1636, 16, 7447, 556, 18...
timeout = job.timeout
def write_job_file(self, job): """ Writes out the job file to be executed to disk. """ parsed_file = preparse_file(job.code, magic=True, do_time=False, ignore_prompts=False)
72f7a86153c2ded14fe5a6250b84984c48f48c3f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/72f7a86153c2ded14fe5a6250b84984c48f48c3f/dsage_worker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4688, 67, 768, 12, 2890, 16, 1719, 4672, 3536, 30053, 596, 326, 1719, 585, 358, 506, 7120, 358, 4234, 18, 225, 3536, 225, 2707, 67, 768, 273, 675, 2670, 67, 768, 12, 4688, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4688, 67, 768, 12, 2890, 16, 1719, 4672, 3536, 30053, 596, 326, 1719, 585, 358, 506, 7120, 358, 4234, 18, 225, 3536, 225, 2707, 67, 768, 273, 675, 2670, 67, 768, 12, 4688, ...
"--record=INSTALLED_FILES") % self.python),
"--record=INSTALLED_FILES") % def_setup_call),
def _make_spec_file(self): """Generate the text of an RPM spec file and return it as a list of strings (one per line). """ # definitions and headers spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version().replace('-','_'), '%define release ' + self.release.replace('-','_'), '', 'Summary: ' + self.distribution.get_description(), ]
f69d3a14090d9427b911a02f9458cf4a2a07cd70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f69d3a14090d9427b911a02f9458cf4a2a07cd70/bdist_rpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 2793, 67, 768, 12, 2890, 4672, 3536, 4625, 326, 977, 434, 392, 534, 12728, 857, 585, 471, 327, 518, 487, 279, 666, 434, 2064, 261, 476, 1534, 980, 2934, 3536, 468, 6377,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 2793, 67, 768, 12, 2890, 4672, 3536, 4625, 326, 977, 434, 392, 534, 12728, 857, 585, 471, 327, 518, 487, 279, 666, 434, 2064, 261, 476, 1534, 980, 2934, 3536, 468, 6377,...
cwd = os.getcwd()
cwd = os.getcwd() topdir = os.path.abspath(topdir)
def __init__(self, cname, topdir, make_path): # create build directories cwd = os.getcwd() self.topdir = topdir self.blddir = os.path.join(os.getcwd(), "build-%s" % cname) self.logdir = os.path.join(self.blddir, "log") self.bindir = os.path.join(self.blddir, "bin") self.libdir = os.path.join(self.blddir, "lib") for p in [self.blddir, self.logdir, self.libdir, self.bindir ]: if not os.path.isdir(p): try: os.makedirs(p) except: fatal("error creating directory " + p)
d88220500b18005458adbc405fd9cfd1d498f8cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5963/d88220500b18005458adbc405fd9cfd1d498f8cb/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 18290, 16, 1760, 1214, 16, 1221, 67, 803, 4672, 468, 752, 1361, 6402, 7239, 273, 1140, 18, 588, 11089, 1435, 1760, 1214, 273, 1140, 18, 803, 18, 5113, 80...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 18290, 16, 1760, 1214, 16, 1221, 67, 803, 4672, 468, 752, 1361, 6402, 7239, 273, 1140, 18, 588, 11089, 1435, 1760, 1214, 273, 1140, 18, 803, 18, 5113, 80...
if self.ready: focussed = wx.Window.FindFocus() return focussed == self.list
assert self.ready, "List not ready" focussed = wx.Window.FindFocus() return focussed == self.list
def HasFocus(self): if self.ready: focussed = wx.Window.FindFocus() return focussed == self.list
fea0b7a7659af1638af9474d61b04512d0ea647f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9686/fea0b7a7659af1638af9474d61b04512d0ea647f/list.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4393, 9233, 12, 2890, 4672, 1815, 365, 18, 1672, 16, 315, 682, 486, 5695, 6, 7155, 730, 273, 7075, 18, 3829, 18, 3125, 9233, 1435, 327, 7155, 730, 422, 365, 18, 1098, 225, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4393, 9233, 12, 2890, 4672, 1815, 365, 18, 1672, 16, 315, 682, 486, 5695, 6, 7155, 730, 273, 7075, 18, 3829, 18, 3125, 9233, 1435, 327, 7155, 730, 422, 365, 18, 1098, 225, 2, -100, -...
self.env["VLINKFLAGS"] += ['-l%s' % lib]
self.env["_VLINKFLAGS"] += ['-l%s' % lib]
def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work', 'work'] self.env["VLOGFLAGS"] += ['-work', 'work'] self.env["SCCOMFLAGS"] += ['-work', 'work'] self.env["SCGENMODFLAGS"] += ['-lib', 'work'] self.env["VSIMFLAGS"] += ['-c', '-lib', 'work'] self.env["SCLINKFLAGS"] += ['-work', 'work'] # Collect sccom flags from defines includes and uselib if hasattr(self, "defines"): for define in Utils.to_list(self.defines): self.env["SCCOMFLAGS"] += ['-D%s' % define] self.env["VLINKFLAGS"] += ['-D%s' % define] if hasattr(self, "includes"): for inc in Utils.to_list(self.includes): i = self.path.find_dir(inc) if i: self.env["SCCOMFLAGS"] += ['-I%s' % i.abspath()] if hasattr(self, "uselib"): for lib in Utils.to_list(self.uselib): for path in self.env["INCLUDES_%s" % lib]: self.env["SCCOMFLAGS"] += ['-I%s' % path] for path in self.env["LIBPATH_%s" % lib]: self.env["VLINKFLAGS"] += ['-L%s' % path] for lib in self.env["LIB_%s" % lib]: self.env["VLINKFLAGS"] += ['-l%s' % lib] #if hasattr(self, "use"): # for lib in Utils.to_list(self.use): # print lib # print dir(self.bld) #for path in self.env["INCLUDES_%s" % lib]: # self.env["SCCOMFLAGS"] += ['-I%s' % path] #for path in self.env["LIBPATH_%s" % lib]: # self.env["VLINKFLAGS"] += ['-L%s' % path] #for lib in self.env["LIB_%s" % lib]: # self.env["VLINKFLAGS"] += ['-l%s' % lib] # Create vlib task on target workdir = self.path.find_or_declare(self.target) vlib = self.create_task('vlib', tgt=[workdir]) vlib.target = self.target self.mdeps = [] if hasattr(self, "after"): lst = [n for n in self.bld.all_task_gen if "modelsim" in n.features and n.target == self.after] for l in lst: for t in l.tasks: if len(t.outputs) > 0: self.mdeps += t.outputs # If given generate scgenmod tasks to get systemc header if hasattr(self, "generate"): for p in Utils.to_list(self.generate): ls = p.split(':') if len(ls)!=2: print "a generator pair has to be like '<object>:<header.h>'" import sys sys.exit(1) tgt = self.path.find_or_declare(ls[1]) env = self.env.derive() env.append_value("src", ls[0]) mod = self.create_task('scgenmod', tgt=tgt) mod.env = env self.env["SCCOMFLAGS"] += ['-I%s' % tgt.parent.bldpath()] mod.dep_nodes += self.mdeps # Create modelsim ini task if needed tgt = None if hasattr(self, "config"): tgt = self.path.find_or_declare("modelsim_%s.ini" % self.target) tsk = self.create_task('vini', tgt=tgt) tsk.root = self.bld.out_dir tsk.path = self.path.get_bld().abspath() tsk.target = self.target tsk.config = self.path.find_resource(self.config) or self.config tsk.set_run_after(vlib) ini = tgt.get_bld().abspath() self.env["VSIMFLAGS"] += ['-modelsimini', ini] self.env["VCOMFLAGS"] += ['-modelsimini', ini] self.env["VLOGFLAGS"] += ['-modelsimini', ini] self.env["SCCOMFLAGS"] += ['-modelsimini', ini] self.env["SCGENMODFLAGS"] += ['-modelsimini', ini] self.env["SCLINKFLAGS"] += ['-modelsimini', ini] # Create dobefore task if needed if hasattr(self, "dobefore"): do = self.path.find_resource(self.dobefore) if do: do = do.abspath() else: do = self.dobefore self.env["VSIMBEFORE"] += ['-do', do] before = self.create_task('vsim_before') before.dep_nodes += self.mdeps if tgt: before.dep_nodes += [tgt] before.dotask = self.dobefore before.target = self.target # Create doafter task if needed if hasattr(self, "doafter"): do = self.path.find_resource(self.doafter) if do: do = do.abspath() else: do = self.doafter self.env["VSIMAFTER"] += ['-do', do] after = self.create_task('vsim_after') after.dep_nodes += self.mdeps if tgt: after.dep_nodes += [tgt] after.dotask = self.doafter after.target = self.target
7c31064d730fec5e3b83aa4842fea01bd5df60db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/209/7c31064d730fec5e3b83aa4842fea01bd5df60db/modelsim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3679, 381, 12, 2890, 4672, 3536, 7001, 23536, 364, 326, 5916, 752, 331, 2941, 1562, 471, 331, 8767, 1562, 487, 5492, 487, 741, 5771, 471, 741, 5205, 4592, 309, 3577, 3536, 1550, 273, 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, 3679, 381, 12, 2890, 4672, 3536, 7001, 23536, 364, 326, 5916, 752, 331, 2941, 1562, 471, 331, 8767, 1562, 487, 5492, 487, 741, 5771, 471, 741, 5205, 4592, 309, 3577, 3536, 1550, 273, 365...
os.remove(os.path.join(icu_dat_path, ICUDATA_DAT))
os.remove(os.path.join(stubdata_dir, ICUDATA_DAT))
def main(): global ANDROID_ROOT # Android project home directory global ICU_VERSION # ICU version number global ICUDATA # e.g. "icudt42l" global ICUDATA_DAT # e.g. "icudt42l.dat" global CLDR_VERSION # CLDR version. The value can be vary upon ICU release. global TMP_DAT_PATH # temp directory to store all resource files and # intermediate dat files. global HELP global VERBOSE argc = len(sys.argv) if argc < 2: print "You must provide icu version number." print "Example: ./icu_dat_generator.py 4.4" sys.exit(1) ICU_VERSION = sys.argv[1] version = GetIcuVersion(ICU_VERSION) if (version == -1): print sys.argv[1] + " is not a valid icu version number!" sys.exit(1) ICUDATA = "icudt" + version + "l" CLDR_VERSION = "1.8" ANDROID_ROOT = os.environ.get("ANDROID_BUILD_TOP") if not ANDROID_ROOT: print "$ANDROID_BUILD_TOP not set! Run 'env_setup.sh'." sys.exit(1) ICUDATA_DAT = ICUDATA + ".dat" HELP = False VERBOSE = False try: opts, args = getopt.getopt(sys.argv[2:], 'hv', ['help', 'verbose']) except getopt.error: print "Invalid option" PrintHelp() sys.exit(1) for opt, arg in opts: if opt in ('-h', '--help'): PrintHelp() sys.exit(1) elif opt in ('-v', '--verbose'): VERBOSE = True # Check for requiered source files. icu_dat_path = os.path.join(ANDROID_ROOT, "external", "icu4c", "stubdata") full_data_filename = os.path.join(icu_dat_path, ICUDATA + "-all.dat") if not os.path.isfile(full_data_filename): print "%s not present." % full_data_filename sys.exit(1) # Create a temporary working directory. TMP_DAT_PATH = os.path.join(ANDROID_ROOT, "external", "icu4c", "tmp") if os.path.exists(TMP_DAT_PATH): shutil.rmtree(TMP_DAT_PATH) os.mkdir(TMP_DAT_PATH) # Extract resource files from icudtxxl-all.dat to TMP_DAT_PATH. ExtractAllResourceToTempDir() datlist = ["us", "us-euro", "default", "us-japan", "zh", "medium", "large"] for dat_subtag in datlist: MakeDat(icu_dat_path, dat_subtag) # Copy icudtxxl.dat to stubdata directory with corresponding subtag. shutil.copyfile(os.path.join(TMP_DAT_PATH, ICUDATA_DAT), os.path.join(icu_dat_path, ICUDATA + "-" + dat_subtag + ".dat")) print "Generate ICU data:" + os.path.join(icu_dat_path, ICUDATA + "-" + dat_subtag + ".dat") # Cleanup temporary working directory and icudtxxl.dat shutil.rmtree(TMP_DAT_PATH) os.remove(os.path.join(icu_dat_path, ICUDATA_DAT))
89f309f809ddaba6a3ba4a31a8ee74cfa5e85be3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10672/89f309f809ddaba6a3ba4a31a8ee74cfa5e85be3/icu_dat_generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 4116, 1457, 734, 67, 9185, 225, 468, 15288, 1984, 6382, 1867, 2552, 28009, 67, 5757, 282, 468, 28009, 1177, 1300, 2552, 28009, 4883, 4202, 468, 425, 18, 75, 18, 315, 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, 2774, 13332, 2552, 4116, 1457, 734, 67, 9185, 225, 468, 15288, 1984, 6382, 1867, 2552, 28009, 67, 5757, 282, 468, 28009, 1177, 1300, 2552, 28009, 4883, 4202, 468, 425, 18, 75, 18, 315, 3...
Tests initialization from a given time string.
Tests deepcopy method from L{obspy.core.Stats}.
def test_deepcopy(self): """ Tests initialization from a given time string. """ stats = Stats() stats.network = 'BW' stats['station'] = 'ROTZ' x = stats.keys() x.sort() y = copy.deepcopy(x)[0:3] self.assertEquals(y, ['network', 'station'])
89215193cb9af764d171e96a6c57c8b3a7fdc103 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/89215193cb9af764d171e96a6c57c8b3a7fdc103/test_stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16589, 3530, 12, 2890, 4672, 3536, 7766, 87, 7217, 707, 628, 511, 95, 947, 30884, 18, 3644, 18, 4195, 5496, 3536, 3177, 273, 11486, 1435, 3177, 18, 5185, 273, 296, 38, 59, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16589, 3530, 12, 2890, 4672, 3536, 7766, 87, 7217, 707, 628, 511, 95, 947, 30884, 18, 3644, 18, 4195, 5496, 3536, 3177, 273, 11486, 1435, 3177, 18, 5185, 273, 296, 38, 59, 11...
portal_status_message='New issue created',
portal_status_message=self.translate('new_issue_created', 'New issue created'),
def add_issue(self, REQUEST=None, RESPONSE=None): """ create a new issue """ self._num_issues += 1 id = str(self._num_issues) self.invokeFactory('PloneIssueNG', id) issue = aq_base(self._getOb(id))
c31a875da254f7edd445dacd3748413b52a322d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/c31a875da254f7edd445dacd3748413b52a322d7/Collector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 13882, 12, 2890, 16, 12492, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 752, 279, 394, 5672, 3536, 365, 6315, 2107, 67, 9618, 1011, 404, 612, 273, 609, 12, 2890, 6315, 2107, 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, 527, 67, 13882, 12, 2890, 16, 12492, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 752, 279, 394, 5672, 3536, 365, 6315, 2107, 67, 9618, 1011, 404, 612, 273, 609, 12, 2890, 6315, 2107, 67...
self.meta_interp(main, [2, 20], inline=True) self.check_loops(call_assembler=1, call_may_force=0,
self.meta_interp(main, [2, 5], inline=True) self.check_loops(call_assembler=2, call_may_force=0,
def my_ctc(*args): looptoken = original_ctc(*args) trace.append(looptoken) return looptoken
cbdb5c311cd3cb1679045eb3b12cb6fcf107ce8a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/cbdb5c311cd3cb1679045eb3b12cb6fcf107ce8a/test_recursive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 299, 71, 30857, 1968, 4672, 437, 3838, 969, 273, 2282, 67, 299, 71, 30857, 1968, 13, 2606, 18, 6923, 12, 383, 3838, 969, 13, 327, 437, 3838, 969, 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, 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, 3399, 67, 299, 71, 30857, 1968, 4672, 437, 3838, 969, 273, 2282, 67, 299, 71, 30857, 1968, 13, 2606, 18, 6923, 12, 383, 3838, 969, 13, 327, 437, 3838, 969, 2, -100, -100, -100, -100, ...
self._debug('Statting %s' % realpath) return self._cacheStat(realpath)
try: self._debug('Statting %s' % realpath) return self._cacheStat(realpath) except OSError, e: self._checkForNFSDisconnect(e, opcodes) raise
def statFile(self, fusepath): ''' Return the stat referenced by fusepath.
f179c05c46a51d0aa849b48fc4632b6fe3f24259 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5149/f179c05c46a51d0aa849b48fc4632b6fe3f24259/cachemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 610, 812, 12, 2890, 16, 19552, 803, 4672, 9163, 2000, 326, 610, 8042, 635, 19552, 803, 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,...
[ 1, 1, 1, 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, 610, 812, 12, 2890, 16, 19552, 803, 4672, 9163, 2000, 326, 610, 8042, 635, 19552, 803, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self._b += [i for i in range(n, n+how_many) if self.is_number_of_the_third_kind(i)]
self._b += [i for i in range(self._n, self._n+how_many) if self.is_powerful(i)] self._n += how_many
def _precompute(self, how_many=150): try: self._b n = self._n except AttributeError: self._b = [] n = 1 self._n = n self._b += [i for i in range(n, n+how_many) if self.is_number_of_the_third_kind(i)]
da9c7077d971928cf55f4cb1660269f1a93e0d92 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/da9c7077d971928cf55f4cb1660269f1a93e0d92/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1484, 9200, 12, 2890, 16, 3661, 67, 9353, 33, 23014, 4672, 775, 30, 365, 6315, 70, 290, 273, 365, 6315, 82, 1335, 6394, 30, 365, 6315, 70, 273, 5378, 290, 273, 404, 365, 6315, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1484, 9200, 12, 2890, 16, 3661, 67, 9353, 33, 23014, 4672, 775, 30, 365, 6315, 70, 290, 273, 365, 6315, 82, 1335, 6394, 30, 365, 6315, 70, 273, 5378, 290, 273, 404, 365, 6315, 8...
while True:
while True:
def matmat(self, other): if isspmatrix(other): M, K1 = self.shape K2, N = other.shape if (K1 != K2): raise ValueError, "shape mismatch error" a, rowa, ptra = self.data, self.rowind, self.indptr if isinstance(other, csr_matrix): other._check() dtypechar = _coerce_rules[(self.dtype.char, other.dtype.char)] ftype = _transtabl[dtypechar] func = getattr(sparsetools, ftype+'cscmucsr') b = other.data rowb = other.colind ptrb = other.indptr elif isinstance(other, csc_matrix): other._check() dtypechar = _coerce_rules[(self.dtype.char, other.dtype.char)] ftype = _transtabl[dtypechar] func = getattr(sparsetools, ftype+'cscmucsc') b = other.data rowb = other.rowind ptrb = other.indptr else: other = other.tocsc() dtypechar = _coerce_rules[(self.dtype.char, other.dtype.char)] ftype = _transtabl[dtypechar] func = getattr(sparsetools, ftype+'cscmucsc') b = other.data rowb = other.rowind ptrb = other.indptr a, b = _convert_data(a, b, dtypechar) newshape = (M, N) ptrc = zeros((N+1,), intc) nnzc = 2*max(ptra[-1], ptrb[-1]) c = zeros((nnzc,), dtypechar) rowc = zeros((nnzc,), intc) ierr = irow = kcol = 0 while True: c, rowc, ptrc, irow, kcol, ierr = func(M, a, rowa, ptra, b, rowb, ptrb, c, rowc, ptrc, irow, kcol, ierr) if (ierr==0): break # otherwise we were too small and must resize # calculations continue where they left off... percent_to_go = 1- (1.0*kcol) / N newnnzc = int(ceil((1+percent_to_go)*nnzc)) c = resize1d(c, newnnzc) rowc = resize1d(rowc, newnnzc) nnzc = newnnzc return csc_matrix((c, rowc, ptrc), dims=(M, N)) elif isdense(other): # This is SLOW! We need a more efficient implementation # of sparse * dense matrix multiplication! return self.matmat(csc_matrix(other)) else: raise TypeError, "need a dense or sparse matrix"
468f8a0f15a095ee7fdb71e85da826492ec51f0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/468f8a0f15a095ee7fdb71e85da826492ec51f0c/sparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4834, 7373, 12, 2890, 16, 1308, 4672, 309, 353, 1752, 5667, 12, 3011, 4672, 490, 16, 1475, 21, 273, 365, 18, 4867, 1475, 22, 16, 423, 273, 1308, 18, 4867, 309, 261, 47, 21, 480, 1475...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4834, 7373, 12, 2890, 16, 1308, 4672, 309, 353, 1752, 5667, 12, 3011, 4672, 490, 16, 1475, 21, 273, 365, 18, 4867, 1475, 22, 16, 423, 273, 1308, 18, 4867, 309, 261, 47, 21, 480, 1475...
self.exec_prefix = sys.exec_prefix
self.exec_prefix = os.path.normpath (sys.exec_prefix)
def set_final_options (self):
c27d80025134ee2ae92557af3b9d6c5496004c88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c27d80025134ee2ae92557af3b9d6c5496004c88/install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 6385, 67, 2116, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 6385, 67, 2116, 261, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
context = self.get_context(node, local_context)
context = self.get_context(function, local_context)
def process_function(self, node): if self.mode != 'init': return function, values = node.items()[0] local_context = {'ref': self._ref, '_ref': self._ref} context = self.get_context(node, local_context) args = [] if function.eval: args = eval(function.eval, local_context) for value in values: if not 'model' in value and (not 'eval' in value or not 'search' in value): raise YamlImportException('You must provide a "model" and an "eval" or "search" to evaluate.') value_model = self.get_model(value['model']) local_context = {'ref': self._ref, '_ref': self._ref} local_context['obj'] = lambda x: value_model.browse(self.cr, self.uid, x, context=context) local_context.update(self.id_map) id = eval(value['eval'], local_context) if id != None: args.append(id) model = self.get_model(function.model) method = function.name getattr(model, method)(self.cr, self.uid, *args)
a61211bf3e9ec9a718dc00f86cbdfe325267c5b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/a61211bf3e9ec9a718dc00f86cbdfe325267c5b9/yaml_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 915, 12, 2890, 16, 756, 4672, 309, 365, 18, 3188, 480, 296, 2738, 4278, 327, 445, 16, 924, 273, 756, 18, 3319, 1435, 63, 20, 65, 1191, 67, 2472, 273, 13666, 1734, 4278, 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, 1207, 67, 915, 12, 2890, 16, 756, 4672, 309, 365, 18, 3188, 480, 296, 2738, 4278, 327, 445, 16, 924, 273, 756, 18, 3319, 1435, 63, 20, 65, 1191, 67, 2472, 273, 13666, 1734, 4278, 365...
def __init__(self, msgs, key):
def __init__(self):
def __init__(self, msgs, key): self.nbs = {} # {ipp: max hop count} self.expire_dcall = None
b24d4139b69b476c43bd698d2c264e97de0294cc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8524/b24d4139b69b476c43bd698d2c264e97de0294cc/dtella_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 82, 2038, 273, 2618, 282, 468, 288, 15491, 30, 943, 19055, 1056, 97, 365, 18, 14070, 67, 72, 1991, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 82, 2038, 273, 2618, 282, 468, 288, 15491, 30, 943, 19055, 1056, 97, 365, 18, 14070, 67, 72, 1991, 273, 599, 2, -100, -100, -100, -100, -100, ...
check = Popen(cmd, stdout=PIPE, close_fds=True, cwd=testdir, env=env)
check = Popen(cmd, stdout=check_output_file, close_fds=True, cwd=testdir, env=env)
def uploadresult(submission, judgement, compiler_output, submission_output=None, autojudge_comment=None, check_output=None): result = Result() result.submission = submission result.judgement = judgement result.judged_by = autojudge compiler_output_file = File(content=compiler_output) compiler_output_file.save() result.compiler_output_file = compiler_output_file if submission_output: submission_output_file = File() try: submission_output_file.content = submission_output.decode("utf-8") except UnicodeError: submission_output_file.content = submission_output.decode("iso8859-1") submission_output_file.save() result.submission_output_file = submission_output_file if autojudge_comment: autojudge_comment_file = File(content=autojudge_comment) autojudge_comment_file.save() result.autojudge_comment_file = autojudge_comment_file if check_output: check_output_file = File() try: check_output_file.content = check_output.decode("utf-8") except UnicodeError: check_output_file.content = check_output.decode("iso8859-1") check_output_file.save() result.check_output_file = check_output_file result.save() submission.status = "CHECKED" submission.save() try: score = Score.objects.get(team=submission.team, problem=submission.problem) except ObjectDoesNotExist: score = Score(team=submission.team, problem=submission.problem, submission_count=0, correct=False) score.submission_count += 1 if judgement == "ACCEPTED": score.correct = True contest = Contest.objects.get() timedelta = (submission.timestamp - contest.starttime) score.time = timedelta.days*24 + timedelta.seconds/60 score.save() team = submission.team team.new_results = True team.save()
7eb5bfc954fc147833315dcf7766152da107a28d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11354/7eb5bfc954fc147833315dcf7766152da107a28d/autojudge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 2088, 12, 12684, 16, 525, 1100, 75, 820, 16, 5274, 67, 2844, 16, 8515, 67, 2844, 33, 7036, 16, 3656, 78, 27110, 67, 3469, 33, 7036, 16, 866, 67, 2844, 33, 7036, 4672, 563, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 2088, 12, 12684, 16, 525, 1100, 75, 820, 16, 5274, 67, 2844, 16, 8515, 67, 2844, 33, 7036, 16, 3656, 78, 27110, 67, 3469, 33, 7036, 16, 866, 67, 2844, 33, 7036, 4672, 563, 273,...
if os.access(fpath, os.R_OK):
if not check and os.access.path(fpath, os.R_OK):
def try_mirrors(d, uri, mirrors): """ Try to use a mirrored version of the sources. This method will be automatically called before the fetchers go. d Is a bb.data instance uri is the original uri we're trying to download mirrors is the list of mirrors we're going to try """ fpath = os.path.join(data.getVar("DL_DIR", d, 1), os.path.basename(uri)) if os.access(fpath, os.R_OK): bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists, skipping checkout." % fpath) return fpath ld = d.createCopy() for (find, replace) in mirrors: newuri = uri_replace(uri, find, replace, ld) if newuri != uri: try: ud = FetchData(newuri, ld) except bb.fetch.NoMethodError: bb.msg.debug(1, bb.msg.domain.Fetcher, "No method for %s" % url) continue ud.setup_localpath(ld) try: ud.method.go(newuri, ud, ld) return ud.localpath except (bb.fetch.MissingParameterError, bb.fetch.FetchError, bb.fetch.MD5SumError): import sys (type, value, traceback) = sys.exc_info() bb.msg.debug(2, bb.msg.domain.Fetcher, "Mirror fetch failure: %s" % value) continue return None
ec92133d6fc049b4b666d670d3ac263de5a1d103 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/ec92133d6fc049b4b666d670d3ac263de5a1d103/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 67, 81, 27026, 12, 72, 16, 2003, 16, 312, 27026, 4672, 3536, 6161, 358, 999, 279, 312, 481, 23226, 1177, 434, 326, 5550, 18, 1220, 707, 903, 506, 6635, 2566, 1865, 326, 2158, 414,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 775, 67, 81, 27026, 12, 72, 16, 2003, 16, 312, 27026, 4672, 3536, 6161, 358, 999, 279, 312, 481, 23226, 1177, 434, 326, 5550, 18, 1220, 707, 903, 506, 6635, 2566, 1865, 326, 2158, 414,...
self.slideshow_abort = False
def next_img_in_list(self, action): if self.slideshow_abort == True: self.slideshow_abort = False return if len(self.image_list) > 1: self.randomlist = [] if self.curr_img_in_list < len(self.image_list) - 1: self.curr_img_in_list += 1 else: if self.listwrap_mode == 0: if self.slideshow_mode == True: self.toggle_slideshow(None) self.slideshow_abort = False return elif self.listwrap_mode == 1: self.curr_img_in_list = 0 else: if self.fullscreen_mode == True: self.change_cursor(None) dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, "You are viewing the last image in the list. Wrap around to the first image?") dialog.set_default_response(gtk.RESPONSE_YES) self.user_prompt_visible = True response = dialog.run() if response == gtk.RESPONSE_YES: self.curr_img_in_list = 0 dialog.destroy() self.user_prompt_visible = False if self.fullscreen_mode == True: self.hide_cursor else: dialog.destroy() self.user_prompt_visible = False if self.fullscreen_mode == True: self.hide_cursor if self.slideshow_mode == True: self.toggle_slideshow(None) self.slideshow_abort = False return if self.fullscreen_mode == False and self.slideshow_mode == False: self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) gtk.main_iteration() try: self.load_new_image() except: self.image_load_failed() if self.fullscreen_mode == False: self.change_cursor(None) if self.slideshow_mode == True: timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action) else: self.set_go_navigation_sensitivities()
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 67, 6081, 67, 267, 67, 1098, 12, 2890, 16, 1301, 4672, 309, 365, 18, 2069, 4369, 13606, 67, 18623, 422, 1053, 30, 327, 309, 562, 12, 2890, 18, 2730, 67, 1098, 13, 405, 404, 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, 1024, 67, 6081, 67, 267, 67, 1098, 12, 2890, 16, 1301, 4672, 309, 365, 18, 2069, 4369, 13606, 67, 18623, 422, 1053, 30, 327, 309, 562, 12, 2890, 18, 2730, 67, 1098, 13, 405, 404, 30,...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 330) else quickfix.DoubleField.__init__(self, 330, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 890, 5082, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 890, 5082, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
self.failUnlessEqual(self.g.get_shortest_paths(self.A), {self.A: (0, [])}) self.failUnlessEqual(self.g.get_shortest_paths("A"), {self.A: (0, [])}) self.failUnlessEqual(self.g.get_shortest_paths(Node("A")), {self.A: (0, [])}) self.failUnlessRaises(KeyError, self.g.get_shortest_paths, Node("B")) self.failUnlessRaises(KeyError, self.g.get_shortest_paths, "B")
self.failUnlessEqual(self.g.get_shortest_paths(self.A), {self.A: (0, []), self.B: (1, [self.AB]), self.C: (2, [self.AB, self.BC])}) self.failUnlessEqual(self.g.get_shortest_paths("A"), {self.A: (0, []), self.B: (1, [self.AB]), self.C: (2, [self.AB, self.BC])}) self.failUnlessEqual(self.g.get_shortest_paths(Node("A")), {self.A: (0, []), self.B: (1, [self.AB]), self.C: (2, [self.AB, self.BC])}) self.failUnlessRaises(KeyError, self.g.get_shortest_paths, Node("D")) self.failUnlessRaises(KeyError, self.g.get_shortest_paths, "D")
def testGetShortestPaths(self): self.failUnlessEqual(self.g.get_shortest_paths(self.A), {self.A: (0, [])}) self.failUnlessEqual(self.g.get_shortest_paths("A"), {self.A: (0, [])}) self.failUnlessEqual(self.g.get_shortest_paths(Node("A")), {self.A: (0, [])}) self.failUnlessRaises(KeyError, self.g.get_shortest_paths, Node("B")) self.failUnlessRaises(KeyError, self.g.get_shortest_paths, "B")
8862f89c323d752b16b99a2cf2d65f8e71a0db73 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3401/8862f89c323d752b16b99a2cf2d65f8e71a0db73/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 967, 4897, 395, 4466, 12, 2890, 4672, 365, 18, 6870, 984, 2656, 5812, 12, 2890, 18, 75, 18, 588, 67, 6620, 395, 67, 4481, 12, 2890, 18, 37, 3631, 288, 2890, 18, 37, 30, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 967, 4897, 395, 4466, 12, 2890, 4672, 365, 18, 6870, 984, 2656, 5812, 12, 2890, 18, 75, 18, 588, 67, 6620, 395, 67, 4481, 12, 2890, 18, 37, 3631, 288, 2890, 18, 37, 30, 261, ...
assert_raises(SystemExit,cron_util.getProcessingDates,{'startDate':start},self.tableName,cursor,me.fileLogger,endDate=start) assert_raises(SystemExit,cron_util.getProcessingDates,{'startDate':start},self.tableName,cursor,me.fileLogger,endDate=start-delta) assert_raises(SystemExit,cron_util.getProcessingDates,{'startDate':start},self.tableName,cursor,me.fileLogger,deltaDate=datetime.timedelta(0)) assert_raises(SystemExit,cron_util.getProcessingDates,{'startDate':start},self.tableName,cursor,me.fileLogger,deltaDate=datetime.timedelta(days=-1))
assert_raises(SystemExit,cron_util.getProcessingDates,{'startDate':start},self.tableName,None,cursor,me.fileLogger,endDate=start) assert_raises(SystemExit,cron_util.getProcessingDates,{'startDate':start},self.tableName,None,cursor,me.fileLogger,endDate=start-delta) assert_raises(SystemExit,cron_util.getProcessingDates,{'startDate':start},self.tableName,None,cursor,me.fileLogger,deltaDate=datetime.timedelta(0)) assert_raises(SystemExit,cron_util.getProcessingDates,{'startDate':start},self.tableName,None,cursor,me.fileLogger,deltaDate=datetime.timedelta(days=-1))
def testGetProcessingDates(self): config = {} config['processingDelay'] = datetime.timedelta(0) cursor = self.connection.cursor() self.connection.rollback() self.createBunny() now = datetime.datetime.now() midnight = now.replace(hour=0,minute=0,second=0,microsecond=0) defStart = midnight - cron_util.globalInitialDeltaDate defEnd = midnight while defEnd + cron_util.globalDefaultDeltaWindow < now: defEnd += cron_util.globalDefaultDeltaWindow
cafbae83143e839351f7e00f20999c211cfa9fdb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12383/cafbae83143e839351f7e00f20999c211cfa9fdb/testUtil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 967, 7798, 15578, 12, 2890, 4672, 642, 273, 2618, 642, 3292, 10632, 6763, 3546, 273, 3314, 18, 31295, 12, 20, 13, 3347, 273, 365, 18, 4071, 18, 9216, 1435, 365, 18, 4071, 18, 200...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 967, 7798, 15578, 12, 2890, 4672, 642, 273, 2618, 642, 3292, 10632, 6763, 3546, 273, 3314, 18, 31295, 12, 20, 13, 3347, 273, 365, 18, 4071, 18, 9216, 1435, 365, 18, 4071, 18, 200...
return u"%s" % self.url_save
return force_unicode(self.url_save)
def __unicode__(self): return u"%s" % self.url_save
d2883615b172064b6250e9514a91df28a46ed237 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12975/d2883615b172064b6250e9514a91df28a46ed237/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9124, 972, 12, 2890, 4672, 327, 582, 28385, 87, 6, 738, 365, 18, 718, 67, 5688, 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, 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, 9124, 972, 12, 2890, 4672, 327, 582, 28385, 87, 6, 738, 365, 18, 718, 67, 5688, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
msg = _('unknown parser %r (choices: %s)' % tup)
msg = _('unknown parser %r (choices: %s)') % tup
def __call__(self, parser, namespace, values, option_string=None): parser_name = values[0] arg_strings = values[1:]
f2af8579d9039e824c5815ad0429169908275fa7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/f2af8579d9039e824c5815ad0429169908275fa7/argparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 2082, 16, 1981, 16, 924, 16, 1456, 67, 1080, 33, 7036, 4672, 2082, 67, 529, 273, 924, 63, 20, 65, 1501, 67, 10219, 273, 924, 63, 21, 26894, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 2082, 16, 1981, 16, 924, 16, 1456, 67, 1080, 33, 7036, 4672, 2082, 67, 529, 273, 924, 63, 20, 65, 1501, 67, 10219, 273, 924, 63, 21, 26894, 2, -100, ...
def retry_https_basic_auth(self, url, realm):
def retry_https_basic_auth(self, url, realm, data=None):
def retry_https_basic_auth(self, url, realm): host, selector = splithost(url) i = string.find(host, '@') + 1 host = host[i:] user, passwd = self.get_user_passwd(host, realm, i) if not (user or passwd): return None host = user + ':' + passwd + '@' + host newurl = '//' + host + selector return self.open_https(newurl)
3c8baedaf8c69bd92f06a7de5f16cde19a9beb55 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c8baedaf8c69bd92f06a7de5f16cde19a9beb55/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 4528, 67, 13240, 67, 1944, 12, 2890, 16, 880, 16, 11319, 16, 501, 33, 7036, 4672, 1479, 16, 3451, 273, 6121, 483, 669, 12, 718, 13, 277, 273, 533, 18, 4720, 12, 2564, 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, 3300, 67, 4528, 67, 13240, 67, 1944, 12, 2890, 16, 880, 16, 11319, 16, 501, 33, 7036, 4672, 1479, 16, 3451, 273, 6121, 483, 669, 12, 718, 13, 277, 273, 533, 18, 4720, 12, 2564, 16, ...
filename = u'.'.join( filenameList[:-1] ) + num + u'.' + filenameList[-1]
filename = (u'.'.join( filenameList[:-1] ) + num + u'.' + filenameList[-1])
def findNewFile(filename, directory): u"""find a filename in the given directory that isn't already taken. adds '.1' before the file extension, or just .1 on the end if no file extension""" if os.path.isfile( os.path.join(directory, filename) ): logStatusMsg(u"filename already taken, looking for another: %s" % filename, 2) filenameList = filename.split(u'.') if len( filenameList ) >1: try: num = u'.' + unicodeC( int( filenameList[-2] ) +1) del filenameList[-2] filename = u'.'.join( filenameList[:-1] ) + num + u'.' + filenameList[-1] except (ValueError, IndexError, UnicodeEncodeError): try: num = u'.' + unicodeC( int( filenameList[-1] ) + 1 ) del filenameList[-1] filename = u'.'.join( filenameList ) + num except (ValueError, IndexError, UnicodeEncodeError) : num = u'.' + unicodeC( 1 ) filename = u'.'.join( filenameList[:-1] ) + num + '.' + filenameList[-1] else: filename += u'.1' return findNewFile( filename, directory ) else: return unicodeC(directory), unicodeC(filename)
633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 1908, 812, 12, 3459, 16, 1867, 4672, 582, 8395, 4720, 279, 1544, 316, 326, 864, 1867, 716, 5177, 1404, 1818, 9830, 18, 4831, 2418, 21, 11, 1865, 326, 585, 2710, 16, 578, 2537, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1908, 812, 12, 3459, 16, 1867, 4672, 582, 8395, 4720, 279, 1544, 316, 326, 864, 1867, 716, 5177, 1404, 1818, 9830, 18, 4831, 2418, 21, 11, 1865, 326, 585, 2710, 16, 578, 2537, 26...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 693) else quickfix.StringField.__init__(self, 693, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 11180, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 11180, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, ...
pnts = [self(int(v[3*i]), int(v[3*i+1]), int(v[3*i+2])) for i in range(len(v)/3)]
coords = [self(int(v[3*i]), int(v[3*i+1]), int(v[3*i+2])) for i in range(len(v)/3)]
def riemann_roch_basis(self, D): r""" Return a basis for the Riemann-Roch space corresponding to `D`. .. warning::
cfd0c5535db92e52e7b8ddd12fd21dd75dd1821e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/cfd0c5535db92e52e7b8ddd12fd21dd75dd1821e/projective_curve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12347, 351, 1072, 67, 303, 343, 67, 23774, 12, 2890, 16, 463, 4672, 436, 8395, 2000, 279, 10853, 364, 326, 21688, 351, 1072, 17, 54, 9842, 3476, 4656, 358, 1375, 40, 8338, 225, 6116, 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, 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, 12347, 351, 1072, 67, 303, 343, 67, 23774, 12, 2890, 16, 463, 4672, 436, 8395, 2000, 279, 10853, 364, 326, 21688, 351, 1072, 17, 54, 9842, 3476, 4656, 358, 1375, 40, 8338, 225, 6116, 3...
seen = [root] queue = [root] heights = [-1]*n heights[self._nodelist.index(root)] = 0 while queue: u = queue.pop(0) for v in self._graph.neighbors(u): if v not in seen: seen.append(v) queue.append(v) heights[self._nodelist.index(v)] = heights[self._nodelist.index(u)] + 1 if self._options['tree_orientation'] == 'down': maxx = max(heights) heights = [maxx-heights[i] for i in xrange(n)] heights_dict = {} for v in self._nodelist: if not heights_dict.has_key(heights[self._nodelist.index(v)]): heights_dict[heights[self._nodelist.index(v)]] = [v] else: heights_dict[heights[self._nodelist.index(v)]].append(v) self._options['heights'] = heights_dict
if not 'tree_orientation' in self._options: orientation = 'down' else: orientation = self._options['tree_orientation'] self._pos = self.layout_tree(root,orientation)
def set_pos(self): """ Sets the position plotting parameters for this GraphPlot. EXAMPLES: This function is called implicitly by the code below: sage: g = Graph({0:[1,2], 2:[3], 4:[0,1]}) sage: g.graphplot(save_pos=True, layout='circular') GraphPlot object for Graph on 5 vertices
1051c4384dc8719dc48da9dcd4afb23a57e9de0f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/1051c4384dc8719dc48da9dcd4afb23a57e9de0f/graph_plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 917, 12, 2890, 4672, 3536, 11511, 326, 1754, 20947, 1472, 364, 333, 5601, 11532, 18, 225, 5675, 8900, 11386, 30, 1220, 445, 353, 2566, 24682, 635, 326, 981, 5712, 30, 272, 410, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 67, 917, 12, 2890, 4672, 3536, 11511, 326, 1754, 20947, 1472, 364, 333, 5601, 11532, 18, 225, 5675, 8900, 11386, 30, 1220, 445, 353, 2566, 24682, 635, 326, 981, 5712, 30, 272, 410, ...
out.collectImportClause(newModule + " as " + asClause)
out.collectImportClause(newModule, asClause)
def renameModule(oldPackage, oldModule, newPackage, newModule): """ Iterate through all files in the current directory (recursively), renaming oldPackage.oldModule to newPackage.newModule. """ if (oldPackage == ""): oldPackageDot = "" else: oldPackageDot = oldPackage + "." oldPath = oldPackageDot + oldModule if (newPackage == ""): newPackageDot = "" else: newPackageDot = newPackage + "." newPath = newPackageDot + newModule whichAction = "%s -> %s" % (oldPath, newPath) # oldPath surrounded by something that can't be in an identifier: oldPathRegex = re.compile(r'(^|[^\w_])' + re.escape(oldPath) + r'($|[^\w_])') oldPathSubstitution = r'\1' + newPath + r'\2' newPathRegex = re.compile(r'(^|[^\w_])' + re.escape(newPath) + r'($|[^\w_])') for (fileName, moduleName) in ModuleIterator(): f = open(fileName) out = _OutputStream(fileName) # Set to True when we encounter "import oldPackage.oldModule" # Triggers substitution of the full path wherever it occurs in # the file. globalSubstitute = False for line in f: m = newPathRegex.search(line) if (m): out.error("%s in original, replacement could be ambiguous" % newPath) m = importStatementRegex.match(line) if (m): gotFrom = "None" groups = m.groups() prefixFromImport = groups[0] fromPath = "" if (groups[2]): fromPath = groups[2] gotFrom = "Other" if (oldPackage != ""): if (fromPath == oldPackage): if (newPackage != ""): prefixFromImport += "from " + newPackage + " " gotFrom = "Package" elif (fromPath == oldPath): prefixFromImport += "from " + newPath + " " gotFrom = "Path" elif (fromPath == oldModule and SubstituteBareModule): prefixFromImport += "from " + newPath + " " gotFrom = "Path" else: if (fromPath == oldModule): prefixFromImport += "from " + newPath + " " gotFrom = "Path" if (gotFrom == "Other"): # The from clause we've seen cannot result in any # substitutions. out.writeLine(line) continue prefixFromImport = prefixFromImport + "import " # At this point, prefixFromImport has accumulated any # leading spaces, an optional from clause, and always # the word import. prefixOriginalFromImport = line[m.start():m.end()] # Same as prefixFromImport, but with the original from # clause intact. out.startImportLine(prefixFromImport, prefixOriginalFromImport) importList = line[m.end():] while (True): m = importClauseRegex.match(importList) if (m): groups = m.groups() importPath = groups[0] asClause = "" if (groups[2]): asClause = groups[2] if (gotFrom == "None"): if (importPath == oldModule and SubstituteBareModule): if (asClause == ""): # import oldModule out.collectImportClause(newPath + " as " + oldModule) else: # import oldModule as asClause out.collectImportClause(newPath + " as " + asClause) elif (importPath == oldPath): if (asClause == ""): # import oldPath out.collectImportClause(newPath) globalSubstitute = True else: # import oldPath as asClause out.collectImportClause(newPath + " as " + asClause) else: if (asClause == ""): # import other out.collectImportClause(importPath, originalFrom = True, isEdit = False) else: # import other as asClause out.collectImportClause(importPath + " as " + asClause, originalFrom = True, isEdit = False) elif (gotFrom == "Package"): if (importPath == oldModule): if (asClause == ""): # from oldPackage import oldModule out.collectImportClause(newModule + " as " + oldModule) else: # from oldPackage import oldMod as asClause out.collectImportClause(newModule + " as " + asClause) else: if (asClause == ""): # from oldPackage import other out.collectImportClause(importPath, originalFrom = True, isEdit = False) else: # from oldPackage import other as asClause out.collectImportClause(importPath + " as " + asClause, originalFrom = True, isEdit = False) elif (gotFrom == "Path"): if (asClause == ""): # from oldPath import symbol out.collectImportClause(importPath) else: # from oldPath import symbol as asClause out.collectImportClause(importPath + " as " + asClause) importList = importList[m.end():] if (len(importList) > 0 and importList[0] == ","): importList = importList[1:] else: break else: break out.endImportLine(importList, line) else: # not an import statement if (oldPackage != ""): m = oldPathRegex.search(line) if (m): (newLine, substitutionCount) = re.subn( oldPathRegex, oldPathSubstitution, line) if (substitutionCount > 0): if (globalSubstitute): out.writeLine(newLine) out.fileChanged() else: out.error("%s referenced before import" % oldPath) out.writeLine(line) else: out.writeLine(line) else: out.writeLine(line) out.close(whichAction)
1c8e84f8aaefc4e19c3bd678d0c40fc6e1ff1095 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/1c8e84f8aaefc4e19c3bd678d0c40fc6e1ff1095/RenameModule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6472, 3120, 12, 1673, 2261, 16, 1592, 3120, 16, 394, 2261, 16, 394, 3120, 4672, 3536, 11436, 3059, 777, 1390, 316, 326, 783, 1867, 261, 266, 6235, 3631, 30883, 1592, 2261, 18, 1673, 3120...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6472, 3120, 12, 1673, 2261, 16, 1592, 3120, 16, 394, 2261, 16, 394, 3120, 4672, 3536, 11436, 3059, 777, 1390, 316, 326, 783, 1867, 261, 266, 6235, 3631, 30883, 1592, 2261, 18, 1673, 3120...
self.initfp(f)
try: self.initfp(f) except: if self._i_opened_the_file: f.close() raise
def __init__(self, f): self._i_opened_the_file = None if isinstance(f, basestring): f = __builtin__.open(f, 'rb') self._i_opened_the_file = f # else, assume it is an open file object already self.initfp(f)
518ed85496f3566260fba038f98a7da6c8575f01 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/518ed85496f3566260fba038f98a7da6c8575f01/wave.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 284, 4672, 365, 6315, 77, 67, 25304, 67, 5787, 67, 768, 273, 599, 309, 1549, 12, 74, 16, 10699, 4672, 284, 273, 1001, 24553, 25648, 3190, 12, 74, 16, 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, 1001, 2738, 972, 12, 2890, 16, 284, 4672, 365, 6315, 77, 67, 25304, 67, 5787, 67, 768, 273, 599, 309, 1549, 12, 74, 16, 10699, 4672, 284, 273, 1001, 24553, 25648, 3190, 12, 74, 16, 2...
return self.get_active_text()
return self.child.get_text()
def get_text(self): if use_combo_box: return self.get_active_text() else: return _entryClass.get_text(self)
438364b32a747fe39be6e8f2ea68669bc697db81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5002/438364b32a747fe39be6e8f2ea68669bc697db81/filefind.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 955, 12, 2890, 4672, 309, 999, 67, 25053, 67, 2147, 30, 327, 365, 18, 3624, 18, 588, 67, 955, 1435, 469, 30, 327, 389, 4099, 797, 18, 588, 67, 955, 12, 2890, 13, 225, 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, 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, 955, 12, 2890, 4672, 309, 999, 67, 25053, 67, 2147, 30, 327, 365, 18, 3624, 18, 588, 67, 955, 1435, 469, 30, 327, 389, 4099, 797, 18, 588, 67, 955, 12, 2890, 13, 225, 2, ...
if config.ROM_SPEED and not data.mime == 'video/dvd':
if config.ROM_SPEED and data and not data.mime == 'video/dvd':
def identify(self, media): """ magic! Try to find out as much as possible about the disc in the rom drive: title, image, play options, ... """ # Check drive status (tray pos, disc ready) try: fd = os.open(media.devicename, os.O_RDONLY | os.O_NONBLOCK) s = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT) except: # maybe we need to close the fd if ioctl fails, maybe # open fails and there is no fd try: os.close(fd) except: pass media.drive_status = None return
41464fe85c8a5c5d02cb41f9391846b048837125 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/41464fe85c8a5c5d02cb41f9391846b048837125/rom_drives.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9786, 12, 2890, 16, 3539, 4672, 3536, 8146, 5, 6161, 358, 1104, 596, 487, 9816, 487, 3323, 2973, 326, 19169, 316, 326, 24137, 14316, 30, 2077, 16, 1316, 16, 6599, 702, 16, 1372, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9786, 12, 2890, 16, 3539, 4672, 3536, 8146, 5, 6161, 358, 1104, 596, 487, 9816, 487, 3323, 2973, 326, 19169, 316, 326, 24137, 14316, 30, 2077, 16, 1316, 16, 6599, 702, 16, 1372, 3536, ...
return -cmp(string1, string2)
if string1 == string2: return 0 elif string1 < string2: return 1 else: return -1
def collate_reverse(string1, string2): return -cmp(string1, string2)
7694b19d34252a3b57234e3e4610825b2a9c7868 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/7694b19d34252a3b57234e3e4610825b2a9c7868/collation_reverse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4508, 340, 67, 9845, 12, 1080, 21, 16, 533, 22, 4672, 309, 533, 21, 422, 533, 22, 30, 327, 374, 1327, 533, 21, 411, 533, 22, 30, 327, 404, 469, 30, 327, 300, 21, 225, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4508, 340, 67, 9845, 12, 1080, 21, 16, 533, 22, 4672, 309, 533, 21, 422, 533, 22, 30, 327, 374, 1327, 533, 21, 411, 533, 22, 30, 327, 404, 469, 30, 327, 300, 21, 225, 2, -100, -1...
raise CredentialsFileNotFoundError, ('Couldn\'t find or '
raise CredentialsFileNotFoundError, ('Couldn\'t find or '
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password elif filename: if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.password = lines[1].strip () f.close () except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str (filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename)) else: raise BadCredentialsError, ('Neither a username nor a valid ' 'credentials file was provided.') self.id = id
635ed1bdd854767b671f02d71a9daf95339913e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12637/635ed1bdd854767b671f02d71a9daf95339913e5/fdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 612, 33, 7036, 16, 1544, 33, 7036, 4672, 309, 2718, 30, 365, 18, 5053, 273, 2718, 365, 18, 3664, 273, 2201, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 612, 33, 7036, 16, 1544, 33, 7036, 4672, 309, 2718, 30, 365, 18, 5053, 273, 2718, 365, 18, 3664, 273, 2201, 13...
self.add_link('first', self.env.href.changeset(1), 'Changeset 1') self.add_link('prev', self.env.href.changeset(self.rev - 1),
self.add_link(req, 'first', self.env.href.changeset(1), 'Changeset 1') self.add_link(req, 'prev', self.env.href.changeset(self.rev - 1),
def render(self, req): self.perm.assert_permission (perm.CHANGESET_VIEW)
a58bf75f08d28944f258f5229101a5bf8f73f15a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/a58bf75f08d28944f258f5229101a5bf8f73f15a/Changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1111, 4672, 365, 18, 12160, 18, 11231, 67, 9827, 261, 12160, 18, 14473, 4043, 67, 12145, 13, 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, 1743, 12, 2890, 16, 1111, 4672, 365, 18, 12160, 18, 11231, 67, 9827, 261, 12160, 18, 14473, 4043, 67, 12145, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return os.stat(instDir)==os.stat(os.getcwdu())
try: return os.stat(instDir)==os.stat(os.getcwdu()) except WindowsError: return False
def isInstalledCopy(): """Checks to see if this running copy of NVDA is installed on the system""" try: k=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NVDA") instDir=_winreg.QueryValueEx(k,"UninstallDirectory")[0] except WindowsError: return False _winreg.CloseKey(k) return os.stat(instDir)==os.stat(os.getcwdu())
8dfa19f90ab8c9b67b9ccc00b6c8ff436a7fb719 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/8dfa19f90ab8c9b67b9ccc00b6c8ff436a7fb719/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8048, 334, 4502, 2951, 13332, 3536, 4081, 358, 2621, 309, 333, 3549, 1610, 434, 423, 58, 9793, 353, 5876, 603, 326, 2619, 8395, 775, 30, 417, 33, 67, 8082, 1574, 18, 3678, 653, 24899, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8048, 334, 4502, 2951, 13332, 3536, 4081, 358, 2621, 309, 333, 3549, 1610, 434, 423, 58, 9793, 353, 5876, 603, 326, 2619, 8395, 775, 30, 417, 33, 67, 8082, 1574, 18, 3678, 653, 24899, ...
i_q_packed = tor_i_q_packed_matches[tor.id]
i_q_packed = tor_id_i_q_packed_matches[tor.id]
def get_q_packed_for_zero_dihedrals(tardy_model): uninitialized = -1e20 result = flex.double(tardy_model.q_packed_size, uninitialized) for tor in comp.tor_list: i_q_packed = tor_i_q_packed_matches.get(tor.id) if (i_q_packed is not None): ai = [atom_indices[atom_id] for atom_id in tor.atom_ids()] d_sites = [tardy_model.sites[i] for i in ai] d = cctbx.geometry_restraints.dihedral( sites=d_sites, angle_ideal=0, weight=1) result[i_q_packed] = -math.radians(d.angle_model) assert result.all_ne(uninitialized) return result
861035685a487b6005302d45332bbaa3ab7f1328 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/861035685a487b6005302d45332bbaa3ab7f1328/tst_tor_vs_tardy_tree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 85, 67, 2920, 329, 67, 1884, 67, 7124, 67, 3211, 18550, 86, 1031, 12, 88, 1060, 93, 67, 2284, 4672, 640, 13227, 273, 300, 21, 73, 3462, 563, 273, 16600, 18, 9056, 12, 88, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 85, 67, 2920, 329, 67, 1884, 67, 7124, 67, 3211, 18550, 86, 1031, 12, 88, 1060, 93, 67, 2284, 4672, 640, 13227, 273, 300, 21, 73, 3462, 563, 273, 16600, 18, 9056, 12, 88, ...
self.OpenFile(filename) self.AddFileToHistory(filename)
newWindow = self.OpenFile(filename) if newWindow != None: self.openWindows.append(newWindow) self.AddFileToHistory(filename)
def doFileHistory(self, event): """Open a file from file history""" fileNumber = event.GetId() - wx.ID_FILE1 filename = self.fileHistory.GetHistoryFile(fileNumber) self.OpenFile(filename) self.AddFileToHistory(filename) # add it back to the history so it will be moved up the list
cc443dd98e01d739acfd83b09946a7583c28ee2f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14712/cc443dd98e01d739acfd83b09946a7583c28ee2f/Psycollider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 812, 5623, 12, 2890, 16, 871, 4672, 3536, 3678, 279, 585, 628, 585, 4927, 8395, 585, 1854, 273, 871, 18, 967, 548, 1435, 300, 7075, 18, 734, 67, 3776, 21, 1544, 273, 365, 18, 76...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 812, 5623, 12, 2890, 16, 871, 4672, 3536, 3678, 279, 585, 628, 585, 4927, 8395, 585, 1854, 273, 871, 18, 967, 548, 1435, 300, 7075, 18, 734, 67, 3776, 21, 1544, 273, 365, 18, 76...
pass
@classmethod def _IsCompatibleValue (cls, instance): return isinstance(instance, cls) or issubclass(cls, type(instance))
def validateBinding (self): return self._validateBinding_vx()
2fa8f653ed2237e4e5bccd1af49a4409692031f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/2fa8f653ed2237e4e5bccd1af49a4409692031f8/basis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 5250, 261, 2890, 4672, 327, 365, 6315, 5662, 5250, 67, 26982, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 5250, 261, 2890, 4672, 327, 365, 6315, 5662, 5250, 67, 26982, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.assertTrue(pared_images_and_captions == [('img1', 'caption1 : caption2', 'label1')], \
self.assertTrue(pared_images_and_captions == [('img1', 'caption1 : caption2', 'label1', 'FIXME1')], \
def test_dup_images(self): images_and_captions = [('img1', 'caption1', 'label1'), ('img1', 'caption2', 'label1')]
21044c7c17955cae25907832f8e9949cb358e62b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/21044c7c17955cae25907832f8e9949cb358e62b/plotextractor_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 26427, 67, 7369, 12, 2890, 4672, 4602, 67, 464, 67, 5353, 573, 273, 306, 2668, 6081, 21, 2187, 296, 15386, 21, 2187, 296, 1925, 21, 19899, 7707, 6081, 21, 2187, 296, 15386, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 26427, 67, 7369, 12, 2890, 4672, 4602, 67, 464, 67, 5353, 573, 273, 306, 2668, 6081, 21, 2187, 296, 15386, 21, 2187, 296, 1925, 21, 19899, 7707, 6081, 21, 2187, 296, 15386, 2...
(4,'ingredients'),
(4,'foods'), (5,'chems'), (6,'stimpacks'),
def dumpData(self,record,out): if not record.flags.isInterior: MelOptStruct.dumpData(self,record,out)
f929c28026e3bd16332e1f69032af91c7c383beb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/f929c28026e3bd16332e1f69032af91c7c383beb/bosh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 751, 12, 2890, 16, 3366, 16, 659, 4672, 309, 486, 1409, 18, 7133, 18, 291, 2465, 9659, 30, 490, 292, 6179, 3823, 18, 8481, 751, 12, 2890, 16, 3366, 16, 659, 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, 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, 4657, 751, 12, 2890, 16, 3366, 16, 659, 4672, 309, 486, 1409, 18, 7133, 18, 291, 2465, 9659, 30, 490, 292, 6179, 3823, 18, 8481, 751, 12, 2890, 16, 3366, 16, 659, 13, 2, -100, -100, ...
shutil.rmtree(tempdir, ignore_errors = True)
print tempdir
def main(): use_pre = len(sys.argv) > 1 and 'pre' in sys.argv url = "svn+ssh://svn.cern.ch/reps/gaudi" proj = "Gaudi" container = "GaudiRelease" packages = gather_new_versions("requirements") packages[container] = extract_version("requirements") tempdir = tempfile.mkdtemp() try: os.chdir(tempdir) # prepare repository structure (and move to its top level) os.chdir(checkout_structure(url, proj)) # note that the project does not have "-pre" pvers = "%s_%s" % (proj.upper(), packages[container]) # prepare project tag ptagdir = "%s/tags/%s/%s" % (proj, proj.upper(), pvers) if not svn_exists(ptagdir): svn("mkdir", ptagdir).wait() svn("cp", "%s/trunk/cmt" % proj, ptagdir + "/cmt").wait() # prepare package tags tag_re = re.compile(r"^v(\d+)r(\d+)(?:p(\d+))$") for p in packages: tag = packages[p] pktagdir = "%s/tags/%s/%s" % (proj, p, tag) # I have to make the tag if it doesn't exist and (if we use -pre tags) # neither the -pre tag exists. no_tag = not svn_exists(pktagdir) make_tag = no_tag or (use_pre and no_tag and not svn_exists(pktagdir + "-pre")) if make_tag: if use_pre: pktagdir += "-pre" svn("cp", "%s/trunk/%s" % (proj, p), pktagdir).wait() # Atlas type of tag tagElements = tag_re.match(tag) if tagElements: tagElements = "-".join([ "%02d" % int(el or "0") for el in tagElements.groups() ]) pktagdir = "%s/tags/%s/%s-%s" % (proj, p, p, tagElements) svn("cp", "%s/trunk/%s" % (proj, p), pktagdir).wait() else: if not no_tag: svn("up", "-N", pktagdir).wait() # needed for the copy in the global tag if not use_pre: # prepare the full global tag too for p in packages: tag = packages[p] pktagdir = "%s/tags/%s/%s" % (proj, p, tag) svn("cp", pktagdir, "%s/%s" % (ptagdir, p)).wait() svn("ci").wait() finally: shutil.rmtree(tempdir, ignore_errors = True) return 0
caa763ff6414da0aea124f54336380f2e9c7a812 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9140/caa763ff6414da0aea124f54336380f2e9c7a812/tag_release.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 999, 67, 1484, 273, 562, 12, 9499, 18, 19485, 13, 405, 404, 471, 296, 1484, 11, 316, 225, 2589, 18, 19485, 880, 273, 315, 31505, 15, 10975, 2207, 31505, 18, 14770, 18, 343...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 999, 67, 1484, 273, 562, 12, 9499, 18, 19485, 13, 405, 404, 471, 296, 1484, 11, 316, 225, 2589, 18, 19485, 880, 273, 315, 31505, 15, 10975, 2207, 31505, 18, 14770, 18, 343...
error = _("Can't create directory '%(folder)s', reported error: %(error)s" % {'folder':sharesdir, 'error':msg}) print error self.logMessage(error)
log.addwarning(_("Can't create directory '%(folder)s', reported error: %(error)s") % {'folder':sharesdir, 'error':msg})
def OnLoadFromDisk(self, widget): configdir, config = os.path.split(self.np.config.filename) sharesdir = os.path.abspath(configdir+os.sep+"usershares"+os.sep) try: if not os.path.exists(sharesdir): os.mkdir(sharesdir) except Exception, msg: error = _("Can't create directory '%(folder)s', reported error: %(error)s" % {'folder':sharesdir, 'error':msg}) print error self.logMessage(error) shares = ChooseFile(self.MainWindow.get_toplevel(), sharesdir) if shares is None: return for share in shares: # iterate over selected files share1 = share break try: import pickle, bz2 sharefile = bz2.BZ2File(share1) list1 = pickle.load(sharefile) sharefile.close() if not isinstance(list1, dict): raise TypeError, "Bad data in file %(sharesdb)s" % {'sharesdb':share1} username = share1.split(os.sep)[-1] self.userbrowse.InitWindow(username, None) if username in self.userbrowse.users: self.userbrowse.users[username].LoadShares(list1) except Exception, msg: error = _("Loading Shares from disk failed: %(error)s" % {'error':msg}) self.logMessage(error) print error
5b9c99ed36f23c0f56579a3f05ed0bcf912fdf19 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/5b9c99ed36f23c0f56579a3f05ed0bcf912fdf19/frame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2563, 1265, 6247, 12, 2890, 16, 3604, 4672, 642, 1214, 16, 642, 273, 1140, 18, 803, 18, 4939, 12, 2890, 18, 6782, 18, 1425, 18, 3459, 13, 24123, 1214, 273, 1140, 18, 803, 18, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2563, 1265, 6247, 12, 2890, 16, 3604, 4672, 642, 1214, 16, 642, 273, 1140, 18, 803, 18, 4939, 12, 2890, 18, 6782, 18, 1425, 18, 3459, 13, 24123, 1214, 273, 1140, 18, 803, 18, 5...
cmd += [ params ]
cmd += [params]
def runSingleUnitTest(options, mode, test, params=None): cmd = [ options.runpython[mode], test ] if options.verbose: cmd.append('-v') if params is not None: cmd += [ params ] if options.params: cmd += [ options.params ] if options.verbose: log(' '.join(cmd)) if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=600) return result
134ce2a6ff32b988db479ade6fcf70a08aac23f5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/134ce2a6ff32b988db479ade6fcf70a08aac23f5/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 5281, 2802, 4709, 12, 2116, 16, 1965, 16, 1842, 16, 859, 33, 7036, 4672, 1797, 273, 306, 702, 18, 2681, 8103, 63, 3188, 6487, 1842, 308, 225, 309, 702, 18, 11369, 30, 1797, 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, 1086, 5281, 2802, 4709, 12, 2116, 16, 1965, 16, 1842, 16, 859, 33, 7036, 4672, 1797, 273, 306, 702, 18, 2681, 8103, 63, 3188, 6487, 1842, 308, 225, 309, 702, 18, 11369, 30, 1797, 18, ...
if key.lower() == 'content-length': self.content_length = int(val) self.length = self.content_length
def lineReceived(self, line): """ Almost exactly the same as twisted.web.http.HTTPClient """ if self.firstLine: self.headers = {} self.firstLine = 0 l = line.split(None, 2) version = l[0] status = l[1] try: message = l[2] except IndexError: message = '' self.handleStatus(version, status, message) return if line: key, val = line.split(':', 1) val = val.lstrip() self.handleHeader(key, val) if key.lower() == 'content-length': self.content_length = int(val) self.length = self.content_length else: # End of the headers has been reached if self.content_length is not None: self._handleEndHeaders() self.setRawMode() else: self._handleEndHeaders() self.firstLine = 1
382ee43230b4edd23aa42a717e9fc5a3d328e8bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7045/382ee43230b4edd23aa42a717e9fc5a3d328e8bc/rtsp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 980, 8872, 12, 2890, 16, 980, 4672, 3536, 2262, 10329, 8950, 326, 1967, 487, 2339, 25444, 18, 4875, 18, 2505, 18, 26211, 3536, 309, 365, 18, 3645, 1670, 30, 365, 18, 2485, 273, 2618, 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, 980, 8872, 12, 2890, 16, 980, 4672, 3536, 2262, 10329, 8950, 326, 1967, 487, 2339, 25444, 18, 4875, 18, 2505, 18, 26211, 3536, 309, 365, 18, 3645, 1670, 30, 365, 18, 2485, 273, 2618, 3...
verts += [v for v in data[u] if v not in verts]
verts=verts.union([v for v in data[u] if v not in verts])
def __init__(self, data=None, pos=None, loops=None, format=None, boundary=[], weighted=None, implementation='networkx', sparse=True, vertex_labels=True, **kwds): """ TESTS:: sage: G = Graph() sage: loads(dumps(G)) == G True sage: a = matrix(2,2,[1,0,0,1]) sage: Graph(a).adjacency_matrix() == a True
6d7af7ab7291776d2986e5dad1d1007f72dce49d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6d7af7ab7291776d2986e5dad1d1007f72dce49d/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 33, 7036, 16, 949, 33, 7036, 16, 14075, 33, 7036, 16, 740, 33, 7036, 16, 7679, 22850, 6487, 13747, 33, 7036, 16, 4471, 2218, 5185, 92, 2187, 9387, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 33, 7036, 16, 949, 33, 7036, 16, 14075, 33, 7036, 16, 740, 33, 7036, 16, 7679, 22850, 6487, 13747, 33, 7036, 16, 4471, 2218, 5185, 92, 2187, 9387, ...
<div class="resultItem">
<div> <nevow:attr name="class"><nevow:slot name="resultClass" /></nevow:attr>
def remote_unsetFlags(self, context): self.onlyDistant = False self.onlyLocal = False return self.remote_browseResults(context, self.query.offset)
0a6c7711a8d197fcbd6ee99a61402b93eafb5f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2259/0a6c7711a8d197fcbd6ee99a61402b93eafb5f68/webapplication.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2632, 67, 18579, 5094, 12, 2890, 16, 819, 4672, 365, 18, 3700, 5133, 970, 273, 1083, 365, 18, 3700, 2042, 273, 1083, 327, 365, 18, 7222, 67, 25731, 3447, 12, 2472, 16, 365, 18, 2271, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2632, 67, 18579, 5094, 12, 2890, 16, 819, 4672, 365, 18, 3700, 5133, 970, 273, 1083, 365, 18, 3700, 2042, 273, 1083, 327, 365, 18, 7222, 67, 25731, 3447, 12, 2472, 16, 365, 18, 2271, ...
if self.settings.has_key("AUTORESUME")
if self.settings.has_key("AUTORESUME"):
def unpack(self): unpack=True
ea2995e3f4296275559230684190cbf0817ebcb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/ea2995e3f4296275559230684190cbf0817ebcb5/generic_stage_target.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 12, 2890, 4672, 6167, 33, 5510, 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, ...
[ 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, 6167, 12, 2890, 4672, 6167, 33, 5510, 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, -10...
if not device.properties.has_key("info.bus"): product.set_label("Unknown") vendor.set_label("Unknown") else: bus.set_label(Const.BUS_NAMES[device.properties["info.bus"]])
product.set_label("Unknown") vendor.set_label("Unknown")
def update_tab_device(self, device): """Updates the 'Device' tab given a Device object""" bus = self.xml.get_widget("ns_device_bus") #state = self.xml.get_widget("ns_device_status") vendor = self.xml.get_widget("ns_device_vendor") product = self.xml.get_widget("ns_device_name") category = self.xml.get_widget("ns_device_category") capabilities = self.xml.get_widget("ns_device_capabilities")
a187c85d06e672432e5363e353f21cdfdbbfa1c0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2597/a187c85d06e672432e5363e353f21cdfdbbfa1c0/DeviceManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 7032, 67, 5964, 12, 2890, 16, 2346, 4672, 3536, 5121, 326, 296, 3654, 11, 3246, 864, 279, 6077, 733, 8395, 5766, 273, 365, 18, 2902, 18, 588, 67, 6587, 2932, 2387, 67, 5964, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 7032, 67, 5964, 12, 2890, 16, 2346, 4672, 3536, 5121, 326, 296, 3654, 11, 3246, 864, 279, 6077, 733, 8395, 5766, 273, 365, 18, 2902, 18, 588, 67, 6587, 2932, 2387, 67, 5964, ...
segment_definer.ifos,segment_definer.name,\ segment_definer.version,segment.start_time,\
segment.start_time,\
def getSciSegs(serverURL="ldbd://metaserver.phy.syr.edu:30015", ifo=None, gpsStart=None, gpsStop=None, cut=bool(False)): """ This method is designed to query the server specified by SERVERURL. The method will return the segments that are between and overlaping with the variable gpsStart and gpsStop. If the flag cut is specified to be True then the returned lists will be cut so that the times are between gpsStart and gpsStop inclusive. In addition to these required arguments you must also specify in a text string the IFO of interest. Valid entries are L1 H1 V1 , but only one IFO at a time can be specified. """ if sum([x==None for x in (ifo,gpsStart,gpsStop)])>0: os.stderr.write("Invalid arguments given to getSciSegs.\n") return None ifo=ifo.strip() queryString="SELECT \ segment_definer.ifos,segment_definer.name,\
f96b2207d24da8314cd28e532c364d18d4d0ba98 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/f96b2207d24da8314cd28e532c364d18d4d0ba98/fu_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 8450, 1761, 564, 12, 3567, 1785, 1546, 1236, 16410, 2207, 10578, 345, 12330, 18, 844, 93, 18, 9009, 86, 18, 28049, 30, 19249, 3600, 3113, 21479, 33, 7036, 16, 20985, 1685, 33, 7036...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1322, 8450, 1761, 564, 12, 3567, 1785, 1546, 1236, 16410, 2207, 10578, 345, 12330, 18, 844, 93, 18, 9009, 86, 18, 28049, 30, 19249, 3600, 3113, 21479, 33, 7036, 16, 20985, 1685, 33, 7036...
raise Unauthorised, self._(
raise exceptions.Unauthorised, self._(
def handle(self): """Attempt to create a new user based on the contents of the form and then set the cookie.
7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 4672, 3536, 7744, 358, 752, 279, 394, 729, 2511, 603, 326, 2939, 434, 326, 646, 471, 1508, 444, 326, 3878, 18, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 4672, 3536, 7744, 358, 752, 279, 394, 729, 2511, 603, 326, 2939, 434, 326, 646, 471, 1508, 444, 326, 3878, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
processedMessage = processedMessage.replace("&c", str(self.event.object))
processedMessage = processedMessage.replace("&c", repr(self.event.object))
def __call__(self): logger = logging.getLogger(self.element.targetLogger) processedMessage = self.element.message.replace("&e", str(self.event)) if IObjectEvent.providedBy(self.event): processedMessage = processedMessage.replace("&c", str(self.event.object)) logger.log(self.element.loggingLevel, processedMessage) return True
f3070a2760f0c2fa06d4731adefba3332130d86d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12184/f3070a2760f0c2fa06d4731adefba3332130d86d/logger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 1194, 273, 2907, 18, 588, 3328, 12, 2890, 18, 2956, 18, 3299, 3328, 13, 5204, 1079, 273, 365, 18, 2956, 18, 2150, 18, 2079, 2932, 10, 73, 3113, 609, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2890, 4672, 1194, 273, 2907, 18, 588, 3328, 12, 2890, 18, 2956, 18, 3299, 3328, 13, 5204, 1079, 273, 365, 18, 2956, 18, 2150, 18, 2079, 2932, 10, 73, 3113, 609, ...
if len(args) < 2:
if not self.args[0]:
def _CreateProject(self): if not self.server: print "Please provide valid server url by fliesrc or by '--server' option" sys.exit() if len(args) < 2: print "Error: Not enough arguments for executing command" sys.exit() if self.user and self.apikey : flies = FliesClient(self.server, self.user, self.apikey) else: print "Please provide username and apikey in .fliesrc" sys.exit() try: result = flies.create_project(self.id, self.name, self.desc) print "Create project success" except InvalidOptionException, e: print "Error: Invalid Option",
ca4a6dfc32c2361a1a060d4347bf18740a0ce1c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12929/ca4a6dfc32c2361a1a060d4347bf18740a0ce1c5/flies.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1684, 4109, 12, 2890, 4672, 309, 486, 365, 18, 3567, 30, 1172, 315, 8496, 5615, 923, 1438, 880, 635, 284, 549, 281, 1310, 578, 635, 3534, 3567, 11, 1456, 6, 2589, 18, 8593, 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, 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, 1684, 4109, 12, 2890, 4672, 309, 486, 365, 18, 3567, 30, 1172, 315, 8496, 5615, 923, 1438, 880, 635, 284, 549, 281, 1310, 578, 635, 3534, 3567, 11, 1456, 6, 2589, 18, 8593, 1435, ...
'h5py.tests': ['data/*.hdf5']}
'h5py.tests': ['data/*.hdf5', 'data/*.h5']}
def run(self):
6b0e24c3769d79a0070a0ca98354780912715dbf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10380/6b0e24c3769d79a0070a0ca98354780912715dbf/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
'${QT_DIR}/${PRJ_USER_FORMAT}.pro' ),
'${QT_DIR}/${PRJ_NAME}.pro' ),
def create_prj (self, prj):
b7ebd402d56f98417cdc77f1e3c4dac8aaa43b68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8002/b7ebd402d56f98417cdc77f1e3c4dac8aaa43b68/ide_project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 683, 78, 261, 2890, 16, 27378, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 683, 78, 261, 2890, 16, 27378, 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, ...
resultAdd(defDepsItem, localDeps)
self.resultAdd(defDepsItem, localDeps)
def getTransitiveDepsR(dependencyItem, variants, totalDeps): # We don't add the in-param to the global result classId = dependencyItem.name methodId= dependencyItem.attribute
9c2841e719dfcd53f86262235e8264eb1e910e8d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/9c2841e719dfcd53f86262235e8264eb1e910e8d/Class.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1429, 3720, 14430, 54, 12, 15896, 1180, 16, 12935, 16, 2078, 14430, 4672, 468, 1660, 2727, 1404, 527, 326, 316, 17, 891, 358, 326, 2552, 563, 31181, 273, 4904, 1180, 18, 529, 707, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 1429, 3720, 14430, 54, 12, 15896, 1180, 16, 12935, 16, 2078, 14430, 4672, 468, 1660, 2727, 1404, 527, 326, 316, 17, 891, 358, 326, 2552, 563, 31181, 273, 4904, 1180, 18, 529, 707, ...
echo('gungame', 0, 2, 'AddonDependencyRemoved', {'name': self.addon, 'dependency': depencency})
echo('gungame', 0, 2, 'AddonDependencyRemoved', {'name': self.addon, 'dependency': dependency})
def __del__(self): for dependency in self.dependencies: # Remove dependency dict_registeredDependencies[dependency].delDependent(self.addon) echo('gungame', 0, 2, 'AddonDependencyRemoved', {'name': self.addon, 'dependency': depencency}) echo('gungame', 0, 0, 'AddonUnregistered', {'name': self.addon}) #es.dbgmsg(0, '[GunGame] Addon Unregistered Successfully: \'%s\'' % self.addon)
90293552d05b809594b12a68c93a2f1fb9cab2b8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4575/90293552d05b809594b12a68c93a2f1fb9cab2b8/gungamelib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 364, 4904, 316, 365, 18, 11037, 30, 468, 3581, 4904, 2065, 67, 14327, 8053, 63, 15896, 8009, 3771, 18571, 12, 2890, 18, 24390, 13, 3376, 2668, 19339, 139...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 364, 4904, 316, 365, 18, 11037, 30, 468, 3581, 4904, 2065, 67, 14327, 8053, 63, 15896, 8009, 3771, 18571, 12, 2890, 18, 24390, 13, 3376, 2668, 19339, 139...