rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
assert(version == 0) self.__dict__ = data ScheduleEvent(0,self.update,False) ScheduleEvent(3600,self.update,True)
def __setstate__(self,state): (version, data) = state assert(version == 0) self.__dict__ = data ScheduleEvent(0,self.update,False) ScheduleEvent(3600,self.update,True)
c0481e5ef62748f3dcca013c76c1e5fc892357da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/c0481e5ef62748f3dcca013c76c1e5fc892357da/guide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 2019, 972, 12, 2890, 16, 2019, 4672, 261, 1589, 16, 501, 13, 273, 919, 1815, 12, 1589, 422, 374, 13, 365, 16186, 1576, 972, 273, 501, 10674, 1133, 12, 20, 16, 2890, 18, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 542, 2019, 972, 12, 2890, 16, 2019, 4672, 261, 1589, 16, 501, 13, 273, 919, 1815, 12, 1589, 422, 374, 13, 365, 16186, 1576, 972, 273, 501, 10674, 1133, 12, 20, 16, 2890, 18, 27...
elif (self.props.active and not self.active):
else:
def _activeCb( self, widget, pspec ): # only generate sound when this activity is active if (not self.props.active and self.active): self.audio.stop_sound_device() elif (self.props.active and not self.active): self.audio.restart_sound_device() self.active = self.props.active
d30dd27d2214652ff4c1f9c28bb92dc7640c60d5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6949/d30dd27d2214652ff4c1f9c28bb92dc7640c60d5/activity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3535, 15237, 12, 365, 16, 3604, 16, 293, 2793, 262, 30, 468, 1338, 2103, 14190, 1347, 333, 5728, 353, 2695, 309, 261, 902, 365, 18, 9693, 18, 3535, 471, 365, 18, 3535, 4672, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3535, 15237, 12, 365, 16, 3604, 16, 293, 2793, 262, 30, 468, 1338, 2103, 14190, 1347, 333, 5728, 353, 2695, 309, 261, 902, 365, 18, 9693, 18, 3535, 471, 365, 18, 3535, 4672, 365, ...
while 1:
while True:
def receiver(): # Open and initialize the socket s = openmcastsock(MYGROUP, MYPORT) # # Loop, printing any data we receive while 1: data, sender = s.recvfrom(1500) while data[-1:] == '\0': data = data[:-1] # Strip trailing \0's print sender, ':', repr(data)
17d14f52a11edd5b384c807fd75ddfe4b91bf0f3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/17d14f52a11edd5b384c807fd75ddfe4b91bf0f3/mcast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5971, 13332, 468, 3502, 471, 4046, 326, 2987, 272, 273, 1696, 81, 4155, 15031, 12, 22114, 8468, 16, 22069, 6354, 13, 468, 468, 9720, 16, 19171, 1281, 501, 732, 6798, 1323, 1053, 30, 501,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5971, 13332, 468, 3502, 471, 4046, 326, 2987, 272, 273, 1696, 81, 4155, 15031, 12, 22114, 8468, 16, 22069, 6354, 13, 468, 468, 9720, 16, 19171, 1281, 501, 732, 6798, 1323, 1053, 30, 501,...
color = Option(Color, color)
color = Option(Color, black)
def on_drag(self): # 070103 kluge experiment, copied/modified from on_drag_bg in bigger class below
035c62529c376b85c65bcafb8518dde9bdfd65d5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/035c62529c376b85c65bcafb8518dde9bdfd65d5/demo_drag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 12, 2890, 4672, 468, 10934, 1611, 4630, 15290, 21627, 8724, 16, 9268, 19, 7342, 628, 603, 67, 15997, 67, 12370, 316, 18983, 667, 5712, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 12, 2890, 4672, 468, 10934, 1611, 4630, 15290, 21627, 8724, 16, 9268, 19, 7342, 628, 603, 67, 15997, 67, 12370, 316, 18983, 667, 5712, 2, -100, -100, -100, -100, -100, -1...
self.SaveRankingData() self.LoadRegattaRanking()
pass
def UpdateRegattaRanking(self): self.SaveRankingData() self.LoadRegattaRanking()
48d330ad5d0c166ff207c0d759fbd7ab4131c638 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2446/48d330ad5d0c166ff207c0d759fbd7ab4131c638/qtclass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 1617, 270, 2351, 12925, 310, 12, 2890, 4672, 365, 18, 4755, 12925, 310, 751, 1435, 365, 18, 2563, 1617, 270, 2351, 12925, 310, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 1617, 270, 2351, 12925, 310, 12, 2890, 4672, 365, 18, 4755, 12925, 310, 751, 1435, 365, 18, 2563, 1617, 270, 2351, 12925, 310, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -1...
if platform.system() == "Windows": call_args.insert(0, sys.executable)
def main(): kinds = ('Exercise', 'Video', 'Playlist', 'ExerciseVideo', 'ExercisePlaylist', 'VideoPlaylist') parser = OptionParser(usage="%prog [options] upload|download", description="Uploads the sample data to a server or downloads it from the server.") parser.add_option("-U", "--url", default="http://localhost:8080/remote_api", help="The location of the remote_api endpoint.") parser.add_option("-e", "--email", default="test@example.com", help="The username to use.") parser.add_option("-k", "--kinds", default=','.join(kinds), help="The comma separated list of kinds.") if platform.system() == "Windows": call_args.insert(0, sys.executable) parser.add_option("-p", "--python", default=(sys.executable if platform.system() == "Windows" else None), help="Path of python executable.") parser.add_option("-a", "--appcfg", default='appcfg.py', help="Path of appcfg.py (Google App Engine).") (options, args) = parser.parse_args() if len(args) < 1: parser.print_help() return for kind in options.kinds.split(','): filename='%s.data' % kind call_args = [options.appcfg, '--url=%s' % options.url, '--email=%s' % options.email, '--application=khanexercises', '--kind=%s' % kind, '--filename=%s' % filename] if options.email == parser.get_option('--email').default: call_args.append('--passin') if options.python is not None: call_args.insert(0, options.python) if args[0] == 'upload': call_args.append('upload_data') elif args[0] == 'download': if os.path.exists(filename): os.remove(filename) call_args.append('download_data') else: parser.print_help() return print ' '.join(call_args) if options.email == parser.get_option('--email').default: process = subprocess.Popen(call_args, stdin=subprocess.PIPE) # Send a newline for the password prompt process.communicate("\n") else: process = subprocess.Popen(call_args) process.wait()
9882ddd903d383ac01154d8ad07aa6f6e46089a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/9882ddd903d383ac01154d8ad07aa6f6e46089a8/sample_data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 21961, 273, 7707, 424, 20603, 2187, 296, 10083, 2187, 296, 30194, 2187, 296, 424, 20603, 10083, 2187, 296, 424, 20603, 30194, 2187, 296, 10083, 30194, 6134, 2082, 273, 18862, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 21961, 273, 7707, 424, 20603, 2187, 296, 10083, 2187, 296, 30194, 2187, 296, 424, 20603, 10083, 2187, 296, 424, 20603, 30194, 2187, 296, 10083, 30194, 6134, 2082, 273, 18862, 12...
el1 = etree.SubElement(root, 'meta:initial-creator')
el1 = SubElement(root, 'meta:initial-creator')
def create_meta(self): root = etree.Element('office:document-meta', attrib=META_NAMESPACE_DICT) doc = etree.ElementTree(root) root = etree.SubElement(root, 'office:meta') el1 = etree.SubElement(root, 'meta:generator') el1.text = 'Docutils/rst2odf.py/%s' % (VERSION, ) s1 = os.environ.get('USER', '') el1 = etree.SubElement(root, 'meta:initial-creator') el1.text = s1 s2 = time.strftime('%Y-%m-%dT%H:%M:%S', time.localtime()) el1 = etree.SubElement(root, 'meta:creation-date') el1.text = s2 el1 = etree.SubElement(root, 'dc:creator') el1.text = s1 el1 = etree.SubElement(root, 'dc:date') el1.text = s2 el1 = etree.SubElement(root, 'dc:language') el1.text = 'en-US' el1 = etree.SubElement(root, 'meta:editing-cycles') el1.text = '1' el1 = etree.SubElement(root, 'meta:editing-duration') el1.text = 'PT00M01S' title = self.visitor.get_title() el1 = etree.SubElement(root, 'dc:title') if title: el1.text = title else: el1.text = '[no title]' s1 = etree.tostring(doc) #doc = minidom.parseString(s1) #s1 = doc.toprettyxml(' ') return s1
277ba1af817dc725b8179dbbf649a815fdff5939 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/277ba1af817dc725b8179dbbf649a815fdff5939/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3901, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 19789, 30, 5457, 17, 3901, 2187, 5885, 33, 19294, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3901, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 19789, 30, 5457, 17, 3901, 2187, 5885, 33, 19294, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, ...
velocities += [[float(inp[1]),float(inp[2]),float(inp[3])]] if molecular_dynamics: atoms.set_velocities(velocities)
if "Atomic structure (and velocities)" in line: fd.readline() atoms = Atoms() velocities = [] for i in range(n_atoms): inp = fd.readline().split() atoms.append(Atom(inp[4],(inp[1],inp[2],inp[3]))) inp = fd.readline().split() velocities += [[float(inp[1])*v_unit,float(inp[2])*v_unit,float(inp[3])*v_unit]] atoms.set_velocities(velocities)
def read_aims_output(filename, index = -1): """ Import FHI-aims output files with all data available, i.e. relaxations, MD information, force information etc etc etc. """ from ase import Atoms, Atom from ase.calculators.singlepoint import SinglePointCalculator molecular_dynamics = False fd = open(filename, 'r') cell = [] images = [] n_periodic = -1 f = None pbc = False found_aims_calculator = False while True: line = fd.readline() if not line: break if "List of parameters used to initialize the calculator:" in line: fd.readline() calc = read_aims_calculator(fd) calc.out = filename found_aims_calculator = True if "Number of atoms" in line: inp = line.split() n_atoms = int(inp[5]) if "| Unit cell:" in line: if not pbc: pbc = True for i in range(3): inp = fd.readline().split() cell.append([inp[1],inp[2],inp[3]]) if "Atomic structure:" in line: fd.readline() atoms = Atoms() for i in range(n_atoms): inp = fd.readline().split() atoms.append(Atom(inp[3],(inp[4],inp[5],inp[6]))) if "Complete information for previous time-step:" in line: molecular_dynamics = True if "Updated atomic structure:" in line: fd.readline() atoms = Atoms() velocities = [] for i in range(n_atoms): inp = fd.readline().split() atoms.append(Atom(inp[4],(inp[1],inp[2],inp[3]))) if molecular_dynamics: inp = fd.readline().split() velocities += [[float(inp[1]),float(inp[2]),float(inp[3])]] if molecular_dynamics: atoms.set_velocities(velocities) if "Total atomic forces" in line: f = [] for i in range(n_atoms): inp = fd.readline().split() f.append([float(inp[2]),float(inp[3]),float(inp[4])]) if not found_aims_calculator: e = images[-1].get_potential_energy() images[-1].set_calculator(SinglePointCalculator(e,f,None,None,atoms)) e = None f = None if "Total energy corrected" in line: e = float(line.split()[5]) if pbc: atoms.set_cell(cell) atoms.pbc = True if not found_aims_calculator: atoms.set_calculator(SinglePointCalculator(e,None,None,None,atoms)) images.append(atoms) e = None if found_aims_calculator: calc.set_results(images[-1]) images[-1].set_calculator(calc) fd.close() if molecular_dynamics: images = images[1:] # return requested images, code borrowed from ase/io/trajectory.py if isinstance(index, int): return images[index] else: step = index.step or 1 if step > 0: start = index.start or 0 if start < 0: start += len(images) stop = index.stop or len(images) if stop < 0: stop += len(images) else: if index.start is None: start = len(images) - 1 else: start = index.start if start < 0: start += len(images) if index.stop is None: stop = -1 else: stop = index.stop if stop < 0: stop += len(images) return [images[i] for i in range(start, stop, step)]
b412e285ce46a5180429752d5dc6a73d2e27875e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/b412e285ce46a5180429752d5dc6a73d2e27875e/aims.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 4581, 87, 67, 2844, 12, 3459, 16, 770, 273, 300, 21, 4672, 3536, 225, 6164, 28705, 45, 17, 4581, 87, 876, 1390, 598, 777, 501, 2319, 16, 277, 18, 73, 18, 25744, 1012, 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, 855, 67, 4581, 87, 67, 2844, 12, 3459, 16, 770, 273, 300, 21, 4672, 3536, 225, 6164, 28705, 45, 17, 4581, 87, 876, 1390, 598, 777, 501, 2319, 16, 277, 18, 73, 18, 25744, 1012, 16, ...
print "Removing '%s' failed: %s" % err
print "Removing '%s' failed: %s" % (path, err)
def _remove(path): if not os.path.exists(path): return try: if os.path.isdir(path): shutil.rmtree(path) else: os.remove(path) except Exception, err: print "Removing '%s' failed: %s" % err sys.exit(1) else: print "Removed '%s'" % path
11d8205cbc27452dd1dbec597b11bf4c42572d88 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/11d8205cbc27452dd1dbec597b11bf4c42572d88/install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4479, 12, 803, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 803, 4672, 327, 775, 30, 309, 1140, 18, 803, 18, 291, 1214, 12, 803, 4672, 11060, 18, 86, 17371, 12, 803, 13, 469, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4479, 12, 803, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 803, 4672, 327, 775, 30, 309, 1140, 18, 803, 18, 291, 1214, 12, 803, 4672, 11060, 18, 86, 17371, 12, 803, 13, 469, ...
sys.stdout.write('%s[Error could not locate executable %s for %s/%s]\n'%(futuretest, execname, localdir, execname))
sys.stdout.write('%s[Error could not locate executable %s for %s/%s (%d-%d)]\n'% (futuretest, execname, localdir, execname, compoptsnum, execoptsnum))
def kill_proc(p, timeout): k = subprocess.Popen(['kill',str(p.pid)]) k.wait() now = time.time() end_time = now + timeout # give it a little time while end_time > now: if p.poll(): return now = time.time() # use the big hammer (and don't bother waiting) subprocess.Popen(['kill','-9', str(p.pid)]) return
469a09fcb4fe6f256fa57e8e16e691db1d278b44 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6895/469a09fcb4fe6f256fa57e8e16e691db1d278b44/sub_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 9381, 12, 84, 16, 2021, 4672, 417, 273, 6652, 18, 52, 3190, 12, 3292, 16418, 2187, 701, 12, 84, 18, 6610, 13, 5717, 417, 18, 7048, 1435, 2037, 273, 813, 18, 957, 1435, 679,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 9381, 12, 84, 16, 2021, 4672, 417, 273, 6652, 18, 52, 3190, 12, 3292, 16418, 2187, 701, 12, 84, 18, 6610, 13, 5717, 417, 18, 7048, 1435, 2037, 273, 813, 18, 957, 1435, 679,...
if key in self._dict: raise ValueError('duplicate key: %s' % key) self._order.append(key) self._dict[key] = value
if key not in self._dict: self._order.append(key) self._dict[key] = value
def __setitem__(self, key, value): if key in self._dict: raise ValueError('duplicate key: %s' % key) self._order.append(key) self._dict[key] = value
2b9a356885e2c0418a2f0dcba6b0beddc64b2985 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4381/2b9a356885e2c0418a2f0dcba6b0beddc64b2985/ast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 498, 16, 460, 4672, 309, 498, 316, 365, 6315, 1576, 30, 1002, 2068, 2668, 17342, 498, 30, 738, 87, 11, 738, 498, 13, 365, 6315, 1019, 18, 6923, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 498, 16, 460, 4672, 309, 498, 316, 365, 6315, 1576, 30, 1002, 2068, 2668, 17342, 498, 30, 738, 87, 11, 738, 498, 13, 365, 6315, 1019, 18, 6923, 12...
""" Dimension of the new subspace (or p-new subspace) of cusp forms of weight k and character eps.
r""" Dimension of the new subspace (or $p$-new subspace) of cusp forms of weight $k$ and character $\epsilon$.
def dimension_new_cusp_forms_eps(eps, k=2, p=0): """ Dimension of the new subspace (or p-new subspace) of cusp forms of weight k and character eps. INPUT: eps -- a Dirichlet character k -- an integer (ddefault: 2) p -- a prime (default: 0); just the p-new subspace if given OUTPUT: Integer EXAMPLES: sage: G = DirichletGroup(9) sage: eps = G.0^3 sage: eps.conductor() 3 sage: [sage.modular.dims.dimension_new_cusp_forms_eps(eps, k) for k in [2..10]] [0, 0, 0, 2, 0, 2, 0, 2, 0] sage: [sage.modular.dims.dimension_cusp_forms_eps(eps, k) for k in [2..10]] [0, 0, 0, 2, 0, 4, 0, 6, 0] sage: [sage.modular.dims.dimension_new_cusp_forms_eps(eps, k, 3) for k in [2..10]] [0, 0, 0, 2, 0, 2, 0, 2, 0] Double check using modular symbols (independent calculation): sage: [ModularSymbols(eps,k,sign=1).cuspidal_subspace().new_subspace().dimension() for k in [2..10]] [0, 0, 0, 2, 0, 2, 0, 2, 0] sage: [ModularSymbols(eps,k,sign=1).cuspidal_subspace().new_subspace(3).dimension() for k in [2..10]] [0, 0, 0, 2, 0, 2, 0, 2, 0] Another example at level 33: sage: G = DirichletGroup(33) sage: eps = G.1 sage: eps.conductor() 11 sage: [sage.modular.dims.dimension_new_cusp_forms_eps(G.1, k) for k in [2..4]] [0, 4, 0] sage: [sage.modular.dims.dimension_new_cusp_forms_eps(G.1^2, k) for k in [2..4]] [2, 0, 6] sage: [sage.modular.dims.dimension_new_cusp_forms_eps(G.1^2, k, 3) for k in [2..4]] [2, 0, 6] """ if not isinstance(eps, dirichlet.DirichletCharacter): raise TypeError, "eps = (%s) must be a DirichletCharacter"%eps if k < 0: return Z(0) if eps.is_even(): if k % 2 == 1: return Z(0) else: # odd if k % 2 == 0: return Z(0) if k == 0: return Z(0) elif k == 1: raise NotImplementedError, "Computation of dimensions of spaces of weight 1 modular forms not implemented." N = eps.modulus() if p == 0 or N%p != 0 or valuation(eps.conductor(),p) == valuation(N,p): D = [eps.conductor()*d for d in divisors(N//eps.conductor())] return sum([dimension_cusp_forms_eps(eps.restrict(M), k)*mumu(N//M) for M in D]) eps_p = eps.restrict(N//p) old = dimension_cusp_forms(eps_p, k) return dimension_cusp_forms(eps, k) - 2*old
c82112a889c87779a875085f7c30d0e045ec245d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/c82112a889c87779a875085f7c30d0e045ec245d/dims.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4968, 67, 2704, 67, 71, 407, 84, 67, 9741, 67, 13058, 12, 13058, 16, 417, 33, 22, 16, 293, 33, 20, 4672, 436, 8395, 13037, 434, 326, 394, 720, 2981, 261, 280, 271, 84, 8, 17, 2704,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4968, 67, 2704, 67, 71, 407, 84, 67, 9741, 67, 13058, 12, 13058, 16, 417, 33, 22, 16, 293, 33, 20, 4672, 436, 8395, 13037, 434, 326, 394, 720, 2981, 261, 280, 271, 84, 8, 17, 2704,...
self.exportAttributes(outfile, level, namespace_, name_='Meta')
self.exportAttributes(outfile, level, [], namespace_, name_='Meta')
def export(self, outfile, level, namespace_='', name_='Meta', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, namespace_, name_='Meta') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="Meta"') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('</%s%s>\n' % (namespace_, name_))
10f2a4b3101435822c472af9b202a5a0bb496366 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/10f2a4b3101435822c472af9b202a5a0bb496366/_nexml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 12, 2890, 16, 8756, 16, 1801, 16, 1981, 67, 2218, 2187, 508, 67, 2218, 2781, 2187, 1981, 536, 67, 2218, 11, 4672, 2405, 7790, 12, 26050, 16, 1801, 13, 8756, 18, 2626, 2668, 32, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 12, 2890, 16, 8756, 16, 1801, 16, 1981, 67, 2218, 2187, 508, 67, 2218, 2781, 2187, 1981, 536, 67, 2218, 11, 4672, 2405, 7790, 12, 26050, 16, 1801, 13, 8756, 18, 2626, 2668, 32, ...
print "[AutoBackup] **************** begin **************** destination:", destination
def runBackup(): destination = config.plugins.autobackup.where.value if destination: try: print "[AutoBackup] **************** begin **************** destination:", destination os.system("%s %s" % (BACKUP_SCRIPT, destination)) except Exception, e: print "[AutoBackup] FAIL:", e
a3d8f2c4f33c23ce60252053d181d4d05f4273b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12173/a3d8f2c4f33c23ce60252053d181d4d05f4273b0/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 6248, 13332, 2929, 273, 642, 18, 8057, 18, 6079, 9572, 18, 6051, 18, 1132, 309, 2929, 30, 775, 30, 1140, 18, 4299, 27188, 87, 738, 87, 6, 738, 261, 8720, 3079, 67, 10885, 16, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 6248, 13332, 2929, 273, 642, 18, 8057, 18, 6079, 9572, 18, 6051, 18, 1132, 309, 2929, 30, 775, 30, 1140, 18, 4299, 27188, 87, 738, 87, 6, 738, 261, 8720, 3079, 67, 10885, 16, 2...
txt.write("%s\n" % (struct.pack('16s',self.description.encode('utf-16'))))
txt.write("%s\n" % (struct.pack('16s',self.description.encode('utf-16le'))))
def str_extra(self): txt=StringIO() txt.write("\tunicode string: %s\n" % str(self.description)) txt.write("%s\n" % (struct.pack('16s',self.description.encode('utf-16')))) return txt.getvalue()
660dd103e698699ffa7b5b4096ca6838969cc3a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/660dd103e698699ffa7b5b4096ca6838969cc3a8/pyemf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 67, 7763, 12, 2890, 4672, 6463, 33, 780, 4294, 1435, 6463, 18, 2626, 31458, 88, 9124, 533, 30, 738, 87, 64, 82, 6, 738, 609, 12, 2890, 18, 3384, 3719, 6463, 18, 2626, 27188, 87,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 67, 7763, 12, 2890, 4672, 6463, 33, 780, 4294, 1435, 6463, 18, 2626, 31458, 88, 9124, 533, 30, 738, 87, 64, 82, 6, 738, 609, 12, 2890, 18, 3384, 3719, 6463, 18, 2626, 27188, 87,...
(dopatch, gitpatches) = readgitpatch(patchname) files = {} fuzz = False if dopatch: if dopatch == 'filter': patchname = dogitpatch(patchname, gitpatches, cwd=cwd) patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''), 'patch')
def __patch(patchname): """patch and updates the files and fuzz variables""" files = {} fuzz = False patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''), 'patch')
def patch(patchname, ui, strip=1, cwd=None): """apply the patch <patchname> to the working directory. a list of patched files is returned""" (dopatch, gitpatches) = readgitpatch(patchname) files = {} fuzz = False if dopatch: if dopatch == 'filter': patchname = dogitpatch(patchname, gitpatches, cwd=cwd) patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''), 'patch') args = [] if cwd: args.append('-d %s' % util.shellquote(cwd)) fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip, util.shellquote(patchname))) for line in fp: line = line.rstrip() ui.note(line + '\n') if line.startswith('patching file '): pf = util.parse_patch_output(line) printed_file = False files.setdefault(pf, (None, None)) elif line.find('with fuzz') >= 0: fuzz = True if not printed_file: ui.warn(pf + '\n') printed_file = True ui.warn(line + '\n') elif line.find('saving rejects to file') >= 0: ui.warn(line + '\n') elif line.find('FAILED') >= 0: if not printed_file: ui.warn(pf + '\n') printed_file = True ui.warn(line + '\n') if dopatch == 'filter': os.unlink(patchname) code = fp.close() if code: raise util.Abort(_("patch command failed: %s") % util.explain_exit(code)[0]) for gp in gitpatches: files[gp.path] = (gp.op, gp) return (files, fuzz)
b8d3a680b4925f5213c76fe370291f21f2252f20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/b8d3a680b4925f5213c76fe370291f21f2252f20/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 2272, 529, 16, 5915, 16, 2569, 33, 21, 16, 7239, 33, 7036, 4672, 3536, 9010, 326, 4729, 411, 2272, 529, 34, 358, 326, 5960, 1867, 18, 279, 666, 434, 25786, 1390, 353, 2106, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 2272, 529, 16, 5915, 16, 2569, 33, 21, 16, 7239, 33, 7036, 4672, 3536, 9010, 326, 4729, 411, 2272, 529, 34, 358, 326, 5960, 1867, 18, 279, 666, 434, 25786, 1390, 353, 2106, ...
gLogger.info("%s.processTransformation: Processing transformation with '%s' plug-in." % (AGENT_NAME,plugin)) res = self.__generatePluginObject(plugin)
gLogger.info( "%s.processTransformation: Processing transformation with '%s' plug-in." % ( AGENT_NAME, plugin ) ) res = self.__generatePluginObject( plugin )
def processTransformation(self,transDict): transID = transDict['TransformationID'] # First get the LFNs associated to the transformation res = self.transDB.getTransformationFiles(condDict={'TransformationID':transID,'Status':'Unused'}) if not res['OK']: gLogger.error("%s.processTransformation: Failed to obtain input data." % AGENT_NAME, res['Message']) return res transFiles = res['Value'] lfns = res['LFNs'] if not lfns: gLogger.info("%s.processTransformation: No 'Unused' files found for transformation." % AGENT_NAME) if transDict['Status'] == 'Flush': res = self.transDB.setTransformationParameter(transID,'Status','Active') if not res['OK']: gLogger.error("%s.execute: Failed to update transformation status to 'Active'." % AGENT_NAME, res['Message']) else: gLogger.info("%s.execute: Updated transformation status to 'Active'." % AGENT_NAME) return S_OK()
5b98b3b45ce744b0fa8f66e9d9812d0b7910a0ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/5b98b3b45ce744b0fa8f66e9d9812d0b7910a0ab/TransformationAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 15292, 12, 2890, 16, 2338, 5014, 4672, 906, 734, 273, 906, 5014, 3292, 15292, 734, 3546, 468, 5783, 336, 326, 18803, 10386, 3627, 358, 326, 8620, 400, 273, 365, 18, 2338, 2290, 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, 1207, 15292, 12, 2890, 16, 2338, 5014, 4672, 906, 734, 273, 906, 5014, 3292, 15292, 734, 3546, 468, 5783, 336, 326, 18803, 10386, 3627, 358, 326, 8620, 400, 273, 365, 18, 2338, 2290, 18,...
undo = {'binaries': {}, 'sources': {}}
undo = {'binaries': {}, 'sources': {}, 'virtual': {}, 'nvirtual': []}
def doop_source(self, pkg):
b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 556, 67, 3168, 12, 2890, 16, 3475, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 556, 67, 3168, 12, 2890, 16, 3475, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"Couldn't find a setup script in %s" % dist_filename
"Couldn't find a setup script in %s" % os.path.abspath(dist_filename)
def install_eggs(self, spec, dist_filename, tmpdir): # .egg dirs or files are already built, so just return them if dist_filename.lower().endswith('.egg'): return [self.install_egg(dist_filename, tmpdir)] elif dist_filename.lower().endswith('.exe'): return [self.install_exe(dist_filename, tmpdir)]
22071a62ddcb38c2b224ab94981e6c301d41b187 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/495/22071a62ddcb38c2b224ab94981e6c301d41b187/easy_install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 1332, 564, 12, 2890, 16, 857, 16, 2411, 67, 3459, 16, 20213, 4672, 468, 263, 23171, 7717, 578, 1390, 854, 1818, 6650, 16, 1427, 2537, 327, 2182, 309, 2411, 67, 3459, 18, 8167...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 1332, 564, 12, 2890, 16, 857, 16, 2411, 67, 3459, 16, 20213, 4672, 468, 263, 23171, 7717, 578, 1390, 854, 1818, 6650, 16, 1427, 2537, 327, 2182, 309, 2411, 67, 3459, 18, 8167...
@param verbose_description a message to be printed before the exception in
@param prefix a message to be printed before the exception in the log @param suffix a message to be printed before the exception in
def register_exception(force_stack=False, stream='error', req=None, verbose_description=''): """ log error exception to invenio.err and warning exception to invenio.log errors will be logged with client information (if req is given) @param force_stack: when True stack is always printed, while when False, stack is printed only whenever the Exception type is not containing the word Invenio @param stream: 'error' or 'warning' @param req = mod_python request @param verbose_description a message to be printed before the exception in the log @return 1 if successfully wrote to stream, 0 if not """ exc_info = sys.exc_info() if exc_info[0]: if stream=='error': stream='err' else: stream='log' stream_to_write = open(logdir + '/invenio.' + stream, 'a') # <type 'exceptions.StandardError'> -> exceptions.StandardError exc_name = str(exc_info[0])[7:-2] # exceptions.StandardError -> StandardError if exc_name.startswith('exceptions.'): exc_name = exc_name[11:] exc_value = str(exc_info[1]) print >> stream_to_write, "%(time)s -> %(name)s %(value)s" % { 'time' : time.strftime("%Y-%m-%d %H:%M:%S"), 'name' : exc_name, 'value' : exc_value } if verbose_description: print >> stream_to_write, verbose_description print >> stream_to_write, get_pretty_wide_client_info(req) if not exc_name.startswith('Invenio') or force_stack: tracestack = traceback.extract_stack()[-5:-2] #force traceback except for this call tracestack_pretty = "%sForced traceback (most recent call last)" % (' '*4,) for trace_tuple in tracestack: tracestack_pretty += """ File "%(file)s", line %(line)s, in %(function)s %(text)s""" % \ { 'file' : trace_tuple[0], 'line' : trace_tuple[1], 'function' : trace_tuple[2], 'text' : trace_tuple[3] is not None and str(trace_tuple[3]) or "" } print >> stream_to_write, tracestack_pretty traceback.print_exception(exc_info[0], exc_info[1], exc_info[2], None, stream_to_write) print >> stream_to_write stream_to_write.close() return 1 else: return 0
43574f9c1d9b16eb9ba9893d5b363d9a51a7d754 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/43574f9c1d9b16eb9ba9893d5b363d9a51a7d754/errorlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 4064, 12, 5734, 67, 3772, 33, 8381, 16, 1407, 2218, 1636, 2187, 1111, 33, 7036, 16, 3988, 67, 3384, 2218, 11, 4672, 3536, 613, 555, 1520, 358, 2198, 275, 1594, 18, 370, 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, 1744, 67, 4064, 12, 5734, 67, 3772, 33, 8381, 16, 1407, 2218, 1636, 2187, 1111, 33, 7036, 16, 3988, 67, 3384, 2218, 11, 4672, 3536, 613, 555, 1520, 358, 2198, 275, 1594, 18, 370, 471, ...
SConsEnvironment.Chgrp = SCons.Action.ActionFactory( chgrp , lambda dest,group: 'chgrp(%s , %s)' % (dest , group))
SConsEnvironment.Chgrp = SCons.Action.ActionFactory( chgrp , lambda dest,group: pass % (dest , group))
def chgrp(path , group): os.system("chgrp %s %s" % (group , path))
8abb358882b98d7c0f1f93df1ef4d3e01c0f25e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10268/8abb358882b98d7c0f1f93df1ef4d3e01c0f25e7/global_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 462, 17532, 12, 803, 269, 1041, 4672, 1140, 18, 4299, 2932, 343, 17532, 738, 87, 738, 87, 6, 738, 261, 1655, 269, 589, 3719, 225, 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, 462, 17532, 12, 803, 269, 1041, 4672, 1140, 18, 4299, 2932, 343, 17532, 738, 87, 738, 87, 6, 738, 261, 1655, 269, 589, 3719, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
r""" Double factorial numbers: $(2n)!! = 2^n*n!$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000165;a Double factorial numbers: (2n)!! = 2^n*n!. sage: a(0) 1 sage: a.offset 0 sage: a(8) 10321920 sage: a(20) 2551082656125828464640000 sage: a.list(9) [1, 2, 8, 48, 384, 3840, 46080, 645120, 10321920] AUTHOR: -- Jaap Spies (2007-01-24) """ def __init__(self):
def __init__(self): r""" Double factorial numbers: $(2n)!! = 2^n*n!$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000165;a Double factorial numbers: (2n)!! = 2^n*n!. sage: a(0) 1 sage: a.offset 0 sage: a(8) 10321920 sage: a(20) 2551082656125828464640000 sage: a.list(9) [1, 2, 8, 48, 384, 3840, 46080, 645120, 10321920] AUTHOR: -- Jaap Spies (2007-01-24) """
def _eval(self, n): if n == 0: return Integer(1)
8b300fed02e947af57b58146f62dccfc715cf0b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8b300fed02e947af57b58146f62dccfc715cf0b9/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 309, 290, 422, 374, 30, 327, 2144, 12, 21, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 8622, 12, 2890, 16, 290, 4672, 309, 290, 422, 374, 30, 327, 2144, 12, 21, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.debug_trace("Tag_uint32_box")
def Tag_uint32_box(self): self.debug_trace("Tag_uint32_box") if ( self.getTag( 'uint32_box' ) ): self.pack('L', self.next_num(), self.next_num(), self.next_num(), self.next_num()) return 1 return 0
ecf78c969222f7513a2f516b0355728295fb546a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/ecf78c969222f7513a2f516b0355728295fb546a/pxlasm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4034, 67, 11890, 1578, 67, 2147, 12, 2890, 4672, 309, 261, 365, 18, 588, 1805, 12, 296, 11890, 1578, 67, 2147, 11, 262, 262, 30, 365, 18, 2920, 2668, 48, 2187, 365, 18, 4285, 67, 210...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4034, 67, 11890, 1578, 67, 2147, 12, 2890, 4672, 309, 261, 365, 18, 588, 1805, 12, 296, 11890, 1578, 67, 2147, 11, 262, 262, 30, 365, 18, 2920, 2668, 48, 2187, 365, 18, 4285, 67, 210...
s = string.rjust(`vin.packfactor`, 2) if vin.packfactor and vin.format not in ('rgb', 'jpeg') and \ (vin.width/vin.packfactor) % 4 <> 0: s = s + '!'
if type(vin.packfactor) == type(()): xpf, ypf = vin.packfactor s = string.rjust(`xpf`, 2) + ',' + \ string.rjust(`ypf`, 2)
def process(filename): try: vin = VFile.RandomVinFile().init(filename) except IOError, msg: sys.stderr.write(filename + ': I/O error: ' + `msg` + '\n') return 1 except VFile.Error, msg: sys.stderr.write(msg + '\n') return 1 except EOFError: sys.stderr.write(filename + ': EOF in video file\n') return 1 if terse: print string.ljust(filename, maxwidth), kbytes = (VFile.getfilesize(filename) + 1023) / 1024 print string.rjust(`kbytes`, 5) + 'K', print ' ', string.ljust(`vin.version`, 5), print string.ljust(vin.format, 8), print string.rjust(`vin.width`, 4), print string.rjust(`vin.height`, 4), s = string.rjust(`vin.packfactor`, 2) if vin.packfactor and vin.format not in ('rgb', 'jpeg') and \ (vin.width/vin.packfactor) % 4 <> 0: s = s + '!' else: s = s + ' ' print s, sys.stdout.flush() else: vin.printinfo() if quick: if terse: print vin.close() return 0 try: vin.readcache() if not terse: print '[Using cached index]' except VFile.Error: if not terse: print '[Constructing index on the fly]' if not short: if delta: print 'Frame time deltas:', else: print 'Frame times:', n = 0 t = 0 told = 0 datasize = 0 while 1: try: t, ds, cs = vin.getnextframeheader() vin.skipnextframedata(ds, cs) except EOFError: break datasize = datasize + ds if cs: datasize = datasize + cs if not short: if n%8 == 0: sys.stdout.write('\n') if delta: sys.stdout.write('\t' + `t - told`) told = t else: sys.stdout.write('\t' + `t`) n = n+1 if not short: print if terse: print string.rjust(`n`, 6), print string.rjust(`int(n*10000.0/t)*0.1`, 5) else: print 'Total', n, 'frames in', t*0.001, 'sec.', if t: print '-- average', int(n*10000.0/t)*0.1, 'frames/sec', print print 'Total data', 0.1 * int(datasize / 102.4), 'Kbytes', if t: print '-- average', print 0.1 * int(datasize / 0.1024 / t), 'Kbytes/sec', print vin.close() return 0
bffc062b80976622c8791d6b0084080db4ebe488 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/bffc062b80976622c8791d6b0084080db4ebe488/vinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 3459, 4672, 775, 30, 331, 267, 273, 776, 812, 18, 8529, 58, 267, 812, 7675, 2738, 12, 3459, 13, 1335, 8340, 16, 1234, 30, 2589, 18, 11241, 18, 2626, 12, 3459, 397, 4290, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 3459, 4672, 775, 30, 331, 267, 273, 776, 812, 18, 8529, 58, 267, 812, 7675, 2738, 12, 3459, 13, 1335, 8340, 16, 1234, 30, 2589, 18, 11241, 18, 2626, 12, 3459, 397, 4290, 46...
elif geneclusters:
elif geneclusters!=None:
def save(self, jobname, geneclusters=None, expclusters=None): """save(jobname, geneclusters=None, expclusters=None)
f0e46c903da5db516162da71235bde40e8d0bd6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/f0e46c903da5db516162da71235bde40e8d0bd6c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1719, 529, 16, 3157, 557, 80, 6326, 33, 7036, 16, 1329, 16806, 33, 7036, 4672, 3536, 5688, 12, 4688, 529, 16, 3157, 557, 80, 6326, 33, 7036, 16, 1329, 16806, 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, 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, 1923, 12, 2890, 16, 1719, 529, 16, 3157, 557, 80, 6326, 33, 7036, 16, 1329, 16806, 33, 7036, 4672, 3536, 5688, 12, 4688, 529, 16, 3157, 557, 80, 6326, 33, 7036, 16, 1329, 16806, 33, ...
prof = prof.runctx('main(*parse_arguments())', globals(), {})
prof = prof.runctx('main(parse_arguments())', globals(), {})
def _profile(): # Hotshot profiler. if PROFILER == 'hotshot': try: import hotshot, hotshot.stats except ImportError: print >>sys.stderr, "Could not import profile module!" return try: prof = hotshot.Profile('hotshot.out') prof = prof.runctx('main(*parse_arguments())', globals(), {}) except SystemExit: pass prof.close() # Convert profile.hotshot -> profile.out print 'Consolidating hotshot profiling info...' hotshot.stats.load('hotshot.out').dump_stats('profile.out') # Standard 'profile' profiler. elif PROFILER == 'profile': # cProfile module was added in Python 2.5 -- use it if its' # available, since it's faster. try: from cProfile import Profile except ImportError: try: from profile import Profile except ImportError: print >>sys.stderr, "Could not import profile module!" return # There was a bug in Python 2.4's profiler. Check if it's # present, and if so, fix it. (Bug was fixed in 2.4maint: # <http://mail.python.org/pipermail/python-checkins/ # 2005-September/047099.html>) if (hasattr(Profile, 'dispatch') and Profile.dispatch['c_exception'] is Profile.trace_dispatch_exception.im_func): trace_dispatch_return = Profile.trace_dispatch_return.im_func Profile.dispatch['c_exception'] = trace_dispatch_return try: prof = Profile() prof = prof.runctx('main(*parse_arguments())', globals(), {}) except SystemExit: pass prof.dump_stats('profile.out') else: print >>sys.stderr, 'Unknown profiler %s' % PROFILER return
b186bca609972ae380af022e20984d957f45e258 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3512/b186bca609972ae380af022e20984d957f45e258/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5040, 13332, 468, 670, 352, 2415, 16583, 18, 309, 4629, 10474, 654, 422, 296, 15224, 2415, 4278, 775, 30, 1930, 12811, 2415, 16, 12811, 2415, 18, 5296, 1335, 11308, 30, 1172, 1671, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5040, 13332, 468, 670, 352, 2415, 16583, 18, 309, 4629, 10474, 654, 422, 296, 15224, 2415, 4278, 775, 30, 1930, 12811, 2415, 16, 12811, 2415, 18, 5296, 1335, 11308, 30, 1172, 1671, ...
Returns a list describing the signiture of the method. In the
Returns a list describing the signature of the method. In the
def system_methodSignature(self, method_name): """system.methodSignature('add') => [double, int, int]
724cf2969d1f7ada415886f4fef1942ff4a6279a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/724cf2969d1f7ada415886f4fef1942ff4a6279a/SimpleXMLRPCServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2619, 67, 2039, 5374, 12, 2890, 16, 707, 67, 529, 4672, 3536, 4299, 18, 2039, 5374, 2668, 1289, 6134, 516, 306, 9056, 16, 509, 16, 509, 65, 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, 2619, 67, 2039, 5374, 12, 2890, 16, 707, 67, 529, 4672, 3536, 4299, 18, 2039, 5374, 2668, 1289, 6134, 516, 306, 9056, 16, 509, 16, 509, 65, 2, -100, -100, -100, -100, -100, -100, -100,...
1 Current position - whence may be negative; 2 End of stream - whence usually negative.
1 Current position - pos may be negative; 2 End of stream - pos usually negative.
def seek(self, pos: int, whence: int = 0) -> int: """seek(pos: int, whence: int = 0) -> int. Change stream position.
ee3913ec7148dd3d3059dfc6be57d4289a5899d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/ee3913ec7148dd3d3059dfc6be57d4289a5899d8/io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6520, 12, 2890, 16, 949, 30, 509, 16, 23692, 30, 509, 273, 374, 13, 317, 509, 30, 3536, 16508, 12, 917, 30, 509, 16, 23692, 30, 509, 273, 374, 13, 317, 509, 18, 225, 7576, 1407, 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, 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, 6520, 12, 2890, 16, 949, 30, 509, 16, 23692, 30, 509, 273, 374, 13, 317, 509, 30, 3536, 16508, 12, 917, 30, 509, 16, 23692, 30, 509, 273, 374, 13, 317, 509, 18, 225, 7576, 1407, 17...
return self.posts.filter(is_hidden=False).count()
return self.posts.filter(is_hidden=0).count()
def postCount(self): return self.posts.filter(is_hidden=False).count()
ab8f74e8bb594779560e53bd7e7fa24a0eb09b00 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11563/ab8f74e8bb594779560e53bd7e7fa24a0eb09b00/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 1380, 12, 2890, 4672, 327, 365, 18, 11660, 18, 2188, 12, 291, 67, 6345, 33, 8381, 2934, 1883, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 1380, 12, 2890, 4672, 327, 365, 18, 11660, 18, 2188, 12, 291, 67, 6345, 33, 8381, 2934, 1883, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if os.name == "posix": check_environ() sys_dir = os.path.dirname(sys.modules['distutils'].__file__) sys_file = os.path.join(sys_dir, "pydistutils.cfg") if os.path.isfile(sys_file): files.append(sys_file) user_file = os.path.join(os.environ.get('HOME'), ".pydistutils.cfg")
check_environ() if os.name=='posix': sys_dir = os.path.dirname(sys.modules['distutils'].__file__) user_filename = ".pydistutils.cfg" else: sys_dir = sysconfig.PREFIX user_filename = "pydistutils.cfg" sys_file = os.path.join(sys_dir, "pydistutils.cfg") if os.path.isfile(sys_file): files.append(sys_file) if os.environ.has_key('HOME'): user_file = os.path.join(os.environ.get('HOME'), user_filename)
def find_config_files (self): """Find as many configuration files as should be processed for this platform, and return a list of filenames in the order in which they should be parsed. The filenames returned are guaranteed to exist (modulo nasty race conditions).
acf3f6a7000eaed43f8c4e5df249967b06dfc474 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/acf3f6a7000eaed43f8c4e5df249967b06dfc474/dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1425, 67, 2354, 261, 2890, 4672, 3536, 3125, 487, 4906, 1664, 1390, 487, 1410, 506, 5204, 364, 333, 4072, 16, 471, 327, 279, 666, 434, 9066, 316, 326, 1353, 316, 1492, 2898, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1425, 67, 2354, 261, 2890, 4672, 3536, 3125, 487, 4906, 1664, 1390, 487, 1410, 506, 5204, 364, 333, 4072, 16, 471, 327, 279, 666, 434, 9066, 316, 326, 1353, 316, 1492, 2898, ...
cmp(self.get("title"), other.get("title")))
cmp(self.get("title"), other.get("title")) or cmp(self, other))
def __cmp__(self, other): return (cmp(self.get("album"), other.get("album")) or cmp(self.get("~#disc"), other.get("~#disc")) or cmp(self.get("~#track"), other.get("~#track")) or cmp(self.get("artist"), other.get("artist")) or cmp(self.get("title"), other.get("title")))
1ad5b5fc1285156912332d07a6f1c01f60e81b8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/1ad5b5fc1285156912332d07a6f1c01f60e81b8c/library.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 327, 261, 9625, 12, 2890, 18, 588, 2932, 25090, 6, 3631, 1308, 18, 588, 2932, 25090, 6, 3719, 578, 9411, 12, 2890, 18, 588, 2932, 98, 7, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 327, 261, 9625, 12, 2890, 18, 588, 2932, 25090, 6, 3631, 1308, 18, 588, 2932, 25090, 6, 3719, 578, 9411, 12, 2890, 18, 588, 2932, 98, 7, 22...
margin, id and usemap * `border` and `margin` can only be a number
margin, margin-(left,right,top,bottom), id and usemap * `border`, `margin`, and `margin-`* can only be a single number
def expand_macro(self, formatter, name, content): min_depth, max_depth = 1, 6 title = None inline = 0 if content: argv = [arg.strip() for arg in content.split(',')] if len(argv) > 0: depth = argv[0] if '-' in depth: min_depth, max_depth = [int(d) for d in depth.split('-', 1)] else: min_depth = max_depth = int(depth) if len(argv) > 1: title = argv[1].strip() if len(argv) > 2: inline = argv[2].strip().lower() == 'inline'
8ff8254fd0fea71073c407dc62d6a83285e22d31 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2831/8ff8254fd0fea71073c407dc62d6a83285e22d31/macros.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 26448, 12, 2890, 16, 4453, 16, 508, 16, 913, 4672, 1131, 67, 5979, 16, 943, 67, 5979, 273, 404, 16, 1666, 2077, 273, 599, 6370, 273, 374, 309, 913, 30, 5261, 273, 306, 3175...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 26448, 12, 2890, 16, 4453, 16, 508, 16, 913, 4672, 1131, 67, 5979, 16, 943, 67, 5979, 273, 404, 16, 1666, 2077, 273, 599, 6370, 273, 374, 309, 913, 30, 5261, 273, 306, 3175...
if sys.platform.startswith('java'):
if self._is_jython22():
def _process_command(self, command): if sys.platform.startswith('java'): # Jython's os.popen doesn't handle Unicode as explained in # http://jython.org/bugs/1735774. This bug is still in Jython 2.2. command = str(command) if '>' not in command: if command.endswith('&'): command = command[:-1] + ' 2>&1 &' else: command += ' 2>&1' self._info("Running command '%s'" % command) return self._encode_to_system(command)
bea27516544b74f2074404d3a8f9688afa30acef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7408/bea27516544b74f2074404d3a8f9688afa30acef/OperatingSystem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 3076, 12, 2890, 16, 1296, 4672, 309, 2589, 18, 9898, 18, 17514, 1918, 2668, 6290, 11, 4672, 468, 804, 18490, 1807, 1140, 18, 84, 3190, 3302, 1404, 1640, 9633, 487, 19765, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 3076, 12, 2890, 16, 1296, 4672, 309, 2589, 18, 9898, 18, 17514, 1918, 2668, 6290, 11, 4672, 468, 804, 18490, 1807, 1140, 18, 84, 3190, 3302, 1404, 1640, 9633, 487, 19765, ...
disc_id = str2num(2, self.sectors[offset + 20 : offset + 22])
disc_id = self.str2num(2, self.sectors[offset + 20 : offset + 22])
def read_disc_record(self, offset): # Total sectors per track (sectors * heads) sector_size = ord(self.sectors[offset]) # Sectors per track nsectors = ord(self.sectors[offset + 1]) # Heads per track heads = ord(self.sectors[offset + 2]) type = ord(self.sectors[offset+3]) if type == 1: density = 'single' # Single density disc elif type == 2: density = 'double' # Double density disc elif type == 3: density = 'quad' # Quad density disc else: density = 'unknown' # LowSector # StartUp # LinkBits # BitSize (size of ID field?) bit_size = str2num(1, self.sectors[offset + 6 : offset + 7]) # RASkew # BootOpt # Zones zones = ord(self.sectors[offset + 10]) # ZoneSpare # RootDir root = self.sectors[offset + 12 : offset + 15] # Identify # SequenceSides # DoubleStep # DiscSize disc_size = str2num(4, self.sectors[offset + 16 : offset + 20]) # DiscId disc_id = str2num(2, self.sectors[offset + 20 : offset + 22]) # DiscName disc_name = string.strip(self.sectors[offset + 22 : offset + 32]) return {'sectors': nsectors, 'heads': heads, 'density': density, 'disc size': disc_size, 'disc ID': disc_id, 'disc name': disc_name, 'zones': zones, 'root': root}
25f0ef7dc7411ab5a651cc7127ed79f5bcd54fc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3059/25f0ef7dc7411ab5a651cc7127ed79f5bcd54fc3/ADF2INF.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2251, 71, 67, 3366, 12, 2890, 16, 1384, 4672, 225, 468, 10710, 16323, 87, 1534, 3298, 261, 5709, 1383, 380, 22742, 13, 16323, 67, 1467, 273, 4642, 12, 2890, 18, 5709, 1383, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2251, 71, 67, 3366, 12, 2890, 16, 1384, 4672, 225, 468, 10710, 16323, 87, 1534, 3298, 261, 5709, 1383, 380, 22742, 13, 16323, 67, 1467, 273, 4642, 12, 2890, 18, 5709, 1383, 63...
import string
def _test(): import time import sys import string import os 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 = UnixMailbox(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 = string.atoi(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)
8df0d5a4bb1c92850cf86888f5630a6477c32e74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/8df0d5a4bb1c92850cf86888f5630a6477c32e74/mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 813, 1930, 2589, 1930, 1140, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 813, 1930, 2589, 1930, 1140, 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,...
def __call__(self, polys, mode='b', cmd_list=['y', 'input', 'output'], verbose=False): """ Returns as a string the result of running PHC with the given polynomials, mode, and command list. The command list is a sequence of commands that would get input interactively to PHC if you ran it from the command line.
def blackbox(self, polys, input_ring, verbose=False): """ Returns as a string the result of running PHC with the given polynomials under blackbox mode (the '-b' option).
def __call__(self, polys, mode='b', cmd_list=['y', 'input', 'output'], verbose=False): """ Returns as a string the result of running PHC with the given polynomials, mode, and command list. The command list is a sequence of commands that would get input interactively to PHC if you ran it from the command line. INPUT: polys -- a list of multivariate polynomials (elements of a multivariate polynomial ring). mode -- (default: 'b' for batch mode) one of the the letters '0', 'a', b', 'c', 'd', 'e', 'f', 'k', 'l', 'm', 'p', 'q', 'r', 's', 'v', 'w', 'z' cmd_list -- a list of commands, which will get input to PHC. Use the special commands 'input' and 'output' to represent the tempory input filename and output filename, respectively. default: ['y', 'input', 'output'] verbose -- print lots of verbose information about what this function does.
76537610450e2f69d9ad250381f869a2a848e51b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/76537610450e2f69d9ad250381f869a2a848e51b/phc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7721, 2147, 12, 2890, 16, 2952, 1900, 16, 810, 67, 8022, 16, 3988, 33, 8381, 4672, 3536, 2860, 487, 279, 533, 326, 563, 434, 3549, 15490, 39, 598, 326, 864, 16991, 87, 3613, 7721, 2147...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7721, 2147, 12, 2890, 16, 2952, 1900, 16, 810, 67, 8022, 16, 3988, 33, 8381, 4672, 3536, 2860, 487, 279, 533, 326, 563, 434, 3549, 15490, 39, 598, 326, 864, 16991, 87, 3613, 7721, 2147...
self.packages = self.pimpdb.list()
packages = self.pimpdb.list() if show_hidden: self.packages = packages else: self.packages = [] for pkg in packages: name = pkg.fullname() if name[0] == '(' and name[-1] == ')' and not show_hidden: continue self.packages.append(pkg)
def getbrowserdata(self, show_hidden=1): self.packages = self.pimpdb.list() rv = [] for pkg in self.packages: name = pkg.fullname() if name[0] == '(' and name[-1] == ')' and not show_hidden: continue status, _ = pkg.installed() description = pkg.description() rv.append((status, name, description)) return rv
f776dee6dd3d11f084071f52200838aeed0f4613 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f776dee6dd3d11f084071f52200838aeed0f4613/PackageManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 11213, 892, 12, 2890, 16, 2405, 67, 6345, 33, 21, 4672, 5907, 273, 365, 18, 84, 14532, 1966, 18, 1098, 1435, 309, 2405, 67, 6345, 30, 365, 18, 10308, 273, 5907, 469, 30, 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, 336, 11213, 892, 12, 2890, 16, 2405, 67, 6345, 33, 21, 4672, 5907, 273, 365, 18, 84, 14532, 1966, 18, 1098, 1435, 309, 2405, 67, 6345, 30, 365, 18, 10308, 273, 5907, 469, 30, 365, 18...
('{{project.req_settings.get("disable_tasktracker", "true")}}',
('{{project.req_settings.get("disable_tasktracker", "false")}}',
def run(self): if self.maker.simulate: self.logger.notify('Would run "zopectl run %s %s"' % (self.script_path, self.script_args)) return if os.path.exists(self.script_path): zopectl_path = self.interpolate('{{env.base_path}}/opencore/zope/bin/zopectl') process_args = [zopectl_path, 'run', self.script_path] process_args.append(self.script_args) script_proc = subprocess.Popen(process_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) self.logger.notify('Script running (PID %s)' % script_proc.pid) script_proc.communicate() else: self.maker.beep_if_necessary() self.logger.warn('Tried to run zopectl script at %s but the ' 'path does not exist' % self.script_path, color='red')
735f95710e4fcbb123f837d31f87839ae56819f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12796/735f95710e4fcbb123f837d31f87839ae56819f5/topp_opencore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 309, 365, 18, 29261, 18, 9812, 6243, 30, 365, 18, 4901, 18, 12336, 2668, 59, 1006, 1086, 315, 94, 83, 1181, 80, 1086, 738, 87, 738, 87, 5187, 738, 261, 2890, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 309, 365, 18, 29261, 18, 9812, 6243, 30, 365, 18, 4901, 18, 12336, 2668, 59, 1006, 1086, 315, 94, 83, 1181, 80, 1086, 738, 87, 738, 87, 5187, 738, 261, 2890, 18...
sage: def _(which_plot=[F, G, H, I, J]):
... def _(which_plot=[F, G, H, I, J]):
sage: def _(which_plot=[F, G, H, I, J]):
6a6b82f7e5f5e44ecfe79fc9e370831de7c2ec87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6a6b82f7e5f5e44ecfe79fc9e370831de7c2ec87/plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 389, 12, 12784, 67, 4032, 22850, 42, 16, 611, 16, 670, 16, 467, 16, 804, 65, 4672, 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, 272, 410, 30, 1652, 389, 12, 12784, 67, 4032, 22850, 42, 16, 611, 16, 670, 16, 467, 16, 804, 65, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if idx < self.idx:
if idx <= self.idx:
def checkRemoval(self, modPage): for page in self.pages[:]: if page.modulePage == modPage: idx = self.pages.index(page) if idx < self.idx: self.idx = self.idx - 1 del self.pages[idx]
c3729460957d832c9a645a0f5114f37d51e945a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/c3729460957d832c9a645a0f5114f37d51e945a4/Browse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 24543, 12, 2890, 16, 681, 1964, 4672, 364, 1363, 316, 365, 18, 7267, 10531, 14542, 309, 1363, 18, 2978, 1964, 422, 681, 1964, 30, 2067, 273, 365, 18, 7267, 18, 1615, 12, 2433, 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, 866, 24543, 12, 2890, 16, 681, 1964, 4672, 364, 1363, 316, 365, 18, 7267, 10531, 14542, 309, 1363, 18, 2978, 1964, 422, 681, 1964, 30, 2067, 273, 365, 18, 7267, 18, 1615, 12, 2433, 13,...
s = _center(`year`, colwidth * 3 + c * 2).rstrip() + '\n' * l
s = `year`.center(colwidth * 3 + c * 2).rstrip() + '\n' * l
def calendar(year, w=0, l=0, c=_spacing): """Returns a year's calendar as a multi-line string.""" w = max(2, w) l = max(1, l) c = max(2, c) colwidth = (w + 1) * 7 - 1 s = _center(`year`, colwidth * 3 + c * 2).rstrip() + '\n' * l header = weekheader(w) header = format3cstring(header, header, header, colwidth, c).rstrip() for q in range(January, January+12, 3): s = (s + '\n' * l + format3cstring(month_name[q], month_name[q+1], month_name[q+2], colwidth, c).rstrip() + '\n' * l + header + '\n' * l) data = [] height = 0 for amonth in range(q, q + 3): cal = monthcalendar(year, amonth) if len(cal) > height: height = len(cal) data.append(cal) for i in range(height): weeks = [] for cal in data: if i >= len(cal): weeks.append('') else: weeks.append(week(cal[i], w)) s = s + format3cstring(weeks[0], weeks[1], weeks[2], colwidth, c).rstrip() + '\n' * l return s[:-l] + '\n'
22a6d18157146ce2f5d2d27fa9bcf8cd432e8388 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/22a6d18157146ce2f5d2d27fa9bcf8cd432e8388/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5686, 12, 6874, 16, 341, 33, 20, 16, 328, 33, 20, 16, 276, 33, 67, 14080, 4672, 3536, 1356, 279, 3286, 1807, 5686, 487, 279, 3309, 17, 1369, 533, 12123, 341, 273, 943, 12, 22, 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, 5686, 12, 6874, 16, 341, 33, 20, 16, 328, 33, 20, 16, 276, 33, 67, 14080, 4672, 3536, 1356, 279, 3286, 1807, 5686, 487, 279, 3309, 17, 1369, 533, 12123, 341, 273, 943, 12, 22, 16, ...
self.iacseq = ''
self.iacseq = b''
def process_rawq(self): """Transfer from raw queue to cooked queue.
a69ff7792116218bfddc90e5e2776d431495b39b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/a69ff7792116218bfddc90e5e2776d431495b39b/telnetlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1899, 85, 12, 2890, 4672, 3536, 5912, 628, 1831, 2389, 358, 15860, 329, 2389, 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, 1207, 67, 1899, 85, 12, 2890, 4672, 3536, 5912, 628, 1831, 2389, 358, 15860, 329, 2389, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def fl_set_input_filter(ob, py_validate): """ fl_set_input_filter(ob, py_validate) -> input_filter func. """
def fl_set_input_filter(pObject, py_validate): """ fl_set_input_filter(pObject, py_validate) -> input_filter func. """
def fl_set_input_filter(ob, py_validate): """ fl_set_input_filter(ob, py_validate) -> input_filter func. """ c_validate = FL_INPUTVALIDATOR(py_validate) _cfunc_refs[get_rand_dictkey()] = c_validate retval = _fl_set_input_filter(ob, c_validate) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 2630, 67, 2188, 12, 84, 921, 16, 2395, 67, 5662, 4672, 3536, 1183, 67, 542, 67, 2630, 67, 2188, 12, 84, 921, 16, 2395, 67, 5662, 13, 317, 810, 67, 2188, 1326, 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, 1183, 67, 542, 67, 2630, 67, 2188, 12, 84, 921, 16, 2395, 67, 5662, 4672, 3536, 1183, 67, 542, 67, 2630, 67, 2188, 12, 84, 921, 16, 2395, 67, 5662, 13, 317, 810, 67, 2188, 1326, 18...
if y.hasattr('__setstate__'):
if hasattr(y, '__setstate__'):
def _deepcopy_inst(x, memo): if hasattr(x, '__deepcopy__'): return x.__deepcopy__() if hasattr(x, '__getinitargs__'): args = x.__getinitargs__() args = deepcopy(args, memo) else: args = () y = apply(x.__class__, args) memo[id(x)] = y if hasattr(x, '__getstate__'): state = x.__getstate__() else: state = x.__dict__ state = deepcopy(state, memo) if y.hasattr('__setstate__'): y.__setstate__(state) else: for key in state.keys(): setattr(y, key, state[key]) return y
fefbbe508582d6cd057e6e8e1be89607203076a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fefbbe508582d6cd057e6e8e1be89607203076a9/copy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16589, 3530, 67, 8591, 12, 92, 16, 11063, 4672, 309, 3859, 12, 92, 16, 4940, 16589, 3530, 7250, 4672, 327, 619, 16186, 16589, 3530, 972, 1435, 309, 3859, 12, 92, 16, 4940, 588, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16589, 3530, 67, 8591, 12, 92, 16, 11063, 4672, 309, 3859, 12, 92, 16, 4940, 16589, 3530, 7250, 4672, 327, 619, 16186, 16589, 3530, 972, 1435, 309, 3859, 12, 92, 16, 4940, 588, 27...
isStrong = trv.isStrongReference(name, oldVersion, flavor)
def _updateVersion(trv, mark, newVersion): kind = mark[0] if kind == V_LOADED: trv.troveInfo.loadedTroves.remove(mark[1]) trv.troveInfo.loadedTroves.add(mark[1].name(), newVersion, mark[1].flavor()) elif kind == V_BREQ: trv.troveInfo.buildReqs.remove(mark[1]) trv.troveInfo.buildReqs.add(mark[1].name(), newVersion, mark[1].flavor()) elif kind == V_REFTRV: (name, oldVersion, flavor) = mark[1] byDefault = trv.includeTroveByDefault(name, oldVersion, flavor) isStrong = trv.isStrongReference(name, oldVersion, flavor) trv.delTrove(name, oldVersion, flavor, False, weakRef = not isStrong) trv.addTrove(name, newVersion, flavor, byDefault = byDefault, weakRef = not isStrong) else: assert(0)
48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e/clone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 1444, 12, 313, 90, 16, 2267, 16, 28906, 4672, 3846, 273, 2267, 63, 20, 65, 225, 309, 3846, 422, 776, 67, 31408, 30, 433, 90, 18, 88, 303, 537, 966, 18, 4230, 56, 303, 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, 389, 2725, 1444, 12, 313, 90, 16, 2267, 16, 28906, 4672, 3846, 273, 2267, 63, 20, 65, 225, 309, 3846, 422, 776, 67, 31408, 30, 433, 90, 18, 88, 303, 537, 966, 18, 4230, 56, 303, 33...
appDir = os.path.dirname(options.app)
def main(): parser = OptionParser() parser.add_option("--appname", action = "store", type = "string", dest = "app", default = os.path.join(SCRIPT_DIRECTORY, automation.DEFAULT_APP), help = "absolute path to application, overriding default") parser.add_option("--extra-profile-file", action = "append", dest = "extraProfileFiles", default = [], help = "copy specified files/dirs to testing profile") parser.add_option("--symbols-path", action = "store", type = "string", dest = "symbolsPath", default = automation.SYMBOLS_PATH, help = "absolute path to directory containing breakpad symbols") options, args = parser.parse_args() if len(args) != 1: print >>sys.stderr, "No reftest.list specified." sys.exit(1) options.app = getFullPath(options.app) if not os.path.exists(options.app): print """Error: Path %(app)s doesn't exist.
8f81a77d5090f6065f962bf7c0edbb1635095df5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/8f81a77d5090f6065f962bf7c0edbb1635095df5/runreftest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 2932, 413, 2910, 529, 3113, 1301, 273, 315, 2233, 3113, 618, 273, 315, 1080, 3113, 1570, 273, 315, 2910, 3113, 805, 273, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 2932, 413, 2910, 529, 3113, 1301, 273, 315, 2233, 3113, 618, 273, 315, 1080, 3113, 1570, 273, 315, 2910, 3113, 805, 273, 11...
gaugeBox = wx.Window(self, -1, wx.Point((width - gaugeWidth)/2, height + msgHeight + padding), wx.Size(gaugeWidth, gaugeHeight)) gaugeBox.SetBackgroundColour(wx.BLACK) self.gauge = wx.Gauge(gaugeBox, -1, range = self.gaugeTicks, style = wx.GA_HORIZONTAL, pos = (gaugeBorder, gaugeBorder), size = (gaugeWidth - 2 * gaugeBorder, gaugeHeight - 2 * gaugeBorder)) self.gauge.SetBackgroundColour(wx.Colour(0x33, 0x33, 0x33))
progressSizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(progressSizer, 1, wx.EXPAND) progressSizer.Add((padding, padding), 1, wx.EXPAND) progressSizer.Add(self.progressText, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.BOTTOM, padding) self.progressText.SetFont(font) self.progressPercent = wx.StaticText(self, -1, style=wx.ALIGN_RIGHT) self.progressPercent.SetBackgroundColour(wx.WHITE) self.progressPercent.SetFont(font) progressSizer.Add(self.progressPercent, 1, wx.BOTTOM | wx.RIGHT, padding)
def __init__(self, parent, bmp): height = bmp.GetHeight() width = bmp.GetWidth() msgHeight = 20 gaugeHeight = 15 gaugeBorder = 1 gaugeWidth = min(300, width - 100) padding = 5 frameSize = wx.Size(width, height + msgHeight + gaugeHeight + 2*padding) wx.Frame.__init__(self, size=frameSize, parent=parent, style=wx.SIMPLE_BORDER) self.CenterOnScreen() self.SetBackgroundColour(wx.WHITE)
e46096109f5c24c0bc28e14b6fe8a1fb2065e749 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/e46096109f5c24c0bc28e14b6fe8a1fb2065e749/Application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 324, 1291, 4672, 2072, 273, 324, 1291, 18, 967, 2686, 1435, 1835, 273, 324, 1291, 18, 967, 2384, 1435, 1234, 2686, 273, 4200, 13335, 2686, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 324, 1291, 4672, 2072, 273, 324, 1291, 18, 967, 2686, 1435, 1835, 273, 324, 1291, 18, 967, 2384, 1435, 1234, 2686, 273, 4200, 13335, 2686, 273, ...
unittest.TextTestRunner().run(makeSuite())
unittest.TextTestRunner().run(makeSuite())
def makeSuite(): suite = unittest.TestSuite() loader = unittest.TestLoader() if sys.platform[:4] != 'java': suite.addTest(loader.loadTestsFromTestCase(ManualTestCase)) return suite
13ed2b7872caa965707cef3cc420b804a24e8628 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/13ed2b7872caa965707cef3cc420b804a24e8628/test_docs_build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 13587, 13332, 11371, 273, 2836, 3813, 18, 4709, 13587, 1435, 4088, 273, 2836, 3813, 18, 4709, 2886, 1435, 309, 2589, 18, 9898, 10531, 24, 65, 480, 296, 6290, 4278, 11371, 18, 1289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 13587, 13332, 11371, 273, 2836, 3813, 18, 4709, 13587, 1435, 4088, 273, 2836, 3813, 18, 4709, 2886, 1435, 309, 2589, 18, 9898, 10531, 24, 65, 480, 296, 6290, 4278, 11371, 18, 1289, ...
return _get(name, datamodel.ResultType.MostPopularSubjects,days)
return _get(name, datamodel.ResultType.MostPopularSubjects, days, number_of_results)
def get_most_used_for_app(name, days=14, number_of_results=5): if iface is None: return [] return _get(name, datamodel.ResultType.MostPopularSubjects,days)
ca2631d7f79f3d2c2e3f0e6af83427e6e92ea34e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/ca2631d7f79f3d2c2e3f0e6af83427e6e92ea34e/zg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10329, 67, 3668, 67, 1884, 67, 2910, 12, 529, 16, 4681, 33, 3461, 16, 1300, 67, 792, 67, 4717, 33, 25, 4672, 309, 9751, 353, 599, 30, 327, 5378, 327, 389, 588, 12, 529, 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, 336, 67, 10329, 67, 3668, 67, 1884, 67, 2910, 12, 529, 16, 4681, 33, 3461, 16, 1300, 67, 792, 67, 4717, 33, 25, 4672, 309, 9751, 353, 599, 30, 327, 5378, 327, 389, 588, 12, 529, 16...
>>> x.__getnewargs__() ()
def test_basic_pickling(): """ >>> x = Simple('x', aaa=1, bbb='foo') >>> x.__getnewargs__() () >>> print_dict(x.__getstate__()) {'__name__': 'x', 'aaa': 1, 'bbb': 'foo'} >>> f, (c,), state = x.__reduce__() >>> f.__name__ '__newobj__' >>> f.__module__ 'copy_reg' >>> c.__name__ 'Simple' >>> print_dict(state) {'__name__': 'x', 'aaa': 1, 'bbb': 'foo'} >>> pickle.loads(pickle.dumps(x)) == x 1 >>> pickle.loads(pickle.dumps(x, 0)) == x 1 >>> pickle.loads(pickle.dumps(x, 1)) == x 1 >>> pickle.loads(pickle.dumps(x, 2)) == x 1 >>> x.__setstate__({'z': 1}) >>> x.__dict__ {'z': 1} """
e2c134566a030f7217b479d26dd9f54de89fa361 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e2c134566a030f7217b479d26dd9f54de89fa361/test_ExtensionClass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13240, 67, 11503, 2456, 13332, 3536, 4080, 619, 273, 4477, 2668, 92, 2187, 279, 7598, 33, 21, 16, 7129, 70, 2218, 11351, 6134, 225, 4080, 1172, 67, 1576, 12, 92, 16186, 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, 1842, 67, 13240, 67, 11503, 2456, 13332, 3536, 4080, 619, 273, 4477, 2668, 92, 2187, 279, 7598, 33, 21, 16, 7129, 70, 2218, 11351, 6134, 225, 4080, 1172, 67, 1576, 12, 92, 16186, 588, ...
g0 = repr(gval[0,:]) g1 = repr(gval[1,:]) s0 = 'array([ 0., 0., 0.])' s1 = 'array([ 1.55009327, 0. , 0. ])' self.failUnless(g0 == s0, (g0, s0)) self.failUnless(g1 == s1, (g1, s1))
good = numpy.zeros_like(data) good[1,0] = numpy.exp(data[1,0]) self.failUnless(numpy.all(gval == good), (gval, good))
def test_grad_0d(self): n = as_tensor(numpy.random.rand(2,3)) t = n[1,0] gn = grad(sum(exp(t)), n) gval = eval_outputs([gn]) g0 = repr(gval[0,:]) g1 = repr(gval[1,:]) s0 = 'array([ 0., 0., 0.])' s1 = 'array([ 1.55009327, 0. , 0. ])' self.failUnless(g0 == s0, (g0, s0)) self.failUnless(g1 == s1, (g1, s1))
44049213413a19dcd629aa8b85d37ff44cd18c13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/44049213413a19dcd629aa8b85d37ff44cd18c13/test_basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9974, 67, 20, 72, 12, 2890, 4672, 290, 273, 487, 67, 13720, 12, 15974, 18, 9188, 18, 7884, 12, 22, 16, 23, 3719, 268, 273, 290, 63, 21, 16, 20, 65, 22908, 273, 6058, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9974, 67, 20, 72, 12, 2890, 4672, 290, 273, 487, 67, 13720, 12, 15974, 18, 9188, 18, 7884, 12, 22, 16, 23, 3719, 268, 273, 290, 63, 21, 16, 20, 65, 22908, 273, 6058, 12, ...
_anomal = False
ANOMAL = False
def select_strategy(idxref_results, xds_par): "Interactive session to select strategy parameters." sel_spgn = xds_par["SPACE_GROUP_NUMBER"] sel_ano = xds_par["FRIEDEL'S_LAW"] #print xds_par["UNIT_CELL_CONSTANTS"] valid_inp = False bravais_to_spgs = get_BravaisToSpgs() # Select LATTICE while not valid_inp: defSel = 1 if sel_spgn != 0: # choose the lattice solution according to the selected spg. i = 0 for LAT in idxref_results["lattices_table"]: if LAT.fit <= LATTICE_GEOMETRIC_FIT_CUTOFF: i += 1 if sel_spgn in bravais_to_spgs[LAT.Bravais_type]: defSel = i selection = raw_input("\n Select a solution number [%d]: " % defSel) # If the selection is not compatible with the spg, set not valid _sel = selection.split() selnum = 1 try: if len(_sel) == 1: selnum = int(_sel[0]) valid_inp = True elif len(_sel) == 0: selnum = defSel valid_inp = True else: raise Exception, "Invalid selection input." except Exception, err: print "\n ERROR. ", err selLat = idxref_results["lattices_table"][selnum-1] if sel_spgn == 0: sel_spgn = selLat.symmetry_num valid_inp = False # Select SPACEGROUP print " Possible spacegroup for this lattice are:\n" for spgsymb in bravais_to_spgs[selLat.Bravais_type]: print " %15s, number: %3d" % (SPGlib[spgsymb][1], spgsymb) while not valid_inp: selection = raw_input("\n Select the spacegroup [%s, %d]: " % (SPGlib[sel_spgn][1], sel_spgn)) _sel = selection.split() try: if len(_sel) == 1: sel_spgn, _spg_info, _spg_str = parse_spacegroup(_sel[0]) # selSpgS = _spg_info[1] valid_inp = True elif len(_sel) == 0: valid_inp = True else: raise Exception, "Invalid selection input." if sel_spgn not in bravais_to_spgs[selLat.Bravais_type]: valid_inp = False msg = "Inconsistant combinaison of Bravais lattice" msg += " and spacegroup.\n For this Bravais Lattice" msg += " (%s), spacegroup should be one of these:\n\n" % \ (selLat.Bravais_type) for spgsymb in bravais_to_spgs[selLat.Bravais_type]: msg += " %15s, number: %3d\n" % \ (SPGlib[spgsymb][1], spgsymb) raise Exception, msg except Exception, err: print "\n ERROR. ", err valid_inp = False # Select ANOMALOUS while not valid_inp: if sel_ano == "TRUE": txt3 = "N/y" else: txt3 = "Y/n" selection = raw_input(" Anomalous [%s]: " % txt3) try: _ans = selection.strip() if _ans == "": valid_inp = True elif _ans[0] in "Yy": xds_par["FRIEDEL'S_LAW"] = "FALSE" valid_inp = True elif _ans[0] in "Nn": xds_par["FRIEDEL'S_LAW"] = "TRUE" valid_inp = True else: raise Exception, "Invalid answer [Y/N]." except Exception, err: print "\n ERROR. ", err print "\n Selected cell paramters: ", selLat if sel_spgn > 2: selLat.idealize() print " Idealized cell parameters: ", selLat.prt() xds_par["UNIT_CELL_CONSTANTS"] = selLat.prt() xds_par["SPACE_GROUP_NUMBER"] = sel_spgn return xds_par valid_inp = False # Select ANOMALOUS while not valid_inp: if sel_ano == "TRUE": txt3 = "N/y" else: txt3 = "Y/n" selection = raw_input(" Anomalous [%s]: " % txt3) try: _ans = selection.strip() if _ans == "": valid_inp = True elif _ans[0] in "Yy": xds_par["FRIEDEL'S_LAW"] = False valid_inp = True elif _ans[0] in "Nn": xds_par["FRIEDEL'S_LAW"] = True valid_inp = True else: raise Exception, "Invalid answer [Y/N]." except Exception, err: print "\n ERROR. ", err print "\n Selected cell paramters: ", selLat if sel_spgn > 2: selLat.idealize() print " Idealized cell parameters: ", selLat.prt() xds_par["UNIT_CELL_CONSTANTS"] = selLat.prt() xds_par["SPACE_GROUP_NUMBER"] = sel_spgn # Select just the internal circle of the detector. xds_par["TRUSTED_REGION"] = 0.0, 1.0 return xds_par
a7de4b51cedee4f8c0433feacbde7525192c6031 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4374/a7de4b51cedee4f8c0433feacbde7525192c6031/XDS.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 14914, 12, 3465, 1734, 67, 4717, 16, 619, 2377, 67, 1065, 4672, 315, 26442, 1339, 358, 2027, 6252, 1472, 1199, 357, 67, 1752, 1600, 273, 619, 2377, 67, 1065, 9614, 6616, 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, 2027, 67, 14914, 12, 3465, 1734, 67, 4717, 16, 619, 2377, 67, 1065, 4672, 315, 26442, 1339, 358, 2027, 6252, 1472, 1199, 357, 67, 1752, 1600, 273, 619, 2377, 67, 1065, 9614, 6616, 67, ...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 543) else quickfix.StringField.__init__(self, 543, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 8942, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 8942, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
pkgListing = model.PackageListing.query.filter_by(id=pkgListId).one() if not pkgListing: return dict(status=False, message='No such package listing %s' % pkgListId)
try: pkgListing = model.PackageListing.query.filter_by( id=pkgListId).one() except InvalidRequestError: return dict(status=False, message='No such package listing %s' % pkgListId)
def toggle_acl_request(self, containerId): # Make sure package exists pkgListId, aclName = containerId.split(':') pkgListing = model.PackageListing.query.filter_by(id=pkgListId).one() if not pkgListing: return dict(status=False, message='No such package listing %s' % pkgListId)
48b4c95df35399b9205c63bf94720f75862df541 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/48b4c95df35399b9205c63bf94720f75862df541/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10486, 67, 10150, 67, 2293, 12, 2890, 16, 27142, 4672, 468, 4344, 3071, 2181, 1704, 3475, 682, 548, 16, 7895, 461, 273, 27142, 18, 4939, 2668, 2497, 13, 3475, 19081, 273, 938, 18, 2261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10486, 67, 10150, 67, 2293, 12, 2890, 16, 27142, 4672, 468, 4344, 3071, 2181, 1704, 3475, 682, 548, 16, 7895, 461, 273, 27142, 18, 4939, 2668, 2497, 13, 3475, 19081, 273, 938, 18, 2261, ...
<?php echo "<table width=\\"100%%\\"><tr><td>"; echo "<div style=\\"text-align: right;\\">"; echo "<font color=\\" ?>
<?php echo "<table width=\\"100%%\\"><tr><td>"; echo "<div style=\\"text-align: right;\\">"; echo "<font color=\\" ?>
def makePage( _T, _N, _M, MIRRORS_DATA, lang, charset ): navigation = Tree \ ( [ P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['home'], href=makeURL( '', lang ))] ), Tree \ ( [ P ( contents = [ Img( src = '/images/englishlogo.png' ), A( 'English', href='%(BASE)s' )]), P ( contents = [ Img( src = '/images/germanylogo.png' ), A( 'Deutsch', href='%(BASE)sde/' )]), P ( contents = [ Img( src = '/images/francelogo.png' ), A( 'Fran&#231;ais', href='%(BASE)sfr/' )]), P ( contents = [ Img( src = '/images/italylogo.png' ), A( 'Italiano', href='%(BASE)sit/' )]), P ( contents = [ Img( src = '/images/netherlandslogo.png' ), A( 'Nederlands', href='%(BASE)snl/' )]), P ( contents = [ Img( src = '/images/polandlogo.png' ), A( 'Polski', href='%(BASE)spl/' )]), P ( contents = [ Img( src = '/images/portugallogo.png' ), A( 'Portugu&#234;s', href='%(BASE)spt/' )]), P ( contents = [ Img( src = '/images/russialogo.png' ), A( '&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;', href='%(BASE)sru/' )]), P ( contents = [ Img( src = '/images/finlandlogo.png' ), A( 'Suomi', href='%(BASE)sfi/' )]), P ( contents = [ Img( src = '/images/swedenlogo.png' ), A( 'Svenska', href='%(BASE)ssv/' )]) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['news'], href=makeURL( 'news/', lang ) )]), Tree ( A( _N['archive'], href=makeURL( 'news/archive/', lang ) ) ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['introduction'], href=makeURL( 'introduction/', lang ) ) ]), Tree \ ( [ #A( _N['status'], href=makeURL('introduction/status/everything.html' ), A( _N['screenshots'], href=makeURL( 'pictures/screenshots/', lang) ), A( _N['ports'], href=makeURL( 'introduction/ports', lang ) ), A( _N['license'], href='%(BASE)slicense.html' ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['download'], href=makeURL( 'download', lang ) )]), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), _N['documentation'] ]), Tree \ ( [ A( _N['users'], href=makeURL( 'documentation/users/', lang ) ), Tree \ ( [ A( _N['installation'], href=makeURL( 'documentation/users/installation', lang ) ), A( _N['using'], href=makeURL( 'documentation/users/using', lang ) ), A( _N['shell'], href=makeURL( 'documentation/users/shell/index', lang ) ), A( _N['faq'], href=makeURL( 'documentation/users/faq', lang ) ), #_N['ports'], #A( _N['links'], href=makeURL( 'documentation/users/links', lang ) ) ] ), A( _N['developers'], href=makeURL( 'documentation/developers/index', lang ) ), Tree \ ( [ A( _N['contribute'], href=makeURL( 'documentation/developers/contribute', lang ) ), A( 'Roadmap', href=makeURL( 'documentation/developers/roadmap', lang ) ), A( _N['bug-tracker'], href='http://sourceforge.net/tracker/?atid=439463&group_id=43586&func=browse' ), A( _N['working-with-subversion'], href=makeURL( 'documentation/developers/svn', lang ) ), A( _N['compiling'], href=makeURL( 'documentation/developers/compiling', lang ) ), A( _N['application-development-manual'], href=makeURL( 'documentation/developers/app-dev/index', lang ) ), A( _N['zune-application-development-manual'], href=makeURL( 'documentation/developers/zune-application-development', lang ) ), A( _N['system-development-manual'], href=makeURL( 'documentation/developers/system-development', lang ) ), A( _N['debugging-manual'], href=makeURL( 'documentation/developers/debugging', lang ) ), A( _N['reference'], href=makeURL( 'documentation/developers/autodocs/index', lang ) ), A( _N['specifications'], href=makeURL( 'documentation/developers/specifications/', lang ) ), A( _N['ui-style-guide'], href=makeURL( 'documentation/developers/ui', lang ) ), A( _N['documenting'], href=makeURL( 'documentation/developers/documenting', lang ) ), A( _N['porting'], href=makeURL( 'documentation/developers/porting', lang ) ), #A( _N['translating'], href=makeURL( 'documentation/developers/translating', lang ) ), A( _N['summaries'], href=makeURL( 'documentation/developers/summaries/', lang ) ), A( _N['links'], href=makeURL( 'documentation/developers/links', lang ) ) ] ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['contact'], href=makeURL( 'contact', lang ) )]), Tree \ ( [ A( _N['mailing-lists'], href=makeURL( 'contact', lang, 'mailing-lists' ) ), #A( _N['forums'], href=makeURL( 'contact', lang, 'forums' ) ), A( _N['irc-channels'], href=makeURL( 'contact', lang, 'irc-channels' ) ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['credits'], href=makeURL( 'credits', lang ) )]), P ( contents = [ Img( src = '/images/pointer.png' ), A( 'Acknowledgements', href=makeURL( 'acknowledgements', lang ) )]), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), _N['pictures']]), Tree \ ( [ A( _N['developers'], href=makeURL( 'pictures/developers/', lang ) ), A( _N['developers-together'], href=makeURL( 'pictures/developers-together/', lang ) ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['sponsors'], href=makeURL( 'sponsors', lang ) )]), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['linking'], href=makeURL( 'linking', lang ) )]), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['links'], href=makeURL( 'links', lang ) )]) ] ) counter = Img( src = 'http://www.hepe.com/cgi-bin/wwwcount.cgi?df=aros.dat&dd=E&ft=0' ) sponsors = Table\ ( cellspacing = 5, cellpadding = 0, contents = [ TR ( TD ( A ( Img( src = '%(ROOT)simages/trustec-small.png', border = 0 ), href = 'http://www.trustsec.de/' ) ) ), TR ( TD ( A ( Img( src = '%(ROOT)simages/genesi-small.gif', border = 0 ), href = 'http://www.pegasosppc.com/' ) ) ), TR ( TD ( A \ ( Img \ ( src = 'http://sflogo.sourceforge.net/sflogo.php?group_id=43586&type=1', width = 88, height = 31, border = 0, alt = 'SourceForge Logo' ), href = 'http://sourceforge.net/' ) ) ) ] ) bar = Table( border = 0, cellpadding = 2, cellspacing = 2, width = 171, valign = 'top', contents = [ TR( valign = 'top', contents = [ TD( rowspan = 8, width=15 ), TD() ] ), TR( valign = 'top', contents = TD( navigation ) ), TR( TD(), height=15 ), TR( valign = 'top', contents = TD( align = 'center', contents = counter ) ), TR( TD(), height=15 ), TR( valign = 'top', contents = TD( align = 'center', contents = sponsors ) ), TR( TD(), height=30 ), TR \ ( valign = 'top', contents = TD \ ( align = 'center', contents = A \ ( Img \ ( src = '%(ROOT)simages/noeupatents-small.png', border = 0 ), href = 'http://petition.eurolinux.org/' ) ) ) ] ) statsPHP = ''' <?php //define("_BBC_PAGE_NAME", "my page title"); define("_BBCLONE_DIR", "%(ROOT)smybbclone/"); define("COUNTER", _BBCLONE_DIR."index.php"); if (file_exists(COUNTER)) include_once(COUNTER); ?> ''' statsPHP2 = ''' <?php echo date("m.d.y"); ?> ''' statsPHP3 = ''' <?php echo "<map name=\\"map\\">"; echo "<area shape=\\"rect\\" coords=\\"11,80,82,95\\" alt=\\"http://www.aros.org\\" href=\\"http://www.aros.org\\">"; echo "<area shape=\\"rect\\" coords=\\"87,78,165,95\\" alt=\\"AROS-Exec\\" href=\\"http://www.aros-exec.org\\">"; echo "<area shape=\\"rect\\" coords=\\"244,77,323,95166,77,240,95\\" alt=\\"Team AROS\\" href=\\"http://www.teamaros.org\\">"; echo "<area shape=\\"rect\\" coords=\\"166,77,240,95\\" alt=\\"AROS-Exec Archives\\" href=\\"http://archives.aros-exec.org\\">"; echo "</map>"; ?> ''' statsPHP4 = ''' <?php echo "<table width=\\"100%%\\"><tr><td>"; echo "<div style=\\"text-align: right;\\">"; echo "<font color=\\"#aaaaaa\\">"; ?> ''' statsPHP6 = ''' <?php echo "</font></div>"; echo "</p></tr></td></table>"; ?> ''' statsPHP5= ''' <?php include( '/home/groups/a/ar/aros/htdocs/rsfeed/browserdetect.php'); $win_ie56 = (browser_detection('browser') == 'ie' ) && (browser_detection('number') >= 5 ) && (browser_detection('number') < 7 ); if ($win_ie56) { echo \"<img src=\\"/images/kittymascot.gif\\" style=\\"float:right\\" border=\\"0\\"></img><img src=\\"/images/toplogomenu.gif\\" border=\\"0\\" usemap=\\"#map\\"></img>"; } else { echo \"<img src=\\"/images/kittymascot.png\\" style=\\"float:right\\" border=\\"0\\"></img><img src=\\"/images/toplogomenu.png\\" border=\\"0\\" usemap=\\"#map\\"></img>"; } ?> ''' page = HTML( [ Head( [ Charset( charset ), Title( 'AROS Research Operating System' ), Link( href = '%(ROOT)saros.css', type = 'text/css', rel = 'stylesheet' ), Meta( name = 'keywords', content = 'AROS, OS, operating system, research, open source, portage' ) ] ), Body( style = 'margin: 0px;', bgcolor = '#ffffff', contents = [ statsPHP3, Table( border = 0, cellspacing = 0, cellpadding = 0, width = '100%%', contents = [ TR( [ TD( halign = 'top', width = '100%%', height = 109, background='/images/backgroundtop.png' ,rowspan = 4, contents = statsPHP5)
846194f3836b7e3473a516c54c1f17757297aebf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4747/846194f3836b7e3473a516c54c1f17757297aebf/page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1964, 12, 389, 56, 16, 389, 50, 16, 389, 49, 16, 490, 7937, 2784, 55, 67, 4883, 16, 3303, 16, 4856, 262, 30, 10394, 273, 4902, 521, 261, 306, 453, 261, 2939, 273, 306, 2221, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1964, 12, 389, 56, 16, 389, 50, 16, 389, 49, 16, 490, 7937, 2784, 55, 67, 4883, 16, 3303, 16, 4856, 262, 30, 10394, 273, 4902, 521, 261, 306, 453, 261, 2939, 273, 306, 2221, ...
""" Convert something vaguely in the format [dd-]hh:mm:ss into
"""Convert something vaguely in the format [dd-]hh:mm:ss into
def timeconv(self,str): """
f4ace14ebc214d02926ffd35d8f2dda42dd35762 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/f4ace14ebc214d02926ffd35d8f2dda42dd35762/proc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 813, 4896, 12, 2890, 16, 701, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 813, 4896, 12, 2890, 16, 701, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
@cli.option('-q', '--queiet')
@cli.option('-q', '--quiet')
def set_verbose(self): self.verbosity += 1
d6df7b744146e4ed4cff0560e9251a321a87af8c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3688/d6df7b744146e4ed4cff0560e9251a321a87af8c/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 11369, 12, 2890, 4672, 365, 18, 16629, 8807, 1011, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 444, 67, 11369, 12, 2890, 4672, 365, 18, 16629, 8807, 1011, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
log.Log.FatalError("""New quoting requirements!
if Globals.chars_to_quote is None: log.Log.FatalError("""New quoting requirements!
def compare_ctq_file(self, rbdir, suggested_ctq): """Compare ctq file with suggested result, return actual ctq""" ctq_rp = rbdir.append("chars_to_quote") if not ctq_rp.lstat(): if Globals.chars_to_quote is None: actual_ctq = suggested_ctq else: actual_ctq = Globals.chars_to_quote ctq_rp.write_string(actual_ctq) return actual_ctq
ab09b43df9a8f2075ac8a2435ce0d160ba72c513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8033/ab09b43df9a8f2075ac8a2435ce0d160ba72c513/fs_abilities.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 299, 85, 67, 768, 12, 2890, 16, 7138, 1214, 16, 22168, 67, 299, 85, 4672, 3536, 8583, 5691, 85, 585, 598, 22168, 563, 16, 327, 3214, 5691, 85, 8395, 5691, 85, 67, 13832, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 299, 85, 67, 768, 12, 2890, 16, 7138, 1214, 16, 22168, 67, 299, 85, 4672, 3536, 8583, 5691, 85, 585, 598, 22168, 563, 16, 327, 3214, 5691, 85, 8395, 5691, 85, 67, 13832, 27...
libs = ['fftw_threads','rfftw_threads']
libs = ['rfftw_threads','fftw_threads']
def calc_info(self): lib_dirs = self.get_lib_dirs() incl_dirs = self.get_include_dirs() incl_dir = None libs = self.get_libs(self.section+'_libs', self.libs) info = None for d in lib_dirs: r = self.check_libs(d,libs) if r is not None: info = r break if info is not None: flag = 0 for d in incl_dirs: if len(combine_paths(d,self.includes))==2: dict_append(info,include_dirs=[d]) flag = 1 incl_dirs = [d] incl_dir = d break if flag: dict_append(info,define_macros=self.macros) else: info = None if info is not None: self.set_info(**info)
0ee977f42c09e813e0ab209e0fcb08a41e7ec7b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/0ee977f42c09e813e0ab209e0fcb08a41e7ec7b2/system_info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 1376, 12, 2890, 4672, 2561, 67, 8291, 273, 365, 18, 588, 67, 2941, 67, 8291, 1435, 2823, 67, 8291, 273, 365, 18, 588, 67, 6702, 67, 8291, 1435, 2823, 67, 1214, 273, 599, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 1376, 12, 2890, 4672, 2561, 67, 8291, 273, 365, 18, 588, 67, 2941, 67, 8291, 1435, 2823, 67, 8291, 273, 365, 18, 588, 67, 6702, 67, 8291, 1435, 2823, 67, 1214, 273, 599, 15...
vector = filename[-3:].upper() == 'SVG' if d and vector: print "Downloaded vector image " + d if d and not vector: print "Downloaded raster image" + d
if d:
def download_and_process(imgdict, base_dir, thumb_width): for wikiname in imgdict: filename = canonicalize_filename(wikiname) d = download_image(filename, base_dir) vector = filename[-3:].upper() == 'SVG' if d and vector: print "Downloaded vector image " + d if d and not vector: print "Downloaded raster image" + d width = None height= None for p in imgdict[wikiname]: if p.width is not None: width = max(width, p.width) elif p.thumbnail: width = max(width, thumb_width) if p.height is not None: height = max(height, p.height) if width is not None: if height is None: newsize = "%i>" % width else: newsize = "%ix%i>" % (width, height) try: subprocess.check_call(['convert', d,"-flatten", "-resize", newsize, "-quality", "20", "JPEG:%s" % d]) print "Succesfully resized " + d except: print "Error: convert failed on " + wikiname + " " + d try: os.remove(d) except: print "Error: failed to remove " + d
b419c4351a292e333d94f194bdb9d8931ac86462 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6694/b419c4351a292e333d94f194bdb9d8931ac86462/get_images.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 67, 464, 67, 2567, 12, 6081, 1576, 16, 1026, 67, 1214, 16, 11156, 67, 2819, 4672, 364, 341, 1766, 267, 339, 316, 3774, 1576, 30, 1544, 273, 25839, 67, 3459, 12, 11999, 267, 339, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 67, 464, 67, 2567, 12, 6081, 1576, 16, 1026, 67, 1214, 16, 11156, 67, 2819, 4672, 364, 341, 1766, 267, 339, 316, 3774, 1576, 30, 1544, 273, 25839, 67, 3459, 12, 11999, 267, 339, ...
if (observer): observer = ConsoleCardConnectionObserver() self._con.addObserver(observer)
def __init__(self, reader_number=0, observer=0): r = readers(); try: self._con = r[reader_number].createConnection() if (observer): observer = ConsoleCardConnectionObserver() self._con.addObserver(observer) self._con.connect() #print r[reader_number], b2h(self._con.getATR()) except NoCardException: raise NoCardError()
245d5349625126b6bd9465068c8bfcfe08311571 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6730/245d5349625126b6bd9465068c8bfcfe08311571/pcsc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2949, 67, 2696, 33, 20, 16, 9655, 33, 20, 4672, 436, 273, 16527, 5621, 775, 30, 365, 6315, 591, 273, 436, 63, 10530, 67, 2696, 8009, 2640, 1952, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2949, 67, 2696, 33, 20, 16, 9655, 33, 20, 4672, 436, 273, 16527, 5621, 775, 30, 365, 6315, 591, 273, 436, 63, 10530, 67, 2696, 8009, 2640, 1952, 1435, ...
os.makedirs(name)
self.makedirs(name)
def attemptLock (self, tile): name = self.getLockName(tile) try: os.makedirs(name) return True except OSError: pass try: st = os.stat(name) if st.st_ctime + self.stale < time.time(): warn("removing stale lock %s" % name) # remove stale lock self.unlock(tile) os.makedirs(name) return True except OSError: pass return False
a3b9ca6a14f131d70507fcb586e1d4e3f312764c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6188/a3b9ca6a14f131d70507fcb586e1d4e3f312764c/Cache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4395, 2531, 261, 2890, 16, 4769, 4672, 508, 273, 365, 18, 588, 2531, 461, 12, 15368, 13, 775, 30, 365, 18, 81, 9477, 10539, 12, 529, 13, 327, 1053, 1335, 10002, 30, 1342, 775, 30, 38...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4395, 2531, 261, 2890, 16, 4769, 4672, 508, 273, 365, 18, 588, 2531, 461, 12, 15368, 13, 775, 30, 365, 18, 81, 9477, 10539, 12, 529, 13, 327, 1053, 1335, 10002, 30, 1342, 775, 30, 38...
self.LoadChildren(rootNodeId) ExpandContainer (self, block.openedContainers, self.GetRootItem ())
self.LoadChildren (rootNodeId) ExpandContainer (self, block.openedContainers, rootNodeId)
def ExpandContainer (self, openedContainers, id): try: expand = openedContainers [self.GetItemData(id).GetData()] except KeyError: return
eaf82db4daafd015cc7c4cf1823f6a47d9207ea1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/eaf82db4daafd015cc7c4cf1823f6a47d9207ea1/ControlBlocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16429, 2170, 261, 2890, 16, 10191, 11177, 16, 612, 4672, 775, 30, 4542, 273, 10191, 11177, 306, 2890, 18, 967, 1180, 751, 12, 350, 2934, 967, 751, 1435, 65, 1335, 4999, 30, 327, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16429, 2170, 261, 2890, 16, 10191, 11177, 16, 612, 4672, 775, 30, 4542, 273, 10191, 11177, 306, 2890, 18, 967, 1180, 751, 12, 350, 2934, 967, 751, 1435, 65, 1335, 4999, 30, 327, 2, -10...
self.panel_identities.Show(show=False)
self.panel_identities.Show(show=self.config_data.multiple_identities)
def __set_properties(self): # begin wxGlade: ConnectDialog.__set_properties self.SetTitle(_("Connect to Solipsis")) self.text_ctrl_pseudo.SetFocus() self.button_ok.SetDefault() # end wxGlade # So that self.GetBestVirtualSize() works properly when identities are disabled self.panel_identities.Show(show=False)
146785cf3a68903bc2839e2aaff5b65a8b11f3f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2522/146785cf3a68903bc2839e2aaff5b65a8b11f3f7/ConnectDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 67, 4738, 12, 2890, 4672, 468, 2376, 7075, 21308, 2486, 30, 8289, 6353, 16186, 542, 67, 4738, 365, 18, 694, 4247, 24899, 2932, 5215, 358, 348, 355, 7146, 291, 6, 3719, 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, 542, 67, 4738, 12, 2890, 4672, 468, 2376, 7075, 21308, 2486, 30, 8289, 6353, 16186, 542, 67, 4738, 365, 18, 694, 4247, 24899, 2932, 5215, 358, 348, 355, 7146, 291, 6, 3719, 365, ...
self._soundpos = self._soundpos + len(data) / (self._nchannels * self._sampwidth)
self._soundpos = self._soundpos + len(data) // (self._nchannels * self._sampwidth)
def readframes(self, nframes): if self._ssnd_seek_needed: self._ssnd_chunk.seek(0) dummy = self._ssnd_chunk.read(8) pos = self._soundpos * self._framesize if pos: self._ssnd_chunk.seek(pos + 8) self._ssnd_seek_needed = 0 if nframes == 0: return '' data = self._ssnd_chunk.read(nframes * self._framesize) if self._convert and data: data = self._convert(data) self._soundpos = self._soundpos + len(data) / (self._nchannels * self._sampwidth) return data
bca7b4894a1e338b53bc65b01a09484e5f2da318 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/bca7b4894a1e338b53bc65b01a09484e5f2da318/aifc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 10278, 12, 2890, 16, 290, 10278, 4672, 309, 365, 6315, 1049, 4880, 67, 16508, 67, 17471, 30, 365, 6315, 1049, 4880, 67, 6551, 18, 16508, 12, 20, 13, 9609, 273, 365, 6315, 1049, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 10278, 12, 2890, 16, 290, 10278, 4672, 309, 365, 6315, 1049, 4880, 67, 16508, 67, 17471, 30, 365, 6315, 1049, 4880, 67, 6551, 18, 16508, 12, 20, 13, 9609, 273, 365, 6315, 1049, 48...
ws = wsmap[node.tagName] children = node.childNodes children.reverse() if children[0].nodeType == TEXT: data = string.rstrip(children[0].data) + ws children[0].data = data children.reverse() if node.tagName == "title" \ and node.parentNode.firstChild.nodeType == ELEMENT: node.parentNode.insertBefore(doc.createText("\n "), node.parentNode.firstChild)
fixups.append(node)
def fixup_trailing_whitespace(doc, wsmap): queue = [doc] while queue: node = queue[0] del queue[0] if wsmap.has_key(node.nodeName): ws = wsmap[node.tagName] children = node.childNodes children.reverse() if children[0].nodeType == TEXT: data = string.rstrip(children[0].data) + ws children[0].data = data children.reverse() # hack to get the title in place: if node.tagName == "title" \ and node.parentNode.firstChild.nodeType == ELEMENT: node.parentNode.insertBefore(doc.createText("\n "), node.parentNode.firstChild) for child in node.childNodes: if child.nodeType == ELEMENT: queue.append(child)
58174526ba20106b3fff37a1f8ab6b18ee6de0d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/58174526ba20106b3fff37a1f8ab6b18ee6de0d5/docfixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 416, 67, 26453, 67, 18777, 12, 2434, 16, 4945, 1458, 4672, 2389, 273, 306, 2434, 65, 1323, 2389, 30, 756, 273, 2389, 63, 20, 65, 1464, 2389, 63, 20, 65, 309, 4945, 1458, 18, 53...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 416, 67, 26453, 67, 18777, 12, 2434, 16, 4945, 1458, 4672, 2389, 273, 306, 2434, 65, 1323, 2389, 30, 756, 273, 2389, 63, 20, 65, 1464, 2389, 63, 20, 65, 309, 4945, 1458, 18, 53...
numtrips = 3 def task2(ident): global running for i in range(numtrips): if ident == 0: delay = 0.001 else: rmutex.acquire() delay = random.random() * numtasks rmutex.release() if verbose: print 'task', ident, 'will run for', round(delay, 1), 'sec' time.sleep(delay) if verbose: print 'task', ident, 'entering barrier', i bar.enter() if verbose: print 'task', ident, 'leaving barrier', i mutex.acquire() running -= 1 finished = running == 0 mutex.release() if finished: done.release()
def enter(self): checkin, checkout = self.checkin, self.checkout
12c238c50046dc378380207f15830cf4af619e32 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/12c238c50046dc378380207f15830cf4af619e32/test_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 12, 2890, 4672, 866, 267, 16, 13926, 273, 365, 18, 1893, 267, 16, 365, 18, 17300, 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, 6103, 12, 2890, 4672, 866, 267, 16, 13926, 273, 365, 18, 1893, 267, 16, 365, 18, 17300, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
environ['PATH_INFO'],
path,
def __call__(self, environ, start_response): if self.scheme == 'http': ConnClass = httplib.HTTPConnection elif self.scheme == 'https': ConnClass = httplib.HTTPSConnection else: raise ValueError( "Unknown scheme for %r: %r" % (self.address, self.scheme)) conn = ConnClass(self.host) headers = {} for key, value in environ.items(): if key.startswith('HTTP_'): key = key[5:].lower().replace('_', '-') if key == 'host': continue headers[key] = value headers['host'] = self.host if 'REMOTE_ADDR' in environ: headers['x-forwarded-for'] = environ['REMOTE_ADDR'] if environ.get('CONTENT_TYPE'): headers['content-type'] = environ['CONTENT_TYPE'] if environ.get('CONTENT_LENGTH'): length = int(environ['CONTENT_LENGTH']) body = environ['wsgi.input'].read(length) else: body = '' print (environ['REQUEST_METHOD'], environ['PATH_INFO'], body, headers) conn.request(environ['REQUEST_METHOD'], environ['PATH_INFO'], body, headers) res = conn.getresponse() # @@: 2.4ism: headers_out = res.getheaders() status = '%s %s' % (res.status, res.reason) start_response(status, headers_out) # @@: Default? length = res.getheader('content-length') body = res.read(int(length)) conn.close() return [body]
222ffdc3fdf784e3e377e349eac992766d5831d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/222ffdc3fdf784e3e377e349eac992766d5831d8/proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 309, 365, 18, 9068, 422, 296, 2505, 4278, 6683, 797, 273, 15851, 6673, 18, 3693, 1952, 1327, 365, 18, 9068, 422, 296, 4528...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 309, 365, 18, 9068, 422, 296, 2505, 4278, 6683, 797, 273, 15851, 6673, 18, 3693, 1952, 1327, 365, 18, 9068, 422, 296, 4528...
self.code_position = 0
self.code_position = offset
def __init__(self, space, state, pattern_codes): self.space = space self.state = state self.pattern_codes = pattern_codes self.string_position = state.string_position self.code_position = 0 self.has_matched = self.UNDECIDED self.backup = [] self.resume_at_opcode = -1
f9f5342124231b561ce698a73352f83ee554e111 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/f9f5342124231b561ce698a73352f83ee554e111/interp_sre.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3476, 16, 919, 16, 1936, 67, 7000, 4672, 365, 18, 2981, 273, 3476, 365, 18, 2019, 273, 919, 365, 18, 4951, 67, 7000, 273, 1936, 67, 7000, 365, 18, 1080...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3476, 16, 919, 16, 1936, 67, 7000, 4672, 365, 18, 2981, 273, 3476, 365, 18, 2019, 273, 919, 365, 18, 4951, 67, 7000, 273, 1936, 67, 7000, 365, 18, 1080...
sed -e 's@\($${inst_prefix}\)@/${inst_prefix}@' $^ > $@
sed -e 's@\($${inst_prefix}\)@/${rpm_prefix}@' $^ > $@
def dump_rpm_makefile(items, outfile): dirlist, all, sources = dump_makefile(items, outfile) cwd = os.path.abspath(os.path.curdir) + '/' mft = file("MANIFEST.rpm", "w+") mft.write('%dir '+'\n%dir '.join(dirlist)+'\n') mft.write('\n'.join(all)) update_sources("MANIFEST.sources", sources) print >> outfile, """
0171e6c2ccd6529b14f61cc285de73baa43c28fe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1517/0171e6c2ccd6529b14f61cc285de73baa43c28fe/manifest2all.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 86, 7755, 67, 6540, 768, 12, 3319, 16, 8756, 4672, 1577, 1098, 16, 777, 16, 5550, 273, 4657, 67, 6540, 768, 12, 3319, 16, 8756, 13, 225, 7239, 273, 1140, 18, 803, 18, 5113,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 86, 7755, 67, 6540, 768, 12, 3319, 16, 8756, 4672, 1577, 1098, 16, 777, 16, 5550, 273, 4657, 67, 6540, 768, 12, 3319, 16, 8756, 13, 225, 7239, 273, 1140, 18, 803, 18, 5113,...
"""
"""
def __call__(self, *args, **kwargs): """ EXAMPLES: sage: x,y,z=var('x,y,z') sage: h = sin + cos sage: h(1) sin(1) + cos(1) sage: h(x) sin(x) + cos(x) sage: h = 3*sin sage: h(1) 3*sin(1) sage: h(x) 3*sin(x)
561df9db7400078f3d7932d2de5113fb66d90021 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/561df9db7400078f3d7932d2de5113fb66d90021/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 619, 16, 93, 16, 94, 33, 1401, 2668, 92, 16, 93, 16, 94, 6134, 225, 272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16, 2826, 4333, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 619, 16, 93, 16, 94, 33, 1401, 2668, 92, 16, 93, 16, 94, 6134, 225, 272, ...
if namemeta is not None:
if namemeta:
def _get_stats(self, paths, namemeta, verbose): paths = self._glob_paths(paths) if namemeta is not None: return [ Statistics(path, namemeta=namemeta, verbose=verbose) for path in paths ] names = self._get_names(paths) return [ Statistics(path, name, verbose=verbose) for path, name in zip(paths, names) ]
a2cb4aeae174d9f91b538b4b78e89a6351a27a5e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7408/a2cb4aeae174d9f91b538b4b78e89a6351a27a5e/risto.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 5296, 12, 2890, 16, 2953, 16, 508, 3901, 16, 3988, 4672, 2953, 273, 365, 6315, 10581, 67, 4481, 12, 4481, 13, 309, 508, 3901, 30, 327, 306, 22964, 12, 803, 16, 508, 390...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 67, 5296, 12, 2890, 16, 2953, 16, 508, 3901, 16, 3988, 4672, 2953, 273, 365, 6315, 10581, 67, 4481, 12, 4481, 13, 309, 508, 3901, 30, 327, 306, 22964, 12, 803, 16, 508, 390...
p11 = FakePackage('perl', '1', '1', '0', 'i386')
pi11 = FakePackage('perl', '1', '1', '0', 'i386') pr11 = FakePackage('perl', '1', '1', '0', 'i386')
def testUpdateMultiRequiresVersions2(self): p11 = FakePackage('perl', '1', '1', '0', 'i386') p12 = FakePackage('perl', '1', '2', '0', 'i386')
6a23ca8e00877ebb3ae8ffc0444acb278bcf940b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/6a23ca8e00877ebb3ae8ffc0444acb278bcf940b/simpleupdatetests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1891, 5002, 21671, 5940, 22, 12, 2890, 4672, 4790, 2499, 273, 11551, 2261, 2668, 457, 80, 2187, 296, 21, 2187, 296, 21, 2187, 296, 20, 2187, 296, 77, 23, 5292, 6134, 846, 2499, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1891, 5002, 21671, 5940, 22, 12, 2890, 4672, 4790, 2499, 273, 11551, 2261, 2668, 457, 80, 2187, 296, 21, 2187, 296, 21, 2187, 296, 20, 2187, 296, 77, 23, 5292, 6134, 846, 2499, 2...
repo_id = ui.prompt('repository id:', "[0-9]+", 0)
repo_id = ui.prompt('repository id:', repo_choice, 0)
def getdiff(repo, r): '''return diff for the specified revision''' output = cStringIO.StringIO() p = patch.export(repo, [r], fp=output, opts=mdiff.diffopts()) return output.getvalue()
c129ee0bb082438433b5d1dc9ca85fb35b2e0d78 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11434/c129ee0bb082438433b5d1dc9ca85fb35b2e0d78/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5413, 12, 7422, 16, 436, 4672, 9163, 2463, 3122, 364, 326, 1269, 6350, 26418, 876, 273, 276, 780, 4294, 18, 780, 4294, 1435, 293, 273, 4729, 18, 6530, 12, 7422, 16, 306, 86, 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, 336, 5413, 12, 7422, 16, 436, 4672, 9163, 2463, 3122, 364, 326, 1269, 6350, 26418, 876, 273, 276, 780, 4294, 18, 780, 4294, 1435, 293, 273, 4729, 18, 6530, 12, 7422, 16, 306, 86, 6487,...
return len(extensions) == 1 and iter(extensions).next() in ('jpg', 'jpeg', 'png')
comic_extensions = set(['jpg', 'jpeg', 'png']) return len(extensions - comic_extensions) == 0
def is_comic(list_of_names): extensions = set([x.rpartition('.')[-1].lower() for x in list_of_names]) return len(extensions) == 1 and iter(extensions).next() in ('jpg', 'jpeg', 'png')
a07f7b396b5235fe1ca9ae1ab2fd873ed94d2301 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/a07f7b396b5235fe1ca9ae1ab2fd873ed94d2301/archive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 832, 335, 12, 1098, 67, 792, 67, 1973, 4672, 4418, 273, 444, 3816, 92, 18, 86, 10534, 2668, 1093, 13, 18919, 21, 8009, 8167, 1435, 364, 619, 316, 666, 67, 792, 67, 1973, 571...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 832, 335, 12, 1098, 67, 792, 67, 1973, 4672, 4418, 273, 444, 3816, 92, 18, 86, 10534, 2668, 1093, 13, 18919, 21, 8009, 8167, 1435, 364, 619, 316, 666, 67, 792, 67, 1973, 571...
i = 0 while i < len(args): if args[i][0] in ('start_date', 'end_date'): if isinstance(args[i][2], (list, tuple)):
def process_args(args): i = 0 while i < len(args): if isinstance(args[i], list): process_args(args) if isinstance(args[i], tuple) \ and args[i][0] in ('start_date', 'end_date') \ and isinstance(args[i][2], (list, tuple)):
def search(self, cursor, user, args, offset=0, limit=None, order=None, context=None, count=False, query_string=False): args = args[:] i = 0 while i < len(args): if args[i][0] in ('start_date', 'end_date'): if isinstance(args[i][2], (list, tuple)): if not args[i][2][0]: args[i] = ('id', '!=', '0') else: period = self.browse(cursor, user, args[i][2][0], context=context) args[i] = (args[i][0], args[i][1], period[args[i][2][1]]) i += 1 return super(Period, self).search(cursor, user, args, offset=offset, limit=limit, order=order, context=context, count=count, query_string=query_string)
6af32081796b2c9d1448073dd7817ed1f639574e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9290/6af32081796b2c9d1448073dd7817ed1f639574e/period.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 3347, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 16, 843, 67, 1080, 33, 8381, 4672, 833,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 3347, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 16, 843, 67, 1080, 33, 8381, 4672, 833,...
return set(self) != set(other)
return dict(self.items()) != dict(other.items())
def __ne__(self, other): return set(self) != set(other)
b0d28b4c607709fdeb395b558cc7c87bad0869f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/b0d28b4c607709fdeb395b558cc7c87bad0869f0/_abcoll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4644, 972, 12, 2890, 16, 1308, 4672, 327, 444, 12, 2890, 13, 480, 444, 12, 3011, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4644, 972, 12, 2890, 16, 1308, 4672, 327, 444, 12, 2890, 13, 480, 444, 12, 3011, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if False :
def getting() : #self.locks.acquire(tid) try : while len(self.to_get) > 0: tid,empty_task = self.to_get.pop() #if self.locks.ifnotblocked(tid) : self.backend.get_task(empty_task,tid) #calling sync in a thread might cause a segfault #thus callsync to false empty_task.set_sync_func(self.set_task,callsync=False) #set_loaded is a function that emits a signal. #Emiting a signal in a thread is likely to segfault #by wrapping it in idle_add, we ensure that gobject mainloop #handles the signal and not the tread itself. #it's not a problem to not know when it is executed #since it's the last instruction of the tread gobject.idle_add(empty_task.set_loaded) finally : #self.locks.release(tid) self.getting_lock.release()
4cd1b8e75522c4b7d0615c85076123ee2f546034 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/4cd1b8e75522c4b7d0615c85076123ee2f546034/datastore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8742, 1435, 294, 468, 2890, 18, 23581, 18, 1077, 1039, 12, 18081, 13, 775, 294, 1323, 562, 12, 2890, 18, 869, 67, 588, 13, 405, 374, 30, 11594, 16, 5531, 67, 4146, 273, 365, 18, 869,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8742, 1435, 294, 468, 2890, 18, 23581, 18, 1077, 1039, 12, 18081, 13, 775, 294, 1323, 562, 12, 2890, 18, 869, 67, 588, 13, 405, 374, 30, 11594, 16, 5531, 67, 4146, 273, 365, 18, 869,...
cases = [case for case in cases if class_name(str(case)) in sys.argv] print 'Running the following test case:', [class_name(str(case)) for case in cases] results = [] def finish(): LOOP.quit() print 'Test Case ended.' for result in results: success, reason = result print '-------\nTestCase:\n%s\n--------' % (reason) if not success: sys.exit(1) def run_case(case_class): print '----\nTestCase: Creating from class %s' % (str(case_class)) case = case_class() print 'TestCase: Starting %s' % (case) try: case.run() results.append((True, "Success")) except Exception, msg: print 'TestCase: Failing %s----' % (case) print msg results.append((False, traceback.format_exc())) print 'TestCase: Ending %s\n-----' % (case) def run_all_cases(): for case in cases: run_case(case) finish() gobject.idle_add(run_all_cases) LOOP.run() class TestingException(Exception): pass
self["client1_conn"]["NewChannel"].listen() self["client2_chan"] = ( conn2, self["client2_conn"]["RequestChannel"].call( "org.freedesktop.Telepathy.Channel.Type.Text", 1, self["client2_conn"]["RequestHandles"].call (1, ["telepathytest1@jabber.org"])[0], False), {"text": "org.freedesktop.Telepathy.Channel.Type.Text", "chan": "org.freedesktop.Telepathy.Channel"}) self["client2_chan"]["text"]["Send"].call (0, "Test") obj, channel_type, handle_type, handle, suppress_handler = self["client1_conn"]["NewChannel"].wait() assert channel_type == "org.freedesktop.Telepathy.Channel.Type.Text" assert handle_type == 1 assert suppress_handler == False self["client1_chan"] = ( conn1, obj, {"text": "org.freedesktop.Telepathy.Channel.Type.Text", "chan": "org.freedesktop.Telepathy.Channel"}) messages = self["client1_chan"]["text"]["ListPendingMessages"].call(True) id, stamp, from_handle, msg_type, flags, string = messages[0] assert len(messages) == 1 assert from_handle == handle assert msg_type == 0 assert flags == 0 assert string == "Test" self["client2_chan"]["chan"]["Close"].call() self["client1_chan"]["chan"]["Close"].call() self["client2_conn"]["Disconnect"].call() self["client1_conn"]["Disconnect"].call()
def class_name(name): i = name.rfind(".") if i == -1: return name else: return name[i+1:]
35af30b50acada26d3b9482ea86bbf95924cedc2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8150/35af30b50acada26d3b9482ea86bbf95924cedc2/test-basic-connect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 667, 67, 529, 12, 529, 4672, 277, 273, 508, 18, 86, 4720, 2932, 1199, 13, 309, 277, 422, 300, 21, 30, 327, 508, 469, 30, 327, 508, 63, 77, 15, 21, 26894, 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, 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, 667, 67, 529, 12, 529, 4672, 277, 273, 508, 18, 86, 4720, 2932, 1199, 13, 309, 277, 422, 300, 21, 30, 327, 508, 469, 30, 327, 508, 63, 77, 15, 21, 26894, 225, 2, -100, -100, -100, ...
self.tool_bar.setContextMenuPolicy(Qt.PreventContextMenu)
self.tool_bar.setContextMenuPolicy(Qt.PreventContextMenu) QObject.connect(self.config_button, SIGNAL('clicked(bool)'), self.do_config)
def __init__(self, parent=None): MainWindow.__init__(self, parent) Ui_MainWindow.__init__(self) self.setupUi(self) self.setWindowTitle(__appname__) self.read_settings() self.job_manager = JobManager() self.jobs_dialog = JobsDialog(self, self.job_manager) self.device_manager = None self.upload_memory = {} self.delete_memory = {} self.conversion_jobs = {} self.persistent_files = [] self.default_thumbnail = None self.device_error_dialog = ConversionErrorDialog(self, 'Error communicating with device', ' ') self.device_error_dialog.setModal(Qt.NonModal) self.tb_wrapper = textwrap.TextWrapper(width=40) self.device_connected = False self.viewers = collections.deque() ####################### Location View ######################## QObject.connect(self.location_view, SIGNAL('location_selected(PyQt_PyObject)'), self.location_selected) QObject.connect(self.stack, SIGNAL('currentChanged(int)'), self.location_view.location_changed) ####################### Vanity ######################## self.vanity_template = self.vanity.text().arg(__version__) self.vanity.setText(self.vanity_template.arg(' ')) ####################### Status Bar ##################### self.status_bar = StatusBar(self.jobs_dialog) self.setStatusBar(self.status_bar) QObject.connect(self.job_manager, SIGNAL('job_added(int)'), self.status_bar.job_added) QObject.connect(self.job_manager, SIGNAL('job_done(int)'), self.status_bar.job_done) ####################### Setup Toolbar ##################### sm = QMenu() sm.addAction(QIcon(':/images/reader.svg'), _('Send to main memory')) sm.addAction(QIcon(':/images/sd.svg'), _('Send to storage card')) self.sync_menu = sm # Needed md = QMenu() md.addAction(_('Edit metadata individually')) md.addAction(_('Edit metadata in bulk')) self.metadata_menu = md QObject.connect(self.action_add, SIGNAL("triggered(bool)"), self.add_books) QObject.connect(self.action_del, SIGNAL("triggered(bool)"), self.delete_books) QObject.connect(self.action_edit, SIGNAL("triggered(bool)"), self.edit_metadata) QObject.connect(md.actions()[0], SIGNAL('triggered(bool)'), self.edit_metadata) QObject.connect(md.actions()[1], SIGNAL('triggered(bool)'), self.edit_bulk_metadata) QObject.connect(self.action_sync, SIGNAL("triggered(bool)"), self.sync_to_main_memory) QObject.connect(sm.actions()[0], SIGNAL('triggered(bool)'), self.sync_to_main_memory) QObject.connect(sm.actions()[1], SIGNAL('triggered(bool)'), self.sync_to_card) QObject.connect(self.action_save, SIGNAL("triggered(bool)"), self.save_to_disk) QObject.connect(self.action_view, SIGNAL("triggered(bool)"), self.view_book) self.action_sync.setMenu(sm) self.action_edit.setMenu(md) nm = QMenu() nm.addAction(QIcon(':/images/news/bbc.png'), 'BBC') nm.addAction(QIcon(':/images/news/economist.png'), 'Economist') nm.addAction(QIcon(':/images/news/newsweek.png'), 'Newsweek') nm.addAction(QIcon(':/images/book.svg'), 'New York Review of Books') nm.addAction(QIcon(':/images/news/nytimes.png'), 'New York Times') QObject.connect(nm.actions()[0], SIGNAL('triggered(bool)'), self.fetch_news_bbc) QObject.connect(nm.actions()[1], SIGNAL('triggered(bool)'), self.fetch_news_economist) QObject.connect(nm.actions()[2], SIGNAL('triggered(bool)'), self.fetch_news_newsweek) QObject.connect(nm.actions()[3], SIGNAL('triggered(bool)'), self.fetch_news_nyreview) QObject.connect(nm.actions()[4], SIGNAL('triggered(bool)'), self.fetch_news_nytimes) self.news_menu = nm self.action_news.setMenu(nm) cm = QMenu() cm.addAction(_('Convert individually')) cm.addAction(_('Bulk convert')) self.action_convert.setMenu(cm) QObject.connect(cm.actions()[0], SIGNAL('triggered(bool)'), self.convert_single) QObject.connect(cm.actions()[1], SIGNAL('triggered(bool)'), self.convert_bulk) QObject.connect(self.action_convert, SIGNAL('triggered(bool)'), self.convert_single) self.convert_menu = cm self.tool_bar.widgetForAction(self.action_news).setPopupMode(QToolButton.InstantPopup) self.tool_bar.widgetForAction(self.action_edit).setPopupMode(QToolButton.MenuButtonPopup) self.tool_bar.widgetForAction(self.action_sync).setPopupMode(QToolButton.MenuButtonPopup) self.tool_bar.widgetForAction(self.action_convert).setPopupMode(QToolButton.MenuButtonPopup) self.tool_bar.setContextMenuPolicy(Qt.PreventContextMenu) ####################### Library view ######################## self.library_view.set_database(self.database_path) for func, target in [ ('connect_to_search_box', self.search), ('connect_to_book_display', self.status_bar.book_info.show_data), ]: for view in (self.library_view, self.memory_view, self.card_view): getattr(view, func)(target) self.memory_view.connect_dirtied_signal(self.upload_booklists) self.card_view.connect_dirtied_signal(self.upload_booklists) self.show() self.stack.setCurrentIndex(0) self.library_view.migrate_database() self.library_view.sortByColumn(3, Qt.DescendingOrder) if not self.library_view.restore_column_widths(): self.library_view.resizeColumnsToContents() self.library_view.resizeRowsToContents() self.search.setFocus(Qt.OtherFocusReason) ####################### Setup device detection ######################## self.detector = DeviceDetector(sleep_time=2000) QObject.connect(self.detector, SIGNAL('connected(PyQt_PyObject, PyQt_PyObject)'), self.device_detected, Qt.QueuedConnection) self.detector.start(QThread.InheritPriority)
cee1d202cfbf9d4b89b20bd942473a0be7508a2f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/cee1d202cfbf9d4b89b20bd942473a0be7508a2f/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 4672, 12740, 3829, 16186, 2738, 972, 12, 2890, 16, 982, 13, 22597, 67, 6376, 3829, 16186, 2738, 972, 12, 2890, 13, 365, 18, 8401, 13943, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 982, 33, 7036, 4672, 12740, 3829, 16186, 2738, 972, 12, 2890, 16, 982, 13, 22597, 67, 6376, 3829, 16186, 2738, 972, 12, 2890, 13, 365, 18, 8401, 13943, 1...
uri = self.MakeResourceUri(resource_id)
uri = self.MakeResourceFeedUri(resource_id)
def get_resource(self, uri=None, resource_id=None, **kwargs): """Fetches a single calendar resource by resource ID.
0c958436d905e55e6be660f5d65d7b35cd70cfbe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6580/0c958436d905e55e6be660f5d65d7b35cd70cfbe/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3146, 12, 2890, 16, 2003, 33, 7036, 16, 1058, 67, 350, 33, 7036, 16, 2826, 4333, 4672, 3536, 14288, 279, 2202, 5686, 1058, 635, 1058, 1599, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 3146, 12, 2890, 16, 2003, 33, 7036, 16, 1058, 67, 350, 33, 7036, 16, 2826, 4333, 4672, 3536, 14288, 279, 2202, 5686, 1058, 635, 1058, 1599, 18, 2, -100, -100, -100, -100, -100...
def onchange_currency(self, cr, uid, ids, account_id, amount, currency_id, date=False, journal=False):
def onchange_currency(self, cr, uid, ids, account_id, amount, currency_id, date=False, journal=False, context=None): if context is None: context = {}
def onchange_currency(self, cr, uid, ids, account_id, amount, currency_id, date=False, journal=False): account_obj = self.pool.get('account.account') journal_obj = self.pool.get('account.journal') currency_obj = self.pool.get('res.currency') if (not currency_id) or (not account_id): return {} result = {} acc = account_obj.browse(cr, uid, account_id) if (amount>0) and journal: x = journal_obj.browse(cr, uid, journal).default_credit_account_id if x: acc = x v = currency_obj.compute(cr, uid, currency_id, acc.company_id.currency_id.id, amount, account=acc) result['value'] = { 'debit': v > 0 and v or 0.0, 'credit': v < 0 and -v or 0.0 } return result
df57bcc6b6b911b65516e5e1716a6b18f4c1b334 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/df57bcc6b6b911b65516e5e1716a6b18f4c1b334/account_move_line.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 7095, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 2236, 67, 350, 16, 3844, 16, 5462, 67, 350, 16, 1509, 33, 8381, 16, 13001, 33, 8381, 16, 819, 33, 7036, 4672, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 7095, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 2236, 67, 350, 16, 3844, 16, 5462, 67, 350, 16, 1509, 33, 8381, 16, 13001, 33, 8381, 16, 819, 33, 7036, 4672, 309, ...
manage_getPermissionMapping__roles__=PermissionRole('Change permissions')
def manage_getPermissionMapping(self): """Return the permission mapping for the object
a725bfcbaed0bf0764b451a21c3a3c8098e9a623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a725bfcbaed0bf0764b451a21c3a3c8098e9a623/PermissionMapping.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 588, 5041, 3233, 12, 2890, 4672, 3536, 990, 326, 4132, 2874, 364, 326, 733, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 588, 5041, 3233, 12, 2890, 4672, 3536, 990, 326, 4132, 2874, 364, 326, 733, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
elif self.compiler.find_library_file(lib_dirs, 'gdbm'):
elif (platform in ['darwin'] and find_file("ndbm.h", inc_dirs, []) is not None):
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
6c8af65295229596ada11221e47a0cd074a5df45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6c8af65295229596ada11221e47a0cd074a5df45/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
self.__class__.getHeaders = self.getHeadersHDL self.__class__.getHeader = self.getHeaderHDL self.__class__.loadFileProvides = self.loadFileProvidesHDL
self.__class__.getHeaders = self.getHeadersHDL.im_func self.__class__.getHeader = self.getHeaderHDL.im_func self.__class__.loadFileProvides = self.loadFileProvidesHDL.im_func
def _checkRPM(self): if not hasattr(rpm, "readHeaderFromFD"):
5a698f2abddeb2b43861e4fdfb08696c231cefb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/5a698f2abddeb2b43861e4fdfb08696c231cefb3/header.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 54, 12728, 12, 2890, 4672, 309, 486, 3859, 12, 86, 7755, 16, 315, 896, 1864, 1265, 16894, 6, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 54, 12728, 12, 2890, 4672, 309, 486, 3859, 12, 86, 7755, 16, 315, 896, 1864, 1265, 16894, 6, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return 'hcom', 22050/divisor, 1, -1, 8
return 'hcom', 22050//divisor, 1, -1, 8
def test_hcom(h, f): if h[65:69] != 'FSSD' or h[128:132] != 'HCOM': return None divisor = get_long_be(h[128+16:128+20]) return 'hcom', 22050/divisor, 1, -1, 8
8d6c9eeef7ac244ece76eb349dfc5e72911533d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/8d6c9eeef7ac244ece76eb349dfc5e72911533d2/sndhdr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 76, 832, 12, 76, 16, 284, 4672, 309, 366, 63, 9222, 30, 8148, 65, 480, 296, 42, 1260, 40, 11, 578, 366, 63, 10392, 30, 22152, 65, 480, 296, 44, 4208, 4278, 327, 599, 1501...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 76, 832, 12, 76, 16, 284, 4672, 309, 366, 63, 9222, 30, 8148, 65, 480, 296, 42, 1260, 40, 11, 578, 366, 63, 10392, 30, 22152, 65, 480, 296, 44, 4208, 4278, 327, 599, 1501...
print part.get_content_maintype() ,' - ', part.get_content_subtype();
def msg_body_get(self, msg): message = {}; message['body'] = u''; message['attachment'] = {}; attachment = message['attachment']; counter = 1;
a012a084fca239df619d10c01abb8631ae59da89 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/a012a084fca239df619d10c01abb8631ae59da89/tinyerp-mailgate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1234, 67, 3432, 67, 588, 12, 2890, 16, 1234, 4672, 883, 273, 2618, 31, 883, 3292, 3432, 3546, 273, 582, 6309, 31, 883, 3292, 11461, 3546, 273, 2618, 31, 6042, 273, 883, 3292, 11461, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1234, 67, 3432, 67, 588, 12, 2890, 16, 1234, 4672, 883, 273, 2618, 31, 883, 3292, 3432, 3546, 273, 582, 6309, 31, 883, 3292, 11461, 3546, 273, 2618, 31, 6042, 273, 883, 3292, 11461, 35...
print "completion of", R print "prime", self.p
def __call__(self, R): print "completion of", R print "prime", self.p return R.completion(self.p, self.prec, self.extras)
2aa05accb255d378f00c820df824f28d6ca1f157 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/2aa05accb255d378f00c820df824f28d6ca1f157/pushout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 534, 4672, 327, 534, 18, 11469, 12, 2890, 18, 84, 16, 365, 18, 4036, 16, 365, 18, 23687, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 534, 4672, 327, 534, 18, 11469, 12, 2890, 18, 84, 16, 365, 18, 4036, 16, 365, 18, 23687, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
This worker is run in a seperate process.
This worker is run in a separate process.
def _process_worker(call_queue, result_queue, shutdown): """Evaluates calls from call_queue and places the results in result_queue. This worker is run in a seperate process. Args: call_queue: A multiprocessing.Queue of _CallItems that will be read and evaluated by the worker. result_queue: A multiprocessing.Queue of _ResultItems that will written to by the worker. shutdown: A multiprocessing.Event that will be set as a signal to the worker that it should exit when call_queue is empty. """ while True: try: call_item = call_queue.get(block=True, timeout=0.1) except queue.Empty: if shutdown.is_set(): return else: try: r = call_item.fn(*call_item.args, **call_item.kwargs) except BaseException as e: result_queue.put(_ResultItem(call_item.work_id, exception=e)) else: result_queue.put(_ResultItem(call_item.work_id, result=r))
fb1720b0f57fe6bbae81d9e8cb73076aebc7b40b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/fb1720b0f57fe6bbae81d9e8cb73076aebc7b40b/process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 10124, 12, 1991, 67, 4000, 16, 563, 67, 4000, 16, 5731, 4672, 3536, 23533, 4097, 628, 745, 67, 4000, 471, 12576, 326, 1686, 316, 563, 67, 4000, 18, 225, 1220, 4322, 353,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 10124, 12, 1991, 67, 4000, 16, 563, 67, 4000, 16, 5731, 4672, 3536, 23533, 4097, 628, 745, 67, 4000, 471, 12576, 326, 1686, 316, 563, 67, 4000, 18, 225, 1220, 4322, 353,...
opts, args = getopt.getopt(sys.argv[1:], 'htcvei:d:D:')
opts, args = getopt.getopt(sys.argv[1:], 'htcvl:e:i:d:D:')
def Logout(self, expunge): # sign off if expunge: imap.expunge() imap.logout()
93fa36d27243ac3b8c50b9e4d6234e0ffc16a29e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/93fa36d27243ac3b8c50b9e4d6234e0ffc16a29e/imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29381, 12, 2890, 16, 1329, 25561, 4672, 468, 1573, 3397, 309, 1329, 25561, 30, 20226, 18, 2749, 25561, 1435, 20226, 18, 21229, 1435, 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, 0, 0, 0, 0, 0, 0, 0, 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, 29381, 12, 2890, 16, 1329, 25561, 4672, 468, 1573, 3397, 309, 1329, 25561, 30, 20226, 18, 2749, 25561, 1435, 20226, 18, 21229, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
desc_buf += "<p>" + desc.firstChild.data + "</p>"
if desc.firstChild.data is not '': desc_buf += "<p>" + desc.firstChild.data + "</p>"
def format_html_desc(node): desc_buf = '' for desc in node.childNodes: if desc.nodeName == "#text": desc_buf += "<p>" + desc.data + "<p>" elif desc.nodeName == "p": desc_buf += "<p>" + desc.firstChild.data + "</p>" for chld in desc.childNodes: if chld.nodeName == "ul": desc_buf += "<ul>" for li in chld.getElementsByTagName("li"): desc_buf += "<li>" + li.firstChild.data + "</li>" return desc_buf
3c6d78b9207315cf48e06a14a087e324d9818c6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7247/3c6d78b9207315cf48e06a14a087e324d9818c6e/sedoctool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 2620, 67, 5569, 12, 2159, 4672, 225, 3044, 67, 4385, 273, 875, 364, 3044, 316, 756, 18, 3624, 3205, 30, 309, 3044, 18, 2159, 461, 422, 6619, 955, 6877, 3044, 67, 4385, 1011, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 2620, 67, 5569, 12, 2159, 4672, 225, 3044, 67, 4385, 273, 875, 364, 3044, 316, 756, 18, 3624, 3205, 30, 309, 3044, 18, 2159, 461, 422, 6619, 955, 6877, 3044, 67, 4385, 1011, ...
def export_functions( mb ):
def exportFunctions( mb ):
def export_functions( mb ): """export utility functions.""" ## include all membership functions mb.namespace("alignlib").free_functions().include() # set call policies for functions that return the same object # from the first argument for prefix in ("fill", "add", "substitute", "reset", "copy", "combine", "complement", "rescore", "flatten", "filter", "readAlignmentPairs", "calculateAffineScore",
17694f712e3a6083ccc3dcd42f7ac85d1ed3158c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8012/17694f712e3a6083ccc3dcd42f7ac85d1ed3158c/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 7503, 12, 4903, 262, 30, 3536, 6530, 12788, 4186, 12123, 7541, 2341, 777, 12459, 4186, 4903, 18, 4937, 2932, 7989, 2941, 20387, 9156, 67, 10722, 7675, 6702, 1435, 225, 468, 444, 745,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 7503, 12, 4903, 262, 30, 3536, 6530, 12788, 4186, 12123, 7541, 2341, 777, 12459, 4186, 4903, 18, 4937, 2932, 7989, 2941, 20387, 9156, 67, 10722, 7675, 6702, 1435, 225, 468, 444, 745,...
target_dir = appdata.install_dir link_dir = scripts.install_dir if not os.path.exists(link_dir): self.mkpath(link_dir)
target_directory = appdata.install_dir if not os.path.exists(self.install_dir): self.outfiles.extend(self.mkpath(self.install_dir))
def run(self): scripts = self.get_finalized_command('install_scripts') appdata = self.get_finalized_command('install_app_data')
d9c1191ac20a9953e76d9fdba198bd1af4e4fc4a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/d9c1191ac20a9953e76d9fdba198bd1af4e4fc4a/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 8873, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 5425, 67, 12827, 6134, 595, 892, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 5425, 67, 2910, 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, 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, 1086, 12, 2890, 4672, 8873, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 5425, 67, 12827, 6134, 595, 892, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 5425, 67, 2910, 67, ...
jam_build_dir = "bin.macosxppc"
if os.uname()[4] == 'i386': jam_build_dir = "bin.macosxx86" else: jam_build_dir = "bin.macosxppc"
def __init__(self, arguments="", executable="bjam", match=TestCmd.match_exact, boost_build_path=None, translate_suffixes=True, pass_toolset=True, use_test_config=True, ignore_toolset_requirements=True, workdir="", **keywords):
439d41eaeef5632d6eabd02ef2291ce5a2af0c3c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9981/439d41eaeef5632d6eabd02ef2291ce5a2af0c3c/BoostBuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1775, 1546, 3113, 9070, 1546, 441, 301, 3113, 845, 33, 4709, 5931, 18, 1916, 67, 17165, 16, 14994, 67, 3510, 67, 803, 33, 7036, 16, 4204, 67, 8477, 281, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1775, 1546, 3113, 9070, 1546, 441, 301, 3113, 845, 33, 4709, 5931, 18, 1916, 67, 17165, 16, 14994, 67, 3510, 67, 803, 33, 7036, 16, 4204, 67, 8477, 281, ...
Draw correct labels for a given frame in 3D. Primarily used as a helper function for creating frames for 3D graphics
Draw correct labels for a given frame in 3-D. Primarily used as a helper function for creating frames for 3-D graphics
def frame_labels(lower_left, upper_right, label_lower_left, label_upper_right, eps = 1, **kwds): """ Draw correct labels for a given frame in 3D. Primarily used as a helper function for creating frames for 3D graphics viewing - do not use directly unless you know what you are doing! INPUT: - ``lower_left`` - the lower left corner of the frame, as a list, tuple, or vector - ``upper_right`` - the upper right corner of the frame, as a list, tuple, or vector - ``label_lower_left`` - the label for the lower left corner of the frame, as a list, tuple, or vector. This label must actually have all coordinates less than the coordinates of the other label. - ``label_upper_right`` - the label for the upper right corner of the frame, as a list, tuple, or vector. This label must actually have all coordinates greater than the coordinates of the other label. - ``eps`` - (default: 1) a parameter for how far away from the frame to put the labels. Type ``line3d.options`` for a dictionary of the default options for lines, which are also available. EXAMPLES: We can use it directly:: sage: from sage.plot.plot3d.shapes2 import frame_labels sage: frame_labels([1,2,3],[4,5,6],[1,2,3],[4,5,6]) This is usually used for making an actual plot:: sage: y = var('y') sage: P = plot3d(sin(x^2+y^2),(x,0,pi),(y,0,pi)) sage: a,b = P._rescale_for_frame_aspect_ratio_and_zoom(1.0,[1,1,1],1) sage: F = frame_labels(a,b,*P._box_for_aspect_ratio("automatic",a,b)) sage: F.jmol_repr(F.default_render_params())[0] [['select atomno = 1', 'color atom [76,76,76]', 'label "0.0"']] TESTS:: sage: frame_labels([1,2,3],[4,5,6],[1,2,3],[1,3,4]) Traceback (most recent call last): ... ValueError: Ensure the upper right labels are above and to the right of the lower left labels. """ x0,y0,z0 = lower_left x1,y1,z1 = upper_right lx0,ly0,lz0 = label_lower_left lx1,ly1,lz1 = label_upper_right if (lx1 - lx0) <= 0 or (ly1 - ly0) <= 0 or (lz1 - lz0) <= 0: raise ValueError, "Ensure the upper right labels are above and to the right of the lower left labels." # Helper function for formatting the frame labels from math import log log10 = log(10) nd = lambda a: int(log(a)/log10) def fmt_string(a): b = a/2.0 if b >= 1: return "%.1f" n = max(0, 2 - nd(a/2.0)) return "%%.%sf"%n # Slightly faster than mean for this situation def avg(a,b): return (a+b)/2.0 color = (0.3,0.3,0.3) fmt = fmt_string(lx1 - lx0) T = Text(fmt%lx0, color=color).translate((x0,y0-eps,z0)) T += Text(fmt%avg(lx0,lx1), color=color).translate((avg(x0,x1),y0-eps,z0)) T += Text(fmt%lx1, color=color).translate((x1,y0-eps,z0)) fmt = fmt_string(ly1 - ly0) T += Text(fmt%ly0, color=color).translate((x1+eps,y0,z0)) T += Text(fmt%avg(ly0,ly1), color=color).translate((x1+eps,avg(y0,y1),z0)) T += Text(fmt%ly1, color=color).translate((x1+eps,y1,z0)) fmt = fmt_string(lz1 - lz0) T += Text(fmt%lz0, color=color).translate((x0-eps,y0,z0)) T += Text(fmt%avg(lz0,lz1), color=color).translate((x0-eps,y0,avg(z0,z1))) T += Text(fmt%lz1, color=color).translate((x0-eps,y0,z1)) return T
25144c93b092a09ccf947d595af3b9e9d463ccf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/25144c93b092a09ccf947d595af3b9e9d463ccf2/shapes2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2623, 67, 5336, 12, 8167, 67, 4482, 16, 3854, 67, 4083, 16, 1433, 67, 8167, 67, 4482, 16, 1433, 67, 5797, 67, 4083, 16, 7785, 273, 404, 16, 2826, 25577, 4672, 3536, 10184, 3434, 3249, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2623, 67, 5336, 12, 8167, 67, 4482, 16, 3854, 67, 4083, 16, 1433, 67, 8167, 67, 4482, 16, 1433, 67, 5797, 67, 4083, 16, 7785, 273, 404, 16, 2826, 25577, 4672, 3536, 10184, 3434, 3249, ...
unicode_names= []
unicode_names = []
def main(args): unicode_names= [] for ix in range(sys.maxunicode+1): try: unicode_names.append( (ix, unicodedata.name(unichr(ix))) ) except ValueError: # no name for the character pass for arg in args: pat = re.compile(arg, re.I) matches = [(x,y) for (x,y) in unicode_names if pat.search(y) is not None] if matches: print "***", arg, "matches", "***" for (x,y) in matches: print "%s (%d)" % (y,x)
ffc87d5c8c26368cd6b01b4fb82e31f1e131551c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/ffc87d5c8c26368cd6b01b4fb82e31f1e131551c/find-uname.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 4672, 5252, 67, 1973, 273, 5378, 364, 8288, 316, 1048, 12, 9499, 18, 1896, 9124, 15, 21, 4672, 775, 30, 5252, 67, 1973, 18, 6923, 12, 261, 697, 16, 5252, 892, 18, 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, 2774, 12, 1968, 4672, 5252, 67, 1973, 273, 5378, 364, 8288, 316, 1048, 12, 9499, 18, 1896, 9124, 15, 21, 4672, 775, 30, 5252, 67, 1973, 18, 6923, 12, 261, 697, 16, 5252, 892, 18, 529...
reactor.callLater(2, self.reducingMsg, (fmt, lines[1:]))
reactor.callLater(2, self.reducingMsg, fmt, lines[1:])
def reducingMsg(self, fmt, lines): self.sendLine(fmt % lines[0]) if len(lines) > 1: reactor.callLater(2, self.reducingMsg, (fmt, lines[1:]))
d18fb6db2af4743d5e66ecdde13d96b3ade8c0f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d18fb6db2af4743d5e66ecdde13d96b3ade8c0f4/irc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9299, 2822, 3332, 12, 2890, 16, 1325, 16, 2362, 4672, 365, 18, 4661, 1670, 12, 8666, 738, 2362, 63, 20, 5717, 309, 562, 12, 3548, 13, 405, 404, 30, 19178, 18, 1991, 20607, 12, 22, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9299, 2822, 3332, 12, 2890, 16, 1325, 16, 2362, 4672, 365, 18, 4661, 1670, 12, 8666, 738, 2362, 63, 20, 5717, 309, 562, 12, 3548, 13, 405, 404, 30, 19178, 18, 1991, 20607, 12, 22, 16...
def GetUserCredentials(): """Prompts the user for a username and password.""" if email is None: email = GetEmail("Email (login for uploading to %s)" % server) password = getpass.getpass("Password for %s: " % email) return (email, password)
def GetUserCredentials(): """Prompts the user for a username and password.""" if email is None: email = GetEmail("Email (login for uploading to %s)" % server) password = getpass.getpass("Password for %s: " % email) return (email, password)
865840a216782e5f71240c1035a4adf7a78aed02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/476/865840a216782e5f71240c1035a4adf7a78aed02/upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17330, 6163, 13332, 3536, 13224, 1092, 326, 729, 364, 279, 2718, 471, 2201, 12123, 309, 2699, 353, 599, 30, 2699, 273, 968, 4134, 2932, 4134, 261, 5819, 364, 25306, 358, 738, 87, 2225, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17330, 6163, 13332, 3536, 13224, 1092, 326, 729, 364, 279, 2718, 471, 2201, 12123, 309, 2699, 353, 599, 30, 2699, 273, 968, 4134, 2932, 4134, 261, 5819, 364, 25306, 358, 738, 87, 2225, 7...
document.body[i:(j+1)] = [r'\begin_inset ERT'
document.body[i:(j+1)] = [r'\begin_inset ERT',
def revert_listings_inset(document): r''' Revert listings inset to \lstinline or \begin, \end lstlisting, translate
a8e9fe82d0461fa821b3ec70c83fe76f02eafcb0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7514/a8e9fe82d0461fa821b3ec70c83fe76f02eafcb0/lyx_1_5.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 1098, 899, 67, 267, 542, 12, 5457, 4672, 436, 26418, 868, 1097, 666, 899, 316, 542, 358, 521, 16923, 10047, 578, 521, 10086, 16, 521, 409, 9441, 21228, 16, 4204, 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, 15226, 67, 1098, 899, 67, 267, 542, 12, 5457, 4672, 436, 26418, 868, 1097, 666, 899, 316, 542, 358, 521, 16923, 10047, 578, 521, 10086, 16, 521, 409, 9441, 21228, 16, 4204, 2, -100, -1...
Attribute access provided for convenience:: del env.value corresponds to:: del env['value']
Attribute access provided for convenience. The following forms are equivalent:: def configure(conf): del env.value del env['value']
def __delattr__(self, name): """ Attribute access provided for convenience:: del env.value
9286ebff2cf2adbd1ae6a2198f5c7879a08d827c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2886/9286ebff2cf2adbd1ae6a2198f5c7879a08d827c/ConfigSet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 1747, 972, 12, 2890, 16, 508, 4672, 3536, 3601, 2006, 2112, 364, 13553, 2866, 1464, 1550, 18, 1132, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3771, 1747, 972, 12, 2890, 16, 508, 4672, 3536, 3601, 2006, 2112, 364, 13553, 2866, 1464, 1550, 18, 1132, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...