rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
assert len(args) == 1, self.help | if len(args) != 1: raise AliasError(self.help) | def runcommand(self, command, args): """User invoked alias command""" if args is None: args = '' command = command.lower() args = args.split(None, 1) if command == 'add': assert len(args) == 2, self.help for name, obj in self.madcow.modules.by_priority(): if obj.pattern is Module._any: continue if obj.pattern.search(args[0]): raise AliasError('that pattern would override %s' % name) for alias in self.db: if alias.key == args[0]: raise AliasError('that alias already exists') self.db.add(*args) return 'alias added' elif command == 'list': assert len(args) == 0, self.help output = [] for i, alias in enumerate(self.db): output.append('[%d] %s => %s' % (i + 1, alias.key, alias.val)) if output: return '\n'.join(output) return 'no aliases defined' elif command == 'del': assert len(args) == 1, self.help index = args[0] assert index.isdigit(), 'alias must be a #' index = int(index) assert index >= 1 and index <= len(self.db), 'invalid alias key' index -= 1 key = self.db[index].key self.db.delete(index) return 'deleted alias: %s' % key | 5085ab76bb46c8673cf276235de6dfbd25d1d73d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10942/5085ab76bb46c8673cf276235de6dfbd25d1d73d/alias.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
551,
362,
889,
12,
2890,
16,
1296,
16,
833,
4672,
3536,
1299,
8187,
2308,
1296,
8395,
309,
833,
353,
599,
30,
833,
273,
875,
1296,
273,
1296,
18,
8167,
1435,
833,
273,
833,
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,
436,
551,
362,
889,
12,
2890,
16,
1296,
16,
833,
4672,
3536,
1299,
8187,
2308,
1296,
8395,
309,
833,
353,
599,
30,
833,
273,
875,
1296,
273,
1296,
18,
8167,
1435,
833,
273,
833,
18,
... |
x = property(getx, setx, delx) | x = property(getx, setx, delx, doc="I'm the x property.") | def delx(self): del self.__x | 534a1306589a6cf1ce78056183bf790e9b91eea8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/534a1306589a6cf1ce78056183bf790e9b91eea8/test_descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
92,
12,
2890,
4672,
1464,
365,
16186,
92,
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,
1464,
92,
12,
2890,
4672,
1464,
365,
16186,
92,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.manager.classifier_data.message_db.store_msg(msg) | self.manager.classifier_data.message_db.store_msg(msgstore_message) | def OnClick(self, button, cancel): msgstore = self.manager.message_store msgstore_messages = self.explorer.GetSelectedMessages(True) if not msgstore_messages: return # If we are not yet enabled, tell the user. # (This is better than disabling the button as a) the user may not # understand why it is disabled, and b) as we would then need to check # the button state as the manager dialog closes. if not self.manager.config.filter.enabled: self.manager.ReportError( _("You must configure and enable SpamBayes before you " \ "can mark messages as spam")) return SetWaitCursor(1) # Delete this item as spam. spam_folder = None # It is unlikely that the spam folder is not specified, as the UI # will prevent enabling. But it could be invalid. spam_folder_id = self.manager.config.filter.spam_folder_id if spam_folder_id: try: spam_folder = msgstore.GetFolder(spam_folder_id) except msgstore.MsgStoreException: pass if spam_folder is None: self.manager.ReportError(_("You must configure the Spam folder"), _("Invalid Configuration")) return import train new_msg_state = self.manager.config.general.delete_as_spam_message_state for msgstore_message in msgstore_messages: # Record this recovery in our stats. self.manager.stats.RecordTraining(False, self.manager.score(msgstore_message)) msgstore_message.t = True self.manager.classifier_data.message_db.store_msg(msg) self.manager.classifier_data.dirty = True # Record the original folder, in case this message is not where # it was after filtering, or has never been filtered. msgstore_message.RememberMessageCurrentFolder() # Must train before moving, else we lose the message! subject = msgstore_message.GetSubject() print "Moving and spam training message '%s' - " % (subject,), TrainAsSpam(msgstore_message, self.manager, save_db = False) # Do the new message state if necessary. try: if new_msg_state == "Read": msgstore_message.SetReadState(True) elif new_msg_state == "Unread": msgstore_message.SetReadState(False) else: if new_msg_state not in ["", "None", None]: print "*** Bad new_msg_state value: %r" % (new_msg_state,) except pythoncom.com_error: print "*** Failed to set the message state to '%s' for message '%s'" % (new_msg_state, subject) # Now move it. msgstore_message.MoveToReportingError(self.manager, spam_folder) # Note the move will possibly also trigger a re-train # but we are smart enough to know we have already done it. # And if the DB can save itself incrementally, do it now self.manager.classifier_data.SavePostIncrementalTrain() SetWaitCursor(0) | ff1b4f1ecd0db0d99e47c22fa9158f69021ee74d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/ff1b4f1ecd0db0d99e47c22fa9158f69021ee74d/addin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
6563,
12,
2890,
16,
3568,
16,
3755,
4672,
1234,
2233,
273,
365,
18,
4181,
18,
2150,
67,
2233,
1234,
2233,
67,
6833,
273,
365,
18,
338,
11766,
18,
967,
7416,
5058,
12,
5510,
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,
2755,
6563,
12,
2890,
16,
3568,
16,
3755,
4672,
1234,
2233,
273,
365,
18,
4181,
18,
2150,
67,
2233,
1234,
2233,
67,
6833,
273,
365,
18,
338,
11766,
18,
967,
7416,
5058,
12,
5510,
13,
... |
Base.Message("So far you have served our interests well. If you accept this contract you will go now to the Adams sector and destroy a cargo ship enroute to the Defiance system. It is loaded with political prisoners who have been illegally freed. These felons must not make it to Defiance alive or they will spark the revolutionary fervor there. Will you crush them?") | Base.Message("So far you have served our interests well. If you accept this contract you will go now to the Adams sector and destroy a cargo ship enroute to the Defiance system. It is loaded with political prisoners who have been illegally freed. These felons must not make it to Defiance alive or they will spark the revolutionary fervor there. Crush them for me for a trifle 28000 credits. Will you crush them?") | def AssignMission (): fixers.DestroyActiveButtons () fixers.CreateChoiceButtons(Base.GetCurRoom(),[ fixers.Choice("bases/fixers/yes.spr","bases/fixers/iso_antagonist_mission.py","Accept This Agreement"), fixers.Choice("bases/fixers/no.spr","bases/fixers/iso_antagonist_decline.py","Decline This Agreement")]) | fa2ef4a033cdc1bca0c67682d65f762148bab77f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/fa2ef4a033cdc1bca0c67682d65f762148bab77f/iso_antagonist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12093,
49,
19710,
1832,
30,
2917,
414,
18,
10740,
3896,
14388,
1832,
2917,
414,
18,
1684,
10538,
14388,
12,
2171,
18,
967,
2408,
13646,
9334,
63,
2917,
414,
18,
10538,
2932,
18602,
19,
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,
12093,
49,
19710,
1832,
30,
2917,
414,
18,
10740,
3896,
14388,
1832,
2917,
414,
18,
1684,
10538,
14388,
12,
2171,
18,
967,
2408,
13646,
9334,
63,
2917,
414,
18,
10538,
2932,
18602,
19,
9... |
q = session.query(Menu).filter(and_(self.entity.c.fk_default_menu == self.menu.c.id, self.entity.c.uuid == loc_id)).first() | q = session.query(Menu).\ select_from( self.menu.join(self.imaging_server, self.imaging_server.c.fk_default_menu == self.menu.c.id).\ join(self.entity)).\ filter(self.entity.c.uuid == loc_id).\ first() | def getEntityDefaultMenu(self, loc_id, session = None): need_to_close_session = False if session == None: need_to_close_session = True session = create_session() q = session.query(Menu).filter(and_(self.entity.c.fk_default_menu == self.menu.c.id, self.entity.c.uuid == loc_id)).first() # there should always be only one! if need_to_close_session: session.close() return q | 14598f23bae72f745a0a3f06172de697c89672e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/14598f23bae72f745a0a3f06172de697c89672e3/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6352,
1868,
4599,
12,
2890,
16,
1515,
67,
350,
16,
1339,
273,
599,
4672,
1608,
67,
869,
67,
4412,
67,
3184,
273,
1083,
309,
1339,
422,
599,
30,
1608,
67,
869,
67,
4412,
67,
3184,
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,
6352,
1868,
4599,
12,
2890,
16,
1515,
67,
350,
16,
1339,
273,
599,
4672,
1608,
67,
869,
67,
4412,
67,
3184,
273,
1083,
309,
1339,
422,
599,
30,
1608,
67,
869,
67,
4412,
67,
3184,
273... |
find_lib_file = self.compiler.find_library_file | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 1891ff6c3ac896bd9130663fe071326ae30f4fb7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1891ff6c3ac896bd9130663fe071326ae30f4fb7/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | |
class MimeFactory(qt.QMimeSourceFactory): | class MimeFactory(QMimeSourceFactory): | def __init__(self,text,parent=None): class MimeFactory(qt.QMimeSourceFactory): def data(self,name,context=None): # You'll always get a warning like this: # QTextBrowser: no mimesource for http://.... # This could be avoided with QApplication.qInstallMsgHandler, # but I don't that's supported until PyQt 3.15. Also this falls # victim to all the problems swarming around webbrowser.open(). import webbrowser webbrowser.open(name) self.owner.close() qt.QTextBrowser.__init__(self,parent) self.setMinimumSize(400, 300) # make it pale yellow like a post-it note self.setText("<qt bgcolor=\"#FFFF80\">" + text) self.mf = mf = MimeFactory() mf.owner = self self.setMimeSourceFactory(mf) | 2219592fd9a0a6b292355e9b9f09025bc4fdef2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/2219592fd9a0a6b292355e9b9f09025bc4fdef2c/wiki_help.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
955,
16,
2938,
33,
7036,
4672,
667,
22059,
1733,
12,
53,
13320,
1830,
1733,
4672,
1652,
501,
12,
2890,
16,
529,
16,
2472,
33,
7036,
4672,
468,
4554,
5614... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
955,
16,
2938,
33,
7036,
4672,
667,
22059,
1733,
12,
53,
13320,
1830,
1733,
4672,
1652,
501,
12,
2890,
16,
529,
16,
2472,
33,
7036,
4672,
468,
4554,
5614... |
return timestamp | return datetime.fromtimestamp(calendar.timegm(timestamp.timetuple())) | def __parse_timestamp(self, timestamp_str): # The timestamp format is: YYYY-MM-DD HH:MM:SS +HHMM timestamp = datetime(*time.strptime(timestamp_str[0:19], '%Y-%m-%d %H:%M:%S')[0:6]) | 93014d9144d249956356c8503d567a6b3a46409b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1600/93014d9144d249956356c8503d567a6b3a46409b/bzr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2670,
67,
5508,
12,
2890,
16,
2858,
67,
701,
4672,
468,
1021,
2858,
740,
353,
30,
26699,
17,
8206,
17,
5698,
20842,
30,
8206,
30,
1260,
397,
17500,
8206,
2858,
273,
3314,
30857,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2670,
67,
5508,
12,
2890,
16,
2858,
67,
701,
4672,
468,
1021,
2858,
740,
353,
30,
26699,
17,
8206,
17,
5698,
20842,
30,
8206,
30,
1260,
397,
17500,
8206,
2858,
273,
3314,
30857,
... |
return data != 'False' | if data in ('True', 'true'): return True elif data in ('False', 'false'): return False else: raise ValueError, "'%s' is not 'T|true' or 'F|false'" %(data) | def makeValue(self, data): return data != 'False' | 970bea0e50013dfe7063615778c717d33e2c3e29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/970bea0e50013dfe7063615778c717d33e2c3e29/Types.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
620,
12,
2890,
16,
501,
4672,
327,
501,
480,
296,
8381,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
620,
12,
2890,
16,
501,
4672,
327,
501,
480,
296,
8381,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if R == None: R = self.base_ring()['x'] | if R is None: R = self.base_ring()[str(self.variables()[0])] | def univariate_polynomial(self, R=None): """ Returns a univariate polynomial associated to this multivariate polynomial. | 8932961336a2e30c16bc529548ab7b19976a7af4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8932961336a2e30c16bc529548ab7b19976a7af4/multi_polynomial_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
27693,
67,
3915,
13602,
12,
2890,
16,
534,
33,
7036,
4672,
3536,
2860,
279,
640,
27693,
16991,
3627,
358,
333,
1778,
27693,
16991,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
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,
640,
27693,
67,
3915,
13602,
12,
2890,
16,
534,
33,
7036,
4672,
3536,
2860,
279,
640,
27693,
16991,
3627,
358,
333,
1778,
27693,
16991,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
else: model = model() | def get(self, id=None): """return correct record for ``id`` or a new instance. | e3f7db165fbd45c966069fc4ee1b44861e80edf7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13203/e3f7db165fbd45c966069fc4ee1b44861e80edf7/controller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
612,
33,
7036,
4672,
3536,
2463,
3434,
1409,
364,
12176,
350,
10335,
578,
279,
394,
791,
18,
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,
336,
12,
2890,
16,
612,
33,
7036,
4672,
3536,
2463,
3434,
1409,
364,
12176,
350,
10335,
578,
279,
394,
791,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
iq.swapAttribs("to", "from") | print iq.toXml() iq.swapAttributeValues("to", "from") | def onDisco(self, iq): iq.swapAttribs("to", "from") iq["type"] = "result" iq.query.children = [] i = iq.query.addElement("identity") i["category"] = "proxy" i["type"] = "bytestreams" i["name"] = "SOCKS5 Bytestreams Service" iq.query.addElement("feature")["var"] = "http://jabber.org/protocol/bytestreams" self.xmlstream.send(iq) | 26dc22b4b597351de5bae35a9b6ca4059e4c0a95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5317/26dc22b4b597351de5bae35a9b6ca4059e4c0a95/proxy65.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
1669,
2894,
12,
2890,
16,
24288,
4672,
1172,
24288,
18,
869,
4432,
1435,
24288,
18,
22270,
31770,
2932,
869,
3113,
315,
2080,
7923,
24288,
9614,
723,
11929,
273,
315,
2088,
6,
24288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1669,
2894,
12,
2890,
16,
24288,
4672,
1172,
24288,
18,
869,
4432,
1435,
24288,
18,
22270,
31770,
2932,
869,
3113,
315,
2080,
7923,
24288,
9614,
723,
11929,
273,
315,
2088,
6,
24288,
... |
def parse_item(self, key, value): if key == 'passed': self.passed = int(value) | self.run_id = self.__get_last_id('tinu_run_versions') | def parse_item(self, key, value): if key == 'passed': self.passed = int(value) | f809f388ba16b0d594155c0b3703be8316710995 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13126/f809f388ba16b0d594155c0b3703be8316710995/sqlite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
1726,
12,
2890,
16,
498,
16,
460,
4672,
309,
498,
422,
296,
23603,
4278,
365,
18,
23603,
273,
509,
12,
1132,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
67,
1726,
12,
2890,
16,
498,
16,
460,
4672,
309,
498,
422,
296,
23603,
4278,
365,
18,
23603,
273,
509,
12,
1132,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
menu_items += [ menu.MenuItem(_('Play chapter %s') % c, chapter_selection, | menu_items += [ menu.MenuItem(_('Play chapter %s') % c, chapter_selection, | def chapter_selection_menu(arg=None, menuw=None): item = arg menu_items = [] if isinstance(arg.info['chapters'], int): for c in range(1, arg.info['chapters']): menu_items += [ menu.MenuItem(_('Play chapter %s') % c, chapter_selection, (arg, ' -chapter %s' % c)) ] elif arg.info['chapters']: for c in arg.info['chapters']: menu_items += [ menu.MenuItem(c.name, chapter_selection, (arg, ' -ss %s' % c.pos)) ] moviemenu = menu.Menu(_('Chapter Menu'), menu_items, theme=item.skin_fxd) menuw.pushmenu(moviemenu) | e584ba514b0bc4a88e0aa4beef86346e2d1b8e27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/e584ba514b0bc4a88e0aa4beef86346e2d1b8e27/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23580,
67,
10705,
67,
5414,
12,
3175,
33,
7036,
16,
3824,
91,
33,
7036,
4672,
761,
225,
273,
1501,
3824,
67,
3319,
273,
5378,
309,
1549,
12,
3175,
18,
1376,
3292,
343,
1657,
414,
17337... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23580,
67,
10705,
67,
5414,
12,
3175,
33,
7036,
16,
3824,
91,
33,
7036,
4672,
761,
225,
273,
1501,
3824,
67,
3319,
273,
5378,
309,
1549,
12,
3175,
18,
1376,
3292,
343,
1657,
414,
17337... |
print "No config found for '%s'." % name sys.exit(1) | if name == "default": return [] else: print "No config found for '%s'." % name sys.exit(1) | def get_config_args(name, env_root): local_json = os.path.join(env_root, "local.json") if not (os.path.exists(local_json) and os.path.isfile(local_json)): print "File does not exist: %s" % local_json sys.exit(1) local_json = packaging.load_json_file(local_json) if 'configs' not in local_json: print "'configs' key not found in local.json." sys.exit(1) if name not in local_json.configs: print "No config found for '%s'." % name sys.exit(1) config = local_json.configs[name] if type(config) != list: print "Config for '%s' must be a list of strings." % name sys.exit(1) return config | f730e8532bd2223a961879ae27bde3daa9fd842a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14687/f730e8532bd2223a961879ae27bde3daa9fd842a/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1425,
67,
1968,
12,
529,
16,
1550,
67,
3085,
4672,
1191,
67,
1977,
273,
1140,
18,
803,
18,
5701,
12,
3074,
67,
3085,
16,
315,
3729,
18,
1977,
7923,
309,
486,
261,
538,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1425,
67,
1968,
12,
529,
16,
1550,
67,
3085,
4672,
1191,
67,
1977,
273,
1140,
18,
803,
18,
5701,
12,
3074,
67,
3085,
16,
315,
3729,
18,
1977,
7923,
309,
486,
261,
538,
18,
... |
elif objPath.startswith(itemPath): | elif objPath.startswith(itemPath) and len(objPhysicalPath) > len(itemPhysicalPath): | def insertElement(itemPaths, item, forceInsert=False): """Insert the given 'item' brain into the tree, which is kept in 'itemPaths'. If 'forceInsert' is True, ignore node- and subtree- filters, otherwise any node- or subtree-filter set will be allowed to block the insertion of a node. """ itemPath = item.getPath() itemInserted = (itemPaths.get(itemPath, {}).get('item', None) is not None) | a0f38ee38b898040baba470a3af8764cac0b8e99 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12185/a0f38ee38b898040baba470a3af8764cac0b8e99/navtree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
1046,
12,
1726,
4466,
16,
761,
16,
2944,
4600,
33,
8381,
4672,
3536,
4600,
326,
864,
296,
1726,
11,
20970,
1368,
326,
2151,
16,
1492,
353,
16555,
316,
296,
1726,
4466,
10332,
971,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
1046,
12,
1726,
4466,
16,
761,
16,
2944,
4600,
33,
8381,
4672,
3536,
4600,
326,
864,
296,
1726,
11,
20970,
1368,
326,
2151,
16,
1492,
353,
16555,
316,
296,
1726,
4466,
10332,
971,
... |
help='balancer to use for indexing') self.add_option('--unique-items', help='balancer to use for indexing') | help='metakeyer to use for indexing') self.add_option('-u', '--unique-items', action='store_true', help='ensure unique items in discodbs') | def __init__(self, **kwargs): OptionParser.__init__(self, **kwargs) self.add_option('-H', '--host', help='host that the client should connect to') self.add_option('-P', '--port', help='port that the client should connect to') self.add_option('-n', '--nr-ichunks', help='the number of ichunks to create') self.add_option('-p', '--profile', action='store_true', help='turn on job profiling') self.add_option('--parser', help='parser object to use for indexing') self.add_option('--demuxer', help='demuxer object to user for indexing') self.add_option('--balancer', help='balancer to use for indexing') self.add_option('--metakeyer', help='balancer to use for indexing') self.add_option('--unique-items', help='balancer to use for indexing') self.add_option('--param', action='append', default=[], dest='params', nargs=2, help='add a param to the inquiry job params') self.add_option('-S', '--stream', action='append', default=[], dest='streams', help='add a stream for filtering inquiries') self.add_option('-R', '--reduce', help='reduce used for filtering inquiries') | 7f33fb6ebaaa5bb53dfc1eba7dba6c7b00e83f0d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/373/7f33fb6ebaaa5bb53dfc1eba7dba6c7b00e83f0d/discodexcli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
4333,
4672,
18862,
16186,
2738,
972,
12,
2890,
16,
2826,
4333,
13,
365,
18,
1289,
67,
3482,
2668,
17,
44,
2187,
3534,
2564,
2187,
2809,
2218,
2564,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
4333,
4672,
18862,
16186,
2738,
972,
12,
2890,
16,
2826,
4333,
13,
365,
18,
1289,
67,
3482,
2668,
17,
44,
2187,
3534,
2564,
2187,
2809,
2218,
2564,
... |
"""Control - An entry field with value change arrows. | """Control - An entry field with value change arrows. The user can adjust the value by pressing the two arrow buttons or by entering the value directly into the entry. The new value will be checked against the user-defined upper and lower limits. | def pick(self, index): self.tk.call(self._w, 'pick', index) | f5d050d1e124f0e400f34e9a2a31237ae6ccf7e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f5d050d1e124f0e400f34e9a2a31237ae6ccf7e1/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6002,
12,
2890,
16,
770,
4672,
365,
18,
16099,
18,
1991,
12,
2890,
6315,
91,
16,
296,
11503,
2187,
770,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6002,
12,
2890,
16,
770,
4672,
365,
18,
16099,
18,
1991,
12,
2890,
6315,
91,
16,
296,
11503,
2187,
770,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or Target.find("ALPHA") != -1: Assemble = Assemble + " --64" else: Assemble = Assemble + " --32" | if Target != "PPC32_OPENBSD": if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or Target.find("ALPHA") != -1: Assemble = Assemble + " --64" else: Assemble = Assemble + " --32" | def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Target Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. SunCompile = "/usr/ccs/bin/cc -g -mt -xcode=pic32 -xldscope=symbolic " GnuCompile = { # gcc -fPIC generates incorrect code on Interix "I386_INTERIX" : "gcc -g " }.get(Target) or "gcc -g -fPIC " if Target.endswith("_SOLARIS") or Target == "SOLsun": Compile = SunCompile else: Compile = GnuCompile Compile = Compile + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "AMD64_DARWIN" : " -arch x86_64 ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLgnu" : " -m32 ", "SOLsun" : " -xarch=v8plus ", "SPARC32_LINUX" : " -m32 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", "SPARC64_SOLARIS" : " -xarch=v9 ", }.get(Target) or " ") SunLink = " -lrt -lm -lnsl -lsocket -lpthread " Link = Compile + ({ "ARM_DARWIN" : " ", "AMD64_DARWIN" : " ", "I386_DARWIN" : " ", "I386_INTERIX" : " -lm ", "PPC_DARWIN" : " ", "PPC64_DARWIN" : " ", "SOLgnu" : SunLink, "SOLsun" : SunLink, "SPARC64_SOLARIS" : SunLink, "PA32_HPUX" : " -lrt -lm ", }.get(Target) or " -lm -lpthread ") # not in Link Compile += " -c " if Target.endswith("_SOLARIS") or Target.startswith("SOL"): Assemble = "/usr/ccs/bin/as " else: Assemble = "as " if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or Target.find("ALPHA") != -1: Assemble = Assemble + " --64" else: Assemble = Assemble + " --32" Assemble = (Assemble + ({ "AMD64_DARWIN" : " -arch x86_64 ", "ARM_DARWIN" : " -arch armv6 ", "SOLgnu" : " -s -K PIC -xarch=v8plus ", "SOLsun" : " -s -K PIC -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -K PIC -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", }.get(Target) or "" Compile = GnuPlatformPrefix + Compile Link = GnuPlatformPrefix + Link Assemble = GnuPlatformPrefix + Assemble # # squeeze runs of spaces and spaces at end # Compile = re.sub(" +", " ", Compile) Compile = re.sub(" +$", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) Assemble = re.sub(" +", " ", Assemble) Assemble = re.sub(" +$", "", Assemble) if Target.find("INTERIX") != -1: a = " -I /dev/fs/C/dev2/cm3.2/m3-win/w32api/include" Compile = Compile + a + a + "/ddk" BootDir = "./cm3-boot-" + Target + "-" + Version P = [ "m3cc", "ntdll", "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] if Target == "NT386": P += ["mklib"] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) try: shutil.rmtree(BootDir) except: pass try: os.mkdir(BootDir) except: pass # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Makefile.write(".SUFFIXES:\nall: cm3\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\nset -e\nset -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n") a.write("Assemble=" + Assemble + "\nCompile=" + Compile + "\nLink=" + Link + "\n") a.write("\n\n# no more editing should be needed (except on Interix, look at the bottom)\n\n") for a in [Make]: a.write("Assemble=\"" + Assemble + "\"\nCompile=\"" + Compile + "\"\nLink=\"" + Link + "\"\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): if not (a.endswith(".ms") or a.endswith(".is") or a.endswith(".s") or a.endswith(".c") or a.endswith(".h")): continue CopyFile(os.path.join(Root, dir, Config, a), BootDir) if a.endswith(".h"): continue Makefile.write("Objects += " + a + ".o\n" + a + ".o: " + a + "\n\t") if a.endswith(".c"): Command = "Compile" else: Command = "Assemble" for b in [Make, Makefile]: b.write("${" + Command + "} " + a + " -o " + a + ".o\n") Makefile.write("cm3: $(Objects)\n\t") for a in [Make, Makefile]: if Target.find("INTERIX") == -1: a.write("$(Link) -o cm3 *.o\n") else: a.write("rm -f ntdll.def ntdll.lib ntdll.dll ntdll.o ntdll.c.o a.out a.exe cm3 cm3.exe libntdll.a\n") a.write("gcc -c ntdll.c\n") a.write("/opt/gcc.3.3/i586-pc-interix3/bin/dlltool --dllname ntdll.dll --kill-at --output-lib libntdll.a --export-all-symbols ntdll.o\n") a.write("rm -f ntdll.o ntdll.c.o _m3main.c.o _m3main.o\n") a.write("gcc -g -o cm3 _m3main.c *.o -lm -L . -lntdll\n") Common = "Common" for a in [ # # Add to this list as needed. # Adding more than necessary is ok -- assume the target system has no changes, # so we can replace whatever is there. # "m3-libs/libm3/src/os/POSIX/OSConfigPosix.m3", "m3-libs/libm3/src/random/m3makefile", "m3-libs/m3core/src/m3makefile", "m3-libs/m3core/src/Uwaitpid.quake", "m3-libs/m3core/src/thread.quake", "m3-libs/m3core/src/C/m3makefile", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/" + Common + "/m3makefile", "m3-libs/m3core/src/Csupport/m3makefile", "m3-libs/m3core/src/float/m3makefile", "m3-libs/m3core/src/runtime/m3makefile", "m3-libs/m3core/src/runtime/common/m3makefile", "m3-libs/m3core/src/runtime/common/Compiler.tmpl", "m3-libs/m3core/src/runtime/common/m3text.h", "m3-libs/m3core/src/runtime/common/RTError.h", "m3-libs/m3core/src/runtime/common/RTMachine.i3", "m3-libs/m3core/src/runtime/common/RTProcess.h", "m3-libs/m3core/src/runtime/common/RTSignalC.c", "m3-libs/m3core/src/runtime/common/RTSignalC.h", "m3-libs/m3core/src/runtime/common/RTSignalC.i3", "m3-libs/m3core/src/runtime/common/RTSignal.i3", "m3-libs/m3core/src/runtime/common/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/m3makefile", "m3-libs/m3core/src/runtime/" + Target + "/RTMachine.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTThread.m3", "m3-libs/m3core/src/text/TextLiteral.i3", "m3-libs/m3core/src/thread/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.i3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c", "m3-libs/m3core/src/time/POSIX/m3makefile", "m3-libs/m3core/src/unix/m3makefile", "m3-libs/m3core/src/unix/linux-32/m3makefile", "m3-libs/m3core/src/unix/linux-64/m3makefile", "m3-libs/m3core/src/unix/freebsd-common/m3makefile", "m3-libs/m3core/src/unix/freebsd-common/Uerror.i3", "m3-libs/m3core/src/unix/freebsd-common/Usysdep.i3", "m3-libs/m3core/src/unix/freebsd-common/Uucontext.i3", "m3-libs/m3core/src/unix/Common/m3makefile", "m3-libs/m3core/src/unix/Common/m3unix.h", "m3-libs/m3core/src/unix/Common/Udir.i3", "m3-libs/m3core/src/unix/Common/UdirC.c", "m3-libs/m3core/src/unix/Common/Usignal.i3", "m3-libs/m3core/src/unix/Common/Ustat.i3", "m3-libs/m3core/src/unix/Common/UstatC.c", "m3-libs/m3core/src/unix/Common/UtimeC.c", "m3-libs/m3core/src/unix/Common/Uucontext.i3", "m3-sys/cminstall/src/config-no-install/SOLgnu", "m3-sys/cminstall/src/config-no-install/SOLsun", "m3-sys/cminstall/src/config-no-install/Solaris.common", "m3-sys/cminstall/src/config-no-install/Unix.common", "m3-sys/cminstall/src/config-no-install/cm3cfg.common", "m3-sys/cminstall/src/config-no-install/" + Target, "m3-sys/m3cc/src/m3makefile", "m3-sys/m3cc/src/gcc/m3cg/parse.c", "m3-sys/m3middle/src/Target.i3", "m3-sys/m3middle/src/Target.m3", "scripts/python/pylib.py", "m3-libs/m3core/src/C/" + Target + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/" + Common + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Common + "/Csignal.i3", "m3-libs/m3core/src/C/" + Common + "/Cstdio.i3", "m3-libs/m3core/src/C/" + Common + "/Cstring.i3", "m3-libs/m3core/src/C/" + Common + "/m3makefile", ]: source = os.path.join(Root, a) if FileExists(source): name = GetLastPathElement(a) reldir = RemoveLastPathElement(a) destdir = os.path.join(BootDir, reldir) dest = os.path.join(destdir, name) try: os.makedirs(destdir) except: pass CopyFile(source, dest) for b in [UpdateSource, Make]: b.write("mkdir -p /dev2/cm3/" + reldir + "\n") b.write("cp " + a + " /dev2/cm3/" + a + "\n") for a in [UpdateSource, Make, Makefile]: a.close() _MakeArchive(BootDir[2:]) | 69402852c2d80626e441da33f6ce8c21ff308806 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9328/69402852c2d80626e441da33f6ce8c21ff308806/pylib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26254,
13332,
225,
2552,
3998,
2042,
3998,
2042,
1011,
315,
300,
7137,
300,
10102,
300,
16125,
23,
6743,
67,
16374,
1546,
397,
5916,
225,
4049,
273,
315,
21,
6,
225,
468,
1220,
1779,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26254,
13332,
225,
2552,
3998,
2042,
3998,
2042,
1011,
315,
300,
7137,
300,
10102,
300,
16125,
23,
6743,
67,
16374,
1546,
397,
5916,
225,
4049,
273,
315,
21,
6,
225,
468,
1220,
1779,
353... |
return | return created_dirs | def mkpath (name, mode=0777, verbose=0, dry_run=0): """Create a directory and any missing ancestor directories. If the directory already exists, return silently. Raise DistutilsFileError if unable to create some directory along the way (eg. some sub-path exists, but is a file rather than a directory). If 'verbose' is true, print a one-line summary of each mkdir to stdout.""" global PATH_CREATED # XXX what's the better way to handle verbosity? print as we create # each directory in the path (the current behaviour), or only announce # the creation of the whole path? (quite easy to do the latter since # we're not using a recursive algorithm) name = os.path.normpath (name) if os.path.isdir (name) or name == '': return if PATH_CREATED.get (name): return (head, tail) = os.path.split (name) tails = [tail] # stack of lone dirs to create while head and tail and not os.path.isdir (head): #print "splitting '%s': " % head, (head, tail) = os.path.split (head) #print "to ('%s','%s')" % (head, tail) tails.insert (0, tail) # push next higher dir onto stack #print "stack of tails:", tails # now 'head' contains the deepest directory that already exists # (that is, the child of 'head' in 'name' is the highest directory # that does *not* exist) for d in tails: #print "head = %s, d = %s: " % (head, d), head = os.path.join (head, d) if PATH_CREATED.get (head): continue if verbose: print "creating", head if not dry_run: try: os.mkdir (head) except os.error, (errno, errstr): raise DistutilsFileError, \ "could not create '%s': %s" % (head, errstr) PATH_CREATED[head] = 1 | da4d1aef4e8f9589956ea7a1e8cf2bbb249cb0eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/da4d1aef4e8f9589956ea7a1e8cf2bbb249cb0eb/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
803,
261,
529,
16,
1965,
33,
20,
14509,
16,
3988,
33,
20,
16,
10299,
67,
2681,
33,
20,
4672,
3536,
1684,
279,
1867,
471,
1281,
3315,
9731,
6402,
18,
225,
971,
326,
1867,
1818,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5028,
803,
261,
529,
16,
1965,
33,
20,
14509,
16,
3988,
33,
20,
16,
10299,
67,
2681,
33,
20,
4672,
3536,
1684,
279,
1867,
471,
1281,
3315,
9731,
6402,
18,
225,
971,
326,
1867,
1818,
... |
self.site().forceLogin(sysop = True) | try: self.site().forceLogin(sysop = True) except NoUsername, error: output(str(error)) return | def delete(self, reason = None, prompt = True, throttle = False): """Deletes the page from the wiki. Requires administrator status. If reason is None, asks for a reason. If prompt is True, asks the user if he wants to delete the page. """ if throttle: put_throttle() if reason == None: reason = input(u'Please enter a reason for the deletion:') reason = reason.encode(self.site().encoding()) answer = 'y' if prompt: answer = inputChoice(u'Do you want to delete %s?' % self.aslink(forceInterwiki = True), ['Yes', 'No'], ['y', 'N'], 'N') if answer in ['y', 'Y']: host = self.site().hostname() address = self.site().delete_address(self.urlname()) | 89a4e404666f58bd33b877d0ffd75af34b90896b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/89a4e404666f58bd33b877d0ffd75af34b90896b/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
16,
3971,
273,
599,
16,
6866,
273,
1053,
16,
18304,
273,
1083,
4672,
3536,
7551,
326,
1363,
628,
326,
9050,
18,
16412,
22330,
1267,
18,
971,
3971,
353,
599,
16,
6827,
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,
1430,
12,
2890,
16,
3971,
273,
599,
16,
6866,
273,
1053,
16,
18304,
273,
1083,
4672,
3536,
7551,
326,
1363,
628,
326,
9050,
18,
16412,
22330,
1267,
18,
971,
3971,
353,
599,
16,
6827,
8... |
for thing in options.abbrevmapping: | for thing in options.abbrevmapping.split(','): | def main(args): import cPickle parser = getparser() options, args = parser.parse_args(args) if options.configfile: for i, line in enumerate(open(options.configfile, 'rU')): line = line.strip() if not line or line.startswith('#'): continue if ':' not in line: error("don't understand line %d of %s", i+1, options.configfile) k, v = line.split(':', 1) k = k.strip() v = os.path.expanduser(v.strip()) if not hasattr(options, k): error("invalid option %r on line %d of %s", k, i+1, options.configfile) pre_v = getattr(options, k) if not pre_v: if isinstance(pre_v, list): setattr(options, k, v.split(',')) else: setattr(options, k, v) else: setattr(options, k, v) # step 1: make/find the system if options.systemclass: systemclass = findClassFromDottedName(options.systemclass, '--system-class') if not issubclass(systemclass, model.System): msg = "%s is not a subclass of model.System" error(msg, systemclass) else: systemclass = model.System if options.inputpickle: system = cPickle.load(open(options.inputpickle, 'rb')) if options.systemclass: if type(system) is not systemclass: msg = ("loaded pickle has class %s.%s, differing " "from explicitly requested %s") error(msg, cls.__module__, cls.__name__, options.systemclass) else: system = systemclass() system.options = options system.urlprefix = '' if options.moresystems: moresystems = [] for fnamepref in options.moresystems: fname, prefix = fnamepref.split(':', 1) moresystems.append(cPickle.load(open(fname, 'rb'))) moresystems[-1].urlprefix = prefix moresystems[-1].options = system.options system.moresystems = moresystems system.sourcebase = options.htmlsourcebase for thing in options.abbrevmapping: k, v = thing.split('=') system.abbrevmapping[k] = v # step 1.25: make a builder if options.builderclass: builderclass = findClassFromDottedName(options.builderclass, '--builder-class') if not issubclass(builderclass, astbuilder.ASTBuilder): msg = "%s is not a subclass of astbuilder.ASTBuilder" error(msg, builderclass) elif hasattr(system, 'defaultBuilder'): builderclass = system.defaultBuilder else: builderclass = astbuilder.ASTBuilder builder = builderclass(system) # step 1.5: check that we're actually going to accomplish something here if not options.outputpickle and not options.makehtml \ and not options.testing: msg = ("this invocation isn't going to do anything\n" "maybe supply --make-html and/or --output-pickle?") error(msg) # step 2: add any packages if options.packages: if options.prependedpackage: for m in options.prependedpackage.split('.'): builder.pushPackage(m, None) for path in options.packages: path = os.path.normpath(path) if path in system.packages: continue if system.state not in ['blank', 'preparse']: msg = 'system is in state %r, which is too late to add new code' error(msg, system.state) print 'adding directory', path builder.preprocessDirectory(path) system.packages.append(path) if options.prependedpackage: for m in options.prependedpackage.split('.'): builder.popPackage() # step 3: move the system to the desired state curstateindex = model.states.index(system.state) finalstateindex = model.states.index(options.targetstate) if finalstateindex < curstateindex and (options.targetstate, system.state) != ('finalized', 'livechecked'): msg = 'cannot reverse system from %r to %r' error(msg, system.state, options.targetstate) if finalstateindex > 0 and curstateindex == 0: msg = 'cannot advance totally blank system to %r' error(msg, options.targetstate) funcs = [None, builder.findImportStars, builder.extractDocstrings, builder.finalStateComputations, lambda : liveobjectchecker.liveCheck(system, builder)] for i in range(curstateindex, finalstateindex): f = funcs[i] if f == builder.findImportStars and not options.findimportstar: continue print f.__name__ f() if system.state != options.targetstate: msg = "failed to advance state to %r (this is a bug)" error(msg, options.targetstate) # step 4: save the system, if desired if options.outputpickle: del system.options # don't persist the options f = open(options.outputpickle, 'wb') cPickle.dump(system, f, cPickle.HIGHEST_PROTOCOL) f.close() system.options = options # step 5: make html, if desired if options.makehtml: if options.htmlwriter: writerclass = findClassFromDottedName(options.htmlwriter, '--html-writer') else: writerclass = html.SystemWriter print 'writing html to', options.htmloutput, print 'using %s.%s'%(writerclass.__module__, writerclass.__name__) writer = writerclass(options.htmloutput) writer.system = system writer.prepOutputDirectory() if options.htmlsubjects: subjects = [] for fn in options.htmlsubjects: subjects.append(system.allobjects[fn]) elif options.htmlsummarypages: writer.writeModuleIndex(system) subjects = [] else: writer.writeModuleIndex(system) subjects = system.rootobjects writer.writeIndividualFiles(subjects, options.htmlfunctionpages) | 64ce92178af5e0ae8923363fc48ecb2e804440c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5471/64ce92178af5e0ae8923363fc48ecb2e804440c5/driver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
4672,
1930,
276,
17968,
298,
2082,
273,
336,
4288,
1435,
702,
16,
833,
273,
2082,
18,
2670,
67,
1968,
12,
1968,
13,
225,
309,
702,
18,
1425,
768,
30,
364,
277,
16,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
4672,
1930,
276,
17968,
298,
2082,
273,
336,
4288,
1435,
702,
16,
833,
273,
2082,
18,
2670,
67,
1968,
12,
1968,
13,
225,
309,
702,
18,
1425,
768,
30,
364,
277,
16,
98... |
if option == TTYPE and self.send_cb: self.send_cb('%c%c%c%c%c%c' % (IAC, SB, TTYPE, SEND, IAC, SE)) | def _three_byte_cmd(self, option): """ Handle incoming Telnet commmands that are three bytes long. """ | 4ca8750d8f66d896c514ee1803d839c78bf20248 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8026/4ca8750d8f66d896c514ee1803d839c78bf20248/telnetnegotiation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
451,
992,
67,
7229,
67,
4172,
12,
2890,
16,
1456,
4672,
3536,
5004,
6935,
399,
292,
2758,
1543,
889,
87,
716,
854,
8925,
1731,
1525,
18,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
451,
992,
67,
7229,
67,
4172,
12,
2890,
16,
1456,
4672,
3536,
5004,
6935,
399,
292,
2758,
1543,
889,
87,
716,
854,
8925,
1731,
1525,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-10... | |
return 'k(%r)' % str(self) | return 'k(%r)' % self._k(0, "-3!", self).inspect('s') | def __repr__(self): return 'k(%r)' % str(self) | 0580ffe7bd0931b67ce9be226e9c22961e94e8f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/65/0580ffe7bd0931b67ce9be226e9c22961e94e8f5/q.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
296,
79,
9275,
86,
2506,
738,
609,
12,
2890,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
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,
12715,
972,
12,
2890,
4672,
327,
296,
79,
9275,
86,
2506,
738,
609,
12,
2890,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
trip = schedule.GetTrip(params.get('trip')) | try: trip = schedule.GetTrip(params.get('trip')) except KeyError: return | def handle_json_GET_tripstoptimes(self, params): schedule = self.server.schedule trip = schedule.GetTrip(params.get('trip')) time_stops = trip.GetTimeStops() stops = [] times = [] for arr,dep,stop in time_stops: stops.append(StopToTuple(stop)) times.append(arr) return [stops, times] | 91aeb42c0766bb5bba1c9f7068faf651bc885631 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6302/91aeb42c0766bb5bba1c9f7068faf651bc885631/schedule_viewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
1977,
67,
3264,
67,
25125,
334,
3838,
4485,
12,
2890,
16,
859,
4672,
4788,
273,
365,
18,
3567,
18,
10676,
775,
30,
20654,
273,
4788,
18,
967,
16148,
12,
2010,
18,
588,
2668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
1977,
67,
3264,
67,
25125,
334,
3838,
4485,
12,
2890,
16,
859,
4672,
4788,
273,
365,
18,
3567,
18,
10676,
775,
30,
20654,
273,
4788,
18,
967,
16148,
12,
2010,
18,
588,
2668,
... |
(0.001368852970712986, 0.0041009402016725094, 0.012252436441829828, 0.036308782091905023, 0.10501923017634662, 0.28312883556311919, 0.63159685013597011, 0.95000000000000351) | (0.001368852970712986, 0.0041009402016725094, 0.012252436441829..., 0.03630878209190..., 0.10501923017634..., 0.28312883556311..., 0.6315968501359..., 0.95000000000000...) | def gamma(self): """ Return the vector of the kbar transitional probabilities. | 0bb458368c27d178fadd8d8e466e75d2acd1bb7a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0bb458368c27d178fadd8d8e466e75d2acd1bb7a/markov_multifractal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9601,
12,
2890,
4672,
3536,
2000,
326,
3806,
434,
326,
417,
3215,
6007,
287,
17958,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9601,
12,
2890,
4672,
3536,
2000,
326,
3806,
434,
326,
417,
3215,
6007,
287,
17958,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print "global-include", pattern files = select_pattern (all_files, pattern, anchor=0) if not files: template.warn (("no files found matching '%s' " + "anywhere in distribution") % pattern) else: self.files.extend (files) | print "global-include", string.join(pattern_list) for pattern in pattern_list: files = select_pattern (all_files, pattern, anchor=0) if not files: template.warn (("no files found matching '%s' " + "anywhere in distribution") % pattern) else: self.files.extend (files) | def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'.""" | 7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
3202,
261,
2890,
4672,
3536,
1994,
471,
1109,
326,
5643,
1542,
585,
4141,
635,
296,
2890,
18,
3202,
11,
261,
407,
3452,
315,
9560,
30050,
18,
267,
20387,
225,
4389,
777,
585,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
3202,
261,
2890,
4672,
3536,
1994,
471,
1109,
326,
5643,
1542,
585,
4141,
635,
296,
2890,
18,
3202,
11,
261,
407,
3452,
315,
9560,
30050,
18,
267,
20387,
225,
4389,
777,
585,
... |
init.install(home, os.path.join('templates', 'classic')) | init.install(home, template) | def install_demo(home, backend): from roundup import init, instance, password, backends, configuration # set up the config for this tracker config = configuration.CoreConfig() config['TRACKER_HOME'] = home config['MAIL_DOMAIN'] = 'localhost' config['DATABASE'] = 'db' if backend in ('mysql', 'postgresql'): config['RDBMS_HOST'] = 'localhost' config['RDBMS_USER'] = 'rounduptest' config['RDBMS_PASSWORD'] = 'rounduptest' config['RDBMS_NAME'] = 'rounduptest' # see if we have further db nuking to perform module = getattr(backends, backend) if module.db_exists(config): module.db_nuke(config) init.install(home, os.path.join('templates', 'classic')) # don't have email flying around os.remove(os.path.join(home, 'detectors', 'nosyreaction.py')) try: os.remove(os.path.join(home, 'detectors', 'nosyreaction.pyc')) except os.error, error: if error.errno != errno.ENOENT: raise init.write_select_db(home, backend) # figure basic params for server hostname = socket.gethostname() # pick a fairly odd, random port port = 8917 while 1: print 'Trying to set up web server on port %d ...'%port, s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) try: s.connect((hostname, port)) except socket.error, e: if not hasattr(e, 'args') or e.args[0] != errno.ECONNREFUSED: raise print 'should be ok.' break else: s.close() print 'already in use.' port += 100 config['TRACKER_WEB'] = 'http://%s:%s/demo/'%(hostname, port) # write the config config['INSTANT_REGISTRATION'] = 1 config.save() # open the tracker and initialise tracker = instance.open(home) tracker.init(password.Password('admin')) # add the "demo" user db = tracker.open('admin') db.user.create(username='demo', password=password.Password('demo'), realname='Demo User', roles='User') db.commit() db.close() | 4e39cc9c84cb81d6ae66e39468fe97b20a969216 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4e39cc9c84cb81d6ae66e39468fe97b20a969216/demo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
67,
27928,
12,
8712,
16,
4221,
4672,
628,
3643,
416,
1930,
1208,
16,
791,
16,
2201,
16,
18015,
16,
1664,
225,
468,
444,
731,
326,
642,
364,
333,
9745,
642,
273,
1664,
18,
4670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3799,
67,
27928,
12,
8712,
16,
4221,
4672,
628,
3643,
416,
1930,
1208,
16,
791,
16,
2201,
16,
18015,
16,
1664,
225,
468,
444,
731,
326,
642,
364,
333,
9745,
642,
273,
1664,
18,
4670,
... |
rv = rule.match(path) | try: rv = rule.match(path) except RequestSlash: raise RequestRedirect(path_info + '/') | def match(self, path_info): path = '<%s>/%s' % (self.subdomain, path_info.lstrip('/')) for rule in self._rules: rv = rule.match(path) if rv is not None: return rule.endpoint, rv raise NotFound(path_info) | e406705eae08133d404c6b57fef02ec42477a83e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14437/e406705eae08133d404c6b57fef02ec42477a83e/routing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
845,
12,
2890,
16,
589,
67,
1376,
4672,
589,
273,
2368,
9,
87,
34,
5258,
87,
11,
738,
261,
2890,
18,
30449,
16,
589,
67,
1376,
18,
80,
6406,
2668,
2473,
3719,
364,
1720,
316,
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,
845,
12,
2890,
16,
589,
67,
1376,
4672,
589,
273,
2368,
9,
87,
34,
5258,
87,
11,
738,
261,
2890,
18,
30449,
16,
589,
67,
1376,
18,
80,
6406,
2668,
2473,
3719,
364,
1720,
316,
365,
... |
self.registerEvent("CIRC", "<STUB>", "white") | try: self.registerEvent("CIRC", "ID: %s STATUS: %s PATH: %s PURPOSE: %s REASON: %s REMOTE_REASON: %s" % (event.circ_id, event.status, event.path, event.purpose, event.reason, event.remote_reason), "white") except TypeError: self.registerEvent("CIRC", "DEBUG -> ID: %s STATUS: %s PATH: %s PURPOSE: %s REASON: %s REMOTE_REASON: %s" % (type(event.circ_id), type(event.status), type(event.path), type(event.purpose), type(event.reason), type(event.remote_reason)), "white") | def circ_status_event(self, event): self.registerEvent("CIRC", "<STUB>", "white") # TODO: implement - variables: event.circ_id, event.status, event.path, event.purpose, event.reason, event.remote_reason | a7fd565fe45df582e39d52cf4f50b62f476f8b26 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13459/a7fd565fe45df582e39d52cf4f50b62f476f8b26/logPanel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18956,
67,
2327,
67,
2575,
12,
2890,
16,
871,
4672,
225,
775,
30,
365,
18,
4861,
1133,
2932,
7266,
11529,
3113,
315,
734,
30,
738,
87,
7136,
30,
738,
87,
7767,
30,
738,
87,
30817,
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,
18956,
67,
2327,
67,
2575,
12,
2890,
16,
871,
4672,
225,
775,
30,
365,
18,
4861,
1133,
2932,
7266,
11529,
3113,
315,
734,
30,
738,
87,
7136,
30,
738,
87,
7767,
30,
738,
87,
30817,
30... |
get_params['order_by'] = 'published' | get_params['orderby'] = 'published' | def get_entries(include_terms, exclude_terms=None, order_by='relevant', **kwargs): print "include_terms: %s" % include_terms print "exclude_terms: %s" % exclude_terms marked_exclude_terms = ['-' + term for term in exclude_terms] search_term_list = list(include_terms) + marked_exclude_terms search_terms = ' '.join(search_term_list) print "search_terms: %s" % search_terms get_params = { 'vq': search_terms, 'alt': 'rss'} if order_by == 'latest': get_params['order_by'] = 'published' elif order_by == 'relevant': get_params['order_by'] = 'relevance' else: pass #TODO: throw an error here get_url = '%s?%s' % (YOUTUBE_QUERY_BASE, urllib.urlencode(get_params)) parsed_feed = feedparser.parse(get_url) return [parse_youtube_entry(entry) for entry in parsed_feed.entries] | 923c42a2b77d0eb6906b9813f6376399f288da09 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12246/923c42a2b77d0eb6906b9813f6376399f288da09/youtube.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8219,
12,
6702,
67,
10112,
16,
4433,
67,
10112,
33,
7036,
16,
1353,
67,
1637,
2218,
27719,
2187,
2826,
4333,
4672,
225,
1172,
315,
6702,
67,
10112,
30,
738,
87,
6,
738,
2341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8219,
12,
6702,
67,
10112,
16,
4433,
67,
10112,
33,
7036,
16,
1353,
67,
1637,
2218,
27719,
2187,
2826,
4333,
4672,
225,
1172,
315,
6702,
67,
10112,
30,
738,
87,
6,
738,
2341,
... |
MediaItem.__init__(self, parent, type='playlist') | MediaItem.__init__(self, parent) | def __init__(self, name='', playlist=[], parent=None, random=False, autoplay=False, repeat=REPEAT_OFF): """ Init the playlist | f65dac955e60f65c92c722d6bed64841f4ab1cc7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11399/f65dac955e60f65c92c722d6bed64841f4ab1cc7/playlist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
2218,
2187,
16428,
22850,
6487,
982,
33,
7036,
16,
2744,
33,
8381,
16,
3656,
1601,
33,
8381,
16,
7666,
33,
862,
31804,
67,
8797,
4672,
3536,
4378,
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,
1001,
2738,
972,
12,
2890,
16,
508,
2218,
2187,
16428,
22850,
6487,
982,
33,
7036,
16,
2744,
33,
8381,
16,
3656,
1601,
33,
8381,
16,
7666,
33,
862,
31804,
67,
8797,
4672,
3536,
4378,
3... |
print key, testkey, targetAvg, current, c_perc, c_diff, s, stdDev | print key, testkey, targetAvg, current, previous, c_perc, c_diff, s, stdDev | def _generateSummaryDetailLine(self, platforms, testkey, enddate, testDisplayName, currentValue, previousValue): graph = [] if testkey in self.SummaryTargets.keys(): targetAvg = self.SummaryTargets[testkey] else: targetAvg = 0.0 | 6ca03008b42d901c177ff2525dde9878781faeee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/6ca03008b42d901c177ff2525dde9878781faeee/perf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7163,
4733,
6109,
1670,
12,
2890,
16,
17422,
16,
1842,
856,
16,
679,
712,
16,
1842,
20524,
16,
14794,
16,
2416,
620,
4672,
2667,
273,
5378,
225,
309,
1842,
856,
316,
365,
18,
4733... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7163,
4733,
6109,
1670,
12,
2890,
16,
17422,
16,
1842,
856,
16,
679,
712,
16,
1842,
20524,
16,
14794,
16,
2416,
620,
4672,
2667,
273,
5378,
225,
309,
1842,
856,
316,
365,
18,
4733... |
if use_twists : | if use_twists and p > 2: | def an_padic(self, p, prec=0,use_twists=True): r""" Returns the conjectural order of Sha(E), according to the `p`-adic analogue of the Birch and Swinnerton-Dyer conjecture as formulated in [MTT] and [BP]. | 099e096cda7408fcb3b1ffb2bd17aa7e0a8fe864 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/099e096cda7408fcb3b1ffb2bd17aa7e0a8fe864/sha_tate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
392,
67,
6982,
335,
12,
2890,
16,
293,
16,
13382,
33,
20,
16,
1202,
67,
11246,
1486,
33,
5510,
4672,
436,
8395,
2860,
326,
356,
937,
3766,
1353,
434,
2638,
69,
12,
41,
3631,
4888,
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,
392,
67,
6982,
335,
12,
2890,
16,
293,
16,
13382,
33,
20,
16,
1202,
67,
11246,
1486,
33,
5510,
4672,
436,
8395,
2860,
326,
356,
937,
3766,
1353,
434,
2638,
69,
12,
41,
3631,
4888,
35... |
value = optimize(list(value)) | if type(value) is tuple: value = optimize(list(value)) | def _init(self): args = [equalsplit(x) for x in self[1]] unresolved = [] fast = {} | c43bf3406c1d67f77099e8748f28315d05721eac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/c43bf3406c1d67f77099e8748f28315d05721eac/nodes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
12,
2890,
4672,
833,
273,
306,
14963,
1127,
12,
92,
13,
364,
619,
316,
365,
63,
21,
13563,
225,
20573,
273,
5378,
4797,
273,
2618,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
12,
2890,
4672,
833,
273,
306,
14963,
1127,
12,
92,
13,
364,
619,
316,
365,
63,
21,
13563,
225,
20573,
273,
5378,
4797,
273,
2618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
project_name = '%s:%s' % (options[0].dist.project_name, project_name) return project_name, options[0].load() | return ep_name(options[0]), options[0].load() | def find_project_class(project_name, logger): """ Takes a project name (like 'fassembler:opencore') and loads the class that is being referred to, using entry points. """ if ':' in project_name: project_name, ep_name = project_name.split(':', 1) else: ep_name = 'main' try: dist = pkg_resources.get_distribution(project_name) except pkg_resources.DistributionNotFound, e: if ep_name != 'main': ## FIXME: log something? return project_name, None logger.debug('Could not get distribution %s: %s' % (project_name, e)) options = list(pkg_resources.iter_entry_points('fassembler.project', project_name)) if not options: logger.fatal('NO entry points in [fassembler.project] found with name %s' % project_name) return project_name, None if len(options) > 1: logger.fatal('More than one entry point in [fassembler.project] found with name %s: %s' % (project_name, ', '.join(map(repr, options)))) return project_name, None project_name = '%s:%s' % (options[0].dist.project_name, project_name) return project_name, options[0].load() else: ep = dist.get_entry_info('fassembler.project', ep_name) if not ep: logger.fatal('Distribution %s (at %s) does not have an entry point %r' % (dist.project_name, dist.location, ep_name)) return project_name, None logger.debug('Found entry point %s:main = %s' % (dist, ep)) return project_name, ep.load() | c4ff9957bf1cf6e3d56081f531416dc3201195a7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12796/c4ff9957bf1cf6e3d56081f531416dc3201195a7/command.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
4406,
67,
1106,
12,
4406,
67,
529,
16,
1194,
4672,
3536,
23004,
279,
1984,
508,
261,
5625,
296,
74,
345,
5747,
749,
30,
556,
1331,
479,
6134,
471,
6277,
326,
667,
716,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
4406,
67,
1106,
12,
4406,
67,
529,
16,
1194,
4672,
3536,
23004,
279,
1984,
508,
261,
5625,
296,
74,
345,
5747,
749,
30,
556,
1331,
479,
6134,
471,
6277,
326,
667,
716,
353,
... |
return zip( *tzs )[1] def GetLocalTimeZone( ): | return zip(*tzs)[1] def GetLocalTimeZone(): | def GetSortedTimeZoneNames( ): """ Uses GetIndexedTimeZoneNames to return the time zone names sorted longitudinally.""" tzs = list( GetIndexedTimeZoneNames() ) tzs.sort() return zip( *tzs )[1] | c68039a3f4004e3fe46621e4c6512fd2401398fc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/677/c68039a3f4004e3fe46621e4c6512fd2401398fc/win32timezone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
11739,
16760,
1557,
12,
262,
30,
3536,
14854,
968,
15034,
16760,
1557,
358,
327,
326,
813,
4157,
1257,
3115,
1525,
305,
1100,
267,
1230,
12123,
6016,
87,
273,
666,
12,
968,
15034,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
11739,
16760,
1557,
12,
262,
30,
3536,
14854,
968,
15034,
16760,
1557,
358,
327,
326,
813,
4157,
1257,
3115,
1525,
305,
1100,
267,
1230,
12123,
6016,
87,
273,
666,
12,
968,
15034,
1... |
i = self.f.items() | i = iter(self.f.items()) | def test_for_cursor_memleak(self): if not hasattr(self.f, 'iteritems'): return | 2695b748a4e64704a9d0981df907c6966079bae2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/2695b748a4e64704a9d0981df907c6966079bae2/test_bsddb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1884,
67,
9216,
67,
3917,
298,
581,
12,
2890,
4672,
309,
486,
3859,
12,
2890,
18,
74,
16,
296,
2165,
3319,
11,
4672,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1884,
67,
9216,
67,
3917,
298,
581,
12,
2890,
4672,
309,
486,
3859,
12,
2890,
18,
74,
16,
296,
2165,
3319,
11,
4672,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if self.inplace: get_package_dir = self.get_finalized_command('build_py').get_package_dir | def build_py_modules_sources(self): if not self.py_modules: return log.info('building py_modules sources') new_py_modules = [] if self.inplace: get_package_dir = self.get_finalized_command('build_py').get_package_dir for source in self.py_modules: if is_sequence(source) and len(source)==3: package, module_base, source = source if self.inplace: build_dir = get_package_dir(package) else: build_dir = os.path.join(self.build_src, os.path.join(*package.split('.'))) if callable(source): target = os.path.join(build_dir, module_base + '.py') source = source(target) if source is None: continue modules = [(package, module_base, source)] if not self.py_modules_dict.has_key(package): self.py_modules_dict[package] = [] self.py_modules_dict[package] += modules else: new_py_modules.append(source) self.py_modules[:] = new_py_modules return | f0c7ba02e42d71d120cc782395f01acc6ae15db0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/f0c7ba02e42d71d120cc782395f01acc6ae15db0/build_src.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
2074,
67,
6400,
67,
10141,
12,
2890,
4672,
309,
486,
365,
18,
2074,
67,
6400,
30,
327,
613,
18,
1376,
2668,
3510,
310,
2395,
67,
6400,
5550,
6134,
394,
67,
2074,
67,
6400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
67,
2074,
67,
6400,
67,
10141,
12,
2890,
4672,
309,
486,
365,
18,
2074,
67,
6400,
30,
327,
613,
18,
1376,
2668,
3510,
310,
2395,
67,
6400,
5550,
6134,
394,
67,
2074,
67,
6400,
... | |
continuing_accepted = (lower(orig_status) in ['accepted', | continuing_accepted = (orig_status and lower(orig_status) in ['accepted', | def _send_update_notice(self, action, actor, orig_status=None, additions=None, removals=None, file=None, fileid=None, lower=string.lower): """Send email notification about issue event to relevant parties.""" | 7cda39b36f919a54b2370f9ce14f477361626eaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/7cda39b36f919a54b2370f9ce14f477361626eaf/CollectorIssue.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4661,
67,
2725,
67,
20392,
12,
2890,
16,
1301,
16,
8327,
16,
1647,
67,
2327,
33,
7036,
16,
26260,
33,
7036,
16,
2797,
1031,
33,
7036,
16,
585,
33,
7036,
16,
585,
350,
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,
389,
4661,
67,
2725,
67,
20392,
12,
2890,
16,
1301,
16,
8327,
16,
1647,
67,
2327,
33,
7036,
16,
26260,
33,
7036,
16,
2797,
1031,
33,
7036,
16,
585,
33,
7036,
16,
585,
350,
33,
7036,
... |
if (ch_util_lib.GetExt(f) in ext_list): | if (util_lib.GetExt(f) in ext_list): | def GetFilenames(dir_in): # globals used (not necessary here, but self-documenting) global ext_list; # a place to store results path_list = []; # clean dir_in dir_in = ch_util_lib.CleanPath(dir_in); # find the paths for f in glob.glob(dir_in + '*'): if (os.path.isfile(f)): if (ch_util_lib.GetExt(f) in ext_list): path_list.append(f); elif (os.path.isdir(f)): path_list = path_list + GetFilenames(f); # all done return path_list; | 6289af17f46fb2f11aea9d918dd0880dd1e18af8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4025/6289af17f46fb2f11aea9d918dd0880dd1e18af8/ch_clean_asp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
25579,
6809,
12,
1214,
67,
267,
4672,
468,
10941,
1399,
261,
902,
4573,
2674,
16,
1496,
365,
17,
5457,
310,
13,
2552,
1110,
67,
1098,
31,
225,
468,
279,
3166,
358,
1707,
1686,
589... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
25579,
6809,
12,
1214,
67,
267,
4672,
468,
10941,
1399,
261,
902,
4573,
2674,
16,
1496,
365,
17,
5457,
310,
13,
2552,
1110,
67,
1098,
31,
225,
468,
279,
3166,
358,
1707,
1686,
589... |
return self.curr()["source"] | return self._curr["source"] | def currSource (self): return self.curr()["source"] | bd9ed2c17d104bb179792ba3d49e42faf3be4343 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/bd9ed2c17d104bb179792ba3d49e42faf3be4343/treegenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4306,
1830,
261,
2890,
4672,
327,
365,
18,
17016,
1435,
9614,
3168,
11929,
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,
4306,
1830,
261,
2890,
4672,
327,
365,
18,
17016,
1435,
9614,
3168,
11929,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Director.pushSaveSting(plr, "mission_names", name) | Director.pushSaveString(plr, "mission_names", name) | def writemissionname(name,path): if len(path)<=1: name+=" - In System" Director.pushSaveSting(plr, "mission_names", name) | 8796967c2148278d17a07bc38fa32aa9f2a9de2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/8796967c2148278d17a07bc38fa32aa9f2a9de2d/dynamic_mission.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
351,
19710,
529,
12,
529,
16,
803,
4672,
309,
562,
12,
803,
13,
32,
33,
21,
30,
508,
15,
1546,
300,
657,
2332,
6,
29701,
18,
6206,
4755,
780,
12,
412,
86,
16,
315,
3951,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
351,
19710,
529,
12,
529,
16,
803,
4672,
309,
562,
12,
803,
13,
32,
33,
21,
30,
508,
15,
1546,
300,
657,
2332,
6,
29701,
18,
6206,
4755,
780,
12,
412,
86,
16,
315,
3951,
67,
... |
self.reportingInterval = struct.unpack('!H',snac[3])[0] | self.reportingInterval = struct.unpack('!H',snac[3][:2])[0] | def oscar_0B_02(self, snac): """ stats reporting interval """ self.reportingInterval = struct.unpack('!H',snac[3])[0] | 9148dae08940b3a6e3a17de4251756c58130bb72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9148dae08940b3a6e3a17de4251756c58130bb72/oscar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31476,
297,
67,
20,
38,
67,
3103,
12,
2890,
16,
4556,
1077,
4672,
3536,
3177,
16096,
3673,
3536,
365,
18,
20904,
4006,
273,
1958,
18,
17309,
2668,
5,
44,
2187,
8134,
1077,
63,
23,
5717... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31476,
297,
67,
20,
38,
67,
3103,
12,
2890,
16,
4556,
1077,
4672,
3536,
3177,
16096,
3673,
3536,
365,
18,
20904,
4006,
273,
1958,
18,
17309,
2668,
5,
44,
2187,
8134,
1077,
63,
23,
5717... |
class cci_missions_letters_log(osv.osv): _name = 'cci_missions.letters_log' _description = 'cci_missions.letters_log' _columns = { 'ata_carnet_id' : fields.many2one('cci_missions.ata_carnet','Related ATA Carnet',required=True), 'letter_type' : fields.selection([('Rappel avant echeance','Rappel avant echeance'),('Rappel apres echeance','Rappel apres echeance'),('Suite lettre A','Suite lettre A'),('Suite lettre C','Suite lettre C'),('Suite lettre C1','Suite lettre C1'),('Suite lettre I','Suite lettre I'),('Demande de remboursement','Demande de remboursement'),('Rappel a remboursement','Rappel a remboursement'),('Mise en demeure','Mise en demeure')],'Type of Letter',required=True), 'date' : fields.date('Date of Sending',required=True), } _defaults = { 'date': lambda *args: time.strftime('%Y-%m-%d') } cci_missions_letters_log() | def get_legalization_details(self, cr, uid, ids,order_partner_id): result={} asker_name=False sender_name=False | 229341b0629131730f642d5b4a7a305d7a9e0c6b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/229341b0629131730f642d5b4a7a305d7a9e0c6b/cci_mission.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2013,
1588,
67,
6395,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
1019,
67,
31993,
67,
350,
4672,
563,
12938,
6827,
264,
67,
529,
33,
8381,
5793,
67,
529,
33,
8381,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2013,
1588,
67,
6395,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
1019,
67,
31993,
67,
350,
4672,
563,
12938,
6827,
264,
67,
529,
33,
8381,
5793,
67,
529,
33,
8381,
2,
-100,... | |
conditions={'method':'GET'}, **options) | conditions={'method':['GET']}, **options) | def requirements_for(meth): opts = options.copy() if method != 'any': opts['conditions'] = {'method':meth} return opts | da7004651758a3ba73f50c2731e2b08ce10f1730 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12081/da7004651758a3ba73f50c2731e2b08ce10f1730/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8433,
67,
1884,
12,
27305,
4672,
1500,
273,
702,
18,
3530,
1435,
309,
707,
480,
296,
2273,
4278,
1500,
3292,
6381,
3546,
273,
13666,
2039,
4278,
27305,
97,
327,
1500,
225,
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,
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,
8433,
67,
1884,
12,
27305,
4672,
1500,
273,
702,
18,
3530,
1435,
309,
707,
480,
296,
2273,
4278,
1500,
3292,
6381,
3546,
273,
13666,
2039,
4278,
27305,
97,
327,
1500,
225,
2,
-100,
-100,... |
return self._play_default(media) | return self._play_default(media, player_name) | def _play_rtmp(self, media, player_name): """ Download data with rtmpdump and pipe them to a media player. | e36251076c97d823c8f9dc90805ace83770229ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/e36251076c97d823c8f9dc90805ace83770229ce/media_player.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1601,
67,
3797,
1291,
12,
2890,
16,
3539,
16,
7291,
67,
529,
4672,
3536,
13059,
501,
598,
436,
5645,
8481,
471,
6010,
2182,
358,
279,
3539,
7291,
18,
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,
0,
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,
1601,
67,
3797,
1291,
12,
2890,
16,
3539,
16,
7291,
67,
529,
4672,
3536,
13059,
501,
598,
436,
5645,
8481,
471,
6010,
2182,
358,
279,
3539,
7291,
18,
2,
-100,
-100,
-100,
-100,
-1... |
if inspect.isbuiltin(value) or inspect.getmodule(value) is object: | if (all is not None or inspect.isbuiltin(value) or inspect.getmodule(value) is object): | def docmodule(self, object, name=None, mod=None, *ignored): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name try: all = object.__all__ except AttributeError: all = None parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) linkedname = join(links + parts[-1:], '.') head = '<big><big><strong>%s</strong></big></big>' % linkedname try: path = inspect.getabsfile(object) url = path if sys.platform == 'win32': import nturl2path url = nturl2path.pathname2url(path) filelink = '<a href="file:%s">%s</a>' % (url, path) except TypeError: filelink = '(built-in)' info = [] if hasattr(object, '__version__'): version = str(object.__version__) if version[:11] == '$' + 'Revision: ' and version[-1:] == '$': version = strip(version[11:-1]) info.append('version %s' % self.escape(version)) if hasattr(object, '__date__'): info.append(self.escape(str(object.__date__))) if info: head = head + ' (%s)' % join(info, ', ') docloc = self.getdocloc(object) if docloc is not None: docloc = '<br><a href="%(docloc)s">Module Docs</a>' % locals() else: docloc = '' result = self.heading( head, '#ffffff', '#7799ee', '<a href=".">index</a><br>' + filelink + docloc) | 6f496c11c687dc43f325271c4ba53d15728c4a8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/6f496c11c687dc43f325271c4ba53d15728c4a8a/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
380,
24055,
4672,
3536,
25884,
3982,
7323,
364,
279,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
468,
2305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
997,
2978,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
380,
24055,
4672,
3536,
25884,
3982,
7323,
364,
279,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
468,
2305... |
return expr | return expr | def convert(expr, target): """ Converts units between expr and target. If target is None then converts to SI base units. INPUT: - `expr` -- the symbolic expression converting from - `target` -- (default None) the symbolic expression converting to OUTPUT: - `symbolic expression` EXAMPLES:: sage: sage.symbolic.units.convert(units.length.foot, None) 381/1250*meter sage: sage.symbolic.units.convert(units.mass.kilogram, units.mass.pound) 100000000/45359237*pound Raises ValueError if expr and target are not convertible:: sage: sage.symbolic.units.convert(units.mass.kilogram, units.length.foot) Traceback (most recent call last): ... ValueError: Incompatible units sage: sage.symbolic.units.convert(units.length.meter^2, units.length.foot) Traceback (most recent call last): ... ValueError: Incompatible units Recognizes derived unit relationships to base units and other derived units:: sage: sage.symbolic.units.convert(units.length.foot/units.time.second^2, units.acceleration.galileo) 762/25*galileo sage: sage.symbolic.units.convert(units.mass.kilogram*units.length.meter/units.time.second^2, units.force.newton) newton sage: sage.symbolic.units.convert(units.length.foot^3, units.area.acre*units.length.inch) 1/3630*acre*inch sage: sage.symbolic.units.convert(units.charge.coulomb, units.current.ampere*units.time.second) ampere*second sage: sage.symbolic.units.convert(units.pressure.pascal*units.si_prefixes.kilo, units.pressure.pounds_per_square_inch) 1290320000000/8896443230521*pounds_per_square_inch For decimal answers multiply 1.0:: sage: sage.symbolic.units.convert(units.pressure.pascal*units.si_prefixes.kilo, units.pressure.pounds_per_square_inch)*1.0 0.145037737730209*pounds_per_square_inch """ base_target = target z = {} tz = {} for x in expr.variables(): if is_unit(x): if unit_to_type[str(x)] == 'temperature': return convert_temperature(expr, target) else: z[x] = base_units(x) expr = expr.subs(z) if target is None: return expr else: for y in base_target.variables(): if is_unit(y): tz[y] = base_units(y) base_target = base_target.subs(tz) coeff = (expr/base_target).expand() if len(coeff.variables()) != 0: raise ValueError, "Incompatible units" return coeff*target | ed891e5784edd8a5e4d544f1ef837edc82b93924 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ed891e5784edd8a5e4d544f1ef837edc82b93924/units.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
12,
8638,
16,
1018,
4672,
3536,
20377,
4971,
3086,
3065,
471,
1018,
18,
971,
1018,
353,
599,
1508,
7759,
358,
5705,
1026,
4971,
18,
225,
12943,
30,
225,
300,
1375,
8638,
68,
1493,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
12,
8638,
16,
1018,
4672,
3536,
20377,
4971,
3086,
3065,
471,
1018,
18,
971,
1018,
353,
599,
1508,
7759,
358,
5705,
1026,
4971,
18,
225,
12943,
30,
225,
300,
1375,
8638,
68,
1493,
... |
self.deltaTime = deltaTime | self.deltaTime = opts.followup_time_window | def __init__(self, cache, coireVetoMissedCache, opts, deltaTime=20): """ Initialize this class and sets up all the cache files. @param cache: the cache of all files @param coireVetoMissedCache: the cache that contains the COIRE-files of the missed injections @param opts: The 'opts' from the main code @param deltaTime: The time window that is used in the time-series plots (in seconds) """ # must do this within here for unknown reason; error instead from glue.ligolw import table rcParams.update({'text.usetex': False}) | 115859e1e4ac66dbab60f88a183f2a4596551391 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/115859e1e4ac66dbab60f88a183f2a4596551391/followup_missed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1247,
16,
1825,
577,
58,
11453,
11729,
730,
1649,
16,
1500,
16,
3622,
950,
33,
3462,
4672,
3536,
9190,
333,
667,
471,
1678,
731,
777,
326,
1247,
1390,
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,
1001,
2738,
972,
12,
2890,
16,
1247,
16,
1825,
577,
58,
11453,
11729,
730,
1649,
16,
1500,
16,
3622,
950,
33,
3462,
4672,
3536,
9190,
333,
667,
471,
1678,
731,
777,
326,
1247,
1390,
18... |
d.addErrback(self._resultErrback) t = reactor.callLater(1, self._timeout) while not self.done: reactor.iterate() self.failUnless(self.gotResult, "timeout") if t.active(): t.cancel() | return assertions.assertFailure(d, NewError) | def raiseError(): raise TypeError | 72ff8aa414af549b19a186c340e6057c839352c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/72ff8aa414af549b19a186c340e6057c839352c1/test_threads.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1002,
668,
13332,
1002,
3580,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1002,
668,
13332,
1002,
3580,
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,
... |
log("isBin") | def isBinary(self): log("isBin") return 1 | 75179af1b2bebe14abc17da337e7952d0beb7ba4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/75179af1b2bebe14abc17da337e7952d0beb7ba4/Field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
5905,
12,
2890,
4672,
327,
404,
225,
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,
353,
5905,
12,
2890,
4672,
327,
404,
225,
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,... | |
if os.sep == '\\' and self._is_jython(2, 5): return 'cp437' | def _get_console_encoding(self): if os.sep == '\\' and self._is_jython(2, 5): return 'cp437' encoding = sys.__stdout__.encoding or sys.__stdin__.encoding if not encoding and os.sep == '\\': return 'cp437' return encoding | ece64c9a86d28d8a684701f00a1f7ca06a735ae9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6988/ece64c9a86d28d8a684701f00a1f7ca06a735ae9/OperatingSystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
8698,
67,
5999,
12,
2890,
4672,
2688,
273,
2589,
16186,
10283,
25648,
5999,
578,
2589,
16186,
21772,
25648,
5999,
309,
486,
2688,
471,
1140,
18,
10814,
422,
3718,
4278,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
8698,
67,
5999,
12,
2890,
4672,
2688,
273,
2589,
16186,
10283,
25648,
5999,
578,
2589,
16186,
21772,
25648,
5999,
309,
486,
2688,
471,
1140,
18,
10814,
422,
3718,
4278,
327,
... | |
self.etenergies = Numeric.array(self.etenergies,"f") self.etoscs = Numeric.array(self.etoscs,"f") | def parse(self,fupdate=0.05,cupdate=0.002): """Extract information from the logfile.""" inputfile = open(self.filename,"r") if self.progress: inputfile.seek(0,2) #go to end of file nstep=inputfile.tell() inputfile.seek(0) self.progress.initialize(nstep) oldstep=0 optfinished = False # Flag that indicates whether it has reached the end of a geoopt for line in inputfile: if self.progress and random.random()<cupdate: step = inputfile.tell() if step!=oldstep: self.progress.update(step,"Unsupported Information") oldstep = step if line[1:8]=="NAtoms=": | 80989e4bb2d496758fcd45fd0507003c8266a255 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/80989e4bb2d496758fcd45fd0507003c8266a255/gaussianparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
74,
2725,
33,
20,
18,
6260,
16,
71,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
10837,
86,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
12,
2890,
16,
74,
2725,
33,
20,
18,
6260,
16,
71,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
10837,
86,
7... | |
channel.basic_publish(exchange="amq.direct", routing_key="test-queue-1a", content=Content("consume_no_local")) channel.basic_publish(exchange="amq.direct", routing_key="test-queue-1b", content=Content("consume_no_local")) | channel.basic_publish(routing_key="test-queue-1a", content=Content("consume_no_local")) channel.basic_publish(routing_key="test-queue-1b", content=Content("consume_no_local")) | def test_consume_no_local(self): """ Test that the no_local flag is honoured in the consume method """ channel = self.channel #setup, declare two queues: channel.queue_declare(queue="test-queue-1a", exclusive=True) channel.queue_declare(queue="test-queue-1b", exclusive=True) #establish two consumers one of which excludes delivery of locally sent messages channel.basic_consume(consumer_tag="local_included", queue="test-queue-1a") channel.basic_consume(consumer_tag="local_excluded", queue="test-queue-1b", no_local=True) | aee655210c3b5f645315322d6b94cbb2b9291156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/197/aee655210c3b5f645315322d6b94cbb2b9291156/basic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
21224,
67,
2135,
67,
3729,
12,
2890,
4672,
3536,
7766,
716,
326,
1158,
67,
3729,
2982,
353,
24338,
83,
2862,
316,
326,
7865,
707,
3536,
1904,
273,
365,
18,
4327,
468,
8401,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21224,
67,
2135,
67,
3729,
12,
2890,
4672,
3536,
7766,
716,
326,
1158,
67,
3729,
2982,
353,
24338,
83,
2862,
316,
326,
7865,
707,
3536,
1904,
273,
365,
18,
4327,
468,
8401,
1... |
""" Kill all instances of safari. | """Kill all instances of safari. | def killAllInstances(self): """ Kill all instances of safari. | 9218dc2f0d51ce53383e4b7217791f435ce38d06 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1918/9218dc2f0d51ce53383e4b7217791f435ce38d06/browser_launchers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
1595,
5361,
12,
2890,
4672,
3536,
20520,
777,
3884,
434,
11029,
12954,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
1595,
5361,
12,
2890,
4672,
3536,
20520,
777,
3884,
434,
11029,
12954,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
else: print 'Clobbered ' + full_path | else: print 'Clobbered ' + full_path | def total_split(path): components = [] while path: head, tail = os.path.split(path) if not tail: break components.append(tail) path = head return list(reversed(components)) | 650f43b727fd8956874de00f3fde5294046d753c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6097/650f43b727fd8956874de00f3fde5294046d753c/clobber_generated_headers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2078,
67,
4939,
12,
803,
4672,
4085,
273,
5378,
1323,
589,
30,
910,
16,
5798,
273,
1140,
18,
803,
18,
4939,
12,
803,
13,
309,
486,
5798,
30,
898,
4085,
18,
6923,
12,
13101,
13,
589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2078,
67,
4939,
12,
803,
4672,
4085,
273,
5378,
1323,
589,
30,
910,
16,
5798,
273,
1140,
18,
803,
18,
4939,
12,
803,
13,
309,
486,
5798,
30,
898,
4085,
18,
6923,
12,
13101,
13,
589,
... |
chr_value = chr_value.replace("chrm", "chr0") | chr_value = chr_value.replace(chr_prefix+"m", chr_prefix+"0") | def chrpos_to_n(lsplit): # Get chr, pos from line chr_value, start_value = None, None # Init in case of error try: split1 = lsplit[0].split(":") # Get chr:start-stop out of the 1st column. chr_value = split1[0].lower().strip() split2 = split1[1].split("-") start_value = split2[0].lower().strip() start_n = long(start_value) stop_n = start_n if len(split2) > 1: stop_value = split2[1].lower().strip() stop_n = long(stop_value) except: sys.stderr.write("chrom: %s, start: %s. Couldn't parse line: %s \n" % (chr_value, start_value, line)) raise # Covert them to N a = 0 if sequence_build == "UCSC" and chr_value.count("_random"): chr_value = chr_value.replace("_random", "") a = 30 # Offset so that "random" chromosomes go last if sequence_build == "UCSC": chr_value = chr_value.replace("chrm", "chr0") else: chr_value = chr_value.replace("chrm", "chr25") chr_n = a + int(chr_value.replace("chrx", "chr23").replace("chry", "chr24").replace("chr","")) + 1 N = (chr_n * 10L**23) + (start_n * 10L**11) + stop_n # Combine chr, start, stop into a single numeric key for sorting #print("N: " + str(N) + " line: " + line) return N | 7671502e1b4619712bf795cc71dd7fb33c2ab409 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2773/7671502e1b4619712bf795cc71dd7fb33c2ab409/ConvertTableToAnnotatorRod.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4513,
917,
67,
869,
67,
82,
12,
3251,
1127,
4672,
468,
968,
4513,
16,
949,
628,
980,
225,
4513,
67,
1132,
16,
787,
67,
1132,
273,
599,
16,
599,
468,
4378,
316,
648,
434,
555,
775,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4513,
917,
67,
869,
67,
82,
12,
3251,
1127,
4672,
468,
968,
4513,
16,
949,
628,
980,
225,
4513,
67,
1132,
16,
787,
67,
1132,
273,
599,
16,
599,
468,
4378,
316,
648,
434,
555,
775,
... |
resultTypeInfo = itypeinfo.GetRefTypeInfo(subrepr) | try: resultTypeInfo = itypeinfo.GetRefTypeInfo(subrepr) except pythoncom.com_error, details: if details[0] in [winerror.TYPE_E_CANTLOADLIBRARY, winerror.TYPE_E_LIBNOTREGISTERED]: return pythoncom.VT_UNKNOWN, None, None raise | def _ResolveType(typerepr, itypeinfo): # Resolve VT_USERDEFINED (often aliases or typed IDispatches) if type(typerepr)==types.TupleType: indir_vt, subrepr = typerepr if indir_vt == pythoncom.VT_PTR: # If it is a VT_PTR to a VT_USERDEFINED that is an IDispatch/IUnknown, # then it resolves to simply the object. # Otherwise, it becomes a ByRef of the resolved type # We need to drop an indirection level on pointer to user defined interfaces. # eg, (VT_PTR, (VT_USERDEFINED, somehandle)) needs to become VT_DISPATCH # only when "somehandle" is an object. # but (VT_PTR, (VT_USERDEFINED, otherhandle)) doesnt get the indirection dropped. was_user = type(subrepr)==types.TupleType and subrepr[0]==pythoncom.VT_USERDEFINED subrepr, sub_clsid, sub_doc = _ResolveType(subrepr, itypeinfo) if was_user and subrepr in [pythoncom.VT_DISPATCH, pythoncom.VT_UNKNOWN, pythoncom.VT_RECORD]: # Drop the VT_PTR indirection return subrepr, sub_clsid, sub_doc # Change PTR indirection to byref return subrepr | pythoncom.VT_BYREF, sub_clsid, sub_doc if indir_vt == pythoncom.VT_SAFEARRAY: # resolve the array element, and convert to VT_ARRAY subrepr, sub_clsid, sub_doc = _ResolveType(subrepr, itypeinfo) return pythoncom.VT_ARRAY | subrepr, sub_clsid, sub_doc if indir_vt == pythoncom.VT_CARRAY: # runtime has no support for this yet. # resolve the array element, and convert to VT_CARRAY # sheesh - return _something_ return pythoncom.VT_CARRAY, None, None if indir_vt == pythoncom.VT_USERDEFINED: resultTypeInfo = itypeinfo.GetRefTypeInfo(subrepr) resultAttr = resultTypeInfo.GetTypeAttr() typeKind = resultAttr.typekind if typeKind == pythoncom.TKIND_ALIAS: tdesc = resultAttr.tdescAlias return _ResolveType(tdesc, resultTypeInfo) elif typeKind in [pythoncom.TKIND_ENUM, pythoncom.TKIND_MODULE]: # For now, assume Long return pythoncom.VT_I4, None, None elif typeKind == pythoncom.TKIND_DISPATCH: clsid = resultTypeInfo.GetTypeAttr()[0] retdoc = resultTypeInfo.GetDocumentation(-1) return pythoncom.VT_DISPATCH, clsid, retdoc elif typeKind in [pythoncom.TKIND_INTERFACE, pythoncom.TKIND_COCLASS]: # XXX - should probably get default interface for CO_CLASS??? clsid = resultTypeInfo.GetTypeAttr()[0] retdoc = resultTypeInfo.GetDocumentation(-1) return pythoncom.VT_UNKNOWN, clsid, retdoc elif typeKind == pythoncom.TKIND_RECORD: return pythoncom.VT_RECORD, None, None raise NotSupportedException("Can not resolve alias or user-defined type") return typeSubstMap.get(typerepr,typerepr), None, None | 2ebf5f8c4d89f23e2a35f4b99c632014e3c520b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/2ebf5f8c4d89f23e2a35f4b99c632014e3c520b8/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8460,
559,
12,
4098,
457,
73,
683,
16,
518,
388,
1376,
4672,
468,
9910,
22944,
67,
4714,
15544,
261,
792,
2253,
6900,
578,
9092,
1599,
291,
30278,
13,
225,
309,
618,
12,
4098,
457... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8460,
559,
12,
4098,
457,
73,
683,
16,
518,
388,
1376,
4672,
468,
9910,
22944,
67,
4714,
15544,
261,
792,
2253,
6900,
578,
9092,
1599,
291,
30278,
13,
225,
309,
618,
12,
4098,
457... |
newname = mapper(var.name, varset) | newname = mapper(var.name, checkSet) | def updateOccurences(var, newname): # Replace variable definition for node in var.nodes: update(node, newname) | 163910a411caa5c8dfba7ac1131c199ee578735c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/163910a411caa5c8dfba7ac1131c199ee578735c/variableoptimizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
24269,
18842,
764,
12,
1401,
16,
26722,
4672,
468,
6910,
2190,
2379,
364,
756,
316,
569,
18,
4690,
30,
1089,
12,
2159,
16,
26722,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
1089,
24269,
18842,
764,
12,
1401,
16,
26722,
4672,
468,
6910,
2190,
2379,
364,
756,
316,
569,
18,
4690,
30,
1089,
12,
2159,
16,
26722,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
del db for pkg in rpms: | for pkg in db.getPkgs(): | def __init__(self, config, rpms, operation): self.config = config self.list = HashList() # RpmPackage => RpmRelation self.__len__ = self.list.__len__ self.__getitem__ = self.list.__getitem__ self.has_key = self.list.has_key | 71efa249ff5aea27b24aa609a6dea3b07bf3af0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/71efa249ff5aea27b24aa609a6dea3b07bf3af0c/orderer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
642,
16,
8715,
959,
16,
1674,
4672,
365,
18,
1425,
273,
642,
365,
18,
1098,
273,
2474,
682,
1435,
1850,
468,
534,
7755,
2261,
516,
534,
7755,
3963,
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,
1001,
2738,
972,
12,
2890,
16,
642,
16,
8715,
959,
16,
1674,
4672,
365,
18,
1425,
273,
642,
365,
18,
1098,
273,
2474,
682,
1435,
1850,
468,
534,
7755,
2261,
516,
534,
7755,
3963,
365,
... |
if not filter in properties: raise BadRequest("Property not found: '%s'" % filter) | def build_query(self, params, query, user=None): """Build the query based on the parameters specified here, You must pass in the base query object to start with """ query_str = params.get("query", None) sort_by = params.get("sort_by", None) next_token = params.get("next_token", None) if query_str: try: filters = json.loads(query_str) except: raise BadRequest("Bad query string") for filter in filters: param_name = filter[0] prop_value = filter[2] if hasattr(self.db_class, "_indexed_%s" % param_name): param_name = "_indexed_%s" % param_name prop_value = prop_value.upper() query.filter("%s %s" % (param_name, filter[1]), prop_value) else: properties = [p.name for p in query.model_class.properties(hidden=False)] for filter in set(params.keys()): if filter in ["sort_by", "next_token"]: continue if not filter in properties: raise BadRequest("Property not found: '%s'" % filter) filter_value = params[filter] filter_args = filter.split(".") if len(filter_args) > 1: filter_cmp = filter_args[1] else: filter_cmp = "=" filter = filter_args[0] if len(filter_value) == 1: filter_value = filter_value[0] if filter_value: query.filter("%s %s " % (filter, filter_cmp), filter_value) if sort_by: query.order(sort_by) if next_token: query.next_token = urllib.unquote(next_token.strip()).replace(" ", "+") return query | f9c503fd925e93d1b66748cdb27fe281de71f7c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10599/f9c503fd925e93d1b66748cdb27fe281de71f7c3/db.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
2271,
12,
2890,
16,
859,
16,
843,
16,
729,
33,
7036,
4672,
3536,
3116,
326,
843,
2511,
603,
326,
1472,
1269,
2674,
16,
4554,
1297,
1342,
316,
326,
1026,
843,
733,
358,
787,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
67,
2271,
12,
2890,
16,
859,
16,
843,
16,
729,
33,
7036,
4672,
3536,
3116,
326,
843,
2511,
603,
326,
1472,
1269,
2674,
16,
4554,
1297,
1342,
316,
326,
1026,
843,
733,
358,
787,
... | |
notification.data ['Enable'] = len (self.selection) != 0 | notification.data ['Enable'] = False | def onDeleteEventUpdateUI (self, notification): notification.data ['Enable'] = len (self.selection) != 0 | b11b821547e866fdd7b939e56e9e74baac2b634a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b11b821547e866fdd7b939e56e9e74baac2b634a/ControlBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20468,
1133,
1891,
5370,
261,
2890,
16,
3851,
4672,
3851,
18,
892,
10228,
8317,
3546,
273,
562,
261,
2890,
18,
10705,
13,
480,
374,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
20468,
1133,
1891,
5370,
261,
2890,
16,
3851,
4672,
3851,
18,
892,
10228,
8317,
3546,
273,
562,
261,
2890,
18,
10705,
13,
480,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def set_options(userdesc, perms, mlist, vals): """ Set the options of a list. @mlist @edit @admin """ | def set_options(userdesc, perms, mlist, opts, vals): | def set_options(userdesc, perms, mlist, vals): """ Set the options of a list. @mlist @edit @admin """ for (k, v) in vals.iteritems(): if k not in opts: continue if k == 'default_member_moderation': for member in mlist.getMembers(): mlist.setMemberOption(member, mm_cfg.Moderate, int(v)) t = type(mlist.__dict__[k]) if t is bool: mlist.__dict__[k] = bool(v) elif t is int: mlist.__dict__[k] = int(v) elif t is str: mlist.__dict__[k] = Utils.uncanonstr(v, 'fr') else: mlist.__dict__[k] = v return 1 | d36b2def51d97d9b3bc6153908993e519cf129c5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5724/d36b2def51d97d9b3bc6153908993e519cf129c5/lists.rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2116,
12,
1355,
5569,
16,
13793,
16,
312,
1098,
16,
1500,
16,
5773,
4672,
364,
261,
79,
16,
331,
13,
316,
5773,
18,
2165,
3319,
13332,
309,
417,
486,
316,
1500,
30,
1324,
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,
444,
67,
2116,
12,
1355,
5569,
16,
13793,
16,
312,
1098,
16,
1500,
16,
5773,
4672,
364,
261,
79,
16,
331,
13,
316,
5773,
18,
2165,
3319,
13332,
309,
417,
486,
316,
1500,
30,
1324,
30... |
print_directory() print_arguments() | def test(environ=os.environ): """Robust test CGI script, usable as main program. Write minimal HTTP headers and dump all information provided to the script in HTML form. """ import traceback print "Content-type: text/html" print sys.stderr = sys.stdout try: form = FieldStorage() # Replace with other classes to test those print_form(form) print_environ(environ) print_directory() print_arguments() print_environ_usage() def f(): exec "testing print_exception() -- <I>italics?</I>" def g(f=f): f() print "<H3>What follows is a test, not an actual exception:</H3>" g() except: print_exception() print "<H1>Second try with a small maxlen...</H1>" global maxlen maxlen = 50 try: form = FieldStorage() # Replace with other classes to test those print_form(form) print_environ(environ) print_directory() print_arguments() except: print_exception() | 41550751b18a239c982718c5055b4428c016b302 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/41550751b18a239c982718c5055b4428c016b302/cgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
28684,
33,
538,
18,
28684,
4672,
3536,
14444,
641,
1842,
385,
13797,
2728,
16,
15603,
487,
2774,
5402,
18,
225,
2598,
16745,
2239,
1607,
471,
4657,
777,
1779,
2112,
358,
326,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
28684,
33,
538,
18,
28684,
4672,
3536,
14444,
641,
1842,
385,
13797,
2728,
16,
15603,
487,
2774,
5402,
18,
225,
2598,
16745,
2239,
1607,
471,
4657,
777,
1779,
2112,
358,
326,
2... | |
for f in seq(): if f < self.maxchanges / 2: | last = 0 for f in seq(1, self.maxchanges): if f < self.maxchanges or f <= last: | def seq(factor=1): yield 1 * factor yield 3 * factor #yield 5 * factor for f in seq(factor * 10): yield f | 21fc73258755dcfe07d263fd15aa5c51dab2a6ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/21fc73258755dcfe07d263fd15aa5c51dab2a6ad/hgweb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3833,
12,
6812,
33,
21,
4672,
2824,
404,
380,
5578,
2824,
890,
380,
5578,
468,
23604,
1381,
380,
5578,
364,
284,
316,
3833,
12,
6812,
380,
1728,
4672,
2824,
284,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3833,
12,
6812,
33,
21,
4672,
2824,
404,
380,
5578,
2824,
890,
380,
5578,
468,
23604,
1381,
380,
5578,
364,
284,
316,
3833,
12,
6812,
380,
1728,
4672,
2824,
284,
2,
-100,
-100,
-100,
-... |
line = fixwhite_line(line) | line = fixwhite_line(line, tabsize) | def fixwhite(filename, tabsize, fixonly=None): if file_type(filename) not in whitespace_types: return try: f = file(filename, 'r+') except OSError, msg: print 'could not open file %s: %s' % (filename, msg) return lines = list(f) f.seek(0) f.truncate() for i,line in enumerate(lines): if fixonly is None or i in fixonly: line = fixwhite_line(line) print >>f, line, | 0aedd700c5d9f96df2fc20ef1b036c79587e5278 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/0aedd700c5d9f96df2fc20ef1b036c79587e5278/style.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
14739,
12,
3459,
16,
3246,
1467,
16,
2917,
3700,
33,
7036,
4672,
309,
585,
67,
723,
12,
3459,
13,
486,
316,
7983,
67,
2352,
30,
327,
225,
775,
30,
284,
273,
585,
12,
3459,
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,
2917,
14739,
12,
3459,
16,
3246,
1467,
16,
2917,
3700,
33,
7036,
4672,
309,
585,
67,
723,
12,
3459,
13,
486,
316,
7983,
67,
2352,
30,
327,
225,
775,
30,
284,
273,
585,
12,
3459,
16,
... |
if 'proxy' in k.lower(): | if k == 'NO_PROXY': | def setUp(self): # Records changes to env vars self.env = support.EnvironmentVarGuard() # Delete all proxy related env vars for k in os.environ.keys(): if 'proxy' in k.lower(): self.env.unset(k) | e0f214a54912e428f378d1ef38b725a013b16990 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/e0f214a54912e428f378d1ef38b725a013b16990/test_urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
468,
27390,
3478,
358,
1550,
4153,
365,
18,
3074,
273,
2865,
18,
5494,
1537,
16709,
1435,
468,
2504,
777,
2889,
3746,
1550,
4153,
364,
417,
316,
1140,
18,
28684,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
468,
27390,
3478,
358,
1550,
4153,
365,
18,
3074,
273,
2865,
18,
5494,
1537,
16709,
1435,
468,
2504,
777,
2889,
3746,
1550,
4153,
364,
417,
316,
1140,
18,
28684,
1... |
return len(line.raw) != len(line.raw.lstrip()) or len(line.raw) == 0 | return len(line.raw) != len(line.raw.lstrip()) or not line.raw or "(Music" in line.raw | def is_a_non_log_line(line): return len(line.raw) != len(line.raw.lstrip()) or len(line.raw) == 0 | 593d2914061a32a2df36daf4cf6fd11f1e653da5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13780/593d2914061a32a2df36daf4cf6fd11f1e653da5/MCShred.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
69,
67,
5836,
67,
1330,
67,
1369,
12,
1369,
4672,
327,
562,
12,
1369,
18,
1899,
13,
480,
562,
12,
1369,
18,
1899,
18,
80,
6406,
10756,
578,
486,
980,
18,
1899,
578,
7751,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
353,
67,
69,
67,
5836,
67,
1330,
67,
1369,
12,
1369,
4672,
327,
562,
12,
1369,
18,
1899,
13,
480,
562,
12,
1369,
18,
1899,
18,
80,
6406,
10756,
578,
486,
980,
18,
1899,
578,
7751,
... |
this = apply(_quickfix.new_TriggerSecurityID, args) | this = _quickfix.new_TriggerSecurityID(*args) | def __init__(self, *args): this = apply(_quickfix.new_TriggerSecurityID, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
6518,
4368,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
6518,
4368,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
3... |
args = [xen.util.auxbin.pathTo("xen-vncfb")] if config.has_key("vncunused"): args += ["--unused"] elif config.has_key("vncdisplay"): args += ["--vncport", "%d" % (5900 + int(config["vncdisplay"]))] vnclisten = config.get("vnclisten", | vnclisten = config.get('vnclisten', | def createDevice(self, config): DevController.createDevice(self, config) if self.vm.info.is_hvm(): # is HVM, so qemu-dm will handle the vfb. return std_args = [ "--domid", "%d" % self.vm.getDomid(), "--title", self.vm.getName() ] t = config.get("type", None) if t == "vnc": passwd = None if config.has_key("vncpasswd"): passwd = config["vncpasswd"] else: passwd = xen.xend.XendOptions.instance().get_vncpasswd_default() if passwd: self.vm.storeVm("vncpasswd", passwd) log.debug("Stored a VNC password for vfb access") else: log.debug("No VNC passwd configured for vfb access") | 6f237d440f19e72e68d8a5e3d0c0bb10763bc880 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/6f237d440f19e72e68d8a5e3d0c0bb10763bc880/vfbif.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
3654,
12,
2890,
16,
642,
4672,
9562,
2933,
18,
2640,
3654,
12,
2890,
16,
642,
13,
309,
365,
18,
3489,
18,
1376,
18,
291,
67,
76,
3489,
13332,
468,
353,
670,
7397,
16,
1427,
1043... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3654,
12,
2890,
16,
642,
4672,
9562,
2933,
18,
2640,
3654,
12,
2890,
16,
642,
13,
309,
365,
18,
3489,
18,
1376,
18,
291,
67,
76,
3489,
13332,
468,
353,
670,
7397,
16,
1427,
1043... |
if status == 'scheduled': | if status == 'scheduled' and self.recorder: | def __str__(self): """ A simple string representation for a recording for debugging in the recordserver. """ channel = self.channel if len(channel) > 10: channel = channel[:10] diff = (self.stop - self.start) / 60 name = self.name if len(name) > 23: name = name[:20] + u'...' name = u'"' + name + u'"' status = self.status if status == 'scheduled': status = self.recorder[0].name return '%3d %10s %-25s %4d %s-%s %s' % \ (self.id, String(channel), String(name), self.priority, _int2time(self.start)[4:], _int2time(self.stop)[9:], String(status)) | ab46d7b7c2488badcf6f76980c06148f17515a54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/ab46d7b7c2488badcf6f76980c06148f17515a54/recording.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
3536,
432,
4143,
533,
4335,
364,
279,
14949,
364,
10450,
316,
326,
1409,
3567,
18,
3536,
1904,
273,
365,
18,
4327,
309,
562,
12,
4327,
13,
405,
1728,
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,
1001,
701,
972,
12,
2890,
4672,
3536,
432,
4143,
533,
4335,
364,
279,
14949,
364,
10450,
316,
326,
1409,
3567,
18,
3536,
1904,
273,
365,
18,
4327,
309,
562,
12,
4327,
13,
405,
1728,
30... |
sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(2) 6 sage: a(8) 22 sage: a(200) 669 sage: a.list(9) [4, 6, 9, 10, 14, 15, 21, 22, 25] AUTHOR: -- Jaap Spies (2007-01-25) """ def __init__(self): | These numbers have been called semiprimes (or semi-primes), biprimes or 2-almost primes. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001358;a Products of two primes. sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(2) 6 sage: a(8) 22 sage: a(200) 669 sage: a.list(9) [4, 6, 9, 10, 14, 15, 21, 22, 25] AUTHOR: -- Jaap Spies (2007-01-25) """ | def _eval(self, n): return sum(i%2 for i in arith.divisors(n)) | 69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2142,
12,
77,
9,
22,
364,
277,
316,
419,
483,
18,
2892,
291,
1383,
12,
82,
3719,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2142,
12,
77,
9,
22,
364,
277,
316,
419,
483,
18,
2892,
291,
1383,
12,
82,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
arflags=crT; | arflags=crsT; | ifdef V quiet= | 5ed462a28d6416fd27290542095f0674491391ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6220/5ed462a28d6416fd27290542095f0674491391ff/make.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
536,
776,
10902,
33,
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,
309,
536,
776,
10902,
33,
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,
-10... |
timesteps = np.array([date], dtype='datetime64[s]')[0].astype(int) | timesteps = np.array([date], dtype='datetime64[s]')[0].astype(np.int64) | def test_creation_overflow(self): date = '1980-03-23 20:00:00' timesteps = np.array([date], dtype='datetime64[s]')[0].astype(int) for unit in ['ms', 'us', 'ns']: timesteps *= 1000 x = np.array([date], dtype='datetime64[%s]' % unit) | 4864c3d460db80ac1e49768df4bf3246b011e862 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/4864c3d460db80ac1e49768df4bf3246b011e862/test_datetime.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
17169,
67,
11512,
12,
2890,
4672,
1509,
273,
296,
3657,
3672,
17,
4630,
17,
4366,
4200,
30,
713,
30,
713,
11,
17145,
13058,
273,
1130,
18,
1126,
3816,
712,
6487,
3182,
2218,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17169,
67,
11512,
12,
2890,
4672,
1509,
273,
296,
3657,
3672,
17,
4630,
17,
4366,
4200,
30,
713,
30,
713,
11,
17145,
13058,
273,
1130,
18,
1126,
3816,
712,
6487,
3182,
2218,
... |
contain tuples of (testcase, exceptioninfo), where exceptioninfo is a tuple of values as returned by sys.exc_info(). | contain tuples of (testcase, exceptioninfo), where exceptioninfo is the formatted traceback of the error that occurred | def testMultiply(self); self.assertEquals((0 * 10), 0) self.assertEquals((5 * 8), 40) | 7b0657027f04ac0367908ee0474f6d762366e4bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7b0657027f04ac0367908ee0474f6d762366e4bb/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
26040,
12,
2890,
1769,
365,
18,
11231,
8867,
12443,
20,
380,
1728,
3631,
374,
13,
365,
18,
11231,
8867,
12443,
25,
380,
1725,
3631,
8063,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
26040,
12,
2890,
1769,
365,
18,
11231,
8867,
12443,
20,
380,
1728,
3631,
374,
13,
365,
18,
11231,
8867,
12443,
25,
380,
1725,
3631,
8063,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
'''This is the main class interface for Pexpect. Use this class to | """This is the main class interface for Pexpect. Use this class to | def __str__(self): return `self.value` | a6436229531e4cc3cceb58c0322f4ecc258e53d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/a6436229531e4cc3cceb58c0322f4ecc258e53d4/pexpect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
327,
1375,
2890,
18,
1132,
68,
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,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
327,
1375,
2890,
18,
1132,
68,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
conn = HTTPConnection(urlparts.hostname, urlparts.port) | conn = download.HTTPConnection(urlparts.hostname, urlparts.port) | def __init__(self, url): self.infostring = "" self.url = url urlparts = urlparse.urlparse(url) self.scheme = urlparts.scheme if self.scheme == "http": # need to set default port here port = httplib.HTTP_PORT try: if urlparts.port != None: port = urlparts.port except ValueError: self.infostring += _("Response") + ": " + _("Bad URL") + "\r\n" return conn = HTTPConnection(urlparts.hostname, port) try: conn.request("HEAD", url) except socket.error, error: self.infostring += _("Response") + ": " + _("Connection Error") + "\r\n" return resp = conn.getresponse() # handle redirects here and set self.url count = 0 while (resp.status == httplib.MOVED_PERMANENTLY or resp.status == httplib.FOUND) and count < MAX_REDIRECTS: url = resp.getheader("location") print _("Redirected") + ": %s" % url conn.close() urlparts = urlparse.urlparse(url) # need to set default port here port = httplib.HTTP_PORT if urlparts.port != None: port = urlparts.port conn = HTTPConnection(urlparts.hostname, urlparts.port) conn.request("HEAD", url) resp = conn.getresponse() count += 1 | b75c6adde33fe344b0b81d13b468c1fa74b99ff2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6425/b75c6adde33fe344b0b81d13b468c1fa74b99ff2/checker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
880,
4672,
365,
18,
18227,
371,
273,
1408,
365,
18,
718,
273,
880,
880,
6019,
273,
15185,
18,
718,
2670,
12,
718,
13,
365,
18,
9068,
273,
880,
6019,
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,
1001,
2738,
972,
12,
2890,
16,
880,
4672,
365,
18,
18227,
371,
273,
1408,
365,
18,
718,
273,
880,
880,
6019,
273,
15185,
18,
718,
2670,
12,
718,
13,
365,
18,
9068,
273,
880,
6019,
18... |
OUTPUT: a permutation group | OUTPUT: - A permutation group. | def PermutationGroup(gens=None, gap_group=None, canonicalize=True): """ Return the permutation group associated to `x` (typically a list of generators). INPUT: - ``gens`` - list of generators - ``gap_group`` - a gap permutation group - ``canonicalize`` - bool (default: True), if True sort generators and remove duplicates OUTPUT: a permutation group EXAMPLES:: sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G Permutation Group with generators [(3,4), (1,2,3)(4,5)] We can also make permutation groups from PARI groups:: sage: H = pari('x^4 - 2*x^3 - 2*x + 1').polgalois() sage: G = PariGroup(H, 4); G PARI group [8, -1, 3, "D(4)"] of degree 4 sage: H = PermutationGroup(G); H # optional - database_gap Transitive group number 3 of degree 4 sage: H.gens() # optional - database_gap [(1,2,3,4), (1,3)] We can also create permutation groups whose generators are Gap permutation objects. :: sage: p = gap('(1,2)(3,7)(4,6)(5,8)'); p (1,2)(3,7)(4,6)(5,8) sage: PermutationGroup([p]) Permutation Group with generators [(1,2)(3,7)(4,6)(5,8)] EXAMPLES: There is an underlying gap object that implements each permutation group. :: sage: G = PermutationGroup([[(1,2,3,4)]]) sage: G._gap_() Group( [ (1,2,3,4) ] ) sage: gap(G) Group( [ (1,2,3,4) ] ) sage: gap(G) is G._gap_() True sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: current_randstate().set_seed_gap() sage: G._gap_().DerivedSeries() [ Group( [ (3,4), (1,2,3)(4,5) ] ), Group( [ (1,5)(3,4), (1,5)(2,4), (1,5,3) ] ) ] TESTS:: sage: PermutationGroup(SymmetricGroup(5)) Traceback (most recent call last): ... TypeError: gens must be a tuple, list, or GapElement """ if not is_ExpectElement(gens) and hasattr(gens, '_permgroup_'): return gens._permgroup_() if gens is not None and not isinstance(gens, (tuple,list, GapElement)): raise TypeError, "gens must be a tuple, list, or GapElement" return PermutationGroup_generic(gens=gens, gap_group=gap_group, canonicalize=canonicalize) | 2d077a3331069892dd585070aa02c876686672d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/2d077a3331069892dd585070aa02c876686672d2/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13813,
9245,
1114,
12,
23730,
33,
7036,
16,
9300,
67,
1655,
33,
7036,
16,
25839,
33,
5510,
4672,
3536,
2000,
326,
17440,
1041,
3627,
358,
1375,
92,
68,
261,
12846,
6478,
279,
666,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13813,
9245,
1114,
12,
23730,
33,
7036,
16,
9300,
67,
1655,
33,
7036,
16,
25839,
33,
5510,
4672,
3536,
2000,
326,
17440,
1041,
3627,
358,
1375,
92,
68,
261,
12846,
6478,
279,
666,
434,
... |
fixup = lambda x: x skip = len(code); emit(0) | fixup = _identityfunction skip = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 3f8fdffe72485d69e9e31bdeb4796c1cca750eba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/3f8fdffe72485d69e9e31bdeb4796c1cca750eba/sre_compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
12,
13107,
16,
2943,
33,
7133,
4672,
327,
389,
87,
266,
18,
588,
8167,
12,
13107,
16,
2943,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2917,
416,
12,
13107,
16,
2943,
33,
7133,
4672,
327,
389,
87,
266,
18,
588,
8167,
12,
13107,
16,
2943,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
c2 = base_ring(a[1].lift() * (j+1) / (3*j + 7)) | if p.divides(3*j + 7): c2 = base_ring(lift(a[1]) * (j+1) / (3*j + 7)) else: c2 = a[1] * (j+1) / (3*j + 7) | def reduce_positive(Q, coeffs, offset): """ Applies cohomology relations to incorporate positive powers of $y$ into the $y^0$ term. INPUT: Q -- cubic polynomial coeffs -- list of length 3 lists. The i^th list [a, b, c] represents $y^{2(i - offset)} (a + bx + cx^2) dx/y$. offset -- nonnegative integer OUTPUT: The reduction is performed in-place. The output is placed in coeffs[offset]. Note that coeffs[i] will be meaningless for i > offset after this function is finished. EXAMPLE: sage: R.<x> = Integers(5^3)['x'] sage: Q = x^3 - x + R(1/4) sage: coeffs = [[1, 2, 3], [10, 15, 20]] sage: coeffs = [[R.base_ring()(a) for a in row] for row in coeffs] sage: monsky_washnitzer.reduce_positive(Q, coeffs, 0) sage: coeffs[0] [16, 102, 88] sage: coeffs = [[9, 8, 7], [10, 15, 20]] sage: coeffs = [[R.base_ring()(a) for a in row] for row in coeffs] sage: monsky_washnitzer.reduce_positive(Q, coeffs, 0) sage: coeffs[0] [24, 108, 92] """ base_ring = Q.base_ring() next_a = coeffs[len(coeffs) - 1] Qa = Q[1] Qb = Q[0] A = 2*Qa B = 3*Qb for i in range(len(coeffs)-1, offset, -1): j = 2*(i-offset) - 2 a = next_a next_a = coeffs[i-1] a[0] = a[0] - Qa*a[2]/3 # subtract d(y^j + 1) # todo: see comments about pAdicInteger in reduceNegative() # subtract off c1 of d(x y^j + 1) c1 = base_ring(a[0].lift() * (j+1) / (3*j + 5)) # subtract off c2 of d(x^2 y^j + 1) c2 = base_ring(a[1].lift() * (j+1) / (3*j + 7)) next_a[0] = next_a[0] + B*c1 next_a[1] = next_a[1] + A*c1 + B*c2 next_a[2] = next_a[2] + A*c2 coeffs[int(offset)] = next_a | 3596b006f3d4354e0ecd5702d8e8c91372a58ee1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3596b006f3d4354e0ecd5702d8e8c91372a58ee1/monsky_washnitzer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5459,
67,
21094,
12,
53,
16,
16530,
16,
1384,
4672,
3536,
1716,
5259,
1825,
17125,
4676,
7467,
358,
316,
3850,
3831,
340,
6895,
7602,
414,
434,
271,
93,
8,
1368,
326,
271,
93,
66,
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,
5459,
67,
21094,
12,
53,
16,
16530,
16,
1384,
4672,
3536,
1716,
5259,
1825,
17125,
4676,
7467,
358,
316,
3850,
3831,
340,
6895,
7602,
414,
434,
271,
93,
8,
1368,
326,
271,
93,
66,
20,
... |
if opts.ignorews or opts.ignorewsamount or opts.ignoreblanklines: | if opts.ignoreblanklines: | def yieldhunk(hunk, header): if header: for x in header: yield x (astart, a2, bstart, b2, delta) = hunk aend = contextend(a2, len(l1)) alen = aend - astart blen = b2 - bstart + aend - a2 | c5ba8f48c0d3f3127137d935b81fa8a4be5085fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/c5ba8f48c0d3f3127137d935b81fa8a4be5085fb/mdiff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2824,
76,
1683,
12,
76,
1683,
16,
1446,
4672,
309,
1446,
30,
364,
619,
316,
1446,
30,
2824,
619,
261,
689,
485,
16,
279,
22,
16,
324,
1937,
16,
324,
22,
16,
3622,
13,
273,
366,
168... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2824,
76,
1683,
12,
76,
1683,
16,
1446,
4672,
309,
1446,
30,
364,
619,
316,
1446,
30,
2824,
619,
261,
689,
485,
16,
279,
22,
16,
324,
1937,
16,
324,
22,
16,
3622,
13,
273,
366,
168... |
link=h.instance_url(event.instance), | link=h.instance_url(event.instance, path=event.event.link_path(event)), | def event_item(event): rss.add_item(title=u"%s %s" % (event.user.name, formatting.as_unicode(event)), link=h.instance_url(event.instance), pubdate=event.time, description=unicode(u"%s %s" % (h.user_link(event.user), formatting.as_html(event))), author_name=event.user.name, unique_id=unicode(event.id)) | 7627338ca5fbe675d1c409616cb53fecd532848e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10360/7627338ca5fbe675d1c409616cb53fecd532848e/rss.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
67,
1726,
12,
2575,
4672,
18817,
18,
1289,
67,
1726,
12,
2649,
33,
89,
28385,
87,
738,
87,
6,
738,
261,
2575,
18,
1355,
18,
529,
16,
10407,
18,
345,
67,
9124,
12,
2575,
13,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
67,
1726,
12,
2575,
4672,
18817,
18,
1289,
67,
1726,
12,
2649,
33,
89,
28385,
87,
738,
87,
6,
738,
261,
2575,
18,
1355,
18,
529,
16,
10407,
18,
345,
67,
9124,
12,
2575,
13,
36... |
handler = logging.handlers.RotatingFileHandler( os.path.join(mm_cfg.LOG_DIR, logger), maxBytes=0, backupCount=0) | handler = ReopenableFileHandler(os.path.join(mm_cfg.LOG_DIR, logger)) | def initialize(propagate=False): # XXX Don't call logging.basicConfig() because in Python 2.3, it adds a # handler to the root logger that we don't want. When Python 2.4 is the # minimum requirement, we can use basicConfig() with keyword arguments. # # The current set of Mailman logs are: # # error - All exceptions go to this log # bounce - All bounce processing logs go here # mischief - Various types of hostile activity # post - Information about messages posted to mailing lists # vette - Information related to admindb activity # smtp - Successful SMTP activity # smtp-failure - Unsuccessful SMTP activity # subscribe - Information about leaves/joins # config - Configuration issues # locks - Lock steals # qrunner - qrunner start/stops # # There was also a 'debug' logger, but that was mostly unused, so instead # we'll use debug level on existing loggers. # # Start by creating a common formatter and the root logger. formatter = logging.Formatter(fmt=FMT, datefmt=DATEFMT) log = logging.getLogger('mailman') handler = logging.StreamHandler() handler.setFormatter(formatter) log.addHandler(handler) log.setLevel(logging.INFO) # Create the subloggers for logger in LOGGERS: log = logging.getLogger('mailman.' + logger) # Propagation to the root logger is how we handle logging to stderr # when the qrunners are not run as a subprocess of mailmanctl. log.propagate = propagate handler = logging.handlers.RotatingFileHandler( os.path.join(mm_cfg.LOG_DIR, logger), maxBytes=0, backupCount=0) _handlers.append(handler) handler.setFormatter(formatter) log.addHandler(handler) | 155748d1c28457ce49dd6f67df24cd01285438a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/155748d1c28457ce49dd6f67df24cd01285438a4/loginit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
5986,
346,
340,
33,
8381,
4672,
468,
11329,
7615,
1404,
745,
2907,
18,
13240,
809,
1435,
2724,
316,
6600,
576,
18,
23,
16,
518,
4831,
279,
468,
1838,
358,
326,
1365,
1194,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4046,
12,
5986,
346,
340,
33,
8381,
4672,
468,
11329,
7615,
1404,
745,
2907,
18,
13240,
809,
1435,
2724,
316,
6600,
576,
18,
23,
16,
518,
4831,
279,
468,
1838,
358,
326,
1365,
1194,
71... |
bw_files[ranks] = (timestamp, f) | bw_files[ranks] = (timestamp, d+"/"+f) | def main(argv): for d in argv[1:-1]: # First, create a list of the most recent files in the # scan dirs that are recent enough for root, dirs, files in os.walk(d): for f in files: if f.find("-done-"): fp = file(f, "r") ranks = fp.readline() timestamp = float(fp.readline()) fp.close() if ranks not in bw_files or bw_files[ranks][0] < timestamp: bw_files[ranks] = (timestamp, f) for (t,f) in bw_files.itervalues(): fp = file(f, "r") fp.readline() fp.readline() for l in fp.readlines(): line = Line(l) if line.idhex not in nodes: n = Node() nodes[line.idhex] = n else: n = nodes[line.idhex] n.add_line(line) fp.close() pre_strm_avg = sum(map(lambda n: n.avg_strm_bw(), nodes.itervalues()))/ \ float(len(nodes)) pre_filt_avg = sum(map(lambda n: n.avg_filt_bw(), nodes.itervalues()))/ \ float(len(nodes)) for n in nodes.itervalues(): n.choose_strm_bw(pre_strm_avg) n.choose_filt_bw(pre_filt_avg) true_strm_avg = sum(map(lambda n: n.chosen_sbw, nodes.itervalues()))/ \ float(len(nodes)) true_filt_avg = sum(map(lambda n: n.chosen_fbw, nodes.itervalues()))/ \ float(len(nodes)) for n in nodes.itervalues(): n.fbw_ratio = n.filt_bw[n.chosen_fbw]/true_filt_avg n.sbw_ratio = n.strm_bw[n.chosen_sbw]/true_strm_avg if closest_to_one((n.sbw_ratio, n.fbw_ratio)) == 0: n.ratio = n.sbw_ratio n.new_bw = n.ns_bw[n.chosen_sbw]*n.ratio else: n.ratio = n.fbw_ratio n.new_bw = n.ns_bw[n.chosen_fbw]*n.ratio n_print = nodes.values() n_print.sort(lambda x,y: x.new_bw < y.new_bw) oldest_timestamp = min(map(lambda (t,f): t, bw_files.itervalues())) out = file(argv[-1], "w") out.write(str(int(round(oldest_timestamp,0)))+"\n") for n in n_print: out.write("node_id="+n.idhex+" bw="+str(base10_round(n.new_bw))+"\n") out.close() | f83bead330fe47785c58ea75d371332044c48c57 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3762/f83bead330fe47785c58ea75d371332044c48c57/aggregate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
364,
302,
316,
5261,
63,
21,
30,
17,
21,
14542,
468,
5783,
16,
752,
279,
666,
434,
326,
4486,
8399,
1390,
316,
326,
468,
4135,
7717,
716,
854,
8399,
7304,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
364,
302,
316,
5261,
63,
21,
30,
17,
21,
14542,
468,
5783,
16,
752,
279,
666,
434,
326,
4486,
8399,
1390,
316,
326,
468,
4135,
7717,
716,
854,
8399,
7304,
364,
... |
if requiredLifeTime and requiredLifeTime <= vomsTime and requiredLifeTime <= remainingSecs: | if requiredLifeTime and requiredLifeTime / 1.5 <= vomsTime and requiredLifeTime / 1.5 <= remainingSecs: | def getVOMSProxy( self, userDN, userGroup, requiredLifeTime = False, requestedVOMSAttr = False ): """ Get proxy string from the Proxy Repository for use with userDN in the userGroup and VOMS attr """ retVal = self.__getVOMSAttribute( userGroup, requestedVOMSAttr ) if not retVal[ 'OK' ]: return retVal vomsAttr = retVal[ 'Value' ] | b82c9a1a9acec1ee42f24912699dc8bdb65d603c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/b82c9a1a9acec1ee42f24912699dc8bdb65d603c/ProxyDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11031,
1872,
55,
3886,
12,
365,
16,
729,
8609,
16,
26205,
16,
1931,
15315,
950,
273,
1083,
16,
3764,
58,
1872,
55,
3843,
273,
1083,
262,
30,
3536,
968,
2889,
533,
628,
326,
7659,
6281,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11031,
1872,
55,
3886,
12,
365,
16,
729,
8609,
16,
26205,
16,
1931,
15315,
950,
273,
1083,
16,
3764,
58,
1872,
55,
3843,
273,
1083,
262,
30,
3536,
968,
2889,
533,
628,
326,
7659,
6281,... |
""" | """ | def __setitem__(self, indx, value): """x.__setitem__(i, y) <==> x[i]=y | fa55c4c696ec9c654bfe9099b550f554a05ac28b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/fa55c4c696ec9c654bfe9099b550f554a05ac28b/tseries.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
24732,
16,
460,
4672,
3536,
92,
16186,
542,
1726,
972,
12,
77,
16,
677,
13,
411,
631,
34,
619,
63,
77,
65,
33,
93,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
24732,
16,
460,
4672,
3536,
92,
16186,
542,
1726,
972,
12,
77,
16,
677,
13,
411,
631,
34,
619,
63,
77,
65,
33,
93,
2,
-100,
-100,
-100,
-100,
-1... |
'long': ('i', None, "int", "int"), | 'long': ('l', None, "long", "long"), | def enum(type, name, value): if not enums.has_key(type): enums[type] = {} enums[type][name] = value | ddefe9cccfa23ca9192f1d16e9b791daa2409823 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/ddefe9cccfa23ca9192f1d16e9b791daa2409823/generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2792,
12,
723,
16,
508,
16,
460,
4672,
309,
486,
17922,
18,
5332,
67,
856,
12,
723,
4672,
17922,
63,
723,
65,
273,
2618,
17922,
63,
723,
6362,
529,
65,
273,
460,
225,
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,
2792,
12,
723,
16,
508,
16,
460,
4672,
309,
486,
17922,
18,
5332,
67,
856,
12,
723,
4672,
17922,
63,
723,
65,
273,
2618,
17922,
63,
723,
6362,
529,
65,
273,
460,
225,
2,
-100,
-100,
... |
self.snd.stop() | if self.snd: self.snd.stop() | def _readerLoop( self ): f= None try: while self.exitFlag== 0: if self.playingFile== None: time.sleep( 0.01 ) continue self.length= self.frameNum= -1 # Initialize demuxer and read small portion of the file to have more info on the format self.err= [] if type( self.playingFile ) in ( str, unicode ): try: f= open( self.playingFile, 'rb' ) format= self.playingFile.split( '.' )[ -1 ].lower() except: traceback.print_exc() self.err.append( sys.exc_info()[1] ) self.playingFile= None continue else: format= self.fileFormat f= self.playingFile try: dm= muxer.Demuxer( format ) except: traceback.print_exc() self.err.append( sys.exc_info()[1] ) self.playingFile= None continue s= f.read( FILE_CHUNK ) r= dm.parse( s ) try: self.metaData= dm.getHeaderInfo() except: self.metaData= {} # This seek sets the seeking position already at the desired offset from the beginning if self.startPos: self.seekTo( self.startPos ) # Setup video( only first matching stream will be used ) self.err= [] self.vindex= -1 streams= filter( lambda x: x, dm.streams ) for st in streams: if st and st[ 'type' ]== muxer.CODEC_TYPE_VIDEO: self._initVideo( st ) self.vindex= list( streams ).index( st ) break # Setup audio( only first matching stream will be used ) self.aindex= -1 self.aPTS= None for st in streams: if st and st[ 'type' ]== muxer.CODEC_TYPE_AUDIO: self._initAudio( st ) self.aindex= list( streams ).index( st ) break # Open current file for playing currentFile= self.playingFile if self.vindex>= 0: self._getVStreamParams( self.vindex, streams[ self.vindex ], r ) self._getStreamLength( format, dm, f, r ) # Play until no exit flag, not eof, no errs and file still the same while len(s) and len( self.err )== 0 and \ self.exitFlag== 0 and self.playingFile and len( streams ) and \ self.playingFile== currentFile: if self.isPaused(): time.sleep( PAUSE_SLEEP ) continue for d in r: if self.playingFile!= currentFile: break # Seeking stuff if self.seek>= 0: f.seek( self.seek* self.getABitRate()/ 8, 0 ) seek= self.seek self.aDecodedFrames= [] self.aDelta= seek if self.ac: self.ac.reset() self.snd.stop() self.rawFrames= [] self.decodedFrames= [] if self.vc: self.vc.reset() if self.vindex== -1: # Seek immediately if only audio stream is available self.seek= -1 else: # Wait for a key video frame to arrive self.seek= SEEK_IN_PROGRESS break # See if we reached the end position of the video clip if self.endPos and self._getPTS()* 1000> self.endPos: # Seek at the end and close the reading loop instantly f.seek( 0, 2 ) break try: # Demux file into streams if d[ 0 ]== self.vindex: # Process video frame self._processVideoFrame( d ) elif d[ 0 ]== self.aindex and self.seek!= SEEK_IN_PROGRESS: # Decode and play audio frame self._processAudioFrame( d ) except: traceback.print_exc() raise # Read next encoded chunk and demux it s= f.read( 512 ) r= dm.parse( s ) if f: f.close() | 506e9172460401ded500869a56c03da6aec7db18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2107/506e9172460401ded500869a56c03da6aec7db18/player.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10530,
6452,
12,
365,
262,
30,
284,
33,
599,
775,
30,
1323,
365,
18,
8593,
4678,
631,
374,
30,
309,
365,
18,
1601,
310,
812,
631,
599,
30,
813,
18,
19607,
12,
374,
18,
1611,
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,
389,
10530,
6452,
12,
365,
262,
30,
284,
33,
599,
775,
30,
1323,
365,
18,
8593,
4678,
631,
374,
30,
309,
365,
18,
1601,
310,
812,
631,
599,
30,
813,
18,
19607,
12,
374,
18,
1611,
2... |
self.getConfiguration()['stdoutput'] = response | self.config['stdoutput'] = response | def setResponse(self, response): """ Sets the L{Response} object. | 9ae123ffe002644719aa9d436ab759844ca2af22 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11836/9ae123ffe002644719aa9d436ab759844ca2af22/pyblosxom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16044,
12,
2890,
16,
766,
4672,
3536,
11511,
326,
511,
95,
1064,
97,
733,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
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,
16044,
12,
2890,
16,
766,
4672,
3536,
11511,
326,
511,
95,
1064,
97,
733,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if verbose: | if verbose >= self.WHISPER: print "Running simulation with interval (%s, %s)." \ % (start_time, end_time) if verbose >= self.NORMAL: | def run(self): """Do the actual simulation. The input is set using setters/constructor. The solution can be retrieved using self.get_solution() """ return_last = self.get_return_last() sensi = self.get_sensitivity_analysis() time_step = self.get_time_step() start_time = self.get_start_time() end_time = self.get_final_time() verbose = False model = self.get_model() if verbose: print "Input before integration:", model.u print "States:", model.x print start_time, "to", end_time import sys sys.stdout.flush() if end_time < start_time: raise SundialsSimulationException('End time cannot be before start ' 'time.') if end_time == start_time: raise SundialsSimulationException('End time and start time cannot ' 'currently coinside.') # If this line is not here T[-1] returned will be end_time - time_step #end_time = end_time + time_step def _sundials_f(t, x, dx, f_data): """The sundials' RHS evaluation function. This function basically moves data between SUNDIALS arrays and NumPy arrays. Parameters: t -- the point time on which the evalution is being done. x -- the states. dx -- the derivatives of the states. f_data -- contains the model and an array with it's parameters. See SUNDIALS' manual and/or PySUNDIALS demos for more information. """ data = ctypes.cast(f_data, PUserData).contents model = data.model model.t = (t - data.t_sim_start) / data.t_sim_duration if data.ignore_p == 0: p = data.parameters sundials_params = p.params model.pi = sundials_params[p.pi_start : p.pi_end] model.u = sundials_params[p.u_start : p.u_end] # Copying from sundials space to model space and back again model.x = x model.eval_ode_f() dx[:] = model.dx return 0 | 2259378e77273c298d71047069b8f83885e323aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/2259378e77273c298d71047069b8f83885e323aa/sundials.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
3244,
326,
3214,
14754,
18,
225,
1021,
810,
353,
444,
1450,
25627,
19,
12316,
18,
1021,
6959,
848,
506,
10295,
1450,
365,
18,
588,
67,
13385,
1435,
3536,
327,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
3244,
326,
3214,
14754,
18,
225,
1021,
810,
353,
444,
1450,
25627,
19,
12316,
18,
1021,
6959,
848,
506,
10295,
1450,
365,
18,
588,
67,
13385,
1435,
3536,
327,... |
(self.originalNx, self.originalNy, original.Nz) = data.shape | (self.originalNx, self.originalNy, self.originalNz) = data.shape | def _newVolume(self,data,copyFrom=None,rescale=True): """Takes a numpy array and makes a geoprobe volume. This volume can then be written to disk using the write() method.""" | 6c27cc925b828929c3e79f22366f75f6fbff7d1e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10472/6c27cc925b828929c3e79f22366f75f6fbff7d1e/volume.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2704,
4545,
12,
2890,
16,
892,
16,
3530,
1265,
33,
7036,
16,
455,
1869,
33,
5510,
4672,
3536,
11524,
279,
3972,
526,
471,
7297,
279,
8244,
556,
303,
2196,
3940,
18,
1220,
3940,
84... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
2704,
4545,
12,
2890,
16,
892,
16,
3530,
1265,
33,
7036,
16,
455,
1869,
33,
5510,
4672,
3536,
11524,
279,
3972,
526,
471,
7297,
279,
8244,
556,
303,
2196,
3940,
18,
1220,
3940,
84... |
return _number(_extract(node, "playcount")) | return _number(_extract(doc, "playcount")) | def get_playcount(self): """Returns the play count.""" doc = self._request("track.getInfo", True) return _number(_extract(node, "playcount")) | cfe71efdd094c8e7eabbf2ef5f1bec2f14b0e166 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9926/cfe71efdd094c8e7eabbf2ef5f1bec2f14b0e166/pylast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1601,
1883,
12,
2890,
4672,
3536,
1356,
326,
6599,
1056,
12123,
225,
997,
273,
365,
6315,
2293,
2932,
4101,
18,
588,
966,
3113,
1053,
13,
327,
389,
2696,
24899,
8004,
12,
2434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
67,
1601,
1883,
12,
2890,
4672,
3536,
1356,
326,
6599,
1056,
12123,
225,
997,
273,
365,
6315,
2293,
2932,
4101,
18,
588,
966,
3113,
1053,
13,
327,
389,
2696,
24899,
8004,
12,
2434,
... |
read_config_file(DEFAULT_CONFIG_FILE) | if DEFAULT_CONFIG_FILE: read_config_file(DEFAULT_CONFIG_FILE) | def read_config_file(configfile): try: execfile(configfile) except IOError,e: log_loading.warning("Cannot read config file [%s] [%s]" % (configfile,e)) except Exception,e: log_loading.exception("Error during evaluation of config file [%s]" % configfile) | f2805f78300244ca0bd43b7fb79dfea8b9d7fcd1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7311/f2805f78300244ca0bd43b7fb79dfea8b9d7fcd1/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
1425,
67,
768,
12,
1425,
768,
4672,
775,
30,
1196,
768,
12,
1425,
768,
13,
1335,
8340,
16,
73,
30,
613,
67,
15174,
18,
8551,
2932,
4515,
855,
642,
585,
9799,
87,
65,
9799,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
1425,
67,
768,
12,
1425,
768,
4672,
775,
30,
1196,
768,
12,
1425,
768,
13,
1335,
8340,
16,
73,
30,
613,
67,
15174,
18,
8551,
2932,
4515,
855,
642,
585,
9799,
87,
65,
9799,
... |
aaimg = AsciiArtImage(file(filename).read()) | aaimg = AsciiArtImage(file(filename).read(), options.aspect) | #~ def render(text): #~ """helper function for tests. scan the given image and create svg output""" #~ aaimg = AsciiArtImage(text) #~ print text #~ aaimg.recognize() #~ aav = aa.AsciiOutputVisitor() #~ pprint.pprint(aaimg.shapes) #~ aav.visit(aaimg) #~ print aav #~ svgout = svg.SVGOutputVisitor( #~ file('aafigure_%x.svg' % (long(hash(text)) & 0xffffffffL,), 'w'), #~ scale = 10 #~ ) #~ svgout.visit(aaimg) | c26bf4911ebbbab0ad6cc10fd283168af06946bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1203/c26bf4911ebbbab0ad6cc10fd283168af06946bd/aafigure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
98,
1652,
1743,
12,
955,
4672,
468,
98,
3536,
4759,
445,
364,
7434,
18,
4135,
326,
864,
1316,
471,
752,
9804,
876,
8395,
468,
98,
279,
4581,
75,
273,
22475,
2835,
4411,
2040,
12,
955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
468,
98,
1652,
1743,
12,
955,
4672,
468,
98,
3536,
4759,
445,
364,
7434,
18,
4135,
326,
864,
1316,
471,
752,
9804,
876,
8395,
468,
98,
279,
4581,
75,
273,
22475,
2835,
4411,
2040,
12,
955,
... |
if not wsc.check_user(uid): | if not wsc.check_user(uid, 'cfgwebsearch'): | def addexistingportalbox(req, colID, ln=cdslang, pbxID=-1, score=0, position='', sel_ln='', callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> <a class=navtrail href="%s/admin/websearch/websearchadmin.py/">Edit Collection Tree</a> """ % (weburl) try: uid = getUid(req) except MySQLdb.Error, e: return error_page(req) if not wsc.check_user(uid): return page(title="Edit Collection", body=wsc.perform_addexistingportalbox(colID=colID, ln=ln, pbxID=pbxID, score=score, position=position, sel_ln=sel_ln, callback=callback, confirm=confirm), uid=uid, language=ln, urlargs=req.args, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page(title='Authorization failure', uid=uid, body=wsc.adderrorbox('try to login first', datalist=["""You are not a user authorized to perform admin tasks, try to <a href="%s/youraccount.py/login?referer=%s/admin/websearch/">login</a> with another account.""" % (weburl, weburl)]), navtrail= navtrail_previous_links, lastupdated=__lastupdated__) | 64768d1c90331fa30ff327f07b134d7b2140dd2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/64768d1c90331fa30ff327f07b134d7b2140dd2a/websearchadmin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1261,
561,
376,
310,
24386,
2147,
12,
3658,
16,
645,
734,
16,
7211,
33,
4315,
2069,
539,
16,
6386,
92,
734,
29711,
21,
16,
4462,
33,
20,
16,
1754,
2218,
2187,
357,
67,
2370,
2218,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1261,
561,
376,
310,
24386,
2147,
12,
3658,
16,
645,
734,
16,
7211,
33,
4315,
2069,
539,
16,
6386,
92,
734,
29711,
21,
16,
4462,
33,
20,
16,
1754,
2218,
2187,
357,
67,
2370,
2218,
21... |
build up the POST call for a host comment. Example of what nagios expects to get: cmd_typ=20&cmd_mod=2&host=app02.web.stage.ext.phx2.redhat.com&btnSubmit=Commit | build up the POST call for a host comment. Example of what nagios expects to get: cmd_typ=20&cmd_mod=2&host=app02.web.stage.ext.phx2.redhat.com& btnSubmit=Commit | def _call_nagios_delete_all_comments(self, host, command): """ build up the POST call for a host comment. Example of what nagios expects to get: cmd_typ=20&cmd_mod=2&host=app02.web.stage.ext.phx2.redhat.com&btnSubmit=Commit XXX: need to combine with other call methods """ opts = {} opts['host'] = host opts['cmd_typ'] = command opts['cmd_mod'] = '2' opts['btnSubmit']='Commit' opts['persistent']='on' try: response = urllib2.urlopen(self.nagios_instance, urllib.urlencode(opts)) except: print "Failed call to Nagios for " + host raise | bb29eec751694579f6d2612e2ac277d88fc6328f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12876/bb29eec751694579f6d2612e2ac277d88fc6328f/nagios.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1991,
67,
27132,
7441,
67,
3733,
67,
454,
67,
9231,
12,
2890,
16,
1479,
16,
1296,
4672,
3536,
1361,
731,
326,
5485,
745,
364,
279,
1479,
2879,
18,
5090,
434,
4121,
290,
346,
7441,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1991,
67,
27132,
7441,
67,
3733,
67,
454,
67,
9231,
12,
2890,
16,
1479,
16,
1296,
4672,
3536,
1361,
731,
326,
5485,
745,
364,
279,
1479,
2879,
18,
5090,
434,
4121,
290,
346,
7441,... |
key = max(self.tools.keys())+1 self.tools[key] = [0, name, command, init_dir] | if self.tools == {}: key = 1 else: key = max(self.tools.keys())+1 self.tools[key] = [0, name, command, init_dir] | def add_tool(self, name, command, init_dir): key = max(self.tools.keys())+1 self.tools[key] = [0, name, command, init_dir] i = 1 for tool in self.tools.values(): tool[0] = i i = i+1 self.update_list() | 6dd42eda7b682ad789d041bb0a2e4931a1ddf3bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/6dd42eda7b682ad789d041bb0a2e4931a1ddf3bf/dialogs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
6738,
12,
2890,
16,
508,
16,
1296,
16,
1208,
67,
1214,
4672,
309,
365,
18,
6642,
422,
16648,
498,
273,
404,
469,
30,
498,
273,
943,
12,
2890,
18,
6642,
18,
2452,
10756,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6738,
12,
2890,
16,
508,
16,
1296,
16,
1208,
67,
1214,
4672,
309,
365,
18,
6642,
422,
16648,
498,
273,
404,
469,
30,
498,
273,
943,
12,
2890,
18,
6642,
18,
2452,
10756,
15,
... |
if serie_config.ignore_flat_series: if flat(serie_data): continue | if flat(serie_data): continue | def render(self,data={}, context={}): | 97e59775bda90af663507ef7bde47a15bd612b55 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3323/97e59775bda90af663507ef7bde47a15bd612b55/chart.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
892,
28793,
819,
12938,
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,
... | [
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,
1743,
12,
2890,
16,
892,
28793,
819,
12938,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.timer = Timer(0.05, self._fade_out_step) | self.timer = Timer(50, self._fade_out_step) | def fade_out(self): self.timer = Timer(0.05, self._fade_out_step) | 74f8df57791b1c6e6e0c49c5d1395955668ca896 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13167/74f8df57791b1c6e6e0c49c5d1395955668ca896/status_overlay.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24444,
67,
659,
12,
2890,
4672,
365,
18,
12542,
273,
12290,
12,
3361,
16,
365,
6315,
507,
323,
67,
659,
67,
4119,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24444,
67,
659,
12,
2890,
4672,
365,
18,
12542,
273,
12290,
12,
3361,
16,
365,
6315,
507,
323,
67,
659,
67,
4119,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.