rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
expected_ = ("operator.isCallable() is not supported in 3.x. " "Use hasattr(obj, '__call__').")
callable_warn = ("operator.isCallable() is not supported in 3.x. " "Use hasattr(obj, '__call__').")
def test_operator(self): from operator import isCallable, sequenceIncludes
a334478889205ebeb85607aa16518fff28d801c6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/a334478889205ebeb85607aa16518fff28d801c6/test_py3kwarn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9497, 12, 2890, 4672, 628, 3726, 1930, 353, 11452, 16, 3102, 16815, 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, 1842, 67, 9497, 12, 2890, 4672, 628, 3726, 1930, 353, 11452, 16, 3102, 16815, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
extra_link_args=['-framework', 'QuickTime']) )
extra_link_args=['-framework', 'QuickTime', '-framework', 'Carbon']) )
def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.insert(0, '/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' )
666b1e7e2f929af06fdfd074304a727f3dc5ed12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/666b1e7e2f929af06fdfd074304a727f3dc5ed12/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 30, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 30, 365, ...
self.saved_clear() self.hrefstack.append(href) def anchor_end(self): if self.proc: title = cgi.escape(self.saved_get(), True) path = self.path + '/' + self.hrefstack.pop()
def anchor_bgn(self, href, name, type): if self.proc: self.saved_clear() self.hrefstack.append(href)
5221551d12d62f85dc9e940573c27e24e0bd4d77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5221551d12d62f85dc9e940573c27e24e0bd4d77/prechm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6984, 67, 70, 1600, 12, 2890, 16, 3897, 16, 508, 16, 618, 4672, 309, 365, 18, 9381, 30, 365, 18, 14077, 67, 8507, 1435, 365, 18, 7547, 3772, 18, 6923, 12, 7547, 13, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6984, 67, 70, 1600, 12, 2890, 16, 3897, 16, 508, 16, 618, 4672, 309, 365, 18, 9381, 30, 365, 18, 14077, 67, 8507, 1435, 365, 18, 7547, 3772, 18, 6923, 12, 7547, 13, 2, -100, -100, ...
if event.transparency == "confirmed"]
if event.transparency == "confirmed"]
def wxSynchronizeWidget(self): # We now want the preview area to always appear. If the # calendar is visible, however, we always want the preview # area to describe today, rather than the currently selected # day. minical = Block.Block.findBlockByName("MiniCalendar") if isMainCalendarVisible() or not minical: self.useToday = True today = datetime.today() startDay = datetime.combine(today, time(0)) else: self.useToday = False startDay = minical.widget.getSelectedDate() startDay = startDay.replace(tzinfo=ICUtzinfo.default) range = (startDay, startDay + one_day)
963ff78e3f9310cc4d935d50e809e7a42c1bb425 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/963ff78e3f9310cc4d935d50e809e7a42c1bb425/CalendarBlocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7075, 19298, 554, 4609, 12, 2890, 4672, 468, 1660, 2037, 2545, 326, 10143, 5091, 358, 3712, 9788, 18, 225, 971, 326, 468, 5686, 353, 6021, 16, 14025, 16, 732, 3712, 2545, 326, 10143, 468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7075, 19298, 554, 4609, 12, 2890, 4672, 468, 1660, 2037, 2545, 326, 10143, 5091, 358, 3712, 9788, 18, 225, 971, 326, 468, 5686, 353, 6021, 16, 14025, 16, 732, 3712, 2545, 326, 10143, 468...
if newSize >= minMergeFileSize: if newSize < maxMergeFileSize: selectedSet.append(files[leftIndex][0]) totalSize = newSize break break
if newSize < maxMergeFileSize: selectedSet.append(files[leftIndex][0]) totalSize = newSize
def selectFiles(self, forceMerge): """ _selectFiles_ Select a set of files to be merged based on a selection policy. Currently, it is based just on the size of the files and the expected merge size. When forceMerge is True, a set of files is returned even if the size requirement is not fullfilled. Arguments: forceMerge -- True indicates size is not a requirement. Return: the list of files to be merged and their fileBlockId """
1518ec485cd96a251acecf80b75dc9b67f305e52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/1518ec485cd96a251acecf80b75dc9b67f305e52/Dataset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 2697, 12, 2890, 16, 2944, 6786, 4672, 3536, 389, 4025, 2697, 67, 225, 6766, 279, 444, 434, 1390, 358, 506, 5384, 2511, 603, 279, 4421, 3329, 18, 15212, 16, 518, 353, 2511, 2537, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 2697, 12, 2890, 16, 2944, 6786, 4672, 3536, 389, 4025, 2697, 67, 225, 6766, 279, 444, 434, 1390, 358, 506, 5384, 2511, 603, 279, 4421, 3329, 18, 15212, 16, 518, 353, 2511, 2537, ...
self.assert_(msg.get_labels() == ['foobar', 'answered'])
self.assertEqual(msg.get_labels(), ['foobar', 'answered'])
def test_labels(self): # Get, set, join, and leave labels msg = mailbox.BabylMessage(_sample_message) self.assertEqual(msg.get_labels(), []) msg.set_labels(['foobar']) self.assertEqual(msg.get_labels(), ['foobar']) msg.set_labels([]) self.assertEqual(msg.get_labels(), []) msg.add_label('filed') self.assertEqual(msg.get_labels(), ['filed']) msg.add_label('resent') self.assert_(msg.get_labels() == ['filed', 'resent']) msg.add_label('resent') self.assert_(msg.get_labels() == ['filed', 'resent']) msg.remove_label('filed') self.assertEqual(msg.get_labels(), ['resent']) msg.add_label('foobar') self.assert_(msg.get_labels() == ['resent', 'foobar']) msg.remove_label('unseen') self.assert_(msg.get_labels() == ['resent', 'foobar']) msg.set_labels(['foobar', 'answered']) self.assert_(msg.get_labels() == ['foobar', 'answered'])
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, 1842, 67, 5336, 12, 2890, 4672, 468, 968, 16, 444, 16, 1233, 16, 471, 8851, 3249, 1234, 273, 14187, 18, 38, 24383, 80, 1079, 24899, 6358, 67, 2150, 13, 365, 18, 11231, 5812, 12, 3576, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5336, 12, 2890, 4672, 468, 968, 16, 444, 16, 1233, 16, 471, 8851, 3249, 1234, 273, 14187, 18, 38, 24383, 80, 1079, 24899, 6358, 67, 2150, 13, 365, 18, 11231, 5812, 12, 3576, ...
for node in self.get_boundary(): if (node != start and node != end): H.delete_vertex(node)
for vertex in self.get_boundary(): if (vertex != start and vertex != end): H.delete_vertex(vertex)
def interior_paths(self, start, end): """ Returns an exhaustive list of paths (also lists) through only interior nodes from vertex start to vertex end in the graph. Note -- start and end do not necessarily have to be boundary nodes. INPUT: start -- the vertex of the graph to search for paths from end -- the vertex of the graph to search for paths to EXAMPLES: sage: eg1 = Graph({0:[1,2], 1:[4], 2:[3,4], 4:[5], 5:[6]}) sage: eg1.all_paths(0,6) [[0, 1, 4, 5, 6], [0, 2, 4, 5, 6]] sage: eg2 = eg1.copy() sage: eg2.set_boundary([0,1,3]) sage: eg2.interior_paths(0,6) [[0, 2, 4, 5, 6]] sage: eg2.all_paths(0,6) [[0, 1, 4, 5, 6], [0, 2, 4, 5, 6]] sage: eg3 = graphs.PetersenGraph() sage: eg3.set_boundary([0,1,2,3,4]) sage: eg3.all_paths(1,4) [[1, 0, 4], [1, 0, 5, 8, 3, 2, 7, 9, 4], [1, 0, 5, 8, 3, 4], [1, 0, 5, 8, 6, 9, 4], [1, 0, 5, 8, 6, 9, 7, 2, 3, 4], [1, 0, 5, 7, 9, 4], [1, 0, 5, 7, 9, 6, 8, 3, 4], [1, 0, 5, 7, 2, 3, 8, 6, 9, 4], [1, 0, 5, 7, 2, 3, 4], [1, 2, 3, 8, 5, 0, 4], [1, 2, 3, 8, 5, 7, 9, 4], [1, 2, 3, 8, 6, 9, 4], [1, 2, 3, 8, 6, 9, 7, 5, 0, 4], [1, 2, 3, 4], [1, 2, 7, 9, 4], [1, 2, 7, 9, 6, 8, 3, 4], [1, 2, 7, 9, 6, 8, 5, 0, 4], [1, 2, 7, 5, 0, 4], [1, 2, 7, 5, 8, 3, 4], [1, 2, 7, 5, 8, 6, 9, 4], [1, 6, 8, 3, 2, 7, 9, 4], [1, 6, 8, 3, 2, 7, 5, 0, 4], [1, 6, 8, 3, 4], [1, 6, 8, 5, 0, 4], [1, 6, 8, 5, 7, 9, 4], [1, 6, 8, 5, 7, 2, 3, 4], [1, 6, 9, 4], [1, 6, 9, 7, 2, 3, 8, 5, 0, 4], [1, 6, 9, 7, 2, 3, 4], [1, 6, 9, 7, 5, 0, 4], [1, 6, 9, 7, 5, 8, 3, 4]] sage: eg3.interior_paths(1,4) [[1, 6, 8, 5, 7, 9, 4], [1, 6, 9, 4]] """ H = self.copy() for node in self.get_boundary(): if (node != start and node != end): H.delete_vertex(node) return H.all_paths(start, end)
7d819cbf1df622e9f76b4801233dbb334f44d362 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7d819cbf1df622e9f76b4801233dbb334f44d362/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26230, 67, 4481, 12, 2890, 16, 787, 16, 679, 4672, 3536, 2860, 392, 19575, 641, 688, 666, 434, 2953, 261, 31144, 6035, 13, 3059, 1338, 26230, 2199, 628, 5253, 787, 358, 5253, 679, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26230, 67, 4481, 12, 2890, 16, 787, 16, 679, 4672, 3536, 2860, 392, 19575, 641, 688, 666, 434, 2953, 261, 31144, 6035, 13, 3059, 1338, 26230, 2199, 628, 5253, 787, 358, 5253, 679, 316, ...
self.notebox.pack_start(gtk.HSeparator(), False) self.notebox.set_spacing(4)
self.notebox.set_spacing(6) sep = gtk.HSeparator() ; sep.show() self.notebox.pack_start(sep, False)
def load_contact(self, new_vcard, edit=False): self.vcard = new_vcard
83a200d579bb831f8f76d2d58f83b385981056c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/83a200d579bb831f8f76d2d58f83b385981056c5/arkadas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 8994, 12, 2890, 16, 394, 67, 90, 3327, 16, 3874, 33, 8381, 4672, 365, 18, 90, 3327, 273, 394, 67, 90, 3327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 8994, 12, 2890, 16, 394, 67, 90, 3327, 16, 3874, 33, 8381, 4672, 365, 18, 90, 3327, 273, 394, 67, 90, 3327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
genpluginproject("all", "_Qd", outputdir="::Lib:Carbon") genpluginproject("ppc", "_Qt", libraries=["QuickTimeLib"], outputdir="::Lib:Carbon") genpluginproject("carbon", "_Qt", outputdir="::Lib:Carbon") genpluginproject("all", "_Qdoffs", outputdir="::Lib:Carbon")
genpluginproject("all", "_Qd", stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") genpluginproject("ppc", "_Qt", libraries=["QuickTimeLib"], libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") genpluginproject("carbon", "_Qt", libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") genpluginproject("all", "_Qdoffs", stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files. Not as nice as # a single multitarget project, but easier to implement for now. genpluginproject("ppc", module, project, projectdir, sources, sourcedirs, libraries, extradirs, extraexportsymbols, outputdir, libraryflags, stdlibraryflags, prefixname) genpluginproject("carbon", module, project, projectdir, sources, sourcedirs, libraries, extradirs, extraexportsymbols, outputdir, libraryflags, stdlibraryflags, prefixname) return templatename = "template-%s" % architecture targetname = "%s.%s" % (module, architecture) dllname = "%s.%s.slb" % (module, architecture) if not project: if architecture != "ppc": project = "%s.%s.mcp"%(module, architecture) else: project = "%s.mcp"%module if not projectdir: projectdir = PROJECTDIR if not sources: sources = [module + 'module.c'] if not sourcedirs: for moduledir in MODULEDIRS: if '%' in moduledir: # For historical reasons an initial _ in the modulename # is not reflected in the folder name if module[0] == '_': modulewithout_ = module[1:] else: modulewithout_ = module moduledir = moduledir % modulewithout_ fn = os.path.join(projectdir, os.path.join(moduledir, sources[0])) if os.path.exists(fn): moduledir, sourcefile = os.path.split(fn) sourcedirs = [relpath(projectdir, moduledir)] sources[0] = sourcefile break else: print "Warning: %s: sourcefile not found: %s"%(module, sources[0]) sourcedirs = [] if prefixname: pass elif architecture == "carbon": prefixname = "mwerks_carbonplugin_config.h" else: prefixname = "mwerks_plugin_config.h" dict = { "sysprefix" : relpath(projectdir, sys.prefix), "sources" : sources, "extrasearchdirs" : sourcedirs + extradirs, "libraries": libraries, "mac_outputdir" : outputdir, "extraexportsymbols" : extraexportsymbols, "mac_targetname" : targetname, "mac_dllname" : dllname, "prefixname" : prefixname, } if libraryflags: dict['libraryflags'] = libraryflags if stdlibraryflags: dict['stdlibraryflags'] = stdlibraryflags mkcwproject.mkproject(os.path.join(projectdir, project), module, dict, force=FORCEREBUILD, templatename=templatename)
e1b118b3fce53d731b8a3909b130935162681de2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e1b118b3fce53d731b8a3909b130935162681de2/genpluginprojects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 4094, 4406, 12, 991, 18123, 16, 1605, 16, 1984, 33, 7036, 16, 1984, 1214, 33, 7036, 16, 5550, 22850, 6487, 1084, 8291, 22850, 6487, 14732, 22850, 6487, 7582, 361, 10539, 22850, 6487,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 4094, 4406, 12, 991, 18123, 16, 1605, 16, 1984, 33, 7036, 16, 1984, 1214, 33, 7036, 16, 5550, 22850, 6487, 1084, 8291, 22850, 6487, 14732, 22850, 6487, 7582, 361, 10539, 22850, 6487,...
self.quizzes.append(Test(xml, quiz_questions))
self.quizzes.append(Test(xml, quiz_questions, res_num))
def convert_resources(self): for resource in self.manifest.iterfind('.//resource'): dat_name = resource.attrib['file'] xml = etree.parse(self.zip.open(dat_name))
15b79dab64e9d35a840423eaa436a6e35feb7b63 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12927/15b79dab64e9d35a840423eaa436a6e35feb7b63/bb9_course.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 4683, 12, 2890, 4672, 364, 1058, 316, 365, 18, 14357, 18, 2165, 4720, 2668, 18, 759, 3146, 11, 4672, 1150, 67, 529, 273, 1058, 18, 14588, 3292, 768, 3546, 2025, 273, 12031, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1765, 67, 4683, 12, 2890, 4672, 364, 1058, 316, 365, 18, 14357, 18, 2165, 4720, 2668, 18, 759, 3146, 11, 4672, 1150, 67, 529, 273, 1058, 18, 14588, 3292, 768, 3546, 2025, 273, 12031, 1...
charset.append((op, av))
charsetappend((op, av))
def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, # this contains min/max pattern width, and an optional literal # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: return # not worth it # look for a literal prefix prefix = [] prefix_skip = 0 charset = [] # not used if not (flags & SRE_FLAG_IGNORECASE): # look for literal prefix for op, av in pattern.data: if op is LITERAL: if len(prefix) == prefix_skip: prefix_skip = prefix_skip + 1 prefix.append(av) elif op is SUBPATTERN and len(av[1]) == 1: op, av = av[1][0] if op is LITERAL: prefix.append(av) else: break else: break # if no prefix, look for charset prefix if not prefix and pattern.data: op, av = pattern.data[0] if op is SUBPATTERN and av[1]: op, av = av[1][0] if op is LITERAL: charset.append((op, av)) elif op is BRANCH: c = [] for p in av[1]: if not p: break op, av = p[0] if op is LITERAL: c.append((op, av)) else: break else: charset = c elif op is BRANCH: c = [] for p in av[1]: if not p: break op, av = p[0] if op is LITERAL: c.append((op, av)) else: break else: charset = c elif op is IN: charset = av
2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11100, 67, 1376, 12, 710, 16, 1936, 16, 2943, 4672, 468, 2713, 30, 4074, 392, 1123, 1203, 18, 225, 316, 326, 783, 1177, 16, 468, 333, 1914, 1131, 19, 1896, 1936, 1835, 16, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11100, 67, 1376, 12, 710, 16, 1936, 16, 2943, 4672, 468, 2713, 30, 4074, 392, 1123, 1203, 18, 225, 316, 326, 783, 1177, 16, 468, 333, 1914, 1131, 19, 1896, 1936, 1835, 16, 471, ...
of the Bron and Kerbosch Algorithm, [2].
of the Bron and Kerbosch Algorithm [BroKer1973]_.
def cliques_vertex_clique_number(self, algorithm="cliquer", vertices=None, with_labels=False, cliques=None): r""" Returns a list of sizes of the largest maximal cliques containing each vertex. (Returns a single value if only one input vertex). NOTES: - Currently only implemented for undirected graphs. Use to_undirected to convert a digraph to an undirected graph. INPUT: - ``algorithm`` - either ``cliquer`` or ``networkx`` - ``cliquer`` - This wraps the C program Cliquer, [1]. - ``networkx`` - This function is based on Networkx's implementation of the Bron and Kerbosch Algorithm, [2].
ff0c9f33534c3168fbe7c717cbfddb40743165ac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/ff0c9f33534c3168fbe7c717cbfddb40743165ac/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 15281, 67, 4857, 1857, 67, 2696, 12, 2890, 16, 4886, 1546, 4857, 25734, 3113, 6928, 33, 7036, 16, 598, 67, 5336, 33, 8381, 16, 4942, 29896, 33, 7036, 4672, 436, 8395, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 15281, 67, 4857, 1857, 67, 2696, 12, 2890, 16, 4886, 1546, 4857, 25734, 3113, 6928, 33, 7036, 16, 598, 67, 5336, 33, 8381, 16, 4942, 29896, 33, 7036, 4672, 436, 8395, ...
conf.env['MANDIR'] = conf.env['DATADIR'] + 'man/'
conf.env['MANDIR'] = os.path.join(conf.env['DATADIR'], 'man')
def append_cxx_flags(vals): conf.env.append_value('CCFLAGS', vals.split()) conf.env.append_value('CXXFLAGS', vals.split())
4e3ee97298ecf6faef09e60dfd5dc87604ca1e63 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/399/4e3ee97298ecf6faef09e60dfd5dc87604ca1e63/autowaf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 71, 5279, 67, 7133, 12, 4524, 4672, 2195, 18, 3074, 18, 6923, 67, 1132, 2668, 6743, 17836, 2187, 5773, 18, 4939, 10756, 2195, 18, 3074, 18, 6923, 67, 1132, 2668, 39, 5619, 178...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 71, 5279, 67, 7133, 12, 4524, 4672, 2195, 18, 3074, 18, 6923, 67, 1132, 2668, 6743, 17836, 2187, 5773, 18, 4939, 10756, 2195, 18, 3074, 18, 6923, 67, 1132, 2668, 39, 5619, 178...
Becase QUAL files don't contain the sequence string itself, the seq property is set to an UnknownSeq object. As no alphabet was given, this has defaulted to a generic single letter alphabet and the character "?" used.
Becase QUAL files don't contain the sequence string itself, the seq property is set to an UnknownSeq object. As no alphabet was given, this has defaulted to a generic single letter alphabet and the character "?" used.
def QualPhredIterator(handle, alphabet = single_letter_alphabet, title2ids = None) : """For QUAL files which include PHRED quality scores, but no sequence. For example, consider this short QUAL file: >EAS54_6_R1_2_1_413_324 26 26 18 26 26 26 26 26 26 26 26 26 26 26 26 22 26 26 26 26 26 26 26 23 23 >EAS54_6_R1_2_1_540_792 26 26 26 26 26 26 26 26 26 26 26 22 26 26 26 26 26 12 26 26 26 18 26 23 18 >EAS54_6_R1_2_1_443_348 26 26 26 26 26 26 26 26 26 26 26 24 26 22 26 26 13 22 26 18 24 18 18 18 18 Using this module directly you might run: >>> handle = open("Quality/example.qual", "rU") >>> for record in QualPhredIterator(handle) : ... print record.id, record.seq EAS54_6_R1_2_1_413_324 ????????????????????????? EAS54_6_R1_2_1_540_792 ????????????????????????? EAS54_6_R1_2_1_443_348 ????????????????????????? >>> handle.close() Typically however, you would call this via Bio.SeqIO instead with "qual" as the format: >>> from Bio import SeqIO >>> handle = open("Quality/example.qual", "rU") >>> for record in SeqIO.parse(handle, "qual") : ... print record.id, record.seq EAS54_6_R1_2_1_413_324 ????????????????????????? EAS54_6_R1_2_1_540_792 ????????????????????????? EAS54_6_R1_2_1_443_348 ????????????????????????? >>> handle.close() Becase QUAL files don't contain the sequence string itself, the seq property is set to an UnknownSeq object. As no alphabet was given, this has defaulted to a generic single letter alphabet and the character "?" used. By specifying a nucleotide alphabet, "N" is used instead: >>> from Bio import SeqIO >>> from Bio.Alphabet import generic_dna >>> handle = open("Quality/example.qual", "rU") >>> for record in SeqIO.parse(handle, "qual", alphabet=generic_dna) : ... print record.id, record.seq EAS54_6_R1_2_1_413_324 NNNNNNNNNNNNNNNNNNNNNNNNN EAS54_6_R1_2_1_540_792 NNNNNNNNNNNNNNNNNNNNNNNNN EAS54_6_R1_2_1_443_348 NNNNNNNNNNNNNNNNNNNNNNNNN >>> handle.close() However, the quality scores themselves are available as a list of integers in each record's per-letter-annotation: >>> print record.letter_annotations["phred_quality"] [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 24, 26, 22, 26, 26, 13, 22, 26, 18, 24, 18, 18, 18, 18] The internal details are a little complicated, but you can still slice one of these SeqRecord objects: >>> sub_record = record[5:10] >>> print sub_record.id, sub_record.letter_annotations["phred_quality"] EAS54_6_R1_2_1_443_348 [26, 26, 26, 26, 26] """ #Skip any text before the first record (e.g. blank lines, comments) while True : line = handle.readline() if line == "" : return #Premature end of file, or just empty? if line[0] == ">" : break while True : if line[0]!=">" : raise ValueError("Records in Fasta files should start with '>' character") if title2ids : id, name, descr = title2ids(line[1:].rstrip()) else : descr = line[1:].rstrip() id = descr.split()[0] name = id qualities = [] line = handle.readline() while True: if not line : break if line[0] == ">": break qualities.extend([int(word) for word in line.split()]) line = handle.readline() if qualities : if min(qualities) < 0 or max(qualities) > 90 : raise ValueError(("Quality score range for %s is %i to %i, outside the " \ +"expected 0 to 90. Perhaps these are Solexa/Illumina " \ +"scores, and not PHRED scores?") \ % (id, min(qualities), max(qualities))) #Return the record and then continue... record = SeqRecord(UnknownSeq(len(qualities), alphabet), id = id, name = name, description = descr) record.letter_annotations["phred_quality"] = qualities yield record if not line : return #StopIteration assert False, "Should not reach this line"
e56d79f2d97ef19f21b535c042077c194de886f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/e56d79f2d97ef19f21b535c042077c194de886f9/QualityIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15029, 3731, 1118, 3198, 12, 4110, 16, 10877, 273, 2202, 67, 13449, 67, 287, 8907, 16, 2077, 22, 2232, 273, 599, 13, 294, 3536, 1290, 10110, 1013, 1390, 1492, 2341, 15490, 5879, 9312, 84...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15029, 3731, 1118, 3198, 12, 4110, 16, 10877, 273, 2202, 67, 13449, 67, 287, 8907, 16, 2077, 22, 2232, 273, 599, 13, 294, 3536, 1290, 10110, 1013, 1390, 1492, 2341, 15490, 5879, 9312, 84...
for attr in self.managed_attributes(class_):
for attr in self.noninherited_managed_attributes(class_):
def reset_class_managed(self, class_): """removes all InstrumentedAttribute property objects from the given class.""" for attr in self.managed_attributes(class_): delattr(class_, attr.key)
5b99ac8fc12b98ddb68eee208f0714be119c6895 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1074/5b99ac8fc12b98ddb68eee208f0714be119c6895/attributes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 67, 1106, 67, 19360, 12, 2890, 16, 667, 67, 4672, 3536, 2764, 10829, 777, 25565, 329, 1499, 1272, 2184, 628, 326, 864, 667, 12123, 364, 1604, 316, 365, 18, 5836, 6018, 329, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 67, 1106, 67, 19360, 12, 2890, 16, 667, 67, 4672, 3536, 2764, 10829, 777, 25565, 329, 1499, 1272, 2184, 628, 326, 864, 667, 12123, 364, 1604, 316, 365, 18, 5836, 6018, 329, 67, 1...
tags, notag_only = self.intended_tags
tags, notag_only = self.get_selected_tags()
def on_colorchooser_activate(self, widget): #TODO: Color chooser should be refactorized in its own class. Well, in #fact we should have a TagPropertiesEditor (like for project) Also, #color change should be immediate. There's no reason for a Ok/Cancel dialog = gtk.ColorSelectionDialog('Choose color') colorsel = dialog.colorsel colorsel.connect("color_changed", self.on_color_changed) # Get previous color tags, notag_only = self.intended_tags init_color = None if len(tags) == 1: color = tags[0].get_attribute("color") if color != None: colorspec = gtk.gdk.color_parse(color) colorsel.set_previous_color(colorspec) colorsel.set_current_color(colorspec) init_color = colorsel.get_current_color() response = dialog.run() # Check response and set color if required if response != gtk.RESPONSE_OK and init_color: strcolor = gtk.color_selection_palette_to_string([init_color]) tags, notag_only = self.intended_tags for t in tags: t.set_attribute("color", strcolor) self.task_tv.refresh() dialog.destroy()
3de01fe23181b3554804a97d98603435ca30e1cc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/3de01fe23181b3554804a97d98603435ca30e1cc/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3266, 2599, 13164, 67, 10014, 12, 2890, 16, 3604, 4672, 468, 6241, 30, 5563, 5011, 13164, 1410, 506, 26627, 1235, 316, 2097, 4953, 667, 18, 678, 1165, 16, 316, 468, 3493, 732, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3266, 2599, 13164, 67, 10014, 12, 2890, 16, 3604, 4672, 468, 6241, 30, 5563, 5011, 13164, 1410, 506, 26627, 1235, 316, 2097, 4953, 667, 18, 678, 1165, 16, 316, 468, 3493, 732, ...
for checkArgName in expected.keys():
s = str(e) for checkArgName in expected:
def testAttributes(self): # test that exception attributes are happy try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e
d1621af1455a8055fc97fe5e47ae271743876dfa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d1621af1455a8055fc97fe5e47ae271743876dfa/test_exceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2498, 12, 2890, 4672, 468, 1842, 716, 1520, 1677, 854, 5622, 2074, 775, 30, 609, 12, 89, 11, 18601, 521, 89, 713, 41, 21, 6134, 1335, 1185, 16, 425, 30, 3296, 16532, 5509, 668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2498, 12, 2890, 4672, 468, 1842, 716, 1520, 1677, 854, 5622, 2074, 775, 30, 609, 12, 89, 11, 18601, 521, 89, 713, 41, 21, 6134, 1335, 1185, 16, 425, 30, 3296, 16532, 5509, 668, ...
for page in generator:
for page in generator:
def main(): # If none, the var is setted only for check purpose. summary = None; addText = None; regexSkip = None; regexSkipUrl = None; generator = None; always = False # Load a lot of default generators genFactory = pagegenerators.GeneratorFactory() # Put the text above or below the text? up = False # Loading the arguments for arg in wikipedia.handleArgs(): if arg.startswith('-text'): if len(arg) == 5: addText = wikipedia.input(u'What text do you want to add?') else: addText = arg[6:] elif arg.startswith('-summary'): if len(arg) == 8: summary = wikipedia.input(u'What summary do you want to use?') else: summary = arg[9:] elif arg.startswith('-page'): if len(arg) == 5: generator = [wikipedia.Page(wikipedia.getSite(), wikipedia.input(u'What page do you want to use?'))] else: generator = [wikipedia.Page(wikipedia.getSite(), arg[6:])] elif arg.startswith('-excepturl'): if len(arg) == 10: regexSkipUrl = wikipedia.input(u'What text should I skip?') else: regexSkipUrl = arg[11:] elif arg.startswith('-except'): if len(arg) == 7: regexSkip = wikipedia.input(u'What text should I skip?') else: regexSkip = arg[8:] elif arg.startswith('-untagged'): if len(arg) == 9: untaggedProject = wikipedia.input(u'What project do you want to use?') else: untaggedProject = arg[10:] generator = untaggedGenerator(untaggedProject) elif arg == '-up': up = True elif arg == '-always': always = True else: generator = genFactory.handleArg(arg) # Check if there are the minimal settings if not generator: raise NoEnoughData('You have to specify the generator you want to use for the script!') # Main Loop for page in generator: (status, always) = add_text(page, addText, summary, regexSkip, regexSkipUrl, always, up, True)
ce275470bb11eef6c098954321526a894edcf2df /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/ce275470bb11eef6c098954321526a894edcf2df/add_text.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 971, 6555, 16, 326, 569, 353, 444, 2344, 1338, 364, 866, 13115, 18, 4916, 273, 599, 31, 25796, 273, 599, 31, 3936, 6368, 273, 599, 31, 3936, 6368, 1489, 273, 599, 31,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 468, 971, 6555, 16, 326, 569, 353, 444, 2344, 1338, 364, 866, 13115, 18, 4916, 273, 599, 31, 25796, 273, 599, 31, 3936, 6368, 273, 599, 31, 3936, 6368, 1489, 273, 599, 31,...
if _n - T[0] < i0-fuzz: valueMin = valueMin - i0 if T[-1]-_x < i1-fuzz: valueMax = valueMax + i1
if abs(T[0])>fuzz and _n - T[0] < i0-fuzz: valueMin = valueMin - i0 if abs(T[-1])>fuzz and T[-1]-_x < i1-fuzz: valueMax = valueMax + i1
def _setRange(self, dataSeries): """Set minimum and maximum axis values.
8c19d7fdb8e0ecc83d57c5df905a1a441b6d9dc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/8c19d7fdb8e0ecc83d57c5df905a1a441b6d9dc1/axes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 2655, 12, 2890, 16, 501, 6485, 4672, 3536, 694, 5224, 471, 4207, 2654, 924, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 2655, 12, 2890, 16, 501, 6485, 4672, 3536, 694, 5224, 471, 4207, 2654, 924, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
random_filename = "distcc-pump" + str(random.random() * time.time()) if os.path.exists(random_filename): print sys.stderr >> ( """"For unfathomably unlikely reasons, this test failed: '%s' exists.""" % random_filename) sys.exit(1)
random_testdir = ("/tmp/distcc-pump-c-extensions-test-" + str(random.random() * time.time())) try: if os.path.exists(random_testdir): os.removedirs(random_testdir) os.mkdir(random_testdir, 0700) except (IOError, OSError), why: sys.exit("Unable to create test dir %s: %s." % (random_testdir, why)) random_filename = os.path.join(random_testdir, 'test') assert not os.path.exists(random_filename), random_filename
def main(): # Module tempfile doesn't work with distcc. Work-around follows. random_filename = "distcc-pump" + str(random.random() * time.time()) if os.path.exists(random_filename): print sys.stderr >> ( """"For unfathomably unlikely reasons, this test failed: '%s' exists.""" % random_filename) sys.exit(1) def _MakeTempFile(mode): return open(random_filename, mode) # Exercise metainformation and documentation strings assert(distcc_pump_c_extensions.__file__) assert(distcc_pump_c_extensions.__doc__) assert(distcc_pump_c_extensions.__author__) assert(distcc_pump_c_extensions.RTokenString.__doc__) assert(distcc_pump_c_extensions.RArgv.__doc__) assert(distcc_pump_c_extensions.XArgv.__doc__) assert(distcc_pump_c_extensions.OsPathExists.__doc__) assert(distcc_pump_c_extensions.OsPathIsFile.__doc__) assert(distcc_pump_c_extensions.Realpath.__doc__) # RTokenString and RArgv # Pack something and try sending it pack = struct.pack fd = _MakeTempFile('wb') fd.write("ARGC 2") fd.write("ARGV 6") fd.write("tomato") fd.write("ARGV 7") fd.write("potatos") fd.close() # Now try to read it back with wrong expectations. fd = _MakeTempFile('rb') try: two_string = distcc_pump_c_extensions.RTokenString(fd.fileno(), "XXXX"); sys.exit("internal error 1 - we should not get to here") except distcc_pump_c_extensions.Error: pass # Read it back with appropriate expectations. fd.seek(0); two_string = distcc_pump_c_extensions.RTokenString(fd.fileno(), "ARGC"); if two_string != "AR": raise distcc_pump_c_extensions.error, "internal error 2" fd.seek(0); args = distcc_pump_c_extensions.RArgv(fd.fileno()) if args != ["tomato", "potatos"]: raise distcc_pump_c_extensions.error, "internal error 3" fd.close() # XArgv and RArgv fd = _MakeTempFile('wb') darth_vader_barney = ["Darth Vader", "Barney"] args = distcc_pump_c_extensions.XArgv(fd.fileno(), darth_vader_barney) fd.close() fd = _MakeTempFile('r') args = distcc_pump_c_extensions.RArgv(fd.fileno()) if args != darth_vader_barney: raise distcc_pump_c_extensions.error, "internal error 4" fd.close() # Libc functions --- also print out how fast they are compared to # Python built-ins. t = time.time() f = "/" for i in range(10000): distcc_pump_c_extensions.OsPathExists(f); print 'Stat', time.time() - t t = time.time() for i in range(10000): os.path.exists(f); print 'os.path.exists', time.time() - t for i in range(10000): distcc_pump_c_extensions.Realpath(f); print 'c_realpath', time.time() - t t = time.time() for i in range(10000): os.path.realpath(f); print 'os.path.realpath', time.time() - t print "Test passed"
d198ea8844c716fa96a8f0e9b54b4625f652ac37 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4521/d198ea8844c716fa96a8f0e9b54b4625f652ac37/c_extensions_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 468, 5924, 13275, 3302, 1404, 1440, 598, 2411, 952, 18, 4147, 17, 12716, 13040, 18, 2744, 67, 3813, 1214, 273, 7566, 19, 5645, 19, 4413, 952, 17, 84, 2801, 17, 71, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 225, 468, 5924, 13275, 3302, 1404, 1440, 598, 2411, 952, 18, 4147, 17, 12716, 13040, 18, 2744, 67, 3813, 1214, 273, 7566, 19, 5645, 19, 4413, 952, 17, 84, 2801, 17, 71, 17...
if n is None: n = cell.n
if n is None: return v('+') - v('-') r = v.rank()
def jump(v, n=None): "The jump of v across a facet." r = v.rank() cell = v.cell() if cell is None: warning("TODO: Not all expressions have a cell. Is it right to return zero from jump then?") # TODO: Is this right? If v has no cell, it doesn't depend on # anything spatially variable or any form arguments, and thus # the jump is zero. In other words, I'm assuming that # "v.cell() is None" is equivalent with "v is a constant". return Zero(v.shape(), v.free_indices(), v.index_dimensions()) else: if n is None: # TODO: Is this right? Like FFC did it? n = cell.n if r == 0: return v('+')*n('+') + v('-')*n('-') elif r == 1: return dot(v('+'), n('+')) + dot(v('-'), n('-')) error("jump(v) is only defined for scalar or vector-valued expressions (not rank %d expressions)." % r)
4eea2321c2d40843b28ce28a6b52cf12e5081788 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/624/4eea2321c2d40843b28ce28a6b52cf12e5081788/operators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11833, 12, 90, 16, 290, 33, 7036, 4672, 315, 1986, 11833, 434, 331, 10279, 279, 11082, 1199, 436, 273, 331, 18, 11500, 1435, 2484, 273, 331, 18, 3855, 1435, 309, 2484, 353, 599, 30, 34...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11833, 12, 90, 16, 290, 33, 7036, 4672, 315, 1986, 11833, 434, 331, 10279, 279, 11082, 1199, 436, 273, 331, 18, 11500, 1435, 2484, 273, 331, 18, 3855, 1435, 309, 2484, 353, 599, 30, 34...
+ " group by J.VOName, J.ProbeName order by CETable.facility_name "
+ " group by J.VOName, CEProbes.facility_id order by CETable.facility_name "
def DailySiteVOData(begin,end): schema = "gratia" select = " SELECT CETable.facility_name, J.VOName, sum(NJobs), sum(J.WallDuration) " \ + " from "+schema+".CETable, "+schema+".CEProbes, "+schema+".JobUsageRecord J " \ + " where CEProbes.facility_id = CETable.facility_id and J.ProbeName = CEProbes.probename" \ + " and \""+ DateToString(begin) +"\"<EndTime and EndTime<\"" + DateToString(end) + "\"" \ + " and J.ProbeName not like \"psacct:%\" " \ + " group by J.VOName, J.ProbeName order by CETable.facility_name " return RunQueryAndSplit(select)
55368fa17dc9f81d3651509634f0008b9277083b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/637/55368fa17dc9f81d3651509634f0008b9277083b/PSACCTReport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 12857, 4956, 16169, 751, 12, 10086, 16, 409, 4672, 1963, 273, 315, 3197, 270, 1155, 6, 225, 2027, 273, 315, 9111, 29538, 1388, 18, 11639, 1889, 67, 529, 16, 804, 18, 16169, 461, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 12857, 4956, 16169, 751, 12, 10086, 16, 409, 4672, 1963, 273, 315, 3197, 270, 1155, 6, 225, 2027, 273, 315, 9111, 29538, 1388, 18, 11639, 1889, 67, 529, 16, 804, 18, 16169, 461, 1...
if(not len(self._metas)): return "{}" stri = "{" for key, val in self._metas.iteritems(): stri = stri+ "\"" + key + "\" : [" + val[0].__name__ + ", " + repr(val[1]) + "]," stri = stri[:-1] + "}" return stri
if(not len(self._metaValues)): return "{}" keys = set(self._metaTypes)-set(self._metaValues) d = self._metaValues.copy() for k in keys: d[k] = None return repr(d)
def __repr__(self): if(not len(self._metas)): return "{}" stri = "{" for key, val in self._metas.iteritems(): stri = stri+ "\"" + key + "\" : [" + val[0].__name__ + ", " + repr(val[1]) + "]," stri = stri[:-1] + "}" return stri
32182ef0ddf273b9a6767e2866166bde311fe575 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11338/32182ef0ddf273b9a6767e2866166bde311fe575/metadatadict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 309, 12, 902, 562, 12, 2890, 6315, 10578, 345, 3719, 30, 327, 13034, 609, 77, 273, 18173, 364, 498, 16, 1244, 316, 365, 6315, 10578, 345, 18, 2165, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 309, 12, 902, 562, 12, 2890, 6315, 10578, 345, 3719, 30, 327, 13034, 609, 77, 273, 18173, 364, 498, 16, 1244, 316, 365, 6315, 10578, 345, 18, 2165, 33...
r=parse("[[wict:bla]]").find(parser.SpecialLink)[0]
r=parse("[[wikt:bla]]").find(parser.InterwikiLink)[0]
def test_interwiki_link(): r=parse("[[wict:bla]]").find(parser.SpecialLink)[0] assert r.target=='bla' assert r.namespace == 'wiktionary'
48f18e9046fa1d3c01dd78ee51379922d7d2d8f1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/48f18e9046fa1d3c01dd78ee51379922d7d2d8f1/test_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2761, 13044, 67, 1232, 13332, 436, 33, 2670, 2932, 31128, 11999, 88, 30, 3083, 69, 65, 4279, 2934, 4720, 12, 4288, 18, 2465, 13044, 2098, 25146, 20, 65, 1815, 436, 18, 3299, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2761, 13044, 67, 1232, 13332, 436, 33, 2670, 2932, 31128, 11999, 88, 30, 3083, 69, 65, 4279, 2934, 4720, 12, 4288, 18, 2465, 13044, 2098, 25146, 20, 65, 1815, 436, 18, 3299, ...
assert ( not (settings.stylesheet and settings.stylesheet_path),
assert not (settings.stylesheet and settings.stylesheet_path), (
def get_stylesheet_list(settings): """ Retrieve list of stylesheet references from the settings object. """ assert ( not (settings.stylesheet and settings.stylesheet_path), 'stylesheet and stylesheet_path are mutually exclusive.') if settings.stylesheet_path: sheets = settings.stylesheet_path.split(",") elif settings.stylesheet: sheets = settings.stylesheet.split(",") else: sheets = [] # strip whitespace (frequently occuring in config files) return [sheet.strip(u' \t\n\r') for sheet in sheets]
8cbe53e65866c6795013626d991dfa5afd486fcc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5620/8cbe53e65866c6795013626d991dfa5afd486fcc/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 19403, 67, 1098, 12, 4272, 4672, 3536, 10708, 666, 434, 13820, 5351, 628, 326, 1947, 733, 18, 3536, 1815, 486, 261, 4272, 18, 19403, 471, 1947, 18, 19403, 67, 803, 3631, 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, 336, 67, 19403, 67, 1098, 12, 4272, 4672, 3536, 10708, 666, 434, 13820, 5351, 628, 326, 1947, 733, 18, 3536, 1815, 486, 261, 4272, 18, 19403, 471, 1947, 18, 19403, 67, 803, 3631, 261, ...
customMethodCall = customMethodCalls.get(stubName, None) f.write("static JSBool\n")
signature = "static JSBool\n"
def writeQuickStub(f, customMethodCalls, member, stubName, isSetter=False): """ Write a single quick stub (a custom SpiderMonkey getter/setter/method) for the specified XPCOM interface-member. """ isAttr = (member.kind == 'attribute') isMethod = (member.kind == 'method') assert isAttr or isMethod isGetter = isAttr and not isSetter customMethodCall = customMethodCalls.get(stubName, None) # Function prolog. f.write("static JSBool\n") if isAttr: # JSPropertyOp signature. f.write(stubName + "(JSContext *cx, JSObject *obj, jsval id, " "jsval *vp)\n") else: # JSFastNative. f.write(stubName + "(JSContext *cx, uintN argc, jsval *vp)\n") f.write("{\n") f.write(" XPC_QS_ASSERT_CONTEXT_OK(cx);\n") # For methods, compute "this". if isMethod: f.write(" JSObject *obj = JS_THIS_OBJECT(cx, vp);\n" " if (!obj)\n" " return JS_FALSE;\n") # Create ccx if needed. haveCcx = isMethod and anyParamRequiresCcx(member) if haveCcx: f.write(" XPCCallContext ccx(JS_CALLER, cx, obj, " "JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));\n") if isInterfaceType(member.realtype): f.write(" XPCLazyCallContext lccx(ccx);\n") elif isInterfaceType(member.realtype): if isMethod: f.write(" JSObject *callee = " "JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));\n") elif isGetter: f.write(" JSObject *callee = nsnull;\n") # Get the 'self' pointer. if customMethodCall is None or not 'thisType' in customMethodCall: f.write(" %s *self;\n" % member.iface.name) else: f.write(" %s *self;\n" % customMethodCall['thisType']) f.write(" xpc_qsSelfRef selfref;\n") # Don't use FromCcx for getters or setters; the way we construct the ccx in # a getter/setter causes it to find the wrong wrapper in some cases. if haveCcx: # Undocumented, but the interpreter puts 'this' at argv[-1], # which is vp[1]; and it's ok to overwrite it. f.write(" if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, " "&vp[1]))\n") f.write(" return JS_FALSE;\n") else: if isGetter: pthisval = 'vp' elif isSetter: f.write(" JSAutoTempValueRooter tvr(cx);\n") pthisval = 'tvr.addr()' else: pthisval = '&vp[1]' # as above, ok to overwrite vp[1] if not isSetter and isInterfaceType(member.realtype): f.write(" XPCLazyCallContext lccx(JS_CALLER, cx, obj);\n") f.write(" if (!xpc_qsUnwrapThis(cx, obj, callee, &self, " "&selfref.ptr, %s, &lccx))\n" % pthisval) else: f.write(" if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, " "&selfref.ptr, %s, nsnull))\n" % pthisval) f.write(" return JS_FALSE;\n") if isMethod: # If there are any required arguments, check argc. requiredArgs = len(member.params) while requiredArgs and member.params[requiredArgs-1].optional: requiredArgs -= 1 if requiredArgs: f.write(" if (argc < %d)\n" % requiredArgs) f.write(" return xpc_qsThrow(cx, " "NS_ERROR_XPC_NOT_ENOUGH_ARGS);\n") # Convert in-parameters. rvdeclared = False if isMethod: if len(member.params) > 0: f.write(" jsval *argv = JS_ARGV(cx, vp);\n") for i, param in enumerate(member.params): validateParam(member, param) # Emit code to convert this argument from jsval. rvdeclared = writeArgumentUnboxing( f, i, 'arg%d' % i, param.realtype, haveCcx=haveCcx, optional=param.optional, rvdeclared=rvdeclared) elif isSetter: rvdeclared = writeArgumentUnboxing(f, None, 'arg0', member.realtype, haveCcx=False, optional=False, rvdeclared=rvdeclared) canFail = customMethodCall is None or customMethodCall.get('canFail', False) if canFail and not rvdeclared: f.write(" nsresult rv;\n") rvdeclared = True if customMethodCall is not None: f.write("%s\n" % customMethodCall['code']) if customMethodCall is None or isGetter: if customMethodCall is not None: f.write("#ifdef DEBUG\n") f.write(" nsresult debug_rv;\n") f.write(" nsCOMPtr<%s> debug_self = do_QueryInterface(self);\n" % member.iface.name); prefix = 'debug_' else: prefix = '' resultname = prefix + 'result' selfname = prefix + 'self' nsresultname = prefix + 'rv' # Prepare out-parameter. if isMethod or isGetter: writeResultDecl(f, member.realtype, resultname) # Call the method. if isMethod: comName = header.methodNativeName(member) argv = ['arg' + str(i) for i, p in enumerate(member.params)] if not isVoidType(member.realtype): argv.append(outParamForm(resultname, member.realtype)) args = ', '.join(argv) else: comName = header.attributeNativeName(member, isGetter) if isGetter: args = outParamForm(resultname, member.realtype) else: args = "arg0" f.write(" %s = %s->%s(%s);\n" % (nsresultname, selfname, comName, args)) if customMethodCall is not None: checkSuccess = "NS_SUCCEEDED(debug_rv)" if canFail: checkSuccess += " == NS_SUCCEEDED(rv)" f.write(" NS_ASSERTION(%s && " "xpc_qsSameResult(debug_result, result),\n" " \"Got the wrong answer from the custom " "method call!\");\n" % checkSuccess) f.write("#endif\n") if canFail: # Check for errors. f.write(" if (NS_FAILED(rv))\n") if isMethod: if haveCcx: f.write(" return xpc_qsThrowMethodFailedWithCcx(" "ccx, rv);\n") else: f.write(" return xpc_qsThrowMethodFailed(" "cx, rv, vp);\n") else: if isGetter: thisval = '*vp' else: thisval = '*tvr.addr()' f.write(" return xpc_qsThrowGetterSetterFailed(cx, rv, " + "JSVAL_TO_OBJECT(%s), id);\n" % thisval) # Convert the return value. if isMethod or isGetter: writeResultConv(f, member.realtype, 'vp', '*vp') else: f.write(" return JS_TRUE;\n") # Epilog. f.write("}\n\n")
a10624dd080926e247ec99fbda83b4e298b8ad3e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/a10624dd080926e247ec99fbda83b4e298b8ad3e/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 13663, 11974, 12, 74, 16, 1679, 1305, 10125, 16, 3140, 16, 7168, 461, 16, 353, 8465, 33, 8381, 4672, 3536, 2598, 279, 2202, 9549, 7168, 261, 69, 1679, 5878, 3585, 11415, 856, 7060,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 13663, 11974, 12, 74, 16, 1679, 1305, 10125, 16, 3140, 16, 7168, 461, 16, 353, 8465, 33, 8381, 4672, 3536, 2598, 279, 2202, 9549, 7168, 261, 69, 1679, 5878, 3585, 11415, 856, 7060,...
_op, _expected, _checks, _good, _bad_build, _bad_runtime, _grad = op, expected, checks, good, bad_build, bad_runtime, grad
_op, _expected, _checks, _good, _bad_build, _bad_runtime, _grad, _mode = op, expected, checks, good, bad_build, bad_runtime, grad, mode
def makeTester(name, op, expected, checks = {}, good = {}, bad_build = {}, bad_runtime = {}, grad = {}): if grad is True: grad = good _op, _expected, _checks, _good, _bad_build, _bad_runtime, _grad = op, expected, checks, good, bad_build, bad_runtime, grad class Checker(unittest.TestCase): op = _op expected = staticmethod(_expected) checks = _checks good = _good bad_build = _bad_build bad_runtime = _bad_runtime grad = _grad def test_good(self): for testname, inputs in self.good.items(): inputs = [copy(input) for input in inputs] inputrs = [value(input) for input in inputs] try: #node = self.op.make_node(*inputrs) node = safe_make_node(self.op, *inputrs) except: type, exc_value, traceback = sys.exc_info() err_msg = "Test %s::%s: Error occurred while making a node with inputs %s" \ % (self.op, testname, inputs) exc_value.args = exc_value.args + (err_msg, ) raise type, exc_value, traceback try: f = inplace_func(inputrs, node.outputs) except: type, exc_value, traceback = sys.exc_info() err_msg = "Test %s::%s: Error occurred while trying to make a Function" \ % (self.op, testname) exc_value.args = exc_value.args + (err_msg, ) raise type, exc_value, traceback if isinstance(self.expected,dict) and testname in self.expected: expecteds = self.expected[testname] #with numpy version, when we print a number and read it back, we don't get exactly the same result #So we accept rounding error in that case. eps = 5e-9 else: expecteds = self.expected(*inputs) eps = 1e-10 try: variables = f(*inputs) except: type, exc_value, traceback = sys.exc_info() err_msg = "Test %s::%s: Error occurred while calling the Function on the inputs %s" \ % (self.op, testname, inputs) exc_value.args = exc_value.args + (err_msg, ) raise type, exc_value, traceback if not isinstance(expecteds, (list, tuple)): expecteds = (expecteds, ) for i, (variable, expected) in enumerate(zip(variables, expecteds)): if variable.dtype != expected.dtype or variable.shape != expected.shape or \ numpy.any(numpy.abs(variable - expected) > eps): self.fail("Test %s::%s: Output %s gave the wrong value. With inputs %s, expected %s, got %s." % (self.op, testname, i, inputs, expected, variable)) for description, check in self.checks.items(): if not check(inputs, variables): self.fail("Test %s::%s: Failed check: %s (inputs were %s, outputs were %s)" % (self.op, testname, description, inputs, variables)) def test_bad_build(self): for testname, inputs in self.bad_build.items(): inputs = [copy(input) for input in inputs] inputrs = [value(input) for input in inputs] try: node = safe_make_node(self.op,*inputrs) except: return self.fail("Test %s::%s: %s was successfully instantiated on the following bad inputs: %s" % (self.op, testname, node, inputs)) def test_bad_runtime(self): for testname, inputs in self.bad_runtime.items(): inputs = [copy(input) for input in inputs] inputrs = [value(input) for input in inputs] try: node = safe_make_node(self.op,*inputrs) except: type, exc_value, traceback = sys.exc_info() err_msg = "Test %s::%s: Error occurred while trying to make a node with inputs %s" \ % (self.op, testname, inputs) exc_value.args = exc_value.args + (err_msg, ) raise type, exc_value, traceback try: f = inplace_func(inputrs, node.outputs) except: type, exc_value, traceback = sys.exc_info() err_msg = "Test %s::%s: Error occurred while trying to make a Function" \ % (self.op, testname) exc_value.args = exc_value.args + (err_msg, ) raise type, exc_value, traceback try: variables = f(*inputs) except: return self.fail("Test %s::%s: Successful call on the following bad inputs: %s" % (self.op, testname, inputs)) def test_grad(self): for testname, inputs in self.grad.items(): inputs = [copy(input) for input in inputs] inputrs = [value(input) for input in inputs] try: utt.verify_grad(self.op, inputs) except: type, exc_value, traceback = sys.exc_info() err_msg = "Test %s::%s: Error occurred while computing the gradient on the following inputs: %s" \ % (self.op, testname, inputs) exc_value.args = exc_value.args + (err_msg, ) raise type, exc_value, traceback Checker.__name__ = name return Checker
460debbf46c41dbcd844a3347818877671d9d7ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/460debbf46c41dbcd844a3347818877671d9d7ae/test_basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 56, 7654, 12, 529, 16, 1061, 16, 2665, 16, 4271, 273, 10615, 7494, 273, 10615, 5570, 67, 3510, 273, 10615, 5570, 67, 9448, 273, 10615, 6058, 273, 2618, 4672, 309, 6058, 353, 1053, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 56, 7654, 12, 529, 16, 1061, 16, 2665, 16, 4271, 273, 10615, 7494, 273, 10615, 5570, 67, 3510, 273, 10615, 5570, 67, 9448, 273, 10615, 6058, 273, 2618, 4672, 309, 6058, 353, 1053, ...
print (Y1-Y2).max()
if verbose > 2: print (Y1-Y2).max()
def test_cdist_cosine_random(self): "Tests cdist(X, 'cosine') on random data." eps = 1e-07 # Get the data: the input matrix and the right output. X1 = eo['cdist-X1'] X2 = eo['cdist-X2'] Y1 = cdist(X1, X2, 'cosine') Y2 = cdist(X1, X2, 'test_cosine') print (Y1-Y2).max() self.failUnless(within_tol(Y1, Y2, eps))
c3d85c07ed380f445f851652c8c4ee87f0b2dc45 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5882/c3d85c07ed380f445f851652c8c4ee87f0b2dc45/test_distance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4315, 376, 67, 14445, 558, 67, 9188, 12, 2890, 4672, 315, 14650, 276, 4413, 12, 60, 16, 296, 14445, 558, 6134, 603, 2744, 501, 1199, 7785, 273, 404, 73, 17, 8642, 468, 968, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4315, 376, 67, 14445, 558, 67, 9188, 12, 2890, 4672, 315, 14650, 276, 4413, 12, 60, 16, 296, 14445, 558, 6134, 603, 2744, 501, 1199, 7785, 273, 404, 73, 17, 8642, 468, 968, ...
raise BadZipZile("zipfiles that span multiple disks are not supported")
raise BadZipFile("zipfiles that span multiple disks are not supported")
def _EndRecData64(fpin, offset, endrec): """ Read the ZIP64 end-of-archive records and use that to update endrec """ try: fpin.seek(offset - sizeEndCentDir64Locator, 2) except IOError: # If the seek fails, the file is not large enough to contain a ZIP64 # end-of-archive record, so just return the end record we were given. return endrec data = fpin.read(sizeEndCentDir64Locator) sig, diskno, reloff, disks = struct.unpack(structEndArchive64Locator, data) if sig != stringEndArchive64Locator: return endrec if diskno != 0 or disks != 1: raise BadZipZile("zipfiles that span multiple disks are not supported") # Assume no 'zip64 extensible data' fpin.seek(offset - sizeEndCentDir64Locator - sizeEndCentDir64, 2) data = fpin.read(sizeEndCentDir64) sig, sz, create_version, read_version, disk_num, disk_dir, \ dircount, dircount2, dirsize, diroffset = \ struct.unpack(structEndArchive64, data) if sig != stringEndArchive64: return endrec # Update the original endrec using data from the ZIP64 record endrec[_ECD_SIGNATURE] = sig endrec[_ECD_DISK_NUMBER] = disk_num endrec[_ECD_DISK_START] = disk_dir endrec[_ECD_ENTRIES_THIS_DISK] = dircount endrec[_ECD_ENTRIES_TOTAL] = dircount2 endrec[_ECD_SIZE] = dirsize endrec[_ECD_OFFSET] = diroffset return endrec
ae2d8320a5aa46eaae78db5abd1e3fec38e68f08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/ae2d8320a5aa46eaae78db5abd1e3fec38e68f08/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1638, 5650, 751, 1105, 12, 7944, 267, 16, 1384, 16, 679, 3927, 4672, 3536, 2720, 326, 18277, 1105, 679, 17, 792, 17, 10686, 3853, 471, 999, 716, 358, 1089, 679, 3927, 3536, 775, 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, 389, 1638, 5650, 751, 1105, 12, 7944, 267, 16, 1384, 16, 679, 3927, 4672, 3536, 2720, 326, 18277, 1105, 679, 17, 792, 17, 10686, 3853, 471, 999, 716, 358, 1089, 679, 3927, 3536, 775, 3...
def default_code(self, cursor, user, context=None): return 'view'
def __init__(self): super(Type, self).__init__() self._order.insert(0, ('sequence', 'ASC'))
ccd6b1252a483b6e9c7087d5b7d7856a79e29a45 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9290/ccd6b1252a483b6e9c7087d5b7d7856a79e29a45/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2240, 12, 559, 16, 365, 2934, 972, 2738, 972, 1435, 365, 6315, 1019, 18, 6387, 12, 20, 16, 7707, 6178, 2187, 296, 8633, 26112, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2240, 12, 559, 16, 365, 2934, 972, 2738, 972, 1435, 365, 6315, 1019, 18, 6387, 12, 20, 16, 7707, 6178, 2187, 296, 8633, 26112, 2, -100, -100, -100, -10...
doc )
doc, fieldType=attr.getType() )
def getFieldStringFromAttribute(self, attr, classelement): ''' gets the schema field code ''' #print 'typename:%s:'%attr.getName(),attr.type, if not hasattr(attr,'type') or attr.type=='NoneType': ctype='string' else: ctype=self.coerceType(str(attr.type))
69455fa25d35355037b42a3cf60479c640958209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/69455fa25d35355037b42a3cf60479c640958209/ArchetypesGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5031, 780, 1265, 1499, 12, 2890, 16, 1604, 16, 667, 2956, 4672, 9163, 5571, 326, 1963, 652, 981, 9163, 468, 1188, 296, 12846, 1069, 5319, 87, 2497, 9, 1747, 18, 17994, 9334, 1747, 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, 5031, 780, 1265, 1499, 12, 2890, 16, 1604, 16, 667, 2956, 4672, 9163, 5571, 326, 1963, 652, 981, 9163, 468, 1188, 296, 12846, 1069, 5319, 87, 2497, 9, 1747, 18, 17994, 9334, 1747, 18, ...
self._readSubarch(arch, subarch)
self._read_subarch(arch, featureset)
def _readArch(self, arch): config = ConfigParser(self.schemas) config.read(self.getFiles("%s/%s" % (arch, self.config_name)))
4fce5d1f110fa164dbdea466ff857ee6aec6f31a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5794/4fce5d1f110fa164dbdea466ff857ee6aec6f31a/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 12269, 12, 2890, 16, 6637, 4672, 642, 273, 25076, 12, 2890, 18, 17928, 13, 642, 18, 896, 12, 2890, 18, 588, 2697, 27188, 87, 5258, 87, 6, 738, 261, 991, 16, 365, 18, 1425, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 12269, 12, 2890, 16, 6637, 4672, 642, 273, 25076, 12, 2890, 18, 17928, 13, 642, 18, 896, 12, 2890, 18, 588, 2697, 27188, 87, 5258, 87, 6, 738, 261, 991, 16, 365, 18, 1425, ...
req.redirect(self.env.href.account())
req.redirect(self.env.href.prefs('account'))
def process_request(self, req): if req.authname != 'anonymous': req.redirect(self.env.href.account()) action = req.args.get('action') data = {} if req.method == 'POST' and action == 'create': try: _create_user(req, self.env) except TracError, e: data['registration_error'] = e.message else: req.redirect(self.env.href.login()) data['reset_password_enabled'] = \ (self.env.is_component_enabled(AccountModule) and NotificationSystem(self.env).smtp_enabled)
a0ae077f870f23f6acb8e075e8b9185119526535 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6208/a0ae077f870f23f6acb8e075e8b9185119526535/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 309, 1111, 18, 1944, 529, 480, 296, 19070, 4278, 1111, 18, 7590, 12, 2890, 18, 3074, 18, 7547, 18, 1484, 2556, 2668, 4631, 26112, 1301, 273, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 309, 1111, 18, 1944, 529, 480, 296, 19070, 4278, 1111, 18, 7590, 12, 2890, 18, 3074, 18, 7547, 18, 1484, 2556, 2668, 4631, 26112, 1301, 273, 1...
f_type = self.cts.lltype_to_cts(FIELD_TYPE) value = self.record._items[f_name] ilasm.opcode('dup') AbstractConst.load(self.db, FIELD_TYPE, value, ilasm) ilasm.set_field((f_type, class_name, f_name))
if FIELD_TYPE is not ootype.Void: f_type = self.cts.lltype_to_cts(FIELD_TYPE) value = self.record._items[f_name] ilasm.opcode('dup') AbstractConst.load(self.db, FIELD_TYPE, value, ilasm) ilasm.set_field((f_type, class_name, f_name))
def init(self, ilasm): class_name = self.get_type(False) ilasm.new('instance void class %s::.ctor()' % class_name) for f_name, (FIELD_TYPE, f_default) in self.record._TYPE._fields.iteritems(): f_type = self.cts.lltype_to_cts(FIELD_TYPE) value = self.record._items[f_name] ilasm.opcode('dup') AbstractConst.load(self.db, FIELD_TYPE, value, ilasm) ilasm.set_field((f_type, class_name, f_name))
bd46e813c9594cfcd89dc8f64af9a9ddad4fa359 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/bd46e813c9594cfcd89dc8f64af9a9ddad4fa359/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 277, 9521, 81, 4672, 667, 67, 529, 273, 365, 18, 588, 67, 723, 12, 8381, 13, 277, 9521, 81, 18, 2704, 2668, 1336, 918, 667, 738, 87, 2866, 18, 30206, 11866, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 277, 9521, 81, 4672, 667, 67, 529, 273, 365, 18, 588, 67, 723, 12, 8381, 13, 277, 9521, 81, 18, 2704, 2668, 1336, 918, 667, 738, 87, 2866, 18, 30206, 11866, 738, ...
- ``(i,u,v)`` - (3-tuple of ints) another tuple defining the associated normalized ManinSymbol.
``(i,u,v)`` - (3-tuple of ints) another tuple defining the associated normalized ManinSymbol.
def normalize(self, x): """ Returns the normalization of the ModSym ``x`` with respect to this list.
e265517a575a65b09b817a2b1feaf73c31f0ba93 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/e265517a575a65b09b817a2b1feaf73c31f0ba93/manin_symbols.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 12, 2890, 16, 619, 4672, 3536, 2860, 326, 13728, 434, 326, 3431, 11901, 12176, 92, 10335, 598, 8762, 358, 333, 666, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 3883, 12, 2890, 16, 619, 4672, 3536, 2860, 326, 13728, 434, 326, 3431, 11901, 12176, 92, 10335, 598, 8762, 358, 333, 666, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
And + Suppress(Keyword("or", caseless=True)) + Or
And + Suppress(CaselessKeyword("or")) + Or
def __init__(self, locations, test=False): self._tests_failed = False # Define a token standard_locations = map(lambda x : CaselessLiteral(x)+Suppress(':'), locations) location = NoMatch() for l in standard_locations: location |= l location = Optional(location, default='all') word_query = CharsNotIn(string.whitespace + '()') quoted_query = Suppress('"')+CharsNotIn('"')+Suppress('"') query = quoted_query | word_query Token = Group(location + query).setResultsName('token')
aa8eab9d35aa983886da3d4af5c1606dcf9f20a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/aa8eab9d35aa983886da3d4af5c1606dcf9f20a5/search_query_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7838, 16, 1842, 33, 8381, 4672, 365, 6315, 16341, 67, 7307, 273, 1083, 468, 13184, 279, 1147, 4529, 67, 12352, 273, 852, 12, 14661, 619, 294, 23561, 12617,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7838, 16, 1842, 33, 8381, 4672, 365, 6315, 16341, 67, 7307, 273, 1083, 468, 13184, 279, 1147, 4529, 67, 12352, 273, 852, 12, 14661, 619, 294, 23561, 12617,...
return re.match(r'.*?Pentium II\b',
return re.match(r'.*?Pentium.*?II\b',
def _is_PentiumII(self): return re.match(r'.*?Pentium II\b', self.info[0]['model name']) is not None
09fe0df89c51556afd12abe377398e0ff4a25a3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/09fe0df89c51556afd12abe377398e0ff4a25a3e/cpuinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 67, 52, 319, 5077, 6954, 12, 2890, 4672, 327, 283, 18, 1916, 12, 86, 11, 23498, 52, 319, 5077, 23498, 6954, 64, 70, 2187, 365, 18, 1376, 63, 20, 23962, 2284, 508, 19486, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 67, 52, 319, 5077, 6954, 12, 2890, 4672, 327, 283, 18, 1916, 12, 86, 11, 23498, 52, 319, 5077, 23498, 6954, 64, 70, 2187, 365, 18, 1376, 63, 20, 23962, 2284, 508, 19486, 35...
return self.currval*100.0 / self.maxval
return self.currval * 100.0 / self.maxval
def percentage(self): "Returns the percentage of the progress." return self.currval*100.0 / self.maxval
73b35864e641dc00ee940670b56aa970ed029379 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11527/73b35864e641dc00ee940670b56aa970ed029379/progressbar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11622, 12, 2890, 4672, 315, 1356, 326, 11622, 434, 326, 4007, 1199, 327, 365, 18, 17016, 1125, 14, 6625, 18, 20, 342, 365, 18, 1896, 1125, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11622, 12, 2890, 4672, 315, 1356, 326, 11622, 434, 326, 4007, 1199, 327, 365, 18, 17016, 1125, 14, 6625, 18, 20, 342, 365, 18, 1896, 1125, 2, -100, -100, -100, -100, -100, -100, -100, ...
default[f.field] = value
default[f.field.name] = value
def model_copy(self, cr, uid, ids, context={}): for row in self.read(cr, uid, ids): cron_ids = [row['cron_id'][0]] remaining = self.pool.get('ir.cron').read(cr, uid, cron_ids, ['numbercall'])[0]['numbercall'] try: (model_name, id) = row['doc_source'].split(',') id = int(id) model = self.pool.get(model_name) except: raise osv.except_osv('Wrong Source Document !', 'Please provide another source document.\nThis one does not exist !')
247a0dd65bf6d6213ae97fe30bf92c2ca05ca612 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/247a0dd65bf6d6213ae97fe30bf92c2ca05ca612/subscription.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 938, 67, 3530, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 364, 1027, 316, 365, 18, 896, 12, 3353, 16, 4555, 16, 3258, 4672, 9998, 67, 2232, 273, 306, 492, 3292, 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, 938, 67, 3530, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 364, 1027, 316, 365, 18, 896, 12, 3353, 16, 4555, 16, 3258, 4672, 9998, 67, 2232, 273, 306, 492, 3292, 18...
if str_i =="L":
if str_i[-1] =="L":
def __str__(self): n, p = self.n, self.p i, f = divmod(abs(n), _tento(p)) if p: # this snips off the trailing L.. (present in py1.52 but not 2.0) # -mwallace 0118.2001: frac = str(f) if frac[-1]=="L": frac = frac[:-1] frac = "0" * (p - len(frac)) + frac else: frac = "" # same for i: -mwallace str_i = str(i) if str_i =="L": str_i =str_i[:-1] return "-"[:n<0] + str_i + "." + frac
73d92b5e3012f8edc640d36c60015cd361b141a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8821/73d92b5e3012f8edc640d36c60015cd361b141a7/FixedPoint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 290, 16, 293, 273, 365, 18, 82, 16, 365, 18, 84, 277, 16, 284, 273, 26105, 12, 5113, 12, 82, 3631, 389, 88, 29565, 12, 84, 3719, 309, 293, 30, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 290, 16, 293, 273, 365, 18, 82, 16, 365, 18, 84, 277, 16, 284, 273, 26105, 12, 5113, 12, 82, 3631, 389, 88, 29565, 12, 84, 3719, 309, 293, 30, 468, ...
ie = str(i).replace("\\","\\\\").replace("\"","\\\"").replace("'","\\'")
ie = repr(i).replace("\\","\\\\").replace("\"","\\\"").replace("'","\\'")
def values_js(self): """ Returns Javascript array representation of values or null if display_value is False
38db030d69cb875eb022db54b1de712485c90d6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/38db030d69cb875eb022db54b1de712485c90d6c/interact.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 924, 67, 2924, 12, 2890, 4672, 3536, 2860, 22326, 526, 4335, 434, 924, 578, 446, 309, 2562, 67, 1132, 353, 1083, 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, 924, 67, 2924, 12, 2890, 4672, 3536, 2860, 22326, 526, 4335, 434, 924, 578, 446, 309, 2562, 67, 1132, 353, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
os.system('%s "%s"'%(KONQUEROR,path))
os.system('%s "%s" &'%(KONQUEROR,path))
def browse_folder(self): """Browse folder""" if self.app.children: child = self.app.childActive if hasattr(child,'fileName'): path = info.dirname(child.fileName) if not os.path.exists(path): path = os.getcwd() else: path = os.getcwd() if os.path.exists(THUNAR): os.system('%s "%s"'%(THUNAR,path)) elif os.path.exists(NAUTILUS): os.system('%s "%s"'%(NAUTILUS,path)) elif os.path.exists(DOLPHIN): os.system('%s "%s"'%(DOLPHIN,path)) elif os.path.exists(KONQUEROR): os.system('%s "%s"'%(KONQUEROR,path)) elif os.path.exists(PCMANFM): os.system('%s "%s"'%(PCMANFM,path)) else: if path[0] == '/': path = 'file://'+path webbrowser.open(path)
3297a811fde121a34b04e766bb0d64586dae5601 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2464/3297a811fde121a34b04e766bb0d64586dae5601/Parent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 67, 5609, 12, 2890, 4672, 3536, 27304, 3009, 8395, 309, 365, 18, 2910, 18, 5906, 30, 1151, 6647, 273, 365, 18, 2910, 18, 3624, 3896, 309, 3859, 12, 3624, 11189, 17812, 11, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 67, 5609, 12, 2890, 4672, 3536, 27304, 3009, 8395, 309, 365, 18, 2910, 18, 5906, 30, 1151, 6647, 273, 365, 18, 2910, 18, 3624, 3896, 309, 3859, 12, 3624, 11189, 17812, 11, 4672, ...
self.baseFilename = filename
self.baseFilename = os.path.abspath(filename)
def __init__(self, filename, mode="a"): """ Open the specified file and use it as the stream for logging. """ StreamHandler.__init__(self, open(filename, mode)) self.baseFilename = filename self.mode = mode
4bbab2bde4fa7df27d9b9f04793d53d4754e22b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4bbab2bde4fa7df27d9b9f04793d53d4754e22b4/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 1965, 1546, 69, 6, 4672, 3536, 3502, 326, 1269, 585, 471, 999, 518, 487, 326, 1407, 364, 2907, 18, 3536, 25262, 16186, 2738, 972, 12, 2890, 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, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 1965, 1546, 69, 6, 4672, 3536, 3502, 326, 1269, 585, 471, 999, 518, 487, 326, 1407, 364, 2907, 18, 3536, 25262, 16186, 2738, 972, 12, 2890, 16,...
self.remotepath = remotepath
self.remotepath = remotepath.rstrip('/')
def __init__(self, remotepath): StaticDirect.__init__(self) self.remotepath = remotepath
9bb9bafe7ddd58d047d4ec79e202266051c27763 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8420/9bb9bafe7ddd58d047d4ec79e202266051c27763/staticdirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2632, 803, 4672, 10901, 5368, 16186, 2738, 972, 12, 2890, 13, 365, 18, 7222, 803, 273, 2632, 803, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2632, 803, 4672, 10901, 5368, 16186, 2738, 972, 12, 2890, 13, 365, 18, 7222, 803, 273, 2632, 803, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
new_table_set_col_attr(self.__connection__, table, self.__skeleton__[table])
new_table_set_col_attr(self.__connection__, table_name, self.__skeleton__[table_name])
def add_column(self, table, col_name, attr_dict, default='NULL'): """ Takes a while, thanks to SQLite...
85d02cb25b26fc015382d67ed0b0b5b5529e5568 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/85d02cb25b26fc015382d67ed0b0b5b5529e5568/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2827, 12, 2890, 16, 1014, 16, 645, 67, 529, 16, 1604, 67, 1576, 16, 805, 2218, 8560, 11, 4672, 3536, 23004, 279, 1323, 16, 286, 19965, 358, 16192, 2777, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 527, 67, 2827, 12, 2890, 16, 1014, 16, 645, 67, 529, 16, 1604, 67, 1576, 16, 805, 2218, 8560, 11, 4672, 3536, 23004, 279, 1323, 16, 286, 19965, 358, 16192, 2777, 2, -100, -100, -100, ...
self.TASKS_TV_COL_TAG = 1 self.TASKS_TV_COL_TITLE = 2 self.TASKS_TV_COL_DDATE = 3 self.TASKS_TV_COL_DLEFT = 4 self.TAGS_TV_COL_TAG = 1 self.CTASKS_TV_COL_TITLE = 2 self.CTASKS_TV_COL_DDATE = 3
self.TASKS_TV_COL_TAG = 1 self.TASKS_TV_COL_TITLE = 2 self.TASKS_TV_COL_DDATE = 3 self.TASKS_TV_COL_DLEFT = 4 self.TAGS_TV_COL_TAG = 1 self.CTASKS_TV_COL_TITLE = 2 self.CTASKS_TV_COL_DDATE = 3
def __init__(self, requester, config): self.priv = {} # Set the configuration dictionary self.config = config #The collapsed tasks self.priv["collapsed_tid"] = [] #Set the Glade file self.gladefile = GnomeConfig.GLADE_FILE self.wTree = gtk.glade.XML(self.gladefile) #Get the Main Window, and connect the "destroy" event self.window = self.wTree.get_widget("MainWindow") if (self.window): self.window.connect("destroy", gtk.main_quit) self.window.set_icon_from_file("data/16x16/app/gtg.png")
612537b0c84eca4937fc82d2e663530bca28c69e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/612537b0c84eca4937fc82d2e663530bca28c69e/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 19961, 16, 642, 4672, 225, 365, 18, 11365, 273, 2618, 225, 468, 1000, 326, 1664, 3880, 365, 18, 1425, 273, 642, 225, 468, 1986, 17027, 4592, 365, 18, 113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 19961, 16, 642, 4672, 225, 365, 18, 11365, 273, 2618, 225, 468, 1000, 326, 1664, 3880, 365, 18, 1425, 273, 642, 225, 468, 1986, 17027, 4592, 365, 18, 113...
WHERE treepath_id=pid
WHERE treepath_id = pid
def ddl_prog(db): safe_query(db, "CREATE LANGUAGE 'plpgsql'") cursor = db.cursor() cursor.execute(""" CREATE OR REPLACE FUNCTION share_update() RETURNS trigger AS $$BEGIN IF NEW.tree_id != OLD.tree_id AND OLD.tree_id IS NOT NULL THEN RAISE EXCEPTION 'tree_id cannot be changed (share_id=%)', NEW.share_id; END IF; IF NEW.state != OLD.state THEN NEW.last_state_change = 'now'; END IF; RETURN NEW; END;$$ LANGUAGE 'plpgsql' VOLATILE COST 100; CREATE TRIGGER share_update_trigger BEFORE UPDATE ON shares FOR EACH ROW EXECUTE PROCEDURE share_update(); CREATE OR REPLACE FUNCTION share_insert() RETURNS trigger AS $$BEGIN INSERT INTO trees (share_id) VALUES (NEW.share_id) RETURNING tree_id INTO STRICT NEW.tree_id; UPDATE shares SET tree_id=NEW.tree_id WHERE share_id=NEW.share_id; RETURN NEW; END;$$ LANGUAGE 'plpgsql' VOLATILE COST 100; CREATE TRIGGER share_insert_trigger AFTER INSERT ON shares FOR EACH ROW EXECUTE PROCEDURE share_insert(); CREATE OR REPLACE FUNCTION path_goup( tree integer, INOUT pathid integer, levels integer, OUT pathoffset integer) AS $$DECLARE result RECORD; lvl integer := levels - 1; BEGIN IF lvl < 0 THEN RAISE EXCEPTION 'invalid parameter'; END IF; LOOP SELECT parent_id, parentfile_id FROM paths WHERE tree_id = tree AND treepath_id = pathid INTO STRICT result; pathid := result.parent_id; IF pathid = 0 THEN RAISE EXCEPTION 'too early root'; END IF; IF lvl = 0 THEN pathoffset := result.parentfile_id; RETURN; END IF; lvl := lvl - 1; END LOOP; END;$$ LANGUAGE 'plpgsql' VOLATILE COST 500; CREATE OR REPLACE FUNCTION push_path_files(tid integer, pid integer) RETURNS void AS $$DECLARE newcurs NO SCROLL CURSOR FOR SELECT pathfile_id FROM newfiles WHERE treepath_id=pid ORDER BY pathfile_id; newrec record; oldrec record; N integer := 0; BEGIN OPEN newcurs; FETCH newcurs INTO newrec; FOR oldrec IN SELECT file_id,pathfile_id FROM files WHERE tree_id=tid AND treepath_id=pid ORDER BY pathfile_id LOOP WHILE newrec IS NOT NULL AND N = newrec.pathfile_id LOOP FETCH newcurs INTO newrec; N := N + 1; END LOOP; IF newrec IS NOT NULL AND N > newrec.pathfile_id THEN RAISE check_violation; END IF; IF NOT N = oldrec.pathfile_id THEN UPDATE files SET pathfile_id=N WHERE file_id=oldrec.file_id; END IF; N := N + 1; END LOOP; CLOSE newcurs; INSERT INTO files SELECT * FROM newfiles WHERE treepath_id=pid; DELETE FROM newfiles WHERE treepath_id=pid; END;$$ LANGUAGE 'plpgsql' VOLATILE COST 1000; """)
50cca82fa13987b2bb1ce176081364ba1005c60d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4762/50cca82fa13987b2bb1ce176081364ba1005c60d/dbinit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24183, 67, 14654, 12, 1966, 4672, 4183, 67, 2271, 12, 1966, 16, 315, 9344, 24748, 296, 412, 84, 30175, 4970, 13, 3347, 273, 1319, 18, 9216, 1435, 3347, 18, 8837, 2932, 3660, 13278, 4869,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24183, 67, 14654, 12, 1966, 4672, 4183, 67, 2271, 12, 1966, 16, 315, 9344, 24748, 296, 412, 84, 30175, 4970, 13, 3347, 273, 1319, 18, 9216, 1435, 3347, 18, 8837, 2932, 3660, 13278, 4869,...
restartme = False
def main(): """ <Purpose> Has an infinite loop where we sleep for 5-55 minutes, then check for updates. If an update happens, we will restart ourselves and/or the node manager as necesary. <Arguments> None <Exceptions> Any non-RsyncError exceptions from do_rsync. <Side Effects> If there is an update on the update site we are checking, it will be grabbed eventually. <Return> Will not return. Either an exception will be thrown, we exit because we are restarting, or we loop infinitely. """ # This is similar to init only: # 1) we loop / sleep # 2) we restart ourselves if we are updated # 3) we restart our client if they are updated # If this is true, I need to be restarted... Once True it will never be # False again restartme = False while True: # sleep for 5-55 minutes for junk in range(random.randint(10, 110)): # We need to wake up every 30 seconds otherwise we will take # the full 5-55 minutes before we die when someone tries to # kill us nicely. misc.do_sleep(30) # Make sure we still have the process lock. # If not, we should exit if not runonce.stillhaveprocesslock('softwareupdater.old'): safe_log('[main] We no longer have the processlock\n') sys.exit(55) # Make sure that if we failed somehow to restart, we keep trying before # every time we try to update. - Brent if restartme: restart_software_updater() # where I'll put files... tempdir = tempfile.mkdtemp()+"/" # I'll clean this up in a minute try: updatedlist = do_rsync(softwareurl, "./",tempdir) except RsyncError: # oops, hopefully this will be fixed next time... continue finally: shutil.rmtree(tempdir) # no updates :) Let's wait again... if updatedlist == []: continue # if there were updates, the metainfo file should be one of them... assert('metainfo' in updatedlist) clientlist = updatedlist[:] if 'softwareupdater.py' in clientlist: restartme = True clientlist.remove('softwareupdater.py') # if the client software changed, let's update it! if clientlist != []: restart_client(clientlist) # oh! I've changed too. I should restart... search for MUTEX for info if restartme: restart_software_updater()
f4b206ed7176d3429387648cbb9cf1a4d36ce272 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/f4b206ed7176d3429387648cbb9cf1a4d36ce272/softwareupdater.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 411, 10262, 4150, 34, 4393, 392, 14853, 2798, 1625, 732, 5329, 364, 1381, 17, 2539, 6824, 16, 1508, 866, 364, 4533, 18, 225, 971, 392, 1089, 10555, 16, 732, 903, 7870,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3536, 411, 10262, 4150, 34, 4393, 392, 14853, 2798, 1625, 732, 5329, 364, 1381, 17, 2539, 6824, 16, 1508, 866, 364, 4533, 18, 225, 971, 392, 1089, 10555, 16, 732, 903, 7870,...
def create_drivers(python_exe, target_dir, package_name, source_dir):
def create_drivers(python_exe, precall_commands, target_dir, package_name, source_dir):
def create_drivers(python_exe, target_dir, package_name, source_dir): if (not isdir(source_dir)): return print "Processing:", source_dir for file_name in os.listdir(source_dir): create_driver( python_exe=python_exe, target_dir=target_dir, package_name=package_name, source_dir=source_dir, file_name=file_name)
bd4e189000c88782b6bca6da6a0e88d1de29a407 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/bd4e189000c88782b6bca6da6a0e88d1de29a407/refresh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3069, 6760, 12, 8103, 67, 14880, 16, 675, 1991, 67, 7847, 16, 1018, 67, 1214, 16, 2181, 67, 529, 16, 1084, 67, 1214, 4672, 309, 261, 902, 9783, 12, 3168, 67, 1214, 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, 752, 67, 3069, 6760, 12, 8103, 67, 14880, 16, 675, 1991, 67, 7847, 16, 1018, 67, 1214, 16, 2181, 67, 529, 16, 1084, 67, 1214, 4672, 309, 261, 902, 9783, 12, 3168, 67, 1214, 3719, 30,...
b1 = Button(but_frame, command=set_chapter, text='set chapter')
def exit_mplayer(): # send bogus edl command so mplayer sends last edl_mark send_command('edl_mark') # send quit and destroy frame send_command('quit') container.frame.destroy() # need a sleep to make sure mplayer gives up its data time.sleep(1) f = open(editlist) c = f.read() f.close() # convert text from opened file to HH:MM:SS times = [ float(t) for t in shlex.split(c) if not t == '0' ] # remove bogus edl_mark times.pop(-1) # insert mandatory 1st chapter times.insert(0, 0.0) chapters = [] for t in times: chapters.append(time.strftime('%H:%M:%S', time.gmtime(t))) time_codes = "'%s'" %','.join(chapters) print '-chapters %s' %time_codes
c5f7e6b8a9a7745fd9188485d42c7137ae9ae749 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4675/c5f7e6b8a9a7745fd9188485d42c7137ae9ae749/appcontainer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 67, 81, 14872, 13332, 468, 1366, 324, 28774, 1675, 80, 1296, 1427, 312, 14872, 9573, 1142, 1675, 80, 67, 3355, 1366, 67, 3076, 2668, 329, 80, 67, 3355, 6134, 468, 1366, 9706, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 67, 81, 14872, 13332, 468, 1366, 324, 28774, 1675, 80, 1296, 1427, 312, 14872, 9573, 1142, 1675, 80, 67, 3355, 1366, 67, 3076, 2668, 329, 80, 67, 3355, 6134, 468, 1366, 9706, 471, ...
return False, None, True
DEFAULT_RETVAL = False, None, None, True if USE_GETARGSPEC: from debug import print_compact_traceback try: import inspect try: res = inspect.getargspec(func1) except TypeError: if DEBUG_USE_GETARGSPEC_TypeError: print "USE_GETARGSPEC TypeError for %r: " % (func1,) return DEFAULT_RETVAL else: if DEBUG_GETARGSPEC: print "inspect.getargspec(%r) = %r" % (func1, res) args, varargs, varkw, defaults = res if args and args[0] == 'self': args0 = args args = args[1:] if defaults is not None and len(defaults) == len(args0): print "USE_GETARGSPEC sees default value for self in %r argspec %r" % (func1, res) defaults = defaults[1:] if DEBUG_GETARGSPEC: print "removed self, leaving %r" % ((args, varargs, varkw, defaults),) pass else: assert type(args) == type([]) if DEBUG_GETARGSPEC: print "USE_GETARGSPEC sees first arg not self:", args success = True maxargs = minargs = len(args) if defaults: minargs -= len(defaults) if varargs: maxargs = None any_kws_ok = not not varkw return success, minargs, maxargs, any_kws_ok except: print_compact_traceback("USE_GETARGSPEC failed for %r: " % (func1,) ) pass return DEFAULT_RETVAL
def args_info(func1): """ Given a function or method object, try to find out what argument lists it can accept. Return value is a tuple (success, maxargs, kws_ok), where success is a boolean saying whether we succeeded in finding out anything for sure (if not, the other tuple elements are "loose guesses"); maxargs is the maximum number of positional args the function can be called with, according to introspection, or None if this is infinite or we can't tell; and kws_ok says whether the function can accept any keyword arguments (or is True if we can't tell). """ return False, None, True # stub - return values represent complete uncertainty; # TODO: to do this right, we should use code from some introspection module, # such as inspect.getargspec, # but have a fallback to the above values in case that fails for # certain kinds of callables.
aedf05b9ed0e7a1c49be3b6dcec0f67383272675 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/aedf05b9ed0e7a1c49be3b6dcec0f67383272675/undo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 833, 67, 1376, 12, 644, 21, 4672, 3536, 16803, 279, 445, 578, 707, 733, 16, 775, 358, 1104, 596, 4121, 1237, 6035, 518, 848, 2791, 18, 2000, 460, 353, 279, 3193, 261, 4768, 16, 943, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 833, 67, 1376, 12, 644, 21, 4672, 3536, 16803, 279, 445, 578, 707, 733, 16, 775, 358, 1104, 596, 4121, 1237, 6035, 518, 848, 2791, 18, 2000, 460, 353, 279, 3193, 261, 4768, 16, 943, ...
if self._style == "coroots" and all(xv in ZZ for xv in x):
if self._style == "coroots" and isinstance(x, tuple) and all(xv in ZZ for xv in x):
def __call__(self, *args): """ Coerces the element into the ring. You may pass a vector in the ambient space, an element of the base_ring, or an argument list of integers (or half-integers for the spin types) which are the components of a vector in the ambient space. INPUT: - ``x`` - a ring element to be coerced; or - ``*args`` - the components of a vector EXAMPLES:: sage: A2 = WeylCharacterRing("A2") sage: [A2(x) for x in [-2,-1,0,1,2]] [-2*A2(0,0,0), -A2(0,0,0), 0, A2(0,0,0), 2*A2(0,0,0)] sage: [A2(2,1,0), A2([2,1,0]), A2(2,1,0)== A2([2,1,0])] [A2(2,1,0), A2(2,1,0), True] sage: A2([2,1,0]) == A2(2,1,0) True sage: l = -2*A2(0,0,0) - A2(1,0,0) + A2(2,0,0) + 2*A2(3,0,0) sage: [l in A2, A2(l) == l] [True, True] sage: P.<q> = QQ[] sage: A2 = WeylCharacterRing(['A',2], base_ring = P) sage: [A2(x) for x in [-2,-1,0,1,2,-2*q,-q,q,2*q,(1-q)]] [-2*A2(0,0,0), -A2(0,0,0), 0, A2(0,0,0), 2*A2(0,0,0), -2*q*A2(0,0,0), -q*A2(0,0,0), q*A2(0,0,0), 2*q*A2(0,0,0), (-q+1)*A2(0,0,0)] """ if len(args) == 1: x = args[0] else: x = args
b480db255270211773e98102337c791ce0f564d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b480db255270211773e98102337c791ce0f564d5/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 3536, 7695, 264, 764, 326, 930, 1368, 326, 9221, 18, 4554, 2026, 1342, 279, 3806, 316, 326, 13232, 1979, 3476, 16, 392, 930, 434, 326, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 3536, 7695, 264, 764, 326, 930, 1368, 326, 9221, 18, 4554, 2026, 1342, 279, 3806, 316, 326, 13232, 1979, 3476, 16, 392, 930, 434, 326, 1...
self.logger.critical(_('Importing GPG key 0x%s "%s" from %s') % (hexkeyid, userid, keyurl.replace("file://","")))
self.logger.critical(_('Importing GPG key 0x%s "%s" from %s') % (hexkeyid, to_unicode(userid), keyurl.replace("file://","")))
def getKeyForPackage(self, po, askcb = None, fullaskcb = None): """ Retrieve a key for a package. If needed, prompt for if the key should be imported using askcb. @param po: Package object to retrieve the key of. @param askcb: Callback function to use for asking for verification. Takes arguments of the po, the userid for the key, and the keyid. @param fullaskcb: Callback function to use for asking for verification of a key. Differs from askcb in that it gets passed a dictionary so that we can expand the values passed. """ repo = self.repos.getRepo(po.repoid) keyurls = repo.gpgkey key_installed = False
90d6fcab18952b36790be737526164c165b6ac53 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/90d6fcab18952b36790be737526164c165b6ac53/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3579, 1290, 2261, 12, 2890, 16, 8275, 16, 6827, 7358, 273, 599, 16, 1983, 835, 7358, 273, 599, 4672, 3536, 10708, 279, 498, 364, 279, 2181, 18, 971, 3577, 16, 6866, 364, 309, 326, 498,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3579, 1290, 2261, 12, 2890, 16, 8275, 16, 6827, 7358, 273, 599, 16, 1983, 835, 7358, 273, 599, 4672, 3536, 10708, 279, 498, 364, 279, 2181, 18, 971, 3577, 16, 6866, 364, 309, 326, 498,...
br.open(self.LOGIN) br.select_form(name='connexion') br['login'] = self.username br['mdp' ] = self.password br.submit()
data = urllib.urlencode({ 'action':'login_action' ,'r':self.INDEX+'/us/' ,'login':self.username ,'mdp':self.password }) br.open(self.LOGIN,data)
def get_browser(self): br = BasicNewsRecipe.get_browser() if self.username is not None and self.password is not None: br.open(self.LOGIN) br.select_form(name='connexion') br['login'] = self.username br['mdp' ] = self.password br.submit() return br
ec8431579d66eb5b6fd1c475997a500fd8889185 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/ec8431579d66eb5b6fd1c475997a500fd8889185/recipe_tomshardware.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11213, 12, 2890, 4672, 5186, 273, 7651, 17948, 5650, 3151, 18, 588, 67, 11213, 1435, 309, 365, 18, 5053, 353, 486, 599, 471, 365, 18, 3664, 353, 486, 599, 30, 501, 273, 11527,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11213, 12, 2890, 4672, 5186, 273, 7651, 17948, 5650, 3151, 18, 588, 67, 11213, 1435, 309, 365, 18, 5053, 353, 486, 599, 471, 365, 18, 3664, 353, 486, 599, 30, 501, 273, 11527,...
self["actions"] = NumberActionMap(["SetupActions"],
self["actions"] = NumberActionMap(["SetupActions", "ColorActions"],
def __init__(self, session, iface,essid=None, aplist=None): Screen.__init__(self, session) self.session = session self.iface = iface self.essid = essid self.aplist = aplist self.extended = None self.oldInterfaceState = iNetwork.getAdapterAttribute(self.iface, "up") iNetwork.getInterfaces()
b6c21aa27e2a782996c625bc6e85a466bd7c9932 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/b6c21aa27e2a782996c625bc6e85a466bd7c9932/NetworkSetup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 9751, 16, 403, 350, 33, 7036, 16, 279, 17842, 33, 7036, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 365, 18, 3184, 273, 1339, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 9751, 16, 403, 350, 33, 7036, 16, 279, 17842, 33, 7036, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 365, 18, 3184, 273, 1339, 365, ...
self.zonesTriggersCheckBox.setChecked(zoneTriggers)
self.zonesTriggersCheckBox.setChecked(zonetriggers)
def __init__(self, lights, gameObjects, entities, zones, zonelights, zonetriggers, parent = None): super(ExplorerOptionsDlg, self).__init__(parent) buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) layout = QVBoxLayout() self.lightCheckBox = QCheckBox("Show Lights") self.lightCheckBox.setChecked(lights) layout.addWidget(self.lightCheckBox) self.gameObjectsCheckBox = QCheckBox("Show Game-Objects") self.gameObjectsCheckBox.setChecked(gameObjects) layout.addWidget(self.gameObjectsCheckBox) self.entitiesCheckBox = QCheckBox("Show Entities") self.entitiesCheckBox.setChecked(entities) layout.addWidget(self.entitiesCheckBox) self.zonesCheckBox = QCheckBox("Show Zones") self.zonesCheckBox.setChecked(zones) layout.addWidget(self.zonesCheckBox) self.zoneslightsCheckBox = QCheckBox("Show Zonelights") self.zoneslightsCheckBox.setChecked(zonelights) layout.addWidget(self.zoneslightsCheckBox) self.zonesTriggersCheckBox = QCheckBox("Show Zonetriggers") self.zonesTriggersCheckBox.setChecked(zoneTriggers) layout.addWidget(self.zonesTriggersCheckBox) layout.addWidget(buttonBox) layout.setContentsMargins(2, 2, 2, 2) self.setLayout(layout) self.connect(buttonBox, SIGNAL("accepted()"), self, SLOT("accept()")) self.connect(buttonBox, SIGNAL("rejected()"), self, SLOT("reject()"))
757478a3f30b6509128d1c36147afa4b00481ede /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2792/757478a3f30b6509128d1c36147afa4b00481ede/ModuleExplorer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 26269, 16, 7920, 4710, 16, 5140, 16, 13975, 16, 998, 265, 292, 10730, 16, 998, 265, 16354, 8060, 16, 982, 273, 599, 4672, 2240, 12, 20938, 1320, 40, 2362...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 26269, 16, 7920, 4710, 16, 5140, 16, 13975, 16, 998, 265, 292, 10730, 16, 998, 265, 16354, 8060, 16, 982, 273, 599, 4672, 2240, 12, 20938, 1320, 40, 2362...
finally: fileobj.close() os.unlink(name)
def compare_dialect_123(self, expected, *writeargs, **kwwriteargs): with TemporaryFile("w+b") as fileobj: writer = csv.writer(fileobj, *writeargs, **kwwriteargs) writer.writerow([1,2,3]) fileobj.seek(0) self.assertEqual(str(fileobj.read()), expected)
def test_space_dialect(self): class space(csv.excel): delimiter = " " quoting = csv.QUOTE_NONE escapechar = "\\"
4626458cc57b73dc01edf4987bbc3fe1d4437e59 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/4626458cc57b73dc01edf4987bbc3fe1d4437e59/test_csv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2981, 67, 25909, 386, 12, 2890, 4672, 667, 3476, 12, 6715, 18, 24121, 4672, 5654, 273, 315, 315, 29911, 273, 6101, 18, 18980, 67, 9826, 4114, 3001, 273, 14520, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2981, 67, 25909, 386, 12, 2890, 4672, 667, 3476, 12, 6715, 18, 24121, 4672, 5654, 273, 315, 315, 29911, 273, 6101, 18, 18980, 67, 9826, 4114, 3001, 273, 14520, 2, -100, -100, ...
def open(self, version=None, transaction_manager=None):
def open(self, version=None, before=None, transaction_manager=None):
def open(self, version=None, transaction_manager=None): if version: raise ValueError("Versions are not supported by this database.") m = ConnectionManager(self, self.database_name) m.open(transaction_manager) return m
a1b94ae5b0f7abb81f45a0a0c9870d9cdc02207c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6392/a1b94ae5b0f7abb81f45a0a0c9870d9cdc02207c/db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 1177, 33, 7036, 16, 1865, 33, 7036, 16, 2492, 67, 4181, 33, 7036, 4672, 309, 1177, 30, 1002, 2068, 2932, 5940, 854, 486, 3260, 635, 333, 2063, 1199, 13, 312, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 1177, 33, 7036, 16, 1865, 33, 7036, 16, 2492, 67, 4181, 33, 7036, 4672, 309, 1177, 30, 1002, 2068, 2932, 5940, 854, 486, 3260, 635, 333, 2063, 1199, 13, 312, 273, ...
assert self.api_helper.is_usable(), 'invalid base URL %r' % base_url
assert self.api_helper.is_usable(), 'invalid base URL %r' % base_url
def __init__(self, base_url=None, username=None, password=None, api_helper=None): """ @param base_url: base URL of a MediaWiki, e.g. 'http://en.wikipedia.org/w/' @type base_url: basestring @param api_helper: APIHelper instance @type api_helper: L{APIHelper} """ if api_helper is not None: assert base_url is None, 'either api_helper or base_url can be given, not both' self.api_helper = api_helper else: self.api_helper = APIHelper(base_url) assert self.api_helper.is_usable(), 'invalid base URL %r' % base_url if username is not None: self.login(username, password) self.tmpdir = tempfile.mkdtemp()
b286c804ad3fc1d976e00667e808e115438d094e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/b286c804ad3fc1d976e00667e808e115438d094e/mwapidb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1026, 67, 718, 33, 7036, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 1536, 67, 4759, 33, 7036, 4672, 3536, 632, 891, 1026, 67, 718, 30, 1026, 1976, 434...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1026, 67, 718, 33, 7036, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 1536, 67, 4759, 33, 7036, 4672, 3536, 632, 891, 1026, 67, 718, 30, 1026, 1976, 434...
return self._executeSingleFileCatalogFunction(lfn,'removeDirectory',catalogs=catalogs) else: return self._executeFileCatalogFunction(lfn,'removeDirectory',catalogs=catalogs) class CatalogLink(CatalogBase): def getCatalogIsLink(self,lfn,singleFile=False,catalogs=[]):
return self._executeSingleFileCatalogFunction( lfn, 'removeDirectory', catalogs=catalogs ) else: return self._executeFileCatalogFunction( lfn, 'removeDirectory', catalogs=catalogs ) class CatalogLink( CatalogBase ): def getCatalogIsLink( self, lfn, singleFile=False, catalogs=[] ):
def removeCatalogDirectory(self,lfn,singleFile=False,catalogs=[]): """ Remove the directory supplied from the FileCatalog
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 9769, 2853, 12, 2890, 16, 80, 4293, 16, 7526, 812, 33, 8381, 16, 2574, 287, 14072, 33, 8526, 4672, 3536, 3581, 326, 1867, 4580, 628, 326, 1387, 9769, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 9769, 2853, 12, 2890, 16, 80, 4293, 16, 7526, 812, 33, 8381, 16, 2574, 287, 14072, 33, 8526, 4672, 3536, 3581, 326, 1867, 4580, 628, 326, 1387, 9769, 2, -100, -100, -100, -100, -...
mbox = '/usr/mail/' + mbox
if os.path.isfile('/var/mail/' + mbox): mbox = '/var/mail/' + mbox else: mbox = '/usr/mail/' + mbox
def _test(): import sys args = sys.argv[1:] if not args: for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER': if os.environ.has_key(key): mbox = os.environ[key] break else: print "$MAIL, $LOGNAME nor $USER set -- who are you?" return else: mbox = args[0] if mbox[:1] == '+': mbox = os.environ['HOME'] + '/Mail/' + mbox[1:] elif not '/' in mbox: mbox = '/usr/mail/' + mbox if os.path.isdir(mbox): if os.path.isdir(os.path.join(mbox, 'cur')): mb = Maildir(mbox) else: mb = MHMailbox(mbox) else: fp = open(mbox, 'r') mb = PortableUnixMailbox(fp) msgs = [] while 1: msg = mb.next() if msg is None: break msgs.append(msg) if len(args) <= 1: msg.fp = None if len(args) > 1: num = int(args[1]) print 'Message %d body:'%num msg = msgs[num-1] msg.rewindbody() sys.stdout.write(msg.fp.read()) else: print 'Mailbox',mbox,'has',len(msgs),'messages:' for msg in msgs: f = msg.getheader('from') or "" s = msg.getheader('subject') or "" d = msg.getheader('date') or "" print '-%20.20s %20.20s %-30.30s'%(f, d[5:], s)
c7e642a9c5b52ff7b11f3ce0837ba548c01ffb83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c7e642a9c5b52ff7b11f3ce0837ba548c01ffb83/mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 2589, 225, 833, 273, 2589, 18, 19485, 63, 21, 26894, 309, 486, 833, 30, 364, 498, 316, 296, 18191, 4537, 2187, 296, 18191, 2187, 296, 4842, 1985, 2187, 296, 4714,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3813, 13332, 1930, 2589, 225, 833, 273, 2589, 18, 19485, 63, 21, 26894, 309, 486, 833, 30, 364, 498, 316, 296, 18191, 4537, 2187, 296, 18191, 2187, 296, 4842, 1985, 2187, 296, 4714,...
self.copy_file(name, outfile, preserve_mode = 0)
self.copy_file(os.path.join(package_dir, name), outfile, preserve_mode = 0)
def run(self): # Copies all .py files, then also copies the txt and gif files build_py.run(self) assert self.packages == [idlelib] for name in txt_files: outfile = self.get_plain_outfile(self.build_lib, [idlelib], name) dir = os.path.dirname(outfile) self.mkpath(dir) self.copy_file(name, outfile, preserve_mode = 0) for name in Icons: outfile = self.get_plain_outfile(self.build_lib, [idlelib,"Icons"], name) dir = os.path.dirname(outfile) self.mkpath(dir) self.copy_file(os.path.join("Icons",name), outfile, preserve_mode = 0)
a3c4ce3d80ef72974f6f47d101fc7671bea4c55b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a3c4ce3d80ef72974f6f47d101fc7671bea4c55b/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 28506, 606, 777, 263, 2074, 1390, 16, 1508, 2546, 13200, 326, 6463, 471, 27618, 1390, 1361, 67, 2074, 18, 2681, 12, 2890, 13, 1815, 365, 18, 10308, 422, 306, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 28506, 606, 777, 263, 2074, 1390, 16, 1508, 2546, 13200, 326, 6463, 471, 27618, 1390, 1361, 67, 2074, 18, 2681, 12, 2890, 13, 1815, 365, 18, 10308, 422, 306, ...
if options.parseEscape == True:
if self.options.parseEscape == True:
def WriteToLogFile(self, event, options): loggable = self.OpenLogFile(event, options.noLog) if not loggable: # if the program is in the no-log list, we return without writing to log. if self.debug: print "not loggable, we are outta here" return if self.debug: print "loggable, lets log it" asciiSubset = [8,9,10,13,27] #backspace, tab, line feed, carriage return, escape asciiSubset.extend(range(32,128)) #all normal printable chars if options.parseBackspace == True: asciiSubset.remove(8) #remove backspace from allowed chars if needed if options.parseEscape == True: asciiSubset.remove(27) #remove escape from allowed chars if needed
dfb99526964aa03afee28899fea5ce92dc6c5039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3638/dfb99526964aa03afee28899fea5ce92dc6c5039/logwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21991, 19103, 12, 2890, 16, 871, 16, 702, 4672, 613, 8455, 273, 365, 18, 3678, 19103, 12, 2575, 16, 702, 18, 2135, 1343, 13, 225, 309, 486, 613, 8455, 30, 13491, 468, 309, 326, 5402, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21991, 19103, 12, 2890, 16, 871, 16, 702, 4672, 613, 8455, 273, 365, 18, 3678, 19103, 12, 2575, 16, 702, 18, 2135, 1343, 13, 225, 309, 486, 613, 8455, 30, 13491, 468, 309, 326, 5402, ...
namespace_packages=['hurry'],
namespace_packages=['zope'],
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
20fe8909e7e6b78b4c5829e683284188289e93e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9606/20fe8909e7e6b78b4c5829e683284188289e93e0/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100,...
req.hdf['chrome.%s.%s.active' % (category, name)] = 1
req.hdf['chrome.nav.%s.%s.active' % (category, name)] = 1
def populate_hdf(self, req, handler): """ Add chrome-related data to the HDF. """
97f28a5f59785b14feb1dcd067fe5544ba0b71b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/97f28a5f59785b14feb1dcd067fe5544ba0b71b0/chrome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6490, 67, 26428, 12, 2890, 16, 1111, 16, 1838, 4672, 3536, 1436, 18167, 17, 9243, 501, 358, 326, 21673, 18, 3536, 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, 6490, 67, 26428, 12, 2890, 16, 1111, 16, 1838, 4672, 3536, 1436, 18167, 17, 9243, 501, 358, 326, 21673, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if self.filterbox_visible: return
def boldrow(self, row): if row > -1: if self.filterbox_visible: return try: self.currentdata[row][1] = make_bold(self.currentdata[row][1]) except: pass
9e75aaec26e295cc58718bdda26c4e6b1a17b8af /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/9e75aaec26e295cc58718bdda26c4e6b1a17b8af/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13068, 492, 12, 2890, 16, 1027, 4672, 309, 1027, 405, 300, 21, 30, 775, 30, 365, 18, 2972, 892, 63, 492, 6362, 21, 65, 273, 1221, 67, 16390, 12, 2890, 18, 2972, 892, 63, 492, 6362, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13068, 492, 12, 2890, 16, 1027, 4672, 309, 1027, 405, 300, 21, 30, 775, 30, 365, 18, 2972, 892, 63, 492, 6362, 21, 65, 273, 1221, 67, 16390, 12, 2890, 18, 2972, 892, 63, 492, 6362, ...
result= self.cursor.fetchone ()
result= list (self.cursor.fetchone ())
def addUrl (self, channel, poster, url, title='<no title>', mimetype=None): now= datetime.datetime.now () date= str (now.date ()) # '16:15:50.417804' time= str (now.time ()).split ('.')[0]
f3ca82b47cee4161c7feab3493582fa9d9f83ae5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5759/f3ca82b47cee4161c7feab3493582fa9d9f83ae5/url.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1489, 261, 2890, 16, 1904, 16, 1603, 264, 16, 880, 16, 2077, 2218, 32, 2135, 2077, 1870, 16, 12595, 33, 7036, 4672, 2037, 33, 3314, 18, 6585, 18, 3338, 1832, 1509, 33, 609, 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, 1489, 261, 2890, 16, 1904, 16, 1603, 264, 16, 880, 16, 2077, 2218, 32, 2135, 2077, 1870, 16, 12595, 33, 7036, 4672, 2037, 33, 3314, 18, 6585, 18, 3338, 1832, 1509, 33, 609, 261, ...
str = self._table_header(heading)+'</TABLE>'
str = self._table_header(heading, 'details')+'</TABLE>'
def _var_details(self, variables, heading='Variable Details'): """## Return a detailed description of the variables in a class or module.""" variables = self._sort(variables) if len(variables) == 0: return '' str = self._table_header(heading)+'</TABLE>'
07991a6224980123acb6be68dd2d39634e5ac591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/07991a6224980123acb6be68dd2d39634e5ac591/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1401, 67, 6395, 12, 2890, 16, 3152, 16, 11053, 2218, 3092, 21897, 11, 4672, 3536, 1189, 2000, 279, 6864, 2477, 434, 326, 3152, 316, 279, 667, 578, 1605, 12123, 3152, 273, 365, 6315,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1401, 67, 6395, 12, 2890, 16, 3152, 16, 11053, 2218, 3092, 21897, 11, 4672, 3536, 1189, 2000, 279, 6864, 2477, 434, 326, 3152, 316, 279, 667, 578, 1605, 12123, 3152, 273, 365, 6315,...
fcntl.flock(f, fcntl.LOCK_UN)
def ensureBitArraysLoaded (): global BITS_DONE if BITS_DONE: return global bitsArray0, bitsArray1, bitsArray2, bitsArray3 if os.path.isfile (location): f = file (location, "r") fcntl.flock(f, fcntl.LOCK_EX) try: try: bitsArray0 = [array('B') for i in xrange (65536)] bitsArray1 = [array('B') for i in xrange (65536)] bitsArray2 = [array('B') for i in xrange (65536)] bitsArray3 = [array('B') for i in xrange (65536)] ord_ = ord for list in (bitsArray0, bitsArray1, bitsArray2, bitsArray3): for ar in list: l = ord_(f.read(1)) ar.fromfile(f, l) BITS_DONE = True except EOFError: pass finally: fcntl.flock(f, fcntl.LOCK_UN) f.close() if not BITS_DONE: bitsArray0 = [array('B') for i in xrange (65536)] bitsArray1 = [array('B') for i in xrange (65536)] bitsArray2 = [array('B') for i in xrange (65536)] bitsArray3 = [array('B') for i in xrange (65536)] for bits in xrange(65536): origbits = bits while bits: b = firstBit(bits) bits = clearBit(bits, b) bitsArray0[origbits].append(b-48) bitsArray1[origbits].append(b-32) bitsArray2[origbits].append(b-16) bitsArray3[origbits].append(b) if not os.path.isfile (location): out = file (location, "w") fcntl.flock(out, fcntl.LOCK_EX) fcntl.flock(out, fcntl.LOCK_UN) len_ = len chr_ = chr for ar in bitsArray0 + bitsArray1 + bitsArray2 + bitsArray3: out.write(chr_(len_(ar))) ar.tofile(out) out.close() BITS_DONE = True
3915c80cf028f30f4be0ec68735153aa97cd3200 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5339/3915c80cf028f30f4be0ec68735153aa97cd3200/bitboard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 5775, 12726, 8835, 1832, 30, 2552, 605, 10158, 67, 26875, 309, 605, 10158, 67, 26875, 30, 327, 225, 2552, 4125, 1076, 20, 16, 4125, 1076, 21, 16, 4125, 1076, 22, 16, 4125, 1076, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 5775, 12726, 8835, 1832, 30, 2552, 605, 10158, 67, 26875, 309, 605, 10158, 67, 26875, 30, 327, 225, 2552, 4125, 1076, 20, 16, 4125, 1076, 21, 16, 4125, 1076, 22, 16, 4125, 1076, ...
obj = CategorySearch(text, use_re=False, case=case)
obj = CategorySearch(text, use_re=regex, case=case)
def _single_term(self): regex = (r'(?P<NEG>-?)\s*(' + # leading '-' r'(?P<OPS>\(|\)|(or\b(?!$)))|' + # or, (, ) r'(?P<MOD>(\w+:)*)' + r'(?P<TERM>("[^"]+")|' + r"('[^']+')|(\S+)))") # search word itself self._query = self._query.strip() match = re.match(regex, self._query, re.U) if not match: return None self._query = self._query[match.end():] ops = match.group("OPS") if ops == '(': result = self._or_expression() if match.group("NEG"): result.negate() return result elif ops == ')': return None elif ops == 'or': return None modifiers = match.group('MOD').split(":")[:-1] text = match.group('TERM') if self.isQuoted(text): text = text[1:-1]
75208807c58c8c8a2bf7c91cbb12051c8ed71dfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/75208807c58c8c8a2bf7c91cbb12051c8ed71dfb/queryparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7526, 67, 6408, 12, 2890, 4672, 3936, 273, 261, 86, 11, 3680, 52, 32, 5407, 43, 34, 17, 16626, 87, 14, 2668, 397, 2868, 468, 7676, 4014, 436, 11, 3680, 52, 32, 3665, 55, 5333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7526, 67, 6408, 12, 2890, 4672, 3936, 273, 261, 86, 11, 3680, 52, 32, 5407, 43, 34, 17, 16626, 87, 14, 2668, 397, 2868, 468, 7676, 4014, 436, 11, 3680, 52, 32, 3665, 55, 5333, ...
print "kk"
def check_config(self): user = config_get('username') passw = md5(config_get('password')).hexdigest() url = config_get_url() if not user or not passw or not url: self.quick_dialog("Please visit the Preferences window to set " "QLScrobbler up. Until then, songs will not be " "submitted.", gtk.MESSAGE_INFO) self.broken = True elif (self.username, self.password, self.base_url)!=(user, passw, url): print "kk" self.username, self.password, self.base_url = (user, passw, url) self.broken = False self.handshake_sent = False self.offline = (config_get('offline') == "true") self.changed()
f06c9597cde71d0c81a36e3eb3f422dae55b7c07 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4764/f06c9597cde71d0c81a36e3eb3f422dae55b7c07/qlscrobbler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1425, 12, 2890, 4672, 729, 273, 642, 67, 588, 2668, 5053, 6134, 1342, 91, 273, 3481, 25, 12, 1425, 67, 588, 2668, 3664, 6134, 2934, 7118, 10171, 1435, 880, 273, 642, 67, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1425, 12, 2890, 4672, 729, 273, 642, 67, 588, 2668, 5053, 6134, 1342, 91, 273, 3481, 25, 12, 1425, 67, 588, 2668, 3664, 6134, 2934, 7118, 10171, 1435, 880, 273, 642, 67, 588, ...
if thread.get_ident() == ioThread:
if threadmodule.get_ident() == ioThread:
def preWait(self, key): import thread global ioThread if thread.get_ident() == ioThread: return _Waiter.preWait(self, key) import thread import threading cond = self.conditions[key] = threading.Condition() cond.acquire()
f487c5bb3d90eb7d11459e5303877cfbb82272aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f487c5bb3d90eb7d11459e5303877cfbb82272aa/threadable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 5480, 12, 2890, 16, 498, 4672, 1930, 2650, 2552, 2527, 3830, 309, 2650, 2978, 18, 588, 67, 6392, 1435, 422, 2527, 3830, 30, 327, 389, 5480, 264, 18, 1484, 5480, 12, 2890, 16, 498,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 5480, 12, 2890, 16, 498, 4672, 1930, 2650, 2552, 2527, 3830, 309, 2650, 2978, 18, 588, 67, 6392, 1435, 422, 2527, 3830, 30, 327, 389, 5480, 264, 18, 1484, 5480, 12, 2890, 16, 498,...
main()
exitstatus = main() sys.exit(exitstatus)
def _ignoreSIGCHLD(*unused): while 1: try: os.waitpid(-1, os.WNOHANG) except OSError: break
2fd4d4f40647513efac4560d36d46116f1b771c5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9658/2fd4d4f40647513efac4560d36d46116f1b771c5/zopectl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6185, 18513, 1792, 12069, 30857, 14375, 4672, 1323, 404, 30, 775, 30, 1140, 18, 7048, 6610, 19236, 21, 16, 1140, 18, 59, 3417, 44, 3388, 13, 1335, 10002, 30, 898, 282, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6185, 18513, 1792, 12069, 30857, 14375, 4672, 1323, 404, 30, 775, 30, 1140, 18, 7048, 6610, 19236, 21, 16, 1140, 18, 59, 3417, 44, 3388, 13, 1335, 10002, 30, 898, 282, 2, -100, -1...
build = self.buildfarm.get_by_checksum(build_checksum)
build = self.buildfarm.builds.get_by_checksum(build_checksum)
def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ)
8919640c3e0d3905e47b7e0d53b2157b9088ffcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/8919640c3e0d3905e47b7e0d53b2157b9088ffcb/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 646, 273, 276, 10052, 18, 974, 3245, 12, 7944, 33, 28684, 3292, 28539, 18, 2630, 17337, 5473, 33, 28684, 13, 2295, 67, 529...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 646, 273, 276, 10052, 18, 974, 3245, 12, 7944, 33, 28684, 3292, 28539, 18, 2630, 17337, 5473, 33, 28684, 13, 2295, 67, 529...
self.is_unique_set_under_symmetry()
assert self.is_unique_set_under_symmetry()
def generate_r_free_flags_on_lattice_symmetry(self, fraction=0.10, max_free=2000, max_delta=5.0, return_integer_array=False, n_partitions=None, use_dataman_shells=False, n_shells=20): # the max_number of reflections is wrst the non anomalous set n_original = self.indices().size() if n_original<=0: raise Sorry("An array of size zero is given for Free R flag generation") n_non_ano = n_original if self.anomalous_flag(): matches = self.match_bijvoet_mates()[1] n_non_ano = matches.pairs().size() + matches.n_singles() # make sure the data is unique self.is_unique_set_under_symmetry() if fraction is not None: if not (fraction > 0 and fraction < 0.5) : raise Sorry("R-free flags fraction must be greater than 0 and less "+ "than 0.5.") assert n_partitions is None assert return_integer_array is False if max_free is not None: assert fraction is not None fraction = min( n_non_ano*fraction, max_free )/float(n_non_ano) assert n_partitions is None assert return_integer_array is False if return_integer_array: assert not use_dataman_shells assert fraction is None assert max_free is None assert n_partitions > 1 #first make a set of temporary flags cb_op_to_niggli = self.change_of_basis_op_to_niggli_cell() tmp_ma = self.change_basis( cb_op_to_niggli ) # please get the lattice symmetry of th niggli cell lattice_group = lattice_symmetry.group( tmp_ma.unit_cell(), max_delta=max_delta) lattice_xs = crystal.symmetry(unit_cell=tmp_ma.unit_cell(), space_group=lattice_group, assert_is_compatible_unit_cell=False) # make some flags, and insert lattice symmetry tmp_flags = tmp_ma.array().customized_copy( crystal_symmetry = lattice_xs, data = flex.double( tmp_ma.indices().size(), 0 ) ).map_to_asu() # Carry out the merging please tmp_flags = tmp_flags.merge_equivalents().array() tmp_flags = tmp_flags.average_bijvoet_mates() n_non_ano_lat_sym = tmp_flags.indices().size() # now we can do the free r assignement in the lattice symmetry n = tmp_flags.indices().size() result = None if not return_integer_array: if use_dataman_shells : result = assign_r_free_flags_by_shells(n_refl=n, fraction_free=fraction, n_bins=n_shells) else : result = assign_random_r_free_flags(n, fraction) else: result = flex.size_t() n_times = int(n/n_partitions)+1 for ii in xrange(n_times): tmp = flex.random_double( n_partitions ) tmp = flex.sort_permutation( tmp ) result.extend( tmp ) result = flex.int( list(result[0:n]) )
a134f2d0b21534190709d4007ddbeaed470cb1f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/a134f2d0b21534190709d4007ddbeaed470cb1f0/miller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 86, 67, 9156, 67, 7133, 67, 265, 67, 80, 24966, 67, 8117, 18042, 12, 2890, 16, 8330, 33, 20, 18, 2163, 16, 943, 67, 9156, 33, 17172, 16, 943, 67, 9878, 33, 25, 18, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 86, 67, 9156, 67, 7133, 67, 265, 67, 80, 24966, 67, 8117, 18042, 12, 2890, 16, 8330, 33, 20, 18, 2163, 16, 943, 67, 9156, 33, 17172, 16, 943, 67, 9878, 33, 25, 18, 20, ...
line = self.finalize_invoice_move_lines(self, cr, uid, inv, line)
line = self.finalize_invoice_move_lines(cr, uid, inv, line)
def action_move_create(self, cr, uid, ids, *args): """Creates invoice related analytics and financial move lines""" ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') context = {} for inv in self.browse(cr, uid, ids): if inv.move_id: continue
20996ec0cb286298cf34e1a1f718c08c09579e68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/20996ec0cb286298cf34e1a1f718c08c09579e68/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 8501, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 3536, 2729, 9179, 3746, 23835, 471, 574, 19292, 649, 3635, 2362, 8395, 279, 305, 67, 2603, 273, 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, 1301, 67, 8501, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 3536, 2729, 9179, 3746, 23835, 471, 574, 19292, 649, 3635, 2362, 8395, 279, 305, 67, 2603, 273, 3...
(iclasses,iexcepts) = self._split_classes(doc.imported_classes()) self._write_imports(public, private, iclasses, iexcepts, doc.imported_functions(), doc.imported_variables()) self._write_func_details(public, private, doc.functions(), None)
if self._show_imports: self._write_imports(public, private, doc) self._write_func_details(public, private, doc, doc.functions())
def _write_module(self, public, private, uid, doc): # Write the header, navbar, & module 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, 2978, 12, 2890, 16, 1071, 16, 3238, 16, 4555, 16, 997, 4672, 468, 2598, 326, 1446, 16, 8775, 3215, 16, 473, 1605, 508, 609, 273, 365, 6315, 3374, 12, 1911, 18, 529, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 2978, 12, 2890, 16, 1071, 16, 3238, 16, 4555, 16, 997, 4672, 468, 2598, 326, 1446, 16, 8775, 3215, 16, 473, 1605, 508, 609, 273, 365, 6315, 3374, 12, 1911, 18, 529, 10...
self, os.unlink, args=(self._address,), exitpriority=0
self, os.unlink, args=(address,), exitpriority=0
def __init__(self, address, family, backlog=1): self._socket = socket.socket(getattr(socket, family)) self._socket.bind(address) self._socket.listen(backlog) self._family = family self._last_accepted = None
1df88dc76200b2b982eec64f36d4ad59361c7115 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/1df88dc76200b2b982eec64f36d4ad59361c7115/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1758, 16, 6755, 16, 1473, 1330, 33, 21, 4672, 365, 6315, 7814, 273, 2987, 18, 7814, 12, 588, 1747, 12, 7814, 16, 6755, 3719, 365, 6315, 7814, 18, 4376, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1758, 16, 6755, 16, 1473, 1330, 33, 21, 4672, 365, 6315, 7814, 273, 2987, 18, 7814, 12, 588, 1747, 12, 7814, 16, 6755, 3719, 365, 6315, 7814, 18, 4376, ...
'<input type=\'text\' value=\'1\' size=80 onchange=\'interact(0, "sage.server.notebook.interact.update(0, \\"theta\\", ..., sage.server.notebook.interact.standard_b64decode(\\""+encode64(this.value)+"\\"), globals())")\'></input>'
'<input type=\'text\' value="1" size=80 onchange=\'interact(0, "sage.server.notebook.interact.update(0, \\"theta\\", ..., sage.server.notebook.interact.standard_b64decode(\\""+encode64(this.value)+"\\"), globals())")\'></input>'
def render(self): """ Render this control as a string.
a0322d1aea08d97442b808ccb4e3e6d329cb03ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/a0322d1aea08d97442b808ccb4e3e6d329cb03ba/interact.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 3536, 6987, 333, 3325, 487, 279, 533, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 3536, 6987, 333, 3325, 487, 279, 533, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'For --editable=%s only svn (svn+URL) and Git (git+URL) is currently supported' % editable_req)
'For --editable=%s only svn (svn+URL), Git (git+URL) and Mercurial (hg+URL) is currently supported' % editable_req)
def parse_editable(editable_req): """Parses svn+http://blahblah@rev#egg=Foobar into a requirement (Foobar) and a URL""" url = editable_req if os.path.isdir(url) and os.path.exists(os.path.join(url, 'setup.py')): # Treating it as code that has already been checked out url = filename_to_url(url) if url.lower().startswith('file:'): return None, url if url.lower().startswith('svn:'): url = 'svn+' + url if url.lower().startswith('git:'): url = 'git+' + url if '+' not in url: if default_vcs: url = default_vcs + '+' + url else: raise InstallationError( '--editable=%s should be formatted with svn+URL or git+URL' % editable_req) vc_type = url.split('+', 1)[0].lower() if vc_type not in ('svn', 'git'): raise InstallationError( 'For --editable=%s only svn (svn+URL) and Git (git+URL) is currently supported' % editable_req) match = re.search(r'(?:#|#.*?&)egg=([^&]*)', editable_req) if (not match or not match.group(1)) and vc_type in ('svn', 'git'): parts = [p for p in editable_req.split('#', 1)[0].split('/') if p] if parts[-2] in ('tags', 'branches', 'tag', 'branch'): req = parts[-3] elif parts[-1] == 'trunk': req = parts[-2] else: raise InstallationError( '--editable=%s is not the right format; it must have #egg=Package' % editable_req) else: req = match.group(1) ## FIXME: use package_to_requirement? match = re.search(r'^(.*?)(?:-dev|-\d.*)', req) if match: # Strip off -dev, -0.2, etc. req = match.group(1) return req, url
07705cd47355a1a10042b18aab154e5eeeafcbcd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12982/07705cd47355a1a10042b18aab154e5eeeafcbcd/pip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 19653, 12, 19653, 67, 3658, 4672, 3536, 6656, 5893, 82, 15, 2505, 2207, 3083, 9795, 3083, 9795, 36, 9083, 7, 23171, 33, 42, 83, 947, 297, 1368, 279, 12405, 261, 42, 83, 947, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19653, 12, 19653, 67, 3658, 4672, 3536, 6656, 5893, 82, 15, 2505, 2207, 3083, 9795, 3083, 9795, 36, 9083, 7, 23171, 33, 42, 83, 947, 297, 1368, 279, 12405, 261, 42, 83, 947, ...
rsp = self.auth_getToken(frob=frob)
rsp = self.auth_getToken(frob=frob, auth_token=None)
def get_token(self, frob): '''Gets the token given a certain frob. Used by ``get_token_part_two`` and by the web authentication method. ''' # get a token rsp = self.auth_getToken(frob=frob) self.test_failure(rsp)
4cdc8f8d2cbccb192c2defbe841f3cfffb7a116c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/501/4cdc8f8d2cbccb192c2defbe841f3cfffb7a116c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2316, 12, 2890, 16, 284, 303, 70, 4672, 9163, 3002, 326, 1147, 864, 279, 8626, 284, 303, 70, 18, 10286, 635, 12176, 588, 67, 2316, 67, 2680, 67, 15415, 10335, 471, 635, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2316, 12, 2890, 16, 284, 303, 70, 4672, 9163, 3002, 326, 1147, 864, 279, 8626, 284, 303, 70, 18, 10286, 635, 12176, 588, 67, 2316, 67, 2680, 67, 15415, 10335, 471, 635, 326, ...
"""
"""
def setMask(self, mask): """ Created: 20.06.2006, KP Description: Set the current mask """ self.masks.insert(0, mask) self.currentMask = mask self.dataUnit.setMask(mask)
228d177ed04eda3e5752ade67b1e400d3b569646 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/228d177ed04eda3e5752ade67b1e400d3b569646/Visualizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 5796, 12, 2890, 16, 3066, 4672, 3536, 12953, 30, 4200, 18, 7677, 18, 6976, 26, 16, 1475, 52, 6507, 30, 1000, 326, 783, 3066, 3536, 365, 18, 29102, 18, 6387, 12, 20, 16, 3066, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 5796, 12, 2890, 16, 3066, 4672, 3536, 12953, 30, 4200, 18, 7677, 18, 6976, 26, 16, 1475, 52, 6507, 30, 1000, 326, 783, 3066, 3536, 365, 18, 29102, 18, 6387, 12, 20, 16, 3066, 13...
self.dump("%s, %s, [%s] = rgenop.newgraph(%s, '%s')" % (
self.dump(" self.dump("%s, gv_callable, %s = rgenop.newgraph(%s, '%s')" % (
def newgraph(self, sigtoken, name): builder, gv_callable, inputargs_gv = llrgenop.RGenOp.newgraph( self, sigtoken, name) builder = Builder(self, builder) self.dump("%s, %s, [%s] = rgenop.newgraph(%s, '%s')" % ( builder.name, self.vname(gv_callable), self.vlistname(inputargs_gv), self.sigtokenname(sigtoken), name)) return builder, gv_callable, inputargs_gv
618f10b1a848f2c7021c9fa5717603d80c162de7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/618f10b1a848f2c7021c9fa5717603d80c162de7/rgenop.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 4660, 12, 2890, 16, 3553, 2316, 16, 508, 4672, 2089, 16, 11404, 67, 7293, 16, 810, 1968, 67, 75, 90, 273, 6579, 86, 4507, 556, 18, 54, 7642, 3817, 18, 2704, 4660, 12, 365, 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, 394, 4660, 12, 2890, 16, 3553, 2316, 16, 508, 4672, 2089, 16, 11404, 67, 7293, 16, 810, 1968, 67, 75, 90, 273, 6579, 86, 4507, 556, 18, 54, 7642, 3817, 18, 2704, 4660, 12, 365, 16, ...
dbScriptDir = os.path.join(self.dir, "demobrowser", demoVersion, "script")
dbScriptDir = os.path.join(demoBrowser, demoVersion, "script")
def buildAllDemos(self, demoVersion="build", demoBrowser=False): demoData = [] for libraryName in self.libraries: library = self.libraries[libraryName] libraryData = { "classname": libraryName, "tests": [] } validDemo = False for versionName in library.versions: version = library.versions[versionName] if not version.hasDemoDir: continue demoVariants = version.getDemoVariants() if not demoVariants: continue for variant in demoVariants: if variant == "source" or variant == "build": continue status = version.buildDemo(variant, demoVersion) if demoBrowser and not status["buildError"]: htmlfile = self.copyHtmlFile(libraryName, versionName, variant, demoVersion) libraryData["tests"].append(self.getDemoData(libraryName, versionName, variant)) validDemo = True if validDemo: demoData.append(libraryData)
c325c3134575404d867a5452a6f71564b021240c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/c325c3134575404d867a5452a6f71564b021240c/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 15058, 538, 12, 2890, 16, 21477, 1444, 1546, 3510, 3113, 21477, 9132, 33, 8381, 4672, 21477, 751, 273, 5378, 225, 364, 5313, 461, 316, 365, 18, 31417, 30, 5313, 273, 365, 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, 1361, 1595, 15058, 538, 12, 2890, 16, 21477, 1444, 1546, 3510, 3113, 21477, 9132, 33, 8381, 4672, 21477, 751, 273, 5378, 225, 364, 5313, 461, 316, 365, 18, 31417, 30, 5313, 273, 365, 18,...
else: main()
def main(): report("Speech Dispatcher configuration tool") if options.create_user_configuration: # Check for and/or create basic user configuration configure.create_user_configuration() reply = question("Do you want to continue with basic settings?", True) if reply: configure.configure_basic_settings(type='user') elif options.config_basic_settings_user: configure.configure_basic_settings(type='user') elif options.config_basic_settings_system: configure.configure_basic_settings(type='system') elif options.test_festival: test.test_festival() elif options.test_spd_say: test.test_spd_say() elif options.test_espeak: test.test_espeak() elif options.test_alsa: test.audio_try_play(type='alsa') elif options.test_pulse: test.audio_try_play(type='pulse') elif options.diagnostics: ret = test.diagnostics() test.write_diagnostics_results(ret) elif options.debug: test.debug_and_report() else: reply = question("Do you want to setup a completely new configuration?", True) if reply: configure.complete_config() else: reply = question("Do you want to run diagnosis of problems?", True) if reply: test.diagnostics() test.write_diagnostics_results(ret) else: report("""Please run this command again and select what you want to do
687edb301baea2f3d4ffa3170495f0e84cec6b3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7484/687edb301baea2f3d4ffa3170495f0e84cec6b3e/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 2605, 2932, 22334, 16710, 1664, 5226, 7923, 225, 309, 702, 18, 2640, 67, 1355, 67, 7025, 30, 468, 2073, 364, 471, 19, 280, 752, 5337, 729, 1664, 5068, 18, 2640, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 2605, 2932, 22334, 16710, 1664, 5226, 7923, 225, 309, 702, 18, 2640, 67, 1355, 67, 7025, 30, 468, 2073, 364, 471, 19, 280, 752, 5337, 729, 1664, 5068, 18, 2640, 67, 1...
msg = msg
if args != None: msg = msg % args else: msg = msg
def dialog(self, parent, title, msg, *args): """Show a dialog and wait for the user to close it
541b8bcf5b47012392802a1946e03c54d097eadf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/541b8bcf5b47012392802a1946e03c54d097eadf/dialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6176, 12, 2890, 16, 982, 16, 2077, 16, 1234, 16, 380, 1968, 4672, 3536, 5706, 279, 6176, 471, 2529, 364, 326, 729, 358, 1746, 518, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6176, 12, 2890, 16, 982, 16, 2077, 16, 1234, 16, 380, 1968, 4672, 3536, 5706, 279, 6176, 471, 2529, 364, 326, 729, 358, 1746, 518, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
view=HTMLFile('dtml/attributeView', globals())
view=DTMLFile('dtml/attributeView', globals())
def __init__(self, name, value): self.name=name self.value=value
10b8eef807a8c8aaab1c9f8cd4c69d0118526ac4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/10b8eef807a8c8aaab1c9f8cd4c69d0118526ac4/APIHelpTopic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 460, 4672, 365, 18, 529, 33, 529, 365, 18, 1132, 33, 1132, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 508, 16, 460, 4672, 365, 18, 529, 33, 529, 365, 18, 1132, 33, 1132, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
print "Directory " + options.depdir + " may overwrite."
print "Directory " + depdir + " may overwrite."
def progress(blocks, blocksize, total): ESC = chr(27); sys.stdout.write(ESC + '[2K' + ESC+'[G') text = " %i of %i bytes (%.0f percent) complete" % (blocks*blocksize, total, float(blocks*blocksize*100)/total) sys.stdout.write(text + '\x08'*len(text)) sys.stdout.flush()
69e63582c2b3c6baabf63890dbd9bdebdfd6ca2c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5491/69e63582c2b3c6baabf63890dbd9bdebdfd6ca2c/getbuildtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4007, 12, 7996, 16, 18440, 16, 2078, 4672, 512, 2312, 273, 4513, 12, 5324, 1769, 2589, 18, 10283, 18, 2626, 12, 41, 2312, 397, 5271, 22, 47, 11, 397, 512, 2312, 6797, 63, 43, 6134, 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, 4007, 12, 7996, 16, 18440, 16, 2078, 4672, 512, 2312, 273, 4513, 12, 5324, 1769, 2589, 18, 10283, 18, 2626, 12, 41, 2312, 397, 5271, 22, 47, 11, 397, 512, 2312, 6797, 63, 43, 6134, 9...
preprint_reference_search_regexp_patterns, \ standardised_preprint_reference_categories, kb_line_num)
preprint_reference_search_regexp_patterns,\ standardised_preprint_reference_categories,\ kb_line_num)
def _add_institute_preprint_patterns(preprint_classifications, preprint_numeration_ptns,\ preprint_reference_search_regexp_patterns, \ standardised_preprint_reference_categories, kb_line_num): """For a list of preprint category strings and preprint numeration patterns for a given institute, create the regexp patterns for each of the preprint types. Add the regexp patterns to the dictionary of search patterns (preprint_reference_search_regexp_patterns), keyed by the line number of the institute in the KB, and the preprint category search string. Also add the standardised preprint category string to another dictionary, keyed by the line number of its position in the KB and its non-standardised version. @param preprint_classifications: (list) of tuples whereby each tuple contains a preprint category search string and the line number of the name of institute to which it belongs in the KB. E.g.: (45, 'ASTRO PH'). @param preprint_numeration_ptns: (list) of preprint reference numeration search patterns (strings) @param preprint_reference_search_regexp_patterns: (dictionary) of regexp patterns used to search in document lines. @param standardised_preprint_reference_categories: (dictionary) containing the standardised strings for preprint reference categories. (E.g. 'astro-ph'.) @param kb_line_num: (integer) - the line number int the KB at which a given institute name was found. @return: None """ if len(preprint_classifications) > 0 and \ len(preprint_numeration_ptns) > 0: ## the previous institute had both numeration styles and categories ## for preprint references. ## build regexps and add them for this institute: ## First, order the numeration styles by line-length, and build a ## grouped regexp for recognising numeration: ordered_patterns = _order_institute_preprint_reference_numeration_patterns_by_length(preprint_numeration_ptns) ## create a grouped regexp for numeration part of preprint reference: numeration_regexp = create_institute_numeration_group_regexp_pattern(ordered_patterns)
afd852f45332d11ac027b8d47ce1a922ce7f2cc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/afd852f45332d11ac027b8d47ce1a922ce7f2cc6/refextract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 267, 17207, 67, 1484, 1188, 67, 13317, 12, 1484, 1188, 67, 1106, 6640, 16, 675, 1188, 67, 2107, 7067, 67, 337, 2387, 17211, 675, 1188, 67, 6180, 67, 3072, 67, 17745, 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, 1289, 67, 267, 17207, 67, 1484, 1188, 67, 13317, 12, 1484, 1188, 67, 1106, 6640, 16, 675, 1188, 67, 2107, 7067, 67, 337, 2387, 17211, 675, 1188, 67, 6180, 67, 3072, 67, 17745, 67,...
return S_OK(resultDict) else: return S_ERROR('JobDB.getAtticJobParameters: failed to retrieve parameters') def getJobAttributes(self,jobID,attrList=[]):
return S_OK( resultDict ) else: return S_ERROR( 'JobDB.getAtticJobParameters: failed to retrieve parameters' ) def getJobAttributes( self, jobID, attrList = [] ):
def getAtticJobParameters(self, jobID, paramList=[], rescheduleCounter = -1 ): """ Get Attic Job Parameters defined for a job with jobID. Returns a dictionary with the Attic Job Parameters per each rescheduling cycle. If parameterList is empty - all the parameters are returned. If recheduleCounter = -1, all cycles are returned. """
99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3075, 335, 2278, 2402, 12, 2890, 16, 28913, 16, 579, 682, 22850, 6487, 400, 2847, 4789, 273, 300, 21, 262, 30, 3536, 968, 6020, 335, 3956, 7012, 2553, 364, 279, 1719, 598, 28913, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3075, 335, 2278, 2402, 12, 2890, 16, 28913, 16, 579, 682, 22850, 6487, 400, 2847, 4789, 273, 300, 21, 262, 30, 3536, 968, 6020, 335, 3956, 7012, 2553, 364, 279, 1719, 598, 28913, ...
assert(w.orig_value == 'test%d' % i)
assert(w.value == 'test%d' % i)
def test_round_trip(self): test = twc.CompoundWidget(id='a', children=[ twc.DisplayOnlyWidget(id='q', child= # TBD twc.RepeatingWidget(id=None, child= twc.Widget(id='b') ) ), twc.CompoundWidget(id='cc', children=[ twc.Widget(id='d'), twc.Widget(id='e'), ]) ])
63e95fe54937a8558192c280d2bd6d29e642b625 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11475/63e95fe54937a8558192c280d2bd6d29e642b625/test_validation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2260, 67, 25125, 12, 2890, 4672, 1842, 273, 2339, 71, 18, 16835, 4609, 12, 350, 2218, 69, 2187, 2325, 22850, 2339, 71, 18, 4236, 3386, 4609, 12, 350, 2218, 85, 2187, 1151, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2260, 67, 25125, 12, 2890, 4672, 1842, 273, 2339, 71, 18, 16835, 4609, 12, 350, 2218, 69, 2187, 2325, 22850, 2339, 71, 18, 4236, 3386, 4609, 12, 350, 2218, 85, 2187, 1151, 33...
if count:
if count >= 2:
def is_connected(self): count = 0 for node in self.nodes: if node.get_wires(): count += 1
68e9d9e0c9b9895ad7bed7ca4429509271f2d3b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/68e9d9e0c9b9895ad7bed7ca4429509271f2d3b4/electric.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 8537, 12, 2890, 4672, 1056, 273, 374, 364, 756, 316, 365, 18, 4690, 30, 309, 756, 18, 588, 67, 91, 2814, 13332, 1056, 1011, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 8537, 12, 2890, 4672, 1056, 273, 374, 364, 756, 316, 365, 18, 4690, 30, 309, 756, 18, 588, 67, 91, 2814, 13332, 1056, 1011, 404, 2, -100, -100, -100, -100, -100, -100, -100, ...
if arg != 'all': ui_enabled = '' ui_endis_wid = 0
(ehibeg, dhibeg, hiend) = '', '', '' ui_enabled = '' ui_endis_wid = 0 ui_num = "" ui_excludes_num = '' force_show = False if arg == 'all' or repo.id in extcmds or repo.name in extcmds: force_show = True (ehibeg, dhibeg, hiend) = (on_ehibeg, on_dhibeg, on_hiend)
def _repo_match(repo, patterns): rid = repo.id.lower() rnm = repo.name.lower() for pat in patterns: if fnmatch.fnmatch(rid, pat): return True if fnmatch.fnmatch(rnm, pat): return True return False
ac8eed8587a347dddf827efd1c0d7ab8674b2a79 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ac8eed8587a347dddf827efd1c0d7ab8674b2a79/yumcommands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7422, 67, 1916, 12, 7422, 16, 6884, 4672, 10911, 273, 3538, 18, 350, 18, 8167, 1435, 436, 15094, 273, 3538, 18, 529, 18, 8167, 1435, 364, 9670, 316, 6884, 30, 309, 18764, 18, 4293...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7422, 67, 1916, 12, 7422, 16, 6884, 4672, 10911, 273, 3538, 18, 350, 18, 8167, 1435, 436, 15094, 273, 3538, 18, 529, 18, 8167, 1435, 364, 9670, 316, 6884, 30, 309, 18764, 18, 4293...
retval = self.frame.showQuestionDialog("Are you sure you want to delete:\n\n%s" % "\n".join(macros))
retval = self.frame.showQuestionDialog("Are you sure you want to delete:\n\n%s" % ("\n".join([str(m) for m in macros])))
def processDelete(self): tree = self.popup_options['minor_mode'] macros = tree.getSelectedMacros() retval = self.frame.showQuestionDialog("Are you sure you want to delete:\n\n%s" % "\n".join(macros)) if retval == wx.ID_YES: for macro in macros: vfs.remove(macro) tree.update() RecentMacros.validateAll()
9572ee1406ea1f8dc334eac9fde7d5caef51a921 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/9572ee1406ea1f8dc334eac9fde7d5caef51a921/macro.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 2613, 12, 2890, 4672, 2151, 273, 365, 18, 16086, 67, 2116, 3292, 17364, 67, 3188, 3546, 24302, 273, 2151, 18, 588, 7416, 9990, 6973, 1435, 5221, 273, 365, 18, 3789, 18, 4500, 11665...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 2613, 12, 2890, 4672, 2151, 273, 365, 18, 16086, 67, 2116, 3292, 17364, 67, 3188, 3546, 24302, 273, 2151, 18, 588, 7416, 9990, 6973, 1435, 5221, 273, 365, 18, 3789, 18, 4500, 11665...
self.vbox.current_machine.showFullscreen(False)
self.vbox.current_machine.showFullscreen(False, 800, 600)
def onGuestPropertyChange(self, name, newValue, flags): # Shared folder management if os.path.dirname(name) == "/UFO/Com/GuestToHost/Shares/UserAccept": share_label = os.path.basename(name) share_name, share_mntpt = newValue.split(";") self.vbox.current_machine.add_shared_folder(share_label, share_mntpt, writable = True) self.vbox.current_machine.set_guest_property("/UFO/Com/HostToGuest/Shares/ReadyToMount/" + share_label, share_name) elif os.path.dirname(name) == "/UFO/Com/HostToGuest/Shares/Remove": self.vbox.current_machine.remove_shared_folder(os.path.basename(name)) # UFO settings management elif os.path.dirname(name) == "/UFO/Settings": cp = ConfigParser() cp.read(conf.conf_file) cp.set("guest", string.lower(os.path.basename(name)), newValue) cp.write(open(conf.conf_file, "w")) # Boot progress management elif name == "/UFO/Boot/Progress": if not self.vbox.current_machine.is_booting: self.vbox.current_machine.is_booting = True gui.app.update_progress(gui.app.tray.progress, newValue) # Resolution changes management elif name == "/VirtualBox/GuestAdd/Vbgl/Video/SavedMode": # We NEVER receive last percent event, # so we use /VirtualBox/GuestAdd/Vbgl/Video/SavedMode event # raised at slim startup to catch end of oot progress if self.vbox.current_machine.is_booting and \ not self.vbox.current_machine.is_booted: gui.app.update_progress(gui.app.tray.progress, str("1.000")) self.vbox.current_machine.is_booted = True time.sleep(1) gui.app.hide_balloon() self.vbox.current_machine.showFullscreen(False) # Overlay data reintegration infos elif name == "/UFO/Overlay/Size": self.vbox.current_machine.overlay_data_size = int(newValue) # Custom machine state management elif name == "/UFO/State": if newValue == "LOGGED_IN": # Start usb check loop gui.app.start_usb_check_timer(5, self.check_usb_devices) elif newValue == "CLOSING_SESSION": self.vbox.current_machine.showMinimized() gui.app.show_balloon_message(title=u"Sauvegarde des données", msg=u"UFO est en train d'enregistrer les modifications du système (" + str(self.vbox.current_machine.overlay_data_size) + u" méga-octets),\nne débranchez surtout pas la clé !") gui.app.set_tooltip("UFO: en cours de sauvegarde") elif newValue == "HALTING": pass elif newValue == "REBOOTING": self.vbox.current_machine.is_booted = False self.vbox.current_machine.is_booting = True # Let's show virtual machine's splash screen 2s, # minimize window while booting time.sleep(2) gui.app.hide_balloon() gui.app.show_balloon_progress(title=u"Redémarrage de UFO", msg=u"UFO est en cours de redémarrage.") # Fullscreen management elif name == "/UFO/GUI/Fullscreen": if newValue == "1": if self.first_toggle: self.vbox.current_machine.showFullscreen(True, 800, 600) self.first_toggle = False else: self.vbox.current_machine.showFullscreen(True) else: self.vbox.current_machine.showFullscreen(False)
a71fd501b6f910af85a30de85185063ed8b203cf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1208/a71fd501b6f910af85a30de85185063ed8b203cf/osbackend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 12978, 1396, 3043, 12, 2890, 16, 508, 16, 6129, 16, 2943, 4672, 225, 468, 10314, 3009, 11803, 309, 1140, 18, 803, 18, 12287, 12, 529, 13, 422, 2206, 57, 3313, 19, 799, 19, 12978, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12978, 1396, 3043, 12, 2890, 16, 508, 16, 6129, 16, 2943, 4672, 225, 468, 10314, 3009, 11803, 309, 1140, 18, 803, 18, 12287, 12, 529, 13, 422, 2206, 57, 3313, 19, 799, 19, 12978, ...
A IncrementalEncoder encodes an input in multiple steps. The input can be
An IncrementalEncoder encodes an input in multiple steps. The input can be
def decode(self, input, errors='strict'):
6bed1c1fab3e89c459ed58f1d312de220d7c858e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bed1c1fab3e89c459ed58f1d312de220d7c858e/codecs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 12, 2890, 16, 810, 16, 1334, 2218, 13948, 11, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 12, 2890, 16, 810, 16, 1334, 2218, 13948, 11, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
os.path.isfile(os.path.join(full_path, "__init__.pyc"))):
(getattr(settings, "SOUTH_USE_PYC", False) and \ os.path.isfile(os.path.join(full_path, "__init__.pyc")))):
def _load_migrations_module(self, module): self._migrations = module filenames = [] dirname = os.path.dirname(self._migrations.__file__) for f in os.listdir(dirname): if self.MIGRATION_FILENAME.match(os.path.basename(f)): full_path = os.path.join(dirname, f) # If it's a .pyc file, only append if the .py isn't already around if f.endswith(".pyc") and (os.path.isfile(full_path[:-1])): continue # If it's a module directory, only append if it contains __init__.py[c]. if os.path.isdir(full_path): if not (os.path.isfile(os.path.join(full_path, "__init__.py")) or \ os.path.isfile(os.path.join(full_path, "__init__.pyc"))): continue filenames.append(f) filenames.sort() self.extend(self.migration(f) for f in filenames)
ea9b5b76b0b939c8336e792057170ab74819def3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/ea9b5b76b0b939c8336e792057170ab74819def3/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 15642, 67, 2978, 12, 2890, 16, 1605, 4672, 365, 6315, 15642, 273, 1605, 9066, 273, 5378, 4283, 273, 1140, 18, 803, 18, 12287, 12, 2890, 6315, 15642, 16186, 768, 972, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 15642, 67, 2978, 12, 2890, 16, 1605, 4672, 365, 6315, 15642, 273, 1605, 9066, 273, 5378, 4283, 273, 1140, 18, 803, 18, 12287, 12, 2890, 6315, 15642, 16186, 768, 972, 13, ...
self.body.append('%s (%s; level %s system message)</p>\n' % (node['type'], ', '.join(backlinks), node['level'])) else: self.body.append('%s (level %s system message)</p>\n' % (node['type'], node['level']))
backref_text = '%s; ' % ', '.join(backlinks) if attr: self.body.append(self.starttag({}, 'a', attr, '')) a_end = '</a>' self.body.append('%s%s (%slevel %s system message)</p>\n' % (node['type'], a_end, backref_text, node['level']))
def visit_system_message(self, node): if node['level'] < self.document.reporter['writer'].report_level: raise nodes.SkipNode self.body.append(self.starttag(node, 'div', CLASS='system-message')) self.body.append('<p class="system-message-title">') if node.hasattr('backrefs'): backrefs = node['backrefs'] if len(backrefs) == 1: self.body.append('<a href="#%s">%s</a> ' '(level %s system message)</p>\n' % (backrefs[0], node['type'], node['level'])) else: i = 1 backlinks = [] for backref in backrefs: backlinks.append('<a href="#%s">%s</a>' % (backref, i)) i += 1 self.body.append('%s (%s; level %s system message)</p>\n' % (node['type'], ', '.join(backlinks), node['level'])) else: self.body.append('%s (level %s system message)</p>\n' % (node['type'], node['level']))
3c7f4d9a4f16bda3e90eb856e6de4d54a3757367 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/3c7f4d9a4f16bda3e90eb856e6de4d54a3757367/html4css1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 4299, 67, 2150, 12, 2890, 16, 756, 4672, 309, 756, 3292, 2815, 3546, 411, 365, 18, 5457, 18, 266, 7988, 3292, 6299, 29489, 6006, 67, 2815, 30, 1002, 2199, 18, 6368, 907, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 4299, 67, 2150, 12, 2890, 16, 756, 4672, 309, 756, 3292, 2815, 3546, 411, 365, 18, 5457, 18, 266, 7988, 3292, 6299, 29489, 6006, 67, 2815, 30, 1002, 2199, 18, 6368, 907, 365,...
self.sendPacket(300, 200, 100)
def dataBit(self, x, i): p = 0 if x: p = (1 << dataPin) self.port.setData(p) self.port.setData(p | (1 << clockPin)) def latch(self): self.port.setData(1 << latchPin) self.port.setData(0)
def __init__(self, portNum=0): self.port = parallel.Parallel(port=portNum) self.port.setData(0) self.sendCommandMode() self.sendPacket(300, 200, 100)
b27a7887253df7a93d8c014e0b69cd9fa3a021ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12881/b27a7887253df7a93d8c014e0b69cd9fa3a021ce/shiftpar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1756, 2578, 33, 20, 4672, 365, 18, 655, 273, 7230, 18, 13056, 12, 655, 33, 655, 2578, 13, 365, 18, 655, 18, 542, 751, 12, 20, 13, 365, 18, 4661, 2189...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1756, 2578, 33, 20, 4672, 365, 18, 655, 273, 7230, 18, 13056, 12, 655, 33, 655, 2578, 13, 365, 18, 655, 18, 542, 751, 12, 20, 13, 365, 18, 4661, 2189...
p += s[pos]
p += unichr(ord(s[pos]))
def PyUnicode_DecodeUnicodeEscape(s, size, errors): if (size == 0): return u'' p = [] pos = 0 while (pos < size):
b1d45cd4e340d4249c68d0ef7b495d64be675e11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/b1d45cd4e340d4249c68d0ef7b495d64be675e11/app_codecs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4707, 16532, 67, 6615, 16532, 8448, 12, 87, 16, 963, 16, 1334, 4672, 225, 309, 261, 1467, 422, 374, 4672, 327, 582, 6309, 225, 293, 273, 5378, 949, 273, 374, 1323, 261, 917, 411, 963, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4707, 16532, 67, 6615, 16532, 8448, 12, 87, 16, 963, 16, 1334, 4672, 225, 309, 261, 1467, 422, 374, 4672, 327, 582, 6309, 225, 293, 273, 5378, 949, 273, 374, 1323, 261, 917, 411, 963, ...