rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
result = S_ERROR('JobDB.setAtticJobParameter: operation failed.')
result = S_ERROR( 'JobDB.setAtticJobParameter: operation failed.' )
def setAtticJobParameter(self,jobID,key,value,rescheduleCounter): """ Set attic parameter for job specified by its jobID when job rescheduling for later debugging """ ret = self._escapeString(jobID) if not ret['OK']: return ret jobID = ret['Value']
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, 444, 3075, 335, 2278, 1662, 12, 2890, 16, 4688, 734, 16, 856, 16, 1132, 16, 455, 2847, 4789, 4672, 3536, 1000, 2403, 335, 1569, 364, 1719, 1269, 635, 2097, 28913, 1347, 1719, 400, 13252,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3075, 335, 2278, 1662, 12, 2890, 16, 4688, 734, 16, 856, 16, 1132, 16, 455, 2847, 4789, 4672, 3536, 1000, 2403, 335, 1569, 364, 1719, 1269, 635, 2097, 28913, 1347, 1719, 400, 13252,...
result = utils.RunCmd(["mdadm", "--zero-superblock", "--force", i.dev_path]) if result.failed: logger.Error("Can't zero superblock: %s" % result.fail_reason)
try: cls._ZeroSuperblock(i.dev_path) except EnvironmentError, err: logger.Error("Can't zero superblock for %s: %s" % (i.dev_path, str(err)))
def Create(cls, unique_id, children, size): """Create a new MD raid1 array.
1a87dca7319a3ebdbc83e91a5042497abb15576e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7542/1a87dca7319a3ebdbc83e91a5042497abb15576e/bdev.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 12, 6429, 16, 3089, 67, 350, 16, 2325, 16, 963, 4672, 3536, 1684, 279, 394, 10852, 767, 350, 21, 526, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 12, 6429, 16, 3089, 67, 350, 16, 2325, 16, 963, 4672, 3536, 1684, 279, 394, 10852, 767, 350, 21, 526, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
print "run: ", self.proc.pid
self.log.info("server running at pid: %d", self.proc.pid)
def run(self): try: print "will run:", ' '.join(self.args) self.proc = subprocess.Popen(self.args, shell=False, cwd=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE) self.is_running = True print "run: ", self.proc.pid pob = select.poll() pob.register(self.proc.stdout) pob.register(self.proc.stderr) fdd = { self.proc.stdout.fileno(): self.proc.stdout , self.proc.stderr.fileno(): self.proc.stderr } while True: self.proc.poll() if self.proc.returncode is not None: break # Now, see if we have output: p = pob.poll(10000) for fd, event in p: if event == select.POLLIN: r = fdd[fd].readline() if r.endswith("\n"): r = r[:-1] if not r: continue m = self.linere.match(r) if m: for regex, funct in self.__parsers.get(m.group(3),[]): if isinstance(regex, basestring): if regex == m.group(4): funct(m.group(3), m.group(2), m.group(4)) else: # elif isinstance(regex, re.RegexObject): mm = regex.match(m.group(4)) if mm: funct(m.group(3), m.group(3), mm) # now, print the line at stdout print r
2d17231adf555f05c40cb6f44f8923db65935f0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/2d17231adf555f05c40cb6f44f8923db65935f0c/base_quality_interrogation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 775, 30, 1172, 315, 20194, 1086, 2773, 16, 296, 2418, 5701, 12, 2890, 18, 1968, 13, 365, 18, 9381, 273, 6652, 18, 52, 3190, 12, 2890, 18, 1968, 16, 5972, 33, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 775, 30, 1172, 315, 20194, 1086, 2773, 16, 296, 2418, 5701, 12, 2890, 18, 1968, 13, 365, 18, 9381, 273, 6652, 18, 52, 3190, 12, 2890, 18, 1968, 16, 5972, 33, 83...
drawer.drawRubberBand(self.pStart, self.pPrev, self.point2, self.point3, self.rbwcolor)
drawer.drawrectangle(self.pStart, self.pPrev, self.o.up, self.o.right, self.rbwcolor)
def leftUp(self, event): """"Erase the final rubber band window and do zoom if user indeed draws a rubber band window""" cWxy = (event.pos().x(), self.o.height - event.pos().y()) zoomX = (abs(cWxy[0] - self.pWxy[0]) + 0.0) / (self.o.width + 0.0) zoomY = (abs(cWxy[1] - self.pWxy[1]) + 0.0) / (self.o.height + 0.0)
22361c9172ed9bd5265127a6d19306786a0928a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/22361c9172ed9bd5265127a6d19306786a0928a7/zoomMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2002, 1211, 12, 2890, 16, 871, 4672, 3536, 6, 41, 5648, 326, 727, 24997, 744, 8937, 2742, 471, 741, 7182, 309, 729, 316, 323, 329, 377, 30013, 279, 24997, 744, 8937, 2742, 8395, 276, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2002, 1211, 12, 2890, 16, 871, 4672, 3536, 6, 41, 5648, 326, 727, 24997, 744, 8937, 2742, 471, 741, 7182, 309, 729, 316, 323, 329, 377, 30013, 279, 24997, 744, 8937, 2742, 8395, 276, 5...
self.push_handler(reference, handler)
self.push_handler(uri, handler)
def get_handler(self, reference, cls=None): uri = cwd.get_reference(reference)
70692c38f19264d6c79a01a29c313074df6197a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12681/70692c38f19264d6c79a01a29c313074df6197a3/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4176, 12, 2890, 16, 2114, 16, 2028, 33, 7036, 4672, 2003, 273, 7239, 18, 588, 67, 6180, 12, 6180, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4176, 12, 2890, 16, 2114, 16, 2028, 33, 7036, 4672, 2003, 273, 7239, 18, 588, 67, 6180, 12, 6180, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
left, right, top, bottom = add_word(width, height, left, right, top, bottom, ls, ws)
left, right, top, bottom = add_word(width, height, left, right, top, bottom, height, ws)
def add_word(width, height, left, right, top, bottom, ls, ws): if left + width > maxwidth: left = width + ws top += ls bottom = top+ls if top+ls > bottom else bottom else: left += (width + ws) right = left if left > right else right bottom = top+ls if top+ls > bottom else bottom return left, right, top, bottom
c4e336a06004e2cb0c8b9010643d0d2d8572a079 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/c4e336a06004e2cb0c8b9010643d0d2d8572a079/table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1095, 12, 2819, 16, 2072, 16, 2002, 16, 2145, 16, 1760, 16, 5469, 16, 7180, 16, 4945, 4672, 309, 2002, 397, 1835, 405, 943, 2819, 30, 2002, 273, 1835, 397, 4945, 1760, 1011, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1095, 12, 2819, 16, 2072, 16, 2002, 16, 2145, 16, 1760, 16, 5469, 16, 7180, 16, 4945, 4672, 309, 2002, 397, 1835, 405, 943, 2819, 30, 2002, 273, 1835, 397, 4945, 1760, 1011, ...
assert is_constant(other)
if not is_constant(other): return NotImplemented
def __rmul__(self, other): assert is_constant(other)
5d2c8a71a7379883064432e08f6b031f5ce9f6ba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12571/5d2c8a71a7379883064432e08f6b031f5ce9f6ba/primitives.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8864, 332, 972, 12, 2890, 16, 1308, 4672, 1815, 353, 67, 14384, 12, 3011, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 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, 1001, 8864, 332, 972, 12, 2890, 16, 1308, 4672, 1815, 353, 67, 14384, 12, 3011, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
raise NotImplemented()
raise NotImplementedError()
def _GetOpener(self): """Returns an OpenerDirector for making HTTP requests.
372b635f16b9051bf467c481e9fdbfc5f451cc3a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/476/372b635f16b9051bf467c481e9fdbfc5f451cc3a/upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 967, 3817, 708, 12, 2890, 4672, 3536, 1356, 392, 6066, 708, 28280, 364, 10480, 2239, 3285, 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, 389, 967, 3817, 708, 12, 2890, 4672, 3536, 1356, 392, 6066, 708, 28280, 364, 10480, 2239, 3285, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
_names[name] = codepoint
_names[name] = unichr(codepoint)
def init(path): with open(os.path.join(path, 'UnicodeData.txt')) as data: for row in data: cols = row.split(';') codepoint = int(cols[0], 16) name = cols[1] data = ( cols[2], get_int(cols[3]), cols[4], cols[5], get_int(cols[6]), get_int(cols[7]), get_numeric(cols[8]), get_yn(cols[9])) if name.find('First') >= 0: start = codepoint elif name.find('Last') >= 0: _segments.append((start, (start, codepoint), data)) else: _names[name] = codepoint _codepoints[codepoint] = data
767a7d7fa7610deb82e106ab0545a4d336e21b11 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6753/767a7d7fa7610deb82e106ab0545a4d336e21b11/unicodedata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 803, 4672, 598, 1696, 12, 538, 18, 803, 18, 5701, 12, 803, 16, 296, 16532, 751, 18, 5830, 26112, 487, 501, 30, 364, 1027, 316, 501, 30, 5347, 273, 1027, 18, 4939, 2668, 435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 803, 4672, 598, 1696, 12, 538, 18, 803, 18, 5701, 12, 803, 16, 296, 16532, 751, 18, 5830, 26112, 487, 501, 30, 364, 1027, 316, 501, 30, 5347, 273, 1027, 18, 4939, 2668, 435...
if not tabnum:
if tabnum is None:
def closetab(self, widget, label): """Close a tab""" tabnum = None try: nb = widget.notebook except AttributeError: err('TabLabel::closetab: called on non-Notebook: %s' % widget) return
741c6a901da9c291fe034e8b9630d6442f1cfe65 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1032/741c6a901da9c291fe034e8b9630d6442f1cfe65/notebook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1219, 542, 378, 12, 2890, 16, 3604, 16, 1433, 4672, 3536, 4605, 279, 3246, 8395, 3246, 2107, 273, 599, 775, 30, 4264, 273, 3604, 18, 24422, 1335, 6394, 30, 393, 2668, 5661, 2224, 2866, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1219, 542, 378, 12, 2890, 16, 3604, 16, 1433, 4672, 3536, 4605, 279, 3246, 8395, 3246, 2107, 273, 599, 775, 30, 4264, 273, 3604, 18, 24422, 1335, 6394, 30, 393, 2668, 5661, 2224, 2866, ...
(ComboProcessor, "IDC_ACTION_CERTAIN", "Filter.spam_action"),
(ComboProcessor, "IDC_ACTION_CERTAIN", "Filter.spam_action", _("Untouched,Moved,Copied")),
def WizardTrainer(mgr, config, progress): import os, manager, train bayes_base = os.path.join(mgr.data_directory, "$sbwiz$default_bayes_database") mdb_base = os.path.join(mgr.data_directory, "$sbwiz$default_message_database") fnames = [] for ext in ".pck", ".db": fnames.append(bayes_base+ext) fnames.append(mdb_base+ext) config.wizard.temp_training_names = fnames # determine which db manager to use, and create it. ManagerClass = manager.GetStorageManagerClass() db_manager = ManagerClass(bayes_base, mdb_base) classifier_data = manager.ClassifierData(db_manager, mgr) classifier_data.InitNew() rescore = config.training.rescore if rescore: stages = (_("Training"), .3), (_("Saving"), .1), (_("Scoring"), .6) else: stages = (_("Training"), .9), (_("Saving"), .1) progress.set_stages(stages) train.real_trainer(classifier_data, config, mgr.message_store, progress) # xxx - more hacks - we should pass the classifier data in. orig_classifier_data = mgr.classifier_data mgr.classifier_data = classifier_data # temporary try: progress.tick() if rescore: # Setup the "filter now" config to what we want. now_config = config.filter_now now_config.only_unread = False now_config.only_unseen = False now_config.action_all = False now_config.folder_ids = config.training.ham_folder_ids + \ config.training.spam_folder_ids now_config.include_sub = config.training.ham_include_sub or \ config.training.spam_include_sub import filter filter.filterer(mgr, config, progress) bayes = classifier_data.bayes progress.set_status(_("Completed training with %d spam and %d good messages") \ % (bayes.nspam, bayes.nham)) finally: mgr.wizard_classifier_data = classifier_data mgr.classifier_data = orig_classifier_data
10491db4e7a3a059160ec55848768e52fb920909 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9857/10491db4e7a3a059160ec55848768e52fb920909/dialog_map.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 678, 13412, 1609, 14522, 12, 13552, 16, 642, 16, 4007, 4672, 1930, 1140, 16, 3301, 16, 4691, 324, 528, 281, 67, 1969, 273, 1140, 18, 803, 18, 5701, 12, 13552, 18, 892, 67, 5149, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 678, 13412, 1609, 14522, 12, 13552, 16, 642, 16, 4007, 4672, 1930, 1140, 16, 3301, 16, 4691, 324, 528, 281, 67, 1969, 273, 1140, 18, 803, 18, 5701, 12, 13552, 18, 892, 67, 5149, 16, ...
hosts = ['cnn.com', 'google.com', 'justin.tv', 'yahoo.com', 'nytimes.com', 'ustream.tv', 'ycombinator.com', 'blogtv.com', 'comcast.com', 'ea.com']
hosts = ['cnn.com']
def ping(self, addr, id=1, seq=1, ttl=255, verbose = False): addr = socket.gethostbyname(addr) packet = self.create_packet(addr, id, seq) if verbose: print "Pinging %s (id=%s seq=%s ttl=%s)" % (addr, id, seq, ttl) self.sock.setsockopt(socket.SOL_IP, socket.IP_TTL, ttl) # Python requires a tuple of (addr, port), but the system call actually doesn't # require a port. So we'll send '1' as a dummy port value. self.sock.sendto(packet, (addr, 1))
3c34263318a1e65a32d41818db27c10826efef4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13481/3c34263318a1e65a32d41818db27c10826efef4c/probe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10087, 12, 2890, 16, 3091, 16, 612, 33, 21, 16, 3833, 33, 21, 16, 6337, 33, 10395, 16, 3988, 273, 1083, 4672, 3091, 273, 2987, 18, 75, 546, 669, 1637, 529, 12, 4793, 13, 4414, 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, 10087, 12, 2890, 16, 3091, 16, 612, 33, 21, 16, 3833, 33, 21, 16, 6337, 33, 10395, 16, 3988, 273, 1083, 4672, 3091, 273, 2987, 18, 75, 546, 669, 1637, 529, 12, 4793, 13, 4414, 273, ...
spec = PerfectSpecializer(Loop(A.ops))
spec = PerfectSpecializer(Loop(A.inputargs, A.ops))
def test_A_find_nodes(): spec = PerfectSpecializer(Loop(A.ops)) spec.find_nodes() assert spec.nodes[A.fr].virtualized
42b0e930c018a70ed65878b3831250f8a7f68673 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/42b0e930c018a70ed65878b3831250f8a7f68673/test_vable_optimize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 37, 67, 4720, 67, 4690, 13332, 857, 273, 5722, 74, 386, 1990, 3926, 12, 6452, 12, 37, 18, 2630, 1968, 16, 432, 18, 4473, 3719, 857, 18, 4720, 67, 4690, 1435, 1815, 857, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 37, 67, 4720, 67, 4690, 13332, 857, 273, 5722, 74, 386, 1990, 3926, 12, 6452, 12, 37, 18, 2630, 1968, 16, 432, 18, 4473, 3719, 857, 18, 4720, 67, 4690, 1435, 1815, 857, 18,...
return { '%sResponse'%action.name: r}
r= { '%sResponse'%action.name: r} return r
def get_action_results(self, result, action): """ check for out arguments if yes: check if there are related ones to StateVariables with non A_ARG_TYPE_ prefix if yes: check if there is a call plugin method for this action if yes: update StateVariable values with call result if no: get StateVariable values and add them to result dict """ #print 'get_action_results', result #print 'get_action_results', action r = result notify = [] for argument in action.get_out_arguments(): #print 'get_state_variable_contents', argument.name if argument.name[0:11] != 'A_ARG_TYPE_': if action.get_callback() != None: variable = self.variables[0][argument.get_state_variable()] variable.update(r[argument.name]) #print 'update state variable contents', variable.name, variable.value, variable.send_events #self.server.set_variable( 0, argument.get_state_variable(), r[argument.name]) if variable.send_events == 'yes': notify.append(variable) else: variable = self.variables[0][argument.get_state_variable()] #print 'get state variable contents', variable.name, variable.value r[argument.name] = variable.value #print "r", r self.service.propagate_notification(notify) return { '%sResponse'%action.name: r}
86a3d0345cb1b5db61a85fa7c0fe938bb8024df6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11626/86a3d0345cb1b5db61a85fa7c0fe938bb8024df6/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1128, 67, 4717, 12, 2890, 16, 563, 16, 1301, 4672, 3536, 866, 364, 596, 1775, 309, 12465, 30, 866, 309, 1915, 854, 3746, 5945, 358, 3287, 6158, 598, 1661, 432, 67, 10973, 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, 336, 67, 1128, 67, 4717, 12, 2890, 16, 563, 16, 1301, 4672, 3536, 866, 364, 596, 1775, 309, 12465, 30, 866, 309, 1915, 854, 3746, 5945, 358, 3287, 6158, 598, 1661, 432, 67, 10973, 67, ...
g.load("file:///"+__scriptdir__+"/etc/sfs-extra.n3", format="n3")
g.load("file://"+__scriptdir__+"/etc/sfs-extra.n3", format="n3")
def Parse(self,basefile,files): self.id = basefile # find out when data was last fetched (use the oldest file) timestamp = sys.maxint for filelist in files.values(): for file in filelist: if os.path.getmtime(file) < timestamp: timestamp = os.path.getmtime(file) registry = self._parseSFSR(files['sfsr']) try: plaintext = self._extractSFST(files['sfst']) # FIXME: Maybe Parser classes should be directly told what the # current basedir is, rather than having to do it the ugly way # (c.f. RegPubParser.Parse, which does something similar to # the below) plaintextfile = files['sfst'][0].replace(".html", ".txt").replace("downloaded/sfst", "intermediate") Util.ensureDir(plaintextfile) tmpfile = mktemp() f = codecs.open(tmpfile, "w",'iso-8859-1') f.write(plaintext) f.close() Util.replace_if_different(tmpfile,plaintextfile) patchfile = 'patches/sfs/%s.patch' % basefile if os.path.exists(patchfile): patchedfile = mktemp() # we don't want to sweep the fact that we're patching under the carpet log.warning(u'%s: Applying patch %s' % (basefile, patchfile)) cmd = 'patch -s %s %s -o %s' % (plaintextfile, patchfile, patchedfile) log.debug(u'%s: running %s' % (basefile,cmd)) (ret, stdout, stderr) = Util.runcmd(cmd) if ret == 0: # successful patch # patch from cygwin always seem to produce unix lineendings cmd = 'unix2dos %s' % patchedfile log.debug(u'%s: running %s' % (basefile,cmd)) (ret, stdout, stderr) = Util.runcmd(cmd) if ret == 0: plaintextfile = patchedfile else: log.warning(u"%s: Failed lineending conversion: %s" % (basefile,stderr)) else: log.warning(u"%s: Could not apply patch %s: %s" % (basefile, patchfile, stdout.strip())) (meta, body) = self._parseSFST(plaintextfile, registry) except IOError: log.warning("%s: Fulltext saknas" % self.id) # extractSFST misslyckades, d det fanns ngon post i # SFST-databasen (det hnder alltfr ofta att bara # SFSR-databasen r uppdaterad). Fejka ihop en meta # (Forfattningsinfo) och en body (Forfattning) utifrn # SFSR-datat
d9f0b4bdde70087e0e3d401edb03a7a4f1da76b8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4027/d9f0b4bdde70087e0e3d401edb03a7a4f1da76b8/SFS.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 12, 2890, 16, 1969, 768, 16, 2354, 4672, 365, 18, 350, 273, 1026, 768, 468, 1104, 596, 1347, 501, 1703, 1142, 12807, 261, 1202, 326, 17067, 585, 13, 2858, 273, 2589, 18, 1896, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 12, 2890, 16, 1969, 768, 16, 2354, 4672, 365, 18, 350, 273, 1026, 768, 468, 1104, 596, 1347, 501, 1703, 1142, 12807, 261, 1202, 326, 17067, 585, 13, 2858, 273, 2589, 18, 1896, 47...
container = self.root.appendChild(self.doc.createElement(self.verb)) for item in data: id, ctime = item container.appendChild(self.make_record_header(id, ctime)) if count - offset > self.max_records_per_response: token = self.root.appendChild(self.doc.createElement('resumptionToken')) token.setAttribute('completeListSize', str(count)) token.appendChild(self.doc.createTextNode(str(offset + len(data)))) elif offset: token = self.root.appendChild(self.doc.createElement('resumptionToken')) token.setAttribute('completeListSize', str(count))
if len(data): container = self.root.appendChild(self.doc.createElement(self.verb)) for item in data: id, ctime = item container.appendChild(self.make_record_header(id, ctime)) if count - offset > self.max_records_per_response: token = self.root.appendChild(self.doc.createElement('resumptionToken')) token.setAttribute('completeListSize', str(count)) token.appendChild(self.doc.createTextNode(str(offset + len(data)))) elif offset: token = self.root.appendChild(self.doc.createElement('resumptionToken')) token.setAttribute('completeListSize', str(count)) else: self.error("noRecordsMatch")
def list_identifiers(self, from_time, until_time, token = None): """Append ListIdentifiers result""" offset = 0 if token: try: offset = int(token) except ValueError: self.error('badArgument', 'Incorrect resumption token') return
a106706fcc96d9384a7ad0073b69860032af46ec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12043/a106706fcc96d9384a7ad0073b69860032af46ec/oai.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 20218, 12, 2890, 16, 628, 67, 957, 16, 3180, 67, 957, 16, 1147, 273, 599, 4672, 3536, 5736, 987, 12745, 563, 8395, 1384, 273, 374, 309, 1147, 30, 775, 30, 1384, 273, 509, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 20218, 12, 2890, 16, 628, 67, 957, 16, 3180, 67, 957, 16, 1147, 273, 599, 4672, 3536, 5736, 987, 12745, 563, 8395, 1384, 273, 374, 309, 1147, 30, 775, 30, 1384, 273, 509, 12...
self.push_output_collector(self.abstract)
self.push_output_collector(self.abstract)
def visit_topic(self, node): # Topic nodes can be generic topic, abstract, dedication, or ToC. # table of contents: if 'contents' in node['classes']: self.out.append('\n') self.out += self.ids_to_labels(node) # add contents to PDF bookmarks sidebar if isinstance(node.next_node(), nodes.title): self.out.append('\n\\pdfbookmark[%d]{%s}{%s}\n' % (self.section_level+1, node.next_node().astext(), node.get('ids', ['contents'])[0] )) if self.use_latex_toc: title = '' if isinstance(node.next_node(), nodes.title): title = self.encode(node.pop(0).astext()) depth = node.get('depth', 0) if 'local' in node['classes']: self.minitoc(title, node, depth) self.context.append('') return if depth: self.out.append('\\setcounter{tocdepth}{%d}\n' % depth) if title != 'Contents': self.out.append('\\renewcommand{\\contentsname}{%s}\n' % title) self.out.append('\\tableofcontents\n\n') self.has_latex_toc = True else: # Docutils generated contents list # set flag for visit_bullet_list() and visit_title() self.is_toc_list = True self.context.append('') elif ('abstract' in node['classes'] and self.settings.use_latex_abstract): self.push_output_collector(self.abstract) self.out.append('\\begin{abstract}') self.context.append('\\end{abstract}\n') if isinstance(node.next_node(), nodes.title): node.pop(0) # LaTeX provides its own title else: self.fallbacks['topic'] = PreambleCmds.topic # special topics: if 'abstract' in node['classes']: self.fallbacks['abstract'] = PreambleCmds.abstract self.push_output_collector(self.abstract) if 'dedication' in node['classes']: self.fallbacks['dedication'] = PreambleCmds.dedication self.push_output_collector(self.dedication) self.out.append('\n\\DUtopic[%s]{\n' % ','.join(node['classes'])) self.context.append('}\n')
839863406d16ba6236fa9348a1de79551ca2adf1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1532/839863406d16ba6236fa9348a1de79551ca2adf1/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 10476, 12, 2890, 16, 756, 4672, 468, 11789, 2199, 848, 506, 5210, 3958, 16, 8770, 16, 11140, 829, 16, 578, 2974, 39, 18, 468, 1014, 434, 2939, 30, 309, 296, 3980, 11, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 10476, 12, 2890, 16, 756, 4672, 468, 11789, 2199, 848, 506, 5210, 3958, 16, 8770, 16, 11140, 829, 16, 578, 2974, 39, 18, 468, 1014, 434, 2939, 30, 309, 296, 3980, 11, 316, ...
error_handler=log.err)
error_handler=d.errback)
def on_contact_fetched((_index, _name, _number)): self.assertEqual(name, _name) self.assertEqual(number, _number) # leave everything as found self.device.Delete(_index, dbus_interface=CTS_INTFACE, reply_handler=lambda: d.callback(True), # test finishes with lambda error_handler=log.err)
45c00959c14e666ef31b3f93137f14e6d66959e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12036/45c00959c14e666ef31b3f93137f14e6d66959e4/test_dbus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 8994, 67, 5754, 329, 12443, 67, 1615, 16, 389, 529, 16, 389, 2696, 3719, 30, 365, 18, 11231, 5812, 12, 529, 16, 389, 529, 13, 365, 18, 11231, 5812, 12, 2696, 16, 389, 2696, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8994, 67, 5754, 329, 12443, 67, 1615, 16, 389, 529, 16, 389, 2696, 3719, 30, 365, 18, 11231, 5812, 12, 529, 16, 389, 529, 13, 365, 18, 11231, 5812, 12, 2696, 16, 389, 2696, ...
id = (bank, (i, j))
pix_id = (bank, (i, j))
def filter_pixels(obj, paths, start_ids, end_ids, **kwargs): """ This function filters a set of pixels based on starting and ending IDs for each data path. Parameters: ---------- -> obj is a SOM that needs to be filtered -> paths is a list of tuples containing the NeXus data paths and signals -> start_ids is a list of tuples containing the starting ID pairs (i,j) for each data path in paths -> end_ids is a list of tuples containing the ending ID pairs (i,j) for each data path in paths Returns: ------- <- A tuple of containing the SOM with the pixels in the filter range and SOM containing the rest of the pixels not filtered Exceptions: ---------- <- TypeError is raised if obj is not a SOM <- RuntimeError is raised if the number of data paths, starting IDs and ending IDs are not all identical """ # import the helper functions import hlr_utils # set up for working through data (result, res_descr) = hlr_utils.empty_result(obj) o_descr = hlr_utils.get_descr(obj) if o_descr != "SOM": raise TypeError, "Only SOM operations supported" else: pass if len(paths) != len(start_ids) and len(start_ids) != len(end_ids): raise RuntimeError, "Data paths, starting ids and ending ids need "\ +"to have the same length." else: pass result = hlr_utils.copy_som_attr(result, res_descr, obj, o_descr) # Next three try/except blocks look for difference between list and tuple try: paths.reverse() paths.reverse() except AttributeError: temp = paths paths = [] paths.append(temp) try: start_ids.reverse() start_ids.reverse() except AttributeError: temp = start_ids start_ids = [] start_ids.append(temp) try: end_ids.reverse() end_ids.reverse() except AttributeError: temp = end_ids end_ids = [] end_ids.append(temp) for path, s_id, e_id in map(None, paths, start_ids, end_ids): bank = path[0].split('/')[-1] for i in range(s_id[0], e_id[0]): for j in range(s_id[1], e_id[1]): id = (bank, (i, j)) length = hlr_utils.get_length(obj) nabove = length + 1 nbelow = 0 index = nbelow - 1 while nabove - nbelow > 1: middle = (nabove + nbelow) / 2 if id == obj[middle-1].id: index = middle - 1 break if id < obj[middle-1].id: nabove = middle else: nbelow = middle if index != -1: so = obj.pop(index) hlr_utils.result_insert(result, res_descr, so, None, "all") return (result, obj)
29a15f400db9ebd08a8a99ae7637655a9392d7b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/29a15f400db9ebd08a8a99ae7637655a9392d7b2/hlr_filter_pixels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 21084, 12, 2603, 16, 2953, 16, 787, 67, 2232, 16, 679, 67, 2232, 16, 2826, 4333, 4672, 3536, 1220, 445, 3415, 279, 444, 434, 8948, 2511, 603, 5023, 471, 11463, 7115, 364, 151...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 21084, 12, 2603, 16, 2953, 16, 787, 67, 2232, 16, 679, 67, 2232, 16, 2826, 4333, 4672, 3536, 1220, 445, 3415, 279, 444, 434, 8948, 2511, 603, 5023, 471, 11463, 7115, 364, 151...
def duty_cycle(self, period)
def duty_cycle(self, period):
def duty_cycle(self, period) self._write("duty_cycle", period)
ce46558a0087bfadf0d48cb0a1fafd8137f12e4f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1413/ce46558a0087bfadf0d48cb0a1fafd8137f12e4f/pwm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 21348, 67, 13946, 12, 2890, 16, 3879, 4672, 365, 6315, 2626, 2932, 72, 21348, 67, 13946, 3113, 3879, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 302, 21348, 67, 13946, 12, 2890, 16, 3879, 4672, 365, 6315, 2626, 2932, 72, 21348, 67, 13946, 3113, 3879, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
r = fix_table_circular_deps( alltbl, dbg=1)
r = fix_table_circular_deps( alltbl, count_multiples = True, exclude_selfrefs= False, dbg= True)
def make_tables( me): t11 = Table('table11', me.meta, Column('name', Integer, ), Column('id', Integer, primary_key=True), Column('t12_id', Integer, ForeignKey('table12.id',) ) )
755eb0a2be530610e9c991c070001fd813523efb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10808/755eb0a2be530610e9c991c070001fd813523efb/ref_AxA.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 9373, 12, 1791, 4672, 268, 2499, 273, 3555, 2668, 2121, 2499, 2187, 1791, 18, 3901, 16, 4753, 2668, 529, 2187, 2144, 16, 262, 16, 4753, 2668, 350, 2187, 2144, 16, 3354, 67, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 9373, 12, 1791, 4672, 268, 2499, 273, 3555, 2668, 2121, 2499, 2187, 1791, 18, 3901, 16, 4753, 2668, 529, 2187, 2144, 16, 262, 16, 4753, 2668, 350, 2187, 2144, 16, 3354, 67, 8...
The Fourier coefficients up to and including $a_p$ of the modular form attached to this elliptic curve, for all primes $p\leq n$.
The Fourier coefficients $a_p$ of the modular form attached to this elliptic curve, for all primes $p\leq n$.
def aplist(self, n, python_ints=False): r""" The Fourier coefficients up to and including $a_p$ of the modular form attached to this elliptic curve, for all primes $p\leq n$.
95c03dd8fe032e35e516da8dcd1201fcd934b7e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/95c03dd8fe032e35e516da8dcd1201fcd934b7e6/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 279, 17842, 12, 2890, 16, 290, 16, 5790, 67, 28142, 33, 8381, 4672, 436, 8395, 1021, 478, 24775, 14229, 731, 358, 471, 6508, 271, 69, 67, 84, 8, 434, 326, 681, 2490, 646, 7495, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 279, 17842, 12, 2890, 16, 290, 16, 5790, 67, 28142, 33, 8381, 4672, 436, 8395, 1021, 478, 24775, 14229, 731, 358, 471, 6508, 271, 69, 67, 84, 8, 434, 326, 681, 2490, 646, 7495, 358, ...
cmd_list = [self.git_command() + \
if systemType == "Windows": cmd_list = [self.git_command() + \ ["archive", str(version + ':' + name)], ["%s:" % out_dirname[0], "&&", "cd", "%s"%out_dirname, "&&", 'tar', '-xf-']] else: cmd_list = [self.git_command() + \
def git_get_dir(self, name, version="HEAD", out_dirname=None): global temp_persist_files if out_dirname is None: # create a temporary directory out_dirname = tempfile.mkdtemp(prefix='vt_persist') temp_persist_files.append(out_dirname) cmd_list = [self.git_command() + \ ["archive", str(version + ':' + name)], ['tar', '-C', out_dirname, '-xf-']] debug_print('executing commands', cmd_list) result, output, errs = execute_piped_cmdlines(cmd_list) debug_print('stdout:', type(output), output) debug_print('stderr:', type(errs), errs) if result != 0: # check output for error messages raise ModuleError(self, "Error retrieving file '%s'\n" % name + errs) return out_dirname
430e29bcaf2ef3a86df6d88fe381e758d1b68b40 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/430e29bcaf2ef3a86df6d88fe381e758d1b68b40/init.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5071, 67, 588, 67, 1214, 12, 2890, 16, 508, 16, 1177, 1546, 12458, 3113, 596, 67, 12287, 33, 7036, 4672, 2552, 1906, 67, 19251, 67, 2354, 309, 596, 67, 12287, 353, 599, 30, 468, 752, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5071, 67, 588, 67, 1214, 12, 2890, 16, 508, 16, 1177, 1546, 12458, 3113, 596, 67, 12287, 33, 7036, 4672, 2552, 1906, 67, 19251, 67, 2354, 309, 596, 67, 12287, 353, 599, 30, 468, 752, ...
extra = {'rebase_source': repo[rev].hex()} if extrafn: extrafn(repo[rev], extra) newrev = concludenode(repo, rev, p1, p2, extra=extra)
newrev = concludenode(repo, rev, p1, p2, extrafn=extrafn)
def extrafn(ctx, extra): extra['branch'] = ctx.branch()
f8d0e26d18ad8445dcf96f3b42996393b7ff7cb4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/f8d0e26d18ad8445dcf96f3b42996393b7ff7cb4/rebase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7582, 1727, 82, 12, 5900, 16, 2870, 4672, 2870, 3292, 7500, 3546, 273, 1103, 18, 7500, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 7582, 1727, 82, 12, 5900, 16, 2870, 4672, 2870, 3292, 7500, 3546, 273, 1103, 18, 7500, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
status = "Unknown" minor = "Unknown" application = "Unknown"
status = "" minor = "" application = ""
def export_setJobStatusBulk(self,jobID,statusDict): """ Set various status fields for job specified by its JobId. Set only the last status in the JobDB, updating all the status logging information in the JobLoggingDB. The statusDict has datetime as a key and status information dictionary as values """
54f4b8164791ec05a20b748da970a5e1f9c9dca4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/54f4b8164791ec05a20b748da970a5e1f9c9dca4/JobStateUpdateHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 542, 23422, 13112, 12, 2890, 16, 4688, 734, 16, 2327, 5014, 4672, 3536, 1000, 11191, 1267, 1466, 364, 1719, 1269, 635, 2097, 30455, 18, 1000, 1338, 326, 1142, 1267, 316, 326, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 542, 23422, 13112, 12, 2890, 16, 4688, 734, 16, 2327, 5014, 4672, 3536, 1000, 11191, 1267, 1466, 364, 1719, 1269, 635, 2097, 30455, 18, 1000, 1338, 326, 1142, 1267, 316, 326, 3...
self.body.append('\n@EndList\n') self.kill_next_paragraph = True
self.body.append('\n@RawEndList\n')
def depart_field_list(self, node): self.body.append('\n@EndList\n') self.kill_next_paragraph = True
544440c7f6145f4088ce7ce07b13fae4e87b8570 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/544440c7f6145f4088ce7ce07b13fae4e87b8570/lout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 1518, 67, 1098, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 64, 82, 36, 1638, 682, 64, 82, 6134, 365, 18, 16418, 67, 4285, 67, 22445, 273, 1053, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 1518, 67, 1098, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 64, 82, 36, 1638, 682, 64, 82, 6134, 365, 18, 16418, 67, 4285, 67, 22445, 273, 1053, 2, -100, -100,...
system = processPackage('localimporttest')
system = processPackage('basic')
def test_edit_renders_ok(): system = processPackage('localimporttest') root = server.EditingPyDoctorResource(system) args = {'ob':'localimporttest.mod1.C'} result = getTextOfPage(root, 'edit', args=args) # very weak, but it's an assert that things didn't explode assert 'textarea' in result args = {'ob':'does.not.exist'} result = getTextOfPage(root, 'edit', args=args) assert 'An error occurred' in result
d3bf21f55d5f937ae38dd7eb7acb68f0d293f3e8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5471/d3bf21f55d5f937ae38dd7eb7acb68f0d293f3e8/test_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4619, 67, 1187, 6794, 67, 601, 13332, 2619, 273, 1207, 2261, 2668, 13240, 6134, 1365, 273, 1438, 18, 28029, 9413, 3244, 30206, 1420, 12, 4299, 13, 833, 273, 13666, 947, 11, 249...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4619, 67, 1187, 6794, 67, 601, 13332, 2619, 273, 1207, 2261, 2668, 13240, 6134, 1365, 273, 1438, 18, 28029, 9413, 3244, 30206, 1420, 12, 4299, 13, 833, 273, 13666, 947, 11, 249...
return FastCrystalElement(self, value)
return FastCrystalElement(self, value, self.format)
def __call__(self, value): return FastCrystalElement(self, value)
47302f47b3f1543741e6ceaa1c3f393d83650a95 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/47302f47b3f1543741e6ceaa1c3f393d83650a95/fast_crystals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 460, 4672, 327, 9545, 12893, 31365, 1046, 12, 2890, 16, 460, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 460, 4672, 327, 9545, 12893, 31365, 1046, 12, 2890, 16, 460, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if self.wantAnySound: if self.wantSfx: self.sfxManager = AudioManager.createAudioManager() if not self.sfxManager.isValid(): self.wantSfx=None if self.wantMusic: self.musicManager = AudioManager.createAudioManager() self.musicManager.setVolume(0.7) if not self.musicManager.isValid(): self.wantMusic=None if not (self.wantSfx or self.wantMusic): self.wantAnySound=None
if self.wantSfx: self.sfxManager = AudioManager.createAudioManager() if not self.sfxManager.isValid(): self.wantSfx=None if self.wantMusic: self.musicManager = AudioManager.createAudioManager() self.musicManager.setVolume(0.7) if not self.musicManager.isValid(): self.wantMusic=None self.wantAnySound = (self.wantSfx or self.wantMusic)
def createAudioManager(self): if self.wantAnySound: if self.wantSfx: self.sfxManager = AudioManager.createAudioManager() if not self.sfxManager.isValid(): self.wantSfx=None if self.wantMusic: self.musicManager = AudioManager.createAudioManager() # Turn down the music globally # Eventually we may want to control this in the options page self.musicManager.setVolume(0.7) if not self.musicManager.isValid(): self.wantMusic=None if not (self.wantSfx or self.wantMusic): self.wantAnySound=None
c0939e89170190f01ca37a16f09b2043ef03e3f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/c0939e89170190f01ca37a16f09b2043ef03e3f5/ShowBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12719, 1318, 12, 2890, 4672, 309, 365, 18, 17369, 2961, 24331, 30, 309, 365, 18, 17369, 55, 19595, 30, 365, 18, 87, 19595, 1318, 273, 15045, 1318, 18, 2640, 12719, 1318, 1435, 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, 752, 12719, 1318, 12, 2890, 4672, 309, 365, 18, 17369, 2961, 24331, 30, 309, 365, 18, 17369, 55, 19595, 30, 365, 18, 87, 19595, 1318, 273, 15045, 1318, 18, 2640, 12719, 1318, 1435, 309, ...
if type in ['ALCH','AMMO','APPA','BOOK','INGR','KEYM','LIGH','MISC','SGST','SLGM','WEAP']:
if type in ['ALCH','AMMO','BOOK','INGR','KEYM','LIGH','MISC']:
def readFromMod(self,modInfo): """Reads stats from specified mod.""" loadFactory= LoadFactory(False,MreAlch,MreAmmo,MreAppa,MreArmo,MreBook,MreClot,MreIngr,MreKeym,MreLigh,MreMisc,MreSgst,MreSlgm,MreWeap) modFile = ModFile(modInfo,loadFactory) modFile.load(True) mapper = modFile.getLongMapper() for type in self.type_stats: stats, attrs = self.type_stats[type], self.type_attrs[type] for record in getattr(modFile,type).getActiveRecords(): longid = mapper(record.fid) recordGetAttr = record.__getattribute__ stats[longid] = tuple(recordGetAttr(attr) for attr in attrs) if type in ['ALCH','AMMO','APPA','BOOK','INGR','KEYM','LIGH','MISC','SGST','SLGM','WEAP']: if record.model: self.model[longid] = record.model.modPath elif type in ['CLOT','ARMO']: if record.maleBody: self.Mmodel[longid] = record.maleBody.modPath if record.maleWorld: self.MGndmodel[longid] = record.maleWorld.modPath if record.femaleBody: self.Fmodel[longid] = record.femaleBody.modPath if record.femaleWorld: self.FGndmodel[longid] = record.femaleWorld.modPath
aeca1db1240364fac710811ccc7f19b3a36b644a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/aeca1db1240364fac710811ccc7f19b3a36b644a/bosh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20876, 1739, 12, 2890, 16, 1711, 966, 4672, 3536, 7483, 3177, 628, 1269, 681, 12123, 1262, 1733, 33, 4444, 1733, 12, 8381, 16, 49, 266, 1067, 343, 16, 49, 266, 37, 7020, 83, 16, 49, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20876, 1739, 12, 2890, 16, 1711, 966, 4672, 3536, 7483, 3177, 628, 1269, 681, 12123, 1262, 1733, 33, 4444, 1733, 12, 8381, 16, 49, 266, 1067, 343, 16, 49, 266, 37, 7020, 83, 16, 49, ...
while self.active:
while 1:
def serve_forever(self): # We want this to run in a thread, so we use a slightly # modified version of "forever". self.active = True while self.active: try: self.handle_request() except socket.timeout: pass except KeyboardInterrupt: self.server_close() return except: sys.stdout.write(''.join(traceback.format_exception(*sys.exc_info())));
a0f5002d8bab5d84fb9858e067efbe4a87a66282 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/a0f5002d8bab5d84fb9858e067efbe4a87a66282/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12175, 67, 1405, 502, 12, 2890, 4672, 468, 1660, 2545, 333, 358, 1086, 316, 279, 2650, 16, 1427, 732, 999, 279, 21980, 468, 4358, 1177, 434, 315, 1405, 502, 9654, 365, 18, 3535, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12175, 67, 1405, 502, 12, 2890, 4672, 468, 1660, 2545, 333, 358, 1086, 316, 279, 2650, 16, 1427, 732, 999, 279, 21980, 468, 4358, 1177, 434, 315, 1405, 502, 9654, 365, 18, 3535, 273, 1...
self.storage = os.path.join(MscConfig('msc').download_directory_path, self.userid)
self.storage = os.path.join(MscConfig().download_directory_path, self.userid)
def __init__(self, userid): self.userid = userid self.storage = os.path.join(MscConfig('msc').download_directory_path, self.userid)
605d2f2b81da4781406cdcf89675b49cf6bdeadd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5988/605d2f2b81da4781406cdcf89675b49cf6bdeadd/download.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6709, 4672, 365, 18, 8339, 273, 6709, 365, 18, 5697, 273, 1140, 18, 803, 18, 5701, 12, 49, 1017, 809, 2668, 959, 71, 16063, 7813, 67, 5149, 67, 803, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6709, 4672, 365, 18, 8339, 273, 6709, 365, 18, 5697, 273, 1140, 18, 803, 18, 5701, 12, 49, 1017, 809, 2668, 959, 71, 16063, 7813, 67, 5149, 67, 803, 16...
successful[lfn] = {'PassFilter':passFilter,'Retained':retained,'Forced':forced,'AddedToCatalog':addedToCatalog,'AddedToTransformation':addedToTransformation,'FileExists':fileExists,'ReplicaExists':replicaExists}
successful[lfn] = {'PassFilter':passFilter,'Retained':retained, 'Forced':forced,'AddedToCatalog':addedToCatalog, 'AddedToTransformation':addedToTransformation, 'FileExists':fileExists,'ReplicaExists':replicaExists}
def addFile(self,fileTuples,force=False): """ Add a new file to the TransformationDB together with its first replica. """ gLogger.info("TransformationDB.addFile: Attempting to add %s files." % len(fileTuples)) successful = {} failed = {} dataLog = RPCClient('DataManagement/DataLogging') for lfn,pfn,size,se,guid,checksum in fileTuples:
c951b920bcdcc789a21229be0f11250ead613d5f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/c951b920bcdcc789a21229be0f11250ead613d5f/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18671, 12, 2890, 16, 768, 25813, 16, 5734, 33, 8381, 4672, 3536, 225, 1436, 279, 394, 585, 358, 326, 21274, 2290, 9475, 598, 2097, 1122, 12335, 18, 3536, 314, 3328, 18, 1376, 2932, 15292...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18671, 12, 2890, 16, 768, 25813, 16, 5734, 33, 8381, 4672, 3536, 225, 1436, 279, 394, 585, 358, 326, 21274, 2290, 9475, 598, 2097, 1122, 12335, 18, 3536, 314, 3328, 18, 1376, 2932, 15292...
Class.className_ = _moose.cvar.Class_className_
def setClock(*args): """setClock(self, string function, string clock)""" return _moose.Class_setClock(*args)
1961c35f540060f41023dcf804a850794a39f350 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2961/1961c35f540060f41023dcf804a850794a39f350/moose.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11440, 739, 30857, 1968, 4672, 3536, 542, 14027, 12, 2890, 16, 533, 445, 16, 533, 7268, 15574, 327, 389, 8683, 2584, 18, 797, 67, 542, 14027, 30857, 1968, 13, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 11440, 739, 30857, 1968, 4672, 3536, 542, 14027, 12, 2890, 16, 533, 445, 16, 533, 7268, 15574, 327, 389, 8683, 2584, 18, 797, 67, 542, 14027, 30857, 1968, 13, 2, -100, -100, -100, -100, ...
"""
r"""
def fourier_series_sine_coefficient(self,n,L): """ Returns the n-th Fourier series coefficient of $\sin(n\pi x/L)$, $b_n$.
1647ed1843fe080249d8ccf31cefcde17c19a01d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/1647ed1843fe080249d8ccf31cefcde17c19a01d/piecewise.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12792, 2453, 67, 10222, 67, 87, 558, 67, 8075, 8714, 12, 2890, 16, 82, 16, 48, 4672, 436, 8395, 2860, 326, 290, 17, 451, 478, 24775, 4166, 16554, 434, 271, 64, 21861, 12, 82, 64, 725...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12792, 2453, 67, 10222, 67, 87, 558, 67, 8075, 8714, 12, 2890, 16, 82, 16, 48, 4672, 436, 8395, 2860, 326, 290, 17, 451, 478, 24775, 4166, 16554, 434, 271, 64, 21861, 12, 82, 64, 725...
self['superpages'] = sxp.child_value(image_sxp, 'superpages',0)
val = sxp.child_value(image_sxp, 'superpages') if val is not None: self['superpages'] = val
def update_with_image_sxp(self, image_sxp, bootloader = False): # Convert Legacy "image" config to Xen API PV_* # configuration log.debug("update_with_image_sxp(%s)" % scrub_password(image_sxp))
e8ac6041ee9072b3325175aba06976cab7898036 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/e8ac6041ee9072b3325175aba06976cab7898036/XendConfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1918, 67, 2730, 67, 87, 23829, 12, 2890, 16, 1316, 67, 87, 23829, 16, 4835, 6714, 273, 1083, 4672, 468, 4037, 22781, 315, 2730, 6, 642, 358, 1139, 275, 1491, 27102, 67, 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, 1089, 67, 1918, 67, 2730, 67, 87, 23829, 12, 2890, 16, 1316, 67, 87, 23829, 16, 4835, 6714, 273, 1083, 4672, 468, 4037, 22781, 315, 2730, 6, 642, 358, 1139, 275, 1491, 27102, 67, 14, ...
self._stdin.close(immediate=True)
def stop(self, cmd=None, wait=3.0): """ Stops the child process. :param cmd: stop command used to attempt to terminate the child gracefully; overrides the *stop_command* property if specified. :type cmd: string or callable; see :attr:`~kaa.Process2.stop_command` :param wait: number of seconds to wait between termination steps (see below). :type wait: float
d08ebcd559617a9e0f9ba07e4a23f96d51f009d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11722/d08ebcd559617a9e0f9ba07e4a23f96d51f009d6/process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 16, 1797, 33, 7036, 16, 2529, 33, 23, 18, 20, 4672, 3536, 934, 4473, 326, 1151, 1207, 18, 225, 294, 891, 1797, 30, 2132, 1296, 1399, 358, 4395, 358, 10850, 326, 1151, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 16, 1797, 33, 7036, 16, 2529, 33, 23, 18, 20, 4672, 3536, 934, 4473, 326, 1151, 1207, 18, 225, 294, 891, 1797, 30, 2132, 1296, 1399, 358, 4395, 358, 10850, 326, 1151, ...
return self.hub.legacypush(fqdn, inventory)
return self.hub.push(fqdn, inventory)
def push(self, fqdn, inventory): """ Push inventory data to Scheduler """ return self.hub.legacypush(fqdn, inventory)
2b961e0c4350a8d5098fe393068c3d106ef896a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14755/2b961e0c4350a8d5098fe393068c3d106ef896a2/proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1817, 12, 2890, 16, 19897, 16, 13086, 4672, 3536, 8547, 13086, 501, 358, 12620, 3536, 327, 365, 18, 14986, 18, 1935, 1077, 879, 1218, 12, 19206, 5176, 16, 13086, 13, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1817, 12, 2890, 16, 19897, 16, 13086, 4672, 3536, 8547, 13086, 501, 358, 12620, 3536, 327, 365, 18, 14986, 18, 1935, 1077, 879, 1218, 12, 19206, 5176, 16, 13086, 13, 2, -100, -100, -100,...
new_b = '0'+new_b
new_b = '0' + new_b
def plotMSFile(self, filename, outfile = None, format = None, size = (800, 200), starttime = False, endtime = False, dpi = 100, color = 'red', bgcolor = 'white', transparent = False, shadows = False, minmaxlist = False): """ Creates a graph of any given Mini-SEED file. It either saves the image directly to the file system or returns an binary image string. For all color values you can use legit html names, html hex strings (e.g. '#eeefff') or you can pass an R , G , B tuple, where each of R , G , B are in the range [0,1]. You can also use single letters for basic builtin colors ('b' = blue, 'g' = green, 'r' = red, 'c' = cyan, 'm' = magenta, 'y' = yellow, 'k' = black, 'w' = white) and gray shades can be given as a string encoding a float in the 0-1 range. @param filename: Mini-SEED file string @param outfile: Output file string. Also used to automatically determine the output format. Currently supported is emf, eps, pdf, png, ps, raw, rgba, svg and svgz output. Defaults to None. @param format: Format of the graph picture. If no format is given the outfile parameter will be used to try to automatically determine the output format. If no format is found it defaults to png output. If no outfile is specified but a format is than a binary imagestring will be returned. Defaults to None. @param size: Size tupel in pixel for the output file. This corresponds to the resolution of the graph for vector formats. Defaults to 800x200 px. @param starttime: Starttime of the graph as a datetime object. If not set the graph will be plotted from the beginning. Defaults to False. @param endtime: Endtime of the graph as a datetime object. If not set the graph will be plotted until the end. Defaults to False. @param dpi: Dots per inch of the output file. This also affects the size of most elements in the graph (text, linewidth, ...). Defaults to 100. @param color: Color of the graph. If the supplied parameter is a 2-tupel containing two html hex string colors a gradient between the two colors will be applied to the graph. Defaults to 'red'. @param bgcolor: Background color of the graph. If the supplied parameter is a 2-tupel containing two html hex string colors a gradient between the two colors will be applied to the background. Defaults to 'white'. @param transparent: Make all backgrounds transparent (True/False). This will overwrite the bgcolor param. Defaults to False. @param shadows: Adds a very basic drop shadow effect to the graph. Defaults to False. @param minmaxlist: A list containing minimum, maximum and timestamp values. If none is supplied it will be created automatically. Useful for caching. Defaults to False. """ #Either outfile or format needs to be set. if not outfile and not format: raise ValueError('Either outfile or format needs to be set.') #Get a list with minimum and maximum values. if not minmaxlist: minmaxlist = self._getMinMaxList(filename = filename, width = size[0], starttime = starttime, endtime = endtime) starttime = minmaxlist[0] endtime = minmaxlist[1] stepsize = (endtime - starttime)/size[0] minmaxlist = minmaxlist[2:] length = len(minmaxlist) #Importing pyplot and numpy. import matplotlib.pyplot as plt #Setup figure and axes fig = plt.figure(num = None, figsize = (float(size[0])/dpi, float(size[1])/dpi)) ax = fig.add_subplot(111) # hide axes + ticks ax.axison = False #Make the graph fill the whole image. fig.subplots_adjust(left=0, bottom=0, right=1, top=1) #Determine range for the y axis. This may not be the smartest way to #do it. miny = 99999999999999999 maxy = -9999999999999999 for _i in range(length): try: if minmaxlist[_i][0] < miny: miny = minmaxlist[_i][0] except: pass try: if minmaxlist[_i][1] > maxy: maxy = minmaxlist[_i][1] except: pass #Set axes and disable ticks plt.ylim(miny, maxy) plt.xlim(starttime, endtime) plt.yticks([]) plt.xticks([]) #Overwrite the background gradient if transparent is set. if transparent: bgcolor = None #Draw gradient background if needed. if type(bgcolor) == type((1,2)): for _i in xrange(size[0]+1): #Convert hex values to integers r1 = int(bgcolor[0][1:3], 16) r2 = int(bgcolor[1][1:3], 16) delta_r = (float(r2) - float(r1))/size[0] g1 = int(bgcolor[0][3:5], 16) g2 = int(bgcolor[1][3:5], 16) delta_g = (float(g2) - float(g1))/size[0] b1 = int(bgcolor[0][5:], 16) b2 = int(bgcolor[1][5:], 16) delta_b = (float(b2) - float(b1))/size[0] new_r = hex(int(r1 + delta_r * _i))[2:] new_g = hex(int(g1 + delta_g * _i))[2:] new_b = hex(int(b1 + delta_b * _i))[2:] if len(new_r) == 1: new_r = '0'+new_r if len(new_g) == 1: new_g = '0'+new_g if len(new_b) == 1: new_b = '0'+new_b #Create color string bglinecolor = '#'+new_r+new_g+new_b plt.axvline(x = starttime + _i*stepsize, color = bglinecolor) bgcolor = 'white' #Clone color for looping. loop_color = color #Draw horizontal lines. for _i in range(length): #Make gradient if color is a 2-tupel. if type(loop_color) == type((1,2)): #Convert hex values to integers r1 = int(loop_color[0][1:3], 16) r2 = int(loop_color[1][1:3], 16) delta_r = (float(r2) - float(r1))/length g1 = int(loop_color[0][3:5], 16) g2 = int(loop_color[1][3:5], 16) delta_g = (float(g2) - float(g1))/length b1 = int(loop_color[0][5:], 16) b2 = int(loop_color[1][5:], 16) delta_b = (float(b2) - float(b1))/length new_r = hex(int(r1 + delta_r * _i))[2:] new_g = hex(int(g1 + delta_g * _i))[2:] new_b = hex(int(b1 + delta_b * _i))[2:] if len(new_r) == 1: new_r = '0'+new_r if len(new_g) == 1: new_g = '0'+new_g if len(new_b) == 1: new_b = '0'+new_b #Create color string color = '#'+new_r+new_g+new_b #Calculate relative values needed for drawing the lines. yy = (float(minmaxlist[_i][0])-miny)/(maxy-miny) xx = (float(minmaxlist[_i][1])-miny)/(maxy-miny) #Draw shadows if desired. if shadows: plt.axvline(x = minmaxlist[_i][2] + stepsize, ymin = yy - 0.01, ymax = xx - 0.01, color = 'k', alpha = 0.4) #Draw actual data lines. plt.axvline(x = minmaxlist[_i][2], ymin = yy, ymax = xx, color = color) #Save file. if outfile: #If format is set use it. if format: plt.savefig(outfile, dpi = dpi, transparent = transparent, facecolor = bgcolor, edgecolor = bgcolor, format = format) #Otherwise try to get the format from outfile or default to png. else: plt.savefig(outfile, dpi = dpi, transparent = transparent, facecolor = bgcolor, edgecolor = bgcolor) #Return an binary imagestring if outfile is not set but format is. if not outfile: imgdata = StringIO.StringIO() plt.savefig(imgdata, dpi = dpi, transparent = transparent, facecolor = bgcolor, edgecolor = bgcolor, format = format) imgdata.seek(0) return imgdata.read()
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, 3207, 3537, 812, 12, 2890, 16, 1544, 16, 8756, 273, 599, 16, 740, 273, 599, 16, 963, 273, 261, 17374, 16, 4044, 3631, 23437, 273, 1083, 16, 31361, 273, 1083, 16, 16361, 273, 2130, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 3537, 812, 12, 2890, 16, 1544, 16, 8756, 273, 599, 16, 740, 273, 599, 16, 963, 273, 261, 17374, 16, 4044, 3631, 23437, 273, 1083, 16, 31361, 273, 1083, 16, 16361, 273, 2130, 16, ...
DIRAC.exit(exitCode)
DIRAC.exit( exitCode )
def usage(): print 'Usage: %s <DIRAC site name> <COMMENT>' %(Script.scriptName) print 'Note: emails should only be disabled for bulk operations.' DIRAC.exit(2)
43bc1428e2c48300c638de896bbd95b498bb1274 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/43bc1428e2c48300c638de896bbd95b498bb1274/dirac-admin-allow-site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 411, 4537, 2226, 2834, 508, 34, 411, 12200, 1870, 8975, 3651, 18, 4263, 461, 13, 1172, 296, 8067, 30, 14255, 1410, 1338, 506, 5673, 364, 8280, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 411, 4537, 2226, 2834, 508, 34, 411, 12200, 1870, 8975, 3651, 18, 4263, 461, 13, 1172, 296, 8067, 30, 14255, 1410, 1338, 506, 5673, 364, 8280, ...
return configparser.parse_xml_config_file(self, cfgfile)
def parse_config_file(self, configfile=None): """ Parses the configuration file. An optional configuration file can be passed to this method. Otherwise it tries to parse the default configuration file """
bf4e124882f86e000ba135727ab7d0207f8de571 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4845/bf4e124882f86e000ba135727ab7d0207f8de571/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1425, 67, 768, 12, 2890, 16, 642, 768, 33, 7036, 4672, 3536, 2280, 2420, 326, 1664, 585, 18, 1922, 3129, 1664, 585, 848, 506, 2275, 358, 333, 707, 18, 5272, 518, 9327, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 768, 12, 2890, 16, 642, 768, 33, 7036, 4672, 3536, 2280, 2420, 326, 1664, 585, 18, 1922, 3129, 1664, 585, 848, 506, 2275, 358, 333, 707, 18, 5272, 518, 9327, 358, ...
cls.write_msr(0x1D9, 2)
cls.write_msr(0x1D9, 3)
def enable_step_on_branch_mode(cls): """ When tracing, call this on every single step event for step on branch mode.
69b4ca8ed506684e2bc9aa8f86baa2c658b7a0b1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/69b4ca8ed506684e2bc9aa8f86baa2c658b7a0b1/system.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 67, 4119, 67, 265, 67, 7500, 67, 3188, 12, 6429, 4672, 3536, 5203, 17144, 16, 745, 333, 603, 3614, 2202, 2235, 871, 364, 2235, 603, 3803, 1965, 18, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 67, 4119, 67, 265, 67, 7500, 67, 3188, 12, 6429, 4672, 3536, 5203, 17144, 16, 745, 333, 603, 3614, 2202, 2235, 871, 364, 2235, 603, 3803, 1965, 18, 2, -100, -100, -100, -100, -10...
nonWordRe=re.compile(r"(\((?!/)|(?<!/)\)|[^-+a-zA-Z0-9_.()])")
nonWordRe=re.compile(r"(|\(/|/\)|[^-+a-zA-Z0-9_.])")
def writeInCols(dLine,indentCol,maxCol,indentAtt,file): """writes out the strings (trying not to cut them) in dLine up to maxCol indenting each newline with indentCol. The '&' of the continuation line is at maxCol. indentAtt is the actual intent, and the new indent is returned""" strRe=re.compile(r"('[^'\n]*'|\"[^\"\n]*\")") nonWordRe=re.compile(r"(\((?!/)|(?<!/)\)|[^-+a-zA-Z0-9_.()])") maxSize=maxCol-indentCol-1 tol=min(maxSize/6,6)+indentCol for fragment in dLine: if indentAtt+len(fragment)<maxCol: file.write(fragment) indentAtt+=len(fragment) elif len(fragment.lstrip())<=maxSize: file.write("&\n"+(" "*indentCol)) file.write(fragment.lstrip()) indentAtt=indentCol+len(fragment.lstrip()) else: sPieces=strRe.split(fragment) for sPiece in sPieces: if sPiece and (not (sPiece[0]=='"' or sPiece[0]=="'")): subPieces=nonWordRe.split(sPiece) else: subPieces=[sPiece] for subPiece in subPieces: if indentAtt==indentCol: file.write(subPiece.lstrip()) indentAtt+=len(subPiece.lstrip()) elif indentAtt<tol or indentAtt+len(subPiece)<maxCol: file.write(subPiece) indentAtt+=len(subPiece) else: file.write("&\n"+(" "*indentCol)) file.write(subPiece.lstrip()) indentAtt=indentCol+len(subPiece.lstrip()) return indentAtt
2bfe6c6ad42fb13244fb62c40970aa89d490d1e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2834/2bfe6c6ad42fb13244fb62c40970aa89d490d1e3/normalizeFortranFile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 382, 8011, 12, 72, 1670, 16, 9355, 914, 16, 1896, 914, 16, 9355, 3075, 16, 768, 4672, 3536, 13284, 596, 326, 2064, 261, 698, 310, 486, 358, 6391, 2182, 13, 316, 302, 1670, 731, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 382, 8011, 12, 72, 1670, 16, 9355, 914, 16, 1896, 914, 16, 9355, 3075, 16, 768, 4672, 3536, 13284, 596, 326, 2064, 261, 698, 310, 486, 358, 6391, 2182, 13, 316, 302, 1670, 731, ...
search_request_retry -= 1
if search_request_retry: search_request_retry -= 1
def get_results(query, numresults = 10): url = list() query = re.sub("[()\"<>]", "", query) #wikipedia.output(query) if config.copyright_google: import google google.LICENSE_KEY = config.google_key print " google query..." search_request_retry = config.copyright_connection_tries while search_request_retry: #SOAP.faultType: <Fault SOAP-ENV:Server: Exception from service object: # Daily limit of 1000 queries exceeded for key xxx> try: data = google.doGoogleSearch('-Wikipedia "' + query + '"') search_request_retry = 0 for entry in data.results: if config.copyright_check_in_source_google: if check_in_source(entry.URL): continue add_in_urllist(url, entry.URL, 'google') except KeyboardInterrupt: raise except Exception, err: print "Got an error ->", err search_request_retry -= 1 if config.copyright_yahoo: import yahoo.search.web print " yahoo query..." data = yahoo.search.web.WebSearch(config.yahoo_appid, query='"' + query.encode('utf_8') + '" -Wikipedia', results=numresults) search_request_retry = config.copyright_connection_tries while search_request_retry: try: for entry in data.parse_results(): if config.copyright_check_in_source_yahoo: if check_in_source(entry.Url): continue add_in_urllist(url, entry.Url, 'yahoo') search_request_retry = 0 except Exception, err: print "Got an error ->", err search_request_retry -= 1 #if search_in_msn: # ## max_query_len = 150? # from __SOAPpy import WSDL # print " msn query..." # wsdl_url = 'http://soap.search.msn.com/webservices.asmx?wsdl' # server = WSDL.Proxy(wsdl_url) # params = {'AppID': config.msn_appid, 'Query': '-Wikipedia "' + query + '"', 'CultureInfo': 'en-US', 'SafeSearch': 'Off', 'Requests': { # 'SourceRequest':{'Source': 'Web', 'Offset': 0, 'Count': 10, 'ResultFields': 'All',}}} # # search_request_retry = config.copyright_connection_tries # results = '' # while search_request_retry: # try: # server_results = server.Search(Request = params) # search_request_retry = 0 # if server_results.Responses[0].Results: # results = server_results.Responses[0].Results[0] # except Exception, err: # print "Got an error ->", err # search_request_retry -= 1 # for entry in results: # try: # add_in_urllist(url, entry.Url, 'msn') # except AttributeError: # print "attrib ERROR" offset = 0 for i in range(len(url)): if check_list(url[i + offset][0], excl_list, debug = True): url.pop(i + offset) offset += -1 return url
fe34527042f585edc9742a000ec9ef60bf797d81 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/fe34527042f585edc9742a000ec9ef60bf797d81/copyright.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4717, 12, 2271, 16, 818, 4717, 273, 1728, 4672, 880, 273, 666, 1435, 843, 273, 283, 18, 1717, 2932, 63, 1435, 2412, 29667, 65, 3113, 23453, 843, 13, 468, 11999, 13744, 18, 284...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4717, 12, 2271, 16, 818, 4717, 273, 1728, 4672, 880, 273, 666, 1435, 843, 273, 283, 18, 1717, 2932, 63, 1435, 2412, 29667, 65, 3113, 23453, 843, 13, 468, 11999, 13744, 18, 284...
u = len(list)
u = len(list2)
def bsearch(key, list): l = 0 u = len(list) while l < u: idx = (l + u) / 2 r = cmp(key, list[idx]) if r < 0: u = idx elif r > 0: l = idx + 1 else: return idx return -1
e88bd7c78ae123c185f17919515d68d29510e836 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/e88bd7c78ae123c185f17919515d68d29510e836/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 3072, 12, 856, 16, 666, 4672, 328, 273, 374, 582, 273, 562, 12, 1098, 22, 13, 1323, 328, 411, 582, 30, 2067, 273, 261, 80, 397, 582, 13, 342, 576, 436, 273, 9411, 12, 856, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 3072, 12, 856, 16, 666, 4672, 328, 273, 374, 582, 273, 562, 12, 1098, 22, 13, 1323, 328, 411, 582, 30, 2067, 273, 261, 80, 397, 582, 13, 342, 576, 436, 273, 9411, 12, 856, 16,...
parser = optparse.OptionParser() parser.add_option('-f', '--freq', dest='freqs', action='append', help="Band of frequencies, in MHz, to be plotted (format xxx:yyy). Each band will have a different colour. Multiple -f/--freq options are allowed. (Default: Plot all frequencies in single colour.)", default=[]) parser.add_option('-x', '--x-axis', dest='xaxis', type='string', help="Values to plot on x-axis. Must be one of {'numTOA', 'MJD', 'orbitphase', 'year'}. (Default: 'MJD')", default='MJD') parser.add_option('-y', '--y-axis', dest='yaxis', type='string', help="Values to plot on y-axis. Must be one of {'phase', 'usec', 'sec'}. (Default: 'phase')", default='phase') parser.add_option('--post', dest='postfit', action='store_true', help="Show postfit residuals. (Default: Don't show postfit.)", default=False) parser.add_option('--pre', dest='prefit', action='store_true', help="Show prefit residuals. (Default: Don't show prefit.)", default=False) parser.add_option('-l', '--legend', dest='legend', action='store_true', help="Show legend of frequencies. (Default: Do not show legend.)", default=False) parser.add_option('--mark-peri', dest='mark_peri', action='store_true', help="Mark passage of periastron. (Default: don't mark periastron.)", default=False) parser.add_option('--non-interactive', dest='interactive', action='store_false', help="Save figure and exit. (Default: Show plot, only save if requested.)", default=True)
parser = optparse.OptionParser(prog="pyplotres.py", \ version="v1.1 Patrick Lazarus (Mar. 13, 2010)") parser.add_option('-f', '--freq', dest='freqs', action='append', \ help="Band of frequencies, in MHz, to be plotted " \ "(format xxx:yyy). Each band will have a " \ " different colour. Multiple -f/--freq options " \ " are allowed. (Default: Plot all frequencies " \ "in single colour.)", \ default=[]) parser.add_option('-x', '--x-axis', dest='xaxis', type='string', \ help="Values to plot on x-axis. Must be one of " \ "{'numTOA', 'MJD', 'orbitphase', 'year'}. " \ "(Default: 'MJD')", default='MJD') parser.add_option('-y', '--y-axis', dest='yaxis', type='string', \ help="Values to plot on y-axis. Must be one of " "{'phase', 'usec', 'sec'}. (Default: 'phase')", \ default='phase') parser.add_option('--post', dest='postfit', action='store_true', \ help="Show postfit residuals. (Default: Don't show " \ "postfit.)", \ default=False) parser.add_option('--pre', dest='prefit', action='store_true', \ help="Show prefit residuals. (Default: Don't show " \ "prefit.)", \ default=False) parser.add_option('-l', '--legend', dest='legend', action='store_true', \ help="Show legend of frequencies. (Default: Do not " \ "show legend.)", \ default=False) parser.add_option('--mark-peri', dest='mark_peri', action='store_true', \ help="Mark passage of periastron. (Default: don't " \ "mark periastron.)", \ default=False) parser.add_option('--non-interactive', dest='interactive', \ action='store_false', default=True, \ help="Save figure and exit. (Default: Show plot, " \ "only save if requested.)")
def main(): global tempo_results global options options = parse_options() tempo_results = TempoResults(options.freqbands) create_plot(tempo_results, options.xaxis, options.yaxis, options.postfit, \ options.prefit, options.interactive, options.mark_peri, \ options.legend)
0e6f18e4ccc8ea5b1b47bf4feab12a06fb0177b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3485/0e6f18e4ccc8ea5b1b47bf4feab12a06fb0177b6/pyplotres.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 1022, 1631, 67, 4717, 2552, 702, 702, 273, 1109, 67, 2116, 1435, 1022, 1631, 67, 4717, 273, 3955, 1631, 3447, 12, 2116, 18, 10212, 29714, 13, 752, 67, 4032, 12, 874, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 1022, 1631, 67, 4717, 2552, 702, 702, 273, 1109, 67, 2116, 1435, 1022, 1631, 67, 4717, 273, 3955, 1631, 3447, 12, 2116, 18, 10212, 29714, 13, 752, 67, 4032, 12, 874, ...
if Token(key_name=unique_key, t=token_str).put()
if Token(key_name=unique_key, t=token_str).put():
def set_token(unique_key, token_str): """Saves the serialized auth token in the datastore. The token is also stored in memcache to speed up retrieval on a cache hit. Args: unique_key: The unique name for this token as a string. It is up to your code to ensure that this token value is unique in your application. Previous values will be silently overwitten. token_str: A serialized auth token as a string. I expect that this string will be generated by gdata.gauth.token_to_blob. Returns: True if the token was stored sucessfully, False if the token could not be safely cached (if an old value could not be cleared). If the token was set in memcache, but not in the datastore, this function will return None. However, in that situation an exception will likely be raised. Raises: Datastore exceptions may be raised from the App Engine SDK in the event of failure. """ # First try to save in memcache. result = memcache.set(unique_key, token_str) # If memcache fails to save the value, clear the cached value. if not result: result = memcache.delete(unique_key) # If we could not clear the cached value for this token, refuse to save. if result == 0: return False # Save to the datastore. if Token(key_name=unique_key, t=token_str).put() return True return None
b7adffaa4011470334bf56af3f8cc074a2f70a81 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/b7adffaa4011470334bf56af3f8cc074a2f70a81/app_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2316, 12, 6270, 67, 856, 16, 1147, 67, 701, 4672, 3536, 13370, 326, 5343, 1357, 1147, 316, 326, 9290, 18, 225, 1021, 1147, 353, 2546, 4041, 316, 20549, 358, 8632, 731, 22613, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2316, 12, 6270, 67, 856, 16, 1147, 67, 701, 4672, 3536, 13370, 326, 5343, 1357, 1147, 316, 326, 9290, 18, 225, 1021, 1147, 353, 2546, 4041, 316, 20549, 358, 8632, 731, 22613, ...
e=EMR_UNKNOWN()
e=_EMR_UNKNOWN()
def _unserialize(self,fh): try: count=1 while count>0: data=fh.read(8) count=len(data) if count>0: (iType,nSize)=struct.unpack("<ii",data) if self.verbose: print "EMF: iType=%d nSize=%d" % (iType,nSize)
688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 318, 6288, 12, 2890, 16, 19260, 4672, 775, 30, 1056, 33, 21, 1323, 1056, 34, 20, 30, 501, 33, 19260, 18, 896, 12, 28, 13, 1056, 33, 1897, 12, 892, 13, 309, 1056, 34, 20, 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, 389, 318, 6288, 12, 2890, 16, 19260, 4672, 775, 30, 1056, 33, 21, 1323, 1056, 34, 20, 30, 501, 33, 19260, 18, 896, 12, 28, 13, 1056, 33, 1897, 12, 892, 13, 309, 1056, 34, 20, 30, ...
log.debug(_('Creating request %(url)s') % {'url': req.get_full_url})
log.debug(_('Creating request %(url)s') % {'url': req.get_full_url()})
def send_request(self, method, req_params=None, auth_params=None): '''Make an HTTP request to a server method.
11329a1f3e26d0d41fadb0e217e88e3d1e285cc1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9952/11329a1f3e26d0d41fadb0e217e88e3d1e285cc1/proxyclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2293, 12, 2890, 16, 707, 16, 1111, 67, 2010, 33, 7036, 16, 1357, 67, 2010, 33, 7036, 4672, 9163, 6464, 392, 2239, 590, 358, 279, 1438, 707, 18, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2293, 12, 2890, 16, 707, 16, 1111, 67, 2010, 33, 7036, 16, 1357, 67, 2010, 33, 7036, 4672, 9163, 6464, 392, 2239, 590, 358, 279, 1438, 707, 18, 2, -100, -100, -100, -100, -...
-- Gonzalo Tornaria (2009-03-02)
- Gonzalo Tornaria (2009-03-02)
def hilbert_conductor(a, b): """ This is the product of all (finite) primes where the hilbert symbol is -1. What is the same, this is the (reduced) discriminant of the quaternion algebra (a,b) over Q. INPUT: a, b -- integers OUTPUT: squarefree positive integer EXAMPLES: sage: hilbert_conductor(-1, -1) 2 sage: hilbert_conductor(-1, -11) 11 sage: hilbert_conductor(-2, -5) 5 sage: hilbert_conductor(-3, -17) 17 AUTHOR: -- Gonzalo Tornaria (2009-03-02) """ a, b = ZZ(a), ZZ(b) d = ZZ(1) for p in union(union( [2], prime_divisors(a) ), prime_divisors(b) ): if hilbert_symbol(a, b, p) == -1: d *= p return d
c5cc436e94fabaa9fa38f5732aff2c6f8ca3be27 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/c5cc436e94fabaa9fa38f5732aff2c6f8ca3be27/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 330, 25925, 67, 591, 1828, 280, 12, 69, 16, 324, 4672, 3536, 1220, 353, 326, 3017, 434, 777, 261, 9551, 13, 846, 4485, 1625, 326, 366, 330, 25925, 3273, 353, 300, 21, 18, 18734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 330, 25925, 67, 591, 1828, 280, 12, 69, 16, 324, 4672, 3536, 1220, 353, 326, 3017, 434, 777, 261, 9551, 13, 846, 4485, 1625, 326, 366, 330, 25925, 3273, 353, 300, 21, 18, 18734, ...
data = f.read().split('\n') i = len(data) while 0 < i: i -= 1 if data[0] <> '': sys.stdout.write("Sending \"%s\"\n" % data[0]) cmd = command % data[0] if debug == 'true': sys.stdout.write("DEBUG : command=%s" % cmd)
for data in f.read().split('\n'): if data <> '': sys.stdout.write("Working on: \"%s\"\n" % data) cmd = command % data if debug == 'true': sys.stdout.write("DEBUG : command=%s\n" % cmd)
def process_file(file='/tmp/liste'): '''Lecture du fichier contenant la liste a envoyer sur l'autre machine ''' import popen2 global processflag, debug if debug == 'true': sys.stderr.write("DEBUG : process_file (flag=%s)\n" % processflag) if processflag == 'no' : sys.stderr.write("ERROR : Processing already engaged ! :)\n") if os.path.exists(file) and processflag == 'yes': processflag = 'no' sys.stdout.write("INFO : Processing engaged ! :)\n") i = 0 f = open(file,'r') data = f.read().split('\n') i = len(data) while 0 < i: i -= 1 if data[0] <> '': sys.stdout.write("Sending \"%s\"\n" % data[0]) cmd = command % data[0] if debug == 'true': sys.stdout.write("DEBUG : command=%s" % cmd) pout, pin, perr = popen2.popen3(cmd) OUT = pout.read() ERR = perr.read() if debug == 'true': sys.stdout.write("DEBUG : out=%s err=%s\n" % (OUT, ERR)) if not OUT == '': sys.stdout.write("INFO : \"%s\"\n" % OUT) if not ERR == '': sys.stderr.write("ERROR : \"%s\"\n" % ERR) sys.stdout.flush() sys.stderr.flush() del data[0] f.close() processflag = 'yes' os.remove(file)
3abdedbe52ec9aa42ed3e549b991afc7e00d24c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3145/3abdedbe52ec9aa42ed3e549b991afc7e00d24c1/mudaemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 768, 12, 768, 2218, 19, 5645, 19, 1098, 73, 11, 4672, 9163, 48, 386, 594, 9978, 284, 1354, 2453, 466, 6602, 7125, 31614, 279, 1550, 13372, 264, 5056, 328, 11, 5854, 266, 5228...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 768, 2218, 19, 5645, 19, 1098, 73, 11, 4672, 9163, 48, 386, 594, 9978, 284, 1354, 2453, 466, 6602, 7125, 31614, 279, 1550, 13372, 264, 5056, 328, 11, 5854, 266, 5228...
args['itemName'] = 'AllTableView'
args['itemName'] = 'AllView'
def onNewEvent (self, notification): # Create a new Content Item # Triggered from "File | New Item" menu, for any of the item kinds. event = notification.event newItem = event.kindParameter.newItem (None, self) newItem.InitOutgoingAttributes () self.RepositoryCommitWithStatus ()
705896f0a95cb18f0c6b9c02899ea1de9b332d1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/705896f0a95cb18f0c6b9c02899ea1de9b332d1c/Main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1908, 1133, 261, 2890, 16, 3851, 4672, 468, 1788, 279, 394, 3697, 4342, 468, 11321, 329, 628, 315, 812, 571, 1166, 4342, 6, 3824, 16, 364, 1281, 434, 326, 761, 21961, 18, 871, 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, 603, 1908, 1133, 261, 2890, 16, 3851, 4672, 468, 1788, 279, 394, 3697, 4342, 468, 11321, 329, 628, 315, 812, 571, 1166, 4342, 6, 3824, 16, 364, 1281, 434, 326, 761, 21961, 18, 871, 273...
import os, tempfile
def handle(self, info=None): info = info or sys.exc_info() if self.format == "html": self.file.write(reset())
09adc182bec2333c33693ed33586acc2848b097c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/09adc182bec2333c33693ed33586acc2848b097c/cgitb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 1123, 33, 7036, 4672, 1123, 273, 1123, 578, 2589, 18, 10075, 67, 1376, 1435, 309, 365, 18, 2139, 422, 315, 2620, 6877, 365, 18, 768, 18, 2626, 12, 6208, 10756, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 1123, 33, 7036, 4672, 1123, 273, 1123, 578, 2589, 18, 10075, 67, 1376, 1435, 309, 365, 18, 2139, 422, 315, 2620, 6877, 365, 18, 768, 18, 2626, 12, 6208, 10756, 2, ...
rv.append(" if element.docinfo.internalDTD: if not (element.docinfo.public_id or element.docinfo.system_url): dtd_str = "<!DOCTYPE %s>"%element.docinfo.root_name else: dtd_str = """<!DOCTYPE %s PUBLIC "%s" "%s">"""%( element.docinfo.root_name, element.docinfo.public_id, element.docinfo.system_url) rv.append("|%s%s"%(' '*(indent+2), dtd_str)) next_element = element.getroot() while next_element.getprevious() is not None: next_element = next_element.getprevious() while next_element is not None: serializeElement(next_element, indent+2) next_element = next_element.getnext()
if hasattr(element, "getroot"): rv.append(" if element.docinfo.internalDTD: if not (element.docinfo.public_id or element.docinfo.system_url): dtd_str = "<!DOCTYPE %s>"%element.docinfo.root_name else: dtd_str = """<!DOCTYPE %s PUBLIC "%s" "%s">"""%( element.docinfo.root_name, element.docinfo.public_id, element.docinfo.system_url) rv.append("|%s%s"%(' '*(indent+2), dtd_str)) next_element = element.getroot() while next_element.getprevious() is not None: next_element = next_element.getprevious() while next_element is not None: serializeElement(next_element, indent+2) next_element = next_element.getnext() elif isinstance(element, basestring): rv.append("|%s\"%s\""%(' '*indent, element)) else: rv.append(" for next_element in element: serializeElement(next_element, indent+2)
def serializeElement(element, indent=0): if not hasattr(element, "tag"): rv.append("#document") if element.docinfo.internalDTD: if not (element.docinfo.public_id or element.docinfo.system_url): dtd_str = "<!DOCTYPE %s>"%element.docinfo.root_name else: dtd_str = """<!DOCTYPE %s PUBLIC "%s" "%s">"""%( element.docinfo.root_name, element.docinfo.public_id, element.docinfo.system_url) rv.append("|%s%s"%(' '*(indent+2), dtd_str)) next_element = element.getroot() while next_element.getprevious() is not None: next_element = next_element.getprevious() while next_element is not None: serializeElement(next_element, indent+2) next_element = next_element.getnext() elif type(element.tag) == type(etree.Comment): rv.append("|%s<!-- %s -->"%(' '*indent, element.text)) else: rv.append("|%s<%s>"%(' '*indent, element.tag)) if hasattr(element, "attrib"): for name, value in element.attrib.iteritems(): rv.append('|%s%s="%s"' % (' '*(indent+2), name, value)) if element.text: rv.append("|%s\"%s\"" %(' '*(indent+2), element.text)) indent += 2 for child in element.getchildren(): serializeElement(child, indent) if hasattr(element, "tail") and element.tail: rv.append("|%s\"%s\"" %(' '*(indent-2), element.tail))
ee3fa7a2db0ed723c72ad366f724ac13a6a3e206 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4487/ee3fa7a2db0ed723c72ad366f724ac13a6a3e206/etree_lxml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 1046, 12, 2956, 16, 3504, 33, 20, 4672, 309, 486, 3859, 12, 2956, 16, 315, 2692, 6, 4672, 5633, 18, 6923, 2932, 7, 5457, 7923, 309, 930, 18, 2434, 1376, 18, 7236, 25728, 30, 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, 4472, 1046, 12, 2956, 16, 3504, 33, 20, 4672, 309, 486, 3859, 12, 2956, 16, 315, 2692, 6, 4672, 5633, 18, 6923, 2932, 7, 5457, 7923, 309, 930, 18, 2434, 1376, 18, 7236, 25728, 30, 30...
def AddToolBarButtons(self, toolBar, style): wpanelBitmap = wxArtProvider_GetBitmap(wxART_HELP_SIDE_PANEL, wxART_HELP_BROWSER) wbackBitmap = wxArtProvider_GetBitmap(wxART_GO_BACK, wxART_HELP_BROWSER) wforwardBitmap = wxArtProvider_GetBitmap(wxART_GO_FORWARD, wxART_HELP_BROWSER) wupnodeBitmap = wxArtProvider_GetBitmap(wxART_GO_TO_PARENT, wxART_HELP_BROWSER) wupBitmap = wxArtProvider_GetBitmap(wxART_GO_UP, wxART_HELP_BROWSER) wdownBitmap = wxArtProvider_GetBitmap(wxART_GO_DOWN, wxART_HELP_BROWSER) wopenBitmap = wxArtProvider_GetBitmap(wxART_FILE_OPEN, wxART_HELP_BROWSER) wprintBitmap = wxArtProvider_GetBitmap(wxART_PRINT, wxART_HELP_BROWSER) assert wpanelBitmap.Ok() and wbackBitmap.Ok() and wforwardBitmap.Ok() and wupnodeBitmap.Ok() and wupBitmap.Ok() and wdownBitmap.Ok() and wopenBitmap.Ok() and wprintBitmap.Ok() toolBar.AddSimpleTool(wxID_HTML_PANEL, wpanelBitmap, "Show/hide navigation panel") toolBar.AddSeparator() toolBar.AddSimpleTool(wxID_HTML_BACK, wbackBitmap, "Go back") toolBar.AddSimpleTool(wxID_HTML_FORWARD, wforwardBitmap, "Go forward") toolBar.AddSeparator() toolBar.AddSimpleTool(wxID_HTML_UPNODE, wupnodeBitmap, "Go one level up in document hierarchy") toolBar.AddSimpleTool(wxID_HTML_UP, wupBitmap, "Previous page") toolBar.AddSimpleTool(wxID_HTML_DOWN, wdownBitmap, "Next page") if style & wxHF_PRINT: toolBar.AddSimpleTool(wxID_HTML_PRINT, wprintBitmap, "Print this page")
def AddToolBarButtons(self, toolBar, style): wpanelBitmap = wxArtProvider_GetBitmap(wxART_HELP_SIDE_PANEL, wxART_HELP_BROWSER) wbackBitmap = wxArtProvider_GetBitmap(wxART_GO_BACK, wxART_HELP_BROWSER) wforwardBitmap = wxArtProvider_GetBitmap(wxART_GO_FORWARD, wxART_HELP_BROWSER) wupnodeBitmap = wxArtProvider_GetBitmap(wxART_GO_TO_PARENT, wxART_HELP_BROWSER) wupBitmap = wxArtProvider_GetBitmap(wxART_GO_UP, wxART_HELP_BROWSER) wdownBitmap = wxArtProvider_GetBitmap(wxART_GO_DOWN, wxART_HELP_BROWSER) wopenBitmap = wxArtProvider_GetBitmap(wxART_FILE_OPEN, wxART_HELP_BROWSER) wprintBitmap = wxArtProvider_GetBitmap(wxART_PRINT, wxART_HELP_BROWSER)
a4e2e4e03c3ae8d24817935745aacd63f3d1c84e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2448/a4e2e4e03c3ae8d24817935745aacd63f3d1c84e/wxApp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 6364, 5190, 14388, 12, 2890, 16, 5226, 5190, 16, 2154, 4672, 6357, 30427, 12224, 273, 7075, 4411, 2249, 67, 967, 12224, 12, 27226, 4928, 67, 27396, 67, 26498, 67, 30819, 2247, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 6364, 5190, 14388, 12, 2890, 16, 5226, 5190, 16, 2154, 4672, 6357, 30427, 12224, 273, 7075, 4411, 2249, 67, 967, 12224, 12, 27226, 4928, 67, 27396, 67, 26498, 67, 30819, 2247, 16, ...
self.SetProperties()
def bus_message_statechange(self, bus, message): """ Handler for the GStreamer statechange message. """ # state has changed try: q = self.bin.query_duration(gst.FORMAT_TIME) if self.duration == 0: self.duration = float(q[0] / float(gst.SECOND)) self.SetProperties() #update position with proper duration self.MoveButDoNotOverlap(self.start) self.StateChanged(self.MOVE) self.StateChanged(self.LENGTH) except: # no size available yet pass
a2e34a9cededd15d42f883828a141be3c760c707 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/a2e34a9cededd15d42f883828a141be3c760c707/Event.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5766, 67, 2150, 67, 2019, 3427, 12, 2890, 16, 5766, 16, 883, 4672, 3536, 4663, 364, 326, 611, 1228, 264, 919, 3427, 883, 18, 3536, 468, 919, 711, 3550, 775, 30, 1043, 273, 365, 18, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5766, 67, 2150, 67, 2019, 3427, 12, 2890, 16, 5766, 16, 883, 4672, 3536, 4663, 364, 326, 611, 1228, 264, 919, 3427, 883, 18, 3536, 468, 919, 711, 3550, 775, 30, 1043, 273, 365, 18, 4...
self._statusbar(msg="Emptying cache...")
self._statusbar(_("Emptying cache..."))
def empty_cache(self, wid, data=None):
9064ea83b7f7c250ddde26dda9d2d559d0848000 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2654/9064ea83b7f7c250ddde26dda9d2d559d0848000/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1008, 67, 2493, 12, 2890, 16, 15481, 16, 501, 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, 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, 1008, 67, 2493, 12, 2890, 16, 15481, 16, 501, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
userBase = '/%s/user/%s/%s' % (vi, username[0], username)
userBase = '/%s/user/%s/%s' % (vo, username[0], username)
def isOlderThan(stringTime,days): timeDelta = timedelta(days=days) st = time.strptime(stringTime, "%a %b %d %H:%M:%S %Y") cTimeStruct = datetime(st[0],st[1],st[2],st[3],st[4],st[5],st[6],None) maxCTime = datetime.utcnow() - timeDelta if cTimeStruct < maxCTime: return True return False
44b3be8b1b9aa6fb3a9b203379a4116b65c6054d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/44b3be8b1b9aa6fb3a9b203379a4116b65c6054d/dirac-dms-user-lfns.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 51, 80, 765, 9516, 12, 1080, 950, 16, 9810, 4672, 813, 9242, 273, 10661, 12, 9810, 33, 9810, 13, 384, 273, 813, 18, 701, 10650, 12, 1080, 950, 16, 2213, 69, 738, 70, 738, 72, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 51, 80, 765, 9516, 12, 1080, 950, 16, 9810, 4672, 813, 9242, 273, 10661, 12, 9810, 33, 9810, 13, 384, 273, 813, 18, 701, 10650, 12, 1080, 950, 16, 2213, 69, 738, 70, 738, 72, ...
def iterate_languages(self):
def test_iterate_languages(self):
def iterate_languages(self): """Unit test for the method iterate_languages()""" for language in self.locales.iterate_languages(): self.assert_(type(language) is str) self.assert_(len(str) > 0) self.assert_(len(str) < 9)
e80a2af277b1bd33ed3ee48baba2aa00b41862c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/e80a2af277b1bd33ed3ee48baba2aa00b41862c5/Unix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 18793, 67, 14045, 12, 2890, 4672, 3536, 2802, 1842, 364, 326, 707, 7401, 67, 14045, 1435, 8395, 364, 2653, 316, 365, 18, 22638, 18, 18793, 67, 14045, 13332, 365, 18, 11231, 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, 1842, 67, 18793, 67, 14045, 12, 2890, 4672, 3536, 2802, 1842, 364, 326, 707, 7401, 67, 14045, 1435, 8395, 364, 2653, 316, 365, 18, 22638, 18, 18793, 67, 14045, 13332, 365, 18, 11231, 67,...
('PURELIB/', ''),
('PURELIB/', ''), ('PLATLIB/pywin32_system32', ''),
def get_exe_prefixes(exe_filename): """Get exe->egg path translations for a given .exe file""" prefixes = [ ('PURELIB/', ''), ('PLATLIB/', ''), ('SCRIPTS/', 'EGG-INFO/scripts/') ] z = zipfile.ZipFile(exe_filename) try: for info in z.infolist(): name = info.filename parts = name.split('/') if len(parts)==3 and parts[2]=='PKG-INFO': if parts[1].endswith('.egg-info'): prefixes.insert(0,('/'.join(parts[:2]), 'EGG-INFO/')) break if len(parts)<>2 or not name.endswith('.pth'): continue if name.endswith('-nspkg.pth'): continue if parts[0] in ('PURELIB','PLATLIB'): for pth in yield_lines(z.read(name)): pth = pth.strip().replace('\\','/') if not pth.startswith('import'): prefixes.append((('%s/%s/' % (parts[0],pth)), '')) finally: z.close() prefixes.sort(); prefixes.reverse() return prefixes
005e04d61453acbf4ce1b6c244bda2f4e97989ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/495/005e04d61453acbf4ce1b6c244bda2f4e97989ca/easy_install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14880, 67, 17777, 12, 14880, 67, 3459, 4672, 3536, 967, 15073, 2122, 23171, 589, 7863, 364, 279, 864, 263, 14880, 585, 8395, 225, 9419, 273, 306, 7707, 52, 4830, 14484, 19, 2187...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14880, 67, 17777, 12, 14880, 67, 3459, 4672, 3536, 967, 15073, 2122, 23171, 589, 7863, 364, 279, 864, 263, 14880, 585, 8395, 225, 9419, 273, 306, 7707, 52, 4830, 14484, 19, 2187...
[Group(()), Group([ (2,3) ]), Group([ (1,2,3) ]), Group([ (1,3,2), (1,2) ])]
[Permutation Group with generators [()], Permutation Group with generators [(2,3)], Permutation Group with generators [(1,2,3)], Permutation Group with generators [(1,3,2), (1,2)]]
def conjugacy_classes_subgroups(self): """ Returns a complete list of representatives of conjugacy classes of subgroups in a permutation group G. The ordering is that given by GAP.
3e8b18bda1077d212c1dfac7ebfd14b09ab89d5d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3e8b18bda1077d212c1dfac7ebfd14b09ab89d5d/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10550, 637, 3505, 67, 4701, 67, 1717, 4650, 12, 2890, 4672, 3536, 2860, 279, 3912, 666, 434, 2406, 8785, 434, 10550, 637, 3505, 3318, 434, 720, 4650, 316, 279, 17440, 1041, 611, 18, 1021...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10550, 637, 3505, 67, 4701, 67, 1717, 4650, 12, 2890, 4672, 3536, 2860, 279, 3912, 666, 434, 2406, 8785, 434, 10550, 637, 3505, 3318, 434, 720, 4650, 316, 279, 17440, 1041, 611, 18, 1021...
TClist = [ZSI.TC.String(pname="MessageIdentifier", aname="_MessageIdentifier", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="Report", aname="_Report", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="Text", aname="_Text", minOccurs=0, maxOccurs=1, nillable=True, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.IpositiveInteger(pname="LibraryNumber", aname="_LibraryNumber", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.csoft.co.uk/dtd/sendsms5.xsd","Reserved",lazy=False)(pname="Reserved", aname="_Reserved", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
TClist = [ZSI.TC.String(pname="MessageIdentifier", aname="_MessageIdentifier", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="Report", aname="_Report", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="Text", aname="_Text", minOccurs=0, maxOccurs=1, nillable=True, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.InonNegativeInteger(pname="LibraryNumber", aname="_LibraryNumber", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.csoft.co.uk/dtd/sendsms5.xsd","Reserved",lazy=False)(pname="Reserved", aname="_Reserved", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
def __init__(self, **kw): ns = ns0.SubmitMessageResponse_Dec.schema TClist = [ZSI.TC.String(pname="MessageIdentifier", aname="_MessageIdentifier", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="Report", aname="_Report", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="Text", aname="_Text", minOccurs=0, maxOccurs=1, nillable=True, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.IpositiveInteger(pname="LibraryNumber", aname="_LibraryNumber", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.csoft.co.uk/dtd/sendsms5.xsd","Reserved",lazy=False)(pname="Reserved", aname="_Reserved", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] kw["pname"] = ("http://www.csoft.co.uk/dtd/sendsms5.xsd","SubmitMessageResponse") kw["aname"] = "_SubmitMessageResponse" self.attribute_typecode_dict = {} ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw) class Holder: __metaclass__ = pyclass_type typecode = self def __init__(self): # pyclass self._MessageIdentifier = None self._Report = None self._Text = None self._LibraryNumber = None self._Reserved = None return Holder.__name__ = "SubmitMessageResponse_Holder" self.pyclass = Holder
2b27a2081db71084b93aca159e3d20ade63094a4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7254/2b27a2081db71084b93aca159e3d20ade63094a4/Service_services_types.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 9987, 4672, 3153, 273, 3153, 20, 18, 11620, 1079, 1064, 67, 1799, 18, 4821, 23718, 1098, 273, 306, 62, 2320, 18, 15988, 18, 780, 12, 84, 529, 1546,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 9987, 4672, 3153, 273, 3153, 20, 18, 11620, 1079, 1064, 67, 1799, 18, 4821, 23718, 1098, 273, 306, 62, 2320, 18, 15988, 18, 780, 12, 84, 529, 1546,...
jobAttrNames.append('Status') jobAttrValues.append('Received') jobAttrNames.append('MinorStatus') jobAttrValues.append('Job Rescheduled') jobAttrNames.append('ApplicationStatus') jobAttrValues.append('Unknown') jobAttrNames.append('ApplicationNumStatus') jobAttrValues.append(0) jobAttrNames.append('LastUpdateTime') jobAttrValues.append(Time.toString()) jobAttrNames.append('RescheduleTime') jobAttrValues.append(Time.toString())
jobAttrNames.append( 'Status' ) jobAttrValues.append( 'Received' ) jobAttrNames.append( 'MinorStatus' ) jobAttrValues.append( 'Job Rescheduled' ) jobAttrNames.append( 'ApplicationStatus' ) jobAttrValues.append( 'Unknown' ) jobAttrNames.append( 'ApplicationNumStatus' ) jobAttrValues.append( 0 ) jobAttrNames.append( 'LastUpdateTime' ) jobAttrValues.append( Time.toString() ) jobAttrNames.append( 'RescheduleTime' ) jobAttrValues.append( Time.toString() )
def rescheduleJob (self, jobID): """ Reschedule the given job to run again from scratch. Retain the already defined parameters in the parameter Attic """ # Check Verified Flag result = self.getJobAttributes( jobID, ['Status','MinorStatus','VerifiedFlag','RescheduleCounter', 'Owner','OwnerDN','OwnerGroup','DIRACSetup'] ) if result['OK']: resultDict = result['Value'] else: return S_ERROR('JobDB.getJobAttributes: can not retrieve job attributes')
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, 400, 2847, 2278, 261, 2890, 16, 28913, 4672, 3536, 1124, 2847, 326, 864, 1719, 358, 1086, 3382, 628, 15289, 18, 17100, 530, 326, 1818, 2553, 1472, 316, 326, 1569, 6020, 335, 3536, 468, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 400, 2847, 2278, 261, 2890, 16, 28913, 4672, 3536, 1124, 2847, 326, 864, 1719, 358, 1086, 3382, 628, 15289, 18, 17100, 530, 326, 1818, 2553, 1472, 316, 326, 1569, 6020, 335, 3536, 468, 2...
print >>sys.stderr, 'Error in job:', description print >>sys.stderr, exception print >>sys.stderr, formatted_traceback
print >>sys.stderr, 'Error in job:', description.encode('utf8') print >>sys.stderr, exception.encode('utf8') print >>sys.stderr, formatted_traceback.encode('utf8')
def device_job_exception(self, id, description, exception, formatted_traceback): ''' Handle exceptions in threaded jobs. ''' print >>sys.stderr, 'Error in job:', description print >>sys.stderr, exception print >>sys.stderr, formatted_traceback if not self.device_error_dialog.isVisible(): msg = u'<p><b>%s</b>: '%(exception.__class__.__name__,) + unicode(str(exception), 'utf8', 'replace') + u'</p>' msg += u'<p>Failed to perform <b>job</b>: '+description msg += u'<p>Further device related error messages will not be shown while this message is visible.' msg += u'<p>Detailed <b>traceback</b>:<pre>' msg += formatted_traceback self.device_error_dialog.set_message(msg) self.device_error_dialog.show()
38402d7e569d78807102cbf93536e71f9edde8a2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/38402d7e569d78807102cbf93536e71f9edde8a2/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2346, 67, 4688, 67, 4064, 12, 2890, 16, 612, 16, 2477, 16, 1520, 16, 4955, 67, 21696, 4672, 9163, 5004, 4798, 316, 286, 20528, 6550, 18, 9163, 1172, 1671, 9499, 18, 11241, 16, 296, 668...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2346, 67, 4688, 67, 4064, 12, 2890, 16, 612, 16, 2477, 16, 1520, 16, 4955, 67, 21696, 4672, 9163, 5004, 4798, 316, 286, 20528, 6550, 18, 9163, 1172, 1671, 9499, 18, 11241, 16, 296, 668...
else: self.theRunningFlag = 0
def stopSimulation( self, obj ) :
addb904a55036e7f8202bd5f773d8c610fb9fd3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/addb904a55036e7f8202bd5f773d8c610fb9fd3a/MainWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 18419, 12, 365, 16, 1081, 262, 294, 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, 2132, 18419, 12, 365, 16, 1081, 262, 294, 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,...
items = countReagents(char.getbackpack(), self.reagents.copy())
def checkreagents(self, char, mode, args=[]): if not char.npc and len(self.reagents) > 0: items = countReagents(char.getbackpack(), self.reagents.copy()) if arcanegem.canConsumeCharges( char ): return True char.message(502630) return False
b74cd62cfa4d2efa0aa942024da155a9fbf60d24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/b74cd62cfa4d2efa0aa942024da155a9fbf60d24/spell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 266, 23560, 12, 2890, 16, 1149, 16, 1965, 16, 833, 33, 8526, 4672, 309, 486, 1149, 18, 82, 2436, 471, 562, 12, 2890, 18, 266, 23560, 13, 405, 374, 30, 309, 419, 4169, 1332, 351,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 266, 23560, 12, 2890, 16, 1149, 16, 1965, 16, 833, 33, 8526, 4672, 309, 486, 1149, 18, 82, 2436, 471, 562, 12, 2890, 18, 266, 23560, 13, 405, 374, 30, 309, 419, 4169, 1332, 351,...
def set_sched_mc_power(sched_mc_level): ''' Routine to set sched_mc_power_savings to required level ''' try: os.system('echo %s > \ /sys/devices/system/cpu/sched_mc_power_savings' % sched_mc_level) except OSError, e: print "Could not set sched_mc_power_savings to", e sys.exit(1) def set_sched_smt_power(sched_smt_level): ''' Routine to set sched_smt_power_savings to required level ''' try: os.system('echo %s > \ /sys/devices/system/cpu/sched_smt_power_savings' % sched_smt_level) except OSError, e: print "Could not set sched_smt_power_savings to", e sys.exit(1) def count_num_cpu(): ''' Returns number of cpu's in system ''' try: cpuinfo = open('/proc/cpuinfo', 'r') global cpu_count for line in cpuinfo: if line.startswith('processor'): cpu_count += 1 cpuinfo.close() except IOError, e: print "Could not get cpu count", e sys.exit(1)
def get_hyper_thread_count(): ''' Return number of threads in CPU. For eg for x3950 this function would return 2. In future if 4 threads are supported in CPU, this routine would return 4 ''' try: file_cpuinfo = open("/proc/cpuinfo", 'r') for line in file_cpuinfo: if line.startswith('siblings'): siblings = line.split(":") if line.startswith('cpu cores'): cpu_cores = line.split(":") break return( int( siblings[1] ) / int( cpu_cores[1] ) ) except Exception: print "Failed to check if system is hyper-threaded" sys.exit(1)
def set_sched_mc_power(sched_mc_level): ''' Routine to set sched_mc_power_savings to required level ''' try: os.system('echo %s > \ /sys/devices/system/cpu/sched_mc_power_savings' % sched_mc_level) except OSError, e: print "Could not set sched_mc_power_savings to", e sys.exit(1)
b2c7cd73607f781c03a9475f07333b594ed7d1a5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11457/b2c7cd73607f781c03a9475f07333b594ed7d1a5/sched_mc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 87, 2049, 67, 13952, 67, 12238, 12, 87, 2049, 67, 13952, 67, 2815, 4672, 9163, 7271, 558, 358, 444, 23964, 67, 13952, 67, 12238, 67, 87, 27497, 358, 1931, 1801, 9163, 775, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 87, 2049, 67, 13952, 67, 12238, 12, 87, 2049, 67, 13952, 67, 2815, 4672, 9163, 7271, 558, 358, 444, 23964, 67, 13952, 67, 12238, 67, 87, 27497, 358, 1931, 1801, 9163, 775, 30,...
(name_id, context['module'], 'ir.model', model_id) )
(name_id, context['module'], 'ir.model', model_id), debug=self._debug)
def _field_create(self, cr, context=None): if not context: context = {} cr.execute("SELECT id FROM ir_model WHERE model=%s", (self._name,), debug=self._debug) if not cr.rowcount: cr.execute("INSERT INTO ir_model (model, name, info, state) " "VALUES (%s, %s, %s, %s)" "RETURNING id", (self._name, self._description, self.__doc__, 'base'), debug=self._debug) model_id = cr.fetchone()[0] else: model_id = cr.fetchone()[0] if 'module' in context: name_id = 'model_'+self._name.replace('.','_') cr.execute('SELECT id, module FROM ir_model_data ' "WHERE name=%s AND model = 'ir.model' AND res_id=%s", (name_id, model_id))
576b9b9dde9bc5cb94ed08af963a74742efcc864 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/576b9b9dde9bc5cb94ed08af963a74742efcc864/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1518, 67, 2640, 12, 2890, 16, 4422, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 4422, 18, 8837, 2932, 4803, 612, 4571, 9482, 67, 2284, 4852, 938, 5095, 87, 3113, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1518, 67, 2640, 12, 2890, 16, 4422, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 4422, 18, 8837, 2932, 4803, 612, 4571, 9482, 67, 2284, 4852, 938, 5095, 87, 3113, ...
if session.has_key("__builtins__"): del(session["__builtins__"]) for k in session.keys(): if type(session[k]) in [types.ClassType, types.ModuleType]: print "[%s] (%s) can't be saved. Deleted." % (k, type(session[k])) del(session[k])
def usage(): print "Usage: scapy.py [-s sessionfile]" sys.exit(0)
27bed6a92df3a68277fbf16b18a0ea016801e02b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/27bed6a92df3a68277fbf16b18a0ea016801e02b/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 5357, 30, 888, 438, 93, 18, 2074, 23059, 87, 1339, 768, 4279, 2589, 18, 8593, 12, 20, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 5357, 30, 888, 438, 93, 18, 2074, 23059, 87, 1339, 768, 4279, 2589, 18, 8593, 12, 20, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
cmdclass = {'build_ext':PyBuildExt},
cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall},
def main(): setup(name = 'Python standard library', version = '%d.%d' % sys.version_info[:2], cmdclass = {'build_ext':PyBuildExt}, # The struct module is defined here, because build_ext won't be # called unless there's at least one extension module defined. ext_modules=[Extension('struct', ['structmodule.c'])], # Scripts to install scripts = ['Tools/scripts/pydoc'] )
11ebaff9a39bcd9ea5f9e5ba6024eb948ceecb48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11ebaff9a39bcd9ea5f9e5ba6024eb948ceecb48/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3875, 12, 529, 273, 296, 15774, 4529, 5313, 2187, 1177, 273, 1995, 72, 7866, 72, 11, 738, 2589, 18, 1589, 67, 1376, 10531, 22, 6487, 1797, 1106, 273, 13666, 3510, 67, 408, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3875, 12, 529, 273, 296, 15774, 4529, 5313, 2187, 1177, 273, 1995, 72, 7866, 72, 11, 738, 2589, 18, 1589, 67, 1376, 10531, 22, 6487, 1797, 1106, 273, 13666, 3510, 67, 408, ...
self.Opt = opt
self.Opt = opt
def __init__(self, opt, args): self.SysPlatform = sys.platform self.EdkToolsPath = os.getenv("EDK_TOOLS_PATH") self.WorkSpace = os.getenv("WORKSPACE") self.Path = os.getenv("PATH") self.Opt = opt self.Args = args self.ArgList = ['all', 'genc', 'genmake', 'modules', 'libraries', 'clean', 'cleanall', 'cleanlib', 'run'] self.TargetTxt = TargetTxtClassObject() self.ToolDef = ToolDefClassObject() self.Sem = None self.StartTime = time.time() self.GenC = None self.GenMake = None self.All = None self.ReturnCode = [0,1] if len(self.Args) == 0: self.All = 1 elif len(self.Args) >= 2: EdkLogger.quiet("There are too many targets in command line input, please select one from: %s" %(''.join(elem + ' ' for elem in self.ArgList))) else: t = self.Args[0].lower() if t not in self.ArgList: EdkLogger.quiet("'%s' is an invalid targets, please select one from: %s" %(self.Args[0], ''.join(elem + ' ' for elem in self.ArgList))) self.isexit(1) if t == 'genc': self.GenC = 1 elif t == 'genmake': self.GenMake = 1 elif t == 'all' or t == '': self.All = 1 else: self.Args = t EdkLogger.quiet(time.strftime("%a, %d %b %Y %H:%M:%S +0000\n", time.localtime()))
0325ac5d1f74d21e458f42cf188018423ed1c52c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/0325ac5d1f74d21e458f42cf188018423ed1c52c/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2153, 16, 833, 4672, 365, 18, 12712, 8201, 225, 273, 2589, 18, 9898, 365, 18, 2671, 79, 10348, 743, 273, 1140, 18, 588, 3074, 2932, 2056, 47, 67, 26263, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2153, 16, 833, 4672, 365, 18, 12712, 8201, 225, 273, 2589, 18, 9898, 365, 18, 2671, 79, 10348, 743, 273, 1140, 18, 588, 3074, 2932, 2056, 47, 67, 26263, ...
package,forcePluginRoot=self.force_plugin_root
package, forcePluginRoot=self.force_plugin_root, includeRoot=0,
def generateDependentImports(self,element): outfile=StringIO() package=element.getPackage()
0c720f1b9ebf5dc01cddab2a8cea32fedb71c1a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/0c720f1b9ebf5dc01cddab2a8cea32fedb71c1a3/BaseGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 18571, 13347, 12, 2890, 16, 2956, 4672, 8756, 33, 780, 4294, 1435, 2181, 33, 2956, 18, 588, 2261, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 18571, 13347, 12, 2890, 16, 2956, 4672, 8756, 33, 780, 4294, 1435, 2181, 33, 2956, 18, 588, 2261, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
+ '\end_inset\n\n\n' \ + '\end_layout\n'
+ '\\end_inset\n\n\n' \ + '\\end_layout\n'
def convert_bibtexClearpage(document): " insert a clear(double)page bibliographystyle if bibtotoc option is used " while True: i = find_token(document.header, '\\papersides', 0) if i == -1: document.warning("Malformed LyX document: Can't find papersides definition.") return else: sides = int(document.header[i][12]) # only act of there is the option "bibtotoc" j = find_token(document.body, 'options "bibtotoc', 0) if j == -1: return subst1 = '\\begin_layout Standard\n' \ + '\\begin_inset Newpage clearpage\n' \ + '\end_inset\n\n\n' \ + '\end_layout\n' subst2 = '\\begin_layout Standard\n' \ + '\\begin_inset Newpage cleardoublepage\n' \ + '\end_inset\n\n\n' \ + '\end_layout\n' if sides == 1: document.body.insert(j -5, subst1) else: document.body.insert(j -5, subst2) return
580a984e2ca469f8c83c461f4b8e743b18ce9f47 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/580a984e2ca469f8c83c461f4b8e743b18ce9f47/lyx_2_0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 70, 495, 21763, 9094, 2433, 12, 5457, 4672, 315, 2243, 279, 2424, 12, 9056, 13, 2433, 25581, 549, 8829, 1094, 1362, 309, 25581, 3307, 504, 1456, 353, 1399, 315, 1323, 1053, 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, 1765, 67, 70, 495, 21763, 9094, 2433, 12, 5457, 4672, 315, 2243, 279, 2424, 12, 9056, 13, 2433, 25581, 549, 8829, 1094, 1362, 309, 25581, 3307, 504, 1456, 353, 1399, 315, 1323, 1053, 30,...
real_price = get_real_price(price_unit_res, product.id, pricelist)
real_price = get_real_price(price_unit_res, product.id, qty, uom, pricelist)
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
95124a4a3f5b4124e6d6fd7b365643e639e0c5f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/95124a4a3f5b4124e6d6fd7b365643e639e0c5f7/product_visible_discount.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7688, 67, 8694, 12, 455, 67, 1576, 16, 3017, 67, 350, 16, 846, 335, 5449, 4672, 761, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 683, 335, 5449, 18, 1726, 6134, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7688, 67, 8694, 12, 455, 67, 1576, 16, 3017, 67, 350, 16, 846, 335, 5449, 4672, 761, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 683, 335, 5449, 18, 1726, 6134, ...
if p1: req.write("<p>Words nearest to <strong>%s</strong> inside <strong>%s</strong> are:<br>" % (p1, f1)) req.write(create_nearest_words_links(url, p1, f1)) if p2: req.write("<p>Words nearest to <strong>%s</strong> inside <strong>%s</strong> are:<br>" % (p2, f2)) req.write(create_nearest_words_links(url, p2, f2)) if p3: req.write("<p>Words nearest to <strong>%s</strong> inside <strong>%s</strong> are:<br>" % (p3, f3)) req.write(create_nearest_words_links(url, p3, f3)) else: req.write("<p>Words nearest to <strong>%s</strong> inside <strong>%s</strong> are:<br>" % (p, f))
browse_pattern(req, colls_to_search, p1, f1, rg) browse_pattern(req, colls_to_search, p2, f2, rg) browse_pattern(req, colls_to_search, p3, f3, rg) else:
def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """Perform search, without checking for authentication. Return list of recIDs found, if of=id. Otherwise create web page.""" # wash all passed arguments: cc = wash_url_argument(cc, 'str') p = wash_url_argument(p, 'str') f = wash_url_argument(f, 'str') rg = wash_url_argument(rg, 'int') sf = wash_url_argument(sf, 'str') so = wash_url_argument(so, 'str') sp = wash_url_argument(sp, 'string') of = wash_url_argument(of, 'str') if type(ot) is list: ot = string.join(ot,",") ot = wash_url_argument(ot, 'str') as = wash_url_argument(as, 'int') p1 = wash_url_argument(p1, 'str') f1 = wash_url_argument(f1, 'str') m1 = wash_url_argument(m1, 'str') op1 = wash_url_argument(op1, 'str') p2 = wash_url_argument(p2, 'str') f2 = wash_url_argument(f2, 'str') m2 = wash_url_argument(m2, 'str') op2 = wash_url_argument(op2, 'str') p3 = wash_url_argument(p3, 'str') f3 = wash_url_argument(f3, 'str') m3 = wash_url_argument(m3, 'str') sc = wash_url_argument(sc, 'int') jrec = wash_url_argument(jrec, 'int') id = wash_url_argument(id, 'int') idb = wash_url_argument(idb, 'int') sysnb = wash_url_argument(sysnb, 'int') search = wash_url_argument(search, 'str') d1y = wash_url_argument(d1y, 'str') d1m = wash_url_argument(d1m, 'str') d1d = wash_url_argument(d1d, 'str') d2y = wash_url_argument(d2y, 'str') d2m = wash_url_argument(d2m, 'str') d2d = wash_url_argument(d2d, 'str') day1, day2 = wash_dates(d1y, d1m, d1d, d2y, d2m, d2d) # start output if of.startswith('x'): # we are doing XML output: req.content_type = "text/xml" req.send_http_header() req.write("""<?xml version="1.0" encoding="UTF-8"?>\n""") if of.startswith("xm"): req.write("""<collection xmlns="http://www.loc.gov/MARC21/slim">\n""") else: req.write("""<collection>\n""") elif of.startswith('t') or str(of[0:3]).isdigit(): # we are doing plain text output: req.content_type = "text/plain" req.send_http_header() elif of == "id": # we are passing list of recIDs pass else: # we are doing HTML output: req.content_type = "text/html" req.send_http_header() # detect user: try: uid = getUid(req) req.write(create_header(cc, as, create_user_infobox(uid))) except: # ignore user personalisation, needed e.g. for command-line req.write(create_header(cc, as)) if sysnb or id>0: ## 1 - detailed record display if sysnb: # ALEPH sysnb is passed, so deduce MySQL id for the record: id = get_mysql_recid_from_aleph_sysno(sysnb) if of=="hb": of = "hd" if record_exists(id): if idb<=id: # sanity check idb=id+1 print_records(req, range(id,idb), -1, -9999, of, ot) else: # record does not exist if of.startswith("h"): (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d)) print_warning(req, "Requested record does not seem to exist.", None, "<p>") elif search == "Browse": ## 2 - browse needed (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) # write search box: if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d)) url = string.replace(req.args, "search=Browse","search=SEARCH") if as==1 or (p1 or p2 or p3): if p1: req.write("<p>Words nearest to <strong>%s</strong> inside <strong>%s</strong> are:<br>" % (p1, f1)) req.write(create_nearest_words_links(url, p1, f1)) if p2: req.write("<p>Words nearest to <strong>%s</strong> inside <strong>%s</strong> are:<br>" % (p2, f2)) req.write(create_nearest_words_links(url, p2, f2)) if p3: req.write("<p>Words nearest to <strong>%s</strong> inside <strong>%s</strong> are:<br>" % (p3, f3)) req.write(create_nearest_words_links(url, p3, f3)) else: req.write("<p>Words nearest to <strong>%s</strong> inside <strong>%s</strong> are:<br>" % (p, f)) #req.write(create_nearest_words_links(url, p, f)) browse_pattern(req, colls_to_search, p, f, rg) else: ## 3 - search needed # wash passed collection arguments: (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) # write search box: if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d)) # run search: t1 = os.times()[4] if as == 1 or (p1 or p2 or p3): # 3A - advanced search results_final = search_pattern(req, "", "", colls_to_search) if p1: results_tmp = search_pattern(req, p1, f1, colls_to_search, m1) for coll in colls_to_search: # join results for first advanced search boxen results_final[coll].intersect(results_tmp[coll]) if p2: results_tmp = search_pattern(req, p2, f2, colls_to_search, m2) for coll in colls_to_search: # join results for first and second advanced search boxen if op1 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op1 == "o": # or results_final[coll].union(results_tmp[coll]) elif op1 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") if p3: results_tmp = search_pattern(req, p3, f3, colls_to_search, m3) for coll in colls_to_search: # join results for second and third advanced search boxen if op2 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op2 == "o": # or results_final[coll].union(results_tmp[coll]) elif op2 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") for coll in colls_to_search: results_final[coll].calculate_nbhits() else: # 3B - simple search search_cache_key = p+"@"+f+"@"+string.join(colls_to_search,",") if search_cache.has_key(search_cache_key): # is the result in search cache? results_final = search_cache[search_cache_key] else: results_final = search_pattern(req, p, f, colls_to_search) search_cache[search_cache_key] = results_final if len(search_cache) > cfg_search_cache_size: # is the cache full? (sanity cleaning) search_cache.clear() # search done; was there a time restriction? if yes, apply it now: if day1 != "": results_of_time_restriction = search_in_bibrec(day1, day2) for coll in colls_to_search: results_final[coll].intersect(results_of_time_restriction) results_final[coll].calculate_nbhits() t2 = os.times()[4] cpu_time = t2 - t1 # find total number of records found in each collection results_final_nb_total = 0 results_final_nb = {} for coll in colls_to_search: results_final_nb[coll] = results_final[coll]._nbhits results_final_nb_total += results_final_nb[coll] # was there at least one hit? if results_final_nb_total == 0: # nope, so try similar queries: if of.startswith('h'): print_warning(req, "No match found. Trying similar queries...", "", "<p>","<p>") req.write("<p>") if as==1 or (p1 or p2 or p3): if p1: search_pattern(req, p1, f1, colls_to_search, m1, 1) if p2: search_pattern(req, p2, f2, colls_to_search, m2, 1) if p3: search_pattern(req, p3, f3, colls_to_search, m3, 1) else: search_pattern(req, p, f, colls_to_search, None, 1) else: # yes, some hits found, so print results overview: if of == "id": # we have been asked to return list of recIDs results_final_for_all_colls = HitList() for coll in colls_to_search: results_final_for_all_colls.union(results_final[coll]) return results_final_for_all_colls.items() elif of.startswith("h"): req.write(print_results_overview(colls_to_search, results_final_nb_total, results_final_nb, cpu_time)) # print records: if len(colls_to_search)>1: cpu_time = -1 # we do not want to have search time printed on each collection for coll in colls_to_search: if results_final[coll]._nbhits: if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, of, ot, coll, results_final_nb[coll], jrec, rg, as, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time)) results_final_sorted = results_final[coll].items() if sf: results_final_sorted = sort_records(req, results_final_sorted, sf, so, sp) print_records(req, results_final_sorted, jrec, rg, of, ot) if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, of, ot, coll, results_final_nb[coll], jrec, rg, as, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time, 1)) # log query: try: log_query(req.get_remote_host(), req.args, uid) except: # do not log query if req is None (used by CLI interface) pass log_query_info("ss", p, f, colls_to_search, results_final_nb_total) # 4 -- write footer: if of.startswith('h'): req.write(create_footer()) elif of.startswith('x'): req.write("""</collection>\n""") # 5 - return value if of == "id": return [] else: return "\n"
03e310531e299959e23e689e2221361a7aa1e6d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/03e310531e299959e23e689e2221361a7aa1e6d6/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2293, 67, 3072, 12, 3658, 33, 7036, 16, 4946, 33, 71, 2377, 529, 16, 276, 33, 7036, 16, 293, 1546, 3113, 284, 1546, 3113, 14524, 1546, 2163, 3113, 9033, 1546, 3113, 1427, 154...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2293, 67, 3072, 12, 3658, 33, 7036, 16, 4946, 33, 71, 2377, 529, 16, 276, 33, 7036, 16, 293, 1546, 3113, 284, 1546, 3113, 14524, 1546, 2163, 3113, 9033, 1546, 3113, 1427, 154...
self.ResourceNamesInCheck.remove(resourceeName)
self.ResourceNamesInCheck.remove(resourceName)
def _executeCheck(self, toBeChecked): """ Create instance of a PEP, instantiated popping a resource from lists. """ try: while True: granularity = toBeChecked[0] resourceName = toBeChecked[1] status = toBeChecked[2] formerStatus = toBeChecked[3] siteType = toBeChecked[4] resourceType = toBeChecked[5] gLogger.info("Checking Resource %s, with status %s" % (resourceName, status)) newPEP = PEP(granularity = granularity, name = resourceName, status = status, formerStatus = formerStatus, siteType = siteType, resourceType = resourceType) newPEP.enforce(rsDBIn = self.rsDB, setupIn = self.setup) # remove from InCheck list self.lockObj.acquire() try: self.ResourceNamesInCheck.remove(toBeChecked[1]) finally: self.lockObj.release()
6ec93a52146ba8a96112a93012299049a429be7d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6ec93a52146ba8a96112a93012299049a429be7d/RSInspectorAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 1564, 12, 2890, 16, 21333, 11454, 4672, 3536, 1788, 791, 434, 279, 453, 10541, 16, 17651, 1843, 1382, 279, 1058, 628, 6035, 18, 3536, 225, 775, 30, 225, 1323, 1053, 30, 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, 389, 8837, 1564, 12, 2890, 16, 21333, 11454, 4672, 3536, 1788, 791, 434, 279, 453, 10541, 16, 17651, 1843, 1382, 279, 1058, 628, 6035, 18, 3536, 225, 775, 30, 225, 1323, 1053, 30, 225, ...
class DNSBrowser(Reports.report):
class DNSBrowser(Reports.CaseTableReports):
def create(self, dbh, case): dbh.execute( """Create table if not exists `dns` ( `packet_id` int, `name` VARCHAR(255) NOT NULL, `ip_addr` int unsigned NOT NULL, key(ip_addr) )""")
4d3ae43619ff517b75ded5dcf9acccee18c14242 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5568/4d3ae43619ff517b75ded5dcf9acccee18c14242/DNS.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 1319, 76, 16, 648, 4672, 1319, 76, 18, 8837, 12, 3536, 1684, 1014, 309, 486, 1704, 1375, 14926, 68, 261, 1375, 11482, 67, 350, 68, 509, 16, 1375, 529, 68, 27915, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 1319, 76, 16, 648, 4672, 1319, 76, 18, 8837, 12, 3536, 1684, 1014, 309, 486, 1704, 1375, 14926, 68, 261, 1375, 11482, 67, 350, 68, 509, 16, 1375, 529, 68, 27915, 1...
print oneLiner("pwd") + " " + oneLiner("ls sim*")
print listResults("pwd"), listResults("ls sim*")
def buildSimulator(self): """Checkout source code from cvs for the release """ os.chdir(os.path.join(self.atomPath, 'sim/src')) system('make') system('make pyx') if False: # verify they got built print oneLiner("pwd") + " " + oneLiner("ls sim*") raise Exception print "----------Sources have been checked out and made.\n"
1149f877e38afd883f96dbeacf9254dc26b30779 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/1149f877e38afd883f96dbeacf9254dc26b30779/autoBuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 7993, 11775, 12, 2890, 4672, 3536, 18581, 1084, 981, 628, 276, 6904, 364, 326, 3992, 3536, 1140, 18, 343, 1214, 12, 538, 18, 803, 18, 5701, 12, 2890, 18, 7466, 743, 16, 296, 9812...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 7993, 11775, 12, 2890, 4672, 3536, 18581, 1084, 981, 628, 276, 6904, 364, 326, 3992, 3536, 1140, 18, 343, 1214, 12, 538, 18, 803, 18, 5701, 12, 2890, 18, 7466, 743, 16, 296, 9812...
self.textview = gtk.TextView(buffer=None)
self.textview = gtk.TextView(buffer=buff)
def __init__(self) : self.window = gtk.Window(type=gtk.WINDOW_TOPLEVEL) self.window.set_default_size(150,150) #We open the note file or create it if it doesn't exist if os.path.exists(zefile) : f = open(zefile,mode='r') # sanitize the pretty XML stringed = f.read().replace('\n','').replace('\t','') try : doc = xml.dom.minidom.parseString(stringed) except : return 0 #the file didn't exist, create it now else : doc = xml.dom.minidom.Document() content = doc.createElement("task") doc.appendChild(content) #then we create the file f = open(zefile, mode='a+') f.write(doc.toxml().encode("utf-8")) f.close() self.textview = gtk.TextView(buffer=None) self.window.add(self.textview) self.window.connect("destroy", self.close) self.window.show_all()
052d5ff447f83c51d7500f97d551c07bd1ff59e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8234/052d5ff447f83c51d7500f97d551c07bd1ff59e9/textview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 13, 294, 365, 18, 5668, 273, 22718, 18, 3829, 12, 723, 33, 4521, 79, 18, 23407, 67, 10462, 10398, 13, 365, 18, 5668, 18, 542, 67, 1886, 67, 1467, 12, 23014...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13, 294, 365, 18, 5668, 273, 22718, 18, 3829, 12, 723, 33, 4521, 79, 18, 23407, 67, 10462, 10398, 13, 365, 18, 5668, 18, 542, 67, 1886, 67, 1467, 12, 23014...
if not hasattr(self, "MBDName"): self.MDBName, self.useMDB = spambayes.message.database_type() self.mdb = spambayes.message.open_storage(self.MDBName, self.useMDB) spambayes.message.Message.message_info_db = self.mdb
self.mdb = spambayes.message.Message().message_info_db
def createWorkers(self): """Using the options that were initialised in __init__ and then possibly overridden by the driver code, create the Bayes object, the Corpuses, the Trainers and so on.""" print "Loading database...", if self.isTest: self.useDB = "pickle" self.DBName = '_pop3proxy_test.pickle' # This is never saved. if not hasattr(self, "DBName"): self.DBName, self.useDB = storage.database_type([]) self.bayes = storage.open_storage(self.DBName, self.useDB) if not hasattr(self, "MBDName"): self.MDBName, self.useMDB = spambayes.message.database_type() self.mdb = spambayes.message.open_storage(self.MDBName, self.useMDB) spambayes.message.Message.message_info_db = self.mdb
a227e47596a85a1e5e9d4a61234f41d009596a69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/a227e47596a85a1e5e9d4a61234f41d009596a69/sb_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 15252, 12, 2890, 4672, 3536, 7736, 326, 702, 716, 4591, 30372, 316, 1001, 2738, 972, 471, 1508, 10016, 11000, 635, 326, 3419, 981, 16, 752, 326, 605, 528, 281, 733, 16, 326, 9557, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 15252, 12, 2890, 4672, 3536, 7736, 326, 702, 716, 4591, 30372, 316, 1001, 2738, 972, 471, 1508, 10016, 11000, 635, 326, 3419, 981, 16, 752, 326, 605, 528, 281, 733, 16, 326, 9557, ...
if len(nuninst[arch]) > len(nuninst_comp[arch]):
if arch not in self.options.break_arches and \ len(nuninst[arch]) > len(nuninst_comp[arch]):
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst()
b6b677620b2e8f8dff3d71fa4da17fcf1fb1d679 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b6b677620b2e8f8dff3d71fa4da17fcf1fb1d679/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 2, -100, -100, -100, -100, -100, -100, -100, ...
for j in range(0, n+1):
for j in range(0, n):
def interpolate2D(nodes,n=5): "n=nuber of points between 2 consecutive points. IMPORTANT: nodes have to be 2D: no z coordinates" if nodes.shape[1]==3: raise RuntimeError, "Nodes has to be (-1,2) array with x crescente" plist=array([]) curv=cubicSpline(nodes) #after the first 4 points: two points belong to the same curve for index in range(0, nodes.shape[0]-2, 1):#e' l indice del punto che uso anche per vedere a quale curva corrisponde for j in range(0, n+1): absci=nodes[index][0]+j*(nodes[index+1][0]-nodes[index][0])/n plist=append(plist, absci) plist=append(plist, createOrdinate(absci, curv[index])) for j in range(1, n+1): absci=nodes[-2][0]+j*(nodes[-1][0]-nodes[-2][0])/n plist=append(plist, absci) plist=append(plist, createOrdinate(absci, curv[-1])) return plist.reshape(-1, 2)
4adb407974be79681e1dfcbaea8cfa4913ba0082 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2499/4adb407974be79681e1dfcbaea8cfa4913ba0082/Cubic3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13156, 22, 40, 12, 4690, 16, 82, 33, 25, 4672, 315, 82, 33, 82, 373, 264, 434, 3143, 3086, 576, 18221, 3143, 18, 21840, 6856, 30, 2199, 1240, 358, 506, 576, 40, 30, 1158, 998, 5513, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13156, 22, 40, 12, 4690, 16, 82, 33, 25, 4672, 315, 82, 33, 82, 373, 264, 434, 3143, 3086, 576, 18221, 3143, 18, 21840, 6856, 30, 2199, 1240, 358, 506, 576, 40, 30, 1158, 998, 5513, ...
self.wlessLB = urwid.ListBox(wlessL)
if self.wlessLB == self.no_wlan: self.wlessLB = urwid.ListBox(wlessL) else: self.wlessLB.body = urwid.SimpleListWalker(wlessL)
def update_netlist(self,state=None, x=None, force_check=False,firstrun=False): if not firstrun: self.update_focusloc() """ Updates the overall network list.""" if not state: state, x = daemon.GetConnectionStatus() if force_check or self.prev_state != state: wiredL,wlessL = gen_network_list() #self.wiredCB = urwid.Filler(ComboBox(wiredL,self.frame,ui,3, # use_enter=False)) self.wiredCB.get_body().set_list(wiredL) self.wiredCB.get_body().build_combobox(self.frame,ui,3) if len(wlessL) != 0: self.wlessLB = urwid.ListBox(wlessL) #self.wlessLB.body = urwid.SimpleListWalker(wlessL) else: self.wlessLB = self.no_wlan #self.wlessLB.body = urwid.SimpleListWalker([self.no_wlan]) if daemon.GetAlwaysShowWiredInterface() or wired.CheckPluggedIn(): #if daemon.GetAlwaysShowWiredInterface(): self.thePile = urwid.Pile([('fixed',1,self.wiredH), ('fixed',1,self.wiredCB), ('fixed',1,self.wlessH), self.wlessLB] ) #self.focusloc = (self.thePile.get_focus(), # self.thePile.get_focus().get_focus()[1]) self.thePile.set_focus(self.focusloc[0]) if self.focusloc[0] == self.WIRED_IDX: self.thePile.get_focus().get_body().set_focus(self.focusloc[1]) else: self.thePile.get_focus().set_focus(self.focusloc[1]) else: self.thePile = urwid.Pile([('fixed',1,self.wlessH),self.wlessLB] ) self.frame.body = self.thePile if self.focusloc[0] == self.wlessLB: self.wlessLB.set_focus(self.focusloc[1]) #self.always_show_wired = not self.always_show_wired self.prev_state = state
b78b4c8d3bc27b35a33b53c3d42bb4f77863a8eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/353/b78b4c8d3bc27b35a33b53c3d42bb4f77863a8eb/wicd-curses.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2758, 1098, 12, 2890, 16, 2019, 33, 7036, 16, 619, 33, 7036, 16, 2944, 67, 1893, 33, 8381, 16, 74, 481, 701, 318, 33, 8381, 4672, 309, 486, 284, 481, 701, 318, 30, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2758, 1098, 12, 2890, 16, 2019, 33, 7036, 16, 619, 33, 7036, 16, 2944, 67, 1893, 33, 8381, 16, 74, 481, 701, 318, 33, 8381, 4672, 309, 486, 284, 481, 701, 318, 30, 365, 1...
print app.context
def setAppList(self, appList):
86191b3ec287a24668da8241e42ac7a47034e4fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8121/86191b3ec287a24668da8241e42ac7a47034e4fd/icubapp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3371, 682, 12, 2890, 16, 595, 682, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3371, 682, 12, 2890, 16, 595, 682, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.n = ZZ(max(S)+1).exact_log(2)
self.n = ZZ(max(S)).nbits()
def __init__(self, *args, **kwargs): """ Construct a substitution box (S-box) for a given lookup table `S`.
545f21e5a9f36a186853ab139bb1daf40b02474e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/545f21e5a9f36a186853ab139bb1daf40b02474e/sbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 225, 2826, 4333, 4672, 3536, 14291, 279, 12785, 3919, 261, 55, 17, 2147, 13, 364, 279, 864, 3689, 1014, 1375, 55, 8338, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 380, 1968, 16, 225, 2826, 4333, 4672, 3536, 14291, 279, 12785, 3919, 261, 55, 17, 2147, 13, 364, 279, 864, 3689, 1014, 1375, 55, 8338, 2, -100, -100, -10...
client = SystemAdministratorClient( self.host )
client = SystemAdministratorClient( self.host, self.port )
def do_show( self, args ): """ Show list of components usage: show software show installed show setup show status show database show mysql show log <system> <service|agent> show info - show version of software and setup """
cdbcf33eaa5a010e422d7ded5d4dd06765fc84c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/cdbcf33eaa5a010e422d7ded5d4dd06765fc84c6/SystemAdministratorClientCLI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4500, 12, 365, 16, 833, 262, 30, 3536, 9674, 666, 434, 4085, 225, 4084, 30, 225, 2405, 17888, 2405, 5876, 2405, 3875, 2405, 1267, 2405, 2063, 2405, 7219, 2405, 613, 411, 4299, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 67, 4500, 12, 365, 16, 833, 262, 30, 3536, 9674, 666, 434, 4085, 225, 4084, 30, 225, 2405, 17888, 2405, 5876, 2405, 3875, 2405, 1267, 2405, 2063, 2405, 7219, 2405, 613, 411, 4299, ...
secure = notebook.secure
def render(self, request): if request.args.has_key('email'): if request.args['email'][0] is not None : global notebook, waiting user = request.args['username'][0] passwd = request.args['password'][0] destaddr = """%s""" % request.args['email'][0] from sage.server.notebook.smtpsend import send_mail from sage.server.notebook.register import make_key, build_msg # TODO: make this come from the server settings key = make_key() listenaddr = notebook.address port = notebook.port secure = notebook.secure fromaddr = 'no-reply@%s' % listenaddr body = build_msg(key, user, listenaddr, port, secure) send_mail(self, fromaddr, destaddr, "SAGE Notebook Registration",body) waiting[key] = user # now say that the user has been registered. s = """\
bf877d82ae982ff63d9297f2842f893acc85c2d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/bf877d82ae982ff63d9297f2842f893acc85c2d0/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 590, 4672, 309, 590, 18, 1968, 18, 5332, 67, 856, 2668, 3652, 11, 4672, 309, 590, 18, 1968, 3292, 3652, 3546, 63, 20, 65, 353, 486, 599, 294, 2552, 14718, 16, 733...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 590, 4672, 309, 590, 18, 1968, 18, 5332, 67, 856, 2668, 3652, 11, 4672, 309, 590, 18, 1968, 3292, 3652, 3546, 63, 20, 65, 353, 486, 599, 294, 2552, 14718, 16, 733...
misc_ = { }
def initialize(context): """ """ #register classes for x in content.values(): m, p, a = x['module'], x['permission'], x['addform'] c = """context.registerClass( %s.%s, permission='%s', constructors=(%s.manage_add%s_html, %s.add%s, %s.%s), icon='%s/www/%s.gif', visibility=None )""" % (m, m, p, m, m, m, m, m, a, m, m) exec(c)
fd7a6f4c96595b7c5cf8b828d4abaf0c1031ce9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3287/fd7a6f4c96595b7c5cf8b828d4abaf0c1031ce9a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2472, 4672, 3536, 3536, 225, 468, 4861, 3318, 364, 619, 316, 913, 18, 2372, 13332, 312, 16, 293, 16, 279, 273, 619, 3292, 2978, 17337, 619, 3292, 9827, 17337, 619, 3292, 1289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2472, 4672, 3536, 3536, 225, 468, 4861, 3318, 364, 619, 316, 913, 18, 2372, 13332, 312, 16, 293, 16, 279, 273, 619, 3292, 2978, 17337, 619, 3292, 9827, 17337, 619, 3292, 1289, ...
names = map(os.path.normcase, names)
def addsitedir(sitedir): sitedir = makepath(sitedir) if sitedir not in sys.path: sys.path.append(sitedir) # Add path component try: names = os.listdir(sitedir) except os.error: return names = map(os.path.normcase, names) names.sort() for name in names: if name[-4:] == endsep + "pth": addpackage(sitedir, name)
8611ea685d3b98759c521191bcdd35fa431bb9ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8611ea685d3b98759c521191bcdd35fa431bb9ca/site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4831, 16261, 481, 12, 87, 16261, 481, 4672, 10982, 23210, 273, 1221, 803, 12, 87, 16261, 481, 13, 309, 10982, 23210, 486, 316, 2589, 18, 803, 30, 2589, 18, 803, 18, 6923, 12, 87, 16261...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4831, 16261, 481, 12, 87, 16261, 481, 4672, 10982, 23210, 273, 1221, 803, 12, 87, 16261, 481, 13, 309, 10982, 23210, 486, 316, 2589, 18, 803, 30, 2589, 18, 803, 18, 6923, 12, 87, 16261...
console.warn("Warning: Unfullfilled
console.warn("! Warning: No resource matched
def checkPatts(res, hints): for hint in hints: if hint.regex.search(res.id): hint.seen = True # mark asset hint as fullfilled by a resource return True return False
65389118cddfdf1375adf895ae99fe193211e71b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/65389118cddfdf1375adf895ae99fe193211e71b/ResourceHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 22834, 3428, 12, 455, 16, 13442, 4672, 364, 7380, 316, 13442, 30, 309, 7380, 18, 7584, 18, 3072, 12, 455, 18, 350, 4672, 7380, 18, 15156, 273, 1053, 225, 468, 2267, 3310, 7380, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 866, 22834, 3428, 12, 455, 16, 13442, 4672, 364, 7380, 316, 13442, 30, 309, 7380, 18, 7584, 18, 3072, 12, 455, 18, 350, 4672, 7380, 18, 15156, 273, 1053, 225, 468, 2267, 3310, 7380, 48...
tableName = self.__getTableName( "bucket", typeName )
tableName = _getTableName( "bucket", typeName )
def __deleteForCompactBuckets( self, typeName, timeLimit, bucketLength, connObj = False ): """ Delete compacted buckets """ tableName = self.__getTableName( "bucket", typeName ) deleteSQL = "DELETE FROM `%s` WHERE " % tableName deleteSQL += "`%s`.`startTime` < '%s' AND " % ( tableName, timeLimit ) deleteSQL += "`%s`.`bucketLength` = %s" % ( tableName, bucketLength ) return self._update( deleteSQL, conn = connObj )
5644734dd5f9b2176cf1b7afc4f6ab55941c88f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/5644734dd5f9b2176cf1b7afc4f6ab55941c88f0/AccountingDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3733, 1290, 16863, 14517, 12, 365, 16, 8173, 16, 813, 3039, 16, 2783, 1782, 16, 1487, 2675, 273, 1083, 262, 30, 3536, 2504, 6739, 329, 9169, 3536, 4775, 273, 389, 588, 7147, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3733, 1290, 16863, 14517, 12, 365, 16, 8173, 16, 813, 3039, 16, 2783, 1782, 16, 1487, 2675, 273, 1083, 262, 30, 3536, 2504, 6739, 329, 9169, 3536, 4775, 273, 389, 588, 7147, 12, ...
if o.object_type == 'arrow' or o.object_type == 'polygon':
if o.object_type in ('arrow','polygon','polyline'):
def select( self, items): "adds an object to the list of other selected objects and calls their select() method" for o in items: if o.object_type == 'arrow' or o.object_type == 'polygon': # we cannot allow arrows or polygons to be selected because selection of arrow and its points # doubles some actions (moving etc.) and this couldn't be easily solved other way self.select( o.points) elif o.object_type == 'selection_rect' or o.object_type == 'selection_square': return elif o not in self.selected: self.selected.append( o) o.select() self.event_generate( "<<selection-changed>>") #print [o.object_type for o in self.selected]
8395cc6be64b735cc10e2c9d0ddcc9d0a8c9cfc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4298/8395cc6be64b735cc10e2c9d0ddcc9d0a8c9cfc9/paper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 12, 365, 16, 1516, 4672, 315, 25428, 392, 733, 358, 326, 666, 434, 1308, 3170, 2184, 471, 4097, 3675, 2027, 1435, 707, 6, 364, 320, 316, 1516, 30, 309, 320, 18, 1612, 67, 723, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 12, 365, 16, 1516, 4672, 315, 25428, 392, 733, 358, 326, 666, 434, 1308, 3170, 2184, 471, 4097, 3675, 2027, 1435, 707, 6, 364, 320, 316, 1516, 30, 309, 320, 18, 1612, 67, 723, ...
' %s'
'%s'
def parse_catch_error(self, exc): """Deal with selection error exc""" if isinstance(exc, FilePrefixError): log.Log.FatalError(
5f513f8b05907161527f02085791cb0bed0f6f78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/783/5f513f8b05907161527f02085791cb0bed0f6f78/selection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 14683, 67, 1636, 12, 2890, 16, 3533, 4672, 3536, 758, 287, 598, 4421, 555, 3533, 8395, 309, 1549, 12, 10075, 16, 1387, 2244, 668, 4672, 613, 18, 1343, 18, 19593, 668, 12, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14683, 67, 1636, 12, 2890, 16, 3533, 4672, 3536, 758, 287, 598, 4421, 555, 3533, 8395, 309, 1549, 12, 10075, 16, 1387, 2244, 668, 4672, 613, 18, 1343, 18, 19593, 668, 12, 2, ...
if out_args.has_key('from'): out_args['from'] = normalize_date(out_args['from'], "T00:00:00Z") if out_args.has_key('until'): out_args['until'] = normalize_date(out_args['until'], "T23:59:59Z")
def parse_args(args=""): "Parse input args" out_args = { "verb" : "", "metadataPrefix" : "", "from" : "", "until" : "", "set" : "", "identifier" : "", "resumptionToken" : "" } if args == "" or args is None: pass else: list_of_arguments = args.split('&') for item in list_of_arguments: keyvalue = item.split('=') if len(keyvalue) == 2: if (out_args.has_key(keyvalue[0])): if(out_args[keyvalue[0]] != ""): out_args[keyvalue[0]] = "Error" else: out_args[keyvalue[0]] = urllib.unquote(keyvalue[1]) else: out_args[keyvalue[0]] = urllib.unquote(keyvalue[1]) else: out_args['verb'] = "" if out_args.has_key('from'): out_args['from'] = normalize_date(out_args['from'], "T00:00:00Z") if out_args.has_key('until'): out_args['until'] = normalize_date(out_args['until'], "T23:59:59Z") return out_args
4801840da61b61e80e83beb772c85d3df51aafbd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/4801840da61b61e80e83beb772c85d3df51aafbd/oai_repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1968, 12, 1968, 1546, 6, 4672, 315, 3201, 810, 833, 6, 225, 596, 67, 1968, 273, 288, 315, 16629, 6, 2398, 294, 23453, 315, 4165, 2244, 6, 282, 294, 23453, 315, 2080, 6, 239...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1968, 12, 1968, 1546, 6, 4672, 315, 3201, 810, 833, 6, 225, 596, 67, 1968, 273, 288, 315, 16629, 6, 2398, 294, 23453, 315, 4165, 2244, 6, 282, 294, 23453, 315, 2080, 6, 239...
file.Write(" data_size = strlen(_%s);\n" % last_arg.name) file.Write(" memcpy(ImmediateDataAddress(this), _%s, data_size);\n" % last_arg.name)
file.Write(" data_size = ComputeDataSize(_name);\n") file.Write(" memcpy(ImmediateDataAddress(this), _name, data_size);\n")
def WriteImmediateCmdInit(self, func, file): """Overrriden from TypeHandler.""" last_arg = func.GetLastOriginalArg() file.Write(" void Init(%s) {\n" % func.MakeTypedOriginalArgString("_")) file.Write(" SetHeader(_%s);\n" % last_arg.name) args = func.GetCmdArgs()[:-1] for arg in args: file.Write(" %s = _%s;\n" % (arg.name, arg.name)) file.Write(" data_size = strlen(_%s);\n" % last_arg.name) file.Write(" memcpy(ImmediateDataAddress(this), _%s, data_size);\n" % last_arg.name) file.Write(" }\n") file.Write("\n")
3975916c448229deb7fa73586d80d6aebe8671fa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/3975916c448229deb7fa73586d80d6aebe8671fa/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 5931, 2570, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 1142, 67, 3175, 273, 1326, 18, 967, 3024, 8176, 4117, 1435, 585, 18, 3067, 293...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 5931, 2570, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 1142, 67, 3175, 273, 1326, 18, 967, 3024, 8176, 4117, 1435, 585, 18, 3067, 293...
self.senderNexus.push(self.sfile, 'TEST->TEST', raddresses)
self.senderNexus.push(self.sfile, 'TESTtoTEST', raddresses)
def testOneSenderManyRecipients(self): raddresses = [Q2QAddress("receiving-data.org", "receiver%d" % (x,)) for x in range(10)]
ea6892b78aac180a2823b6a3d607b885f25ebf1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8962/ea6892b78aac180a2823b6a3d607b885f25ebf1a/test_sigma.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3335, 12021, 5594, 22740, 12, 2890, 4672, 767, 449, 15807, 273, 306, 53, 22, 53, 1887, 2932, 8606, 9288, 17, 892, 18, 3341, 3113, 315, 24454, 9, 72, 6, 738, 261, 92, 16, 3719, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3335, 12021, 5594, 22740, 12, 2890, 4672, 767, 449, 15807, 273, 306, 53, 22, 53, 1887, 2932, 8606, 9288, 17, 892, 18, 3341, 3113, 315, 24454, 9, 72, 6, 738, 261, 92, 16, 3719, ...
self.cache.invalidateEntry( self.repos, n, self.toVersion(v), self.toFlavor(f))
invList.append((n,v,f)) self.log(3, "updated signatures for", len(inserts+updates), "troves") self.db.commit() if len(invList): self.cache.invalidateEntries(self.repos, invList) self.log(3, "invalidated cache for", len(invList), "troves")
def setTroveSigs(self, authToken, clientVersion, infoList): # return the number of signatures which have changed
8b4d0d623d8076f14a0f9aab882711e9c76076e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/8b4d0d623d8076f14a0f9aab882711e9c76076e6/netserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 56, 303, 537, 8267, 87, 12, 2890, 16, 24050, 16, 1004, 1444, 16, 1123, 682, 4672, 468, 327, 326, 1300, 434, 14862, 1492, 1240, 3550, 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, 444, 56, 303, 537, 8267, 87, 12, 2890, 16, 24050, 16, 1004, 1444, 16, 1123, 682, 4672, 468, 327, 326, 1300, 434, 14862, 1492, 1240, 3550, 2, -100, -100, -100, -100, -100, -100, -100, -...
cells = '\n'.join(cells) rows[i] = re.compile(r'(<tr\b[^>]*>).+?(</tr>)', re.S|re.I).sub(r'\1%s\2' % cells, row)
m = re.compile(r'(<tr\b[^>]*>)\s*.+?\s*(</tr>)', re.S|re.I).search(row) rows[i] = '%s%s%s' % (m.group(1), '\n'.join(cells), m.group(2))
def normalizeWidths(m): orig = m.group(0) begin, rows, end = m.group(1), m.group(2), m.group(3) widths = [] rows = re.compile(r'(<tr\b[^>]*>.+?</tr>)', re.I|re.S).findall(rows)
df63999ac61279e584eba9227df6698ea7ee18a1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7864/df63999ac61279e584eba9227df6698ea7ee18a1/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 22407, 12, 81, 4672, 1647, 273, 312, 18, 1655, 12, 20, 13, 2376, 16, 2595, 16, 679, 273, 312, 18, 1655, 12, 21, 3631, 312, 18, 1655, 12, 22, 3631, 312, 18, 1655, 12, 23, 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, 3883, 22407, 12, 81, 4672, 1647, 273, 312, 18, 1655, 12, 20, 13, 2376, 16, 2595, 16, 679, 273, 312, 18, 1655, 12, 21, 3631, 312, 18, 1655, 12, 22, 3631, 312, 18, 1655, 12, 23, 13, ...
textInfo.obj._lastInitialSpokenFormats=set() initialSpokenFormats=set()
textInfo.obj._lastInitialSpokenFormats={} initialSpokenFormats={}
def speakFormattedText(textInfo,handleSymbols=False,wait=False,index=None): global beenCanceled if speechMode==speechMode_off: return elif speechMode==speechMode_beeps: tones.beep(config.conf["speech"]["beepSpeechModePitch"],speechMode_beeps_ms) return beenCanceled=False formattedText=textInfo.getFormattedText(excludes=getExcludedAutoSpeakFormats()) if not hasattr(textInfo.obj,"_lastInitialSpokenFormats"): textInfo.obj._lastInitialSpokenFormats=set() initialSpokenFormats=set() checkFormats=True for item in formattedText: if isinstance(item,textHandler.FormatCommand): itemKey=(item.format.role,item.format.value,item.format.uniqueID) if item.cmd==textHandler.FORMAT_CMD_SINGLETON: if not checkFormats or itemKey not in textInfo.obj._lastInitialSpokenFormats: speechText=" ".join([controlTypes.speechRoleLabels.get(item.format.role,""),item.format.value]) speakMessage(speechText) if checkFormats: initialSpokenFormats.add(itemKey) elif item.cmd==textHandler.FORMAT_CMD_ON: if not checkFormats or itemKey not in textInfo.obj._lastInitialSpokenFormats: speechText=" ".join([controlTypes.speechRoleLabels.get(item.format.role,""),item.format.value,_("on")]) speakMessage(speechText) if checkFormats: initialSpokenFormats.add(itemKey) elif item.cmd==textHandler.FORMAT_CMD_OFF: speechText=" ".join([controlTypes.speechRoleLabels.get(item.format.role,""),_("off")]) speakMessage(speechText) elif isinstance(item,basestring): checkFormats=False if len(item)>1 or not handleSymbols: speakText(item,wait=wait,index=index) else: speech.speakSymbol(item) textInfo.obj._lastInitialSpokenFormats=initialSpokenFormats
541c6edcfb9c82cec02ec3b9815f52cfeb5bbf11 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/541c6edcfb9c82cec02ec3b9815f52cfeb5bbf11/speech.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 10244, 18298, 1528, 12, 955, 966, 16, 4110, 14821, 33, 8381, 16, 7048, 33, 8381, 16, 1615, 33, 7036, 4672, 2552, 2118, 23163, 309, 24556, 2309, 631, 87, 12510, 2309, 67, 3674, 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, 272, 10244, 18298, 1528, 12, 955, 966, 16, 4110, 14821, 33, 8381, 16, 7048, 33, 8381, 16, 1615, 33, 7036, 4672, 2552, 2118, 23163, 309, 24556, 2309, 631, 87, 12510, 2309, 67, 3674, 30, ...
def SearchFontPath(font_file):
__foundFonts = [] def FindCustomFonts(): """Fill the __foundFonts list with those filenames, whose fonts can be found in the reportlab ttf font path. This process needs only be done once per loading of this module, it is cached. But, if the system admin adds some font in the meanwhile, the server must be restarted eventually. """ dirpath = [] global __foundFonts
def SearchFontPath(font_file): for dirname in rl_config.TTFSearchPath: for root, dirs, files in os.walk(os.path.abspath(dirname)): for file_name in files: filename = os.path.join(root, file_name) extension = os.path.splitext(filename)[1] if extension.lower() in ['.ttf']: if file_name==font_file: return True return False
2838d42af538e743df2a856aee46087f15ff87e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/2838d42af538e743df2a856aee46087f15ff87e0/customfonts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1001, 7015, 5711, 87, 273, 5378, 225, 1652, 4163, 3802, 5711, 87, 13332, 3536, 8026, 326, 1001, 7015, 5711, 87, 666, 598, 5348, 9066, 16, 8272, 16450, 848, 506, 1392, 316, 326, 2605, 7411, 268...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1001, 7015, 5711, 87, 273, 5378, 225, 1652, 4163, 3802, 5711, 87, 13332, 3536, 8026, 326, 1001, 7015, 5711, 87, 666, 598, 5348, 9066, 16, 8272, 16450, 848, 506, 1392, 316, 326, 2605, 7411, 268...