rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
status, deps, outputs = self._do_strace(ecmd, outfile, outname)
status, deps, outputs = self._do_strace(args, outfile, outname)
def strace_runner(self, command): """ Run command and return its dependencies and outputs, using strace to determine dependencies (by looking at what files are opened or modified). """ ecmd = command ecmd = ecmd.replace('\\', '\\\\') ecmd = ecmd.replace('"', '\\"') exename = command.split()[0]
de8ed355fef3c5fd7a14c435783f5e59145a2f2b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7381/de8ed355fef3c5fd7a14c435783f5e59145a2f2b/fabricate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 623, 67, 18156, 12, 2890, 16, 1296, 4672, 3536, 1939, 1296, 471, 327, 2097, 5030, 471, 6729, 16, 1450, 609, 623, 358, 4199, 5030, 261, 1637, 7849, 622, 4121, 1390, 854, 10191, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 623, 67, 18156, 12, 2890, 16, 1296, 4672, 3536, 1939, 1296, 471, 327, 2097, 5030, 471, 6729, 16, 1450, 609, 623, 358, 4199, 5030, 261, 1637, 7849, 622, 4121, 1390, 854, 10191, 578, ...
if decoder:
if decoder and address not in self.endpointDecoders:
def _cacheEndpointDecoders(self): """Update the endpointDecoders dictionary using the current configuration and interface settings. """ self.endpointDecoders = {0: self.controlDecoder}
47bd7b20cb2bc5dda7d9ef1dd1411e34340722b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10464/47bd7b20cb2bc5dda7d9ef1dd1411e34340722b8/Decode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2493, 3293, 1799, 369, 414, 12, 2890, 4672, 3536, 1891, 326, 2494, 1799, 369, 414, 3880, 1450, 326, 783, 1664, 471, 1560, 1947, 18, 3536, 365, 18, 8003, 1799, 369, 414, 273, 288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2493, 3293, 1799, 369, 414, 12, 2890, 4672, 3536, 1891, 326, 2494, 1799, 369, 414, 3880, 1450, 326, 783, 1664, 471, 1560, 1947, 18, 3536, 365, 18, 8003, 1799, 369, 414, 273, 288, ...
cloudinit.log.error(traceback.format_exc())
cloudinit.log.debug(traceback.format_exc())
def handle(self, name, args, freq=None): try: mod = __import__("cc_" + name.replace("-","_"),globals()) def_freq = getattr(mod, "frequency",per_instance) handler = getattr(mod, "handle")
4f821b029d118e20759ca3404dbf8d8f113802aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4319/4f821b029d118e20759ca3404dbf8d8f113802aa/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 508, 16, 833, 16, 7684, 33, 7036, 4672, 775, 30, 681, 273, 1001, 5666, 972, 2932, 952, 9548, 397, 508, 18, 2079, 2932, 17, 15937, 9548, 3631, 16227, 10756, 1652, 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, 1640, 12, 2890, 16, 508, 16, 833, 16, 7684, 33, 7036, 4672, 775, 30, 681, 273, 1001, 5666, 972, 2932, 952, 9548, 397, 508, 18, 2079, 2932, 17, 15937, 9548, 3631, 16227, 10756, 1652, 67...
os.chdir(old_dir)
chdir(old_dir)
def main(cfg_file=cfg_file): old_dir = os.getcwd() os.chdir(join(os.getcwd(), dirname(sys.argv[0]), dirname(cfg_file))) cfg_file = join(os.getcwd(), basename(cfg_file)) loadConfiguration(cfg_file) config['storage']['path'] = abspath('../data/storage/dbtest.sqlite') adjustSchema() #create the schema must be before adding the connection Storage().addConnection([0, 'localhost', 'localhost', 6666]) sys.path.append(config['servers']['path']) sys.path.append(config['resources']['path']) os.chdir(old_dir) # this import must stay here, after the appending of resources path to path from devclient.gui import Gui port = random.randint(2000, 10000) p = startProcess(['python', join(config['devclient']['path'], 'core.py'), '--config=%s' % cfg_file, '--port=%d' % port]) # FIX! To prevent connectionRefused from SocketToGui import time time.sleep(.5) try: gui = Gui(port) gui.p = subprocess.Popen(['python', '-u', 'server_test.py'], stdout=subprocess.PIPE) try: buf = gui.p.stdout.read(6) # read READY\n from stdout except IOError: time.sleep(.5) Gui.startAction = startAction QTimer.singleShot(2000, gui.startAction) gui.mainLoop() except exception.IPCError: terminateProcess(p.pid) except Exception, e: print 'Fatal Exception:', e terminateProcess(p.pid)
25d720f7b7886a1daaf6a5d6707155b4f6994841 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8560/25d720f7b7886a1daaf6a5d6707155b4f6994841/black_box.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 7066, 67, 768, 33, 7066, 67, 768, 4672, 225, 1592, 67, 1214, 273, 1140, 18, 588, 11089, 1435, 1140, 18, 343, 1214, 12, 5701, 12, 538, 18, 588, 11089, 9334, 4283, 12, 9499, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 7066, 67, 768, 33, 7066, 67, 768, 4672, 225, 1592, 67, 1214, 273, 1140, 18, 588, 11089, 1435, 1140, 18, 343, 1214, 12, 5701, 12, 538, 18, 588, 11089, 9334, 4283, 12, 9499, ...
return LIGOTimeGPS(self.seconds * other, self.nanoseconds * other)
return LIGOTimeGPS(self.__seconds * other, self.__nanoseconds * other)
def __mul__(self, other): """ Multiply a LIGOTimeGPS by a number.
64e3217d9e86a7f50114bba7adfdee1638e21ac0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/64e3217d9e86a7f50114bba7adfdee1638e21ac0/lal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 16411, 972, 12, 2890, 16, 1308, 4672, 3536, 5991, 1283, 279, 511, 3047, 51, 950, 28983, 635, 279, 1300, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 16411, 972, 12, 2890, 16, 1308, 4672, 3536, 5991, 1283, 279, 511, 3047, 51, 950, 28983, 635, 279, 1300, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
for result_time in dirty_siblings: result_time.increment_all_counts() num_completed += 1 result_parent.invalidate_ua_memcache()
if (result_parent.category not in settings.CATEGORIES and settings.BUILD == 'production'): for result_time in dirty_siblings: result_time.dirty = False db.put(dirty_siblings) else: for result_time in dirty_siblings: result_time.increment_all_counts() num_completed += 1 result_parent.invalidate_ua_memcache()
def UpdateDirty(request): """Updates any dirty tests, adding its score to the appropriate ranker.""" if UpdateDirtyController.IsPaused(): return http.HttpResponse('UpdateDirty is paused.') if not UpdateDirtyController.AcquireLock(): return http.HttpResponse('UpdateDirty: unable to acquire lock.') try: num_completed = 0 try: dirty_siblings = _GetDirtySiblings(request.GET.get('result_parent_key')) if dirty_siblings: result_parent = dirty_siblings[0].parent() for result_time in dirty_siblings: # Count the times and mark them !dirty. result_time.increment_all_counts() num_completed += 1 result_parent.invalidate_ua_memcache() except runtime.DeadlineExceededError: logging.warn('UpdateDirty DeadlineExceededError; ' 'number of increment_all_counts completed=%s', num_completed) next_result_parent_key = _GetNextDirty() if next_result_parent_key: ScheduleDirtyUpdate(next_result_parent_key) return http.HttpResponse('UpdateDirty: added task to update more.') else: return http.HttpResponse(UPDATE_DIRTY_DONE) except: return http.HttpResponse('UpdateDirty: bailed: %s' % traceback.format_exc()) finally: UpdateDirtyController.ReleaseLock()
a4f8545e25fabeacf62b86001de53b927d42dd53 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5745/a4f8545e25fabeacf62b86001de53b927d42dd53/manage_dirty.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 10785, 12, 2293, 4672, 3536, 5121, 1281, 9603, 7434, 16, 6534, 2097, 4462, 358, 326, 5505, 6171, 264, 12123, 309, 2315, 10785, 2933, 18, 2520, 28590, 13332, 327, 1062, 18, 19520, 266...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 10785, 12, 2293, 4672, 3536, 5121, 1281, 9603, 7434, 16, 6534, 2097, 4462, 358, 326, 5505, 6171, 264, 12123, 309, 2315, 10785, 2933, 18, 2520, 28590, 13332, 327, 1062, 18, 19520, 266...
sage: G>K
In the next example, both ``H`` and ``H2`` are trivial groups, but the ambient group of ``H2`` is strictly contained in the ambient group of ``H``, and thus we obtain:: sage: H2=G2.subgroup([G2(())]) sage: H2<H True Of course, ``G`` as a permutation group and ``G`` considered as sub-group of itself are different objects. But they compare equal, both when considered as permutation groups or permutation subgroups:: sage: G3 = G.subgroup([G((1,2,3,4,5,6)),G((1,2))]) sage: G Symmetric group of order 6! as a permutation group sage: G3 Subgroup of SymmetricGroup(6) generated by [(1,2), (1,2,3,4,5,6)] sage: G is G3
def __cmp__(self, other): r""" Compare ``self`` and ``other``. If ``self`` and ``other`` are in a common ambient group, then self = other precisely if ``self`` is contained in ``other``.
ee88ef1a2034803c0010f957a78af54ee464b93b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/ee88ef1a2034803c0010f957a78af54ee464b93b/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 436, 8395, 11051, 12176, 2890, 10335, 471, 12176, 3011, 68, 8338, 971, 12176, 2890, 10335, 471, 12176, 3011, 10335, 854, 316, 279, 2975, 13232, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 436, 8395, 11051, 12176, 2890, 10335, 471, 12176, 3011, 68, 8338, 971, 12176, 2890, 10335, 471, 12176, 3011, 10335, 854, 316, 279, 2975, 13232, 1...
elif arg.startswith('-page:'): if len(arg) == 6:
elif arg.startswith('-page'): if len(arg) == 5:
def report(newtext, image, notification, head, notification2 = None, unver = True, commx = None): global botolist while 1: run = main(site = wikipedia.getSite()) secondrun = run.general(newtext, image, notification, head, botolist) if unver == True: try: resPutMex = run.put_mex() except wikipedia.NoPage: wikipedia.output(u"The page has been deleted! Skip!") break except wikipedia.EditConflict: wikipedia.output(u"Edit conflict! Skip!") break else: if resPutMex == False: break else: try: resPutMex = run.put_mex(False) except wikipedia.NoPage: wikipedia.output(u"The page has been deleted!") break except wikipedia.EditConflict: wikipedia.output(u"Edit conflict! Skip!") break else: if resPutMex == False: break try: run.put_talk(notification, head, notification2, commx) except wikipedia.EditConflict: wikipedia.output(u"Edit Conflict! Retrying...") try: run.put_talk(notification, head, notification2, commx) except: wikipedia.output(u"Another error... skipping the user..") break break
23430a1853a736b93721471c6a328b8d8b02fad0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/23430a1853a736b93721471c6a328b8d8b02fad0/checkimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2704, 955, 16, 1316, 16, 3851, 16, 910, 16, 3851, 22, 273, 599, 16, 640, 502, 273, 1053, 16, 1543, 92, 273, 599, 4672, 2552, 2512, 355, 376, 1323, 404, 30, 1086, 273, 2774,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2704, 955, 16, 1316, 16, 3851, 16, 910, 16, 3851, 22, 273, 599, 16, 640, 502, 273, 1053, 16, 1543, 92, 273, 599, 4672, 2552, 2512, 355, 376, 1323, 404, 30, 1086, 273, 2774,...
print 'Created new GUSI option' ngusi_opr = Resource(gusi_opr.data)
ngusi_opr = Resource(newdata)
def edit_preferences(): preff_handle = openpreffile(WRITE) l, sr = getprefpath(PATH_STRINGS_ID) if l == None: message('Cannot find any sys.path resource! (Old python?)') sys.exit(0) fss, dr, fss_changed = getprefdir(DIRECTORY_ID) if fss == None: fss = macfs.FSSpec(os.getcwd()) fss_changed = 1 options, opr = getoptions(OPTIONS_ID) saved_options = options[:] creator, type, delaycons, gusi_opr = getgusioptions(GUSI_ID) saved_gusi_options = creator, type, delaycons # Let the user play away result = interact(l, fss, (options, creator, type, delaycons), 'System-wide preferences') # See what we have to update, and how if result == None: sys.exit(0) pathlist, nfss, (options, creator, type, delaycons) = result if nfss != fss: fss_changed = 1 if fss_changed: alias = nfss.NewAlias() if dr: dr.data = alias.data dr.ChangedResource() else: dr = Resource(alias.data) dr.AddResource('alis', DIRECTORY_ID, '') if pathlist != l: if pathlist == []: if sr.HomeResFile() == preff_handle: sr.RemoveResource() elif sr.HomeResFile() == preff_handle: sr.data = listtores(pathlist) sr.ChangedResource() else: sr = Resource(listtores(pathlist)) sr.AddResource('STR#', PATH_STRINGS_ID, '') if options != saved_options: newdata = reduce(lambda x, y: x+chr(y), options, '') if opr and opr.HomeResFile() == preff_handle: opr.data = newdata opr.ChangedResource() else: opr = Resource(newdata) opr.AddResource('Popt', OPTIONS_ID, '') if (creator, type, delaycons) != saved_gusi_options: newdata = setgusioptions(gusi_opr, creator, type, delaycons) if gusi_opr.HomeResFile() == preff_handle: gusi_opr.data = newdata gusi_opr.ChangedResource() else: print 'Created new GUSI option' ngusi_opr = Resource(gusi_opr.data) ngusi_opr.AddResource('GU\267I', GUSI_ID, '') CloseResFile(preff_handle)
d0bc8ad303c0b8de0a66db83c0e9a3b91f2d3ad4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d0bc8ad303c0b8de0a66db83c0e9a3b91f2d3ad4/EditPythonPrefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 23219, 13332, 675, 1403, 67, 4110, 273, 1696, 25724, 768, 12, 11677, 13, 225, 328, 16, 9133, 273, 336, 25724, 803, 12, 4211, 67, 5804, 55, 67, 734, 13, 309, 328, 422, 599, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 23219, 13332, 675, 1403, 67, 4110, 273, 1696, 25724, 768, 12, 11677, 13, 225, 328, 16, 9133, 273, 336, 25724, 803, 12, 4211, 67, 5804, 55, 67, 734, 13, 309, 328, 422, 599, ...
f_cmd = 'mkfs.msdos -s 1 %s' % self.floppy_img
f_cmd = 'mkfs.msdos -s 1 %s' % self.floppy
def create_boot_floppy(self): """ Prepares a boot floppy by creating a floppy image file, mounting it and copying an answer file (kickstarts for RH based distros, answer files for windows) to it. After that the image is umounted. """ print "Creating boot floppy"
d245408f9a2fd5877bf4770afc7b97ad08147815 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10349/d245408f9a2fd5877bf4770afc7b97ad08147815/unattended.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 7137, 67, 74, 16884, 2074, 12, 2890, 4672, 3536, 2962, 84, 4807, 279, 4835, 284, 16884, 2074, 635, 4979, 279, 284, 16884, 2074, 1316, 585, 16, 5344, 310, 518, 471, 8933, 392, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 7137, 67, 74, 16884, 2074, 12, 2890, 4672, 3536, 2962, 84, 4807, 279, 4835, 284, 16884, 2074, 635, 4979, 279, 284, 16884, 2074, 1316, 585, 16, 5344, 310, 518, 471, 8933, 392, ...
print "Unable to find signal type for signal %s. Check the definition of the widget." % (outS.name) return None
continue
def getPossibleConnections(self, outputs, inputs, outConnected, inConnected): possibleLinks = [] canConnect = 0 sameType = 0 for outS in outputs: outType = self.outWidget.instance.getOutputType(outS.name) if outType == None: print "Unable to find signal type for signal %s. Check the definition of the widget." % (outS.name) return None # report error for inS in inputs: inType = self.inWidget.instance.getInputType(inS.name) if inType == None: print "Unable to find signal type for signal %s. Check the definition of the widget." % (inS.name) return None # report error if issubclass(outType, inType): canConnect = 1 if (outS.name in outConnected) or (inS.name in inConnected): continue if issubclass(inType, outType): possibleLinks.insert(sameType, (outS.name, inS.name)) sameType += 1 else: possibleLinks.append((outS.name, inS.name)) return possibleLinks, canConnect, sameType
b58d113cf9b08a311e9ca3025590dc0045a6948c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/b58d113cf9b08a311e9ca3025590dc0045a6948c/orngDlgs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 13576, 9314, 12, 2890, 16, 6729, 16, 4540, 16, 596, 8932, 16, 316, 8932, 4672, 3323, 7100, 273, 5378, 848, 5215, 273, 374, 1967, 559, 273, 374, 364, 596, 55, 316, 6729, 30, 596, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13576, 9314, 12, 2890, 16, 6729, 16, 4540, 16, 596, 8932, 16, 316, 8932, 4672, 3323, 7100, 273, 5378, 848, 5215, 273, 374, 1967, 559, 273, 374, 364, 596, 55, 316, 6729, 30, 596, ...
print 'builtin items:',itemList
def LoadThemeCfg(self): ##current theme type radiobutton self.themeIsBuiltin.set(idleConf.GetOption('main','Theme','default', type='bool',default=1)) ##currently set theme currentOption=idleConf.CurrentTheme() print 'current option',currentOption ##load available theme option menus if self.themeIsBuiltin.get(): #default theme selected print 'builtin theme' itemList=idleConf.GetSectionList('default','highlight') itemList.sort() print 'builtin items:',itemList self.optMenuThemeBuiltin.SetMenu(itemList,currentOption) itemList=idleConf.GetSectionList('user','highlight') itemList.sort() print 'user items:',itemList if not itemList: self.radioThemeCustom.config(state=DISABLED) self.customTheme.set('- no custom themes -') else: self.optMenuThemeCustom.SetMenu(itemList,itemList[0]) else: #user theme selected print 'user theme' itemList=idleConf.GetSectionList('user','highlight') itemList.sort() print 'user items:',itemList self.optMenuThemeCustom.SetMenu(itemList,currentOption) itemList=idleConf.GetSectionList('default','highlight') itemList.sort() print 'builtin items:',itemList self.optMenuThemeBuiltin.SetMenu(itemList,itemList[0]) self.SetThemeType() ##load theme element option menu themeNames=self.themeElements.keys() themeNames.sort(self.__ThemeNameIndexCompare) self.optMenuHighlightTarget.SetMenu(themeNames,themeNames[0]) self.PaintThemeSample() self.SetHighlightTarget()
dfd0b296d766645bd2e01955a61f52643a483922 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dfd0b296d766645bd2e01955a61f52643a483922/configDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 8335, 8198, 12, 2890, 4672, 7541, 2972, 5006, 618, 12094, 947, 2644, 365, 18, 7997, 2520, 28032, 18, 542, 12, 20390, 3976, 18, 967, 1895, 2668, 5254, 17023, 8335, 17023, 1886, 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, 4444, 8335, 8198, 12, 2890, 4672, 7541, 2972, 5006, 618, 12094, 947, 2644, 365, 18, 7997, 2520, 28032, 18, 542, 12, 20390, 3976, 18, 967, 1895, 2668, 5254, 17023, 8335, 17023, 1886, 2187, ...
return el1 def depart_image(self, node): pass
return el1, width
def generate_image(self, node, source, destination, current_element): #ipshell('At generate_image') self.image_style_count += 1 style_name = 'rstframestyle%d' % self.image_style_count # Add the style. attrib = { 'style:name': style_name, 'style:family': 'graphic', 'style:parent-style-name': 'Graphics', } el1 = SubElement(self.automatic_styles, 'style:style', attrib=attrib, nsdict=SNSD) halign = None valign = None if 'align' in node.attributes: align = node.attributes['align'].split() for val in align: if val in ('left', 'center', 'right'): halign = val elif val in ('top', 'middle', 'bottom'): valign = val attrib = { 'style:vertical-pos': 'top', 'style:vertical-rel': 'paragraph', #'style:horizontal-pos': halign, #'style:vertical-pos': valign, 'style:horizontal-rel': 'paragraph', 'style:mirror': 'none', 'fo:clip': 'rect(0cm 0cm 0cm 0cm)', 'draw:luminance': '0%', 'draw:contrast': '0%', 'draw:red': '0%', 'draw:green': '0%', 'draw:blue': '0%', 'draw:gamma': '100%', 'draw:color-inversion': 'false', 'draw:image-opacity': '100%', 'draw:color-mode': 'standard', } if halign is not None: attrib['style:horizontal-pos'] = halign if valign is not None: attrib['style:vertical-pos'] = valign #ipshell('At generate_image') # If we are inside a table, add a no-wrap style. if self.is_in_table(node): attrib['style:wrap'] = 'none' el2 = SubElement(el1, 'style:graphic-properties', attrib=attrib, nsdict=SNSD) # Add the content. #el = SubElement(current_element, 'text:p', # attrib={'text:style-name': 'rststyle-textbody'}) attrib={ 'draw:style-name': style_name, 'draw:name': 'graphics2', #'text:anchor-type': 'paragraph', #'svg:width': '%fcm' % (width, ), #'svg:height': '%fcm' % (height, ), 'draw:z-index': '1', } if isinstance(node.parent, nodes.TextElement): attrib['text:anchor-type'] = 'char' else: attrib['text:anchor-type'] = 'paragraph' if 'scale' in node.attributes: try: scale = int(node.attributes['scale']) if scale < 1: # or scale > 100: raise ValueError scale = scale * 0.01 except ValueError, e: print 'Error: Invalid scale for image: "%s"' % ( node.attributes['scale'], ) else: scale = 1.0 if 'width' in node.attributes: try: width = int(node.attributes['width']) width = width * (35.278 / 1000.0) width *= scale attrib['svg:width'] = '%.2fcm' % (width, ) except ValueError, e: print 'Error: Invalid width for image: "%s"' % ( node.attributes['width'], ) if 'height' in node.attributes: try: height = int(node.attributes['height']) height = height * (35.278 / 1000.0) height *= scale attrib['svg:height'] = '%.2fcm' % (height, ) except ValueError, e: print 'Error: Invalid height for image: "%s"' % ( node.attributes['height'], ) if ('scale' in node.attributes and ('width' not in node.attributes or 'height' not in node.attributes)): if Image is not None: if source in self.image_dict: filename, destination = self.image_dict[source] imageobj = Image.open(filename, 'r') width, height = imageobj.size width = width * (35.278 / 1000.0) width *= scale attrib['svg:width'] = '%.2fcm' % (width, ) height = height * (35.278 / 1000.0) height *= scale attrib['svg:height'] = '%.2fcm' % (height, ) else: raise RuntimeError, 'image has scale and no height/width and PIL not installed' el1 = SubElement(current_element, 'draw:frame', attrib=attrib) el2 = SubElement(el1, 'draw:image', attrib={ 'xlink:href': '%s' % (destination, ), 'xlink:type': 'simple', 'xlink:show': 'embed', 'xlink:actuate': 'onLoad', }) return el1
086c03a394bb4fe54c588e814ac2435862cc205a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1278/086c03a394bb4fe54c588e814ac2435862cc205a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2730, 12, 2890, 16, 756, 16, 1084, 16, 2929, 16, 783, 67, 2956, 4672, 468, 625, 10304, 2668, 861, 2103, 67, 2730, 6134, 365, 18, 2730, 67, 4060, 67, 1883, 1011, 404, 2154, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2730, 12, 2890, 16, 756, 16, 1084, 16, 2929, 16, 783, 67, 2956, 4672, 468, 625, 10304, 2668, 861, 2103, 67, 2730, 6134, 365, 18, 2730, 67, 4060, 67, 1883, 1011, 404, 2154, ...
tza=self._tzinfo[tz].info(t)[0] d,t=arg-(tza/86400.0),t-tza
a=self._tzinfo[tz].info(t)[0] d,t=arg-(a/86400.0),t-a
def __init__(self,*args): """Return a new date-time object
92b0ff07ac42eb6719c4d212edd1adf91e39d066 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/92b0ff07ac42eb6719c4d212edd1adf91e39d066/DateTime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14, 1968, 4672, 3536, 990, 279, 394, 1509, 17, 957, 733, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14, 1968, 4672, 3536, 990, 279, 394, 1509, 17, 957, 733, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
bad = '\n'.join('<li>%s</li>'%(i,) for i in bad) d = warning_dialog(self, _('No suitable formats'), '<p>'+ _('Could not email the following books ' 'as no suitable formats were found:<br><ul>%s</ul>')%(bad,)) d.exec_()
bad = u'\n'.join(u'<li>%s</li>'%(i,) for i in bad) details = u'<p><ul>%s</ul></p>'%bad warning(_('No suitable formats'), _('Could not email the following books ' 'as no suitable formats were found:'), details, self)
def send_by_mail(self, to, fmts, delete_from_library): rows = self.library_view.selectionModel().selectedRows() if not rows or len(rows) == 0: return ids = iter(self.library_view.model().id(r) for r in rows) full_metadata = self.library_view.model().get_metadata( rows, full_metadata=True)[-1] files = self.library_view.model().get_preferred_formats(rows, fmts, paths=True, set_metadata=True) files = [getattr(f, 'name', None) for f in files]
4f643a17f680b4aeecb45656ae0b0a57e12bd53a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/4f643a17f680b4aeecb45656ae0b0a57e12bd53a/device.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 1637, 67, 4408, 12, 2890, 16, 358, 16, 1325, 87, 16, 1430, 67, 2080, 67, 12083, 4672, 2595, 273, 365, 18, 12083, 67, 1945, 18, 10705, 1488, 7675, 8109, 4300, 1435, 309, 486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 1637, 67, 4408, 12, 2890, 16, 358, 16, 1325, 87, 16, 1430, 67, 2080, 67, 12083, 4672, 2595, 273, 365, 18, 12083, 67, 1945, 18, 10705, 1488, 7675, 8109, 4300, 1435, 309, 486, ...
if self.coercedCanvasItem is not None:
if self.coercedCanvasItem is not None and dragState is not None:
def MakeCanvasItems(self, resort=False): """ makes new canvas items based on self.visibleItems """ if resort: self.visibleItems.sort(self.sortByStartTime) canvasItemList = [] dragState = self.dragState if (dragState and dragState.currentDragBox): currentDragItem = dragState.currentDragBox.item else: currentDragItem = None primaryCollection = self.blockItem.contentsCollection # First generate a sorted list of TimedCanvasItems for event in self.visibleItems: if isDead(event.itsItem): continue collection = self.blockItem.getContainingCollection(event.itsItem, primaryCollection) canvasItem = TimedCanvasItem(collection, primaryCollection, event, self) canvasItemList.append(canvasItem)
bc961819886ad1fb285f6749b8ec880cc7900bcd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/bc961819886ad1fb285f6749b8ec880cc7900bcd/TimedCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 12971, 3126, 12, 2890, 16, 400, 499, 33, 8381, 4672, 3536, 7297, 394, 5953, 1516, 2511, 603, 365, 18, 8613, 3126, 3536, 309, 400, 499, 30, 365, 18, 8613, 3126, 18, 3804, 12, 2890...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 12971, 3126, 12, 2890, 16, 400, 499, 33, 8381, 4672, 3536, 7297, 394, 5953, 1516, 2511, 603, 365, 18, 8613, 3126, 3536, 309, 400, 499, 30, 365, 18, 8613, 3126, 18, 3804, 12, 2890...
currentProxy = open(self.proxyLocation,'r') oldProxyStr = currentProxy.read() res = getProxyTimeLeft(oldProxyStr)
res = setupProxyFile(self.proxyLocation)
def __getProdProxy(self,prodDN): """This method sets up the proxy for immediate use if not available, and checks the existing proxy if this is available. """ prodGroup = gConfig.getValue(self.section+'/ProductionGroup','lhcb_prod') self.log.info("Determining the length of proxy for DN %s" %prodDN) obtainProxy = False if not os.path.exists(self.proxyLocation): self.log.info("No proxy found") obtainProxy = True else: currentProxy = open(self.proxyLocation,'r') oldProxyStr = currentProxy.read() res = getProxyTimeLeft(oldProxyStr) if not res["OK"]: self.log.error("Could not determine the time left for proxy", res['Message']) res = S_OK(0) # force update of proxy
a5836d364ee38b3a88eedd030b09ff50a899133d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/a5836d364ee38b3a88eedd030b09ff50a899133d/InputDataAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 30683, 3886, 12, 2890, 16, 17672, 8609, 4672, 3536, 2503, 707, 1678, 731, 326, 2889, 364, 14483, 999, 309, 486, 2319, 16, 471, 4271, 326, 2062, 2889, 309, 333, 353, 2319, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 30683, 3886, 12, 2890, 16, 17672, 8609, 4672, 3536, 2503, 707, 1678, 731, 326, 2889, 364, 14483, 999, 309, 486, 2319, 16, 471, 4271, 326, 2062, 2889, 309, 333, 353, 2319, 18, ...
if len(shape) == 3: array = numpy.rollaxis(array, 0, 3)
array = array.T
def _array_from_bitmap(bitmap): """Convert a FreeImage bitmap pointer to a numpy array """ dtype, shape = FI_TYPES.get_type_and_shape(bitmap) array = _wrap_bitmap_bits_in_array(bitmap, shape, dtype) # swizzle the color components and flip the scanlines to go from # FreeImage's BGR[A] and upside-down internal memory format to something # more normal if len(shape) == 3 and _FI.FreeImage_IsLittleEndian() and \ dtype.type == numpy.uint8: b = array[0].copy() array[0] = array[2] array[2] = b array = array[..., ::-1] if len(shape) == 3: array = numpy.rollaxis(array, 0, 3) return array.copy()
0320815b9e0611774424b9eb868ccb9d47f75142 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12573/0320815b9e0611774424b9eb868ccb9d47f75142/freeimage_plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1126, 67, 2080, 67, 3682, 1458, 12, 3682, 1458, 4672, 3536, 2723, 279, 15217, 2040, 9389, 4407, 358, 279, 3972, 526, 225, 3536, 3182, 16, 2179, 273, 4011, 67, 10564, 18, 588, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1126, 67, 2080, 67, 3682, 1458, 12, 3682, 1458, 4672, 3536, 2723, 279, 15217, 2040, 9389, 4407, 358, 279, 3972, 526, 225, 3536, 3182, 16, 2179, 273, 4011, 67, 10564, 18, 588, 67, ...
def check_for_NFO(self):
def check_for_NFO(self, nfifile=None):
def check_for_NFO(self): self.session.summary.setText(self["filelist"].getFilename()) if self["filelist"].getFilename() is None: return if self["filelist"].getCurrentDirectory() is not None: self.nfifile = self["filelist"].getCurrentDirectory()+self["filelist"].getFilename()
f4fb05eb60ba00cc91e7b955d7e228080c3ed1e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/f4fb05eb60ba00cc91e7b955d7e228080c3ed1e0/flasher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1884, 67, 50, 3313, 12, 2890, 16, 13958, 430, 398, 33, 7036, 4672, 365, 18, 3184, 18, 7687, 18, 542, 1528, 12, 2890, 9614, 7540, 5449, 6, 8009, 588, 5359, 10756, 309, 365, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1884, 67, 50, 3313, 12, 2890, 16, 13958, 430, 398, 33, 7036, 4672, 365, 18, 3184, 18, 7687, 18, 542, 1528, 12, 2890, 9614, 7540, 5449, 6, 8009, 588, 5359, 10756, 309, 365, 9...
Series or Series and Season or
Series or Series and Season or
def verifySeriesExists(self): """Verify that a: Series or Series and Season or Series and Season and Episode number or Series and Episode name passed by the user exists on thetvdb.com return False and display an appropriate error if the TV data was not found return an tvdb_api instance of the TV show/season/episode data if it was found """ sid=self.config['sid'] series_name=self.config['series_name'] season=self.config['season_num'] episode=self.config['episode_num'] episode_name=self.config['episode_name'] try: self.config['log'].debug(u'Checking for series(%s), sid(%s), season(%s), episode(%s), episode name(%s)' % (series_name, sid, season, episode, episode_name)) if episode_name: # Find an exact match for the series and episode name series_sid='' if sid: seriesfound=self._searchforSeries(sid).search(episode_name) else: seriesfound=self._searchforSeries(series_name).search(episode_name) if len(seriesfound) != 0: for ep in seriesfound: if (ep['episodename'].lower()).startswith(episode_name.lower()): if len(ep['episodename']) > (len(episode_name)+1): # Skip episodes the are not part of a set of (1), (2) ... etc if ep['episodename'][len(episode_name):len(episode_name)+2] != ' (': continue series_sid = ep['seriesid'] self.config['sid'] = ep['seriesid'] self.config['season_num'] = ep['seasonnumber'] self.config['episode_num'] = ep['episodenumber'] return(ep) else: # Exact match series_sid = ep['seriesid'] self.config['sid'] = ep['seriesid'] self.config['season_num'] = ep['seasonnumber'] self.config['episode_num'] = ep['episodenumber'] return(ep) raise tvdb_episodenotfound # Search for the series or series & season or series & season & episode elif season: if episode: # series & season & episode seriesfound=self._searchforSeries(series_name)[int(season)][int(episode)] self.config['sid'] = seriesfound['seriesid'] self.config['episode_name'] = seriesfound['episodename'] else: # series & season seriesfound=self._searchforSeries(series_name)[int(season)] else: seriesfound=self._searchforSeries(series_name) # Series only except tvdb_shownotfound: # No such show found. # Use the show-name from the files name, and None as the ep name sys.stderr.write(u"\n! Warning: Series (%s) not found\n" % ( series_name ) ) return(False) except (tvdb_seasonnotfound, tvdb_episodenotfound, tvdb_attributenotfound): # The season, episode or name wasn't found, but the show was. # Use the corrected show-name, but no episode name. if series_name == None: series_name = sid if episode: sys.stderr.write(u"\n! Warning: For Series (%s), season (%s) or Episode (%s) not found \n" % (series_name, season, episode ) ) elif episode_name: sys.stderr.write(u"\n! Warning: For Series (%s), Episode (%s) not found \n" % (series_name, episode_name ) ) else: sys.stderr.write(u"\n! Warning: For Series (%s), season (%s) not found \n" % ( series_name, season) ) return(False) except tvdb_error, errormsg: # Error communicating with thetvdb.com if sid: # Maybe the 5 digit number was a series name (e.g. 90210) self.config['series_name']=self.config['sid'] self.config['sid'] = None return self.verifySeriesExists() sys.stderr.write( u"\n! Warning: Error contacting www.thetvdb.com:\n%s\n" % (errormsg) ) return(False) except tvdb_userabort, errormsg: # User aborted selection (q or ^c) print "\n", errormsg return(False) else: return(seriesfound)
6089d4d60f2dab84c6af9981c242684b162de38e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/6089d4d60f2dab84c6af9981c242684b162de38e/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 6485, 4002, 12, 2890, 4672, 3536, 8097, 716, 279, 30, 9225, 578, 9225, 471, 3265, 2753, 578, 9225, 471, 3265, 2753, 471, 512, 84, 11802, 1300, 578, 9225, 471, 512, 84, 11802, 508, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 6485, 4002, 12, 2890, 4672, 3536, 8097, 716, 279, 30, 9225, 578, 9225, 471, 3265, 2753, 578, 9225, 471, 3265, 2753, 471, 512, 84, 11802, 1300, 578, 9225, 471, 512, 84, 11802, 508, ...
return self.__args[4:]
return self.__args[3:]
def _get_args(self): return self.__args[4:]
d85fd83ae55666ff3495392afff1d47215274581 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12327/d85fd83ae55666ff3495392afff1d47215274581/pymplayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1968, 12, 2890, 4672, 327, 365, 16186, 1968, 63, 24, 26894, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1968, 12, 2890, 4672, 327, 365, 16186, 1968, 63, 24, 26894, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if expunge:
return content lock = LockFile.LockFile(LOCKFILE, withlogging=mm_cfg.PENDINGDB_LOCK_DEBUGGING) retries = mm_cfg.PENDINGDB_LOCK_ATTEMPTS try: while retries: retries -= 1 if not lock.locked(): try: lock.lock(timeout=mm_cfg.PENDINGDB_LOCK_TIMEOUT) except LockFile.TimeOutError: continue db = _load() missing = [] content = db.get(cookie, missing) if content is missing: return None
def confirm(cookie, expunge=1): """Return data for cookie, or None if not found. If optional expunge is true (the default), the record is also removed from the database. """ # Acquire the pending database lock, letting TimeOutError percolate up. # BAW: we perhaps shouldn't acquire the lock if expunge==0. lock = LockFile.LockFile(LOCKFILE) lock.lock(timeout=30) try: # Load the database db = _load() missing = [] content = db.get(cookie, missing) if content is missing: return None # Remove the entry from the database if expunge: del db[cookie] del db['evictions'][cookie] _save(db) return content finally: lock.unlock(unconditionally=1)
496da7301195b3472cf282c56be0463c46ff842a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/496da7301195b3472cf282c56be0463c46ff842a/Pending.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6932, 12, 8417, 16, 1329, 25561, 33, 21, 4672, 3536, 990, 501, 364, 3878, 16, 578, 599, 309, 486, 1392, 18, 225, 971, 3129, 1329, 25561, 353, 638, 261, 5787, 805, 3631, 326, 1409, 353,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6932, 12, 8417, 16, 1329, 25561, 33, 21, 4672, 3536, 990, 501, 364, 3878, 16, 578, 599, 309, 486, 1392, 18, 225, 971, 3129, 1329, 25561, 353, 638, 261, 5787, 805, 3631, 326, 1409, 353,...
return difflib.unified_diff(expected, compared, 'expected', 'compared')
return difflib.unified_diff(expected, compared, 'expected', 'compared', n=2, lineterm='')
def html_diff(expected, compared, whitespace=True): """ Compare two HTML strings; generate the delta as a unified diff. `ignorews` controls whether whitespace differences in text events are ignored. """ expected = _html_sequence(expected, whitespace) compared = _html_sequence(compared, whitespace) return difflib.unified_diff(expected, compared, 'expected', 'compared')
005fe03c7ee561cde4832e60e02133555601ae53 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14078/005fe03c7ee561cde4832e60e02133555601ae53/treecompare.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 5413, 12, 3825, 16, 15843, 16, 7983, 33, 5510, 4672, 3536, 11051, 2795, 3982, 2064, 31, 2103, 326, 3622, 487, 279, 27136, 3122, 18, 225, 1375, 6185, 4749, 68, 11022, 2856, 7983...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 5413, 12, 3825, 16, 15843, 16, 7983, 33, 5510, 4672, 3536, 11051, 2795, 3982, 2064, 31, 2103, 326, 3622, 487, 279, 27136, 3122, 18, 225, 1375, 6185, 4749, 68, 11022, 2856, 7983...
event.add_markup(title=title, markup=markup)
event.add_markup(title=title, footer=markup)
def get_timeline_events(self, req, start, stop, filters): if 'wiki' in filters: context = Context(self.env, req) cursor = context.db.cursor() cursor.execute("SELECT time,name,comment,author,ipnr,version " "FROM wiki WHERE time>=%s AND time<=%s", (to_timestamp(start), to_timestamp(stop))) for ts,name,comment,author,ipnr,version in cursor: if 'WIKI_VIEW' not in req.perm('wiki', name): continue ctx = context('wiki', name, version=version) title = tag(tag.em(ctx.name()), version > 1 and ' edited' or ' created') markup = None if version > 1: markup = tag.a('(diff)', href=ctx.resource_href(action='diff')) t = datetime.fromtimestamp(ts, utc) event = TimelineEvent(self, 'wiki') event.set_changeinfo(t, author, ipnr=ipnr) event.add_markup(title=title, markup=markup) event.add_wiki(ctx, body=comment) yield event
055fafac0a715f0648543708ffa4190c0aeb69a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/055fafac0a715f0648543708ffa4190c0aeb69a0/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26237, 67, 5989, 12, 2890, 16, 1111, 16, 787, 16, 2132, 16, 3415, 4672, 309, 296, 13044, 11, 316, 3415, 30, 819, 273, 1772, 12, 2890, 18, 3074, 16, 1111, 13, 3347, 273, 819,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26237, 67, 5989, 12, 2890, 16, 1111, 16, 787, 16, 2132, 16, 3415, 4672, 309, 296, 13044, 11, 316, 3415, 30, 819, 273, 1772, 12, 2890, 18, 3074, 16, 1111, 13, 3347, 273, 819,...
def __init__(self, name=u"", root=u"", currentFolderOnly=False, topLevel=0, bottomLevel=0):
name = u"" root = u"" currentFolderOnly = False includeTop = True topLevel = 0 bottomLevel = 0 def __init__(self, name=u"", root=u"", currentFolderOnly=False, includeTop=True, topLevel=0, bottomLevel=0):
def __init__(self, name=u"", root=u"", currentFolderOnly=False, topLevel=0, bottomLevel=0): self.name = name self.root = root self.currentFolderOnly = currentFolderOnly self.topLevel = topLevel self.bottomLevel = bottomLevel
c640ee5a3eb8a750b8a317d8242c3bd11fe6eb68 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12194/c640ee5a3eb8a750b8a317d8242c3bd11fe6eb68/navigation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 508, 273, 582, 3660, 1365, 273, 582, 3660, 783, 3899, 3386, 273, 1083, 2341, 3401, 273, 1053, 21289, 273, 374, 5469, 2355, 273, 374, 225, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 33, 89, 6,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 508, 273, 582, 3660, 1365, 273, 582, 3660, 783, 3899, 3386, 273, 1083, 2341, 3401, 273, 1053, 21289, 273, 374, 5469, 2355, 273, 374, 225, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 33, 89, 6,...
self.current_view.set_cursor()
def display_next(self): self.current_view.set_value() if self.current_model in self.models.models: idx = self.models.models.index(self.current_model) idx = (idx+1) % len(self.models.models) self.current_model = self.models.models[idx] else: self.current_model = len(self.models.models) \ and self.models.models[0] if self.current_model: self.current_model.validate_set() self.current_view.set_cursor() self.display()
1e8ef1b5465400ce1978f5200f738f65ce0a1698 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/1e8ef1b5465400ce1978f5200f738f65ce0a1698/screen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 4285, 12, 2890, 4672, 365, 18, 2972, 67, 1945, 18, 542, 67, 1132, 1435, 309, 365, 18, 2972, 67, 2284, 316, 365, 18, 7665, 18, 7665, 30, 2067, 273, 365, 18, 7665, 18, 7665, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 4285, 12, 2890, 4672, 365, 18, 2972, 67, 1945, 18, 542, 67, 1132, 1435, 309, 365, 18, 2972, 67, 2284, 316, 365, 18, 7665, 18, 7665, 30, 2067, 273, 365, 18, 7665, 18, 7665, ...
return EvalEnvironment(self.parent.parent)
return EvalEnvironment(self.parent.parent, self.check_load)
def __getitem__(self, item): if item == '_parent_' + self.parent.parent_name and self.parent.parent: return EvalEnvironment(self.parent.parent) return self.parent.get_eval(check_load=self.check_load)[item]
f83c0f3e46401830c7151dd0983daa9331c8f334 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9151/f83c0f3e46401830c7151dd0983daa9331c8f334/record.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 761, 4672, 309, 761, 422, 2070, 2938, 4623, 397, 365, 18, 2938, 18, 2938, 67, 529, 471, 365, 18, 2938, 18, 2938, 30, 327, 13163, 5494, 12, 2890, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 761, 4672, 309, 761, 422, 2070, 2938, 4623, 397, 365, 18, 2938, 18, 2938, 67, 529, 471, 365, 18, 2938, 18, 2938, 30, 327, 13163, 5494, 12, 2890, 18, 2...
for ph in self.ph: self.updateReported(ph) dbo_address = ph.fk_person_historical_to_person_address dbo_veteran = ph.fk_person_historical_to_veteran if ph.hud_homeless <> "" and ph.hud_homeless <> None: isclienthomeless = ET.SubElement(dynamiccontent, "isclienthomeless") isclienthomeless.attrib["date_added"] = datetime.now().isoformat() isclienthomeless.attrib["date_effective"] = self.fixDate(ph.hud_homeless_date_collected) if ph.hud_homeless == '1': isclienthomeless.text = 'true' if ph.hud_homeless == '' or ph.hud_homeless == None: isclienthomeless.text = 'false' if ph.physical_disability <> "" and ph.physical_disability <> None: hud_disablingcondition = ET.SubElement(dynamiccontent, "hud_disablingcondition") hud_disablingcondition.attrib["date_added"] = datetime.now().isoformat() hud_disablingcondition.attrib["date_effective"] = self.fixDate(ph.physical_disability_date_collected) hud_disablingcondition.text = self.pickList.getValue("ENHANCEDYESNOPickOption",str.strip(ph.physical_disability.upper())) if ph.hours_worked_last_week <> "" and ph.hours_worked_last_week <> None: hud_hrsworkedlastweek = ET.SubElement(dynamiccontent, 'hud_hrsworkedlastweek') hud_hrsworkedlastweek.attrib["date_added"] = datetime.now().isoformat() hud_hrsworkedlastweek.attrib["date_effective"] = self.fixDate(ph.hours_worked_last_week_date_collected) hud_hrsworkedlastweek.text = str.strip(ph.hours_worked_last_week) zipcode = "" if len(dbo_address) > 0: if dbo_address[0].zip_quality_code == 1: zipcode = dbo_address[0].zipcode if zipcode <> "" and zipcode <> None: hud_zipcodelastpermaddr = ET.SubElement(dynamiccontent, "hud_zipcodelastpermaddr") hud_zipcodelastpermaddr.attrib["date_added"] = datetime.now().isoformat() hud_zipcodelastpermaddr.attrib["date_effective"] = self.fixDate(dbo_address[0].zipcode_date_collected) hud_zipcodelastpermaddr.text = zipcode if len(dbo_address) > 0: if dbo_address[0].line1 <> "": self.updateReported(dbo_address[0]) address_2 = ET.SubElement(dynamiccontent,"address_2") address_2.attrib["date_added"] = datetime.now().isoformat() address_2.attrib["date_effective"] = self.fixDate(dbo_address[0].line1_date_collected) address_2.text = dbo_address[0].line1 if str(ph.substance_abuse_problem) <> "" and ph.substance_abuse_problem <> None: usealcoholordrugs = ET.SubElement(dynamiccontent,"usealcoholordrugs") usealcoholordrugs.attrib["date_added"] = datetime.now().isoformat() usealcoholordrugs.attrib["date_effective"] = self.fixDate(ph.substance_abuse_problem_date_collected) usealcoholordrugs.text = 'true' if len(self.site_service_part) > 0: for ssp in self.site_service_part: self.updateReported(ssp) vet = ssp.veteran_status if vet <> "" and vet <> None: veteran = ET.SubElement(dynamiccontent,"veteran") veteran.text = self.pickList.getValue("ENHANCEDYESNOPickOption", str(vet)) veteran.attrib["date_added"] = datetime.now().isoformat() veteran.attrib["date_effective"] = self.fixDate(ssp.veteran_status_date_collected) break if len(dbo_veteran) > 0: hud_militarybranchinfo = None for dbv in dbo_veteran: self.updateReported(dbv) branch = dbv.military_branch if str(branch) <> "" and dbv.military_branch <> None: if hud_militarybranchinfo == None: hud_militarybranchinfo = ET.SubElement(dynamiccontent,"hud_militarybranchinfo") hud_militarybranchinfo.attrib["date_added"] = datetime.now().isoformat() militarybranch = ET.SubElement(hud_militarybranchinfo,"militarybranch") militarybranch.attrib["date_added"] = datetime.now().isoformat() militarybranch.attrib["date_effective"] = self.fixDate(dbv.military_branch_date_collected) militarybranch.text = self.pickList.getValue("MILITARYBRANCHPickOption",str(branch)) homelessPickOption = [] lookups = [ 'Addiction', 'Divorce', 'Domestic Violence', 'Evicted within past week', 'Family-Personal Illness', 'Jail/Prison', 'Moved to seek work', 'Physical-Mental Disability', 'Unable to pay rent-mortgage', 'Other' ] if str(ph.hud_homeless) <> '' and ph.hud_homeless <> None: primaryreasonforhomle = ET.SubElement(dynamiccontent,"primaryreasonforhomle") primaryreasonforhomle.attrib["date_added"] = datetime.now().isoformat() primaryreasonforhomle.attrib["date_effective"] = self.fixDate(ph.hud_homeless_date_collected) primaryreasonforhomle.text = 'Other' if len(dbo_address) > 0: if dbo_address[0].line1 <> "": address_1 = self.createAddress_1(dynamiccontent) self.customizeAddress_1(address_1, dbo_address[0]) if str(dbo_address[0].zipcode) <> "" and not dbo_address[0].zipcode == None: address_1 = self.createAddress_1(dynamiccontent) self.customizeAddress_1(address_1, dbo_address[0]) if str(ph.currently_employed) <> "" and not ph.currently_employed == None: unemployed = ET.SubElement(dynamiccontent, 'unemployed') unemployed.attrib["date_added"] = datetime.now().isoformat() unemployed.attrib["date_effective"] = self.fixDate(ph.currently_employed_date_collected) if ph.currently_employed == 1: unemployed.text = "true" else: unemployed.text = "false" if str(ph.total_income) <> "" and not ph.total_income == None: monthlyincome = ET.SubElement(dynamiccontent, 'hud_totalmonthlyincome') monthlyincome.attrib["date_added"] = datetime.now().isoformat() monthlyincome.attrib["date_effective"] = self.fixDate(ph.total_income_date_collected) monthlyincome.text = ph.total_income if str(ph.physical_disability) <> "" and not ph.physical_disability == None: disabilities_1 = ET.SubElement(dynamiccontent,"disabilities_1") disabilities_1.attrib["date_added"] = datetime.now().isoformat() self.customizeDisabilities_1(disabilities_1, ph) if self.person.person_gender_unhashed <> "" and self.person.person_gender_unhashed <> None: svpprofgender = ET.SubElement(dynamiccontent, "svpprofgender") svpprofgender.attrib["date_added"] = datetime.now().isoformat() svpprofgender.attrib["date_effective"] = self.fixDate(self.person.person_gender_date_collected) svpprofgender.text = self.pickList.getValue("SexPick",self.person.person_gender_unhashed) if self.person.person_date_of_birth_unhashed <> "" and self.person.person_date_of_birth_unhashed <> None: svpprofdob = ET.SubElement(dynamiccontent, "svpprofdob") svpprofdob.attrib["date_added"] = datetime.now().isoformat() svpprofdob.attrib["date_effective"] = self.fixDate(self.person.person_date_of_birth_date_collected) svpprofdob.text = self.fixDate(self.person.person_date_of_birth_unhashed) if len(self.race) > 0: race = self.race[0].race_unhashed self.updateReported(self.race[0]) if race <> "" and race <> None: if self.pickList.getValue("RacePick",str(race)) <> "": svpprofrace = ET.SubElement(dynamiccontent, "svpprofrace") svpprofrace.attrib["date_added"] = datetime.now().isoformat() svpprofrace.attrib["date_effective"] = self.fixDate(self.race[0].race_date_collected) svpprofrace.text = self.pickList.getValue("RacePick",str(race)) ethnicity = self.person.person_ethnicity_unhashed if ethnicity <> "" and ethnicity <> None: svpprofeth = ET.SubElement(dynamiccontent, "svpprofeth") svpprofeth.attrib["date_added"] = datetime.now().isoformat() svpprofeth.attrib["date_effective"] = self.fixDate(self.person.person_ethnicity_date_collected) svpprofeth.text = self.pickList.getValue("EthnicityPick", str(ethnicity))
for ph in self.ph: self.updateReported(ph) dbo_address = ph.fk_person_historical_to_person_address dbo_veteran = ph.fk_person_historical_to_veteran if ph.hud_homeless <> "" and ph.hud_homeless <> None: isclienthomeless = ET.SubElement(dynamiccontent, "isclienthomeless") isclienthomeless.attrib["date_added"] = datetime.now().isoformat() isclienthomeless.attrib["date_effective"] = self.fixDate(ph.hud_homeless_date_collected) if ph.hud_homeless == '1': isclienthomeless.text = 'true' if ph.hud_homeless == '' or ph.hud_homeless == None: isclienthomeless.text = 'false' if ph.physical_disability <> "" and ph.physical_disability <> None: hud_disablingcondition = ET.SubElement(dynamiccontent, "hud_disablingcondition") hud_disablingcondition.attrib["date_added"] = datetime.now().isoformat() hud_disablingcondition.attrib["date_effective"] = self.fixDate(ph.physical_disability_date_collected) hud_disablingcondition.text = self.pickList.getValue("ENHANCEDYESNOPickOption",str.strip(ph.physical_disability.upper())) if ph.hours_worked_last_week <> "" and ph.hours_worked_last_week <> None: hud_hrsworkedlastweek = ET.SubElement(dynamiccontent, 'hud_hrsworkedlastweek') hud_hrsworkedlastweek.attrib["date_added"] = datetime.now().isoformat() hud_hrsworkedlastweek.attrib["date_effective"] = self.fixDate(ph.hours_worked_last_week_date_collected) hud_hrsworkedlastweek.text = str.strip(ph.hours_worked_last_week) zipcode = "" if len(dbo_address) > 0: if dbo_address[0].zip_quality_code == 1: zipcode = dbo_address[0].zipcode if zipcode <> "" and zipcode <> None: hud_zipcodelastpermaddr = ET.SubElement(dynamiccontent, "hud_zipcodelastpermaddr") hud_zipcodelastpermaddr.attrib["date_added"] = datetime.now().isoformat() hud_zipcodelastpermaddr.attrib["date_effective"] = self.fixDate(dbo_address[0].zipcode_date_collected) hud_zipcodelastpermaddr.text = zipcode if len(dbo_address) > 0: if dbo_address[0].line1 <> "": self.updateReported(dbo_address[0]) address_2 = ET.SubElement(dynamiccontent,"address_2") address_2.attrib["date_added"] = datetime.now().isoformat() address_2.attrib["date_effective"] = self.fixDate(dbo_address[0].line1_date_collected) address_2.text = dbo_address[0].line1 if str(ph.substance_abuse_problem) <> "" and ph.substance_abuse_problem <> None: usealcoholordrugs = ET.SubElement(dynamiccontent,"usealcoholordrugs") usealcoholordrugs.attrib["date_added"] = datetime.now().isoformat() usealcoholordrugs.attrib["date_effective"] = self.fixDate(ph.substance_abuse_problem_date_collected) usealcoholordrugs.text = 'true' if len(self.site_service_part) > 0: for ssp in self.site_service_part: self.updateReported(ssp) vet = ssp.veteran_status if vet <> "" and vet <> None: veteran = ET.SubElement(dynamiccontent,"veteran") veteran.text = self.pickList.getValue("ENHANCEDYESNOPickOption", str(vet)) veteran.attrib["date_added"] = datetime.now().isoformat() veteran.attrib["date_effective"] = self.fixDate(ssp.veteran_status_date_collected) break if len(dbo_veteran) > 0: hud_militarybranchinfo = None for dbv in dbo_veteran: self.updateReported(dbv) branch = dbv.military_branch if str(branch) <> "" and dbv.military_branch <> None: if hud_militarybranchinfo == None: hud_militarybranchinfo = ET.SubElement(dynamiccontent,"hud_militarybranchinfo") hud_militarybranchinfo.attrib["date_added"] = datetime.now().isoformat() militarybranch = ET.SubElement(hud_militarybranchinfo,"militarybranch") militarybranch.attrib["date_added"] = datetime.now().isoformat() militarybranch.attrib["date_effective"] = self.fixDate(dbv.military_branch_date_collected) militarybranch.text = self.pickList.getValue("MILITARYBRANCHPickOption",str(branch)) homelessPickOption = [] lookups = [ 'Addiction', 'Divorce', 'Domestic Violence', 'Evicted within past week', 'Family-Personal Illness', 'Jail/Prison', 'Moved to seek work', 'Physical-Mental Disability', 'Unable to pay rent-mortgage', 'Other' ] if str(ph.hud_homeless) <> '' and ph.hud_homeless <> None: primaryreasonforhomle = ET.SubElement(dynamiccontent,"primaryreasonforhomle") primaryreasonforhomle.attrib["date_added"] = datetime.now().isoformat() primaryreasonforhomle.attrib["date_effective"] = self.fixDate(ph.hud_homeless_date_collected) primaryreasonforhomle.text = 'Other' if len(dbo_address) > 0: if dbo_address[0].line1 <> "": address_1 = self.createAddress_1(dynamiccontent) self.customizeAddress_1(address_1, dbo_address[0]) if str(dbo_address[0].zipcode) <> "" and not dbo_address[0].zipcode == None: address_1 = self.createAddress_1(dynamiccontent) self.customizeAddress_1(address_1, dbo_address[0]) if str(ph.currently_employed) <> "" and not ph.currently_employed == None: unemployed = ET.SubElement(dynamiccontent, 'unemployed') unemployed.attrib["date_added"] = datetime.now().isoformat() unemployed.attrib["date_effective"] = self.fixDate(ph.currently_employed_date_collected) if ph.currently_employed == 1: unemployed.text = "true" else: unemployed.text = "false" if str(ph.total_income) <> "" and not ph.total_income == None: monthlyincome = ET.SubElement(dynamiccontent, 'hud_totalmonthlyincome') monthlyincome.attrib["date_added"] = datetime.now().isoformat() monthlyincome.attrib["date_effective"] = self.fixDate(ph.total_income_date_collected) monthlyincome.text = ph.total_income if str(ph.physical_disability) <> "" and not ph.physical_disability == None: disabilities_1 = ET.SubElement(dynamiccontent,"disabilities_1") disabilities_1.attrib["date_added"] = datetime.now().isoformat() self.customizeDisabilities_1(disabilities_1, ph) if self.person.person_gender_unhashed <> "" and self.person.person_gender_unhashed <> None: svpprofgender = ET.SubElement(dynamiccontent, "svpprofgender") svpprofgender.attrib["date_added"] = datetime.now().isoformat() svpprofgender.attrib["date_effective"] = self.fixDate(self.person.person_gender_date_collected) svpprofgender.text = self.pickList.getValue("SexPick",self.person.person_gender_unhashed) if self.person.person_date_of_birth_unhashed <> "" and self.person.person_date_of_birth_unhashed <> None: svpprofdob = ET.SubElement(dynamiccontent, "svpprofdob") svpprofdob.attrib["date_added"] = datetime.now().isoformat() svpprofdob.attrib["date_effective"] = self.fixDate(self.person.person_date_of_birth_date_collected) svpprofdob.text = self.fixDate(self.person.person_date_of_birth_unhashed) if len(self.race) > 0: race = self.race[0].race_unhashed self.updateReported(self.race[0]) if race <> "" and race <> None: if self.pickList.getValue("RacePick",str(race)) <> "": svpprofrace = ET.SubElement(dynamiccontent, "svpprofrace") svpprofrace.attrib["date_added"] = datetime.now().isoformat() svpprofrace.attrib["date_effective"] = self.fixDate(self.race[0].race_date_collected) svpprofrace.text = self.pickList.getValue("RacePick",str(race)) ethnicity = self.person.person_ethnicity_unhashed if ethnicity <> "" and ethnicity <> None: svpprofeth = ET.SubElement(dynamiccontent, "svpprofeth") svpprofeth.attrib["date_added"] = datetime.now().isoformat() svpprofeth.attrib["date_effective"] = self.fixDate(self.person.person_ethnicity_date_collected) svpprofeth.text = self.pickList.getValue("EthnicityPick", str(ethnicity))
def customizeDynamiccontent(self, dynamiccontent):
47d2884a8b5be4efadf798bbb2e71a3d5e993c3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9116/47d2884a8b5be4efadf798bbb2e71a3d5e993c3e/svcpointxml_406_writer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20236, 9791, 1745, 12, 2890, 16, 5976, 1745, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20236, 9791, 1745, 12, 2890, 16, 5976, 1745, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
active, inactive = universe.get_active_inactive() lengths, angles = universe.get_parameters()
active, inactive = universe.cell.active_inactive lengths, angles = universe.cell.parameters
def define_flat(): "Reads and converts the unit cell vectors from the current model." # some parts of the algorithm have been arranged sub functions like # these, to reduce the number of local variables in self.do. This # should also clarify the code. active, inactive = universe.get_active_inactive() lengths, angles = universe.get_parameters() a = lengths[active[0]] b = lengths[active[1]] theta = angles[inactive[0]] return ( numpy.array([a, 0], float), numpy.array([b*numpy.cos(theta), b*numpy.sin(theta)], float) )
1a9b8e314b34f747fb6118588cefe2bcf5ba0405 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11052/1a9b8e314b34f747fb6118588cefe2bcf5ba0405/tube.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4426, 67, 15401, 13332, 315, 7483, 471, 7759, 326, 2836, 2484, 10046, 628, 326, 783, 938, 1199, 468, 2690, 2140, 434, 326, 4886, 1240, 2118, 2454, 2330, 720, 4186, 3007, 468, 4259, 16, 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, 4426, 67, 15401, 13332, 315, 7483, 471, 7759, 326, 2836, 2484, 10046, 628, 326, 783, 938, 1199, 468, 2690, 2140, 434, 326, 4886, 1240, 2118, 2454, 2330, 720, 4186, 3007, 468, 4259, 16, 3...
ct = time.localtime(os.stat(rasterfilename)[stat.ST_MTIME]])
ct = time.localtime(os.stat(rasterfilename)[stat.ST_MTIME])
def shortDescription(self): file = "%s.pdf.%s.%d.%d" % (self.file[string.rindex(self.file, '/') + 1:], self.device, self.dpi, self.band)
9f99365e8c5d0b35123c56acfc68d9068b10cd38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1296/9f99365e8c5d0b35123c56acfc68d9068b10cd38/gscheck_pdfwrite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3025, 3291, 12, 2890, 4672, 585, 273, 2213, 87, 18, 7699, 7866, 87, 7866, 72, 7866, 72, 6, 738, 261, 2890, 18, 768, 63, 1080, 18, 86, 1615, 12, 2890, 18, 768, 16, 2023, 13, 397, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3025, 3291, 12, 2890, 4672, 585, 273, 2213, 87, 18, 7699, 7866, 87, 7866, 72, 7866, 72, 6, 738, 261, 2890, 18, 768, 63, 1080, 18, 86, 1615, 12, 2890, 18, 768, 16, 2023, 13, 397, 40...
elif column == 'reporter' and cell.find('@') != -1: value['rss'] = cell
elif column == 'reporter': if cell.find('@') != -1: value['rss'] = cell elif cell in email_map: value['rss'] = email_map[cell]
def sortkey(row): val = row[colIndex] if isinstance(val, basestring): val = val.lower() return val
5e387c96f0b7c450dc1adeadff2de4ed0e74d7b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/5e387c96f0b7c450dc1adeadff2de4ed0e74d7b8/report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 856, 12, 492, 4672, 1244, 273, 1027, 63, 1293, 1016, 65, 309, 1549, 12, 1125, 16, 10699, 4672, 1244, 273, 1244, 18, 8167, 1435, 327, 1244, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 856, 12, 492, 4672, 1244, 273, 1027, 63, 1293, 1016, 65, 309, 1549, 12, 1125, 16, 10699, 4672, 1244, 273, 1244, 18, 8167, 1435, 327, 1244, 2, -100, -100, -100, -100, -100, -100, ...
processInstance=processIstance, \
processInstance=processInstance, \
def subclassStatement(s, p, o, \ processClass=processClass, \ processInstance=processIstance, \ currentDepth=currentDepth, recurse=recurse): if recurse: self.subClassV(s, processClass, processInstance, currentDepth+1) else: processClass(s, currentDepth+1, recurse)
6a2761ddf7a700ff3182034d1eebcbab3a6135e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7049/6a2761ddf7a700ff3182034d1eebcbab3a6135e7/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10177, 3406, 12, 87, 16, 293, 16, 320, 16, 521, 1207, 797, 33, 2567, 797, 16, 521, 1207, 1442, 33, 2567, 1442, 16, 521, 783, 6148, 33, 2972, 6148, 16, 11502, 33, 29362, 4672, 309, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10177, 3406, 12, 87, 16, 293, 16, 320, 16, 521, 1207, 797, 33, 2567, 797, 16, 521, 1207, 1442, 33, 2567, 1442, 16, 521, 783, 6148, 33, 2972, 6148, 16, 11502, 33, 29362, 4672, 309, 11...
txt2 = eval(sps.pop(0),self.localcontext)
txt2 = str2xml(eval(sps.pop(0),self.localcontext))
def _process_text(self, txt): if not self.localcontext: return txt if not txt: return '' result = '' sps = _regex.split(txt) while sps: # This is a simple text to translate result += self.localcontext.get('translate', lambda x:x)(sps.pop(0)) if sps: try: txt2 = eval(sps.pop(0),self.localcontext) except: txt2 = '' if type(txt2)==type('') or type(txt2)==type(u''): result += txt2 elif (txt2 is not None) and (txt2 is not False): result += str(txt2) return result
4bc92e3314fd6a0fd24999dc955eef96dec28176 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/4bc92e3314fd6a0fd24999dc955eef96dec28176/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 955, 12, 2890, 16, 6463, 4672, 309, 486, 365, 18, 3729, 2472, 30, 327, 6463, 309, 486, 6463, 30, 327, 875, 563, 273, 875, 272, 1121, 273, 389, 7584, 18, 4939, 12, 5830...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2567, 67, 955, 12, 2890, 16, 6463, 4672, 309, 486, 365, 18, 3729, 2472, 30, 327, 6463, 309, 486, 6463, 30, 327, 875, 563, 273, 875, 272, 1121, 273, 389, 7584, 18, 4939, 12, 5830...
self.assertNotEqual(d1, d2)
self.assertEqual(len(d2), 1) self.assertNotEqual(d1.items(), d2.items())
def test_in_memory_shelf(self): d1 = byteskeydict() s = shelve.Shelf(d1, protocol=0) s['key1'] = (1,2,3,4) self.assertEqual(s['key1'], (1,2,3,4)) s.close() d2 = byteskeydict() s = shelve.Shelf(d2, protocol=1) s['key1'] = (1,2,3,4) self.assertEqual(s['key1'], (1,2,3,4)) s.close()
2e2b0a0b5dd0e8de48546730bcb6dc9050e0ea0e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/2e2b0a0b5dd0e8de48546730bcb6dc9050e0ea0e/test_shelve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 267, 67, 7858, 67, 674, 19079, 12, 2890, 4672, 302, 21, 273, 1731, 856, 1576, 1435, 272, 273, 699, 292, 537, 18, 1555, 19079, 12, 72, 21, 16, 1771, 33, 20, 13, 272, 3292, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 267, 67, 7858, 67, 674, 19079, 12, 2890, 4672, 302, 21, 273, 1731, 856, 1576, 1435, 272, 273, 699, 292, 537, 18, 1555, 19079, 12, 72, 21, 16, 1771, 33, 20, 13, 272, 3292, ...
goal_pose = create_goal_pose(x, y, HOVER_Z - GRASP_DIST, gripper_rot)
goal_pose = create_goal_pose(x, y, HOVER_Z - GRASP_DIST, get_gripper_pose(gripper_rot))
def perform_grasp(x, y, z=None, gripper_rot = np.pi / 2., grasp=None, is_place=False, is_grasp=True, collide = True, return_pose=True, zeros = None, cm=None, apm=None): print "Performing grasp (%1.2f, %1.2f), rotation: %1.2f" % (x, y, gripper_rot) gripper_rot = normalize_rot(gripper_rot) if cm is None: cm = ControllerManager(armc) if apm is None: apm = ArmPerceptionMonitor(ARM, percept_mon_list=PERCEPT_GRASP_LIST) if grasp is None: grasp = get_grasp_model(x, y, gripper_rot) #apm.datasets = grasp[2] #apm.models = grasp[3] #apm.model_zeros = grasp[4] #print "Model zeros:", grasp[4] print "Beginning grasp" # Move to grasp position print "Moving to initial grasp position" # cm.command_joint_trajectory([grasp[1]], SETUP_VELOCITY, blocking = True) # print "Moving to final grasp position" grasp_pose = create_goal_pose(x, y, HOVER_Z, gripper_rot) cm.move_arm_pose_biased(grasp_pose, JOINTS_BIAS, SETUP_VELOCITY, blocking = False) if not is_place and is_grasp: # open gripper print "Opening gripper" cm.command_gripper(0.08, -1.0, False) cm.gripper_action_client.wait_for_result(rospy.Duration(2.0)) cm.wait_joint_trajectory_done() rospy.sleep(0.1) #if zeros is None: zeros = apm.get_zeros(0.6) print "Current zeros:", zeros goal_pose = create_goal_pose(x, y, HOVER_Z - GRASP_DIST, gripper_rot) class Collision(): def __init__(self): self.collided = False # start gathering data def on_collision(self): print "Collision!" self.collided = True while not cm.check_joint_trajectory_done(): cm.joint_action_client.cancel_all_goals() rospy.sleep(0.01) if rospy.is_shutdown(): return None col = Collision() def rotate_acceleration(data): return data data -= zeros["accelerometer"] a = gripper_rot data[1] = np.cos(a) * data[1] - np.sin(a) * data[2] data[2] = np.sin(a) * data[1] + np.cos(a) * data[2] data += zeros["accelerometer"] return data transforms = { "accelerometer" : rotate_acceleration } apm.begin_monitoring(models = grasp[3], model_zeros = grasp[4], contingency=col.on_collision, window_size=MONITOR_WINDOW, current_zeros=zeros, std_dev_default=STD_DEV, std_dev_dict = STD_DEV_DICT, tol_thresh_dict = TOL_THRESH_DICT, noise_dev_default=NOISE_DEV, collide=collide, transform_dict = transforms) # move arm down print "Moving arm down" downward_grasp(cm, goal_pose, block = False) if z is None: while not cm.check_joint_trajectory_done(): if col.collided: cm.joint_action_client.cancel_all_goals() rospy.sleep(0.01) if rospy.is_shutdown(): return None else: while not cm.check_joint_trajectory_done(): if col.collided: cm.joint_action_client.cancel_all_goals() wrist_pose = cm.get_current_wrist_pose_stamped("torso_lift_link") p = wrist_pose.pose.position o = wrist_pose.pose.orientation affector_pos = transform_in_frame([p.x, p.y, p.z], [o.x, o.y, o.z, o.w], GRIPPER_POINT) if affector_pos[2] <= z: print "Reached z position" print "Affector position:", affector_pos while not cm.check_joint_trajectory_done(): cm.joint_action_client.cancel_all_goals() rospy.sleep(0.01) break rospy.sleep(0.01) if rospy.is_shutdown(): return None print "Finished moving arm" avg_list = apm.end_monitoring() rospy.sleep(0.1) if not is_place and is_grasp: print "Closing gripper" cm.command_gripper(0.0, 30.0, True) print "Gripper closed" elif is_place: print "Opening gripper" cm.command_gripper(0.08, -1.0, True) print "Gripper opened" if return_pose and is_grasp: print "Moving back to grasp position" cm.move_arm_pose_biased(grasp_pose, JOINTS_BIAS, SETUP_VELOCITY, blocking = True) #upward_lift(cm, grasp_pose, block=True) print "Grasp complete!" return grasp, avg_list, col.collided, zeros
adf62e7b2cb1725833144625d553bfc8a1186987 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8117/adf62e7b2cb1725833144625d553bfc8a1186987/simple_grasp_learner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 3197, 28264, 12, 92, 16, 677, 16, 998, 33, 7036, 16, 314, 21335, 457, 67, 8342, 273, 1130, 18, 7259, 342, 576, 12990, 3821, 28264, 33, 7036, 16, 353, 67, 964, 33, 8381, 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, 3073, 67, 3197, 28264, 12, 92, 16, 677, 16, 998, 33, 7036, 16, 314, 21335, 457, 67, 8342, 273, 1130, 18, 7259, 342, 576, 12990, 3821, 28264, 33, 7036, 16, 353, 67, 964, 33, 8381, 16,...
str += self._start_of('Index') str += self._table_header('Index', 'index') index = self._extract_index().items()
str += self._start_of('Term Index') str += self._table_header('Term Index', 'index') index = self._extract_term_index().items()
def _index_to_html(self): """ @return: An HTML page containing the index terms. @rtype: C{string} """ # Header and navigation bar. str = self._header('Index') str += self._navbar('epydoc-index', 1) str += '<br>\n'
7e1af2abc702612461ceeb001b4b551d49cb71d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7e1af2abc702612461ceeb001b4b551d49cb71d3/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1615, 67, 869, 67, 2620, 12, 2890, 4672, 3536, 632, 2463, 30, 1922, 3982, 1363, 4191, 326, 770, 6548, 18, 632, 86, 723, 30, 385, 95, 1080, 97, 3536, 468, 4304, 471, 10394, 4653, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1615, 67, 869, 67, 2620, 12, 2890, 4672, 3536, 632, 2463, 30, 1922, 3982, 1363, 4191, 326, 770, 6548, 18, 632, 86, 723, 30, 385, 95, 1080, 97, 3536, 468, 4304, 471, 10394, 4653, ...
win.Show()
win.CenterOnParent() win.ShowModal()
def Show(rv): win = ProxiesFrame(None, -1, _(u"Configure Proxy"), style=wx.DEFAULT_DIALOG_STYLE, rv=rv) win.Show()
7e5875049e0585d475cf02ab7989251a4c04b8c4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/7e5875049e0585d475cf02ab7989251a4c04b8c4/Proxies.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9674, 12, 4962, 4672, 5657, 273, 1186, 92, 606, 3219, 12, 7036, 16, 300, 21, 16, 389, 12, 89, 6, 11207, 7659, 6, 3631, 2154, 33, 27226, 18, 5280, 67, 2565, 18683, 67, 15066, 16, 5633...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9674, 12, 4962, 4672, 5657, 273, 1186, 92, 606, 3219, 12, 7036, 16, 300, 21, 16, 389, 12, 89, 6, 11207, 7659, 6, 3631, 2154, 33, 27226, 18, 5280, 67, 2565, 18683, 67, 15066, 16, 5633...
self._setvar(var, cls) def do_findfuncs(self, arg): """findfuncs expr [as var] find flow-graphed functions for which expr is true, cand in it referes to the candidate function; the result list is assigned to var or _.""" expr, var = self._parse_modif(arg) flt = self._make_flt(expr) if flt is None: return funcs = [] try: for f in self.translator.flowgraphs: if flt(f): funcs.append(f) except self.GiveUp: return self._setvar(var, funcs)
self._setvar(var, descs)
def do_findclasses(self, arg): """findclasses expr [as var]
7d808fcf4934565ef8e76da84e4310466e3bfd7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/7d808fcf4934565ef8e76da84e4310466e3bfd7b/pdbplus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4720, 4701, 12, 2890, 16, 1501, 4672, 3536, 4720, 4701, 3065, 306, 345, 569, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4720, 4701, 12, 2890, 16, 1501, 4672, 3536, 4720, 4701, 3065, 306, 345, 569, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
"""return the length of the buffer """
""" Returns the length of the buffer. """
def getLength(self): """return the length of the buffer """ if self.packed_data: caddr_t, length, flags = struct.unpack(self.fmt, self.packed_data) return length else: return None
05b40a3d0b9e46299ea3a7ddfd32be4a1e2ba258 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3159/05b40a3d0b9e46299ea3a7ddfd32be4a1e2ba258/iwlibs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9888, 12, 2890, 4672, 3536, 2860, 326, 769, 434, 326, 1613, 18, 3536, 309, 365, 18, 2920, 329, 67, 892, 30, 276, 4793, 67, 88, 16, 769, 16, 2943, 273, 1958, 18, 17309, 12, 2890, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9888, 12, 2890, 4672, 3536, 2860, 326, 769, 434, 326, 1613, 18, 3536, 309, 365, 18, 2920, 329, 67, 892, 30, 276, 4793, 67, 88, 16, 769, 16, 2943, 273, 1958, 18, 17309, 12, 2890, 18, ...
raise ParserError("while scanning a %s node" % node, start_mark,
raise ParserError("while parsing a %s node" % node, start_mark,
def parse_node(self, block=False, indentless_sequence=False): if self.check_token(AliasToken): token = self.get_token() event = AliasEvent(token.value, token.start_mark, token.end_mark) self.state = self.states.pop() else: anchor = None tag = None start_mark = end_mark = tag_mark = None if self.check_token(AnchorToken): token = self.get_token() start_mark = token.start_mark end_mark = token.end_mark anchor = token.value if self.check_token(TagToken): token = self.get_token() tag_mark = token.start_mark end_mark = token.end_mark tag = token.value elif self.check_token(TagToken): token = self.get_token() start_mark = tag_mark = token.start_mark end_mark = token.end_mark tag = token.value if self.check_token(AnchorToken): token = self.get_token() end_mark = token.end_mark anchor = token.value if tag is not None and tag != u'!': handle, suffix = tag if handle is not None: if handle not in self.tag_handles: raise ParserError("while parsing a node", start_mark, "found undefined tag handle %r" % handle.encode('utf-8'), tag_mark) tag = self.tag_handles[handle]+suffix else: tag = suffix #if tag == u'!': # raise ParserError("while parsing a node", start_mark, # "found non-specific tag '!'", tag_mark, # "Please check 'http://pyyaml.org/wiki/YAMLNonSpecificTag' and share your opinion.") if start_mark is None: start_mark = end_mark = self.peek_token().start_mark event = None collection_events = None implicit = (tag is None or tag == u'!') if indentless_sequence and self.check_token(BlockEntryToken): end_mark = self.peek_token().end_mark event = SequenceStartEvent(anchor, tag, implicit, start_mark, end_mark) self.state = self.parse_indentless_sequence_entry else: if self.check_token(ScalarToken): token = self.get_token() end_mark = token.end_mark if (token.plain and tag is None) or tag == u'!': implicit = (True, False) elif tag is None: implicit = (False, True) else: implicit = (False, False) event = ScalarEvent(anchor, tag, implicit, token.value, start_mark, end_mark, style=token.style) self.state = self.states.pop() elif self.check_token(FlowSequenceStartToken): end_mark = self.peek_token().end_mark event = SequenceStartEvent(anchor, tag, implicit, start_mark, end_mark, flow_style=True) self.state = self.parse_flow_sequence_first_entry elif self.check_token(FlowMappingStartToken): end_mark = self.peek_token().end_mark event = MappingStartEvent(anchor, tag, implicit, start_mark, end_mark, flow_style=True) self.state = self.parse_flow_mapping_first_key elif block and self.check_token(BlockSequenceStartToken): end_mark = self.peek_token().start_mark event = SequenceStartEvent(anchor, tag, implicit, start_mark, end_mark, flow_style=False) self.state = self.parse_block_sequence_first_entry elif block and self.check_token(BlockMappingStartToken): end_mark = self.peek_token().start_mark event = MappingStartEvent(anchor, tag, implicit, start_mark, end_mark, flow_style=False) self.state = self.parse_block_mapping_first_key elif anchor is not None or tag is not None: # Empty scalars are allowed even if a tag or an anchor is # specified. event = ScalarEvent(anchor, tag, (implicit, False), u'', start_mark, end_mark) self.state = self.states.pop() else: if block: node = 'block' else: node = 'flow' token = self.peek_token() raise ParserError("while scanning a %s node" % node, start_mark, "expected the node content, but found %r" % token.id, token.start_mark) return event
95c8976b37428c048ea78c18be63c03897557c21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12018/95c8976b37428c048ea78c18be63c03897557c21/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2159, 12, 2890, 16, 1203, 33, 8381, 16, 3504, 2656, 67, 6178, 33, 8381, 4672, 309, 365, 18, 1893, 67, 2316, 12, 2936, 1345, 4672, 1147, 273, 365, 18, 588, 67, 2316, 1435, 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, 1109, 67, 2159, 12, 2890, 16, 1203, 33, 8381, 16, 3504, 2656, 67, 6178, 33, 8381, 4672, 309, 365, 18, 1893, 67, 2316, 12, 2936, 1345, 4672, 1147, 273, 365, 18, 588, 67, 2316, 1435, 8...
myusevars.extend(self.settings["use"])
myusevars.extend(self.settings["use"].split())
def chroot_setup(self): if self.settings.has_key("AUTORESUME") \ and os.path.exists(self.settings["autoresume_path"]+"chroot_setup"): print "Resume point detected, skipping chroot_setup operation..." else: print "Setting up chroot..." self.makeconf=read_makeconf(self.settings["chroot_path"]+"/etc/make.conf") cmd("cp /etc/resolv.conf "+self.settings["chroot_path"]+"/etc",\ "Could not copy resolv.conf into place.") # copy over the envscript, if applicable if self.settings.has_key("ENVSCRIPT"): if not os.path.exists(self.settings["ENVSCRIPT"]): raise CatalystError, "Can't find envscript "+self.settings["ENVSCRIPT"] cmd("cp "+self.settings["ENVSCRIPT"]+" "+self.settings["chroot_path"]+"/tmp/envscript",\ "Could not copy envscript into place.")
007956dbf05ec045e1308f8e69a46604ab907a14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/007956dbf05ec045e1308f8e69a46604ab907a14/generic_stage_target.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 462, 3085, 67, 8401, 12, 2890, 4672, 309, 365, 18, 4272, 18, 5332, 67, 856, 2932, 37, 1693, 8607, 30590, 7923, 521, 471, 1140, 18, 803, 18, 1808, 12, 2890, 18, 4272, 9614, 6079, 25158,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 462, 3085, 67, 8401, 12, 2890, 4672, 309, 365, 18, 4272, 18, 5332, 67, 856, 2932, 37, 1693, 8607, 30590, 7923, 521, 471, 1140, 18, 803, 18, 1808, 12, 2890, 18, 4272, 9614, 6079, 25158,...
return super(scrum_product_backlog, self).name_search(cr, uid, name, args, operator,context, limit=limit)
return super(project_scrum_product_backlog, self).name_search(cr, uid, name, args, operator,context, limit=limit)
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100): if not args: args=[] if not context: context={} match = re.match('^S\(([0-9]+)\)$', name) if match: ids = self.search(cr, uid, [('sprint_id','=', int(match.group(1)))], limit=limit, context=context) return self.name_get(cr, uid, ids, context=context) return super(scrum_product_backlog, self).name_search(cr, uid, name, args, operator,context, limit=limit)
e018cce62721e614c5be9486a2584276038a34a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e018cce62721e614c5be9486a2584276038a34a8/project_scrum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 67, 3072, 12, 2890, 16, 4422, 16, 4555, 16, 508, 16, 833, 33, 7036, 16, 3726, 2218, 330, 2547, 2187, 819, 33, 7036, 16, 1800, 33, 6625, 4672, 309, 486, 833, 30, 833, 33, 8526, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 67, 3072, 12, 2890, 16, 4422, 16, 4555, 16, 508, 16, 833, 33, 7036, 16, 3726, 2218, 330, 2547, 2187, 819, 33, 7036, 16, 1800, 33, 6625, 4672, 309, 486, 833, 30, 833, 33, 8526, ...
LISTMATCH_DELAY = 15
LISTMATCH_DELAY = 5
def updateJobStatus( logger, name, jobID, majorStatus, minorStatus=None, logRecord=False ): """This method updates the job status in the JobDB. """ # FIXME: this log entry should go into JobDB logger.verbose("jobDB.setJobAttribute( %s, 'Status', '%s', update=True )" % ( jobID, majorStatus ) ) result = jobDB.setJobAttribute( jobID, 'Status', majorStatus, update=True ) if result['OK']: if minorStatus: # FIXME: this log entry should go into JobDB logger.verbose("jobDB.setJobAttribute( %s, 'MinorStatus', '%s', update=True)" % ( jobID, minorStatus) ) result = jobDB.setJobAttribute( jobID, 'MinorStatus', minorStatus, update=True ) if logRecord and result['OK']: result = jobLoggingDB.addLoggingRecord( jobID, majorStatus, minorStatus, source=name ) if not result['OK']: logger.error(result['Message']) return False return True
55aab95db444ff98cd23fd04eb657d65d41e983f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/55aab95db444ff98cd23fd04eb657d65d41e983f/Director.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 23422, 12, 1194, 16, 508, 16, 28913, 16, 7888, 1482, 16, 8439, 1482, 33, 7036, 16, 30832, 33, 8381, 262, 30, 3536, 2503, 707, 4533, 326, 1719, 1267, 316, 326, 3956, 2290, 18, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 23422, 12, 1194, 16, 508, 16, 28913, 16, 7888, 1482, 16, 8439, 1482, 33, 7036, 16, 30832, 33, 8381, 262, 30, 3536, 2503, 707, 4533, 326, 1719, 1267, 316, 326, 3956, 2290, 18, 353...
return w.page(title, w.error(_("Failed to remove group"),
return w.page(title, w.error(_("Failed to remove group"),
def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.page(title, w.error(_("Failed to remove group"), [ _("alter system group.") ], _("insufficient permissions to perform operation."))) if not sure: data += w.question(_("Are you sure you want to remove group <strong>%s</strong>?") % name, _("""Group shared data will be archived in directory %s, and accessible to members of group %s for eventual recovery. However, you can decideto remove them permanently.""") % (configuration.home_archive_dir, configuration.defaults.admin_group), yes_values = [ _("Remove") + ' >>', "/groups/delete/%s/sure" % name, _("R") ], no_values = [ '<< ' + _("Cancel"), "/groups/list", _("N") ], form_options = w.checkbox("no_archive", "True", _("Definitely remove group shared data."), checked = False) ) return w.page(title, data) else: # we are sure, do it ! command = [ 'sudo', 'del', 'group', '--quiet', '--no-colors', '--name', name ] if no_archive: command.extend(['--no-archive']) return w.page(title, data + w.run(command, uri, successfull_redirect = "/groups/list", err_msg = _("Failed to remove group <strong>%s</strong>!") % name))
e74a9415e90d5a3af83e10abed2f1876ae4e528a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/e74a9415e90d5a3af83e10abed2f1876ae4e528a/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 1650, 16, 1062, 67, 1355, 16, 508, 16, 3071, 273, 1083, 16, 1158, 67, 10686, 273, 1083, 16, 12465, 273, 599, 4672, 3536, 3581, 1041, 471, 5052, 261, 280, 486, 13, 1041, 5116,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 1650, 16, 1062, 67, 1355, 16, 508, 16, 3071, 273, 1083, 16, 1158, 67, 10686, 273, 1083, 16, 12465, 273, 599, 4672, 3536, 3581, 1041, 471, 5052, 261, 280, 486, 13, 1041, 5116,...
('/', Landing), ('/about', About), ('/faq', FAQ), ('/support', Support), ], debug=True)
('/dashboard/*', Dashboard), ('/dashboard/new/*', NewTodoItem), ('/dashboard/edit/([a-zA-Z0-9]*)/*', EditTodoItem), ('/dashboard/delete/([a-zA-Z0-9]*)/*', DeleteTodoItem), ('/dashboard/batch_edit/*', BatchEdit), ('.*', Redirect), ], debug=False)
def main(): app = webapp.WSGIApplication([ ('/', Landing), ('/about', About), ('/faq', FAQ), ('/support', Support), ], debug=True) util.run_wsgi_app(app)
74794d4bd49e99e14321270fb33f583c6f630b8d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4708/74794d4bd49e99e14321270fb33f583c6f630b8d/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 595, 273, 28945, 18, 2651, 13797, 3208, 3816, 7707, 19, 13479, 20308, 2187, 18230, 3631, 7707, 19, 13479, 19, 2704, 20308, 2187, 1166, 56, 7370, 1180, 3631, 7707, 19, 13479, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 595, 273, 28945, 18, 2651, 13797, 3208, 3816, 7707, 19, 13479, 20308, 2187, 18230, 3631, 7707, 19, 13479, 19, 2704, 20308, 2187, 1166, 56, 7370, 1180, 3631, 7707, 19, 13479, 1...
sage: f = Piecewise([[(0,pi/2),f1],[(pi/2,pi),f2]])
sage: f = Piecewise([[(-pi,pi/2),f1],[(pi/2,pi),f2]])
def plot_fourier_series_partial_sum_cesaro(self,N,L,xmin,xmax, **kwds): r""" Plots the partial sum \[ f(x) \sim \frac{a_0}{2} + \sum_{n=1}^N (1-n/N)*[a_n\cos(\frac{n\pi x}{L}) + b_n\sin(\frac{n\pi x}{L})], \] over xmin < x < xmin. This is a "smoother" partial sum - the Gibbs phenomenon is mollified.
9015904a2f7366a135e0dba87074788922510d62 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/9015904a2f7366a135e0dba87074788922510d62/piecewise.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 74, 24775, 67, 10222, 67, 11601, 67, 1364, 67, 764, 14349, 12, 2890, 16, 50, 16, 48, 16, 92, 1154, 16, 92, 1896, 16, 2826, 25577, 4672, 436, 8395, 3008, 6968, 326, 4702, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 74, 24775, 67, 10222, 67, 11601, 67, 1364, 67, 764, 14349, 12, 2890, 16, 50, 16, 48, 16, 92, 1154, 16, 92, 1896, 16, 2826, 25577, 4672, 436, 8395, 3008, 6968, 326, 4702, 21...
infos.append(CFG_WEBSESSION_INFO_MESSAGES["GROUP_CREATED"])
infos.append(_(CFG_WEBSESSION_INFO_MESSAGES["GROUP_CREATED"]))
def perform_request_create_group(uid, group_name, group_description, join_policy, ln=cdslang): """Create new group @param group_name: name of the group entered @param group_description: description of the group entered @param join_policy: join policy of the group entered @param ln: language @return a (body, errors, warnings) formed tuple warning != [] if group_name or join_policy are not valid or if the name already exists in the database body="1" if succeed in order to display info on the main page """ _ = gettext_set_language(ln) body = "" warnings = [] errors = [] infos = [] if group_name == "": warnings.append(('WRN_WEBSESSION_NO_GROUP_NAME',)) (body, errors, warnings) = perform_request_input_create_group(group_name, group_description, join_policy, warnings=warnings) elif not group_name_valid_p(group_name): warnings.append('WRN_WEBSESSION_NOT_VALID_GROUP_NAME') (body, errors, warnings) = perform_request_input_create_group(group_name, group_description, join_policy, warnings=warnings) elif join_policy=="-1": warnings.append('WRN_WEBSESSION_NO_JOIN_POLICY') (body, errors, warnings) = perform_request_input_create_group(group_name, group_description, join_policy, warnings=warnings) elif db.group_name_exist(group_name): warnings.append('WRN_WEBSESSION_GROUP_NAME_EXISTS') (body, errors, warnings) = perform_request_input_create_group(group_name, group_description, join_policy, warnings=warnings) else: db.insert_new_group(uid, group_name, group_description, join_policy) infos.append(CFG_WEBSESSION_INFO_MESSAGES["GROUP_CREATED"]) (body, errors, warnings) = perform_request_group_display(uid, infos=infos, errors=errors, warnings=warnings, ln=cdslang) return (body, errors, warnings)
5b6e928b4222c0527298f19150e237b65b55803a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3933/5b6e928b4222c0527298f19150e237b65b55803a/webgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2293, 67, 2640, 67, 1655, 12, 1911, 16, 1041, 67, 529, 16, 1041, 67, 3384, 16, 1233, 67, 5086, 16, 7211, 33, 4315, 2069, 539, 4672, 3536, 1684, 394, 1041, 632, 891, 1041, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2293, 67, 2640, 67, 1655, 12, 1911, 16, 1041, 67, 529, 16, 1041, 67, 3384, 16, 1233, 67, 5086, 16, 7211, 33, 4315, 2069, 539, 4672, 3536, 1684, 394, 1041, 632, 891, 1041, 6...
log.info('>> %s' % line)
log.warning('>> %s' % line)
def stdout_cb(self, line): line.strip(' \t\n') if line: log.info('>> %s' % line)
60d592f15b490e8199623ca6d40476242896f11e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/60d592f15b490e8199623ca6d40476242896f11e/videothumb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3909, 67, 7358, 12, 2890, 16, 980, 4672, 980, 18, 6406, 2668, 521, 88, 64, 82, 6134, 309, 980, 30, 613, 18, 1376, 2668, 9778, 738, 87, 11, 738, 980, 13, 2, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3909, 67, 7358, 12, 2890, 16, 980, 4672, 980, 18, 6406, 2668, 521, 88, 64, 82, 6134, 309, 980, 30, 613, 18, 1376, 2668, 9778, 738, 87, 11, 738, 980, 13, 2, -100, -100, -100, -100, ...
self.tasklets = []
self.tasklets = None
def __init__(self, processor, op, context, rpc): """Constructor for LogicalUnit.
3a012b41920218e5dbe1d90b2dd4f540130de614 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/3a012b41920218e5dbe1d90b2dd4f540130de614/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6659, 16, 1061, 16, 819, 16, 6724, 4672, 3536, 6293, 364, 17085, 2802, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6659, 16, 1061, 16, 819, 16, 6724, 4672, 3536, 6293, 364, 17085, 2802, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.startTransaction() self.processXML() self.prettify() self.writeOutXML() return True
self.startTransaction() self.processXML() self.prettify() self.writeOutXML() return True
def write(self):
47d2884a8b5be4efadf798bbb2e71a3d5e993c3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9116/47d2884a8b5be4efadf798bbb2e71a3d5e993c3e/svcpointxml_406_writer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
"[digest|nodigest] [address=<email-address>]")
"[digest|nodigest] [address=<email-address>]", trunc=0)
def ProcessSubscribeCmd(self, args, cmd, mail): """Parse subscription request and send confirmation request."""
5551c37235c9c603bd7ae608093198c4c4d929f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/5551c37235c9c603bd7ae608093198c4c4d929f5/MailCommandHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 16352, 5931, 12, 2890, 16, 833, 16, 1797, 16, 4791, 4672, 3536, 3201, 4915, 590, 471, 1366, 14296, 590, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 16352, 5931, 12, 2890, 16, 833, 16, 1797, 16, 4791, 4672, 3536, 3201, 4915, 590, 471, 1366, 14296, 590, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"""Runs the given keyword with the given arguments, if all critical tests passed.
"""Runs the given keyword with the given arguments, if all critical tests passed.
def run_keyword_if_all_critical_tests_passed(self, name, *args): """Runs the given keyword with the given arguments, if all critical tests passed. This keyword can only be used in suite teardown. Trying to use it in any other place will result in an error. Otherwise, this keyword works exactly like 'Run Keyword', see its documentation for more details. """ kwname = 'Run Keyword If All Critical Tests Passed' suite = self._get_suite_in_teardown(kwname) if suite.critical_stats.failed == 0: return self.run_keyword(name, *args)
dfa75ac2320d3c97bf00a5f0b376db63803b6c8e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/dfa75ac2320d3c97bf00a5f0b376db63803b6c8e/BuiltIn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 11041, 67, 430, 67, 454, 67, 28000, 67, 16341, 67, 23603, 12, 2890, 16, 508, 16, 380, 1968, 4672, 3536, 9361, 326, 864, 4932, 598, 326, 864, 1775, 16, 309, 777, 11239, 7434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 11041, 67, 430, 67, 454, 67, 28000, 67, 16341, 67, 23603, 12, 2890, 16, 508, 16, 380, 1968, 4672, 3536, 9361, 326, 864, 4932, 598, 326, 864, 1775, 16, 309, 777, 11239, 7434, ...
ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
ldfp xmmh, seg, sib, "DISPLACEMENT", dataSize=8
def macroop MOVHPD_XMM_M { ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
c6722e266d4f02fe5c41cce0328d0920da1cd3b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7385/c6722e266d4f02fe5c41cce0328d0920da1cd3b7/move.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 16070, 58, 2500, 40, 67, 60, 8206, 67, 49, 288, 328, 2180, 84, 619, 7020, 76, 16, 2291, 16, 12092, 16, 315, 2565, 3118, 2534, 1441, 3212, 397, 1725, 3113, 30216, 33, 28, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 16070, 58, 2500, 40, 67, 60, 8206, 67, 49, 288, 328, 2180, 84, 619, 7020, 76, 16, 2291, 16, 12092, 16, 315, 2565, 3118, 2534, 1441, 3212, 397, 1725, 3113, 30216, 33, 28, ...
if not len(args) == 3:
if not len( args ) == 3:
def usage(): print 'Usage: %s [<options>] <lfn|fileContainingLFNs> SE Status' % (Script.scriptName) print ' This will set the status of the replicas at the provided SE with the given status' print ' Type "%s --help" for the available options and syntax' % Script.scriptName DIRAC.exit(2)
04ed498e9f2324d5b78ccfadf29d3f5236487f1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/04ed498e9f2324d5b78ccfadf29d3f5236487f1f/dirac-dms-set-replica-status.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 306, 32, 2116, 34, 65, 411, 80, 4293, 96, 768, 24344, 9105, 10386, 34, 3174, 2685, 11, 738, 261, 3651, 18, 4263, 461, 13, 1172, 296, 1220, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 306, 32, 2116, 34, 65, 411, 80, 4293, 96, 768, 24344, 9105, 10386, 34, 3174, 2685, 11, 738, 261, 3651, 18, 4263, 461, 13, 1172, 296, 1220, ...
Cm = inv(D) Dm = inv(Cm(ix_((0,1,3),(0,1,3))))
Cm = linalg.inv(D) Dm = linalg.inv(Cm[ix_((0,1,3),(0,1,3))])
def plants(ex,ey,ep,D,ed): """ Calculate element normal and shear stress for a triangular plane stress or plane strain element. INPUT: ex = [x1 x2 x3] element coordinates ey = [y1 y2 y3] ep = [ptype t ] ptype: analysis type t: thickness D constitutive matrix ed =[u1 u2 ...u6 element displacement vector ...... ] one row for each element OUTPUT: es = [ sigx sigy [sigz] tauxy element stress matrix ...... ] one row for each element et = [ epsx epsy [epsz] gamxy element strain matrix ...... ] one row for each element """ ptype=ep[0] rowed=ed.shape[0] rowex=ex.shape[0] # --------- plane stress -------------------------------------- if ptype==1: colD = D.shape[1] if colD>3: Cm = inv(D) Dm = inv(Cm(ix_((0,1,3),(0,1,3)))) else: Dm = D incie=0 if rowex==1: incie=0 else: incie=1 et=zeros([rowed,colD]) es=zeros([rowed,colD]) ie=0 for i in range(rowed): C = matrix( [[1, ex[ie,0], ey[ie,0], 0, 0, 0 ], [0, 0, 0, 1, ex[ie,0], ey[ie,0] ], [1, ex[ie,1], ey[ie,1], 0, 0, 0 ], [0, 0, 0, 1, ex[ie,1], ey[ie,1] ], [1, ex[ie,2], ey[ie,2], 0, 0, 0 ], [0, 0, 0, 1, ex[ie,2], ey[ie,2] ]] ) B = matrix([ [0,1,0,0,0,0], [0,0,0,0,0,1], [0,0,1,0,1,0]])*linalg.inv(C) ee=B*asmatrix(ed[ie,:]).T if colD>3: ss=zeros([colD,1]) ss[[0,1,3]]=Dm*ee ee=Cm*ss else: ss=Dm*ee et[ie,:] = ee.T es[ie,:] = ss.T ie = ie + incie return es, et
2f6591546126fdee7b488309a0c0106468904dbb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1235/2f6591546126fdee7b488309a0c0106468904dbb/pycalfem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 886, 4388, 12, 338, 16, 402, 16, 881, 16, 40, 16, 329, 4672, 3536, 9029, 930, 2212, 471, 23901, 297, 384, 663, 364, 279, 6882, 13077, 11017, 384, 663, 578, 11017, 16853, 930, 18, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 886, 4388, 12, 338, 16, 402, 16, 881, 16, 40, 16, 329, 4672, 3536, 9029, 930, 2212, 471, 23901, 297, 384, 663, 364, 279, 6882, 13077, 11017, 384, 663, 578, 11017, 16853, 930, 18, 225, ...
self.musicManager.setActive(bEnableMusic)
self.musicManager.setActive(self.wantMusic)
def EnableMusic(self, bEnableMusic): if(self.musicManager == None): # would need to createaudiomanager/loadsfx for this to work. would that be safe after startup? self.notify.warning("Cant toggle music, must set audio-music-active #t in Configrc at startup") return 0 self.wantMusic = bEnableMusic # dont setActive(1) if no audiofocus if(not (self.wantMusic and not self.AppHasAudioFocus)): self.musicManager.setActive(bEnableMusic) if(self.wantMusic): self.notify.debug("Enabling music") else: self.notify.debug("Disabling music") return 1
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, 9677, 49, 14894, 12, 2890, 16, 324, 8317, 49, 14894, 4672, 309, 12, 2890, 18, 81, 14894, 1318, 422, 599, 4672, 468, 4102, 1608, 358, 752, 24901, 14642, 1063, 19, 17135, 19595, 364, 333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9677, 49, 14894, 12, 2890, 16, 324, 8317, 49, 14894, 4672, 309, 12, 2890, 18, 81, 14894, 1318, 422, 599, 4672, 468, 4102, 1608, 358, 752, 24901, 14642, 1063, 19, 17135, 19595, 364, 333, ...
onChoiceMode() def onTimeout(event=None): if self.configs<>[]: timeout = ctrlTimeout.GetValue() sel = self.oldSel self.configs[sel][3] = timeout if event: event.Skip()
def onTimeout(event): timeout = ctrlTimeout.GetValue() sel = self.oldSel self.configs[sel][3] = timeout event.Skip()
def onChoiceMode(event=None): if self.configs<>[]: mode = choiceMode.GetSelection() sel = self.oldSel self.configs[sel][4] = mode if event: event.Skip()
d0107bea2be20b60085b6a84c936b89a8727e4f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8076/d0107bea2be20b60085b6a84c936b89a8727e4f1/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 10538, 2309, 12, 2575, 33, 7036, 4672, 309, 365, 18, 10955, 29667, 8526, 30, 1965, 273, 6023, 2309, 18, 967, 6233, 1435, 357, 273, 365, 18, 1673, 1877, 365, 18, 10955, 63, 1786, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 10538, 2309, 12, 2575, 33, 7036, 4672, 309, 365, 18, 10955, 29667, 8526, 30, 1965, 273, 6023, 2309, 18, 967, 6233, 1435, 357, 273, 365, 18, 1673, 1877, 365, 18, 10955, 63, 1786, 6...
out += "..." + highlight(snippet, patterns) + "..."
out += "..." + snippet + "..."
def get_text_snippets(textfile_path, patterns, nb_words_around, max_snippets): """ Extract text snippets around 'patterns' from file found at 'textfile_path' The snippets are meant to look like in the results of the popular search engine: using " ... " between snippets. For empty patterns it returns "" The idea is to first produce big snippets with grep and narrow them TODO: - distinguish the beginning of sentences and try to make the snippets start there """ if len(patterns) == 0: return "" # the max number of words that can still be added to the snippet words_left = max_snippets * (nb_words_around * 2 + 1) # Assuming that there will be at least one word per line we can produce the # big snippets like this # FIXME: the ligature replacement should be done at the textification time; # then the sed expression can go away here. cmd = "sed \'s/ff/ff/g; s/fi/fi/g; s/fl/fl/g; s/ffi/ffi/g; s/ffl/ffl/g\' \ %s | grep -i -A%s -B%s -m%s" cmdargs = [textfile_path, str(nb_words_around), str(nb_words_around), str(max_snippets)] for p in patterns: cmd += " -e %s" cmdargs.append(p) (dummy1, output, dummy2) = run_shell_command(cmd, cmdargs) result = [] big_snippets = output.split("--") # cut the snippets to match the nb_words_around parameter precisely: for s in big_snippets: small_snippet = cut_out_snippet(s, patterns, nb_words_around, words_left) #count words words_left -= len(small_snippet.split()) #if words_left <= 0: #print "Error: snippet too long" result.append(small_snippet) # combine snippets out = "" for snippet in result: if snippet: if out: out += "<br>" out += "..." + highlight(snippet, patterns) + "..." return out
772ca8adb4685aa5cb50ce35c8e38c154c7f0d99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2763/772ca8adb4685aa5cb50ce35c8e38c154c7f0d99/bibformat_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 955, 67, 8134, 16664, 12, 955, 768, 67, 803, 16, 6884, 16, 4264, 67, 3753, 67, 12716, 16, 943, 67, 8134, 16664, 4672, 3536, 8152, 977, 24613, 6740, 296, 13317, 11, 628, 585, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 955, 67, 8134, 16664, 12, 955, 768, 67, 803, 16, 6884, 16, 4264, 67, 3753, 67, 12716, 16, 943, 67, 8134, 16664, 4672, 3536, 8152, 977, 24613, 6740, 296, 13317, 11, 628, 585, ...
def _buf_append_data (self, data):
def buf_append_data (self, data):
def _buf_append_data (self, data): """we have to make sure that we have no two following DATA things in the tag buffer. Why? To be 100% sure that an ENCLOSED match really matches enclosed data. """ #self._debug(NIGHTMARE, "buf_append_data") if data[0]==DATA and self.buf and self.buf[-1][0]==DATA: self.buf[-1][1] += data[1] else: self.buf.append(data)
84fbb098dcc217798789e0d75b90b3973f33e5ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/84fbb098dcc217798789e0d75b90b3973f33e5ff/HtmlParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1681, 67, 6923, 67, 892, 261, 2890, 16, 501, 4672, 3536, 1814, 1240, 358, 1221, 3071, 716, 732, 1240, 1158, 2795, 3751, 8730, 9198, 316, 326, 1047, 1613, 18, 3497, 93, 35, 2974, 506, 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, 1681, 67, 6923, 67, 892, 261, 2890, 16, 501, 4672, 3536, 1814, 1240, 358, 1221, 3071, 716, 732, 1240, 1158, 2795, 3751, 8730, 9198, 316, 326, 1047, 1613, 18, 3497, 93, 35, 2974, 506, 2...
if self.submissioncomponent_set.all().count() == 0:
if self.submissioncomponent_set.filter(deleted=False).count() == 0:
def no_submit_too_old(self): """ Returns True if this activity is not submittable because it is too old """ if self.submissioncomponent_set.all().count() == 0: return False now = datetime.now() if (now - self.due_date > timedelta(days=30)): return True return False
bb522d17520df03096ae62a2e273dc82291cbcea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6634/bb522d17520df03096ae62a2e273dc82291cbcea/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1158, 67, 9297, 67, 16431, 67, 1673, 12, 2890, 4672, 3536, 2860, 1053, 309, 333, 5728, 353, 486, 4879, 2121, 2724, 518, 353, 4885, 1592, 3536, 309, 365, 18, 12684, 4652, 67, 542, 18, 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, 1158, 67, 9297, 67, 16431, 67, 1673, 12, 2890, 4672, 3536, 2860, 1053, 309, 333, 5728, 353, 486, 4879, 2121, 2724, 518, 353, 4885, 1592, 3536, 309, 365, 18, 12684, 4652, 67, 542, 18, 2...
self.setWSS(aspect) self.setSlowBlank(aspect)
self.setAspectWSS(aspect) self.setAspectSlowBlank(aspect)
def setInput(self, input): eAVSwitch.getInstance().setInput(self.INPUT[input][0]) if self.INPUT[input][1] == 4: aspect = self.getAspectRatioSetting() self.setWSS(aspect) self.setSlowBlank(aspect) else: eAVSwitch.getInstance().setSlowblank(self.INPUT[input][1]) # FIXME why do we have to reset the colorformat? bug in avs-driver? eAVSwitch.getInstance().setColorFormat(config.av.colorformat.value)
05626c8692bb0775f993ee23494926b21c266eac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/05626c8692bb0775f993ee23494926b21c266eac/AVSwitch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21687, 12, 2890, 16, 810, 4672, 425, 5856, 10200, 18, 588, 1442, 7675, 542, 1210, 12, 2890, 18, 15934, 63, 2630, 6362, 20, 5717, 309, 365, 18, 15934, 63, 2630, 6362, 21, 65, 422, 1059,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21687, 12, 2890, 16, 810, 4672, 425, 5856, 10200, 18, 588, 1442, 7675, 542, 1210, 12, 2890, 18, 15934, 63, 2630, 6362, 20, 5717, 309, 365, 18, 15934, 63, 2630, 6362, 21, 65, 422, 1059,...
__slots__ = ('id', 'parent', '__weakref__', 'extents',
__slots__ = ('extents',
def prettyPrint(self, stream=None): if stream == None: stream = sys.stdout
6f17c8e815fe3042b2cd3cbdd13741fdc9aac3c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5223/6f17c8e815fe3042b2cd3cbdd13741fdc9aac3c7/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30410, 12, 2890, 16, 1407, 33, 7036, 4672, 309, 1407, 422, 599, 30, 1407, 273, 2589, 18, 10283, 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, 30410, 12, 2890, 16, 1407, 33, 7036, 4672, 309, 1407, 422, 599, 30, 1407, 273, 2589, 18, 10283, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.recall(self.text.get(next[0], next[1]))
self.recall(self.text.get(next[0], next[1]), event)
def enter_callback(self, event): if self.executing and not self.reading: return # Let the default binding (insert '\n') take over # If some text is selected, recall the selection # (but only if this before the I/O mark) try: sel = self.text.get("sel.first", "sel.last") if sel: if self.text.compare("sel.last", "<=", "iomark"): self.recall(sel) return "break" except: pass # If we're strictly before the line containing iomark, recall # the current line, less a leading prompt, less leading or # trailing whitespace if self.text.compare("insert", "<", "iomark linestart"): # Check if there's a relevant stdin range -- if so, use it prev = self.text.tag_prevrange("stdin", "insert") if prev and self.text.compare("insert", "<", prev[1]): self.recall(self.text.get(prev[0], prev[1])) return "break" next = self.text.tag_nextrange("stdin", "insert") if next and self.text.compare("insert lineend", ">=", next[0]): self.recall(self.text.get(next[0], next[1])) return "break" # No stdin mark -- just get the current line, less any prompt line = self.text.get("insert linestart", "insert lineend") last_line_of_prompt = sys.ps1.split('\n')[-1] if line.startswith(last_line_of_prompt): line = line[len(last_line_of_prompt):] self.recall(line) return "break" # If we're between the beginning of the line and the iomark, i.e. # in the prompt area, move to the end of the prompt if self.text.compare("insert", "<", "iomark"): self.text.mark_set("insert", "iomark") # If we're in the current input and there's only whitespace # beyond the cursor, erase that whitespace first s = self.text.get("insert", "end-1c") if s and not s.strip(): self.text.delete("insert", "end-1c") # If we're in the current input before its last line, # insert a newline right at the insert point if self.text.compare("insert", "<", "end-1c linestart"): self.newline_and_indent_event(event) return "break" # We're in the last line; append a newline and submit it self.text.mark_set("insert", "end-1c") if self.reading: self.text.insert("insert", "\n") self.text.see("insert") else: self.newline_and_indent_event(event) self.text.tag_add("stdin", "iomark", "end-1c") self.text.update_idletasks() if self.reading: self.top.quit() # Break out of recursive mainloop() in raw_input() else: self.runit() return "break"
89f61869181408bb747f0049dfb3f51059eccc4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/89f61869181408bb747f0049dfb3f51059eccc4a/PyShell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 67, 3394, 12, 2890, 16, 871, 4672, 309, 365, 18, 4177, 8490, 471, 486, 365, 18, 21803, 30, 327, 468, 10559, 326, 805, 5085, 261, 6387, 2337, 82, 6134, 4862, 1879, 468, 971, 2690,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 67, 3394, 12, 2890, 16, 871, 4672, 309, 365, 18, 4177, 8490, 471, 486, 365, 18, 21803, 30, 327, 468, 10559, 326, 805, 5085, 261, 6387, 2337, 82, 6134, 4862, 1879, 468, 971, 2690,...
self.assertEqual(executable, "executable=''")
self.assertIn(executable, ["''", repr(sys.executable)])
def test_executable(self): # Issue #7774: Ensure that sys.executable is an empty string if argv[0] # has been set to an non existent program name and Python is unable to # retrieve the real program name import subprocess p = subprocess.Popen( ["nonexistent", "-c", 'import sys; print "executable=%r" % sys.executable'], executable=sys.executable, stdout=subprocess.PIPE) executable = p.communicate()[0].strip() p.wait() self.assertEqual(executable, "executable=''")
ab4a89579f8b087587bab1bacd4b39404ffc5488 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/ab4a89579f8b087587bab1bacd4b39404ffc5488/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17751, 12, 2890, 4672, 468, 11820, 468, 4700, 5608, 30, 7693, 716, 2589, 18, 17751, 353, 392, 1008, 533, 309, 5261, 63, 20, 65, 468, 711, 2118, 444, 358, 392, 1661, 30364, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17751, 12, 2890, 4672, 468, 11820, 468, 4700, 5608, 30, 7693, 716, 2589, 18, 17751, 353, 392, 1008, 533, 309, 5261, 63, 20, 65, 468, 711, 2118, 444, 358, 392, 1661, 30364, 54...
public.write(footer) private.write(footer)
public.write(footer); private.write(footer) def _write_help(self, public, private): """ Write an HTML help file to the given streams. If C{self._helpfile} contains a help file, then use it; otherwise, use the default helpfile from L{epydoc.help}. @param public: The output stream for the public version of the page. @param private: The output stream for the private version of the page. """ if self._helpfile: if os.path.exists(self._helpfile): try: help = open(self._helpfile).read() except: raise IOError("Can't open help file: %r" % self._helpfile) else: raise IOError("Can't find help file: %r" % self._helpfile) else: if self._prj_name: thisprj = self._prj_name else: thisprj = 'this project' help = HTML_HELP % {'this_project':thisprj} header = self._header('Help') public.write(header); private.write(header) self._write_navbar(public, private, 'help') self._write_breadcrumbs(public, private, 'help') public.write(help) private.write(help) self._write_navbar(public, private, 'help') footer = self._footer() public.write(footer); private.write(footer)
def _write_class(self, public, private, uid, doc): """ @return: An HTML page describing the class identified by C{uid}. @rtype: C{string} @param uid: The unique identifier for the class that should be documented. @type uid: L{UID} """ # Write the header, navigation bar, & class name. str = self._header(uid.name()) private.write(str) public.write(str)
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 1106, 12, 2890, 16, 1071, 16, 3238, 16, 4555, 16, 997, 4672, 3536, 632, 2463, 30, 1922, 3982, 1363, 16868, 326, 667, 9283, 635, 385, 95, 1911, 5496, 632, 86, 723, 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, 2626, 67, 1106, 12, 2890, 16, 1071, 16, 3238, 16, 4555, 16, 997, 4672, 3536, 632, 2463, 30, 1922, 3982, 1363, 16868, 326, 667, 9283, 635, 385, 95, 1911, 5496, 632, 86, 723, 30, ...
startPage.GetBuffer().LoadFile("start.txt")
startPage.LoadFile("start.txt")
def __init__(self, parent, id, title): # First, call the base class' __init__ method to create the frame wx.Frame.__init__(self, parent, id, title)
1db0d1de2844481e7781491bde6aa9047a8f3273 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14747/1db0d1de2844481e7781491bde6aa9047a8f3273/MainFrame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 2077, 4672, 468, 5783, 16, 745, 326, 1026, 667, 11, 1001, 2738, 972, 707, 358, 752, 326, 2623, 7075, 18, 3219, 16186, 2738, 972, 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, 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, 982, 16, 612, 16, 2077, 4672, 468, 5783, 16, 745, 326, 1026, 667, 11, 1001, 2738, 972, 707, 358, 752, 326, 2623, 7075, 18, 3219, 16186, 2738, 972, 12, ...
return http.Response(stream = s)
return HTMLResponse(stream = s)
def render(self, ctx): s = '<html>' + notebook.conf().html_conf_form('submit') + '</html>' return http.Response(stream = s)
39855fabbbbe971c1c1d64566b1625e9c1c6d482 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/39855fabbbbe971c1c1d64566b1625e9c1c6d482/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 272, 273, 2368, 2620, 1870, 397, 14718, 18, 3923, 7675, 2620, 67, 3923, 67, 687, 2668, 9297, 6134, 397, 4357, 2620, 1870, 327, 1062, 18, 1064, 12, 3256, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 272, 273, 2368, 2620, 1870, 397, 14718, 18, 3923, 7675, 2620, 67, 3923, 67, 687, 2668, 9297, 6134, 397, 4357, 2620, 1870, 327, 1062, 18, 1064, 12, 3256, ...
console.stdoutln("TLSAnimate: creating animation PDB file...")
console.stdoutln("[%s,%s] TLSAnimate: creating animation PDB file..." % ( chain.chain_id, cpartition.num_tls_segments()))
def jmol_animate_html(self, chain, cpartition): """Writes out the HTML page which will display the structure using the JMol Applet. """ basename = "%s_CHAIN%s_NTLS%d_ANIMATE" % (self.struct_id, chain.chain_id, cpartition.num_tls_segments())
81092918682cb3b404793cc6abd4020f9621498a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10674/81092918682cb3b404793cc6abd4020f9621498a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 525, 21260, 67, 304, 4988, 67, 2620, 12, 2890, 16, 2687, 16, 276, 10534, 4672, 3536, 8368, 596, 326, 3982, 1363, 1492, 903, 2562, 326, 3695, 1450, 326, 804, 49, 355, 1716, 1469, 18, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 525, 21260, 67, 304, 4988, 67, 2620, 12, 2890, 16, 2687, 16, 276, 10534, 4672, 3536, 8368, 596, 326, 3982, 1363, 1492, 903, 2562, 326, 3695, 1450, 326, 804, 49, 355, 1716, 1469, 18, 35...
def call(self, auth, nodenetwork_id_or_hostname, optional_vals=None): if filter(lambda field: field not in self.update_fields, optional_vals): raise PLCInvalidArgument, "Invalid fields specified"
def call(self, auth, nodenetwork_id_or_hostname, update_fields): if filter(lambda field: field not in self.update_fields, update_fields): raise PLCInvalidArgument, "Invalid fields specified"
def call(self, auth, nodenetwork_id_or_hostname, optional_vals=None): if filter(lambda field: field not in self.update_fields, optional_vals):
432c25cdba91732f8c08cb9ebb86c68817c99bba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/432c25cdba91732f8c08cb9ebb86c68817c99bba/AdmUpdateNodeNetwork.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 1357, 16, 14003, 275, 1572, 67, 350, 67, 280, 67, 10358, 16, 3129, 67, 4524, 33, 7036, 4672, 309, 1034, 12, 14661, 652, 30, 652, 486, 316, 365, 18, 2725, 67, 2821,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 745, 12, 2890, 16, 1357, 16, 14003, 275, 1572, 67, 350, 67, 280, 67, 10358, 16, 3129, 67, 4524, 33, 7036, 4672, 309, 1034, 12, 14661, 652, 30, 652, 486, 316, 365, 18, 2725, 67, 2821,...
def _getMarker(self, hash_digest, bucket_marker, suffix=None):
def _getMarker(self, hash_digest, bucket_marker):
def _getMarker(self, hash_digest, bucket_marker, suffix=None): """Get an official marker.
bd0b7bdd142c27f424deb26d95d9e3e472e9c864 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9162/bd0b7bdd142c27f424deb26d95d9e3e472e9c864/cachemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 7078, 12, 2890, 16, 1651, 67, 10171, 16, 2783, 67, 11145, 4672, 3536, 967, 392, 3397, 22354, 5373, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 7078, 12, 2890, 16, 1651, 67, 10171, 16, 2783, 67, 11145, 4672, 3536, 967, 392, 3397, 22354, 5373, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
assert len(res.chars) == len(expected) for i in range(len(expected)): assert expected[i] == res.chars[i]
if self.type_system == 'ootype': assert res.ll_strlen() == len(expected) for i in range(len(expected)): assert expected[i] == res.ll_stritem_nonneg(i) else: assert len(res.chars) == len(expected) for i in range(len(expected)): assert expected[i] == res.chars[i]
def f(n): x = u'' while n > 13: myjitdriver.can_enter_jit(n=n, x=x) myjitdriver.jit_merge_point(n=n, x=x) x += unichr(n) n -= 1 # XXX check if we can cross the border here with unicode, # if not, sum elements or something return x
e6303a6617b893d12c9fdb82714bab69239d595e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/e6303a6617b893d12c9fdb82714bab69239d595e/test_loop.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 12, 82, 4672, 619, 273, 582, 6309, 1323, 290, 405, 5958, 30, 3399, 78, 305, 7407, 18, 4169, 67, 2328, 67, 78, 305, 12, 82, 33, 82, 16, 619, 33, 92, 13, 3399, 78, 305, 7407, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 12, 82, 4672, 619, 273, 582, 6309, 1323, 290, 405, 5958, 30, 3399, 78, 305, 7407, 18, 4169, 67, 2328, 67, 78, 305, 12, 82, 33, 82, 16, 619, 33, 92, 13, 3399, 78, 305, 7407, ...
for msg in msginfoDB.db:
for msg in msginfoDB.db.keys():
def CalculateStats(self): self.Reset() for msg in msginfoDB.db: self.total += 1 m = self.__empty_msg() m.id = msg msginfoDB._getState(m) if m.c == 's': self.cls_spam += 1 if m.t == 0: self.fp += 1 elif m.c == 'h': self.cls_ham += 1 if m.t == 1: self.fn += 1 elif m.c == 'u': self.cls_unsure += 1 if m.t == 0: self.trn_unsure_ham += 1 elif m.t == 1: self.trn_unsure_spam += 1 if m.t == 1: self.trn_spam += 1 elif m.t == 0: self.trn_ham += 1
468b84ad950c5cc0e000593c9529998a6827fac0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/468b84ad950c5cc0e000593c9529998a6827fac0/Stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9029, 4195, 12, 2890, 4672, 365, 18, 7013, 1435, 364, 1234, 316, 1234, 1376, 2290, 18, 1966, 18, 2452, 13332, 365, 18, 4963, 1011, 404, 312, 273, 365, 16186, 5531, 67, 3576, 1435, 312, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9029, 4195, 12, 2890, 4672, 365, 18, 7013, 1435, 364, 1234, 316, 1234, 1376, 2290, 18, 1966, 18, 2452, 13332, 365, 18, 4963, 1011, 404, 312, 273, 365, 16186, 5531, 67, 3576, 1435, 312, ...
date_invoice=False, payment_term=False, partner_bank=False, company_id=False)
date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False)
def onchange_partner_id(self, cr, uid, ids, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): """ Extend the onchange to use the supplier payment terms if this is a purchase invoice. """
c114971d9861378597aaa5c51fcbb4b0f9ecd0c1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9833/c114971d9861378597aaa5c51fcbb4b0f9ecd0c1/purchase_payment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 31993, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 618, 16, 19170, 67, 350, 16, 1509, 67, 16119, 33, 8381, 16, 5184, 67, 6408, 33, 8381, 16, 19170, 67, 10546,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3427, 67, 31993, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 618, 16, 19170, 67, 350, 16, 1509, 67, 16119, 33, 8381, 16, 5184, 67, 6408, 33, 8381, 16, 19170, 67, 10546,...
polygonize_3
polygonize_3, polygonize_4
def polygonize_3(): if not gdaltest.have_ng: return 'skip' src_ds = gdal.Open('data/polygonize_in_2.grd') src_band = src_ds.GetRasterBand(1) # Create a memory OGR datasource to put results in. mem_drv = ogr.GetDriverByName( 'Memory' ) mem_ds = mem_drv.CreateDataSource( 'out' ) mem_layer = mem_ds.CreateLayer( 'poly', None, ogr.wkbPolygon ) fd = ogr.FieldDefn( 'DN', ogr.OFTInteger ) mem_layer.CreateField( fd ) # run the algorithm. result = gdal.Polygonize( src_band, None, mem_layer, 0 ) # Confirm we get the expected count of features. expected_feature_number = 125 if mem_layer.GetFeatureCount() != expected_feature_number: gdaltest.post_reason( 'GetFeatureCount() returned %d instead of %d' % (mem_layer.GetFeatureCount(), expected_feature_number) ) return 'fail' # check at least one geometry. mem_layer.SetAttributeFilter( 'dn = 0' ) feat_read = mem_layer.GetNextFeature() if ogrtest.check_feature_geometry( feat_read, 'POLYGON ((6 -3,6 -40,19 -40,19 -39,24 -39,25 -39,25 -38,26 -38,27 -38,27 -37,28 -37,28 -36,29 -36,29 -35,30 -35,30 -34,31 -34,31 -25,30 -25,30 -24,29 -24,29 -23,28 -23,28 -22,27 -22,27 -21,24 -21,24 -20,23 -20,23 -19,25 -19,26 -19,26 -18,27 -18,27 -17,28 -17,28 -16,29 -16,29 -8,28 -8,28 -7,27 -7,27 -6,26 -6,26 -5,24 -5,24 -4,18 -4,18 -3,6 -3),(24 -35,25 -35,26 -35,26 -33,27 -33,27 -25,26 -25,26 -23,24 -23,24 -22,11 -22,11 -36,24 -36,24 -35),(11 -7,11 -18,23 -18,23 -17,24 -17,24 -16,25 -16,25 -9,24 -9,24 -8,23 -8,23 -7,11 -7))' ) != 0: print(feat_read.GetGeometryRef().ExportToWkt()) tr = 0 else: tr = 1 feat_read.Destroy() if tr: return 'success' else: return 'fail'
c31eb04319d242143eee913a4bc63c4a5caeb43c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/c31eb04319d242143eee913a4bc63c4a5caeb43c/polygonize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7154, 554, 67, 23, 13332, 225, 309, 486, 15551, 2390, 395, 18, 21516, 67, 3368, 30, 327, 296, 7457, 11, 225, 1705, 67, 2377, 273, 15551, 287, 18, 3678, 2668, 892, 19, 20917, 554, 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, 7154, 554, 67, 23, 13332, 225, 309, 486, 15551, 2390, 395, 18, 21516, 67, 3368, 30, 327, 296, 7457, 11, 225, 1705, 67, 2377, 273, 15551, 287, 18, 3678, 2668, 892, 19, 20917, 554, 67, ...
try: if name[:1]!='_': validate=md.validate if validate is None: return hasattr(inst, name) if hasattr(inst,'aq_acquire'): inst.aq_acquire(name, validate, md) return 1 v=getattr(inst, name) if validate(inst,inst,name,v,md): return 1 except: pass
v=getattr(inst, name, _marker) if v is not _marker: try: if name[:1]!='_': validate=md.validate if validate is None: return 1 if hasattr(inst,'aq_acquire'): inst.aq_acquire(name, validate, md) return 1 if validate(inst,inst,name,v,md): return 1 except: pass
def careful_hasattr(md, inst, name): try: if name[:1]!='_': validate=md.validate if validate is None: return hasattr(inst, name) if hasattr(inst,'aq_acquire'): inst.aq_acquire(name, validate, md) return 1 v=getattr(inst, name) if validate(inst,inst,name,v,md): return 1 except: pass return 0
d6d04ede0005685b7d1e022a0868ff1a187f764e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d6d04ede0005685b7d1e022a0868ff1a187f764e/DT_Util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26850, 67, 5332, 1747, 12, 1264, 16, 1804, 16, 508, 4672, 331, 33, 588, 1747, 12, 8591, 16, 508, 16, 389, 11145, 13, 309, 331, 353, 486, 389, 11145, 30, 775, 30, 309, 508, 10531, 21,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26850, 67, 5332, 1747, 12, 1264, 16, 1804, 16, 508, 4672, 331, 33, 588, 1747, 12, 8591, 16, 508, 16, 389, 11145, 13, 309, 331, 353, 486, 389, 11145, 30, 775, 30, 309, 508, 10531, 21,...
return elif potiontype in [ 0 ]: nightsightPotion( char, potion ) return
return OK elif potiontype in [ 18, 19 ]: refreshPotion( char, item, potiontype ) return OK
def onUse( char, item ): socket = char.socket # Potions need to be on your body to use them, or in arms reach. if item.getoutmostchar() != char: char.message( "This potion is out of your reach..." ) return # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( 'potiontype' ) # Make sure it's in the index if not potiontype in potions: return OOPS # Do we throw this thing? if potions[ potiontype ][ POT_TARGET ] == TRUE: # Explosion Potion if potiontype in [ 11, 12, 13 ]: # char, potion, counter value potionexplosion( [ char.serial, item.serial, 4 ] ) socket.sysmessage( 'Please select a target...', RED ) socket.attachtarget( "potions.targetexplosionpotion", [ item ] ) return # We just drink this potion... else: # If it's a drinkable potion we check if there is a free hand. if not canUsePotion( char, item ): return OOPS # Heal Potions if potiontype in [ 1, 2, 3 ]: if char.hastag('poisoned'): # You can not heal yourself in your current state. char.socket.clilocmessage(1005000) return OOPS if char.hitpoints >= char.maxhitpoints: # You decide against drinking this potion, as you are already at full health. char.socket.clilocmessage(1049547) else: healPotion(char, item, potiontype) return # Cure Potions elif potiontype in [ 4, 5, 6 ]: socket.sysmessage('Drinking a cure potion.') return # Agility Potions elif potiontype in [ 7, 8 ]: if not char.hastag('agility_effect'): agilityPotion(char, item, potiontype) else: # You are already under a similar effect. char.socket.clilocmessage(502173) return # Strength Potions elif potiontype in [ 9, 10 ]: if not char.hastag( 'strength_effect' ): strengthPotion( char, item, potiontype ) else: # You are already under a similar effect. char.socket.clilocmessage( 502173, '', GRAY ) return # Poison Potions elif potiontype in [ 14, 15, 16, 17 ]: poisonPotion( char, item, potiontype ) return # Nightsight Potions elif potiontype in [ 0 ]: nightsightPotion( char, potion ) return # Not Known else: socket.sysmessage( 'Unknown potion...' ) return
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3727, 12, 1149, 16, 761, 262, 30, 2987, 273, 1149, 18, 7814, 468, 23435, 1115, 1608, 358, 506, 603, 3433, 1417, 358, 999, 2182, 16, 578, 316, 419, 959, 9287, 18, 309, 761, 18, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3727, 12, 1149, 16, 761, 262, 30, 2987, 273, 1149, 18, 7814, 468, 23435, 1115, 1608, 358, 506, 603, 3433, 1417, 358, 999, 2182, 16, 578, 316, 419, 959, 9287, 18, 309, 761, 18, 5...
skin = skin_module('fvl.cimarron.skin')
skin = _lazy_skin_module('<lazy>')
def __getattr__(self, attr): # are we a hack, or what? _config() for k in self.__dict__: if k not in skin.__dict__: del self.__dict__[k] for k, v in skin.__dict__.items(): self.__dict__[k] = v return getattr(skin, attr)
0608e997a7f3bd9b68488e833d77bec700177cea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2750/0608e997a7f3bd9b68488e833d77bec700177cea/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 1604, 4672, 468, 854, 732, 279, 11769, 16, 578, 4121, 35, 389, 1425, 1435, 364, 417, 316, 365, 16186, 1576, 972, 30, 309, 417, 486, 316, 18705, 1618...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 1604, 4672, 468, 854, 732, 279, 11769, 16, 578, 4121, 35, 389, 1425, 1435, 364, 417, 316, 365, 16186, 1576, 972, 30, 309, 417, 486, 316, 18705, 1618...
typename = typedesc.name if _is_only_paragraph(fieldbody):
if _is_single_paragraph(fieldbody):
def transform(self, node): """Transform a single field list *node*.""" typemap = self.typemap
f78f0e616faaac1c878d4830729d38c5d3618bbf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/f78f0e616faaac1c878d4830729d38c5d3618bbf/docfields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 12, 2890, 16, 756, 4672, 3536, 4059, 279, 2202, 652, 666, 380, 2159, 14, 12123, 618, 1458, 273, 365, 18, 723, 1458, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 12, 2890, 16, 756, 4672, 3536, 4059, 279, 2202, 652, 666, 380, 2159, 14, 12123, 618, 1458, 273, 365, 18, 723, 1458, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
cache.points = cache.tri = cache.stars = cache.dts = cache.deltas = cache.findNearest = cache.attrStat = None
cache.points = cache.tri = cache.stars = cache.dts = cache.deltas = cache.errors = cache.findNearest = cache.attrStat = None
def clearCache(cache): cache.points = cache.tri = cache.stars = cache.dts = cache.deltas = cache.findNearest = cache.attrStat = None
45c3545d7cec5ecfb8951397d1a6a5002a7e27f7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/45c3545d7cec5ecfb8951397d1a6a5002a7e27f7/orngPade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19346, 12, 2493, 4672, 1247, 18, 4139, 273, 1247, 18, 16857, 273, 1247, 18, 334, 5913, 273, 1247, 18, 72, 3428, 273, 1247, 18, 3771, 9158, 273, 1247, 18, 4324, 273, 1247, 18, 4720, 280...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19346, 12, 2493, 4672, 1247, 18, 4139, 273, 1247, 18, 16857, 273, 1247, 18, 334, 5913, 273, 1247, 18, 72, 3428, 273, 1247, 18, 3771, 9158, 273, 1247, 18, 4324, 273, 1247, 18, 4720, 280...
"""Set commuication parameters on opened port."""
"""Set communication parameters on opened port."""
def _reconfigurePort(self): """Set commuication parameters on opened port.""" if not self._port_handle: raise SerialException("Can only operate on a valid port handle") self.ReceivedBytesThreshold = 1 if self._timeout is None: self._port_handle.ReadTimeout = System.IO.Ports.SerialPort.InfiniteTimeout else: self._port_handle.ReadTimeout = int(self._timeout*1000) # if self._timeout != 0 and self._interCharTimeout is not None: # timeouts = (int(self._interCharTimeout * 1000),) + timeouts[1:] if self._writeTimeout is None: pass else: self._port_handle.WriteTimeout = int(self._writeTimeout*1000)
d40fa4acd709af2126b92f5562e2ffdd28a1926e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10955/d40fa4acd709af2126b92f5562e2ffdd28a1926e/serialcli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 266, 14895, 2617, 12, 2890, 4672, 3536, 694, 18279, 1472, 603, 10191, 1756, 12123, 309, 486, 365, 6315, 655, 67, 4110, 30, 1002, 7366, 503, 2932, 2568, 1338, 20829, 603, 279, 923, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 266, 14895, 2617, 12, 2890, 4672, 3536, 694, 18279, 1472, 603, 10191, 1756, 12123, 309, 486, 365, 6315, 655, 67, 4110, 30, 1002, 7366, 503, 2932, 2568, 1338, 20829, 603, 279, 923, 1...
util.redirect(req, req.uri + "/", permanent=True)
redirect_to_url(req, req.uri + "/", apache.HTTP_MOVED_PERMANENTLY)
def __call__(self, req, form): """ Maybe resolve the final / of a directory """
34e3759fd8d988daf736478f488636d4ab5bc8a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2111/34e3759fd8d988daf736478f488636d4ab5bc8a2/webinterface_handler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1111, 16, 646, 4672, 3536, 14024, 2245, 326, 727, 342, 434, 279, 1867, 3536, 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, 1001, 1991, 972, 12, 2890, 16, 1111, 16, 646, 4672, 3536, 14024, 2245, 326, 727, 342, 434, 279, 1867, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
To: Number Field in a1 with defining polynomial x^6 + 40*x^3 + 1372 Defn: a |--> 1/84*a1^4 + 13/42*a1
To: Number Field in b1 with defining polynomial x^6 + 40*x^3 + 1372 Defn: a |--> 1/84*b1^4 + 13/42*b1
def embeddings(self, K): """ Compute all field embeddings of self into the field K (which need not even be a number field, e.g., it could be the complex numbers). This will return an identical result when given K as input again.
784200f2a3ff3d4233420ed54fe6f8d34956a300 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/784200f2a3ff3d4233420ed54fe6f8d34956a300/number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4724, 24715, 12, 2890, 16, 1475, 4672, 3536, 8155, 777, 652, 4724, 24715, 434, 365, 1368, 326, 652, 1475, 261, 12784, 1608, 486, 5456, 506, 279, 1300, 652, 16, 425, 18, 75, 12990, 518, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4724, 24715, 12, 2890, 16, 1475, 4672, 3536, 8155, 777, 652, 4724, 24715, 434, 365, 1368, 326, 652, 1475, 261, 12784, 1608, 486, 5456, 506, 279, 1300, 652, 16, 425, 18, 75, 12990, 518, ...
try: import profile
try: from profile import Profile
def _profile(): try: import profile except ImportError: print >>sys.stderr, "Could not import profile module!" return try: prof = profile.Profile() prof = prof.runctx('main(*parse_arguments())', globals(), {}) except SystemExit: pass prof.dump_stats('profile.out') return # Use the pstats statistical browser. This is made unnecessarily # difficult because the whole browser is wrapped in an # if __name__=='__main__' clause. try: import pstats except ImportError: log.error("Could not import pstats -- skipping browser") try: pstats_pyfile = os.path.splitext(pstats.__file__)[0]+'.py' sys.argv = ['pstats.py', 'profile.out'] print execfile(pstats_pyfile, {'__name__':'__main__'}) except: print 'Could not run the pstats browser' print 'Profiling output is in "profile.out"'
6e2aadf61c63286b571a4b05dbd3362a386ab72e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/6e2aadf61c63286b571a4b05dbd3362a386ab72e/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5040, 13332, 775, 30, 628, 3042, 1930, 11357, 1335, 11308, 30, 1172, 1671, 9499, 18, 11241, 16, 315, 4445, 486, 1930, 3042, 1605, 4442, 327, 775, 30, 9214, 273, 3042, 18, 4029, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5040, 13332, 775, 30, 628, 3042, 1930, 11357, 1335, 11308, 30, 1172, 1671, 9499, 18, 11241, 16, 315, 4445, 486, 1930, 3042, 1605, 4442, 327, 775, 30, 9214, 273, 3042, 18, 4029, 1435...
if m.has_key('OriginalFileName'): file_name, ext = os.path.splitext(m['OriginalFileName']) file_name = file_name + mimetypes.guess_extension(mimetype) file_name = os.path.join(path, file_name) else: file_name = os.path.join(path, key_name)
file_name = os.path.join(path, key_name)
def get_result(self, path, delete_msg=True, get_file=True): q = self.get_queue(self.output_queue_name) m = q.read() if m: if get_file: outputs = m['OutputKey'].split(',') for output in outputs: key_name, type = output.split(';') if type: mimetype = type.split('=')[1] bucket = self.get_bucket(m['Bucket']) key = bucket.lookup(key_name) if m.has_key('OriginalFileName'): file_name, ext = os.path.splitext(m['OriginalFileName']) file_name = file_name + mimetypes.guess_extension(mimetype) file_name = os.path.join(path, file_name) else: file_name = os.path.join(path, key_name) print 'retrieving file: %s to %s' % (key_name, file_name) key.get_contents_to_filename(file_name) if delete_msg: q.delete_message(m) return m
48b9f392bcbc4a7ea6c31710206d637d024b727a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/48b9f392bcbc4a7ea6c31710206d637d024b727a/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2088, 12, 2890, 16, 589, 16, 1430, 67, 3576, 33, 5510, 16, 336, 67, 768, 33, 5510, 4672, 1043, 273, 365, 18, 588, 67, 4000, 12, 2890, 18, 2844, 67, 4000, 67, 529, 13, 312,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2088, 12, 2890, 16, 589, 16, 1430, 67, 3576, 33, 5510, 16, 336, 67, 768, 33, 5510, 4672, 1043, 273, 365, 18, 588, 67, 4000, 12, 2890, 18, 2844, 67, 4000, 67, 529, 13, 312,...
"""DirList - Directory Listing in a hierarchical view.
"""DirTree - Directory Listing in a hierarchical view. Displays a tree view of a directory, its previous directories and its sub-directories. The user can choose one of the directories displayed in the list or change to another directory.
def chdir(self, dir): self.tk.call(self._w, 'chdir', dir)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14029, 12, 2890, 16, 1577, 4672, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 343, 1214, 2187, 1577, 13, 2, 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, 14029, 12, 2890, 16, 1577, 4672, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 343, 1214, 2187, 1577, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
AddCmd('DeletePage', _("Delete Page..."), 'DeletePage', subscribe_to = UNDO, sensitive_cb = ('document','CanBePageDeleting')) AddCmd('NextPage', _("Next Page"), 'NextPage', key_stroke = ('PgDn', 'Next', 'KP_Next')) AddCmd('PreviousPage', _("Previous Page"), 'PreviousPage', key_stroke = ('PgUp', 'Prior', 'KP_Prior'))
AddCmd('DeletePage', _("Delete Page..."), 'DeletePage', subscribe_to=UNDO, sensitive_cb=('document', 'CanBePageDeleting')) AddCmd('NextPage', _("Next Page"), 'NextPage', key_stroke=('PgDn', 'Next', 'KP_Next')) AddCmd('PreviousPage', _("Previous Page"), 'PreviousPage', key_stroke=('PgUp', 'Prior', 'KP_Prior'))
def GotoPage(self): from dialogs.gotopagedlg import gotopgDialog gotopgDialog(self.root) import time time.sleep(.1) self.document.SelectNone() self.canvas.ForceRedraw()
5bd05aab08ecc99debb8be46af1003105e4183ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5bd05aab08ecc99debb8be46af1003105e4183ab/mainwindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 611, 6302, 1964, 12, 2890, 4672, 628, 7609, 14072, 18, 13212, 556, 11349, 23623, 1930, 2363, 556, 75, 6353, 2363, 556, 75, 6353, 12, 2890, 18, 3085, 13, 1930, 813, 813, 18, 19607, 10604,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 611, 6302, 1964, 12, 2890, 4672, 628, 7609, 14072, 18, 13212, 556, 11349, 23623, 1930, 2363, 556, 75, 6353, 2363, 556, 75, 6353, 12, 2890, 18, 3085, 13, 1930, 813, 813, 18, 19607, 10604,...
def writexml(self, writer): _write_data(writer, self.data)
def writexml(self, writer, indent="", addindent="", newl=""): _write_data(writer, "%s%s%s"%(indent, self.data, newl))
def writexml(self, writer): _write_data(writer, self.data)
285ed3c7ae8ea988a1c52e6518da14f1d21e7e83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/285ed3c7ae8ea988a1c52e6518da14f1d21e7e83/minidom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2518, 338, 781, 12, 2890, 16, 2633, 4672, 389, 2626, 67, 892, 12, 6299, 16, 365, 18, 892, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2518, 338, 781, 12, 2890, 16, 2633, 4672, 389, 2626, 67, 892, 12, 6299, 16, 365, 18, 892, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
sage: prime_divisors(1) [] sage: prime_divisors(100) [2, 5] sage: prime_divisors(-100) [2, 5] sage: prime_divisors(2004) [2, 3, 167]
EXAMPLES: sage: prime_divisors(1) [] sage: prime_divisors(100) [2, 5] sage: prime_divisors(-100) [2, 5] sage: prime_divisors(2004) [2, 3, 167]
def prime_divisors(n): """ The prime divisors of the integer n, sorted in increasing order. If n is negative, we do *not* include -1 among the prime divisors, since -1 is not a prime number. sage: prime_divisors(1) [] sage: prime_divisors(100) [2, 5] sage: prime_divisors(-100) [2, 5] sage: prime_divisors(2004) [2, 3, 167] """ v = [p for p,_ in factor(n) if p != -1] v.sort() return v
9cb8022cb93799d5c217c82ca374a16d3f34196e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/9cb8022cb93799d5c217c82ca374a16d3f34196e/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17014, 67, 2892, 291, 1383, 12, 82, 4672, 3536, 1021, 17014, 3739, 291, 1383, 434, 326, 3571, 290, 16, 3115, 316, 21006, 1353, 18, 225, 971, 290, 353, 6092, 16, 732, 741, 380, 902, 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, 17014, 67, 2892, 291, 1383, 12, 82, 4672, 3536, 1021, 17014, 3739, 291, 1383, 434, 326, 3571, 290, 16, 3115, 316, 21006, 1353, 18, 225, 971, 290, 353, 6092, 16, 732, 741, 380, 902, 14,...
return email.Utils.parseaddr(uni_addr)
return email.Utils.parseaddr(uni_addr)[1].encode('us-ascii')
def parseaddr(addr): ''' decode header to unicode and aprse it ''' uni_addr = [] for chunk, charset in email.Header.decode_header(addr): if charset: uni_addr += unicode(chunk, charset) else: uni_addr += chunk uni_addr = u''.join(uni_addr) return email.Utils.parseaddr(uni_addr)
41ad40294cd72033ab26cfd6018137186773b2bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1871/41ad40294cd72033ab26cfd6018137186773b2bc/qMail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4793, 12, 4793, 4672, 9163, 2495, 1446, 358, 5252, 471, 513, 86, 307, 518, 9163, 7738, 67, 4793, 273, 5378, 364, 2441, 16, 4856, 316, 2699, 18, 1864, 18, 3922, 67, 3374, 12, 4793...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4793, 12, 4793, 4672, 9163, 2495, 1446, 358, 5252, 471, 513, 86, 307, 518, 9163, 7738, 67, 4793, 273, 5378, 364, 2441, 16, 4856, 316, 2699, 18, 1864, 18, 3922, 67, 3374, 12, 4793...
tm.add(_monitorDoLater, 'monitorDoLater')
tm.add(_monitorDoLater, 'monitorDoLater', priority=10)
def _monitorDoLater(task, tm=tm, l=l, doLaterTests=doLaterTests): if task.time > .03: assert l == [1, 2,] doLaterTests[0] -= 1 return task.done return task.cont
d0c4d4f8fc308811e5e29043a0ac1583739f959c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8543/d0c4d4f8fc308811e5e29043a0ac1583739f959c/Task.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10259, 3244, 20607, 12, 4146, 16, 6118, 33, 16925, 16, 328, 33, 80, 16, 741, 20607, 14650, 33, 2896, 20607, 14650, 4672, 309, 1562, 18, 957, 405, 263, 4630, 30, 1815, 328, 422, 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, 10259, 3244, 20607, 12, 4146, 16, 6118, 33, 16925, 16, 328, 33, 80, 16, 741, 20607, 14650, 33, 2896, 20607, 14650, 4672, 309, 1562, 18, 957, 405, 263, 4630, 30, 1815, 328, 422, 30...
query = '''SELECT name FROM vw_gazetteer_c5000 WHERE id=%d ORDER BY (lang='en' and lang is not null) DESC,
query = '''SELECT name FROM vw_gazetteer_c5000_tng WHERE id=%d ORDER BY (lang='en' and lang is not null) DESC, (short=TRUE and short IS NOT NULL) DESC,
def __getPreferredGeoName(self, id): """ returns the preferred entry name for the given entity id @param[in] entity_id @returns the geo entity's name """
31b95f3e508dcf10a5f9fecbf7f3df3be977f7ec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6604/31b95f3e508dcf10a5f9fecbf7f3df3be977f7ec/georesolve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 16028, 12447, 461, 12, 2890, 16, 612, 4672, 3536, 1135, 326, 9119, 1241, 508, 364, 326, 864, 1522, 612, 632, 891, 63, 267, 65, 1522, 67, 350, 632, 6154, 326, 7856, 1522, 180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 16028, 12447, 461, 12, 2890, 16, 612, 4672, 3536, 1135, 326, 9119, 1241, 508, 364, 326, 864, 1522, 612, 632, 891, 63, 267, 65, 1522, 67, 350, 632, 6154, 326, 7856, 1522, 180...
result_proxy = c.execute(query_string) rows = result_proxy.fetchall()
rows = [] nselects = 0 desc = None for qs in [x for x in query_string.split('\0') if x]: if query_data: proxy = c.execute(qs, query_data) else: proxy = c.execute(qs) description = proxy.cursor.description if description is not None: nselects += 1 if nselects > 1: raise ValueError("Can't execute multiple SELECTs within a single query") if max_rows: rows = proxy.fetchmany(max_rows) else: rows = proxy.fetchall() desc = description if desc is None: return [], None
def query(self, query_string, max_rows=None, query_data=None): """ foo """
47f34379ee083a1c22cf9aa3596ee0adbffbbc22 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6817/47f34379ee083a1c22cf9aa3596ee0adbffbbc22/da.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 12, 2890, 16, 843, 67, 1080, 16, 943, 67, 3870, 33, 7036, 16, 843, 67, 892, 33, 7036, 4672, 3536, 8431, 3536, 2, 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, 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, 843, 12, 2890, 16, 843, 67, 1080, 16, 943, 67, 3870, 33, 7036, 16, 843, 67, 892, 33, 7036, 4672, 3536, 8431, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
isinsert = not has_identity and not postupdate and state not in row_switches
isinsert = not has_identity and \ not postupdate and \ not row_switch
def _save_obj(self, states, uowtransaction, postupdate=False, post_update_cols=None, single=False): """Issue ``INSERT`` and/or ``UPDATE`` statements for a list of objects.
dfab13e9ae147a7112a23db5abc4e4b7addc00fa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/dfab13e9ae147a7112a23db5abc4e4b7addc00fa/mapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 2603, 12, 2890, 16, 5493, 16, 18215, 7958, 16, 1603, 2725, 33, 8381, 16, 1603, 67, 2725, 67, 6842, 33, 7036, 16, 2202, 33, 8381, 4672, 3536, 12956, 12176, 11356, 10335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 5688, 67, 2603, 12, 2890, 16, 5493, 16, 18215, 7958, 16, 1603, 2725, 33, 8381, 16, 1603, 67, 2725, 67, 6842, 33, 7036, 16, 2202, 33, 8381, 4672, 3536, 12956, 12176, 11356, 10335, ...
print "Pushed result"
def callPrimitiveAndPush(self, primitive, selector, argcount, interp): try: print "Pushing result" self.push(primitives.prim_table[primitive](self)) print "Pushed result" except primitives.PrimitiveFailedError: print "Falling back to smalltalk version" self._sendSelfSelector(selector, argcount, interp) print "Fallback succeeded"
1adbd8118e74e31856b14248f8917ad10e12f25a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/1adbd8118e74e31856b14248f8917ad10e12f25a/interpreter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 9840, 1876, 7621, 12, 2890, 16, 8225, 16, 3451, 16, 1501, 1883, 16, 8174, 4672, 775, 30, 1172, 315, 7621, 310, 563, 6, 365, 18, 6206, 12, 683, 18116, 18, 30438, 67, 2121, 63, 68...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 9840, 1876, 7621, 12, 2890, 16, 8225, 16, 3451, 16, 1501, 1883, 16, 8174, 4672, 775, 30, 1172, 315, 7621, 310, 563, 6, 365, 18, 6206, 12, 683, 18116, 18, 30438, 67, 2121, 63, 68...
'Weight': 'regular',
'Weight': 'Regular',
def guess_fontinfo (filename): fi = { 'FontName': filename, 'FamilyName': filename, 'Weight': 'regular', 'ItalicAngle': 0, 'FullName': filename, } if re.search ('^cm', filename): fi.update (cm_guess_font_info (filename)) return fi if read_afm_p: global afmfile if not afmfile: afmfile = find_file (filename + '.afm') if afmfile: afmfile = os.path.abspath (afmfile) afm_struct = afm.read_afm_file (afmfile) fi.update (afm_struct.__dict__) return fi
dfdd47ac4957b0e437c434b79c7589ca35658d7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11856/dfdd47ac4957b0e437c434b79c7589ca35658d7b/mftrace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7274, 67, 5776, 1376, 261, 3459, 4672, 225, 7314, 273, 288, 296, 5711, 461, 4278, 1544, 16, 296, 9203, 461, 4278, 1544, 16, 296, 6544, 4278, 296, 17974, 2187, 296, 7193, 21466, 8467, 427...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7274, 67, 5776, 1376, 261, 3459, 4672, 225, 7314, 273, 288, 296, 5711, 461, 4278, 1544, 16, 296, 9203, 461, 4278, 1544, 16, 296, 6544, 4278, 296, 17974, 2187, 296, 7193, 21466, 8467, 427...
self.check_sizeof(unittest, size(h + 'P')) self.check_sizeof(xrange(1), size(h + '3l'))
check(unittest, size(h + 'P')) check(None, size(h + '')) check(object(), size(h + '')) class C(object): def getx(self): return self.__x def setx(self, value): self.__x = value def delx(self): del self.__x x = property(getx, setx, delx, "") check(x, size(h + '4Pi')) check(iter(xrange(1)), size(h + '4l')) check(reversed(''), size(h + 'PP'))
def get_gen(): yield 1
c700714ccabb5f69025ec56a9f27a4d3f1c4ffa0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/c700714ccabb5f69025ec56a9f27a4d3f1c4ffa0/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4507, 13332, 2824, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4507, 13332, 2824, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
f = open(name, "rb")
f = _open(name, "rb")
def add(self, name, arcname=None, recursive=True): """Add the file `name' to the archive. `name' may be any type of file (directory, fifo, symbolic link, etc.). If given, `arcname' specifies an alternative name for the file in the archive. Directories are added recursively by default. This can be avoided by setting `recursive' to False. """ self._check("aw")
8f78fe9a10c24706b04d07be9149d84aa6016db7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8f78fe9a10c24706b04d07be9149d84aa6016db7/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 508, 16, 8028, 529, 33, 7036, 16, 5904, 33, 5510, 4672, 3536, 986, 326, 585, 1375, 529, 11, 358, 326, 5052, 18, 1375, 529, 11, 2026, 506, 1281, 618, 434, 585, 261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 508, 16, 8028, 529, 33, 7036, 16, 5904, 33, 5510, 4672, 3536, 986, 326, 585, 1375, 529, 11, 358, 326, 5052, 18, 1375, 529, 11, 2026, 506, 1281, 618, 434, 585, 261,...
key2 = win32api.RegOpenKey(key, str(iid))
try: key2 = win32api.RegOpenKey(key, str(iid)) except win32api.error: continue
def EnumTlbs(excludeFlags = 0): """Return a list of TypelibSpec objects, one for each registered library. """ key = win32api.RegOpenKey(win32con.HKEY_CLASSES_ROOT, "Typelib") iids = EnumKeys(key) results = [] for iid, crap in iids: key2 = win32api.RegOpenKey(key, str(iid)) for version, tlbdesc in EnumKeys(key2): major_minor = string.split(version, '.', 1) if len(major_minor) < 2: major_minor.append('0') try: # For some reason, this code used to assume the values were hex. # This seems to not be true - particularly for CDO 1.21 # *sigh* - it appears there are no rules here at all, so when we need # to know the info, we must load the tlb by filename and request it. # The Resolve() method on the TypelibSpec does this. major = int(major_minor[0]) minor = int(major_minor[1]) except ValueError: # crap in the registry! continue key3 = win32api.RegOpenKey(key2, str(version)) try: # The "FLAGS" are at this point flags = int(win32api.RegQueryValue(key3, "FLAGS")) except (win32api.error, ValueError): flags = 0 if flags & excludeFlags==0: for lcid, crap in EnumKeys(key3): try: lcid = int(lcid) except ValueError: # crap in the registry! continue # Only care about "{lcid}\win32" key - jump straight there. try: key4 = win32api.RegOpenKey(key3, "%s\win32" % (lcid,)) except win32api.error: continue try: dll = win32api.RegQueryValue(key4, None) except win32api.error: dll = None spec = TypelibSpec(iid, lcid, major, minor, flags) spec.dll = dll spec.desc = tlbdesc spec.ver_desc = tlbdesc + " (" + version + ")" results.append(spec) return results
f71cee684863cce3b83790c73f56bc5713e0c3a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/f71cee684863cce3b83790c73f56bc5713e0c3a7/selecttlb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6057, 56, 80, 2038, 12, 10157, 5094, 273, 374, 4672, 3536, 990, 279, 666, 434, 16973, 30575, 1990, 2184, 16, 1245, 364, 1517, 4104, 5313, 18, 3536, 498, 273, 5657, 1578, 2425, 18, 1617, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6057, 56, 80, 2038, 12, 10157, 5094, 273, 374, 4672, 3536, 990, 279, 666, 434, 16973, 30575, 1990, 2184, 16, 1245, 364, 1517, 4104, 5313, 18, 3536, 498, 273, 5657, 1578, 2425, 18, 1617, ...
self.assert_(folder1.get_string(folder1.keys()[0]) == \ self._template % 'bar')
self.assertEqual(folder1.get_string(folder1.keys()[0]), self._template % 'bar')
def dummy_factory (s): return None
7731c36bc6f787ca91b8429603fe004822f1f2d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/7731c36bc6f787ca91b8429603fe004822f1f2d8/test_mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9609, 67, 6848, 261, 87, 4672, 327, 599, 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, 9609, 67, 6848, 261, 87, 4672, 327, 599, 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, ...
elif isinstance(errors, (dict)):
elif isinstance(errors, (list)):
def addErrors(self, errors): """Adds an dict, list or ValidPieErrorSchema of errors""" if isinstance(errors, (ValidPieErrorSchema)): for error in errors.getGlobalErrors(): self.addError(error) for name, error in errors.getNamedErrors().iteritems(): self.addError(error, name) elif isinstance(errors, (dict)): for name, error in errors.iteritems(): self.addError(error, name) elif isinstance(errors, (dict)): for error in errors: self.addErropr(error)
5cb1d6127e3f53091275a3e0550b8c4d3109f97d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6662/5cb1d6127e3f53091275a3e0550b8c4d3109f97d/ValidPieErrorSchema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 4229, 12, 2890, 16, 1334, 4672, 3536, 3655, 392, 2065, 16, 666, 578, 2364, 52, 1385, 668, 3078, 434, 1334, 8395, 309, 1549, 12, 4324, 16, 261, 1556, 52, 1385, 668, 3078, 3719, 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, 527, 4229, 12, 2890, 16, 1334, 4672, 3536, 3655, 392, 2065, 16, 666, 578, 2364, 52, 1385, 668, 3078, 434, 1334, 8395, 309, 1549, 12, 4324, 16, 261, 1556, 52, 1385, 668, 3078, 3719, 30,...