rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
int(float(self.eventsPerJob) / float(efficiency)) | int(float(self.eventsPerMCDBJob) / float(efficiency)) | def generateJobConfig(self, jobSpecNode): """ _generateJobConfig_ | 277dd858d03b01553e8c4d923ef113c0c5f41bb1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8886/277dd858d03b01553e8c4d923ef113c0c5f41bb1/RequestJobFactory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
2278,
809,
12,
2890,
16,
1719,
1990,
907,
4672,
3536,
389,
7163,
2278,
809,
67,
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,
2103,
2278,
809,
12,
2890,
16,
1719,
1990,
907,
4672,
3536,
389,
7163,
2278,
809,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.selectionChangedCallback(nodeNames) | if len(nodeNames) > 0: self.selectionChangedCallback(nodeNames) | def onSelectionChanged(self): if self.selectionChangedCallback is None: return | 757478a3f30b6509128d1c36147afa4b00481ede /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2792/757478a3f30b6509128d1c36147afa4b00481ede/ModuleExplorer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
6233,
5033,
12,
2890,
4672,
309,
365,
18,
10705,
5033,
2428,
353,
599,
30,
327,
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,
603,
6233,
5033,
12,
2890,
4672,
309,
365,
18,
10705,
5033,
2428,
353,
599,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
for table in [Build._table, BuildConfig._table, SlaveInfo._table] \ + TargetPlatform._schema: | for table in schema: | def environment_created(self): # Create the required tables db = self.env.get_db_cnx() cursor = db.cursor() for table in [Build._table, BuildConfig._table, SlaveInfo._table] \ + TargetPlatform._schema: cursor.execute(db.to_sql(table)) | aa42f5adf07878e8d15fda263795df6125940566 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4547/aa42f5adf07878e8d15fda263795df6125940566/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3330,
67,
4824,
12,
2890,
4672,
468,
1788,
326,
1931,
4606,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966,
67,
10305,
92,
1435,
3347,
273,
1319,
18,
9216,
1435,
364,
1014,
316,
1963,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3330,
67,
4824,
12,
2890,
4672,
468,
1788,
326,
1931,
4606,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966,
67,
10305,
92,
1435,
3347,
273,
1319,
18,
9216,
1435,
364,
1014,
316,
1963,
30,... |
if event.Dragging() and self._draggedObject: self.event.name = 'dragging' self._draggedObject.notify('dragging') | if event.Dragging() and self._draggedObject: self.event.name = 'dragging' self._draggedObject.notify('dragging') | def _handler_motion(self, event): """MouseMoveEvent observer for RWI. | 45c54a8cf3bb4d9c412053bee57429cdc5d3b11a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4494/45c54a8cf3bb4d9c412053bee57429cdc5d3b11a/devide_canvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4176,
67,
81,
8240,
12,
2890,
16,
871,
4672,
3536,
9186,
7607,
1133,
9655,
364,
534,
23109,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4176,
67,
81,
8240,
12,
2890,
16,
871,
4672,
3536,
9186,
7607,
1133,
9655,
364,
534,
23109,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.log.verbose( 'Waiting Pilots for TaskQueue:', waitingPilots ) | self.log.verbose( 'Waiting Pilots for TaskQueue %s:' % taskQueueID, waitingPilots ) | def execute(self): """Main Agent code: 1.- Query TaskQueueDB for existing TQs 2.- Add their Priorities 3.- Submit pilots """ | 6271afc9c4bbb66e2201ad46655c110521589002 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/6271afc9c4bbb66e2201ad46655c110521589002/TaskQueueDirector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
3536,
6376,
8669,
981,
30,
404,
18,
17,
2770,
3837,
3183,
2290,
364,
2062,
399,
53,
87,
576,
18,
17,
1436,
3675,
30326,
1961,
890,
18,
17,
17320,
24970,
6968,
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,
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,
1836,
12,
2890,
4672,
3536,
6376,
8669,
981,
30,
404,
18,
17,
2770,
3837,
3183,
2290,
364,
2062,
399,
53,
87,
576,
18,
17,
1436,
3675,
30326,
1961,
890,
18,
17,
17320,
24970,
6968,
353... |
var = wx.aui.AUI_ART_GRIPPER_COLOUR | var = wx.aui.AUI_DOCKART_GRIPPER_COLOUR | def OnSetColor(self, event): dlg = wx.ColourDialog(self._frame) dlg.SetTitle("Color Picker") if dlg.ShowModal() != wx.ID_OK: return var = 0 if event.GetId() == ID_BackgroundColor: var = wx.aui.AUI_ART_BACKGROUND_COLOUR elif event.GetId() == ID_SashColor: var = wx.aui.AUI_ART_SASH_COLOUR elif event.GetId() == ID_InactiveCaptionColor: var = wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR elif event.GetId() == ID_InactiveCaptionGradientColor: var = wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR elif event.GetId() == ID_InactiveCaptionTextColor: var = wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR elif event.GetId() == ID_ActiveCaptionColor: var = wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR elif event.GetId() == ID_ActiveCaptionGradientColor: var = wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR elif event.GetId() == ID_ActiveCaptionTextColor: var = wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR elif event.GetId() == ID_BorderColor: var = wx.aui.AUI_ART_BORDER_COLOUR elif event.GetId() == ID_GripperColor: var = wx.aui.AUI_ART_GRIPPER_COLOUR else: return self._frame.GetDockArt().SetColor(var, dlg.GetColourData().GetColour()) self._frame.DoUpdate() self.UpdateColors() | de824c0c9cec70a6369d011fb635c8ba12bdacea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/de824c0c9cec70a6369d011fb635c8ba12bdacea/AUI_DockingWindowMgr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
694,
2957,
12,
2890,
16,
871,
4672,
225,
25840,
273,
7075,
18,
26404,
6353,
12,
2890,
6315,
3789,
13,
225,
25840,
18,
694,
4247,
2932,
2957,
453,
5448,
7923,
225,
309,
25840,
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,
2755,
694,
2957,
12,
2890,
16,
871,
4672,
225,
25840,
273,
7075,
18,
26404,
6353,
12,
2890,
6315,
3789,
13,
225,
25840,
18,
694,
4247,
2932,
2957,
453,
5448,
7923,
225,
309,
25840,
18,
... |
""" | """ | def fl_glwinopen(config, context, w, h): """ fl_glwinopen(config, context, w, h) -> window """ retval = _fl_glwinopen(config, context, w, h) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
7043,
8082,
3190,
12,
1425,
16,
819,
16,
341,
16,
366,
4672,
3536,
1183,
67,
7043,
8082,
3190,
12,
1425,
16,
819,
16,
341,
16,
366,
13,
317,
2742,
3536,
225,
5221,
273,
389... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1183,
67,
7043,
8082,
3190,
12,
1425,
16,
819,
16,
341,
16,
366,
4672,
3536,
1183,
67,
7043,
8082,
3190,
12,
1425,
16,
819,
16,
341,
16,
366,
13,
317,
2742,
3536,
225,
5221,
273,
389... |
assert id is not None, 'None is not a possible id for %s' % cls.__name | assert id is not None, 'None is not a possible id for %s' % cls.__name__ | def get(cls, id, connection=None, selectResults=None): | be2833f248395c37f1c6b164ea15630bd9cdf050 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/be2833f248395c37f1c6b164ea15630bd9cdf050/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
6429,
16,
612,
16,
1459,
33,
7036,
16,
2027,
3447,
33,
7036,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
12,
6429,
16,
612,
16,
1459,
33,
7036,
16,
2027,
3447,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
raise ValueError('Invalid stopit specification: %r' % self._stopbits) | raise ValueError('Invalid stop bit specification: %r' % self._stopbits) | def _reconfigurePort(self): """Set communication parameters on opened port.""" if self.fd is None: raise SerialException("Can only operate on a valid port handle") custom_baud = None | 1f90ac65d3fedcbcbad07f16ea3e6414ab08d398 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/1f90ac65d3fedcbcbad07f16ea3e6414ab08d398/serialposix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
266,
14895,
2617,
12,
2890,
4672,
3536,
694,
18279,
1472,
603,
10191,
1756,
12123,
309,
365,
18,
8313,
353,
599,
30,
1002,
7366,
503,
2932,
2568,
1338,
20829,
603,
279,
923,
1756,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
266,
14895,
2617,
12,
2890,
4672,
3536,
694,
18279,
1472,
603,
10191,
1756,
12123,
309,
365,
18,
8313,
353,
599,
30,
1002,
7366,
503,
2932,
2568,
1338,
20829,
603,
279,
923,
1756,
1... |
self.settings["CFLAGS"]="-O2 -pipe" | self.settings["CFLAGS"]="-Os -pipe" | def __init__(self,myspec): builder.generic.__init__(self,myspec) self.settings["CHROOT"]="chroot" self.settings["CFLAGS"]="-O2 -pipe" | 321f18879bc87a41318c5ec608b8a54899c30ba6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7327/321f18879bc87a41318c5ec608b8a54899c30ba6/arm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
81,
1900,
705,
4672,
2089,
18,
13540,
16186,
2738,
972,
12,
2890,
16,
81,
1900,
705,
13,
365,
18,
4272,
9614,
1792,
9185,
11929,
1546,
343,
3085,
6,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
81,
1900,
705,
4672,
2089,
18,
13540,
16186,
2738,
972,
12,
2890,
16,
81,
1900,
705,
13,
365,
18,
4272,
9614,
1792,
9185,
11929,
1546,
343,
3085,
6,
365,... |
except AttributeError: self.__rank = {} | def rank(self, use_database=False, verbose=False, only_use_mwrank=True, algorithm='mwrank_shell', proof=None): """ Return the rank of this elliptic curve, assuming no conjectures. | 836c01199b8af55069c702b7fc55d5e2b64bbdf0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/836c01199b8af55069c702b7fc55d5e2b64bbdf0/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6171,
12,
2890,
16,
999,
67,
6231,
33,
8381,
16,
3988,
33,
8381,
16,
1338,
67,
1202,
67,
81,
91,
11500,
33,
5510,
16,
4886,
2218,
81,
91,
11500,
67,
10304,
2187,
14601,
33,
7036,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6171,
12,
2890,
16,
999,
67,
6231,
33,
8381,
16,
3988,
33,
8381,
16,
1338,
67,
1202,
67,
81,
91,
11500,
33,
5510,
16,
4886,
2218,
81,
91,
11500,
67,
10304,
2187,
14601,
33,
7036,
467... | |
dir_info = SVN.CaptureInfo(".") repo_root = dir_info["Repository Root"] | dir_info = SVN.CaptureInfo('.') repo_root = dir_info['Repository Root'] | def GetCachedFile(filename, max_age=60*60*24*3, use_root=False): """Retrieves a file from the repository and caches it in GetCacheDir() for max_age seconds. use_root: If False, look up the arborescence for the first match, otherwise go directory to the root repository. Note: The cache will be inconsistent if the same file is retrieved with both use_root=True and use_root=False. Don't be stupid. """ if filename not in FILES_CACHE: # Don't try to look up twice. FILES_CACHE[filename] = None # First we check if we have a cached version. try: cached_file = os.path.join(GetCacheDir(), filename) except gclient_utils.Error: return None if (not os.path.exists(cached_file) or (time.time() - os.stat(cached_file).st_mtime) > max_age): dir_info = SVN.CaptureInfo(".") repo_root = dir_info["Repository Root"] if use_root: url_path = repo_root else: url_path = dir_info["URL"] while True: # Look in the repository at the current level for the file. for _ in range(5): content = "" try: # Take advantage of the fact that svn won't output to stderr in case # of success but will do in case of failure so don't mind putting # stderr into content_array. content_array = [] svn_path = url_path + "/" + filename args = ['cat', svn_path] if sys.platform != 'darwin': # MacOSX 10.5.2 has a bug with svn 1.4.4 that will trigger the # 'Can\'t get username or password' and can be fixed easily. # The fix doesn't work if the user upgraded to svn 1.6.x. Bleh. # I don't have time to fix their broken stuff. args.append('--non-interactive') SVN.RunAndFilterOutput(args, cwd='.', filter_fn=content_array.append) # Exit the loop if the file was found. Override content. content = '\n'.join(content_array) break except gclient_utils.Error: if content_array[0].startswith( 'svn: Can\'t get username or password'): ErrorExit('Your svn credentials expired. Please run svn update ' 'to fix the cached credentials') if content_array[0].startswith('svn: Can\'t get password'): ErrorExit('If are using a Mac and svn --version shows 1.4.x, ' 'please hack gcl.py to remove --non-interactive usage, it\'s' 'a bug on your installed copy') if not content_array[0].startswith('svn: File not found:'): # Try again. continue if content: break if url_path == repo_root: # Reached the root. Abandoning search. break # Go up one level to try again. url_path = os.path.dirname(url_path) # Write a cached version even if there isn't a file, so we don't try to # fetch it each time. gclient_utils.FileWrite(cached_file, content) else: content = gclient_utils.FileRead(cached_file, 'r') # Keep the content cached in memory. FILES_CACHE[filename] = content return FILES_CACHE[filename] | b2e040e565255dbc9ba816fc4ff0fddd746f2f65 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/b2e040e565255dbc9ba816fc4ff0fddd746f2f65/gcl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
9839,
812,
12,
3459,
16,
943,
67,
410,
33,
4848,
14,
4848,
14,
3247,
14,
23,
16,
999,
67,
3085,
33,
8381,
4672,
3536,
6960,
279,
585,
628,
326,
3352,
471,
12535,
518,
316,
968,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9839,
812,
12,
3459,
16,
943,
67,
410,
33,
4848,
14,
4848,
14,
3247,
14,
23,
16,
999,
67,
3085,
33,
8381,
4672,
3536,
6960,
279,
585,
628,
326,
3352,
471,
12535,
518,
316,
968,
... |
mplaxis.set_major_locator(getTimeLocator(location,interval)) | if mplaxis: mplaxis.set_major_locator(getTimeLocator(location,interval)) | def update(self): """Update the figure. Everything happens here. The current set of customized properties is interpreted, data slices are obtained from the data sources, default figure properties are set based on properties of the obtained data, and the figure is built and shown. """ # We are called whenever figure properties change. If we do not want to update now, # just register that an update is needed and exit. if not self.updating: self.dirty = True return | ca77abda05c6ac461266d0b1ee4d4b11076d626e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/381/ca77abda05c6ac461266d0b1ee4d4b11076d626e/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
3536,
1891,
326,
7837,
18,
225,
26553,
10555,
2674,
18,
1021,
783,
444,
434,
29063,
1790,
353,
19898,
16,
501,
12390,
854,
12700,
628,
326,
501,
5550,
16,
805,
7837... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
3536,
1891,
326,
7837,
18,
225,
26553,
10555,
2674,
18,
1021,
783,
444,
434,
29063,
1790,
353,
19898,
16,
501,
12390,
854,
12700,
628,
326,
501,
5550,
16,
805,
7837... |
docline.append(" * remaining args: %s" % " ".join(self.argn[1])) | docline.append(" * _<remaining args>_ .. : %s" % " ".join(self.argn[1])) | def generate(self): #this is doc only, not a function... docline = list() if self.name is None: docline.extend(self.desc) docline.append("") return docline | 7531f06de7c398db4567bf353672327520dd5c67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13121/7531f06de7c398db4567bf353672327520dd5c67/generate_doc_from_cmake.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
4672,
468,
2211,
353,
997,
1338,
16,
486,
279,
445,
2777,
997,
1369,
273,
666,
1435,
309,
365,
18,
529,
353,
599,
30,
997,
1369,
18,
14313,
12,
2890,
18,
5569,
13,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
12,
2890,
4672,
468,
2211,
353,
997,
1338,
16,
486,
279,
445,
2777,
997,
1369,
273,
666,
1435,
309,
365,
18,
529,
353,
599,
30,
997,
1369,
18,
14313,
12,
2890,
18,
5569,
13,
99... |
for otherClassId in package.classes: otherClassDeps = self._depLoader.getDeps(otherClassId, variants) if classId in (x.name for x in otherClassDeps["load"]): yield (packageId, classId, otherClassId, 'load') if classId in (x.name for x in otherClassDeps["run"]): yield (packageId, classId, otherClassId, 'run') | classDeps = self._depLoader.getDeps(classId, variants) for dep in classDeps["load"]: yield (packageId, dep.name, classId, 'load') for dep in classDeps["run"]: yield (packageId, dep.name, classId, 'run') | def lookupUsedByDeps(packages): for packageId, package in enumerate(packages): for classId in sorted(package.classes): for otherClassId in package.classes: otherClassDeps = self._depLoader.getDeps(otherClassId, variants) if classId in (x.name for x in otherClassDeps["load"]): yield (packageId, classId, otherClassId, 'load') if classId in (x.name for x in otherClassDeps["run"]): yield (packageId, classId, otherClassId, 'run') | d1325a630dd674037a9e9c9ee82994269849d10d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/d1325a630dd674037a9e9c9ee82994269849d10d/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
6668,
858,
14430,
12,
10308,
4672,
364,
2181,
548,
16,
2181,
316,
4241,
12,
10308,
4672,
364,
31181,
316,
3115,
12,
5610,
18,
4701,
4672,
364,
1308,
797,
548,
316,
2181,
18,
4701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3689,
6668,
858,
14430,
12,
10308,
4672,
364,
2181,
548,
16,
2181,
316,
4241,
12,
10308,
4672,
364,
31181,
316,
3115,
12,
5610,
18,
4701,
4672,
364,
1308,
797,
548,
316,
2181,
18,
4701,
... |
key = self.dictKey() if key is None: raise Indirection.GarbageCollectedDictKey() | key = self._getNonWeakDictKey() if parentDict is None: return key | def dereferenceDictKey(self, parentDict): key = self.dictKey() if key is None: raise Indirection.GarbageCollectedDictKey() return parentDict[key] | bb22b15b9f0ccdc40e73d008896e3199a4fa2dc3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/bb22b15b9f0ccdc40e73d008896e3199a4fa2dc3/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27794,
5014,
653,
12,
2890,
16,
982,
5014,
4672,
225,
498,
273,
365,
6315,
588,
3989,
3218,
581,
5014,
653,
1435,
225,
309,
982,
5014,
353,
599,
30,
327,
498,
327,
982,
5014,
63,
856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
27794,
5014,
653,
12,
2890,
16,
982,
5014,
4672,
225,
498,
273,
365,
6315,
588,
3989,
3218,
581,
5014,
653,
1435,
225,
309,
982,
5014,
353,
599,
30,
327,
498,
327,
982,
5014,
63,
856,
... |
return urllib.pathname2url(target[common_len:]) | return target[common_len:] | def get_link_path(target, base): """Returns a relative path to a target from a base. If base is an existing file, then its parent directory is considered. Otherwise, base is assumed to be a directory. Rationale: os.path.relpath is not available before Python 2.6 """ target = target.encode('UTF-8') target = normpath(target) base = normpath(base) if os.path.isfile(base): base = os.path.dirname(base) if base == target: return urllib.pathname2url(os.path.basename(target)) base_drive, base_path = os.path.splitdrive(base) # if in Windows and base and link on different drives if os.path.splitdrive(target)[0] != base_drive: return 'file:' + urllib.pathname2url(target) common_len = len(_common_path(base, target)) if base_path == os.sep: return urllib.pathname2url(target[common_len:]) if common_len == len(base_drive) + len(os.sep): common_len -= len(os.sep) dirs_up = os.sep.join([os.pardir] * base[common_len:].count(os.sep)) return urllib.pathname2url(os.path.join(dirs_up, target[common_len + len(os.sep):])) | 981e2a7fcffa2608e2b8ea9c5d06bf0165502bf4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6988/981e2a7fcffa2608e2b8ea9c5d06bf0165502bf4/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1232,
67,
803,
12,
3299,
16,
1026,
4672,
3536,
1356,
279,
3632,
589,
358,
279,
1018,
628,
279,
1026,
18,
971,
1026,
353,
392,
2062,
585,
16,
1508,
2097,
982,
1867,
353,
7399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1232,
67,
803,
12,
3299,
16,
1026,
4672,
3536,
1356,
279,
3632,
589,
358,
279,
1018,
628,
279,
1026,
18,
971,
1026,
353,
392,
2062,
585,
16,
1508,
2097,
982,
1867,
353,
7399,
... |
option_parser.add_option("", "--verbose", action="store_true", default=False, | option_parser.add_option("-v", "--verbose", action="count", default=0, | def Main(argv): """Parse command line arguments and dispatch command.""" option_parser = optparse.OptionParser(usage=DEFAULT_USAGE_TEXT, version=__version__) option_parser.disable_interspersed_args() option_parser.add_option("", "--force", action="store_true", default=False, help=("(update/sync only) force update even " "for modules which haven't changed")) option_parser.add_option("", "--nohooks", action="store_true", default=False, help=("(update/sync/revert only) prevent the hooks from " "running")) option_parser.add_option("", "--revision", action="append", dest="revisions", metavar="REV", default=[], help=("(update/sync only) sync to a specific " "revision, can be used multiple times for " "each solution, e.g. --revision=src@123, " "--revision=internal@32")) option_parser.add_option("", "--deps", default=None, dest="deps_os", metavar="OS_LIST", help=("(update/sync only) sync deps for the " "specified (comma-separated) platform(s); " "'all' will sync all platforms")) option_parser.add_option("", "--spec", default=None, help=("(config only) create a gclient file " "containing the provided string")) option_parser.add_option("", "--verbose", action="store_true", default=False, help="produce additional output for diagnostics") option_parser.add_option("", "--manually_grab_svn_rev", action="store_true", default=False, help="Skip svn up whenever possible by requesting " "actual HEAD revision from the repository") option_parser.add_option("", "--head", action="store_true", default=False, help=("skips any safesync_urls specified in " "configured solutions")) option_parser.add_option("", "--delete_unversioned_trees", action="store_true", default=False, help=("on update, delete any unexpected " "unversioned trees that are in the checkout")) if len(argv) < 2: # Users don't need to be told to use the 'help' command. option_parser.print_help() return 1 # Add manual support for --version as first argument. if argv[1] == '--version': option_parser.print_version() return 0 # Add manual support for --help as first argument. if argv[1] == '--help': argv[1] = 'help' command = argv[1] options, args = option_parser.parse_args(argv[2:]) if len(argv) < 3 and command == "help": option_parser.print_help() return 0 if options.verbose: logging.basicConfig(level=logging.DEBUG) # Files used for configuration and state saving. options.config_filename = os.environ.get("GCLIENT_FILE", ".gclient") options.entries_filename = ".gclient_entries" options.deps_file = "DEPS" options.platform = sys.platform return DispatchCommand(command, options, args) | 2647d3d2f1aefb78ad355115146ea14874ccb2b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/2647d3d2f1aefb78ad355115146ea14874ccb2b1/gclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12740,
12,
19485,
4672,
3536,
3201,
1296,
980,
1775,
471,
3435,
1296,
12123,
225,
1456,
67,
4288,
273,
2153,
2670,
18,
1895,
2678,
12,
9167,
33,
5280,
67,
29550,
67,
5151,
16,
1177,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12740,
12,
19485,
4672,
3536,
3201,
1296,
980,
1775,
471,
3435,
1296,
12123,
225,
1456,
67,
4288,
273,
2153,
2670,
18,
1895,
2678,
12,
9167,
33,
5280,
67,
29550,
67,
5151,
16,
1177,
33,
... |
if os.path.exists(fname): | if os.path.isfile(fname): | def find_library(name): if name in ('c', 'm'): return find_msvcrt() # See MSDN for the REAL search order. for directory in os.environ['PATH'].split(os.pathsep): fname = os.path.join(directory, name) if os.path.exists(fname): return fname if fname.lower().endswith(".dll"): continue fname = fname + ".dll" if os.path.exists(fname): return fname return None | 54fbeec7536d43304dea34baa1ad99b5e784e4e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/54fbeec7536d43304dea34baa1ad99b5e784e4e6/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
12083,
12,
529,
4672,
309,
508,
316,
7707,
71,
2187,
296,
81,
11,
4672,
327,
1104,
67,
959,
90,
3353,
88,
1435,
468,
2164,
9238,
8609,
364,
326,
2438,
1013,
1623,
1353,
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,
1104,
67,
12083,
12,
529,
4672,
309,
508,
316,
7707,
71,
2187,
296,
81,
11,
4672,
327,
1104,
67,
959,
90,
3353,
88,
1435,
468,
2164,
9238,
8609,
364,
326,
2438,
1013,
1623,
1353,
18,
... |
None, [cty.POINTER(FL_OBJECT), cty.c_double], | None, [cty.POINTER(FL_OBJECT), cty.c_double], | def fl_get_positioner_xbounds(ob, min, max): """ fl_get_positioner_xbounds(ob, min, max) """ _fl_get_positioner_xbounds(ob, min, max) | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
588,
67,
3276,
264,
67,
92,
10576,
12,
947,
16,
1131,
16,
943,
4672,
3536,
1183,
67,
588,
67,
3276,
264,
67,
92,
10576,
12,
947,
16,
1131,
16,
943,
13,
3536,
225,
389,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
588,
67,
3276,
264,
67,
92,
10576,
12,
947,
16,
1131,
16,
943,
4672,
3536,
1183,
67,
588,
67,
3276,
264,
67,
92,
10576,
12,
947,
16,
1131,
16,
943,
13,
3536,
225,
389,
22... |
utils.logger.info( 'query has been optimized on type and name' ) | utils.logger.debug( 'query has been optimized on type and name' ) | def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls | 420149f2642ab48ea7ca588594f35e1e04160a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7398/420149f2642ab48ea7ca588594f35e1e04160a38/scopedef.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4720,
659,
67,
3676,
12,
365,
16,
508,
16,
3496,
67,
723,
16,
5904,
262,
30,
309,
486,
365,
6315,
16689,
1235,
30,
2990,
18,
4901,
18,
1376,
12,
296,
8704,
1661,
15411,
843,
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,
4720,
659,
67,
3676,
12,
365,
16,
508,
16,
3496,
67,
723,
16,
5904,
262,
30,
309,
486,
365,
6315,
16689,
1235,
30,
2990,
18,
4901,
18,
1376,
12,
296,
8704,
1661,
15411,
843,
30... |
if type == 'reference' and v: model,ref_id = v.split(',') table = self.pool.get(model)._table cr.execute('select id from "%s" where id=%s' % (table,ref_id)) id_exist = cr.fetchone() if not id_exist: cr.execute('update "'+self._table+'" set "'+key+'"=NULL where "%s"=%s' %(key,''.join("'"+str(v)+"'"))) r[key] = '' | if v and column._type == 'reference': model_name, ref_id = v.split(',', 1) model = self.pool.get(model_name) if not model: reset = True else: cr.execute('SELECT count(1) FROM "%s" WHERE id=%%s' % (model._table,), (ref_id,)) reset = not cr.fetchone()[0] if reset: if column._classic_write: query = 'UPDATE "%s" SET "%s"=NULL WHERE id=%%s' % (self._table, key) cr.execute(query, (r['id'],)) r[key] = False | def read(self, cr, user, ids, fields=None, context=None, load='_classic_read'): """ Read records with given ids with the given fields | af889de0ce031cb71a5711f235cc4c6a3c5d499f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/af889de0ce031cb71a5711f235cc4c6a3c5d499f/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
4422,
16,
729,
16,
3258,
16,
1466,
33,
7036,
16,
819,
33,
7036,
16,
1262,
2218,
67,
1106,
335,
67,
896,
11,
4672,
3536,
2720,
3853,
598,
864,
3258,
598,
326,
864,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
4422,
16,
729,
16,
3258,
16,
1466,
33,
7036,
16,
819,
33,
7036,
16,
1262,
2218,
67,
1106,
335,
67,
896,
11,
4672,
3536,
2720,
3853,
598,
864,
3258,
598,
326,
864,
... |
raise NotImplementedError | return [ -a for a in self.positive_roots()] | def negative_roots(self): raise NotImplementedError | 1ba4508d061b0c24882363f40934caeb10e94cf5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/1ba4508d061b0c24882363f40934caeb10e94cf5/root_system.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6092,
67,
22078,
12,
2890,
4672,
1002,
11206,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
6092,
67,
22078,
12,
2890,
4672,
1002,
11206,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
retval = '/p/%s/photo' % self.getId() | retval = '/p/%s/photo' % self.get_canonicalNickname() | def get_image(self, url_only=True): """ Get the URL or actual image object for a user. | 133c95ca2d87c2420cdba8ef7f155579ae570137 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6270/133c95ca2d87c2420cdba8ef7f155579ae570137/CustomUser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2730,
12,
2890,
16,
880,
67,
3700,
33,
5510,
4672,
3536,
968,
326,
1976,
578,
3214,
1316,
733,
364,
279,
729,
18,
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,
336,
67,
2730,
12,
2890,
16,
880,
67,
3700,
33,
5510,
4672,
3536,
968,
326,
1976,
578,
3214,
1316,
733,
364,
279,
729,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
data = self.extract_text(body_elmt).replace(',', '.').replace(' ', '') | data = self.extract_text(body_elmt).replace(',', '.').replace(' ', '').replace(u'\xa0', '') | def get_history(self, start_index = 0): """ Returns the history of a specific account. Note that this function expects the current page page to be the one dedicated to this history. """ # tested on CA Lorraine, Paris, Toulouse # avoir parsing the page as an account-dedicated page if it is not the case if not self.is_account_page(): return | fdcc192f7e2fccc2a6be09cc29c5e7f705605c48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/fdcc192f7e2fccc2a6be09cc29c5e7f705605c48/accounts_list.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8189,
12,
2890,
16,
787,
67,
1615,
273,
374,
4672,
3536,
2860,
326,
4927,
434,
279,
2923,
2236,
18,
3609,
716,
333,
445,
10999,
326,
783,
1363,
1363,
358,
506,
326,
1245,
2432... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8189,
12,
2890,
16,
787,
67,
1615,
273,
374,
4672,
3536,
2860,
326,
4927,
434,
279,
2923,
2236,
18,
3609,
716,
333,
445,
10999,
326,
783,
1363,
1363,
358,
506,
326,
1245,
2432... |
This is not perfect: | This is not perfect:: | def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of strings like "``$HOME``". Don't make any changes on lines starting with more spaces than the first nonempty line in ``s``, because those are indented and hence part of a block of code or examples. This also doesn't replaces dollar signs enclosed in curly braces, to avoid nested math environments. EXAMPLES:: sage: from sage.misc.sagedoc import process_dollars sage: process_dollars('hello') 'hello' sage: process_dollars('some math: $x=y$') 'some math: `x=y`' Replace \$ with $, and don't do anything when backticks are involved:: sage: process_dollars(r'a ``$REAL`` dollar sign: \$') 'a ``$REAL`` dollar sign: $' Don't make any changes on lines indented more than the first nonempty line:: sage: s = '\n first line\n indented $x=y$' sage: s == process_dollars(s) True Don't replace dollar signs enclosed in curly braces:: sage: process_dollars(r'f(n) = 0 \text{ if $n$ is prime}') 'f(n) = 0 \\text{ if $n$ is prime}' This is not perfect: sage: process_dollars(r'$f(n) = 0 \text{ if $n$ is prime}$') '`f(n) = 0 \\text{ if $n$ is prime}$' The regular expression search doesn't find the last $. Fortunately, there don't seem to be any instances of this kind of expression in the Sage library, as of this writing. """ if s.find("$") == -1: return s # find how much leading whitespace s has, for later comparison: # ignore all $ on lines which start with more whitespace. whitespace = re.match(r'\s*\S', s.lstrip('\n')) whitespace = ' ' * (whitespace.end() - 1) # leading whitespace # Indices will be a list of pairs of positions in s, to search between. # If the following search has no matches, then indices will be (0, len(s)). indices = [0] # This searches for "$blah$" inside a pair of curly braces -- # don't change these, since they're probably coming from a nested # math environment. So for each match, search to the left of its # start and to the right of its end, but not in between. for m in re.finditer(r"{[^{}$]*\$([^{}$]*)\$[^{}$]*}", s): indices[-1] = (indices[-1], m.start()) indices.append(m.end()) indices[-1] = (indices[-1], len(s)) # regular expression for $ (not \$, `$, $`, and only on a line # with no extra leading whitespace). # # in detail: # re.compile("^" # beginning of line # + "(%s%)?" % whitespace # + r"""(\S # non whitespace # .*?)? # non-greedy match any non-newline characters # (?<!`|\\)\$(?!`) # $ with negative lookbehind and lookahead # """, re.M | re.X) # # except that this doesn't work, so use the equivalent regular # expression without the 're.X' option. Maybe 'whitespace' gets # eaten up by re.X? regexp = "^" + "(%s)?"%whitespace + r"(\S.*?)?(?<!`|\\)\$(?!`)" dollar = re.compile(regexp, re.M) # regular expression for \$ slashdollar = re.compile(r"\\\$") for start, end in indices: while dollar.search(s, start, end): m = dollar.search(s, start, end) s = s[:m.end()-1] + "`" + s[m.end():] while slashdollar.search(s, start, end): m = slashdollar.search(s, start, end) s = s[:m.start()] + "$" + s[m.end():] return s | 76507bb3690dbe2a9fc5054ca0a1bf290fe345a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/76507bb3690dbe2a9fc5054ca0a1bf290fe345a2/sagedoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
72,
22382,
5913,
12,
87,
4672,
436,
8395,
19888,
278,
338,
6910,
302,
25442,
21588,
598,
1473,
11767,
18,
225,
16053,
13382,
291,
2357,
16,
741,
279,
6736,
2652,
1623,
18,
225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
72,
22382,
5913,
12,
87,
4672,
436,
8395,
19888,
278,
338,
6910,
302,
25442,
21588,
598,
1473,
11767,
18,
225,
16053,
13382,
291,
2357,
16,
741,
279,
6736,
2652,
1623,
18,
225,... |
self.license.name.startswith('OSI Approved'): | self.license.name.startswith('OSI Approved')): | def isopen(self): if self.license and \ (self.license.name.startswith('OKD Compliant') in or self.license.name.startswith('OSI Approved'): return True return False | 54ffe9b6cfc2bf49817ec1b6c963868f503afade /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/265/54ffe9b6cfc2bf49817ec1b6c963868f503afade/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
3190,
12,
2890,
4672,
309,
365,
18,
12687,
471,
521,
261,
2890,
18,
12687,
18,
529,
18,
17514,
1918,
2668,
3141,
40,
1286,
18515,
6134,
316,
578,
365,
18,
12687,
18,
529,
18,
1751... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
3190,
12,
2890,
4672,
309,
365,
18,
12687,
471,
521,
261,
2890,
18,
12687,
18,
529,
18,
17514,
1918,
2668,
3141,
40,
1286,
18515,
6134,
316,
578,
365,
18,
12687,
18,
529,
18,
1751... |
rList.append('Idle') | rList.append( 'Idle' ) | def getSiteSummaryWeb(self,selectDict, sortList, startItem, maxItems): """ Get the summary of jobs in a given status on all the sites in the standard Web form """ | 99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11021,
4733,
4079,
12,
2890,
16,
4025,
5014,
16,
1524,
682,
16,
787,
1180,
16,
943,
3126,
4672,
3536,
968,
326,
4916,
434,
6550,
316,
279,
864,
1267,
603,
777,
326,
9180,
316,
326,
452... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11021,
4733,
4079,
12,
2890,
16,
4025,
5014,
16,
1524,
682,
16,
787,
1180,
16,
943,
3126,
4672,
3536,
968,
326,
4916,
434,
6550,
316,
279,
864,
1267,
603,
777,
326,
9180,
316,
326,
452... |
offsets.append(len(self.lights)) if passhi==Prim.LIGHTS: for o in range (nobj-1,-1,-1): object=theObjects[o] if (object.getType()=='Lamp' and object.Layer&layer and self.findgroup(object)==group): self.sortLamp(object) counts.append(len(self.lights)-offsets[-1]) self.nprim=len(self.vt)+len(self.vline)+len(self.lights)+len(self.nlights) | offsets.append(len(self.vlights)) for light in self.lights: if light.match(layer, group, passhi, False, DEFMAT, anim): self.vlights.append(light) counts.append(len(self.vlights)-offsets[-1]) self.nprim=len(self.vt)+len(self.vline)+len(self.vlights)+len(self.nlights) | def writeObjects (self, theObjects): | fc0647cfb44770e83ed6ca7bcb72153ba6720464 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10896/fc0647cfb44770e83ed6ca7bcb72153ba6720464/XPlaneExport8.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
4710,
261,
2890,
16,
326,
4710,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
4710,
261,
2890,
16,
326,
4710,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if id in self._processArr.keys(): return False if self.getProcessCount() >= self.slots: | if not self.canAddThisProcess(id): | def addProcess(self, obj, id): if id in self._processArr.keys(): return False if self.getProcessCount() >= self.slots: return False self._processArr[id] = obj return True | cf0767600df8f7af46b7388a601ffcaf48e045df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5988/cf0767600df8f7af46b7388a601ffcaf48e045df/process_control.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2227,
12,
2890,
16,
1081,
16,
612,
4672,
309,
486,
365,
18,
4169,
986,
2503,
2227,
12,
350,
4672,
327,
1083,
365,
6315,
2567,
5715,
63,
350,
65,
273,
1081,
327,
1053,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2227,
12,
2890,
16,
1081,
16,
612,
4672,
309,
486,
365,
18,
4169,
986,
2503,
2227,
12,
350,
4672,
327,
1083,
365,
6315,
2567,
5715,
63,
350,
65,
273,
1081,
327,
1053,
2,
-100,
-... |
self.o.setCursor(self.w.RotateMolCursor) | self.o.setCursor(self.w.MoveFreeRotateMolCursor) | def update_cursor_for_no_MB(self): '''Update the cursor for 'Move Chunks' mode. ''' if self.o.modkeys is None: self.o.setCursor(self.w.MoveSelectCursor) elif self.o.modkeys == 'Shift': #self.o.setCursor(self.w.MoveAddCursor) self.o.setCursor(self.w.MoveRotateMolCursor) elif self.o.modkeys == 'Control': #self.o.setCursor(self.w.MoveSubtractCursor) self.o.setCursor(self.w.RotateMolCursor) elif self.o.modkeys == 'Shift+Control': self.o.setCursor(self.w.DeleteCursor) else: print "Error in update_cursor_for_no_MB(): Invalid modkey=", self.o.modkeys return | 8c3e5e91178543f05558a900fda3b5006f47f387 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/8c3e5e91178543f05558a900fda3b5006f47f387/modifyMode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
9216,
67,
1884,
67,
2135,
67,
7969,
12,
2890,
4672,
9163,
1891,
326,
3347,
364,
296,
7607,
13021,
87,
11,
1965,
18,
9163,
309,
365,
18,
83,
18,
1711,
2452,
353,
599,
30,
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,
1089,
67,
9216,
67,
1884,
67,
2135,
67,
7969,
12,
2890,
4672,
9163,
1891,
326,
3347,
364,
296,
7607,
13021,
87,
11,
1965,
18,
9163,
309,
365,
18,
83,
18,
1711,
2452,
353,
599,
30,
36... |
Returns an induced copy of `G` in self. | Returns a copy of ``G`` in ``self``. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 8df00654035f400e2bfe288bcd227f8eb0525ff2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/8df00654035f400e2bfe288bcd227f8eb0525ff2/generic_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1547,
26372,
67,
1717,
4660,
67,
3072,
12,
2890,
16,
611,
4672,
436,
8395,
2860,
392,
1547,
26372,
1610,
434,
1375,
43,
68,
316,
365,
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,
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,
1547,
26372,
67,
1717,
4660,
67,
3072,
12,
2890,
16,
611,
4672,
436,
8395,
2860,
392,
1547,
26372,
1610,
434,
1375,
43,
68,
316,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
print "Distribution.parse_config_files():" | if DEBUG: print "Distribution.parse_config_files():" | def parse_config_files (self, filenames=None): | 2bd3f4250d59cabc0dda29fc3289beda315ce06a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2bd3f4250d59cabc0dda29fc3289beda315ce06a/dist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
1425,
67,
2354,
261,
2890,
16,
9066,
33,
7036,
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,
... | [
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,
1109,
67,
1425,
67,
2354,
261,
2890,
16,
9066,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
'<a href="http://localhost:8888/echo">back to referring page</a></div>' | '<a href="/echo">back to referring page</a></div>' | def EchoAllHandler(self): """This handler yields a (more) human-readable page listing information about the request header & contents.""" | 5ab608af9aba80652722e492890a88f283b72ccd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5ab608af9aba80652722e492890a88f283b72ccd/testserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28995,
1595,
1503,
12,
2890,
4672,
3536,
2503,
1838,
16932,
279,
261,
10161,
13,
8672,
17,
11018,
1363,
11591,
1779,
2973,
326,
590,
1446,
473,
2939,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
28995,
1595,
1503,
12,
2890,
4672,
3536,
2503,
1838,
16932,
279,
261,
10161,
13,
8672,
17,
11018,
1363,
11591,
1779,
2973,
326,
590,
1446,
473,
2939,
12123,
2,
-100,
-100,
-100,
-100,
-100... |
print "__hex__:\t", hex(wa), "\t", hex(za) print "__oct__:\t", oct(wa), "\t", oct(za) | print "__int__:\t", int(wb), "\t", int(zb) print "__long__:\t", long(wb), "\t", long(zb) print "__float__:\t", float(wb), "\t", float(zb) | def test01_SimpleMethods(self): if verbose: print '\n', '-=' * 30 print "Running %s.test01_SimpleMethods..." % \ self.__class__.__name__ | da3b1e53f95e6e2dffe7c8992e93103c1b0d409d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1057/da3b1e53f95e6e2dffe7c8992e93103c1b0d409d/test_methods.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1611,
67,
5784,
4712,
12,
2890,
4672,
309,
3988,
30,
1172,
2337,
82,
2187,
2400,
2218,
380,
5196,
1172,
315,
7051,
738,
87,
18,
3813,
1611,
67,
5784,
4712,
7070,
738,
521,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1611,
67,
5784,
4712,
12,
2890,
4672,
309,
3988,
30,
1172,
2337,
82,
2187,
2400,
2218,
380,
5196,
1172,
315,
7051,
738,
87,
18,
3813,
1611,
67,
5784,
4712,
7070,
738,
521,
365,
1... |
else | else: | def __init__(data = None) if data == None: quickfix.UtcTimeStampField.__init__(self, 443) else quickfix.UtcTimeStampField.__init__(self, 443, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
57,
5111,
21536,
974,
16186,
2738,
972,
12,
2890,
16,
23796,
13,
469,
30,
9549,
904,
18,
57,
5111,
2153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
57,
5111,
21536,
974,
16186,
2738,
972,
12,
2890,
16,
23796,
13,
469,
30,
9549,
904,
18,
57,
5111,
2153... |
items = [ items[1], items[0], item[2] ] | items = [ items[1], items[0], items[2] ] | def actions(self): """ return a list of actions for this item """ if config.CONFIRM_SHUTDOWN: items = [ (self.confirm_freevo, _('Shutdown Freevo') ), (self.confirm_system, _('Shutdown system') ), (self.confirm_system_restart, _('Restart system') ) ] else: items = [ (self.shutdown_freevo, _('Shutdown Freevo') ), (self.shutdown_system, _('Shutdown system') ), (self.shutdown_system_restart, _('Restart system') ) ] if config.ENABLE_SHUTDOWN_SYS: items = [ items[1], items[0], item[2] ] | ca18a6d035c0e189bbc26005d111207fb64b3aa2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/ca18a6d035c0e189bbc26005d111207fb64b3aa2/shutdown.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4209,
12,
2890,
4672,
3536,
327,
279,
666,
434,
4209,
364,
333,
761,
3536,
309,
642,
18,
2248,
31324,
67,
2664,
1693,
12711,
30,
1516,
273,
306,
261,
2890,
18,
10927,
67,
9156,
12307,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4209,
12,
2890,
4672,
3536,
327,
279,
666,
434,
4209,
364,
333,
761,
3536,
309,
642,
18,
2248,
31324,
67,
2664,
1693,
12711,
30,
1516,
273,
306,
261,
2890,
18,
10927,
67,
9156,
12307,
... |
list, tuple, or vector | list, tuple, or vector. | def frame3d(lower_left, upper_right, **kwds): """ Draw a frame in 3D. Primarily used as a helper function for creating frames for 3D graphics viewing. INPUT: - ``lower_left`` - the lower left corner of the frame, as a list, tuple, or vector - ``upper_right`` - the upper right corner of the frame, as a list, tuple, or vector Type ``line3d.options`` for a dictionary of the default options for lines, which are also available. EXAMPLES: A frame:: sage: from sage.plot.plot3d.shapes2 import frame3d sage: frame3d([1,3,2],vector([2,5,4]),color='red') This is usually used for making an actual plot:: sage: y = var('y') sage: plot3d(sin(x^2+y^2),(x,0,pi),(y,0,pi)) """ x0,y0,z0 = lower_left x1,y1,z1 = upper_right L1 = line3d([(x0,y0,z0), (x0,y1,z0), (x1,y1,z0), (x1,y0,z0), (x0,y0,z0), # top square (x0,y0,z1), (x0,y1,z1), (x1,y1,z1), (x1,y0,z1), (x0,y0,z1)], # bottom square **kwds) # 3 additional lines joining top to bottom v2 = line3d([(x0,y1,z0), (x0,y1,z1)], **kwds) v3 = line3d([(x1,y0,z0), (x1,y0,z1)], **kwds) v4 = line3d([(x1,y1,z0), (x1,y1,z1)], **kwds) F = L1 + v2 + v3 + v4 F._set_extra_kwds(kwds) return F | a074a851cc2fcbb495453d24cda3b4b1c0b78eec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/a074a851cc2fcbb495453d24cda3b4b1c0b78eec/shapes2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2623,
23,
72,
12,
8167,
67,
4482,
16,
3854,
67,
4083,
16,
2826,
25577,
4672,
3536,
10184,
279,
2623,
316,
890,
40,
18,
225,
2301,
381,
10243,
1399,
487,
279,
4222,
445,
364,
4979,
7793... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2623,
23,
72,
12,
8167,
67,
4482,
16,
3854,
67,
4083,
16,
2826,
25577,
4672,
3536,
10184,
279,
2623,
316,
890,
40,
18,
225,
2301,
381,
10243,
1399,
487,
279,
4222,
445,
364,
4979,
7793... |
ctx.prec += asymp_extraprec def h(a1,b1,b2): X = mpq_1_2*(a1-b1-b2+mpq_1_2) c = {} c[0] = ctx.one c[1] = 2*(mpq_1_4*(3*a1+b1+b2-2)*(a1-b1-b2)+b1*b2-mpq_3_16) c[2] = 2*(b1*b2+mpq_1_4*(a1-b1-b2)*(3*a1+b1+b2-2)-mpq_3_16)**2+\ mpq_1_16*(-16*(2*a1-3)*b1*b2 + \ 4*(a1-b1-b2)*(-8*a1**2+11*a1+b1+b2-2)-3) s1 = 0 s2 = 0 k = 0 tprev = 0 while 1: if k not in c: uu1 = (3*k**2+(-6*a1+2*b1+2*b2-4)*k + 3*a1**2 - \ (b1-b2)**2 - 2*a1*(b1+b2-2) + mpq_1_4) uu2 = (k-a1+b1-b2-mpq_1_2)*(k-a1-b1+b2-mpq_1_2)*\ (k-a1+b1+b2-mpq_5_2) c[k] = ctx.one/(2*k)*(uu1*c[k-1]-uu2*c[k-2]) w = c[k] * (-z)**(-0.5*k) t1 = (-ctx.j)**k * ctx.mpf(2)**(-k) * w t2 = ctx.j**k * ctx.mpf(2)**(-k) * w if abs(t1) < 0.1*ctx.eps: break if k > 5 and abs(tprev) / abs(t1) < 1.5: raise NoConvergence s1 += t1 s2 += t2 tprev = t1 k += 1 S = ctx.exp(ctx.j*(ctx.pi*X+2*ctx.sqrt(-z)))*s1 + \ ctx.exp(-ctx.j*(ctx.pi*X+2*ctx.sqrt(-z)))*s2 T1 = [0.5*S, ctx.pi, -z], [1, -0.5, X], [b1, b2], [a1],\ [], [], 0 T2 = [-z], [-a1], [b1,b2],[b1-a1,b2-a1], \ [a1,a1-b1+1,a1-b2+1], [], 1/z return T1, T2 v = hypercomb(h, [a1,b1,b2]) if sum(ctx.is_real_type(u) for u in [a1,b1,b2,z]) == 4: v = ctx.re(v) return v except NoConvergence: pass | try: ctx.prec += asymp_extraprec def h(a1,b1,b2): X = mpq_1_2*(a1-b1-b2+mpq_1_2) c = {} c[0] = ctx.one c[1] = 2*(mpq_1_4*(3*a1+b1+b2-2)*(a1-b1-b2)+b1*b2-mpq_3_16) c[2] = 2*(b1*b2+mpq_1_4*(a1-b1-b2)*(3*a1+b1+b2-2)-mpq_3_16)**2+\ mpq_1_16*(-16*(2*a1-3)*b1*b2 + \ 4*(a1-b1-b2)*(-8*a1**2+11*a1+b1+b2-2)-3) s1 = 0 s2 = 0 k = 0 tprev = 0 while 1: if k not in c: uu1 = (3*k**2+(-6*a1+2*b1+2*b2-4)*k + 3*a1**2 - \ (b1-b2)**2 - 2*a1*(b1+b2-2) + mpq_1_4) uu2 = (k-a1+b1-b2-mpq_1_2)*(k-a1-b1+b2-mpq_1_2)*\ (k-a1+b1+b2-mpq_5_2) c[k] = ctx.one/(2*k)*(uu1*c[k-1]-uu2*c[k-2]) w = c[k] * (-z)**(-0.5*k) t1 = (-ctx.j)**k * ctx.mpf(2)**(-k) * w t2 = ctx.j**k * ctx.mpf(2)**(-k) * w if abs(t1) < 0.1*ctx.eps: break if k > 5 and abs(tprev) / abs(t1) < 1.5: raise NoConvergence s1 += t1 s2 += t2 tprev = t1 k += 1 S = ctx.exp(ctx.j*(ctx.pi*X+2*ctx.sqrt(-z)))*s1 + \ ctx.exp(-ctx.j*(ctx.pi*X+2*ctx.sqrt(-z)))*s2 T1 = [0.5*S, ctx.pi, -z], [1, -0.5, X], [b1, b2], [a1],\ [], [], 0 T2 = [-z], [-a1], [b1,b2],[b1-a1,b2-a1], \ [a1,a1-b1+1,a1-b2+1], [], 1/z return T1, T2 v = hypercomb(h, [a1,b1,b2]) if sum(ctx.is_real_type(u) for u in [a1,b1,b2,z]) == 4: v = ctx.re(v) return v except NoConvergence: pass | def hyp1f2(ctx,a1,b1,b2,z,**kwargs): a1r, a1f, a1c, a1 = ctx._hyp_parse_param(a1) b1r, b1f, b1c, b1 = ctx._hyp_parse_param(b1) b2r, b2f, b2c, b2 = ctx._hyp_parse_param(b2) z = ctx.convert(z) absz = abs(z) magz = ctx.mag(z) orig = ctx.prec # Asymptotic expansion is ~ exp(sqrt(z)) asymp_extraprec = z and magz//2 # Asymptotic series is in terms of 3F0 can_use_asymptotic = (not kwargs.get('force_series')) and \ (ctx.mag(absz) > 19) and \ (ctx.sqrt(absz) > 1.5*orig) #and \ #ctx._hyp_check_convergence([a1, a1-b1+1, a1-b2+1], [], # 1/absz, orig+40+asymp_extraprec) # TODO: much of the following could be shared with 2F3 instead of # copypasted if can_use_asymptotic: #print "using asymp" try: ctx.prec += asymp_extraprec # http://functions.wolfram.com/HypergeometricFunctions/ # Hypergeometric1F2/06/02/03/ def h(a1,b1,b2): X = mpq_1_2*(a1-b1-b2+mpq_1_2) c = {} c[0] = ctx.one c[1] = 2*(mpq_1_4*(3*a1+b1+b2-2)*(a1-b1-b2)+b1*b2-mpq_3_16) c[2] = 2*(b1*b2+mpq_1_4*(a1-b1-b2)*(3*a1+b1+b2-2)-mpq_3_16)**2+\ mpq_1_16*(-16*(2*a1-3)*b1*b2 + \ 4*(a1-b1-b2)*(-8*a1**2+11*a1+b1+b2-2)-3) s1 = 0 s2 = 0 k = 0 tprev = 0 while 1: if k not in c: uu1 = (3*k**2+(-6*a1+2*b1+2*b2-4)*k + 3*a1**2 - \ (b1-b2)**2 - 2*a1*(b1+b2-2) + mpq_1_4) uu2 = (k-a1+b1-b2-mpq_1_2)*(k-a1-b1+b2-mpq_1_2)*\ (k-a1+b1+b2-mpq_5_2) c[k] = ctx.one/(2*k)*(uu1*c[k-1]-uu2*c[k-2]) w = c[k] * (-z)**(-0.5*k) t1 = (-ctx.j)**k * ctx.mpf(2)**(-k) * w t2 = ctx.j**k * ctx.mpf(2)**(-k) * w if abs(t1) < 0.1*ctx.eps: #print "Convergence :)" break # Quit if the series doesn't converge quickly enough if k > 5 and abs(tprev) / abs(t1) < 1.5: #print "No convergence :(" raise NoConvergence s1 += t1 s2 += t2 tprev = t1 k += 1 S = ctx.exp(ctx.j*(ctx.pi*X+2*ctx.sqrt(-z)))*s1 + \ ctx.exp(-ctx.j*(ctx.pi*X+2*ctx.sqrt(-z)))*s2 T1 = [0.5*S, ctx.pi, -z], [1, -0.5, X], [b1, b2], [a1],\ [], [], 0 T2 = [-z], [-a1], [b1,b2],[b1-a1,b2-a1], \ [a1,a1-b1+1,a1-b2+1], [], 1/z return T1, T2 v = hypercomb(h, [a1,b1,b2]) if sum(ctx.is_real_type(u) for u in [a1,b1,b2,z]) == 4: v = ctx.re(v) return v except NoConvergence: pass finally: ctx.prec = orig #print "not using asymp" return ctx.hypsum(a1r, a1f, a1c, b1r+b2r, b1f+b2f, b1c+b2c, z) | 74eca90720b3a15c322c60f6089a3be4f5dc8227 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11851/74eca90720b3a15c322c60f6089a3be4f5dc8227/functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16117,
21,
74,
22,
12,
5900,
16,
69,
21,
16,
70,
21,
16,
70,
22,
16,
94,
16,
636,
4333,
4672,
279,
21,
86,
16,
279,
21,
74,
16,
279,
21,
71,
16,
279,
21,
273,
1103,
6315,
76,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16117,
21,
74,
22,
12,
5900,
16,
69,
21,
16,
70,
21,
16,
70,
22,
16,
94,
16,
636,
4333,
4672,
279,
21,
86,
16,
279,
21,
74,
16,
279,
21,
71,
16,
279,
21,
273,
1103,
6315,
76,
... |
} | } val=0.0 cur_obj = self.pool.get('res.currency') cur = order.pricelist_id.currency_id | def _amount_all(self, cr, uid, ids, name, args, context=None): tax_obj = self.pool.get('account.tax') res={} for order in self.browse(cr, uid, ids): res[order.id] = { 'amount_paid': 0.0, 'amount_return':0.0, 'amount_tax':0.0, } for payment in order.statement_ids: res[order.id]['amount_paid'] += payment.amount for payment in order.payments: res[order.id]['amount_return'] += (payment.amount < 0 and payment.amount or 0) for line in order.lines: if order.price_type!='tax_excluded': res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2), tax_obj.compute_inv(cr, uid, line.product_id.taxes_id, line.price_unit * \ (1-(line.discount or 0.0)/100.0), line.qty), res[order.id]['amount_tax']) else: res[order.id]['amount_tax'] = tax_obj.compute_all(cr, uid, line.product_id.taxes_id, line.price_unit * \ (1-(line.discount or 0.0)/100.0), line.qty)['total_included'] return res | 263091c0e454f4de86de49310a8b50d565969fc7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/263091c0e454f4de86de49310a8b50d565969fc7/pos.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8949,
67,
454,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
33,
7036,
4672,
5320,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
8066,
6134,
400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8949,
67,
454,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
33,
7036,
4672,
5320,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
8066,
6134,
400,
... |
for i in range(1,int(options["-F"])): | for i in range(1,1 + int(options["-F"])): | def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list = None): result = 0 ## Process options that manipulate fencing device ##### if (options["-o"] == "list") and (0 == options["device_opt"].count("port")) and (0 == options["device_opt"].count("partition")): print "N/A" return elif (options["-o"] == "list" and get_outlet_list == None): ## @todo: exception? ## This is just temporal solution, we will remove default value ## None as soon as all existing agent will support this operation print "NOTICE: List option is not working on this device yet" return elif (options["-o"] == "list") or ((options["-o"] == "monitor") and 1 == options["device_opt"].count("port")): outlets = get_outlet_list(tn, options) ## keys can be numbers (port numbers) or strings (names of VM) for o in outlets.keys(): (alias, status) = outlets[o] if options["-o"] != "monitor": print o + options["-C"] + alias return status = get_power_fn(tn, options) if status != "on" and status != "off": fail(EC_STATUS) if options["-o"] == "enable": options["-o"] = "on" if options["-o"] == "disable": options["-o"] = "off" if options["-o"] == "on": if status == "on": print "Success: Already ON" else: power_on = False for i in range(1,int(options["-F"])): set_power_fn(tn, options) time.sleep(int(options["-G"])) if wait_power_status(tn, options, get_power_fn): power_on = True break if power_on: print "Success: Powered ON" else: fail(EC_WAITING_ON) elif options["-o"] == "off": if status == "off": print "Success: Already OFF" else: set_power_fn(tn, options) time.sleep(int(options["-G"])) if wait_power_status(tn, options, get_power_fn): print "Success: Powered OFF" else: fail(EC_WAITING_OFF) elif options["-o"] == "reboot": if status != "off": options["-o"] = "off" set_power_fn(tn, options) time.sleep(int(options["-G"])) if wait_power_status(tn, options, get_power_fn) == 0: fail(EC_WAITING_OFF) options["-o"] = "on" power_on = False for i in range(1,int(options["-F"])): set_power_fn(tn, options) time.sleep(int(options["-G"])) if wait_power_status(tn, options, get_power_fn) == 1: power_on = True break if power_on == False: # this should not fail as not was fenced succesfully sys.stderr.write('Timed out waiting to power ON\n') print "Success: Rebooted" elif options["-o"] == "status": print "Status: " + status.upper() if status.upper() == "OFF": result = 2 elif options["-o"] == "monitor": 1 return result | 5215e29266b95f1492428b296e7232c7afe1237a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6868/5215e29266b95f1492428b296e7232c7afe1237a/fencing.py.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
802,
67,
1128,
12,
5088,
16,
702,
16,
444,
67,
12238,
67,
4293,
16,
336,
67,
12238,
67,
4293,
16,
336,
67,
659,
1810,
67,
1098,
273,
599,
4672,
563,
273,
374,
225,
7541,
4389,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
284,
802,
67,
1128,
12,
5088,
16,
702,
16,
444,
67,
12238,
67,
4293,
16,
336,
67,
12238,
67,
4293,
16,
336,
67,
659,
1810,
67,
1098,
273,
599,
4672,
563,
273,
374,
225,
7541,
4389,
... |
msg['From'] = mail_from msg['To'] = mail_from | sitename = Header(request.cfg.sitename.encode(config.charset), charset) address = '"%s" <%s>' % (sitename, mail_from) msg['From'] = address msg['To'] = address | def sendmail(request, to, subject, text, **kw): """ Create and send a text/plain message Return a tuple of success or error indicator and message. @param request: the request object @param to: recipients (list) @param subject: subject of email (unicode) @param text: email body text (unicode) @keyword mail_from: override default mail_from (string) @rtype: tuple @return: (is_ok, Description of error or OK message) """ import smtplib, socket from email.Message import Message from email.Charset import Charset, QP from email.Utils import formatdate, make_msgid from email.Header import Header from MoinMoin import config _ = request.getText cfg = request.cfg mail_from = kw.get('mail_from', '') or cfg.mail_from subject = subject.encode(config.charset) # Create a text/plain body using CRLF (see RFC2822) text = text.replace(u'\n', u'\r\n') text = text.encode(config.charset) # Create a message using config.charset and quoted printable # encoding, which should be supported better by mail clients. # TODO: check if its really works better for major mail clients msg = Message() charset = Charset(config.charset) charset.header_encoding = QP charset.body_encoding = QP msg.set_charset(charset) msg.set_payload(text) # Create message headers # Don't expose emails addreses of the other subscribers, instead we # use the same mail_from, e.g. "My Wiki <noreply@mywiki.org>" msg['From'] = mail_from msg['To'] = mail_from msg['Date'] = formatdate() msg['Message-ID'] = make_msgid() msg['Subject'] = Header(subject, charset) if cfg.mail_sendmail: # Set the BCC. This will be stripped later by sendmail. msg['BCC'] = ','.join(to) # Set Return-Path so that it isn't set (generally incorrectly) for us. msg['Return-Path'] = mail_from # Send the message if not cfg.mail_sendmail: try: server = smtplib.SMTP(cfg.mail_smarthost) try: #server.set_debuglevel(1) if cfg.mail_login: user, pwd = cfg.mail_login.split() try: # try to do tls server.ehlo() if server.has_extn('starttls'): server.starttls() server.ehlo() except: pass server.login(user, pwd) server.sendmail(mail_from, to, msg.as_string()) finally: try: server.quit() except AttributeError: # in case the connection failed, SMTP has no "sock" attribute pass except smtplib.SMTPException, e: return (0, str(e)) except (os.error, socket.error), e: return (0, _("Connection to mailserver '%(server)s' failed: %(reason)s") % { 'server': cfg.mail_smarthost, 'reason': str(e) }) else: try: sendmailp = os.popen(cfg.mail_sendmail, "w") # msg contains everything we need, so this is a simple write sendmailp.write(msg.as_string()) sendmail_status = sendmailp.close() if sendmail_status: return (0, str(sendmail_status)) except: return (0, _("Mail not sent")) return (1, _("Mail sent OK")) | 04634bd4cd270d4e8807bc6270a724de54f39780 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/04634bd4cd270d4e8807bc6270a724de54f39780/mail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
4408,
12,
2293,
16,
358,
16,
3221,
16,
977,
16,
2826,
9987,
4672,
3536,
1788,
471,
1366,
279,
977,
19,
7446,
883,
225,
2000,
279,
3193,
434,
2216,
578,
555,
10664,
471,
883,
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,
1366,
4408,
12,
2293,
16,
358,
16,
3221,
16,
977,
16,
2826,
9987,
4672,
3536,
1788,
471,
1366,
279,
977,
19,
7446,
883,
225,
2000,
279,
3193,
434,
2216,
578,
555,
10664,
471,
883,
18,
... |
[5^-1 + O(5^4) O(5^3)] [ O(5^4) 5^-1 + O(5^4)] | [5^-1 + O(5^4) O(5^4)] [ O(5^5) 5^-1 + O(5^4)] | def frobenius(self, prec=20, method = "mw"): r""" This returns a geometric Frobenius $\varphi$ on the Diedonne module $D_p(E)$ with respect to the basis $\omega$, the invariant differential and $\eta=x\omega$. It satisfies $phi^2 - a_p/p*phi + 1/p = 0$. INPUT: prec -- (default: 20) a positive integer method -- either "mw" (default) for Monsky-Washintzer or "approx" for the method describedby Bernardi and Perrin-Riou (much slower) | dbabbeedd0a034b31e8dac51322297e50a27bd25 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/dbabbeedd0a034b31e8dac51322297e50a27bd25/padic_lseries.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
303,
19425,
8384,
12,
2890,
16,
13382,
33,
3462,
16,
707,
273,
315,
81,
91,
6,
4672,
436,
8395,
1220,
1135,
279,
7364,
1591,
478,
303,
19425,
8384,
271,
64,
1401,
9973,
8,
603,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
284,
303,
19425,
8384,
12,
2890,
16,
13382,
33,
3462,
16,
707,
273,
315,
81,
91,
6,
4672,
436,
8395,
1220,
1135,
279,
7364,
1591,
478,
303,
19425,
8384,
271,
64,
1401,
9973,
8,
603,
... |
def stopAutoScrollTimer(self): | def _stopAutoScrollTimer(self): | def stopAutoScrollTimer(self): """Clean up the timer resources. """ self._auto_scroll_timer = None self._auto_scroll = 0 | 6bc6bef6fcfe26aa923224e536d4db13def8c29a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/6bc6bef6fcfe26aa923224e536d4db13def8c29a/dropscroller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5681,
4965,
6806,
6777,
12,
2890,
4672,
3536,
7605,
731,
326,
5441,
2703,
18,
3536,
365,
6315,
6079,
67,
12033,
67,
12542,
273,
599,
365,
6315,
6079,
67,
12033,
273,
374,
2,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5681,
4965,
6806,
6777,
12,
2890,
4672,
3536,
7605,
731,
326,
5441,
2703,
18,
3536,
365,
6315,
6079,
67,
12033,
67,
12542,
273,
599,
365,
6315,
6079,
67,
12033,
273,
374,
2,
-100,
... |
if sources is None or type (sources) is not ListType: | if sources is None or type (sources) not in (ListType, TupleType): | def build_extensions (self, extensions): | 41c5f9a9f05ebf3531f5847a7df35187fd97909f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/41c5f9a9f05ebf3531f5847a7df35187fd97909f/build_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
9489,
261,
2890,
16,
4418,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
9489,
261,
2890,
16,
4418,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
new = data.get(field[0], '') new = new and new.encode('utf-8') or '' old = getattr(self.context, field[0], '') old = old and old.encode('utf-8') or '' if ((field[0] not in skip) and old != new): alteredFields.append(field[0]) oldNew = '%s,%s' % (b64encode(old), b64encode(new)) self.auditer.info(CHANGE_PROFILE, field[0], oldNew) | fieldId = field[0] if fieldId not in skip: new = data.get(fieldId, '') old = getattr(self.context, fieldId, '') if (old != new): new = unicode(new).encode('utf-8') old = unicode(old).encode('utf-8') alteredFields.append(fieldId) oldNew = '%s,%s' % (b64encode(old), b64encode(new)) self.auditer.info(CHANGE_PROFILE, fieldId, oldNew) | def audit_and_get_changed(self, data, skip = []): fields = [field for field in getFieldsInOrder(self.interface) if not field[1].readonly] # --=mpj17=-- There *must* be a better way to skip the joinable # groups data, and still get a list of altered fields in a sane # order, but I am far too tired to figure it out alteredFields = [] for field in fields: new = data.get(field[0], '') new = new and new.encode('utf-8') or '' old = getattr(self.context, field[0], '') old = old and old.encode('utf-8') or '' if ((field[0] not in skip) and old != new): alteredFields.append(field[0]) oldNew = '%s,%s' % (b64encode(old), b64encode(new)) self.auditer.info(CHANGE_PROFILE, field[0], oldNew) return alteredFields | 3b878b790d3441ad053d77f9bdd2cbffe8f40e81 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6273/3b878b790d3441ad053d77f9bdd2cbffe8f40e81/edit_profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8215,
67,
464,
67,
588,
67,
6703,
12,
2890,
16,
501,
16,
2488,
273,
5378,
4672,
1466,
273,
306,
1518,
364,
652,
316,
12612,
382,
2448,
12,
2890,
18,
5831,
13,
309,
486,
652,
63,
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,
8215,
67,
464,
67,
588,
67,
6703,
12,
2890,
16,
501,
16,
2488,
273,
5378,
4672,
1466,
273,
306,
1518,
364,
652,
316,
12612,
382,
2448,
12,
2890,
18,
5831,
13,
309,
486,
652,
63,
21,
... |
); | ) | def make_result_pages( test_results_file , expected_results_file , failures_markup_file , source , run_date , comment_file , results_dir , result_prefix , xslt_proc_name , reports ): log( 'Producing the reports...' ) __log__ = 1 output_dir = os.path.join( results_dir, result_prefix ) if not os.path.exists( output_dir ): os.makedirs( output_dir ) xslt_proc = registered_xsltprocs[ xslt_proc_name ] if comment_file != '': comment_file = os.path.abspath( comment_file ) if expected_results_file != '': expected_results_file = os.path.abspath( expected_results_file ) else: expected_results_file = os.path.abspath( map_path( 'empty_expected_results.xml' ) ) extended_test_results = os.path.join( output_dir, 'extended_test_results.xml' ) if 'x' in reports: log( ' Merging with expected results...' ) xslt_proc( test_results_file , xsl_path( 'add_expected_results.xsl' ) , extended_test_results , { 'expected_results_file': expected_results_file, 'failures_markup_file' : failures_markup_file } ) links = os.path.join( output_dir, 'links.html' ) makedirs( os.path.join( output_dir, 'output' ) ) for mode in ( 'developer', 'user' ): makedirs( os.path.join( output_dir, mode , 'output' ) ) if 'l' in reports: log( ' Making test output files...' ) xslt_proc( extended_test_results , xsl_path( 'links_page.xsl' ) , links , { 'source': source , 'run_date': run_date , 'comment_file': comment_file , 'explicit_markup_file' : failures_markup_file } ) issues = os.path.join( output_dir, 'developer', 'issues.html' ) if 'i' in reports: log( ' Making issues list...' ) xslt_proc( extended_test_results , xsl_path( 'issues_page.xsl' ) , issues , { 'source': source , 'run_date': run_date , 'comment_file': comment_file , 'explicit_markup_file' : failures_markup_file } ) for mode in ( 'developer', 'user' ): if mode[0] + 'd' in reports: log( ' Making detailed %s report...' % mode ) xslt_proc( extended_test_results , xsl_path( 'result_page.xsl' ) , os.path.join( output_dir, mode, 'index.html' ) , { 'links_file': 'links.html' , 'mode': mode , 'source': source , 'run_date': run_date , 'comment_file': comment_file , 'expected_results_file': expected_results_file , 'explicit_markup_file' : failures_markup_file } ); for mode in ( 'developer', 'user' ): if mode[0] + 's' in reports: log( ' Making summary %s report...' % mode ) xslt_proc( extended_test_results , xsl_path( 'summary_page.xsl' ) , os.path.join( output_dir, mode, 'summary.html' ) , { 'mode' : mode , 'source': source , 'run_date': run_date , 'comment_file': comment_file , 'explicit_markup_file' : failures_markup_file } ); if 'e' in reports: log( ' Generating expected_results ...' ) xslt_proc( extended_test_results , xsl_path( 'produce_expected_results.xsl' ) , os.path.join( output_dir, 'expected_results.xml' ) ) shutil.copyfile( xsl_path( 'html/master.css' ) , os.path.join( output_dir, 'master.css' ) ) | cf2264e37bfb31b43677661cffb3f09ce3b76bfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7959/cf2264e37bfb31b43677661cffb3f09ce3b76bfb/report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2088,
67,
7267,
12,
1842,
67,
4717,
67,
768,
269,
2665,
67,
4717,
67,
768,
269,
11720,
67,
15056,
67,
768,
269,
1084,
269,
1086,
67,
712,
269,
2879,
67,
768,
269,
1686,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2088,
67,
7267,
12,
1842,
67,
4717,
67,
768,
269,
2665,
67,
4717,
67,
768,
269,
11720,
67,
15056,
67,
768,
269,
1084,
269,
1086,
67,
712,
269,
2879,
67,
768,
269,
1686,
67,... |
""" invs = self.invariants() if invs == []: return True dups = 0 for x in invs: if invs.count(x)>1 and x!=1: dups = 1 if dups == 1: return False else: return True | sage: T = AbelianGroup(1,[0]); T Multiplicative Abelian Group isomorphic to Z sage: T.is_cyclic() True """ edivs = self.elementary_divisors() if 1 in edivs: edivs.remove(1) return len(edivs) <= 1 | def is_cyclic(self): """ Return True if the group is a cyclic group. | 7f9e46c94e111143ed675289ff8b7d48084b7142 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/7f9e46c94e111143ed675289ff8b7d48084b7142/abelian_group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2431,
18964,
12,
2890,
4672,
3536,
2000,
1053,
309,
326,
1041,
353,
279,
30383,
1041,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2431,
18964,
12,
2890,
4672,
3536,
2000,
1053,
309,
326,
1041,
353,
279,
30383,
1041,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
twisted.names.dns.DNSDatagramProtocol.writeMessage = writeMessage | from twisted.internet.error import CannotListenError f2 = twisted.names.dns.DNSDatagramProtocol.startListening def startListening(*args): for i in range(10): try: return f2(*args) except CannotListenError: pass raise AssertionError("DNS isn't happy :-(") twisted.names.dns.DNSDatagramProtocol.startListening = startListening | def writeMessage(*args): try: f(*args) except socket.error: pass | f83b65cfa4a934e036681872954b2f1cee97805a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12372/f83b65cfa4a934e036681872954b2f1cee97805a/dtella_fixtwisted.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
1079,
30857,
1968,
4672,
775,
30,
284,
30857,
1968,
13,
1335,
2987,
18,
1636,
30,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
1079,
30857,
1968,
4672,
775,
30,
284,
30857,
1968,
13,
1335,
2987,
18,
1636,
30,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return (None, "Warning", "An error has occured") | return (None, "Warning, An error has occured (4)", "") | def find_similar(rank_method_code, recID, hitset, rank_limit_relevance=10,verbose=0): """Finding terms to use for calculating similarity. Terms are taken from the recid given, returns a list of recids's and relevance, [[23,34], [344,24], [1,01]] recID - record to use for find similar rank_limit_relevance - find all similar document above given percentage (0-100) verbose - how much debug information to show, 0-9""" startCreate = time.time() if methods[rank_method_code]["override_default_min_relevance"] == "no": rank_limit_relevance = methods[rank_method_code]["default_min_relevance"] query_terms = {} recID = int(recID) if type(recID) != int: return (None, "Warning", "An error has occured") res = run_sql("SELECT id_bibrec, termlist FROM %sR WHERE id_bibrec=%s" % (rnkWORD_table[:-1], recID)) if not res: return (None, "Warning", "An error has occured") rec_terms = deserialize_via_marshal(res[0][1]) #Get all documents using terms from the selected documents if len(rec_terms) > 0: terms = "%s" % dict(rec_terms).keys() terms = terms[1:len(terms) - 1] terms_recs = dict(run_sql("SELECT term, hitlist FROM %s WHERE term IN (%s)" % (rnkWORD_table,terms))) else: return (None, "Warning", "An error has occured") #Calculate all terms for (term, tf) in rec_terms.iteritems(): if len(term) >= methods[rank_method_code]["min_word_length"] and terms_recs.has_key(term): query_terms[term] = (1 + math.log(tf[0])) * tf[1] query_terms_old = query_terms.items() query_terms_old.sort(lambda x, y: cmp(y[1], x[1])) query_terms = {} stime = time.time() (recdict, rec_termcount, lrecIDs_remove) = ({}, {}, {}) #Use only most important terms for (term, tf) in query_terms_old: term_recs = deserialize_via_marshal(terms_recs[term]) if len(query_terms_old) <= methods[rank_method_code]["max_nr_words_lower"] or (len(term_recs) >= methods[rank_method_code]["min_nr_words_docs"] and (((float(len(term_recs)) / float(col_size)) <= methods[rank_method_code]["max_word_occurence"]) and ((float(len(term_recs)) / float(col_size)) >= methods[rank_method_code]["min_word_occurence"]))): query_terms[term] = round(tf, 4) (recdict, rec_termcount, lrecIDs_remove) = calculate_record_relevance((term, query_terms[term]) , term_recs, None, recdict, rec_termcount, lrecIDs_remove, verbose, "yes") if len(query_terms_old) > methods[rank_method_code]["max_nr_words_lower"] and (len(query_terms) == methods[rank_method_code]["max_nr_words_upper"] or tf < 0): break if len(recdict) <= 2: #not enough terms to get a good result return (None, "Warning", "An error has occured") if verbose > 0: print "Number of terms: %s" % run_sql("SELECT count(id) FROM %s" % rnkWORD_table)[0][0] print "Number of terms to use for query: %s" % (len(query_terms)) print "Current number of recIDs: %s" % (col_size) print "Terms to use: %s" % query_terms print "Prepare time: %s" % (str(time.time() - startCreate)) recdict = post_calculate_record_relevance(recdict, rec_termcount, lrecIDs_remove, hitset, verbose) reclist = sort_record_relevance(recdict, rank_limit_relevance,recID, verbose) i = 0 if len(reclist) > 30: w = reclist[len(reclist) - 2][1] / 5 i = len(reclist) - 1 while reclist[i][1] > w and i > 0: i -= 1 #if len(reclist) - 30 < i: # i = len(reclist) - 30 if verbose == 9: output = stat(reclist, query_terms) for line in output: print line return (reclist[i:len(reclist)], "(", "%)") | a64816463e34712d08cf3695af0b51074d6fda12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/a64816463e34712d08cf3695af0b51074d6fda12/bibrank_record_sorter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
22985,
12,
11500,
67,
2039,
67,
710,
16,
1950,
734,
16,
6800,
542,
16,
6171,
67,
3595,
67,
16599,
5882,
33,
2163,
16,
11369,
33,
20,
4672,
3536,
21358,
6548,
358,
999,
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,
1104,
67,
22985,
12,
11500,
67,
2039,
67,
710,
16,
1950,
734,
16,
6800,
542,
16,
6171,
67,
3595,
67,
16599,
5882,
33,
2163,
16,
11369,
33,
20,
4672,
3536,
21358,
6548,
358,
999,
364,
... |
timing_quality['median'] = timing_qualities[int(tq_length/2)] | timing_quality['median'] = timing_qualities[int(tq_length / 2)] | def getTimingQuality(self, filename, first_record = -1): """ Reads timing quality and returns a dictionary containing statistics about it. This method will read the timing quality in Blockette 1001 for each record in the file if available and return the following statistics: Minima, maxima, average, median and upper and lower quantile. This will only work correctly if all records in the file have the same record length. @param filename: Mini-SEED file to be parsed. @param first_record: Determines the auto-detection of the record lengths in the file. If 0 only the length of the first record is detected automatically. All subsequent records are then assumed to have the same record length. If -1 the length of each record is automatically detected. Defaults to -1. """ # Get some information about the file. fileinfo = self._getMSFileInfo(filename) # init MSRecord structure clibmseed.msr_init.restype = C.POINTER(MSRecord) msr = clibmseed.msr_init(None) # defines return type clibmseed.ms_readmsr_r.restype = C.c_int # Init MSFileParam struct. FileParam = C.pointer(MSFileParam()) # Open file. ff = open(filename, 'rb') # Convert to filepointer fpp = self._convertToCFilePointer(ff) # Populate FileParam structure. FP_chain = FileParam.contents FP_chain.fp = fpp FP_chain.filepos = 0 FP_chain.filename= filename FP_chain.rawrec = None FP_chain.readlen = 256 FP_chain.autodet = 1 FP_chain.packtype = 0 FP_chain.packhdroffset = 0 FP_chain.recordcount = 0 # Create Timing Quality list. timing_qualities = [] # Loop over each record for _i in xrange(fileinfo['number_of_records']): # Loop over every record. clibmseed.ms_readmsr_r(C.pointer(FileParam), C.pointer(msr), str(filename), C.c_int(first_record), None, None, C.c_short(1), C.c_short(0), C.c_short(0)) # Enclose in try-except block because not all records need to # have Blockette 1001. try: # Append timing quality to list. timing_qualities.append(\ msr.contents.Blkt1001.contents.timing_qual) except: pass # Clean up and close file. del msr del fpp del FileParam ff.close() # Create new dictionary. timing_quality = {} # Length of the list. tq_length = len(timing_qualities) # If no data was collected just return an empty list. if tq_length == 0: return timing_quality # Add minima and maxima to the dictionary. timing_quality['min'] = min(timing_qualities) timing_quality['max'] = max(timing_qualities) # Add average value timing_quality['average'] = sum(timing_qualities)/tq_length # Sort the list for further calculations. timing_qualities.sort() # Calculate the median of the list. tq_modulo = tq_length%2 # Check for even or uneven. if tq_modulo == 0: timing_quality['median'] = (timing_qualities[tq_length/2] + \ timing_qualities[tq_length/2] + 1) / 2 else: timing_quality['median'] = timing_qualities[int(tq_length/2)] # Calculate upper and lower 25%-quantile. timing_quality['lower_quantile'] = \ timing_qualities[int(tq_length * 0.25)-1] timing_quality['upper_quantile'] = \ timing_qualities[int(tq_length * 0.75)] return timing_quality | da81b4ce7064a28a168b56663efe435b307a52d4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/da81b4ce7064a28a168b56663efe435b307a52d4/libmseed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3181,
381,
310,
14846,
12,
2890,
16,
1544,
16,
1122,
67,
3366,
273,
300,
21,
4672,
3536,
29185,
15538,
9312,
471,
1135,
279,
3880,
4191,
7691,
2973,
518,
18,
225,
1220,
707,
903,
855,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3181,
381,
310,
14846,
12,
2890,
16,
1544,
16,
1122,
67,
3366,
273,
300,
21,
4672,
3536,
29185,
15538,
9312,
471,
1135,
279,
3880,
4191,
7691,
2973,
518,
18,
225,
1220,
707,
903,
855,
... |
'WHERE partner_id IN (' + self.partner_ids + ') ' \ 'AND account_id IN (' + self.account_ids + ') ' \ | 'WHERE ' 'account_id IN (' + self.account_ids + ') ' \ "AND partner_id is not null " \ | def _sum_credit(self): if not self.ids: return 0.0 account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') line_query = account_move_line_obj._query_get(self.cr, self.uid, obj='account_move_line', context={'fiscalyear': self.datas['form']['fiscalyear']}) self.cr.execute( 'SELECT sum(credit) ' \ 'FROM account_move_line ' \ 'WHERE partner_id IN (' + self.partner_ids + ') ' \ 'AND account_id IN (' + self.account_ids + ') ' \ 'AND date >= %s ' \ 'AND date <= %s ' \ 'AND ' + line_query, (self.datas['form']['date1'], self.datas['form']['date2'])) return self.cr.fetchone()[0] or 0.0 | 3037c6957360ef3618c6e04e4548ebf132e4ab75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/3037c6957360ef3618c6e04e4548ebf132e4ab75/partner_balance.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1364,
67,
20688,
12,
2890,
4672,
309,
486,
365,
18,
2232,
30,
327,
374,
18,
20,
2236,
67,
8501,
67,
1369,
67,
2603,
273,
2845,
264,
18,
588,
67,
6011,
12,
2890,
18,
3353,
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,
389,
1364,
67,
20688,
12,
2890,
4672,
309,
486,
365,
18,
2232,
30,
327,
374,
18,
20,
2236,
67,
8501,
67,
1369,
67,
2603,
273,
2845,
264,
18,
588,
67,
6011,
12,
2890,
18,
3353,
18,
... |
detected_language = json['responseData']['detectedSourceLanguage'] | detected_language = json['responseData']['detectedSourceLanguage'].encode('utf-8') translation = json['responseData']['translatedText'].encode('utf-8') | def translate(self, irc, msg, args, fromLang, toLang, text): """<from-language> [to] <to-language> <text> | f4d47876d490238a963cdb055831f4bf2f557427 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12790/f4d47876d490238a963cdb055831f4bf2f557427/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4204,
12,
2890,
16,
277,
1310,
16,
1234,
16,
833,
16,
628,
7275,
16,
358,
7275,
16,
977,
4672,
3536,
32,
2080,
17,
4923,
34,
306,
869,
65,
411,
869,
17,
4923,
34,
411,
955,
34,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4204,
12,
2890,
16,
277,
1310,
16,
1234,
16,
833,
16,
628,
7275,
16,
358,
7275,
16,
977,
4672,
3536,
32,
2080,
17,
4923,
34,
306,
869,
65,
411,
869,
17,
4923,
34,
411,
955,
34,
2,
... |
cl.set(nodeid, **props) | try: cl.set(nodeid, **props) except (TypeError, IndexError, ValueError), message: raise MailUsageError, ''' There was a problem with the message you sent: %s '''%message | def handle_message(self, message): ''' message - a Message instance | 6a85324b49eb1a241ffbd156440061d3a46361dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6a85324b49eb1a241ffbd156440061d3a46361dd/mailgw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2150,
12,
2890,
16,
883,
4672,
9163,
883,
300,
279,
2350,
791,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2150,
12,
2890,
16,
883,
4672,
9163,
883,
300,
279,
2350,
791,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
req = Mock(Request, method='POST', path_info='/build', | req = Mock(Request, method='POST', cgi_location='', path_info='/build', | def redirect(url): redirected_to.append(url) raise RequestDone | 31d623021a4051055a44ec529f842c01a8d178ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4547/31d623021a4051055a44ec529f842c01a8d178ba/web_ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3136,
12,
718,
4672,
21808,
67,
869,
18,
6923,
12,
718,
13,
1002,
1567,
7387,
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,
3136,
12,
718,
4672,
21808,
67,
869,
18,
6923,
12,
718,
13,
1002,
1567,
7387,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
import sys | def _is_win7(): import sys return sys.getwindowsversion()[0] == 6 | e474f441b10a13d9a67358685e0a01f8158c57a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/215/e474f441b10a13d9a67358685e0a01f8158c57a7/driver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
291,
67,
8082,
27,
13332,
327,
2589,
18,
588,
13226,
1589,
1435,
63,
20,
65,
422,
1666,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
291,
67,
8082,
27,
13332,
327,
2589,
18,
588,
13226,
1589,
1435,
63,
20,
65,
422,
1666,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
res = [ self.id_get(cr, 'ir.ui.menu', rec.get('id','')) ] | res = [ self.id_get(cr, rec.get('id','')) ] | def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.get("id",'').encode('ascii') self._test_xml_id(rec_id) m_l = map(escape, escape_re.split(rec.get("name",'').encode('utf8'))) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2692,
67,
5414,
1726,
12,
2890,
16,
4422,
16,
1950,
16,
501,
67,
2159,
33,
7036,
4672,
1950,
67,
350,
273,
1950,
18,
588,
2932,
350,
3113,
6309,
2934,
3015,
2668,
9184,
6134,
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,
389,
2692,
67,
5414,
1726,
12,
2890,
16,
4422,
16,
1950,
16,
501,
67,
2159,
33,
7036,
4672,
1950,
67,
350,
273,
1950,
18,
588,
2932,
350,
3113,
6309,
2934,
3015,
2668,
9184,
6134,
365,... |
def __getFileReplicas(self,lfn,allStatus): fullLfn = '%s%s' % (self.prefix,lfn) value,replicaObjects = lfc.lfc_getreplica(fullLfn,'','') | def __getFileReplicas( self, lfn, allStatus ): fullLfn = '%s%s' % ( self.prefix, lfn ) value, replicaObjects = lfc.lfc_getreplica( fullLfn, '', '' ) | def __getFileReplicas(self,lfn,allStatus): fullLfn = '%s%s' % (self.prefix,lfn) value,replicaObjects = lfc.lfc_getreplica(fullLfn,'','') if value != 0: return S_ERROR(lfc.sstrerror(lfc.cvar.serrno)) replicas = {} if not replicaObjects: return S_ERROR('File has zero replicas') for replica in replicaObjects: status = replica.status if (status != 'P') or allStatus: se = replica.host pfn = replica.sfn#.strip() replicas[se] = pfn return S_OK(replicas) | 6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
29925,
17248,
12,
365,
16,
328,
4293,
16,
777,
1482,
262,
30,
1983,
48,
4293,
273,
1995,
87,
9,
87,
11,
738,
261,
365,
18,
3239,
16,
328,
4293,
262,
460,
16,
12335,
4710,
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,
1001,
29925,
17248,
12,
365,
16,
328,
4293,
16,
777,
1482,
262,
30,
1983,
48,
4293,
273,
1995,
87,
9,
87,
11,
738,
261,
365,
18,
3239,
16,
328,
4293,
262,
460,
16,
12335,
4710,
273,
... |
self.last_input = since | self.last_input = last_input | def __init__(self, value='active', id=None, last_input=None, idle_threshold=None): self.id = id self.last_input = since self.idle_threshold = idle_threshold XMLStringElement.__init__(self, value) | 5e3a44df753a8a7fb928e4a996d42e9dda928b88 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/5e3a44df753a8a7fb928e4a996d42e9dda928b88/rpid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
460,
2218,
3535,
2187,
612,
33,
7036,
16,
1142,
67,
2630,
33,
7036,
16,
12088,
67,
8699,
33,
7036,
4672,
365,
18,
350,
273,
612,
365,
18,
2722,
67,
263... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
460,
2218,
3535,
2187,
612,
33,
7036,
16,
1142,
67,
2630,
33,
7036,
16,
12088,
67,
8699,
33,
7036,
4672,
365,
18,
350,
273,
612,
365,
18,
2722,
67,
263... |
if inds[i] < shape[i] - 1: | if inds[i] < offset[i] + shape[i] - 1: | def roll_inds(self, inds, shape, offset): """Return the next set of indices within an array of given shape""" i = len(shape) - 1 if len(inds) == 0: inds.extend(offset) return sum(shape) != 0 while (i >= 0): if inds[i] < shape[i] - 1: inds[i] += 1 return True elif i == 0: return False else: inds[i] = offset[i] i -= 1 return False | 5f4272a6cfbeb21200cab955e5de6fc293c60de8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1904/5f4272a6cfbeb21200cab955e5de6fc293c60de8/test_mdt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5824,
67,
15882,
12,
2890,
16,
19173,
16,
2179,
16,
1384,
4672,
3536,
990,
326,
1024,
444,
434,
4295,
3470,
392,
526,
434,
864,
2179,
8395,
277,
273,
562,
12,
4867,
13,
300,
404,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5824,
67,
15882,
12,
2890,
16,
19173,
16,
2179,
16,
1384,
4672,
3536,
990,
326,
1024,
444,
434,
4295,
3470,
392,
526,
434,
864,
2179,
8395,
277,
273,
562,
12,
4867,
13,
300,
404,
309,
... |
between "text" and "code" format | between "text" and "code" format | def convert(self, lines): """Iterate over lines of a program document and convert between "text" and "code" format """ | 6298e01579e8917b7d42c1bc1af5b0a3dda46ba8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2348/6298e01579e8917b7d42c1bc1af5b0a3dda46ba8/pylit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
12,
2890,
16,
2362,
4672,
3536,
14916,
1879,
2362,
434,
279,
5402,
1668,
471,
1765,
3086,
315,
955,
6,
471,
315,
710,
6,
740,
3536,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
12,
2890,
16,
2362,
4672,
3536,
14916,
1879,
2362,
434,
279,
5402,
1668,
471,
1765,
3086,
315,
955,
6,
471,
315,
710,
6,
740,
3536,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
r""" This function returns the $n$-th Powerful Number: A positive integer $n$ is powerful if for every prime $p$ dividing $n$, $p^2$ also divides $n$. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001694; a Powerful Numbers (also called squarefull, square-full or 2-full numbers). sage: a.offset 1 sage: a(1) 1 sage: a(4) 9 sage: a(100) 3136 sage: a(156) 7225 sage: a.list(19) [1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 72, 81, 100, 108, 121, 125, 128, 144] sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be a positive integer AUTHOR: -- Jaap Spies (2007-01-14) """ def __init__(self): | def __init__(self): r""" This function returns the $n$-th Powerful Number: A positive integer $n$ is powerful if for every prime $p$ dividing $n$, $p^2$ also divides $n$. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001694; a Powerful Numbers (also called squarefull, square-full or 2-full numbers). sage: a.offset 1 sage: a(1) 1 sage: a(4) 9 sage: a(100) 3136 sage: a(156) 7225 sage: a.list(19) [1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 72, 81, 100, 108, 121, 125, 128, 144] sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be a positive integer AUTHOR: -- Jaap Spies (2007-01-14) """ | def list(self, n): try: if len(self._b) < n: raise IndexError else: return self._b[:n] except (AttributeError, IndexError): self._precompute() # try again return self.list(n) | d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
290,
4672,
775,
30,
309,
562,
12,
2890,
6315,
70,
13,
411,
290,
30,
1002,
10195,
469,
30,
327,
365,
6315,
70,
10531,
82,
65,
1335,
261,
1499,
668,
16,
10195,
4672,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
290,
4672,
775,
30,
309,
562,
12,
2890,
6315,
70,
13,
411,
290,
30,
1002,
10195,
469,
30,
327,
365,
6315,
70,
10531,
82,
65,
1335,
261,
1499,
668,
16,
10195,
4672,... |
self.settings["CHOST"]="armv7l-softfloat-linux-gnueabi" self.settings["CFLAGS"]="-Os -march=armv7 -pipe" | self.settings["CHOST"]="armv7rl-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-r -mfpu=vfp -mfloat-abi=softfp" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7l-softfloat-linux-gnueabi" self.settings["CFLAGS"]="-Os -march=armv7 -pipe" | 53fab4b752e759327ccdfc975b482828b7745033 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7327/53fab4b752e759327ccdfc975b482828b7745033/arm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
81,
1900,
705,
4672,
5210,
67,
4610,
16186,
2738,
972,
12,
2890,
16,
81,
1900,
705,
13,
365,
18,
4272,
9614,
1792,
4005,
11929,
1546,
4610,
90,
27,
80,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
81,
1900,
705,
4672,
5210,
67,
4610,
16186,
2738,
972,
12,
2890,
16,
81,
1900,
705,
13,
365,
18,
4272,
9614,
1792,
4005,
11929,
1546,
4610,
90,
27,
80,
... |
if you want to deal with debug info, override this method. | if you want to deal with debug info, override this or use setDebugHandler, above. | def handleDebug(self,debugInfo): """Handle debug information. | 50041234714b6a450cad9505af382a7cfce3d0a8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/436/50041234714b6a450cad9505af382a7cfce3d0a8/protocol.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
2829,
12,
2890,
16,
4148,
966,
4672,
3536,
3259,
1198,
1779,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
2829,
12,
2890,
16,
4148,
966,
4672,
3536,
3259,
1198,
1779,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
c = Client("node_has_ip_address", [address]) self._ConnectNode(c, node) return c.GetResults().get(node, False) | return self._SingleNodeCall(node, "node_has_ip_address", [address]) | def call_node_has_ip_address(self, node, address): """Checks if a node has the given IP address. | 9a525d83b2a75f44cc1171e7d715b5bee7a76756 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/9a525d83b2a75f44cc1171e7d715b5bee7a76756/rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
2159,
67,
5332,
67,
625,
67,
2867,
12,
2890,
16,
756,
16,
1758,
4672,
3536,
4081,
309,
279,
756,
711,
326,
864,
2971,
1758,
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,
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,
745,
67,
2159,
67,
5332,
67,
625,
67,
2867,
12,
2890,
16,
756,
16,
1758,
4672,
3536,
4081,
309,
279,
756,
711,
326,
864,
2971,
1758,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print "Current dir = %s" % os.getcwd() | def package(dir, version): if not os.path.exists(dir): os.makedirs(dir) print "Current dir = %s" % os.getcwd() _substitute("src/plugins/coily-template", "src/plugins/coily", [("version", version)]) os.system("chmod 755 src/plugins/coily") build("src", version) build("samples", version) os.remove("src/plugins/coily") os.system("mv *.tar.gz %s" % dir) curdir = os.getcwd() os.chdir("src/plugins") for item in os.listdir("."): if item in ["coily-template", ".svn"]: continue t = tarfile.open("../../%s/springpython-plugin-%s.%s.tar.gz" % (dir, item, version), "w:gz") for path, dirs, files in os.walk(item): if ".svn" not in path: # Don't want to include version information t.add(path, recursive=False) [t.add(path + "/" + file, recursive=False) for file in files] t.close() os.chdir(curdir) | 133292868c28afe55322cc4da9bbb7e1726cb221 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7713/133292868c28afe55322cc4da9bbb7e1726cb221/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2181,
12,
1214,
16,
1177,
4672,
309,
486,
1140,
18,
803,
18,
1808,
12,
1214,
4672,
1140,
18,
81,
9477,
10539,
12,
1214,
13,
225,
389,
1717,
17207,
2932,
4816,
19,
8057,
19,
2894,
3220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2181,
12,
1214,
16,
1177,
4672,
309,
486,
1140,
18,
803,
18,
1808,
12,
1214,
4672,
1140,
18,
81,
9477,
10539,
12,
1214,
13,
225,
389,
1717,
17207,
2932,
4816,
19,
8057,
19,
2894,
3220,... | |
if self.when == 'MIDNIGHT' or self.when.startswith('W'): | if (self.when == 'MIDNIGHT' or self.when.startswith('W')) and not self.utc: | def doRollover(self): """ do a rollover; in this case, a date/time stamp is appended to the filename when the rollover happens. However, you want the file to be named for the start of the interval, not the current time. If there is a backup count, then we have to get a list of matching filenames, sort them and remove the one with the oldest suffix. """ self.stream.close() # get the time that this sequence started at and make it a TimeTuple t = self.rolloverAt - self.interval timeTuple = time.localtime(t) dfn = self.baseFilename + "." + time.strftime(self.suffix, timeTuple) if os.path.exists(dfn): os.remove(dfn) os.rename(self.baseFilename, dfn) if self.backupCount > 0: # find the oldest log file and delete it #s = glob.glob(self.baseFilename + ".20*") #if len(s) > self.backupCount: # s.sort() # os.remove(s[0]) for s in self.getFilesToDelete(): os.remove(s) #print "%s -> %s" % (self.baseFilename, dfn) self.mode = 'w' self.stream = self._open() newRolloverAt = self.rolloverAt + self.interval currentTime = int(time.time()) while newRolloverAt <= currentTime: newRolloverAt = newRolloverAt + self.interval #If DST changes and midnight or weekly rollover, adjust for this. if self.when == 'MIDNIGHT' or self.when.startswith('W'): dstNow = time.localtime(currentTime)[-1] dstAtRollover = time.localtime(newRolloverAt)[-1] if dstNow != dstAtRollover: if not dstNow: # DST kicks in before next rollover, so we need to deduct an hour newRolloverAt = newRolloverAt - 3600 else: # DST bows out before next rollover, so we need to add an hour newRolloverAt = newRolloverAt + 3600 self.rolloverAt = newRolloverAt | 1d9c60b8e89d2417c813b5b396f97ad431ecafa3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/1d9c60b8e89d2417c813b5b396f97ad431ecafa3/handlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
4984,
21896,
12,
2890,
4672,
3536,
741,
279,
10643,
21896,
31,
316,
333,
648,
16,
279,
1509,
19,
957,
14429,
353,
12317,
358,
326,
1544,
1347,
326,
10643,
21896,
10555,
18,
225,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
4984,
21896,
12,
2890,
4672,
3536,
741,
279,
10643,
21896,
31,
316,
333,
648,
16,
279,
1509,
19,
957,
14429,
353,
12317,
358,
326,
1544,
1347,
326,
10643,
21896,
10555,
18,
225,
107... |
self.muscle_aln = get_muscle_alignment(fasta, group_sequences) | self.muscle_aln = get_muscle_alignment(fasta) | def __init__ (self, pdb_sequences, pdb_names, pdb_offsets, reference_sequence=None, reference_sequence_name="sequence", reference_sequence_offset=0, reference_index=None, group_sequences=True) : adopt_init_args(self, locals()) n_models = len(pdb_sequences) assert ((n_models >= 1) and (n_models==len(pdb_names)==len(pdb_offsets))) use_pdb_sequence = False if (reference_sequence is not None) : assert (reference_index is None) else : use_pdb_sequence = True if (reference_index is None) : reference_index = 0 reference_sequence = pdb_sequences[reference_index] reference_sequence_name = pdb_names[reference_index] reference_sequence_offset = pdb_offsets[reference_index] fasta = "\n".join([ ">%s\n%s" % (n,s) for n,s in zip(pdb_names, pdb_sequences) ]) if (not use_pdb_sequence) : ref_seq_fasta = ">%s\n%s" % (reference_sequence_name, reference_sequence) fasta = ref_seq_fasta + "\n" + fasta self.muscle_aln = get_muscle_alignment(fasta, group_sequences) assert (self.muscle_aln is not None) self._lookup_table = {} i_ref = self.muscle_aln.names.index(reference_sequence_name) self._reference_alignment = self.muscle_aln.alignments[i_ref] assert (i_ref is not None) for i, name in enumerate(self.muscle_aln.names) : if (i == i_ref) : self._lookup_table[name] = None else : i_pdb = self.pdb_names.index(name) aln = self.muscle_aln.alignments[i] j = k = 0 new_resseqs = [] for res1, res2 in zip(aln, self._reference_alignment) : if (res2 != '-') : k += 1 if (res1 == '-') : continue else : if (res2 == '-') : new_resseqs.append(None) else : new_resseqs.append(k - reference_sequence_offset) j += 1 assert (j == len(new_resseqs)) self._lookup_table[name] = new_resseqs | 3eb3f6089b79fe2dd71e2e745cfad8867b0a321a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/3eb3f6089b79fe2dd71e2e745cfad8867b0a321a/msa.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
10892,
67,
17190,
16,
10892,
67,
1973,
16,
10892,
67,
16542,
16,
2114,
67,
6178,
33,
7036,
16,
2114,
67,
6178,
67,
529,
1546,
6178,
3113,
2114,
67,
6178... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
10892,
67,
17190,
16,
10892,
67,
1973,
16,
10892,
67,
16542,
16,
2114,
67,
6178,
33,
7036,
16,
2114,
67,
6178,
67,
529,
1546,
6178,
3113,
2114,
67,
6178... |
if _done.get(y, None) is x: self._inLoop[x] = 1 | beenHere = _done.get(y, None) if beenHere is x: self._inLoop[y] = 1 | def _breakloops(self, context): _done = {} for x in self._occurringAs[SUBJ]: if x in _done: continue if not (isinstance(x, AnonymousVariable) and not ((isinstance(x, Fragment) and x.generated()))): _done[x] = True continue _done[x] = x a = True y = x while a is not None: a = context._index.get((None, None, y), None) if a is None or len(a) == 0: a = None if a is not None: #print a y = a[0][SUBJ] if _done.get(y, None) is x: self._inLoop[x] = 1 a = None if not (isinstance(y, AnonymousVariable) and not ((isinstance(y, Fragment) and y.generated()))): _done[y] = True a = None else: _done[y] = x | eea6f1042934a950c6e3f3a54f8e80df3befe408 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/eea6f1042934a950c6e3f3a54f8e80df3befe408/pretty.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8820,
383,
4473,
12,
2890,
16,
819,
4672,
389,
8734,
273,
2618,
364,
619,
316,
365,
6315,
504,
21179,
1463,
63,
8362,
46,
14542,
309,
619,
316,
389,
8734,
30,
1324,
309,
486,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8820,
383,
4473,
12,
2890,
16,
819,
4672,
389,
8734,
273,
2618,
364,
619,
316,
365,
6315,
504,
21179,
1463,
63,
8362,
46,
14542,
309,
619,
316,
389,
8734,
30,
1324,
309,
486,
261,... |
fullname = os.path.join('data', name) | fullname = os.path.join(progInstallBase, 'data', name) | def play(self): pass | 4e3f9c96e03b33960522c9584c79871f5aeb9685 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4035/4e3f9c96e03b33960522c9584c79871f5aeb9685/bambam.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
12,
2890,
4672,
1342,
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,
6599,
12,
2890,
4672,
1342,
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,
-... |
def writer(): """loop forever and copy console->serial""" global connection try: while 1: s.write(connection.recv(1024)) except socket.error, msg: print msg | import sys, os, serial, threading, getopt, socket | def writer(): """loop forever and copy console->serial""" global connection try: while 1: s.write(connection.recv(1024)) except socket.error, msg: print msg | fb947cb47fa5d0c2e4f05e39bc7ef609059d9d72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2937/fb947cb47fa5d0c2e4f05e39bc7ef609059d9d72/tcp_serial_redirect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1930,
2589,
16,
1140,
16,
2734,
16,
17254,
16,
336,
3838,
16,
2987,
282,
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,
1930,
2589,
16,
1140,
16,
2734,
16,
17254,
16,
336,
3838,
16,
2987,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if re.search('stop_session\)\(', fo): buf += "void " + fabric_mod_name + "_stop_session(struct se_session *se_sess, int sess_sleep , int conn_sleep)\n" buf += "{\n" buf += " return;\n" buf += "}\n\n" bufi += "void " + fabric_mod_name + "_stop_session(struct se_session *, int, int);\n" if re.search('fall_back_to_erl0\)\(', fo): buf += "void " + fabric_mod_name + "_reset_nexus(struct se_session *se_sess)\n" buf += "{\n" buf += " return;\n" buf += "}\n\n" bufi += "void " + fabric_mod_name + "_reset_nexus(struct se_session *);\n" if re.search('sess_logged_in\)\(', fo): buf += "int " + fabric_mod_name + "_sess_logged_in(struct se_session *se_sess)\n" buf += "{\n" buf += " return 0;\n" buf += "}\n\n" bufi += "int " + fabric_mod_name + "_sess_logged_in(struct se_session *);\n" | def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name): buf = "" bufi = "" f = fabric_mod_dir_var + "/" + fabric_mod_name + "_fabric.c" print "Writing file: " + f p = open(f, 'w') if not p: tcm_mod_err("Unable to open file: " + f) fi = fabric_mod_dir_var + "/" + fabric_mod_name + "_fabric.h" print "Writing file: " + fi pi = open(fi, 'w') if not pi: tcm_mod_err("Unable to open file: " + fi) buf = "#include <linux/slab.h>\n" buf += "#include <linux/kthread.h>\n" buf += "#include <linux/types.h>\n" buf += "#include <linux/list.h>\n" buf += "#include <linux/types.h>\n" buf += "#include <linux/string.h>\n" buf += "#include <linux/ctype.h>\n" buf += "#include <asm/unaligned.h>\n" buf += "#include <scsi/scsi.h>\n" buf += "#include <scsi/scsi_host.h>\n" buf += "#include <scsi/scsi_device.h>\n" buf += "#include <scsi/scsi_cmnd.h>\n" buf += "#include <scsi/libfc.h>\n\n" buf += "#include <target/target_core_base.h>\n" buf += "#include <target/target_core_fabric.h>\n" buf += "#include <target/target_core_configfs.h>\n\n" buf += "#include \"" + fabric_mod_name + "_base.h\"\n" buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n" buf += "{\n" buf += " return 1;\n" buf += "}\n\n" bufi += "int " + fabric_mod_name + "_check_true(struct se_portal_group *);\n" buf += "int " + fabric_mod_name + "_check_false(struct se_portal_group *se_tpg)\n" buf += "{\n" buf += " return 0;\n" buf += "}\n\n" bufi += "int " + fabric_mod_name + "_check_false(struct se_portal_group *);\n" total_fabric_ops = len(fabric_ops) i = 0 while i < total_fabric_ops: fo = fabric_ops[i] i += 1 | 8b55836b9045a75a0b74cb25d8a39f3bc6e2ea50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/8b55836b9045a75a0b74cb25d8a39f3bc6e2ea50/tcm_mod_builder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1715,
81,
67,
1711,
67,
8481,
67,
23710,
67,
4473,
12,
9393,
67,
6392,
16,
21127,
67,
1711,
67,
1214,
67,
1401,
16,
21127,
67,
1711,
67,
529,
4672,
1681,
273,
1408,
1681,
77,
273,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1715,
81,
67,
1711,
67,
8481,
67,
23710,
67,
4473,
12,
9393,
67,
6392,
16,
21127,
67,
1711,
67,
1214,
67,
1401,
16,
21127,
67,
1711,
67,
529,
4672,
1681,
273,
1408,
1681,
77,
273,
14... | |
return [ (os.chmod, ('/path/to/foo', 1234)) ] | for change in changes: if change.OP == 'o': if (change.uid != 0 and change.uid in uidmap) or \ (change.gid != 0 and change.gid in gidmap): yield os.chown, (change.path, uidmap[change.uid], gidmap[change.gid]) elif change.OP == 's': if exists(change.path): st = os.lstat(change.path) if st.st_uid != uidmap[change.uid] or \ st.st_gid != gidmap[change.gid]: yield os.chown, (change.path, uidmap[change.uid], gidmap[change.gid]) if st.st_mode != change.mode: yield os.chmod, (change.path, change.mode) | def fixstat(changes, uidmap, gidmap): return [ (os.chmod, ('/path/to/foo', 1234)) ] | 067630b302b95c01c1ec298b5af3b8975494e224 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10616/067630b302b95c01c1ec298b5af3b8975494e224/cmd_fixstat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
5642,
12,
6329,
16,
4555,
1458,
16,
11399,
1458,
4672,
364,
2549,
316,
3478,
30,
309,
2549,
18,
3665,
422,
296,
83,
4278,
225,
309,
261,
3427,
18,
1911,
480,
374,
471,
2549,
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,
2917,
5642,
12,
6329,
16,
4555,
1458,
16,
11399,
1458,
4672,
364,
2549,
316,
3478,
30,
309,
2549,
18,
3665,
422,
296,
83,
4278,
225,
309,
261,
3427,
18,
1911,
480,
374,
471,
2549,
18,
... |
@property def border(self): return self._border | @apply def border(): def get(self): return self._border def set(self, border): if not isinstance(border, Border): raise TypeError if not self.can_have_shadow_border() and isinstance(border, BorderShadow): raise TypeError self._border = border self._notify_change() return property(get, set) | def border_always_visible(self): return self._border_always_visible | 81de20deaac2b084507ef02f4d0c7d8cef8d3dcf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3683/81de20deaac2b084507ef02f4d0c7d8cef8d3dcf/annotations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5795,
67,
17737,
67,
8613,
12,
2890,
4672,
327,
365,
6315,
8815,
67,
17737,
67,
8613,
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,... | [
1,
1,
1,
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,
5795,
67,
17737,
67,
8613,
12,
2890,
4672,
327,
365,
6315,
8815,
67,
17737,
67,
8613,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
""" | EXAMPLES: sage: M = ModularSymbols(37) sage: S = M.cuspidal_submodule() sage: M([0,oo]) -(1,0) sage: S([0,oo]) Traceback (most recent call last): ... TypeError: x does not coerce to an element of this Hecke module sage: S([-1/23,0]) (1,23) """ z = self.ambient_hecke_module()(x) | def __call__(self, x, check=False): """ Coerce x into the ambient module and checks that x is in this submodule. """ if check: y = self.__submodule(x) else: y = x return self.ambient_hecke_module()(y) | 0da0158b33fec244d2848981a7cd7a748c19f415 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/0da0158b33fec244d2848981a7cd7a748c19f415/submodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
866,
33,
8381,
4672,
225,
5675,
8900,
11386,
30,
272,
410,
30,
490,
273,
3431,
2490,
14821,
12,
6418,
13,
272,
410,
30,
348,
273,
490,
18,
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,
1001,
1991,
972,
12,
2890,
16,
619,
16,
866,
33,
8381,
4672,
225,
5675,
8900,
11386,
30,
272,
410,
30,
490,
273,
3431,
2490,
14821,
12,
6418,
13,
272,
410,
30,
348,
273,
490,
18,
71,... |
_KEYWORDS = ["del", "from", "lambda", "return", "and", "or", "is", "global", "not", "try", "break", "else", "if", "elif", "while", "class", "except", "import", "pass", "raise", "continue", "finally", "in", "print", "def", "for"] _KEYWORD = '|'.join([r'(\b%s\b)' % _KW for _KW in _KEYWORDS]) _STRING = '|'.join([r'("""("""|.*?((?!").)"""))', r'("("|.*?((?!").)"))', r"('''('''|.*?[^\\']'''))", r"('('|.*?[^\\']'))"]) _STRING = _STRING.replace('"', '"') _COMMENT = '( _PROMPT = r'(^\s*(>>>|\.\.\.)(\s|$))' _PROMPT_RE = re.compile(_PROMPT, re.MULTILINE | re.DOTALL) '''The regular expression used to find Python prompts (">>>" and "...") in doctest blocks.''' _DOCTEST_RE = re.compile('|'.join([_STRING, _COMMENT, _KEYWORD]), re.MULTILINE | re.DOTALL) '''The regular expression used by L{_doctest_sub} to colorize doctest blocks.''' del _KEYWORDS, _KEYWORD, _STRING, _COMMENT, _PROMPT, _KW def colorize_doctestblock(str): """ @return: The HTML code for a colorized version of a given doctest block. In particular, this identifies spans with the following css classes: - X{py-src}: The Python source code. - X{py-prompt}: The ">>>" and "..." prompts. - X{py-string}: Strings in the Python source code. - X{py-comment}: Comments in the Python source code. - X{py-keyword}: Keywords in the Python source code. - X{py-output}: Python's output (lines without a prompt). The string that is passed to colorize_doctest should already have HTML characters escaped (e.g., C{">"} should be encoded as C{">"}). @type str: C{string} @param str: The contents of the doctest block to be colorized. @rtype: C{string} """ pysrc = pyout = '' outstr = '' for line in str.split('\n')+['\n']: if _PROMPT_RE.match(line): if pyout: outstr += ('<span class="py-output">%s</span>\n\n' % pyout.strip()) pyout = '' pysrc += line+'\n' else: if pysrc: pysrc = _DOCTEST_RE.sub(_doctest_sub, pysrc) pysrc = _PROMPT_RE.sub(r'<span class="py-prompt">'+ r'\1</span>', pysrc) outstr += ('<span class="py-src">%s</span>\n' % pysrc.strip()) pysrc = '' pyout += line+'\n' if pyout.strip(): outstr += ('<span class="py-output">%s</span>\n' % pyout.strip()) return outstr.strip() def _doctest_sub(match): """ This helper function is used by L{colorize_doctestblock} to add colorization to matching expressions. It is called by C{_DOCTEST_RE.sub} with an expression that matches C{_DOCTEST_RE}. @return: The HTML code for the colorized expression. @rtype: C{string} @see: L{_DOCTEST_RE} """ str = match.group() if str[:1] == "'" or str[:6] == '"': return '<span class="py-string">%s</span>' % str elif str[:1] in ' return '<span class="py-comment">%s</span>' % str else: return '<span class="py-keyword">%s</span>' % str | def _colorize_re(tree, noparen=0): """ Recursively descend the given regexp parse tree to produce the HTML code for a colorized version of the regexp. @param tree: The regexp parse tree for the regexp that should be colorized. @type tree: L{sre_parse.SubPattern} @param noparen: If true, then don't include parenthases around the expression in C{tree}, even if it contains multiple elements. @type noparen: C{boolean} @return: The HTML code for a colorized version of C{tree} @rtype: C{string} """ result = [] out = result.append if len(tree) > 1 and not noparen: out('<span class="%s">(</span>' % PAREN_TAG) for elt in tree: op = elt[0] args = elt[1] if op == sre_constants.LITERAL: c = unichr(args) if c == '\t': out(r'<span class="%s">\t</span>' % ESCAPE_TAG) elif c == '\n': out(r'<span class="%s">\n</span>' % ESCAPE_TAG) elif c == '\r': out(r'<span class="%s">\r</span>' % ESCAPE_TAG) elif c == '\f': out(r'<span class="%s">\f</span>' % ESCAPE_TAG) elif c == '\v': out(r'<span class="%s">\v</span>' % ESCAPE_TAG) elif ord(c)<32 or ord(c)>=127: if c < 256: template = r'<span class="%s">\x%02x</span>' else: template = r'<span class="%s">\u%04x</span>' out(template % (ESCAPE_TAG,ord(c))) elif c in '.^$\\*+?{}[]|()': out(r'<span class="%s">\%c</span>' % (ESCAPE_TAG, c)) else: out(plaintext_to_html(unichr(args))) continue elif op == sre_constants.ANY: out('<span class="%s">.</span>' % ANY_TAG) elif op == sre_constants.BRANCH: if args[0] is not None: raise ValueError('Branch expected None arg but got %s' % args[0]) VBAR = '<span class="%s">|</span>' % BRANCH_TAG out(VBAR.join([_colorize_re(item,1) for item in args[1]])) elif op == sre_constants.IN: if (len(args) == 1 and args[0][0] == sre_constants.CATEGORY): out(_colorize_re(args)) else: out('<span class="%s">[</span>' % CHOICE_TAG) out(_colorize_re(args, 1)) out('<span class="%s">]</span>' % CHOICE_TAG) elif op == sre_constants.CATEGORY: out('<span class="%s">' % CATEGORY_TAG) if args == sre_constants.CATEGORY_DIGIT: out(r'\d') elif args == sre_constants.CATEGORY_NOT_DIGIT: out(r'\D') elif args == sre_constants.CATEGORY_SPACE: out(r'\s') elif args == sre_constants.CATEGORY_NOT_SPACE: out(r'\S') elif args == sre_constants.CATEGORY_WORD: out(r'\w') elif args == sre_constants.CATEGORY_NOT_WORD: out(r'\W') else: raise ValueError('Unknown category %s' % args) out('</span>') elif op == sre_constants.AT: out('<span class="%s">' % AT_TAG) if args == sre_constants.AT_BEGINNING_STRING: out(r'\A') elif args == sre_constants.AT_BEGINNING: out(r'^') elif args == sre_constants.AT_END: out(r'$') elif args == sre_constants.AT_BOUNDARY: out(r'\b') elif args == sre_constants.AT_NON_BOUNDARY: out(r'\B') elif args == sre_constants.AT_END_STRING: out(r'\Z') else: raise ValueError('Unknown position %s' % args) out('</span>') elif op == sre_constants.MAX_REPEAT: min = args[0] max = args[1] if max == sre_constants.MAXREPEAT: if min == 0: out(_colorize_re(args[2])) out('<span class="%s">*</span>' % STAR_TAG) elif min == 1: out(_colorize_re(args[2])) out('<span class="%s">+</span>' % PLUS_TAG) else: out(_colorize_re(args[2])) out('<span class="%s">{%d,}</span>' % (RNG_TAG, min)) elif min == 0: if max == 1: out(_colorize_re(args[2])) out('<span class="%s">?</span>' % QMRK_TAG) else: out(_colorize_re(args[2])) out('<span class="%s">{,%d}</span>' % (RNG_TAG, max)) elif min == max: out(_colorize_re(args[2])) out('<span class="%s">{%d}</span>' % (RNG_TAG, max)) else: out(_colorize_re(args[2])) out('<span class="%s">{%d,%d}</span>' % (RNG_TAG, min, max)) elif op == sre_constants.MIN_REPEAT: min = args[0] max = args[1] if max == sre_constants.MAXREPEAT: if min == 0: out(_colorize_re(args[2])) out('<span class="%s">*?</span>' % STAR_TAG) elif min == 1: out(_colorize_re(args[2])) out('<span class="%s">+?</span>' % PLUS_TAG) else: out(_colorize_re(args[2])) out('<span class="%s">{%d,}?</span>' % (RNG_TAG, min)) elif min == 0: if max == 1: out(_colorize_re(args[2])) out('<span class="%s">??</span>' % QMRK_TAG) else: out(_colorize_re(args[2])) out('<span class="%s">{,%d}?</span>' % (RNG_TAG, max)) elif min == max: out(_colorize_re(args[2])) out('<span class="%s">{%d}?</span>' % (RNG_TAG, max)) else: out(_colorize_re(args[2])) out('<span class="%s">{%d,%d}?</span>'%(RNG_TAG, min, max)) elif op == sre_constants.SUBPATTERN: if args[0] is None: out('<span class="%s">(?:</span>' % PAREN_TAG) elif isinstance(args[0], (int, long)): # This is cheating: out('<span class="%s">(</span>' % PAREN_TAG) else: out('<span class="%s">(?P<</span>' % PAREN_TAG) out('<span class="%s">%s</span>' % (REF_TAG, plaintext_to_html(args[0]))) out('<span class="%s">></span>' % PAREN_TAG) out(_colorize_re(args[1], 1)) out('<span class="%s">)</span>' % PAREN_TAG) elif op == sre_constants.GROUPREF: out('<span class="%s">\\%d</span>' % (REF_TAG, args)) elif op == sre_constants.RANGE: start = _colorize_re( ((sre_constants.LITERAL, args[0]),) ) end = _colorize_re( ((sre_constants.LITERAL, args[1]),) ) out('%s<span class="%s">-</span>%s' % (start, CHOICE_TAG, end)) elif op == sre_constants.NEGATE: out('<span class="%s">^</span>' % CHOICE_TAG) elif op == sre_constants.ASSERT: if args[0]: out('<span class="%s">(?=</span>' % ASSERT_TAG) else: out('<span class="%s">(?<=</span>' % ASSERT_TAG) out(''.join(_colorize_re(args[1], 1))) out('<span class="%s">)</span>' % ASSERT_TAG) elif op == sre_constants.ASSERT_NOT: if args[0]: out('<span class="%s">(?!</span>' % ASSERT_TAG) else: out('<span class="%s">(?<!</span>' % ASSERT_TAG) out(''.join(_colorize_re(args[1], 1))) out('<span class="%s">)</span>' % ASSERT_TAG) elif op == sre_constants.NOT_LITERAL: lit = _colorize_re( ((sre_constants.LITERAL, args),) ) out('<span class="%s">[^</span>%s<span class="%s">]</span>' % (CHOICE_TAG, lit, CHOICE_TAG)) else: log.error("Error colorizing regexp: unknown elt %r" % elt) if len(tree) > 1 and not noparen: out('<span class="%s">)</span>' % PAREN_TAG) return u''.join(result) | bb9f16d299562657a0db7ab83e597b8513393eaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/bb9f16d299562657a0db7ab83e597b8513393eaf/html_colorize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3266,
554,
67,
266,
12,
3413,
16,
28797,
7892,
33,
20,
4672,
3536,
31362,
10653,
326,
864,
7195,
1109,
2151,
358,
11402,
326,
3982,
981,
364,
279,
2036,
1235,
1177,
434,
326,
7195,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3266,
554,
67,
266,
12,
3413,
16,
28797,
7892,
33,
20,
4672,
3536,
31362,
10653,
326,
864,
7195,
1109,
2151,
358,
11402,
326,
3982,
981,
364,
279,
2036,
1235,
1177,
434,
326,
7195,
... | |
self.linkNIMs(x, nim.linkedTo.value) nim = config.Nims[nim.linkedTo.value] | pass | def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = [] | 45b15800295dbe7e8aa64c7c97e62ed7a9f0a137 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/45b15800295dbe7e8aa64c7c97e62ed7a9f0a137/NimManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
425,
30199,
12692,
270,
19345,
13142,
11568,
3367,
18,
588,
1442,
7675,
8507,
1435,
225,
365,
18,
12973,
682,
273,
5378,
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,
0,
0,
0,
0,
0,
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,
12,
2890,
4672,
425,
30199,
12692,
270,
19345,
13142,
11568,
3367,
18,
588,
1442,
7675,
8507,
1435,
225,
365,
18,
12973,
682,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
QToolTip.add(self.name_linedit,self.__tr("The name of the GAMESS jig.")) QWhatsThis.add(self.name_linedit,self.__tr("The name of the GAMESS jig.")) | QToolTip.add(self.name_linedit,self.__tr("Name of the GAMESS jig")) QWhatsThis.add(self.name_linedit,self.__tr("Name of the GAMESS jig.")) | def languageChange(self): self.setCaption(self.__tr("GAMESS Properties")) self.psetslbl_2_2.setText(self.__tr("Name :")) self.textLabel1_2_3.setText(self.__tr("Calculate :")) self.textLabel1_3.setText(self.__tr("Description :")) self.textLabel1_3_2.setText(self.__tr("Color :")) self.name_linedit.setText(QString.null) QToolTip.add(self.name_linedit,self.__tr("The name of the GAMESS jig.")) QWhatsThis.add(self.name_linedit,self.__tr("The name of the GAMESS jig.")) self.runtyp_combox.clear() self.runtyp_combox.insertItem(self.__tr("Energy")) self.runtyp_combox.insertItem(self.__tr("Optimization")) self.runtyp_combox.setCurrentItem(0) self.comment_linedit.setText(QString.null) self.choose_color_btn.setText(self.__tr("Choose...")) QToolTip.add(self.choose_color_btn,self.__tr("Change color")) self.scftyp_btngrp.setTitle(self.__tr("Electronic Structure Properties")) self.rhf_radiobtn.setText(self.__tr("RHF")) QToolTip.add(self.rhf_radiobtn,self.__tr("Restricted Hartree-Fock. All electrons are paired and each spatial orbital is doubly occupied. Cannot be used with multiplicities greater than 1.")) QWhatsThis.add(self.rhf_radiobtn,self.__tr("Restricted Hartree-Fock. All electrons are paired and each spatial orbital is doubly occupied. Cannot be used with multiplicities greater than 1.")) self.uhf_radiobtn.setText(self.__tr("UHF")) QToolTip.add(self.uhf_radiobtn,self.__tr("Unrestricted Hartree-Fock. All electrons are unpaired and spatial (spin) orbitals are uniquely defined for each electron. More time consuming, but more accurate, than ROHF. ")) QWhatsThis.add(self.uhf_radiobtn,self.__tr("Unrestricted Hartree-Fock. All electrons are unpaired and spatial (spin) orbitals are uniquely defined for each electron. More time consuming, but more accurate, than ROHF. ")) self.rohf_radiobtn.setText(self.__tr("ROHF")) QToolTip.add(self.rohf_radiobtn,self.__tr("Restricted Open-shell Hartree-Fock. Spin-paired electrons are assigned to doubly-occupied spatial orbitals, while electrons with unpaired spins are provided unique spatial orbitals.")) QWhatsThis.add(self.rohf_radiobtn,self.__tr("Restricted Open-shell Hartree-Fock. Spin-paired electrons are assigned to doubly-occupied spatial orbitals, while electrons with unpaired spins are provided unique spatial orbitals.")) self.textLabel1_4.setText(self.__tr("Charge:")) QToolTip.add(self.icharg_spinbox,self.__tr("The total charge of the structure to be treated quantum mechanically.")) QWhatsThis.add(self.icharg_spinbox,self.__tr("The total charge of the structure to be treated quantum mechanically.")) self.textLabel1_2_2.setText(self.__tr("Multiplicity:")) self.multi_combox.clear() self.multi_combox.insertItem(self.__tr("1")) self.multi_combox.insertItem(self.__tr("2")) self.multi_combox.insertItem(self.__tr("3")) self.multi_combox.insertItem(self.__tr("4")) self.multi_combox.insertItem(self.__tr("5")) self.multi_combox.insertItem(self.__tr("6")) self.multi_combox.insertItem(self.__tr("7")) QToolTip.add(self.multi_combox,self.__tr("N + 1, where N is the number of unpaired electrons.")) QWhatsThis.add(self.multi_combox,self.__tr("N + 1, where N is the number of unpaired electrons.")) self.groupBox8.setTitle(self.__tr("System Memory and Usage")) self.textLabel2_2.setText(self.__tr("Memory :")) self.textLabel1.setText(self.__tr("MB")) self.dirscf_checkbox.setText(self.__tr("DirectSCF")) QToolTip.add(self.dirscf_checkbox,self.__tr("Check this box to run the calculation in RAM and avoid hard disk usage for integral storage.")) QWhatsThis.add(self.dirscf_checkbox,self.__tr("Check this box to run the calculation in RAM and avoid hard disk usage for integral storage.")) self.groupBox2.setTitle(self.__tr("Electron Correlation Method")) self.textLabel6.setText(self.__tr("Basis Set :")) self.gbasis_combox.clear() self.gbasis_combox.insertItem(self.__tr("AM1")) self.gbasis_combox.insertItem(self.__tr("PM3")) self.gbasis_combox.insertItem(self.__tr("STO-3G")) self.gbasis_combox.insertItem(self.__tr("STO-6G")) self.gbasis_combox.insertItem(self.__tr("3-21G")) self.gbasis_combox.insertItem(self.__tr("3-21G*")) self.gbasis_combox.insertItem(self.__tr("6-31G")) self.gbasis_combox.insertItem(self.__tr("6-31G(d)")) self.gbasis_combox.insertItem(self.__tr("6-31G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-31+G(d)")) self.gbasis_combox.insertItem(self.__tr("6-31+G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-31++G(d)")) self.gbasis_combox.insertItem(self.__tr("6-31++G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-311G")) self.gbasis_combox.insertItem(self.__tr("6-311G(d)")) self.gbasis_combox.insertItem(self.__tr("6-311G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-311+G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-311++G(d,p)")) self.gbasis_combox.setCurrentItem(0) QToolTip.add(self.gbasis_combox,self.__tr("Select from among the standard Gaussian-type basis sets and semi-empirical parameters in GAMESS.")) QWhatsThis.add(self.gbasis_combox,self.__tr("Select from among the standard Gaussian-type basis sets and semi-empirical parameters in GAMESS.")) self.checkBox10_3_2.setText(self.__tr("Read $HESS Group")) self.checkBox10_2_2_2.setText(self.__tr("Read $VEC Group")) QToolTip.add(self.checkBox10_2_2_2,self.__tr("Only if Hf basis same as CI basis","Only if Hf basis same as CI basis")) QWhatsThis.add(self.checkBox10_2_2_2,self.__tr("Only if Hf basis same as CI basis")) self.checkBox35.setText(self.__tr("Frequencies")) self.ecm_btngrp.setTitle(QString.null) self.none_radiobtn.setText(self.__tr("None")) QToolTip.add(self.none_radiobtn,self.__tr("Select this button to neglect electron correlation in the calculation.")) QWhatsThis.add(self.none_radiobtn,self.__tr("Select this button to neglect electron correlation in the calculation.")) self.dft_radiobtn.setText(self.__tr("DFT")) QToolTip.add(self.dft_radiobtn,self.__tr("Select this button to perform a density functional theory calculation.")) QWhatsThis.add(self.dft_radiobtn,self.__tr("Select this button to perform a density functional theory calculation.")) self.mp2_radiobtn.setText(self.__tr("MP2")) QToolTip.add(self.mp2_radiobtn,self.__tr("Select this button to perform a Second-Order Moeller Plesset calculation.")) QWhatsThis.add(self.mp2_radiobtn,self.__tr("Select this button to perform a Second-Order Moeller Plesset calculation.")) self.dfttyp_label.setText(self.__tr("Functional:")) self.gridsize_label.setText(self.__tr("Grid Size:")) self.dfttyp_combox.clear() self.dfttyp_combox.insertItem(self.__tr("SLATER (E)")) self.dfttyp_combox.insertItem(self.__tr("BECKE (E)")) self.dfttyp_combox.insertItem(self.__tr("GILL (E)")) self.dfttyp_combox.insertItem(self.__tr("PBE (E)")) self.dfttyp_combox.insertItem(self.__tr("VWN (C)")) self.dfttyp_combox.insertItem(self.__tr("LYP (C)")) self.dfttyp_combox.insertItem(self.__tr("OP (C)")) self.dfttyp_combox.insertItem(self.__tr("SVWN/LDA (E+C)")) self.dfttyp_combox.insertItem(self.__tr("SLYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("SOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BVWN (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BLYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("GVWN (E+C)")) self.dfttyp_combox.insertItem(self.__tr("GLYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("GOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("PBEVWN (E+C)")) self.dfttyp_combox.insertItem(self.__tr("PBELYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("PBEOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BHHLYP (H)")) self.dfttyp_combox.insertItem(self.__tr("B3LYP (H)")) QToolTip.add(self.dfttyp_combox,self.__tr("Select an available density functional in GAMESS.")) QWhatsThis.add(self.dfttyp_combox,self.__tr("Select an available density functional in GAMESS.")) self.gridsize_combox.clear() self.gridsize_combox.insertItem(self.__tr("Coarse")) self.gridsize_combox.insertItem(self.__tr("Default")) self.gridsize_combox.insertItem(self.__tr("Fine")) self.gridsize_combox.insertItem(self.__tr("Army Grade")) self.gridsize_combox.setCurrentItem(1) QToolTip.add(self.gridsize_combox,self.__tr("Select the grid spacing for the DFT calculation.")) QWhatsThis.add(self.gridsize_combox,self.__tr("Select the grid spacing for the DFT calculation.")) self.core_electrons_checkbox.setText(self.__tr("Core electrons?")) QToolTip.add(self.core_electrons_checkbox,self.__tr("Check this box to include both the valence and core electrons in the MP2 calculation.")) QWhatsThis.add(self.core_electrons_checkbox,self.__tr("Check this box to include both the valence and core electrons in the MP2 calculation.")) self.groupBox3.setTitle(self.__tr("Convergence Criteria")) self.textLabel3.setText(self.__tr("Energy and Density:")) self.density_conv_combox.clear() self.density_conv_combox.insertItem(self.__tr("Coarse")) self.density_conv_combox.insertItem(self.__tr("Medium")) self.density_conv_combox.insertItem(self.__tr("Fine")) self.density_conv_combox.insertItem(self.__tr("Very Fine")) self.density_conv_combox.setCurrentItem(1) QToolTip.add(self.density_conv_combox,self.__tr("Selects the accuracy of the electron density convergence for the energy calculation.")) QWhatsThis.add(self.density_conv_combox,self.__tr("Selects the accuracy of the electron density convergence for the energy calculation.")) self.rmsd_lbl.setText(self.__tr("RMSD:")) self.rmsd_combox.clear() self.rmsd_combox.insertItem(self.__tr("Coarse")) self.rmsd_combox.insertItem(self.__tr("Medium")) self.rmsd_combox.insertItem(self.__tr("Fine")) self.rmsd_combox.insertItem(self.__tr("Very Fine")) self.rmsd_combox.setCurrentItem(1) self.iterations_lbl.setText(self.__tr("Iterations :")) self.edit_input_file_cbox.setText(self.__tr("Open Input File in text editor")) self.run_job_btn.setText(self.__tr("Save and Run")) QToolTip.add(self.run_job_btn,self.__tr("Save GAMESS parameters and launch job.")) self.save_btn.setText(self.__tr("Save")) self.cancel_btn.setText(self.__tr("Cancel")) QToolTip.add(self.cancel_btn,self.__tr("Closes this window.")) QWhatsThis.add(self.cancel_btn,self.__tr("Closes this window.")) | 24f41dc8e19de3c29875b1970aa782574333c759 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/24f41dc8e19de3c29875b1970aa782574333c759/GamessPropDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2653,
3043,
12,
2890,
4672,
365,
18,
542,
21158,
12,
2890,
16186,
313,
2932,
43,
1642,
1260,
6183,
6,
3719,
365,
18,
84,
542,
2069,
3083,
67,
22,
67,
22,
18,
542,
1528,
12,
2890,
161... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2653,
3043,
12,
2890,
4672,
365,
18,
542,
21158,
12,
2890,
16186,
313,
2932,
43,
1642,
1260,
6183,
6,
3719,
365,
18,
84,
542,
2069,
3083,
67,
22,
67,
22,
18,
542,
1528,
12,
2890,
161... |
newitems = l.ll_items() | def ll_listslice_minusone(RESLIST, l1): newlength = l1.ll_length() - 1 assert newlength >= 0 l = RESLIST.ll_newlist(newlength) newitems = l.ll_items() j = 0 source = l1.ll_items() while j < newlength: newitems[j] = source[j] j += 1 return l | afabe8603c579750f81fa9c16896184dfa4a53b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/afabe8603c579750f81fa9c16896184dfa4a53b8/rlist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6579,
67,
1098,
6665,
67,
19601,
476,
12,
7031,
7085,
16,
328,
21,
4672,
394,
2469,
273,
328,
21,
18,
2906,
67,
2469,
1435,
300,
404,
1815,
394,
2469,
1545,
374,
328,
273,
12915,
7085,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6579,
67,
1098,
6665,
67,
19601,
476,
12,
7031,
7085,
16,
328,
21,
4672,
394,
2469,
273,
328,
21,
18,
2906,
67,
2469,
1435,
300,
404,
1815,
394,
2469,
1545,
374,
328,
273,
12915,
7085,... | |
if not hasattr(self, 'star_eigenvalues'): use_star = False if use_star: if len(self.star_eigenvalues()) == 2: V = self.plus_submodule(compute_dual = False).dual_free_module() + \ self.minus_submodule(compute_dual = False).dual_free_module() return V V = A.sign_submodule(self.sign()).dual_free_module() else: V = A.free_module() N = self.level() p = 2 if bound is None: bound = A.hecke_bound() while True: if anemic: while N % p == 0: p = arith.next_prime(p) misc.verbose("using T_%s"%p) f = self.hecke_polynomial(p) T = A.dual_hecke_matrix(p) V = T.kernel_on(V, poly=f, check=False) if V.dimension() <= self.dimension(): break p = arith.next_prime(p) if p > bound: break if V.rank() == self.rank(): self.__dual_free_module = V return V else: raise RuntimeError, "Computation of embedded dual vector space failed " + \ "(cut down to rank %s, but should have cut down to rank %s)."%(V.rank(), self.rank()) | C = self.complement(bound=bound, anemic=anemic, use_star=use_star) X = C.free_module().basis_matrix().right_kernel() Y = self.ambient().dual_free_module().submodule(X) self.__dual_free_module = Y return Y | def dual_free_module(self, bound=None, anemic=True, use_star=True): r""" Compute embedded dual free module if possible. In general this won't be possible, e.g., if this space is not Hecke equivariant, possibly if it is not cuspidal, or if the characteristic is not 0. In all these cases we raise a RuntimeError exception. | f8d278382e9e906ac616e19ab3afb411bb1711d5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f8d278382e9e906ac616e19ab3afb411bb1711d5/submodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24557,
67,
9156,
67,
2978,
12,
2890,
16,
2489,
33,
7036,
16,
392,
351,
335,
33,
5510,
16,
999,
67,
10983,
33,
5510,
4672,
436,
8395,
8155,
7488,
24557,
4843,
1605,
309,
3323,
18,
657,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24557,
67,
9156,
67,
2978,
12,
2890,
16,
2489,
33,
7036,
16,
392,
351,
335,
33,
5510,
16,
999,
67,
10983,
33,
5510,
4672,
436,
8395,
8155,
7488,
24557,
4843,
1605,
309,
3323,
18,
657,
... |
index = len(subpattern)-1 while subpattern[index][0] is MARK: index = index - 1 item = subpattern[index:index+1] | item = subpattern[-1:] | def _parse(source, pattern, flags=()): # parse regular expression pattern into an operator list. subpattern = SubPattern(pattern) this = None while 1: if str(source.next) in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if this and this[0] not in SPECIAL_CHARS: subpattern.append((LITERAL, this)) elif this == "[": # character set set = [] | b42c811cba34ab2f6d1db22aed5bc7f0dab153bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b42c811cba34ab2f6d1db22aed5bc7f0dab153bb/sre_parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
3168,
16,
1936,
16,
2943,
33,
1435,
4672,
225,
468,
1109,
6736,
2652,
1936,
1368,
392,
3726,
666,
18,
225,
720,
4951,
273,
2592,
3234,
12,
4951,
13,
225,
333,
273,
599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
3168,
16,
1936,
16,
2943,
33,
1435,
4672,
225,
468,
1109,
6736,
2652,
1936,
1368,
392,
3726,
666,
18,
225,
720,
4951,
273,
2592,
3234,
12,
4951,
13,
225,
333,
273,
599,
... |
departure_cols[0].contents[0], | departure_cols[0].contents[3].contents[0], | def parse_connection(self, departure_row, arrival_row): departure_cols = departure_row.findAll('td', recursive=False) arrival_cols = arrival_row.findAll('td', recursive=False) conn = ( # st_dep departure_cols[0].contents[0], # st_arr arrival_cols[0].contents[0], # dt_dep departure_cols[1].contents[0].split()[1], # tm_dep departure_cols[3].contents[0], # dt_arr arrival_cols[1].contents[0].split()[1], # tm_arr arrival_cols[3].contents[0], # duration departure_cols[4].string, # changes departure_cols[5].string, # trains departure_cols[6].a.contents[-1], ) conn = [urllib2.unquote(i.replace(' ', '').strip()) for i in conn] conn = Connection(*conn) conn.fare_s = self.parse_fare(departure_cols[7]) conn.fare_n = self.parse_fare(departure_cols[8]) conn.url = self.response.geturl() return conn | f1693d94ba9422649ace6cfc94071ca9ae4a47f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2719/f1693d94ba9422649ace6cfc94071ca9ae4a47f6/ghafasclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
4071,
12,
2890,
16,
26000,
594,
67,
492,
16,
2454,
5162,
67,
492,
4672,
26000,
594,
67,
6842,
273,
26000,
594,
67,
492,
18,
4720,
1595,
2668,
4465,
2187,
5904,
33,
8381,
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,
1109,
67,
4071,
12,
2890,
16,
26000,
594,
67,
492,
16,
2454,
5162,
67,
492,
4672,
26000,
594,
67,
6842,
273,
26000,
594,
67,
492,
18,
4720,
1595,
2668,
4465,
2187,
5904,
33,
8381,
13,
... |
mi.title = os.path.splitext(os.path.basename(rtf))[0] | mi.title = os.path.splitext(os.path.basename(fb2))[0] | def process_file(path, options, logger=None): if logger is None: level = logging.DEBUG if options.verbose else logging.INFO logger = logging.getLogger('fb22lrf') setup_cli_handlers(logger, level) fb2 = os.path.abspath(os.path.expanduser(path)) f = open(fb2, 'rb') mi = get_metadata(f, 'fb2') f.close() htmlfile = generate_html(fb2, options.encoding, logger) tdir = os.path.dirname(htmlfile) cwd = os.getcwdu() try: if not options.output: ext = '.lrs' if options.lrs else '.lrf' options.output = os.path.abspath(os.path.basename(os.path.splitext(path)[0]) + ext) options.output = os.path.abspath(os.path.expanduser(options.output)) if not mi.title: mi.title = os.path.splitext(os.path.basename(rtf))[0] if (not options.title or options.title == 'Unknown'): options.title = mi.title if (not options.author or options.author == 'Unknown') and mi.authors: options.author = mi.authors.pop() if (not options.category or options.category == 'Unknown') and mi.category: options.category = mi.category if (not options.freetext or options.freetext == 'Unknown') and mi.comments: options.freetext = mi.comments os.chdir(tdir) html_process_file(htmlfile, options, logger) finally: os.chdir(cwd) if hasattr(options, 'keep_intermediate_files') and options.keep_intermediate_files: logger.debug('Intermediate files in '+ tdir) else: shutil.rmtree(tdir) | 1cf4f8661a06bd405c86f9953e860059cb2ea1f7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/1cf4f8661a06bd405c86f9953e860059cb2ea1f7/convert_from.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
768,
12,
803,
16,
702,
16,
1194,
33,
7036,
4672,
309,
1194,
353,
599,
30,
1801,
273,
2907,
18,
9394,
309,
702,
18,
11369,
469,
2907,
18,
5923,
1194,
273,
2907,
18,
588,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
768,
12,
803,
16,
702,
16,
1194,
33,
7036,
4672,
309,
1194,
353,
599,
30,
1801,
273,
2907,
18,
9394,
309,
702,
18,
11369,
469,
2907,
18,
5923,
1194,
273,
2907,
18,
588,
332... |
return s | return s.encode('utf-8') | def convert_to_utf8(s, enc): """ Returns the passed string as a unicode string. If conversion to UTF-8 fails, we try the user-specified encoding, which defaults to ISO 8859-15. This can be overridden by users inside the repository configuration, which gives users repository-level control over file encodings (file-level control is really, really hard). """ if isinstance(s, unicode): return s elif isinstance(s, basestring): try: u = unicode(s, 'utf-8') return u except UnicodeError: for e in enc.split(','): try: u = unicode(s, e) return u.encode('utf-8') except UnicodeError: pass raise Exception(_("Diff content couldn't be converted to UTF-8 " "using the following encodings: %s") % enc) else: raise TypeError("Value to convert is unexpected type %s", type(s)) | 1112d662d3f6af9448fc26a37b2cae7ec34fc506 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/1112d662d3f6af9448fc26a37b2cae7ec34fc506/diffutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
869,
67,
3158,
28,
12,
87,
16,
2446,
4672,
3536,
2860,
326,
2275,
533,
487,
279,
5252,
533,
18,
971,
4105,
358,
6380,
17,
28,
6684,
16,
732,
775,
326,
729,
17,
13827,
2688,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
869,
67,
3158,
28,
12,
87,
16,
2446,
4672,
3536,
2860,
326,
2275,
533,
487,
279,
5252,
533,
18,
971,
4105,
358,
6380,
17,
28,
6684,
16,
732,
775,
326,
729,
17,
13827,
2688,... |
handle = _mysql.connect(*data) | handle = _mysql.connect(**data) | def on_cw_test(self, *args): import _mysql; data = [] for n in ["host", "user", "password"]: data.append(self.xml.get_widget("cw_%s" % n).get_text()) try: handle = _mysql.connect(*data) except: self.show_message("test connection", "could not connect to host <b>%s</b> with user <b>%s</b> and password <b>%s</b>:\n<i>%s</i>" % (data[0], data[1], data[2], sys.exc_value[1])) return self.show_message("test connection", "successfully connected to host <b>%s</b> with user <b>%s</b>!" % (data[0], data[1])) handle.close() | 7dda6efe0ce5eb9252a0950001c0288c1a84bb9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8147/7dda6efe0ce5eb9252a0950001c0288c1a84bb9f/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
71,
91,
67,
3813,
12,
2890,
16,
380,
1968,
4672,
1930,
389,
12527,
31,
501,
273,
5378,
364,
290,
316,
8247,
2564,
3113,
315,
1355,
3113,
315,
3664,
11929,
30,
501,
18,
6923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
71,
91,
67,
3813,
12,
2890,
16,
380,
1968,
4672,
1930,
389,
12527,
31,
501,
273,
5378,
364,
290,
316,
8247,
2564,
3113,
315,
1355,
3113,
315,
3664,
11929,
30,
501,
18,
6923,
... |
'\\mathrm{SL}_2(\\mathbf{Z})' | '\\mbox{\\rm SL}_2(\\mathbf{Z})' | def _latex_(self): r""" Return the LaTeX representation of self. EXAMPLES:: sage: SL2Z._latex_() '\\mathrm{SL}_2(\\mathbf{Z})' sage: latex(SL2Z) \mathrm{SL}_2(\mathbf{Z}) """ return "\\mathrm{SL}_2(%s)"%(ZZ._latex_()) | 8272a8462482fd1c688feea2893d6e0d1fd852b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/8272a8462482fd1c688feea2893d6e0d1fd852b2/congroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
436,
8395,
2000,
326,
21072,
21575,
60,
4335,
434,
365,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
348,
48,
22,
62,
6315,
26264,
67,
1435,
371... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26264,
67,
12,
2890,
4672,
436,
8395,
2000,
326,
21072,
21575,
60,
4335,
434,
365,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
348,
48,
22,
62,
6315,
26264,
67,
1435,
371... |
self.mfrow = mfrow | self.mfrow = [int(x) for x in mfrow] | def __init__(self, nplot, update, title, xlab, ylab, axes, lty, col, mfrow, plotType, saveAs, leaveOpen, dev='', width=0, height=0): """ initialization function of base properties (layout etc) of all plotters """ # save parameters self.nplot = nplot self.axes = axes if lty==[]: self.lty = range(1, nplot+1) else: self.lty = lty if col==[]: self.col = [0]*nplot else: self.col = col self.mfrow = mfrow self.update = update self.title = [title]*self.nplot self.xlab = xlab self.ylab = ylab self.plotType = plotType self.saveAs = saveAs self.leaveOpen = leaveOpen self.width = width self.height = height # layout related variables self.first = True # R plot device number self.dev = dev self.device = 1 # update related variable self.skip = -1 | 0731ae08adccf41d053f6aa3359994cd77496a34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/0731ae08adccf41d053f6aa3359994cd77496a34/simuRPy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
290,
4032,
16,
1089,
16,
2077,
16,
619,
7411,
16,
677,
7411,
16,
6515,
16,
328,
4098,
16,
645,
16,
14749,
492,
16,
3207,
559,
16,
1923,
1463,
16,
8851,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
290,
4032,
16,
1089,
16,
2077,
16,
619,
7411,
16,
677,
7411,
16,
6515,
16,
328,
4098,
16,
645,
16,
14749,
492,
16,
3207,
559,
16,
1923,
1463,
16,
8851,... |
port = arr[2] | port = int(arr[2]) | def mux_stopcomm(key): # Is this a real handle? if key in MULTIPLEXER_STATE_DATA: # Retrieve the handle handle = MULTIPLEXER_STATE_DATA[key] # Call stopcomm on it stopcomm_func = MULTIPLEXER_STATE_DATA["stopcomm"] # Stopcomm stopcomm_func(handle) # Get the values by spliting on colon arr = key.split(":") ip = arr[1] port = arr[2] # De-register this function for new multiplexers del MULTIPLEXER_WAIT_FUNCTIONS[ip+":"+port] # Map this stopcomm to all existing multiplexers _map_virtual_stopcomm(port) | 1112595c57cf306108462e6b856c4f207cb86c99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/1112595c57cf306108462e6b856c4f207cb86c99/Multiplexer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8260,
67,
5681,
5702,
12,
856,
4672,
468,
2585,
333,
279,
2863,
1640,
35,
309,
498,
316,
31385,
21130,
654,
67,
7998,
67,
4883,
30,
468,
10708,
326,
1640,
1640,
273,
31385,
21130,
654,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8260,
67,
5681,
5702,
12,
856,
4672,
468,
2585,
333,
279,
2863,
1640,
35,
309,
498,
316,
31385,
21130,
654,
67,
7998,
67,
4883,
30,
468,
10708,
326,
1640,
1640,
273,
31385,
21130,
654,
... |
try: return (devname, os.stat(n).st_rdev) except Exception, ex: pass | def blkdev_name_to_number(name): """Take the given textual block-device name (e.g., '/dev/sda1', 'hda') and return the device number used by the OS. """ n = expand_dev_name(name) devname = 'virtual-device' devnum = None try: return (devname, os.stat(n).st_rdev) except Exception, ex: pass scsi_major = [ 8, 65, 66, 67, 68, 69, 70, 71, 128, 129, 130, 131, 132, 133, 134, 135 ] if re.match( '/dev/sd[a-z]([1-9]|1[0-5])?$', n): major = scsi_major[(ord(n[7:8]) - ord('a')) / 16] minor = ((ord(n[7:8]) - ord('a')) % 16) * 16 + int(n[8:] or 0) devnum = major * 256 + minor elif re.match( '/dev/sd[a-i][a-z]([1-9]|1[0-5])?$', n): major = scsi_major[((ord(n[7:8]) - ord('a') + 1) * 26 + (ord(n[8:9]) - ord('a'))) / 16 ] minor = (((ord(n[7:8]) - ord('a') + 1 ) * 26 + (ord(n[8:9]) - ord('a'))) % 16) * 16 + int(n[9:] or 0) devnum = major * 256 + minor elif re.match( '/dev/hd[a-t]([1-9]|[1-5][0-9]|6[0-3])?$', n): ide_majors = [ 3, 22, 33, 34, 56, 57, 88, 89, 90, 91 ] major = ide_majors[(ord(n[7:8]) - ord('a')) / 2] minor = ((ord(n[7:8]) - ord('a')) % 2) * 64 + int(n[8:] or 0) devnum = major * 256 + minor elif re.match( '/dev/xvd[a-p]([1-9]|1[0-5])?$', n): devnum = (202 << 8) + ((ord(n[8:9]) - ord('a')) << 4) + int(n[9:] or 0) elif re.match('/dev/xvd[q-z]([1-9]|1[0-5])?$', n): devname = 'virtual-device-ext' devnum = (1 << 28) + ((ord(n[8:9]) - ord('a')) << 8) + int(n[9:] or 0) elif re.match('/dev/xvd[a-i][a-z]([1-9]|1[0-5])?$', n): devname = 'virtual-device-ext' devnum = (1 << 28) + (((ord(n[8:9]) - ord('a') + 1) * 26 + (ord(n[9:10]) - ord('a'))) << 8) + int(n[10:] or 0) elif re.match( '^(0x)[0-9a-fA-F]+$', name ): devnum = string.atoi(name, 16) elif re.match('^[0-9]+$', name): devnum = string.atoi(name, 10) return (devname, devnum) | 0800a945f5aa2fcbcbce49cf90e14d28e50955b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6195/0800a945f5aa2fcbcbce49cf90e14d28e50955b1/blkif.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11992,
5206,
67,
529,
67,
869,
67,
2696,
12,
529,
4672,
3536,
13391,
326,
864,
25774,
1203,
17,
5964,
508,
261,
73,
18,
75,
12990,
1173,
5206,
19,
87,
2414,
21,
2187,
296,
76,
2414,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11992,
5206,
67,
529,
67,
869,
67,
2696,
12,
529,
4672,
3536,
13391,
326,
864,
25774,
1203,
17,
5964,
508,
261,
73,
18,
75,
12990,
1173,
5206,
19,
87,
2414,
21,
2187,
296,
76,
2414,
... | |
prefix.append(av) | prefixappend(av) | def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, # this contains min/max pattern width, and an optional literal # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: return # not worth it # look for a literal prefix prefix = [] prefix_skip = 0 charset = [] # not used if not (flags & SRE_FLAG_IGNORECASE): # look for literal prefix for op, av in pattern.data: if op is LITERAL: if len(prefix) == prefix_skip: prefix_skip = prefix_skip + 1 prefix.append(av) elif op is SUBPATTERN and len(av[1]) == 1: op, av = av[1][0] if op is LITERAL: prefix.append(av) else: break else: break # if no prefix, look for charset prefix if not prefix and pattern.data: op, av = pattern.data[0] if op is SUBPATTERN and av[1]: op, av = av[1][0] if op is LITERAL: charset.append((op, av)) elif op is BRANCH: c = [] for p in av[1]: if not p: break op, av = p[0] if op is LITERAL: c.append((op, av)) else: break else: charset = c elif op is BRANCH: c = [] for p in av[1]: if not p: break op, av = p[0] if op is LITERAL: c.append((op, av)) else: break else: charset = c elif op is IN: charset = av | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11100,
67,
1376,
12,
710,
16,
1936,
16,
2943,
4672,
468,
2713,
30,
4074,
392,
1123,
1203,
18,
225,
316,
326,
783,
1177,
16,
468,
333,
1914,
1131,
19,
1896,
1936,
1835,
16,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11100,
67,
1376,
12,
710,
16,
1936,
16,
2943,
4672,
468,
2713,
30,
4074,
392,
1123,
1203,
18,
225,
316,
326,
783,
1177,
16,
468,
333,
1914,
1131,
19,
1896,
1936,
1835,
16,
471,
... |
return MP_BAD_MESSAGE_LENGTH | return MP_BAD_MESSAGE_LENGTH, lltype.nullptr(rffi.CCHARP.TO) | def do_recv_string(self, space, maxlength): length_ptr = lltype.malloc(rffi.CArrayPtr(rffi.UINT).TO, 1, flavor='raw') self._recvall(rffi.cast(rffi.CCHARP, length_ptr), 4) length = length_ptr[0] if length > maxlength: return MP_BAD_MESSAGE_LENGTH | c8a395526acc384b8abc9423dba4c5bcf6d8e363 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/c8a395526acc384b8abc9423dba4c5bcf6d8e363/interp_connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
18334,
67,
1080,
12,
2890,
16,
3476,
16,
943,
2469,
4672,
769,
67,
6723,
273,
6579,
723,
18,
81,
9853,
12,
86,
1403,
77,
18,
39,
1076,
5263,
12,
86,
1403,
77,
18,
57,
3217... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
18334,
67,
1080,
12,
2890,
16,
3476,
16,
943,
2469,
4672,
769,
67,
6723,
273,
6579,
723,
18,
81,
9853,
12,
86,
1403,
77,
18,
39,
1076,
5263,
12,
86,
1403,
77,
18,
57,
3217... |
- [Edmonds74] 'Angular Momentum in Quantum Mechanics', A. R. Edmonds, Princeton University Press (1974) - [Rasch03] 'Efficient Storage Scheme for Pre-calculated Wigner 3j, 6j and Gaunt Coefficients', J. Rasch and A. C. H. Yu, SIAM J. Sci. Comput. Volume 25, Issue 4, pp. 1416-1428 (2003) | def wigner_6j(j_1, j_2, j_3, j_4, j_5, j_6, prec=None): r""" Calculate the Wigner 6j symbol `Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6)`. INPUT: - ``j_1``, ..., ``j_6`` - integer or half integer - ``prec`` - precision, default: None. Providing a precision can drastically speed up the calculation. OUTPUT: rational number times the square root of a rational number (if prec=None), or real number if a precision is given EXAMPLES:: sage: wigner_6j(3,3,3,3,3,3) -1/14 sage: wigner_6j(5,5,5,5,5,5) 1/52 sage: wigner_6j(6,6,6,6,6,6) 309/10868 sage: wigner_6j(8,8,8,8,8,8) -12219/965770 sage: wigner_6j(30,30,30,30,30,30) 36082186869033479581/87954851694828981714124 sage: wigner_6j(0.5,0.5,1,0.5,0.5,1) 1/6 sage: wigner_6j(200,200,200,200,200,200, prec=1000)*1.0 0.000155903212413242 It is an error to have arguments that are not integer or half integer values or do not fulfil the triangle relation:: sage: wigner_6j(2.5,2.5,2.5,2.5,2.5,2.5) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation sage: wigner_6j(0.5,0.5,1.1,0.5,0.5,1.1) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation NOTES: The Wigner 6j symbol is related to the Racah symbol but exhibits more symmetries as detailed below. .. math:: Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6) =(-1)^{j_1+j_2+j_4+j_5} W(j_1,j_2,j_5,j_4,j_3,j_6) The Wigner 6j symbol obeys the following symmetry rules: - Wigner $6j$ symbols are left invariant under any permutation of the columns: .. math:: Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6) =Wigner6j(j_3,j_1,j_2,j_6,j_4,j_5) =Wigner6j(j_2,j_3,j_1,j_5,j_6,j_4) =Wigner6j(j_3,j_2,j_1,j_6,j_5,j_4) =Wigner6j(j_1,j_3,j_2,j_4,j_6,j_5) =Wigner6j(j_2,j_1,j_3,j_5,j_4,j_6) - They are invariant under the exchange of the upper and lower arguments in each of any two columns, i. e. .. math:: Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6) =Wigner6j(j_1,j_5,j_6,j_4,j_2,j_3) =Wigner6j(j_4,j_2,j_6,j_1,j_5,j_3) =Wigner6j(j_4,j_5,j_3,j_1,j_2,j_6) - additional 6 symmetries [Regge59] giving rise to 144 symmetries in total - only non-zero if any triple of `j`'s fulfil a triangle relation ALGORITHM: This function uses the algorithm of [Edmonds74] to calculate the value of the 6j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03]. REFERENCES: - [Regge59] 'Symmetry Properties of Racah Coefficients', T. Regge, Nuovo Cimento, Volume 11, pp. 116 (1959) - [Edmonds74] 'Angular Momentum in Quantum Mechanics', A. R. Edmonds, Princeton University Press (1974) - [Rasch03] 'Efficient Storage Scheme for Pre-calculated Wigner 3j, 6j and Gaunt Coefficients', J. Rasch and A. C. H. Yu, SIAM J. Sci. Comput. Volume 25, Issue 4, pp. 1416-1428 (2003) """ res = (-1) ** (int(j_1 + j_2 + j_4 + j_5)) * \ racah(j_1, j_2, j_5, j_4, j_3, j_6, prec) return res | 88e8ded3e4e8fadbc380d719dcf3bdc6eab9d557 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/88e8ded3e4e8fadbc380d719dcf3bdc6eab9d557/wigner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
341,
724,
264,
67,
26,
78,
12,
78,
67,
21,
16,
525,
67,
22,
16,
525,
67,
23,
16,
525,
67,
24,
16,
525,
67,
25,
16,
525,
67,
26,
16,
13382,
33,
7036,
4672,
436,
8395,
9029,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
341,
724,
264,
67,
26,
78,
12,
78,
67,
21,
16,
525,
67,
22,
16,
525,
67,
23,
16,
525,
67,
24,
16,
525,
67,
25,
16,
525,
67,
26,
16,
13382,
33,
7036,
4672,
436,
8395,
9029,
326,... | |
o=objects[-1] | o=objects.pop() | def commit(self, subtransaction=None): 'Finalize the transaction' | bd19915024199a14de29dd3e73c75b5eaf5e7d64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/bd19915024199a14de29dd3e73c75b5eaf5e7d64/Transaction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
12,
2890,
16,
720,
7958,
33,
7036,
4672,
296,
7951,
554,
326,
2492,
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,
... | [
1,
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,
3294,
12,
2890,
16,
720,
7958,
33,
7036,
4672,
296,
7951,
554,
326,
2492,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
TixSubWidget.__init__(self, master, name, destroy_physically) self.subwidget_list['entry'] = _dummyEntry(self, 'entry') self.subwidget_list['arrow'] = _dummyButton(self, 'arrow') self.subwidget_list['slistbox'] = _dummyScrolledListBox(self, 'slistbox') self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox', destroy_physically=0) | TixSubWidget.__init__(self, master, name, destroy_physically) self.subwidget_list['entry'] = _dummyEntry(self, 'entry') self.subwidget_list['arrow'] = _dummyButton(self, 'arrow') self.subwidget_list['slistbox'] = _dummyScrolledListBox(self, 'slistbox') self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox', destroy_physically=0) | def __init__(self, master, name, destroy_physically=1): | 22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
1900,
6478,
33,
21,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
1900,
6478,
33,
21,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
u"""goes through regEx* and download<x> options to see if any of them provide a positive match. Returns False if Not. Returns a DownloadItemConfig dictionary if so""" | u"""goes through regEx* and download<x> options to see if any of them provide a positive match. Returns False if Not. Returns a DownloadItemConfig dictionary if so""" | def checkRegEx(tName, itemNode): u"""goes through regEx* and download<x> options to see if any of them provide a positive match. Returns False if Not. Returns a DownloadItemConfig dictionary if so""" if getConfig()['threads'][tName]['downloads']: # save this as a type. It will return a tuple. Check against tuple[0], return the tuple LDown = checkRegExDown(tName, itemNode) if LDown: return LDown else: return False elif checkRegExGFalse(tName, itemNode) and checkRegExGTrue(tName, itemNode): return DownloadItemConfig() else: return False | 633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
1617,
424,
12,
88,
461,
16,
761,
907,
4672,
582,
8395,
3240,
281,
3059,
960,
424,
14,
471,
4224,
32,
92,
34,
702,
358,
2621,
309,
1281,
434,
2182,
5615,
279,
6895,
845,
18,
2860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
1617,
424,
12,
88,
461,
16,
761,
907,
4672,
582,
8395,
3240,
281,
3059,
960,
424,
14,
471,
4224,
32,
92,
34,
702,
358,
2621,
309,
1281,
434,
2182,
5615,
279,
6895,
845,
18,
2860... |
for account in pool.get('account.account').browse(cr, uid, ids): | for account in pool.get('account.account').browse(cr, uid, ids, context={'fiscalyear': fy_id}): | def _data_save(self, cr, uid, data, context): if not data['form']['sure']: raise wizard.except_wizard('UserError', 'Closing of fiscal year canceled, please check the box !') pool = pooler.get_pool(cr.dbname) fy_id = data['form']['fy_id'] if data['form']['report_new']: period = pool.get('account.fiscalyear').browse(cr, uid, data['form']['fy2_id']).period_ids[0] cr.execute('select id from account_account WHERE active') ids = map(lambda x: x[0], cr.fetchall()) for account in pool.get('account.account').browse(cr, uid, ids): if account.close_method=='none' or account.type == 'view': continue if account.close_method=='balance': if abs(account.balance)>0.0001: pool.get('account.move.line').create(cr, uid, { 'debit': account.balance>0 and account.balance, 'credit': account.balance<0 and -account.balance, 'name': data['form']['report_name'], 'date': period.date_start, 'journal_id': data['form']['report_journal'], 'period_id': period.id, 'account_id': account.id }, {'journal_id': data['form']['report_journal'], 'period_id':period.id}) if account.close_method=='unreconciled': offset = 0 limit = 100 while True: cr.execute('select name,quantity,debit,credit,account_id,ref,amount_currency,currency_id,blocked,partner_id,date_maturity,date_created from account_move_line where account_id=%d and period_id in (select id from account_period where fiscalyear_id=%d) and reconcile_id is NULL order by id limit %d offset %d', (account.id,fy_id, limit, offset)) result = cr.dictfetchall() if not result: break for move in result: move.update({ 'date': period.date_start, 'journal_id': data['form']['report_journal'], 'period_id': period.id, }) pool.get('account.move.line').create(cr, uid, move, {'journal_id': data['form']['report_journal'], 'period_id':period.id}) offset += limit if account.close_method=='detail': offset = 0 limit = 100 while True: cr.execute('select name,quantity,debit,credit,account_id,ref,amount_currency,currency_id,blocked,partner_id,date_maturity,date_created from account_move_line where account_id=%d and period_id in (select id from account_period where fiscalyear_id=%d) order by id limit %d offset %d', (account.id,fy_id, limit, offset)) result = cr.dictfetchall() if not result: break for move in result: move.update({ 'date': period.date_start, 'journal_id': data['form']['report_journal'], 'period_id': period.id, }) pool.get('account.move.line').create(cr, uid, move) offset += limit cr.execute('update account_journal_period set state=%s where period_id in (select id from account_period where fiscalyear_id=%d)', ('done',fy_id)) cr.execute('update account_period set state=%s where fiscalyear_id=%d', ('done',fy_id)) cr.execute('update account_fiscalyear set state=%s where id=%d', ('done',fy_id)) return {} | cbed0308ea0f0aa1b0e71e40e5f4e4749afa8f77 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/cbed0308ea0f0aa1b0e71e40e5f4e4749afa8f77/wizard_fiscalyear_close.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
892,
67,
5688,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
309,
486,
501,
3292,
687,
21712,
2055,
3546,
30,
1002,
24204,
18,
14137,
67,
31837,
2668,
1299,
668,
2187,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
892,
67,
5688,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
309,
486,
501,
3292,
687,
21712,
2055,
3546,
30,
1002,
24204,
18,
14137,
67,
31837,
2668,
1299,
668,
2187,
296... |
if samlSignonUri != '' or properties['samlSignonUri'] == None: | if samlSignonUri != None: | def UpdateSSOSettings(self, enableSSO=None, samlSignonUri=None, samlLogoutUri=None, changePasswordUri=None, ssoWhitelist=None, useDomainSpecificIssuer=None): """Update SSO Settings. | 39ff62bdf32f9224034e15871b36a74efdb93966 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6580/39ff62bdf32f9224034e15871b36a74efdb93966/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
1260,
51,
2628,
12,
2890,
16,
4237,
1260,
51,
33,
7036,
16,
22835,
2766,
265,
3006,
33,
7036,
16,
22835,
19456,
3006,
33,
7036,
16,
2549,
3913,
3006,
33,
7036,
16,
27250,
18927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
1260,
51,
2628,
12,
2890,
16,
4237,
1260,
51,
33,
7036,
16,
22835,
2766,
265,
3006,
33,
7036,
16,
22835,
19456,
3006,
33,
7036,
16,
2549,
3913,
3006,
33,
7036,
16,
27250,
18927,
... |
self.c = omero.client(['--Ice.Config='+','.join(self.ice_config)]) | if self.host is not None: logger.info('host: %s, port: %i' % (str(self.host), int(self.port))) self.c = omero.client(host=str(self.host), port=int(self.port)) else: logger.info('--Ice.Config='+','.join(self.ice_config)) self.c = omero.client(pmap=['--Ice.Config='+','.join(self.ice_config)]) | def _resetOmeroClient (self): self.c = omero.client(['--Ice.Config='+','.join(self.ice_config)]) | d42aaeda7a608f80cc864535787b56892da1c3fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/d42aaeda7a608f80cc864535787b56892da1c3fb/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6208,
51,
81,
2439,
1227,
261,
2890,
4672,
365,
18,
71,
273,
8068,
2439,
18,
2625,
12,
3292,
413,
45,
311,
18,
809,
2218,
15,
2187,
10332,
5701,
12,
2890,
18,
1812,
67,
1425,
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,
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,
6208,
51,
81,
2439,
1227,
261,
2890,
4672,
365,
18,
71,
273,
8068,
2439,
18,
2625,
12,
3292,
413,
45,
311,
18,
809,
2218,
15,
2187,
10332,
5701,
12,
2890,
18,
1812,
67,
1425,
13... |
index += 1 | def parse_argument(tokens): """parses function call arguments""" l = len(tokens) index = 0 arguments = [] last_token = None building_kw = False kw_built = False stararg_token = None dstararg_token = None while index < l: cur_token = tokens[index] index += 1 if not isinstance(cur_token, TokenObject): if not building_kw: arguments.append(cur_token) else: last_token = arguments.pop() assert isinstance(last_token, ast.Name) # used by rtyper arguments.append(ast.Keyword(last_token.varname, cur_token)) building_kw = False kw_built = True elif cur_token.name == tok.COMMA: continue elif cur_token.name == tok.EQUAL: building_kw = True continue elif cur_token.name == tok.STAR or cur_token.name == tok.DOUBLESTAR: if cur_token.name == tok.STAR: stararg_token = tokens[index] index += 1 if index >= l: break index += 2 # Skip COMMA and DOUBLESTAR dstararg_token = tokens[index] break elif cur_token.get_value() == 'for': if len(arguments) != 1: raise ValueError('SyntaxError("invalid syntax")') # xxx lineno... expr = arguments[0] genexpr_for = parse_genexpr_for(tokens[index-1:]) genexpr_for[0].is_outmost = True gexp = ast.GenExpr(ast.GenExprInner(expr, genexpr_for)) arguments[0] = gexp break return arguments, stararg_token, dstararg_token | 0ad253fce917af2fcbc8fbaa80ab11a340664975 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/0ad253fce917af2fcbc8fbaa80ab11a340664975/astbuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3446,
12,
7860,
4672,
3536,
1065,
2420,
445,
745,
1775,
8395,
328,
273,
562,
12,
7860,
13,
770,
273,
374,
1775,
273,
5378,
1142,
67,
2316,
273,
599,
10504,
67,
9987,
273,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
3446,
12,
7860,
4672,
3536,
1065,
2420,
445,
745,
1775,
8395,
328,
273,
562,
12,
7860,
13,
770,
273,
374,
1775,
273,
5378,
1142,
67,
2316,
273,
599,
10504,
67,
9987,
273,
108... | |
authorized_results = [] | authorized_results = [] | def sortkey(row): val = row[idx] # check if we have sort_values, then use them as keys. if sort_values: return sort_values.get(val) # otherwise, continue with string comparison: if isinstance(val, basestring): val = val.lower() return val | 7791c448d96ebf3665d60e2764a6e1dec34e8db9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/7791c448d96ebf3665d60e2764a6e1dec34e8db9/report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1524,
856,
12,
492,
4672,
1244,
273,
1027,
63,
3465,
65,
468,
866,
309,
732,
1240,
1524,
67,
2372,
16,
1508,
999,
2182,
487,
1311,
18,
309,
1524,
67,
2372,
30,
327,
1524,
67,
2372,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1524,
856,
12,
492,
4672,
1244,
273,
1027,
63,
3465,
65,
468,
866,
309,
732,
1240,
1524,
67,
2372,
16,
1508,
999,
2182,
487,
1311,
18,
309,
1524,
67,
2372,
30,
327,
1524,
67,
2372,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.