rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
yMin, yMax = self.axes.get_ylim()
yMin, yMax = subplot.get_ylim()
def addConstantLine(self, name, y, subplotInd=0, doLabel=False, **kargs): """Add a new constant to plot Inputs: - name: name for constant line - y: value of constant line - doLabel: if True then the Line's label is set to name. Set True if you want the line to show up in the legend using name. Set False if you want no label (the line will not show in the legend) or if you prefer to specify a legend that is different than name - subplotInd: index of subplot - **kargs: keyword arguments for matplotlib Line2D, such as color """ subplot = self.subplotArr[subplotInd] if doLabel: kargs["label"] = name self._constLineDict[name] = subplot.axhline(y, **kargs) yMin, yMax = self.axes.get_ylim() if self._doAutoscaleArr[subplotInd] and numpy.isfinite(y) and not (yMin <= y <= yMax): self.axes.relim() self.axes.autoscale_view(scalex=False, scaley=True)
8f0db37bc375c56ac27469781575815f4f3b008d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6353/8f0db37bc375c56ac27469781575815f4f3b008d/StripChartWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6902, 1670, 12, 2890, 16, 508, 16, 677, 16, 19826, 3866, 33, 20, 16, 741, 2224, 33, 8381, 16, 2826, 79, 1968, 4672, 3536, 986, 279, 394, 5381, 358, 3207, 225, 24472, 30, 300, 50...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6902, 1670, 12, 2890, 16, 508, 16, 677, 16, 19826, 3866, 33, 20, 16, 741, 2224, 33, 8381, 16, 2826, 79, 1968, 4672, 3536, 986, 279, 394, 5381, 358, 3207, 225, 24472, 30, 300, 50...
nofill=True, fig=fig)
nofill=True, fig=fig, edgecolor='k', linewidth=1., alpha=0.3)
def showFocMec(self): if self.dictFocalMechanism == {}: print "no focal mechanism data." return # make up the figure: fig = plt.figure(1002, figsize=(2, 2)) fig.clear() fig.subplots_adjust(left=0, bottom=0, right=1, top=1) # plot the selected solution Beachball([self.dictFocalMechanism['Strike'], self.dictFocalMechanism['Dip'], self.dictFocalMechanism['Rake']], fig=fig) # plot the alternative solutions if self.focMechList != []: for d in self.focMechList: Beachball([d['Strike'], d['Dip'], d['Rake']], nofill=True, fig=fig) try: fig.suptitle("Dip: %6.2f Strike: %6.2f Rake: %6.2f\n" % \ (self.dictFocalMechanism['Dip'], self.dictFocalMechanism['Strike'], self.dictFocalMechanism['Rake']) + \ "Errors: %i/%i" % \ (self.dictFocalMechanism['Errors'], self.dictFocalMechanism['Station Polarity Count']), fontsize=10) except: fig.suptitle("Dip: %6.2f Strike: %6.2f Rake: %6.2f\n" % \ (self.dictFocalMechanism['Dip'], self.dictFocalMechanism['Strike'], self.dictFocalMechanism['Rake']) + \ "Used Polarities: %i" % \ self.dictFocalMechanism['Station Polarity Count'], fontsize=10) fig.canvas.set_window_title("Focal Mechanism (%i of %i)" % \ (self.focMechCurrent + 1, self.focMechCount)) fig.subplots_adjust(top=0.88) # make room for suptitle # values 0.02 and 0.96 fit best over the outer edges of beachball #ax = fig.add_axes([0.00, 0.02, 1.00, 0.96], polar=True) ax = fig.add_axes([0.00, 0.02, 1.00, 0.84], polar=True) ax.set_axis_off() for d in self.dicts: if 'PAzim' in d and 'PInci' in d and 'PPol' in d: if d['PPol'] == "up": color = "black" elif d['PPol'] == "poorup": color = "darkgrey" elif d['PPol'] == "poordown": color = "lightgrey" elif d['PPol'] == "down": color = "white" else: continue # southern hemisphere projection if d['PInci'] > 90: inci = 180. - d['PInci'] #azim = -180. + d['PAzim'] else: inci = d['PInci'] azim = d['PAzim'] #we have to hack the azimuth because of the polar plot #axes orientation plotazim = (np.pi / 2.) - ((azim / 180.) * np.pi) ax.scatter([plotazim], [inci], facecolor=color) ax.text(plotazim, inci, " " + d['Station'], fontsize=10, va="top") #this fits the 90 degree incident value to the beachball edge best ax.set_ylim([0., 91]) fig.canvas.draw()
2237df47fe6c100a62cb6d42142ae3c752cee829 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/2237df47fe6c100a62cb6d42142ae3c752cee829/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 42, 504, 49, 557, 12, 2890, 4672, 309, 365, 18, 1576, 42, 23735, 31546, 422, 16648, 1172, 315, 2135, 284, 23735, 12860, 501, 1199, 327, 468, 1221, 731, 326, 7837, 30, 4291, 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, 2405, 42, 504, 49, 557, 12, 2890, 4672, 309, 365, 18, 1576, 42, 23735, 31546, 422, 16648, 1172, 315, 2135, 284, 23735, 12860, 501, 1199, 327, 468, 1221, 731, 326, 7837, 30, 4291, 273, ...
""" % { 'inputFileList' : inputFileList }
""" % { 'inputFileList' : inputFileList, 'inputFileListPeeker' : inputFileListPeeker }
def _dummyGet_Value(*argv): return %(inputFileList)s
745a033981d56ffc61797eb8029f7b6c74676870 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/745a033981d56ffc61797eb8029f7b6c74676870/ganga-stage-in-out-dq2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 21050, 967, 67, 620, 30857, 19485, 4672, 327, 8975, 2630, 26098, 13, 87, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 21050, 967, 67, 620, 30857, 19485, 4672, 327, 8975, 2630, 26098, 13, 87, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return enclosure["text"] except: try:
if "text" in enclosure: return enclosure["text"] if hasattr(self.entry, "description"):
def getRawDescription(self): self.confirmDBThread() try: enclosure = self.getFirstVideoEnclosure() return enclosure["text"] except: try: return self.entry.description except: return u''
377941a22f6262fbfde1dc6d63e1ac7eaed76b15 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/377941a22f6262fbfde1dc6d63e1ac7eaed76b15/item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10547, 3291, 12, 2890, 4672, 365, 18, 10927, 2290, 3830, 1435, 775, 30, 23423, 273, 365, 18, 588, 3759, 10083, 4280, 5919, 1435, 309, 315, 955, 6, 316, 23423, 30, 327, 23423, 9614, 955, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10547, 3291, 12, 2890, 4672, 365, 18, 10927, 2290, 3830, 1435, 775, 30, 23423, 273, 365, 18, 588, 3759, 10083, 4280, 5919, 1435, 309, 315, 955, 6, 316, 23423, 30, 327, 23423, 9614, 955, ...
s.tk.call( s.plf._w, CMD, 'pladv', page )
s.cmd( 'pladv', page )
def pladv( s, page ):
5e1e7ef2c61ed08af7184e16b0bac6bebfbe213e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2933/5e1e7ef2c61ed08af7184e16b0bac6bebfbe213e/Plframe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 886, 28107, 12, 272, 16, 1363, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 886, 28107, 12, 272, 16, 1363, 262, 30, 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, ...
def QpCR(p, prec = 20, print_mode = None, halt = 40, check=True):
def QpCR(p, prec = twenty, print_mode = None, halt = forty, check=True):
def QpCR(p, prec = 20, print_mode = None, halt = 40, check=True): return Qp(p=p, prec=prec, print_mode=print_mode, halt=halt, check=check, type = 'capped-rel')
b92340ea12db03897b3c1888cbbf80913f1ff7f8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b92340ea12db03897b3c1888cbbf80913f1ff7f8/factory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2238, 84, 5093, 12, 84, 16, 13382, 273, 2339, 319, 93, 16, 1172, 67, 3188, 273, 599, 16, 18389, 273, 364, 4098, 16, 866, 33, 5510, 4672, 327, 2238, 84, 12, 84, 33, 84, 16, 13382, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2238, 84, 5093, 12, 84, 16, 13382, 273, 2339, 319, 93, 16, 1172, 67, 3188, 273, 599, 16, 18389, 273, 364, 4098, 16, 866, 33, 5510, 4672, 327, 2238, 84, 12, 84, 33, 84, 16, 13382, 3...
_('hg tag [-l -m <text> -d <datecode> -u <user> -r <rev>] <name>')),
_('hg tag [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME')),
def verify(ui, repo): """verify the integrity of the repository Verify the integrity of the current repository. This will perform an extensive check of the repository's integrity, validating the hashes and checksums of each entry in the changelog, manifest, and tracked files, as well as the integrity of their crosslinks and indices. """ return repo.verify()
ce846e629f86d4f87e7b3fe7952bf5fbac3da7b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/ce846e629f86d4f87e7b3fe7952bf5fbac3da7b2/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 12, 4881, 16, 3538, 4672, 3536, 8705, 326, 24425, 434, 326, 3352, 225, 8553, 326, 24425, 434, 326, 783, 3352, 18, 225, 1220, 903, 3073, 392, 1110, 14315, 866, 434, 326, 3352, 1807,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 12, 4881, 16, 3538, 4672, 3536, 8705, 326, 24425, 434, 326, 3352, 225, 8553, 326, 24425, 434, 326, 783, 3352, 18, 225, 1220, 903, 3073, 392, 1110, 14315, 866, 434, 326, 3352, 1807,...
avail_list = [None] return avail_list
return self._worker_list
def get_available_workers(self): avail_list = [None] return avail_list
59e43bcbd4268227c074c57e24b291856aa6f88f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8868/59e43bcbd4268227c074c57e24b291856aa6f88f/grid_simulator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5699, 67, 15625, 12, 2890, 4672, 327, 365, 6315, 10124, 67, 1098, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5699, 67, 15625, 12, 2890, 4672, 327, 365, 6315, 10124, 67, 1098, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
old = self.elements[id]
try: old = self.elements[id] except KeyError: logging.warn("KeyError for element %s in " "HTMLChangeOptimizer.calcChanges()", id) return [ (id, html, None) ]
def calcChanges(self, id, html): """Calculate a list of arguments to pass to HTMLArea.changeItems().""" old = self.elements[id] new = OptimizedElement(id, html) self.elements[id] = new return new.calcChanges(old)
341e21d3656c9f396c355b773c00254f7f8379f4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/341e21d3656c9f396c355b773c00254f7f8379f4/templateoptimize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 7173, 12, 2890, 16, 612, 16, 1729, 4672, 3536, 8695, 279, 666, 434, 1775, 358, 1342, 358, 3982, 5484, 18, 3427, 3126, 1435, 12123, 775, 30, 1592, 273, 365, 18, 6274, 63, 350, 65,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7173, 12, 2890, 16, 612, 16, 1729, 4672, 3536, 8695, 279, 666, 434, 1775, 358, 1342, 358, 3982, 5484, 18, 3427, 3126, 1435, 12123, 775, 30, 1592, 273, 365, 18, 6274, 63, 350, 65,...
self.history.add(text) self.history.reset()
self.history.append(text)
def key_Return(self, entry, event): text = self.getText() # Figure out if that Return meant "next line" or "execute." try: c = code.compile_command(text) except SyntaxError, e: # This could conceivably piss you off if the client's python # doesn't accept keywords that are known to the manhole's # python. point = buffer.get_iter_at_line_offset(e.lineno, e.offset) buffer.place(point) # TODO: Componentize! self.toplevel.output.append(str(e), "exception") except (OverflowError, ValueError), e: self.toplevel.output.append(str(e), "exception") else: if c is not None: self.sendMessage() # Don't insert Return as a newline in the buffer. self.history.add(text) self.history.reset() self.clear() entry.emit_stop_by_name("key_press_event") else: # not a complete code block pass
a3e9507567dbcf44a6309492453c5f3d574ec572 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a3e9507567dbcf44a6309492453c5f3d574ec572/gtk2manhole.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 990, 12, 2890, 16, 1241, 16, 871, 4672, 977, 273, 365, 18, 588, 1528, 1435, 468, 18818, 596, 309, 716, 2000, 20348, 315, 4285, 980, 6, 578, 315, 8837, 1199, 775, 30, 276, 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, 498, 67, 990, 12, 2890, 16, 1241, 16, 871, 4672, 977, 273, 365, 18, 588, 1528, 1435, 468, 18818, 596, 309, 716, 2000, 20348, 315, 4285, 980, 6, 578, 315, 8837, 1199, 775, 30, 276, 27...
ballBody.setLinearVel((ax/3, ay, mouseAy2))
ballBody.setLinearVel((ax/3, ay, mouseAy[2]))
def near_callback(args, geom1, geom2): ##TODO: 4P generalization global BLOCK, kicker #global called #called = called + 1 contacts=ode.collide(geom1, geom2) world, contactgroup = args for c in contacts: #if not ((geom1 == ballGeom) or (geom2 == ballGeom)): # print "rong collision!" if (geom1 in kickerGeom) or (geom2 in kickerGeom) or (geom1 in kickerGeom2) or (geom2 in kickerGeom2): c.setMu(1E5) #kickers have high friction, minimal bounce - FIXME: does not work. you still can't stop balls c.setBounce(1) if (geom1 in kickerGeom and geom2 in kickerGeom2) or (geom1 in kickerGeom2 and geom2 in kickerGeom2): pass else: bx, by, bz = ballBody.getPosition() ax, ay, az = ballBody.getLinearVel() px, py, pz = c.getContactGeomParams()[0] if geom1 in kickerGeom or geom2 in kickerGeom: if abs(pz-bz)<0.1: #if the ball touches the kicker on its left or right ballBody.setLinearVel((ax,ay,(az+mouseAy1)/2)) #causes some stickiness in the vertical axis angle = kicker0.getH() if (by>py) and (((angle < -45) and (angle>-90)) or ((angle > 45) and (angle<90))): BLOCK1 = True ballBody.setLinearVel((ax/3, ay, mouseAy1)) else: if abs(pz-bz)<0.1: #if the ball touches the kicker on its left or right ballBody.setLinearVel((ax, ay, (az+mouseAy2)/2)) #causes some stickiness in the vertical axis angle = kicker2.getH() if (by>py) and (((angle < -45) and (angle>-90)) or ((angle > 45) and (angle<90))): BLOCK2 = True ballBody.setLinearVel((ax/3, ay, mouseAy2)) elif (geom1 == tableGeom) or (geom2 == tableGeom): c.setMu(4) #table has little bounce, noticeable friction c.setBounce(1.5) elif (geom1 in wallGeom) or (geom2 in wallGeom): c.setMu(1) #walls have ok bounce, noticeable friction c.setBounce(2) else: #ignore anything else. I have no idea what that could be print "something unidentified collided with my balls. ouch." continue j=ode.ContactJoint(world, contactgroup, c) j.attach(geom1.getBody(), geom2.getBody())
73d04275d5aecffbeaa4958b270fc22e07a236dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12834/73d04275d5aecffbeaa4958b270fc22e07a236dc/kickern.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13378, 67, 3394, 12, 1968, 16, 7364, 21, 16, 7364, 22, 4672, 7541, 6241, 30, 1059, 52, 7470, 1588, 2552, 14073, 16, 417, 5448, 468, 6347, 2566, 225, 468, 11777, 273, 2566, 397, 404, 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, 13378, 67, 3394, 12, 1968, 16, 7364, 21, 16, 7364, 22, 4672, 7541, 6241, 30, 1059, 52, 7470, 1588, 2552, 14073, 16, 417, 5448, 468, 6347, 2566, 225, 468, 11777, 273, 2566, 397, 404, 22...
uid=uid,
uid=auid,
def comments(req, ln=cdslang, uid="", comid="", reviews=0): """ View reported comments, filter by either user or a specific comment (only one given at a time) @param ln: language @param uid: user id @param comid: comment id @param reviews: boolean enabled for reviews, disabled for comments """ navtrail_previous_links = getnavtrail() + """ &gt; <a class="navtrail" href="%s/admin/webcomment/webcommentadmin.py/">Comment Management</a>""" % (weburl,) try: auid = getUid(req) except MySQLdb.Error, e: return error_page(req) (auth_code, auth_msg) = check_user(auid,'cfgwebcomment') if not auth_code: return page(title="View all Reported %s" % (reviews>0 and "Reviews" or "Comments",), body=perform_request_comments(ln=ln, uid=uid, comID=comid, reviews=reviews), uid=uid, language=ln, urlargs=req.args, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth_msg, navtrail=navtrail_previous_links)
b0056ed17a8560e8a0db7b05ab945435b27f6e45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/b0056ed17a8560e8a0db7b05ab945435b27f6e45/webcommentadmin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5678, 12, 3658, 16, 7211, 33, 4315, 2069, 539, 16, 4555, 1546, 3113, 532, 350, 1546, 3113, 283, 7061, 33, 20, 4672, 3536, 4441, 14010, 5678, 16, 1034, 635, 3344, 729, 578, 279, 2923, 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, 5678, 12, 3658, 16, 7211, 33, 4315, 2069, 539, 16, 4555, 1546, 3113, 532, 350, 1546, 3113, 283, 7061, 33, 20, 4672, 3536, 4441, 14010, 5678, 16, 1034, 635, 3344, 729, 578, 279, 2923, 2...
if ( (input.level() == self.prime() or input.level() == 1)
if ( (input.level() == 1 or input.level().prime_factors() == [self.prime()])
def __call__(self, input): r""" Create an element of this space. Allowable inputs are: - elements of compatible spaces of modular forms or overconvergent modular forms - arbitrary power series in q - lists of elements of the base ring (interpreted as vectors in the basis given by self.gens()).
ed0a3ce8f392224845d699a88cf40b90f375c64a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/ed0a3ce8f392224845d699a88cf40b90f375c64a/genus0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 810, 4672, 436, 8395, 1788, 392, 930, 434, 333, 3476, 18, 7852, 429, 4540, 854, 30, 225, 300, 2186, 434, 7318, 7292, 434, 681, 2490, 10138, 578, 1879, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 810, 4672, 436, 8395, 1788, 392, 930, 434, 333, 3476, 18, 7852, 429, 4540, 854, 30, 225, 300, 2186, 434, 7318, 7292, 434, 681, 2490, 10138, 578, 1879, 59...
if m.profile('relASA', 0) != 0:
if m.profile('relAS', 0) != 0:
def __addSurface( self, m ): """ Add surface area to model.
2f7d0718ebf56c6dbe199c060b2aceb58e133c19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/482/2f7d0718ebf56c6dbe199c060b2aceb58e133c19/ContactMaster.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 11508, 12, 365, 16, 312, 262, 30, 3536, 1436, 9034, 5091, 358, 938, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 11508, 12, 365, 16, 312, 262, 30, 3536, 1436, 9034, 5091, 358, 938, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
heading_depth = depth + 1
heading_depth = depth
def heading(self, on, depth, id = None, **kw): # remember depth of first heading, and adapt counting depth accordingly if not self._base_depth: self._base_depth = depth
b8f16098349c9446a5cdc1537150ec4d59183a3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/b8f16098349c9446a5cdc1537150ec4d59183a3c/text_html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11053, 12, 2890, 16, 603, 16, 3598, 16, 612, 273, 599, 16, 2826, 9987, 4672, 468, 11586, 3598, 434, 1122, 11053, 16, 471, 5855, 22075, 3598, 15905, 309, 486, 365, 6315, 1969, 67, 5979, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11053, 12, 2890, 16, 603, 16, 3598, 16, 612, 273, 599, 16, 2826, 9987, 4672, 468, 11586, 3598, 434, 1122, 11053, 16, 471, 5855, 22075, 3598, 15905, 309, 486, 365, 6315, 1969, 67, 5979, ...
if self.has("duration") and "movie/size" in avi: self.bit_rate = float(avi["movie/size"].value) * 8 / timedelta2seconds(self.get('duration'))
if self.has("duration") and "/movie/size" in headers: self.bit_rate = float(headers["/movie/size"].value) * 8 / timedelta2seconds(self.get('duration'))
def extractAVI(self, headers): audio_index = 1 for stream in headers.array("stream"): if "stream_hdr/stream_type" not in stream: continue stream_type = stream["stream_hdr/stream_type"].value if stream_type == "vids": if "stream_hdr" in stream: meta = Metadata(self) self.extractAVIVideo(stream["stream_hdr"], meta) self.addGroup("video", meta, "Video stream") elif stream_type == "auds": if "stream_fmt" in stream: meta = Metadata(self) self.extractAVIAudio(stream["stream_fmt"], meta) self.addGroup("audio[%u]" % audio_index, meta, "Audio stream") audio_index += 1 if "avi_hdr" in headers: self.useAviHeader(headers["avi_hdr"])
65246d39e7f61f60de5e5126a9646cb20bd2985f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/65246d39e7f61f60de5e5126a9646cb20bd2985f/riff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 37, 4136, 12, 2890, 16, 1607, 4672, 7447, 67, 1615, 273, 404, 364, 1407, 316, 1607, 18, 1126, 2932, 3256, 6, 4672, 309, 315, 3256, 67, 16587, 19, 3256, 67, 723, 6, 486, 316, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 37, 4136, 12, 2890, 16, 1607, 4672, 7447, 67, 1615, 273, 404, 364, 1407, 316, 1607, 18, 1126, 2932, 3256, 6, 4672, 309, 315, 3256, 67, 16587, 19, 3256, 67, 723, 6, 486, 316, 14...
soup = unicode(BeautifulSoup(urllib2.urlopen(url).read(), convertEntities=BeautifulSoup.ALL_ENTITIES)) try: start = soup.index('thumbnailViewUrl: "')+19 except ValueError: print >> stderr, 'Error: when parsing the page' self.results[self.page-1] = [] return url = DOMAIN + soup[start:soup.index('"', start)] + QUERY_STRING % (self.page+1,)
def allvideo(self, arg): '''get a list of videos for given event''' v = int(arg) - 1 if not self.more: self.page = 0 self.results = [] try: url = DOMAIN + self.allvideos[v][1] soup = unicode(BeautifulSoup(urllib2.urlopen(url).read(), convertEntities=BeautifulSoup.ALL_ENTITIES)) try: start = soup.index('thumbnailViewUrl: "')+19 except ValueError: print >> stderr, 'Error: when parsing the page' self.results[self.page-1] = [] return url = DOMAIN + soup[start:soup.index('"', start)] + QUERY_STRING % (self.page+1,) soup = BeautifulSoup(urllib2.urlopen(url).read(), convertEntities=BeautifulSoup.ALL_ENTITIES) self.results.append(extract_videos(soup)) except urllib2.URLError: die("Can't complete the requested search")
79cf11f15f743217615c27cf0cac806464dfc287 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11589/79cf11f15f743217615c27cf0cac806464dfc287/arteVIDEOS.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 9115, 12, 2890, 16, 1501, 4672, 9163, 588, 279, 666, 434, 24752, 364, 864, 871, 26418, 331, 273, 509, 12, 3175, 13, 300, 404, 309, 486, 365, 18, 10161, 30, 365, 18, 2433, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 9115, 12, 2890, 16, 1501, 4672, 9163, 588, 279, 666, 434, 24752, 364, 864, 871, 26418, 331, 273, 509, 12, 3175, 13, 300, 404, 309, 486, 365, 18, 10161, 30, 365, 18, 2433, 273, 3...
- [D] - I. Duursma, "Extremal weight enumerators and ultraspherical polynomials"
.. [D] I. Duursma, "Extremal weight enumerators and ultraspherical polynomials"
def sd_duursma_data(C, i): r""" Returns the Duursama data `v` and `m` of this formally s.d. code `C` and the type number `i` in (1,2,3,4). Does *not* check if this code is actually sd.
4dc974cc0477a4b87cefa14e19bab1ed6473070d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/4dc974cc0477a4b87cefa14e19bab1ed6473070d/linear_code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8349, 67, 2544, 25152, 2540, 67, 892, 12, 39, 16, 277, 4672, 436, 8395, 2860, 326, 463, 89, 295, 20353, 69, 501, 1375, 90, 68, 471, 1375, 81, 68, 434, 333, 646, 1230, 272, 18, 72, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8349, 67, 2544, 25152, 2540, 67, 892, 12, 39, 16, 277, 4672, 436, 8395, 2860, 326, 463, 89, 295, 20353, 69, 501, 1375, 90, 68, 471, 1375, 81, 68, 434, 333, 646, 1230, 272, 18, 72, ...
self.Counter = pickle.load (fo) self.Jobs = pickle.load (fo) self.Workers = pickle.load (fo)
self.Counter = cPickle.load (fo) self.Jobs = cPickle.load (fo) self.Workers = cPickle.load (fo)
def read (self, fo): version = pickle.load(fo) if version == DBVersion: self.Counter = pickle.load (fo) self.Jobs = pickle.load (fo) self.Workers = pickle.load (fo) self._refresh () #self.dump () else: raise Exception ("Database too old, erase the master_db file") self.clear ()
20fa391431a1b90b1c3b6ef9899a92a7762119ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1233/20fa391431a1b90b1c3b6ef9899a92a7762119ad/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 261, 2890, 16, 18261, 4672, 1177, 273, 13379, 18, 945, 12, 617, 13, 309, 1177, 422, 2383, 1444, 30, 365, 18, 4789, 273, 276, 17968, 298, 18, 945, 261, 617, 13, 365, 18, 7276, 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, 855, 261, 2890, 16, 18261, 4672, 1177, 273, 13379, 18, 945, 12, 617, 13, 309, 1177, 422, 2383, 1444, 30, 365, 18, 4789, 273, 276, 17968, 298, 18, 945, 261, 617, 13, 365, 18, 7276, 27...
readsize = 100
orig_size = size readsize = min(100, size)
def readline(self): bufs = [] readsize = 100 while 1: c = self.read(readsize) i = string.find(c, '\n') if i >= 0 or c == '': bufs.append(c[:i+1]) self._unread(c[i+1:]) return string.join(bufs, '') bufs.append(c) readsize = readsize * 2
41616ee194e65b23fa508326d7b3788f2d63f362 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/41616ee194e65b23fa508326d7b3788f2d63f362/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 4672, 1681, 87, 273, 5378, 1647, 67, 1467, 273, 963, 855, 1467, 273, 1131, 12, 6625, 16, 963, 13, 1323, 404, 30, 276, 273, 365, 18, 896, 12, 896, 1467, 13, 277, 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, 12023, 12, 2890, 4672, 1681, 87, 273, 5378, 1647, 67, 1467, 273, 963, 855, 1467, 273, 1131, 12, 6625, 16, 963, 13, 1323, 404, 30, 276, 273, 365, 18, 896, 12, 896, 1467, 13, 277, 273,...
def cutcoupling_bfs(self, bfs):
def cutcoupling_bfs(self, bfs, apply=False):
def cutcoupling_bfs(self, bfs): self.initialize() bfs = np.array(bfs) p = self.input_parameters h_pp = p['h'].copy() s_pp = p['s'].copy() cutcoupling(h_pp, s_pp, bfs) for alpha, sigma in enumerate(self.selfenergies): for m in bfs: sigma.h_im[:, m] = 0.0 sigma.s_im[:, m] = 0.0 p['hc%i' % (alpha+1)] = sigma.h_im p['sc%i' % (alpha+1)] = sigma.s_im return h_pp, s_pp
2a4069ffa989e5eeef88cad20553f9b5d7f51558 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/2a4069ffa989e5eeef88cad20553f9b5d7f51558/calculators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6391, 71, 28322, 67, 70, 2556, 12, 2890, 16, 324, 2556, 16, 2230, 33, 8381, 4672, 365, 18, 11160, 1435, 324, 2556, 273, 1130, 18, 1126, 12, 70, 2556, 13, 293, 273, 365, 18, 2630, 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, 6391, 71, 28322, 67, 70, 2556, 12, 2890, 16, 324, 2556, 16, 2230, 33, 8381, 4672, 365, 18, 11160, 1435, 324, 2556, 273, 1130, 18, 1126, 12, 70, 2556, 13, 293, 273, 365, 18, 2630, 67,...
dprint(client.response)
def _save_file(cls, ref, data): ref, client = cls._get_client(ref) path = str(ref.path) dprint(path) try: responses = client.put(path, data) except: dprint(client.response) raise dprint(repr(data)) print client.response.status cls._purge_cache(ref)
86f487d201afc0c26ccca3cb3fdfd7f84807d2f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/86f487d201afc0c26ccca3cb3fdfd7f84807d2f7/http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 768, 12, 6429, 16, 1278, 16, 501, 4672, 1278, 16, 1004, 273, 2028, 6315, 588, 67, 2625, 12, 1734, 13, 589, 273, 609, 12, 1734, 18, 803, 13, 302, 1188, 12, 803, 13, 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, 389, 5688, 67, 768, 12, 6429, 16, 1278, 16, 501, 4672, 1278, 16, 1004, 273, 2028, 6315, 588, 67, 2625, 12, 1734, 13, 589, 273, 609, 12, 1734, 18, 803, 13, 302, 1188, 12, 803, 13, 7...
sql=""" insert into run (run_id, batch_id, bstart,bend,bgroup, status_file_name) values (null,%s,%s,%s,%s,%s)""" bindings = [run[x] for x in ( 'batch_id','start','end','group_or_null','status_file_name')]
if run["group_or_null"] is None: sql = ("insert into run " "(run_id, batch_id, bstart, bend, bgroup, status_file_name) " "values (null, %s, %s, %s, null, %s)") binding_names = ('batch_id', 'start', 'end', 'status_file_name') else: sql= ("insert into run " "(run_id, batch_id, bstart,bend,bgroup, status_file_name)" "values (null,%s,%s,%s,%s,%s)") binding_names = ('batch_id','start','end','group_or_null', 'status_file_name') bindings = [run[x] for x in binding_names]
def CreateRunRecord(batch_id, run): """Create a run record within the current batch """ run["batch_id"]=batch_id pack_group(run) cursor = connection.cursor() sql=""" insert into run (run_id, batch_id, bstart,bend,bgroup, status_file_name) values (null,%s,%s,%s,%s,%s)""" bindings = [run[x] for x in ( 'batch_id','start','end','group_or_null','status_file_name')] cursor.execute(sql, bindings) cursor.close() cursor = connection.cursor() cursor.execute("select last_insert_id()") run["run_id"] = cursor.fetchone()[0] cursor.close() return
fe41d6472864862ddc6c5f76ad63b4d4b7c88370 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2870/fe41d6472864862ddc6c5f76ad63b4d4b7c88370/RunBatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1997, 2115, 12, 5303, 67, 350, 16, 1086, 4672, 3536, 1684, 279, 1086, 1409, 3470, 326, 783, 2581, 225, 3536, 1086, 9614, 5303, 67, 350, 11929, 33, 5303, 67, 350, 2298, 67, 1655, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1997, 2115, 12, 5303, 67, 350, 16, 1086, 4672, 3536, 1684, 279, 1086, 1409, 3470, 326, 783, 2581, 225, 3536, 1086, 9614, 5303, 67, 350, 11929, 33, 5303, 67, 350, 2298, 67, 1655, ...
if len(Functs[f][1]) == 0:
numRanges = len(Functs[f][1]) if numRanges == 0:
typedef xmlChRangeGroup *xmlChRangeGroupPtr;
c4b8189aa746926a31722287db10cddc8d89a315 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/c4b8189aa746926a31722287db10cddc8d89a315/genChRanges.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 618, 536, 2025, 782, 2655, 1114, 380, 2902, 782, 2655, 1114, 5263, 31, 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, 618, 536, 2025, 782, 2655, 1114, 380, 2902, 782, 2655, 1114, 5263, 31, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
raise IOError, "end of file reached"
raise IOError("end of file reached")
def copyfileobj(src, dst, length=None): """Copy length bytes from fileobj src to fileobj dst. If length is None, copy the entire content. """ if length == 0: return if length is None: shutil.copyfileobj(src, dst) return BUFSIZE = 16 * 1024 blocks, remainder = divmod(length, BUFSIZE) for b in xrange(blocks): buf = src.read(BUFSIZE) if len(buf) < BUFSIZE: raise IOError, "end of file reached" dst.write(buf) if remainder != 0: buf = src.read(remainder) if len(buf) < remainder: raise IOError, "end of file reached" dst.write(buf) return
a080e25938abc4d1161007bb915b3848123a4f64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a080e25938abc4d1161007bb915b3848123a4f64/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29310, 2603, 12, 4816, 16, 3046, 16, 769, 33, 7036, 4672, 3536, 2951, 769, 1731, 628, 17041, 1705, 358, 17041, 3046, 18, 971, 769, 353, 599, 16, 1610, 326, 7278, 913, 18, 3536, 309, 76...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29310, 2603, 12, 4816, 16, 3046, 16, 769, 33, 7036, 4672, 3536, 2951, 769, 1731, 628, 17041, 1705, 358, 17041, 3046, 18, 971, 769, 353, 599, 16, 1610, 326, 7278, 913, 18, 3536, 309, 76...
frameRun=Frame(frame,borderwidth=2,relief=GROOVE) frameSave=Frame(frame,borderwidth=2,relief=GROOVE)
frameRun=LabelFrame(frame,borderwidth=2,relief=GROOVE, text=' Startup Preferences ') frameSave=LabelFrame(frame,borderwidth=2,relief=GROOVE, text=' Autosave Preferences ')
def CreatePageGeneral(self): #tkVars self.winWidth=StringVar(self) self.winHeight=StringVar(self) self.paraWidth=StringVar(self) self.startupEdit=IntVar(self) self.autoSave=IntVar(self) self.encoding=StringVar(self) self.userHelpBrowser=BooleanVar(self) self.helpBrowser=StringVar(self) #widget creation #body frame=self.tabPages.pages['General']['page'] #body section frames frameRun=Frame(frame,borderwidth=2,relief=GROOVE) frameSave=Frame(frame,borderwidth=2,relief=GROOVE) frameWinSize=Frame(frame,borderwidth=2,relief=GROOVE) frameParaSize=Frame(frame,borderwidth=2,relief=GROOVE) frameEncoding=Frame(frame,borderwidth=2,relief=GROOVE) frameHelp=Frame(frame,borderwidth=2,relief=GROOVE) #frameRun labelRunTitle=Label(frameRun,text='Startup Preferences') labelRunChoiceTitle=Label(frameRun,text='At Startup') radioStartupEdit=Radiobutton(frameRun,variable=self.startupEdit, value=1,command=self.SetKeysType,text="Open Edit Window") radioStartupShell=Radiobutton(frameRun,variable=self.startupEdit, value=0,command=self.SetKeysType,text='Open Shell Window') #frameSave labelSaveTitle=Label(frameSave,text='Autosave Preference') labelRunSaveTitle=Label(frameSave,text='At Start of Run (F5) ') radioSaveAsk=Radiobutton(frameSave,variable=self.autoSave, value=0,command=self.SetKeysType,text="Prompt to Save") radioSaveAuto=Radiobutton(frameSave,variable=self.autoSave, value=1,command=self.SetKeysType,text='No Prompt') #frameWinSize labelWinSizeTitle=Label(frameWinSize,text='Initial Window Size'+ ' (in characters)') labelWinWidthTitle=Label(frameWinSize,text='Width') entryWinWidth=Entry(frameWinSize,textvariable=self.winWidth, width=3) labelWinHeightTitle=Label(frameWinSize,text='Height') entryWinHeight=Entry(frameWinSize,textvariable=self.winHeight, width=3) #paragraphFormatWidth labelParaWidthTitle=Label(frameParaSize,text='Paragraph reformat'+ ' width (in characters)') entryParaWidth=Entry(frameParaSize,textvariable=self.paraWidth, width=3) #frameEncoding labelEncodingTitle=Label(frameEncoding,text="Default Source Encoding") radioEncLocale=Radiobutton(frameEncoding,variable=self.encoding, value="locale",text="Locale-defined") radioEncUTF8=Radiobutton(frameEncoding,variable=self.encoding, value="utf-8",text="UTF-8") radioEncNone=Radiobutton(frameEncoding,variable=self.encoding, value="none",text="None") #frameHelp frameHelpList=Frame(frameHelp) frameHelpListButtons=Frame(frameHelpList) labelHelpListTitle=Label(frameHelpList,text='Additional Help Sources:') scrollHelpList=Scrollbar(frameHelpList) self.listHelp=Listbox(frameHelpList,height=5,takefocus=FALSE, exportselection=FALSE) scrollHelpList.config(command=self.listHelp.yview) self.listHelp.config(yscrollcommand=scrollHelpList.set) self.listHelp.bind('<ButtonRelease-1>',self.HelpSourceSelected) self.buttonHelpListEdit=Button(frameHelpListButtons,text='Edit', state=DISABLED,width=8,command=self.HelpListItemEdit) self.buttonHelpListAdd=Button(frameHelpListButtons,text='Add', width=8,command=self.HelpListItemAdd) self.buttonHelpListRemove=Button(frameHelpListButtons,text='Remove', state=DISABLED,width=8,command=self.HelpListItemRemove) #widget packing #body frameRun.pack(side=TOP,padx=5,pady=5,fill=X) frameSave.pack(side=TOP,padx=5,pady=5,fill=X) frameWinSize.pack(side=TOP,padx=5,pady=5,fill=X) frameParaSize.pack(side=TOP,padx=5,pady=5,fill=X) frameEncoding.pack(side=TOP,padx=5,pady=5,fill=X) frameHelp.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH) #frameRun labelRunTitle.pack(side=TOP,anchor=W,padx=5,pady=5) labelRunChoiceTitle.pack(side=LEFT,anchor=W,padx=5,pady=5) radioStartupShell.pack(side=RIGHT,anchor=W,padx=5,pady=5) radioStartupEdit.pack(side=RIGHT,anchor=W,padx=5,pady=5) #frameSave labelSaveTitle.pack(side=TOP,anchor=W,padx=5,pady=5) labelRunSaveTitle.pack(side=LEFT,anchor=W,padx=5,pady=5) radioSaveAuto.pack(side=RIGHT,anchor=W,padx=5,pady=5) radioSaveAsk.pack(side=RIGHT,anchor=W,padx=5,pady=5) #frameWinSize labelWinSizeTitle.pack(side=LEFT,anchor=W,padx=5,pady=5) entryWinHeight.pack(side=RIGHT,anchor=E,padx=10,pady=5) labelWinHeightTitle.pack(side=RIGHT,anchor=E,pady=5) entryWinWidth.pack(side=RIGHT,anchor=E,padx=10,pady=5) labelWinWidthTitle.pack(side=RIGHT,anchor=E,pady=5) #paragraphFormatWidth labelParaWidthTitle.pack(side=LEFT,anchor=W,padx=5,pady=5) entryParaWidth.pack(side=RIGHT,anchor=E,padx=10,pady=5) #frameEncoding labelEncodingTitle.pack(side=LEFT,anchor=W,padx=5,pady=5) radioEncNone.pack(side=RIGHT,anchor=E,pady=5) radioEncUTF8.pack(side=RIGHT,anchor=E,pady=5) radioEncLocale.pack(side=RIGHT,anchor=E,pady=5) #frameHelp frameHelpListButtons.pack(side=RIGHT,padx=5,pady=5,fill=Y) frameHelpList.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH) labelHelpListTitle.pack(side=TOP,anchor=W) scrollHelpList.pack(side=RIGHT,anchor=W,fill=Y) self.listHelp.pack(side=LEFT,anchor=E,expand=TRUE,fill=BOTH) self.buttonHelpListEdit.pack(side=TOP,anchor=W,pady=5) self.buttonHelpListAdd.pack(side=TOP,anchor=W) self.buttonHelpListRemove.pack(side=TOP,anchor=W,pady=5) return frame
cb3fac2e967e9ef77ede3f9945cfed8702f7e0a5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/cb3fac2e967e9ef77ede3f9945cfed8702f7e0a5/configDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1964, 12580, 12, 2890, 4672, 468, 16099, 5555, 365, 18, 8082, 2384, 33, 780, 1537, 12, 2890, 13, 365, 18, 8082, 2686, 33, 780, 1537, 12, 2890, 13, 365, 18, 25072, 2384, 33, 780, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1964, 12580, 12, 2890, 4672, 468, 16099, 5555, 365, 18, 8082, 2384, 33, 780, 1537, 12, 2890, 13, 365, 18, 8082, 2686, 33, 780, 1537, 12, 2890, 13, 365, 18, 25072, 2384, 33, 780, ...
"""Runs an scene, entering in the Director's main loop.
"""Runs a scene, entering in the Director's main loop.
def run(self, scene): """Runs an scene, entering in the Director's main loop.
d6a11bcf3a6cc3d78556f7155ceebc0f3615a5e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7473/d6a11bcf3a6cc3d78556f7155ceebc0f3615a5e9/director.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 9065, 4672, 3536, 9361, 392, 9065, 16, 19014, 316, 326, 29701, 1807, 2774, 2798, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1086, 12, 2890, 16, 9065, 4672, 3536, 9361, 392, 9065, 16, 19014, 316, 326, 29701, 1807, 2774, 2798, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
newjobname = createNewJobName()
newjobname = createNewJobName(extJobEntry)
def clashProcess(): # check whether the local job is protected jobMap = self.getJobsMap() if ((self.OVERRIDE_KEY not in jobMap) or (l.clashname not in jobMap[self.OVERRIDE_KEY])): # put shaddowed job in the local 'extend' if not newJob: raise Error, "unsuitable new job" localjob = self.getJob(l.clashname) extList = localjob.getFeature('extend', []) extList.append(newJob) localjob.setFeature('extend', extList) # add to config's shadowed list self._shadowedJobs[newJob] = localjob
e9f54b0f3b7c89346f4afd1778fed9819cf13abf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/e9f54b0f3b7c89346f4afd1778fed9819cf13abf/Config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 961, 2227, 13332, 468, 866, 2856, 326, 1191, 1719, 353, 4750, 1719, 863, 273, 365, 18, 588, 7276, 863, 1435, 309, 14015, 2890, 18, 31514, 67, 3297, 486, 316, 1719, 863, 13, 578, 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, 927, 961, 2227, 13332, 468, 866, 2856, 326, 1191, 1719, 353, 4750, 1719, 863, 273, 365, 18, 588, 7276, 863, 1435, 309, 14015, 2890, 18, 31514, 67, 3297, 486, 316, 1719, 863, 13, 578, 2...
for i in rpmtagrequired:
for i in ("name", "version", "release", "arch", "rpmversion"):
def __doVerify(self): self.__verifyWriteHeader(self.hdr.hash, rpmtag, "immutable", self.hdrdata, 1, self.rpmgroup) if self.strict: self.__verifyWriteHeader(self.sig.hash, rpmsigtag, "header_signatures", self.sigdata, 0, None) # disable the utf-8 test per default, should check against self.verbose: if self.strict and None: for i in ("summary", "description", "changelogtext"): if self[i] == None: continue for j in self[i]: try: j.decode("utf-8") except: self.printErr("not utf-8 in %s" % i) #self.printErr("text: %s" % j) break for i in rpmsigtagrequired: if not self.sig.has_key(i): self.printErr("sig header is missing: %s" % i) for i in rpmtagrequired: if not self.hdr.has_key(i): self.printErr("hdr is missing: %s" % i) size_in_sig = self.sig.getOne("size_in_sig") if size_in_sig != None and not isUrl(self.filename): rpmsize = os.stat(self.filename).st_size if rpmsize != 96 + self.sigdatasize + size_in_sig: self.printErr("wrong size in rpm package: %d / %d" % \ (rpmsize, 96 + self.sigdatasize + size_in_sig)) filenames = self.getFilenames() if self.issrc: i = self.getSpecfile(filenames) if i == None: self.printErr("no specfile found in src.rpm") else: if self.strict and not filenames[i].endswith(".spec"): self.printErr("specfile does not end with .spec") #if self.strict and filenames[i] != self["name"] + ".spec": # self.printErr("specfile not using default name: %s" % \ # filenames[i]) if self["sourcerpm"] != None: self.printErr("binary rpm does contain sourcerpm tag") else: if self["sourcerpm"] == None: self.printErr("source rpm does not contain sourcerpm tag") if self["triggerscripts"] != None: if len(self["triggerscripts"]) != len(self["triggerscriptprog"]): self.printErr("wrong trigger lengths") if self.strict: for i in ("-", ":"): if i in self["version"] or i in self["release"]: self.printErr("version/release contains wrong char") for i in (",", " ", "\t"): if i in self["name"] or i in self["version"] or \ i in self["release"]: self.printErr("name/version/release contains wrong char") if self["payloadformat"] not in [None, "cpio", "drpm"]: self.printErr("wrong payload format %s" % self["payloadformat"]) if self.strict: if self["payloadcompressor"] not in [None, "gzip"]: self.printErr("no gzip compressor: %s" % \ self["payloadcompressor"]) else: if self["payloadcompressor"] not in [None, "gzip", "bzip2"]: self.printErr("no gzip/bzip2 compressor: %s" % \ self["payloadcompressor"]) if self.strict and self["payloadflags"] not in ["9"]: self.printErr("no payload flags: %s" % self["payloadflags"]) if self.strict and self["os"] not in ["Linux", "linux"]: self.printErr("bad os: %s" % self["os"]) elif self["os"] not in ["Linux", "linux", "darwin"]: self.printErr("bad os: %s" % self["os"]) if self.strict: if self["packager"] not in (None, "Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>", "Fedora Project <http://bugzilla.redhat.com/bugzilla>", "Matthias Saou <matthias@rpmforge.net>"): self.printErr("unknown packager: %s" % self["packager"]) if self["vendor"] not in (None, "Red Hat, Inc.", "Fedora Project", "Livna.org RPMS", "Freshrpms.net"): self.printErr("unknown vendor: %s" % self["vendor"]) if self["distribution"] not in (None, "Red Hat Linux", "Red Hat FC-3", "Red Hat (FC-3)", "Red Hat (FC-4)", "Red Hat (FC-5)", "Red Hat (FC-6)", "Fedora Extras", "Red Hat (scratch)", "Red Hat (RHEL-3)", "Red Hat (RHEL-4)"): self.printErr("unknown distribution: %s" % self["distribution"]) arch = self["arch"] if self["rhnplatform"] not in (None, arch): self.printErr("unknown arch for rhnplatform") if self.strict: if os.path.basename(self.filename) != self.getFilename(): self.printErr("bad filename: %s" % self.filename) if self["platform"] not in (None, "", arch + "-redhat-linux-gnu", arch + "-redhat-linux", "--target=${target_platform}", arch + "-unknown-linux", "--target=${TARGET_PLATFORM}", "--target=$TARGET_PLATFORM"): self.printErr("unknown arch %s" % self["platform"]) if self["exclusiveos"] not in (None, ["Linux"], ["linux"]): self.printErr("unknown os %s" % self["exclusiveos"]) if self.strict: if self["buildarchs"] not in (None, ["noarch"]): self.printErr("bad buildarch: %s" % self["buildarchs"]) if self["excludearch"] != None: for i in self["excludearch"]: if not possible_archs.has_key(i): self.printErr("new possible arch %s" % i) if self["exclusivearch"] != None: for i in self["exclusivearch"]: if not possible_archs.has_key(i): self.printErr("new possible arch %s" % i) for (s, p) in (("prein", "preinprog"), ("postin", "postinprog"), ("preun", "preunprog"), ("postun", "postunprog"), ("verifyscript", "verifyscriptprog")): (script, prog) = (self[s], self[p]) if script != None and prog == None: self.printErr("no prog") if self.strict: if (not isinstance(prog, basestring) and prog != None) or \ not possible_scripts.has_key(prog): self.printErr("unknown prog: %s" % prog) if script == None and prog == "/bin/sh": self.printErr("empty script: %s" % s) if script != None and isCommentOnly(script): self.printErr("empty(2) script: %s" % s) # some verify tests are also in these functions: for (n, f, v) in (("providename", "provideflags", "provideversion"), ("requirename", "requireflags", "requireversion"), ("obsoletename", "obsoleteflags", "obsoleteversion"), ("conflictname", "conflictflags", "conflictversion"), ("triggername", "triggerflags", "triggerversion")): self.__verifyDeps(n, f, v) if not self.issrc: provs = self.__getDeps("providename", "provideflags", "provideversion") mydep = (self["name"], RPMSENSE_EQUAL, self.getEVR()) ver = self["rpmversion"] # AS2.1 still has compat rpms which need this: if ver != None and ver[:4] < "4.3." and mydep not in provs: provs.append(mydep) if mydep not in provs: self.printErr("no provides for own rpm package, rpm=%s" % ver) self.getTriggers()
427871e48b993cbe1bec0e26f0693386c8014c95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/427871e48b993cbe1bec0e26f0693386c8014c95/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2896, 8097, 12, 2890, 4672, 365, 16186, 8705, 3067, 1864, 12, 2890, 18, 16587, 18, 2816, 16, 8715, 1010, 346, 16, 315, 381, 5146, 3113, 365, 18, 16587, 892, 16, 404, 16, 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, 1001, 2896, 8097, 12, 2890, 4672, 365, 16186, 8705, 3067, 1864, 12, 2890, 18, 16587, 18, 2816, 16, 8715, 1010, 346, 16, 315, 381, 5146, 3113, 365, 18, 16587, 892, 16, 404, 16, 365, 18,...
this = apply(_quickfix.new_InterestAccrualDate, args)
this = _quickfix.new_InterestAccrualDate(*args)
def __init__(self, *args): this = apply(_quickfix.new_InterestAccrualDate, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 29281, 8973, 86, 1462, 1626, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 29281, 8973, 86, 1462, 1626, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, ...
print_warning(req, "Nested or mismatched parethneses. Continue search ignoring paretheses.")
print_warning(req, _("Nested or mismatched parentheses detected. Ignoring all parentheses in the query..."))
def search_pattern_parenthesised(req=None, p=None, f=None, m=None, ap=0, of="id", verbose=0, ln=CFG_SITE_LANG): """Search for complex pattern 'p' containing parenthesis within field 'f' according to matching type 'm'. Return hitset of recIDs. For more details on the parameters see 'search_pattern' """ # Try searching with parentheses try: parser = SearchQueryParenthesisedParser() # get a hitset with all recids result_hitset = get_collection_reclist(CFG_SITE_NAME) # parse the query. The result is list of [op1, expr1, op2, expr2, ..., opN, exprN] parsing_result = parser.parse_query(p) # go through every pattern # calculate hitset for it # combine pattern's hitset with the result using the corresponding operator for index in xrange(0, len(parsing_result)-1, 2 ): current_operator = parsing_result[index] current_pattern = parsing_result[index+1] # obtain a hitset for the current patter current_hitset = search_pattern(req, current_pattern, f, m, ap, of, verbose, ln) # combine the current hitset with resulting hitset using the current operator if current_operator == '+': result_hitset = result_hitset & current_hitset elif current_operator == '-': result_hitset = result_hitset - current_hitset elif current_operator == '|': result_hitset = result_hitset | current_hitset else: assert False, "Unknown operator in search_pattern_parenthesised()" return result_hitset # If searching with parenteses fails, perform search ignoring parentheses except InvenioWebSearchQueryParserException: print_warning(req, "Nested or mismatched parethneses. Continue search ignoring paretheses.") # remove the parentheses in the query. Current implementation removes all the parentheses, # but it could be improved to romove only these that are not insede quotes p = p.replace('(', ' ') p = p.replace(')', ' ') return search_pattern(req, p, f, m, ap, of, verbose, ln)
ff1e2379f29a74718983650ab5431a39bbbc3dad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2139/ff1e2379f29a74718983650ab5431a39bbbc3dad/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4951, 67, 13012, 7915, 5918, 12, 3658, 33, 7036, 16, 293, 33, 7036, 16, 284, 33, 7036, 16, 312, 33, 7036, 16, 513, 33, 20, 16, 434, 1546, 350, 3113, 3988, 33, 20, 16, 721...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4951, 67, 13012, 7915, 5918, 12, 3658, 33, 7036, 16, 293, 33, 7036, 16, 284, 33, 7036, 16, 312, 33, 7036, 16, 513, 33, 20, 16, 434, 1546, 350, 3113, 3988, 33, 20, 16, 721...
self.mcp._schedule_next_run(jo)
self.mcp.schedule_next_run(jo)
def call_now(time, func, next): next.start() next.runs[0].succeed()
17e2fcbf877ffacf227333eb3668168470abae66 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14977/17e2fcbf877ffacf227333eb3668168470abae66/mcp_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 3338, 12, 957, 16, 1326, 16, 1024, 4672, 1024, 18, 1937, 1435, 1024, 18, 20152, 63, 20, 8009, 87, 5286, 5288, 1435, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 3338, 12, 957, 16, 1326, 16, 1024, 4672, 1024, 18, 1937, 1435, 1024, 18, 20152, 63, 20, 8009, 87, 5286, 5288, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
elif v.lower () in ('false', 'f'):
elif v.lower() in ('false', 'f'):
def get_typed_tag_value (v): """Uses some simple rules to extract simple typed values from strings. Specifically: true and t (any case) return True (boolean) false and f (any case) return False (boolean) simple integers (possibly signed) are returned as ints simple floats (possibly signed) are returned as floats (supports '.' and ',' as floating-point separator, subject to locale) Everything else is returned as a string, with matched enclosing quotes stripped. """ if v.lower () in ('true', 't'): return True elif v.lower () in ('false', 'f'): return False elif re.match (INTEGER_RE, v): return int (v) elif re.match (DECIMAL_RE, v) or re.match (DECIMAL_RE2, v): try: r = float (v) except ValueError: return str (v) return r elif len (v) > 1 and v[0] == v[-1] and v[0] in ('"\''): return v[1:-1] else: return str (v)
e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11585, 67, 2692, 67, 1132, 261, 90, 4672, 3536, 15128, 2690, 4143, 2931, 358, 2608, 4143, 9092, 924, 628, 2064, 18, 23043, 1230, 30, 638, 471, 268, 261, 2273, 648, 13, 327, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11585, 67, 2692, 67, 1132, 261, 90, 4672, 3536, 15128, 2690, 4143, 2931, 358, 2608, 4143, 9092, 924, 628, 2064, 18, 23043, 1230, 30, 638, 471, 268, 261, 2273, 648, 13, 327, 10...
raise NoSuchNode(new_path, new_rev, 'The Target for Diff is invalid')
raise NoSuchNode(new_path, new_rev, 'The Target for Diff is invalid')
def get_changes(self, old_path, old_rev, new_path, new_rev, ignore_ancestry=0): old_node = new_node = None old_rev = self.normalize_rev(old_rev) new_rev = self.normalize_rev(new_rev) if self.has_node(old_path, old_rev): old_node = self.get_node(old_path, old_rev) else: raise NoSuchNode(old_path, old_rev, 'The Base for Diff is invalid') if self.has_node(new_path, new_rev): new_node = self.get_node(new_path, new_rev) else: raise NoSuchNode(new_path, new_rev, 'The Target for Diff is invalid') if new_node.kind != old_node.kind: raise TracError('Diff mismatch: Base is a %s (%s in revision %s) ' 'and Target is a %s (%s in revision %s).' \ % (old_node.kind, old_path, old_rev, new_node.kind, new_path, new_rev)) subpool = Pool(self.pool) if new_node.isdir: editor = DiffChangeEditor() e_ptr, e_baton = delta.make_editor(editor, subpool()) old_root = fs.revision_root(self.fs_ptr, old_rev, subpool()) new_root = fs.revision_root(self.fs_ptr, new_rev, subpool()) def authz_cb(root, path, pool): return 1 text_deltas = 0 # as this is anyway re-done in Diff.py... entry_props = 0 # "... typically used only for working copy updates" repos.svn_repos_dir_delta(old_root, _to_svn(self.scope + old_path), '', new_root, _to_svn(self.scope + new_path), e_ptr, e_baton, authz_cb, text_deltas, 1, # directory entry_props, ignore_ancestry, subpool()) for path, kind, change in editor.deltas: path = _from_svn(path) old_node = new_node = None if change != Changeset.ADD: old_node = self.get_node(posixpath.join(old_path, path), old_rev) if change != Changeset.DELETE: new_node = self.get_node(posixpath.join(new_path, path), new_rev) else: kind = _kindmap[fs.check_path(old_root, _to_svn(self.scope, old_node.path), subpool())] yield (old_node, new_node, kind, change) else: old_root = fs.revision_root(self.fs_ptr, old_rev, subpool()) new_root = fs.revision_root(self.fs_ptr, new_rev, subpool()) if fs.contents_changed(old_root, _to_svn(self.scope, old_path), new_root, _to_svn(self.scope, new_path), subpool()): yield (old_node, new_node, Node.FILE, Changeset.EDIT)
3dd37faa9ebf0aaf1d3a2ee519e52fb03d0756d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/3dd37faa9ebf0aaf1d3a2ee519e52fb03d0756d0/svn_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6329, 12, 2890, 16, 1592, 67, 803, 16, 1592, 67, 9083, 16, 394, 67, 803, 16, 394, 67, 9083, 16, 2305, 67, 6872, 698, 33, 20, 4672, 1592, 67, 2159, 273, 394, 67, 2159, 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, 336, 67, 6329, 12, 2890, 16, 1592, 67, 803, 16, 1592, 67, 9083, 16, 394, 67, 803, 16, 394, 67, 9083, 16, 2305, 67, 6872, 698, 33, 20, 4672, 1592, 67, 2159, 273, 394, 67, 2159, 273,...
def history(self, direction='descending', dre=re.compile('^\d+$')):
def history(self, direction='descending', dre=re.compile('^\d+$'), limit=None):
def history(self, direction='descending', dre=re.compile('^\d+$')): if not self.is_view_ok(): return self._('[hidden]')
e6efd941449ea57a93db7fd4968d107b6c2f3b78 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1906/e6efd941449ea57a93db7fd4968d107b6c2f3b78/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4927, 12, 2890, 16, 4068, 2218, 5569, 2846, 2187, 302, 266, 33, 266, 18, 11100, 2668, 17134, 72, 15, 9227, 3631, 1800, 33, 7036, 4672, 309, 486, 365, 18, 291, 67, 1945, 67, 601, 13332,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4927, 12, 2890, 16, 4068, 2218, 5569, 2846, 2187, 302, 266, 33, 266, 18, 11100, 2668, 17134, 72, 15, 9227, 3631, 1800, 33, 7036, 4672, 309, 486, 365, 18, 291, 67, 1945, 67, 601, 13332,...
srcdir = os.path.normpath ( os.path.join (GPS.Project.root().file().directory(), "..", "docs", "gtkada_rm"))
srcdir = os.path.normpath (GPS.Project.root().file().directory())
def on_match (self, docgen, attrs, value, entity_name, entity_href): file = docgen.get_current_file() srcdir = os.path.normpath ( os.path.join (GPS.Project.root().file().directory(), "..", "docs", "gtkada_rm")) fullfile = os.path.join (srcdir, value)
72870e5aa42e0184e76fca67775fabf10005f013 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6808/72870e5aa42e0184e76fca67775fabf10005f013/docgen_gtkada.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1916, 261, 2890, 16, 997, 4507, 16, 3422, 16, 460, 16, 1522, 67, 529, 16, 1522, 67, 7547, 4672, 585, 273, 997, 4507, 18, 588, 67, 2972, 67, 768, 1435, 1705, 1214, 273, 1140,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1916, 261, 2890, 16, 997, 4507, 16, 3422, 16, 460, 16, 1522, 67, 529, 16, 1522, 67, 7547, 4672, 585, 273, 997, 4507, 18, 588, 67, 2972, 67, 768, 1435, 1705, 1214, 273, 1140,...
def __init__(self, ssl_context=None):
def __init__(self, ssl_context=None, *args, **kw): if getattr(Transport, '__init__', None) is not None: Transport.__init__(self, *args, **kw)
def __init__(self, ssl_context=None): if ssl_context is None: self.ssl_ctx=SSL.Context('sslv23') else: self.ssl_ctx=ssl_context
43f2755b61e059b0f28e2879b24517802cbb8ffe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10522/43f2755b61e059b0f28e2879b24517802cbb8ffe/m2xmlrpclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5832, 67, 2472, 33, 7036, 16, 380, 1968, 16, 2826, 9987, 4672, 309, 3869, 12, 6568, 16, 4940, 2738, 972, 2187, 599, 13, 353, 486, 599, 30, 9514, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5832, 67, 2472, 33, 7036, 16, 380, 1968, 16, 2826, 9987, 4672, 309, 3869, 12, 6568, 16, 4940, 2738, 972, 2187, 599, 13, 353, 486, 599, 30, 9514, 16186, ...
if self.InterestDebug: print 'INTEREST DEBUG: addInterest(): handle=%s, parent=%s, zoneIds=%s, description=%s, event=%s, auto=%s' % (
if self.__verbose(): print 'CR::INTEREST.addInterest(handle=%s, parentId=%s, zoneIdList=%s, description=%s, event=%s, auto=%s)' % (
def addInterest(self, parentId, zoneIdList, description, event=None, auto=False): """ Look into a (set of) zone(s). """ assert DoInterestManager.notify.debugCall() #assert not self._noNewInterests handle = self._getNextHandle() if self._noNewInterests: DoInterestManager.notify.warning( "addInterest: addingInterests on delete: %s" % (handle)) return
0ad3bac423d39b998827d489a97d947c4e85743a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/0ad3bac423d39b998827d489a97d947c4e85743a/DoInterestManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 29281, 12, 2890, 16, 11582, 16, 4157, 22117, 16, 2477, 16, 871, 33, 7036, 16, 3656, 33, 8381, 4672, 3536, 10176, 1368, 279, 261, 542, 434, 13, 4157, 12, 87, 2934, 3536, 225, 1815,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 29281, 12, 2890, 16, 11582, 16, 4157, 22117, 16, 2477, 16, 871, 33, 7036, 16, 3656, 33, 8381, 4672, 3536, 10176, 1368, 279, 261, 542, 434, 13, 4157, 12, 87, 2934, 3536, 225, 1815,...
fslabel=data[4].split('=')[1] fsvendor=data[6].split('=')[1]
fslabel=self.get_value(data, "ID_FS_LABEL") fsvendor=self.get_value(data, "ID_VENDOR")
def get_local_mountpoint(self, line): print_debug( line ) desktop=os.path.expanduser("~/Desktop") data=line.split('#') fslabel=data[4].split('=')[1] fsvendor=data[6].split('=')[1] counter=1 if fslabel != "": print_debug ( "get_local_mountpoint() have label...." ) if not os.path.isdir(desktop + "/" + fslabel): print_debug ( "get_local_mountpoint() %s dir not exists, returning..." %(desktop + "/" + fslabel) ) return desktop + "/" + fslabel else: print_debug ( "get_local_mountpoint() %s dir exists, searching for numbered dirs..." %(desktop + "/" + fslabel) ) while True: if not os.path.isdir(desktop + "/" + fslabel + "-" + str(counter) ): print_debug ( "get_local_mountpoint() %s dir not exists, returning..." %(desktop + "/" + fslabel + "-" + str(counter)) ) return desktop + "/" + fslabel + "-" + str(counter) counter+=1 if fsvendor != "": print_debug ( "get_local_mountpoint() have vendor not label...." ) if not os.path.isdir(desktop + "/" + fsvendor): print_debug ( "get_local_mountpoint() %s dir not exists, returning..." %(desktop + "/" + fsvendor) ) return desktop + "/" + fsvendor else: print_debug ( "get_local_mountpoint() %s dir exists, searching for numbered dirs..." %(desktop + "/" + fsvendor) ) while True: if not os.path.isdir(desktop + "/" + fsvendor + "-" + str(counter) ): print_debug ( "get_local_mountpoint() %s dir not exists, returning..." %(desktop + "/" + fsvendor + "-" + str(counter)) ) return desktop + "/" + fsvendor + "-" + str(counter) counter+=1 else: mnt=_("usbdisk") print_debug ( "get_local_mountpoint() don't have label or vendor" ) if not os.path.isdir(desktop + "/" + mnt): print_debug ( "get_local_mountpoint() %s dir not exists, returning..." %(desktop + "/" + mnt) ) return desktop + "/" + mnt else: print_debug ( "get_local_mountpoint() %s dir exists, searching for numbered dirs..." %(desktop + "/" + mnt) ) while True: if not os.path.isdir(desktop + "/" + mnt + "-" + str(counter) ): print_debug ( "get_local_mountpoint() %s dir not exists, returning..." %(desktop + "/" + mnt + "-" + str(counter)) ) return desktop + "/" + mnt + "-" + str(counter) counter+=1
e062fae2efc2130227b7a2218ed381f3b24530ac /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13520/e062fae2efc2130227b7a2218ed381f3b24530ac/tcos-devices.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3729, 67, 4778, 1153, 12, 2890, 16, 980, 4672, 1172, 67, 4148, 12, 980, 262, 21304, 33, 538, 18, 803, 18, 12320, 1355, 2932, 98, 19, 27583, 7923, 501, 33, 1369, 18, 4939, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3729, 67, 4778, 1153, 12, 2890, 16, 980, 4672, 1172, 67, 4148, 12, 980, 262, 21304, 33, 538, 18, 803, 18, 12320, 1355, 2932, 98, 19, 27583, 7923, 501, 33, 1369, 18, 4939, 26...
class ILinkSet(Interface): """A set of links. Raises ValueError on an attempt to add duplicate members. Links with the same reltype, role and target are considered to be equal, for purposes of set membership. So, a link is a duplicate member if it has the same reltype, role and target as an existing member. """ def add(link): """Add a link to the set. If an equivalent link (with the same reltype, role and target) already exists in the set, raises a ValueError. If an equivalent placeholder is in the set, replace the placeholder with the link, and call IPlaceholder.replacedBy(link). """ def addPlaceholder(for_link, placeholder): """Add a placeholder to the set to fill the place of the given link. """ def iterPlaceholders(): """Return an iterator over the placeholders in the set.""" def remove(link_or_placeholder): """Remove a link or a placeholder from the set. If the given object is not in the set, raises a ValueError. The error is raised even if there is an equivalent link in the set. """ def __iter__(): """Return an iterator over the links in the set.""" def getLink(name): """Returns a link by a name""" class IRelatable(Interface): """An object which can take part in relationships.""" __links__ = Set( title=u"A set of link sets.", value_type=Object(title=u"A link set", schema=ILinkSet)) def getLink(name): """Return a link by a name within this relatable."""
def replacedBy(link): """The placeholder was replaced in the link set by the given link."""
915f7ac30714b8ae022b61aa0d4f518ca4012a2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/915f7ac30714b8ae022b61aa0d4f518ca4012a2a/interfaces.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8089, 858, 12, 1232, 4672, 3536, 1986, 6695, 1703, 8089, 316, 326, 1692, 444, 635, 326, 864, 1692, 12123, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 8089, 858, 12, 1232, 4672, 3536, 1986, 6695, 1703, 8089, 316, 326, 1692, 444, 635, 326, 864, 1692, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
f.write(data[0]) f.write(data[1]) f.close() f = self.opener(self.indexfile, "a") else: f = self.opener(self.indexfile, "a+") f.seek(0, 2) transaction.add(self.indexfile, f.tell(), self.count() - 1)
dfh.write(data[0]) dfh.write(data[1]) dfh.flush() else: ifh.seek(0, 2) transaction.add(self.indexfile, ifh.tell(), self.count() - 1)
def addrevision(self, text, transaction, link, p1=None, p2=None, d=None): """add a revision to the log
7331974d3fca91704af17f0e8306f87bbf410fe8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/7331974d3fca91704af17f0e8306f87bbf410fe8/revlog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 13057, 12, 2890, 16, 977, 16, 2492, 16, 1692, 16, 293, 21, 33, 7036, 16, 293, 22, 33, 7036, 16, 302, 33, 7036, 4672, 3536, 1289, 279, 6350, 358, 326, 613, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 13057, 12, 2890, 16, 977, 16, 2492, 16, 1692, 16, 293, 21, 33, 7036, 16, 293, 22, 33, 7036, 16, 302, 33, 7036, 4672, 3536, 1289, 279, 6350, 358, 326, 613, 2, -100, -100, -100, ...
d[label] = [flavor] else:
for affIdx, flavorList in enumerate(flavorItems[label]): if len(affQueries) <= affIdx: queryList = [] affQueries.append(queryList) else: queryList = affQueries[affIdx] for idx, flavor in enumerate(flavorList): if len(queryList) <= idx: d = {} queryList.append(d) else: d = queryList[idx] d[label] = [flavor] self.query[name] = affQueries.pop(0) if affQueries: self.affQueries[name] = affQueries else: for flavor in flavorItems: d = {} self.query[name].append(d) for label in labelPath: d[label] = [flavor] else: flavorList = flavorItems
def addQuery(self, troveTup, labelPath, flavorList): name = troveTup[0] self.map[name] = [troveTup, labelPath] self.exactFlavorMap[name] = flavorList
a7b181180c87f3f2da48cfc25d9da64b76052710 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/a7b181180c87f3f2da48cfc25d9da64b76052710/findtrove.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24087, 12, 2890, 16, 23432, 537, 56, 416, 16, 1433, 743, 16, 19496, 682, 4672, 508, 273, 23432, 537, 56, 416, 63, 20, 65, 365, 18, 1458, 63, 529, 65, 273, 306, 88, 303, 537, 56, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24087, 12, 2890, 16, 23432, 537, 56, 416, 16, 1433, 743, 16, 19496, 682, 4672, 508, 273, 23432, 537, 56, 416, 63, 20, 65, 365, 18, 1458, 63, 529, 65, 273, 306, 88, 303, 537, 56, 41...
self.disableHandles(['z-post','z-ring','z-disc'])
self.disableHandles(['z-post','z-ring','z-disc','z-scale'])
def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-post','z-ring','z-disc']) elif handles == 'post': self.disableHandles(['x-post','y-post','z-post']) elif handles == 'ring': self.disableHandles(['x-ring','y-ring','z-ring']) elif handles == 'disc': self.disableHandles(['x-disc','y-disc','z-disc']) elif handles == 'all': self.disableHandles(['x-post','x-ring','x-disc', 'y-post','y-ring','y-disc', 'z-post','z-ring','z-disc'])
b66a795efbe737fd1c72c92a17e4de984a14e0f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8543/b66a795efbe737fd1c72c92a17e4de984a14e0f7/DirectManipulation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4056, 8788, 12, 2890, 16, 7372, 4672, 309, 618, 12, 24111, 13, 422, 1953, 18, 19366, 30, 364, 1640, 316, 7372, 30, 365, 18, 8394, 3259, 12, 4110, 13, 1327, 7372, 422, 296, 92, 4278, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4056, 8788, 12, 2890, 16, 7372, 4672, 309, 618, 12, 24111, 13, 422, 1953, 18, 19366, 30, 364, 1640, 316, 7372, 30, 365, 18, 8394, 3259, 12, 4110, 13, 1327, 7372, 422, 296, 92, 4278, ...
changelog = open("./../../../CHANGELOG", 'r')
def __init__(self): BaseParentWindow.__init__(self, "About Window")
2adf0e0fea0794d2c0e1c7330ea4a817621e6efa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/2adf0e0fea0794d2c0e1c7330ea4a817621e6efa/about.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3360, 3054, 3829, 16186, 2738, 972, 12, 2890, 16, 315, 24813, 6076, 7923, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3360, 3054, 3829, 16186, 2738, 972, 12, 2890, 16, 315, 24813, 6076, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.inLearner = learner
self.in_learner = learner
def setLearner(self, learner): self.inLearner = learner
cd667906d81f50c59a31a1d4e98077bb9b404cc7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/cd667906d81f50c59a31a1d4e98077bb9b404cc7/OWPythonScript.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 1682, 24834, 12, 2890, 16, 884, 24834, 4672, 365, 18, 267, 67, 298, 24834, 273, 884, 24834, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 1682, 24834, 12, 2890, 16, 884, 24834, 4672, 365, 18, 267, 67, 298, 24834, 273, 884, 24834, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if cp.has_option('followup-triggers','hipe-output-cache'): cacheString = string.strip(cp.get('followup-triggers','hipe-output-cache')) else: cacheString = '' if cp.has_option('followup-triggers','triggers-tag'): self.triggerTag = string.strip(cp.get('followup-triggers','triggers-tag')) else: self.triggerTag = '' if cacheString: self.cache = Cache.fromfile(open(cacheString))
def __init__(self, options,cp, currentPath): UserDict.__init__(self) self.dir = os.listdir(os.getcwd()) self.options = options self.types = ['TMPLTBANK', 'TRIGBANK', 'INSPIRAL_FIRST', \ 'INSPIRAL_SECOND', 'THINCA_FIRST', 'THINCA_SECOND'] self.iniNames = ['tmpltbank-path', 'trigbank-path', 'first-inspiral-path', \ 'second-inspiral-path', 'first-coinc-path', 'second-coinc-path'] self.iniNameMaps = map(None, self.iniNames, self.types) self.oNames = ['bank.cache', 'trigbank.cache', 'first_inspiral.cache', \ 'second_inspiral.cache', 'first_thinca.cache', 'second_thinca.cache'] self.nameMaps = map(None, self.oNames, self.types) self.ifoTypes = ['H1','H2','L1','V1','H1H2','H1L1','H2L1','H1V1', \ 'H2V1','L1V1','H1H2L1','H1H2V1','H1L1V1', \ 'H2L1V1','H1H2L1V1']
c7b7ecdeb6da0bf763f6689f64a704da6b52d0f3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/c7b7ecdeb6da0bf763f6689f64a704da6b52d0f3/fu_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 16, 4057, 16, 18027, 4672, 2177, 5014, 16186, 2738, 972, 12, 2890, 13, 365, 18, 1214, 273, 1140, 18, 1098, 1214, 12, 538, 18, 588, 11089, 10756, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 16, 4057, 16, 18027, 4672, 2177, 5014, 16186, 2738, 972, 12, 2890, 13, 365, 18, 1214, 273, 1140, 18, 1098, 1214, 12, 538, 18, 588, 11089, 10756, 365...
result.append(value[0]) result.append(value[1]) tuple(result)
result.append((value[0],value[1]))
def result_insert(result,descr,value,map_so,axis="y",pap=0,xvals=None): """ This function takes value and puts it into the result in an appropriate fashion. The description is used for decision making. Parameters: ---------- -> result is a SOM, SO, list or tuple -> descr is the object descriptor -> value is a tuple containing information to be place in result directly or an object that will be placed into result -> map_so is a SO that has information that will be mapped to a SO if result is either a SOM or a SO -> axis (OPTIONAL) is the axis to grab the value from -> pap (OPTIONAL) is the primary axis position. This is used to pull the value from the correct primary axis position. -> xvals (OPTIONAL) is a list of x-axes that are not provided by either value or map_so Returns: ------- <- A SOM, SO, list or tuple with the provided information inserted """ if descr == None: result_type = get_type(result) else: result_type = descr if (result_type == SOM_type): if map_so != None: so = SOM.SO(map_so.dim()) if axis.lower() == "y": result_insert(so,None,value,map_so,axis,pap,xvals) result.append(so) elif axis.lower() == "x": result_insert(so,None,value,map_so,axis,pap,xvals) result.append(so) elif axis.lower() == "all": if map_so != None: result_insert(so,None,value,map_so,axis,pap,xvals) result.append(so) else: result.append(value) elif (result_type == SO_type): if axis.lower() == "y": result.y = value[0] result.var_y = value[1] result.id = map_so.id result.axis = map_so.axis elif axis.lower() == "x": result.id = map_so.id result.y = map_so.y result.var_y = map_so.var_y for i in range(map_so.dim()): if i == pap: result.axis[pap].val = value[0] if map_so.axis[pap].var != None: result.axis[pap].var = value[1] else: result.axis[i].val = map_so.axis[i].val if map_so.axis[i].var != None: result.axis[i].var = map_so.axis[i].var elif axis.lower() == "all": if map_so != None: result.id = map_so.id result.y = value[0] result.var_y = value[1] for i in range(len(xvals)): if i % 2 == 0: result.axis[i].val = xvals[i] elif i % 2 != 0: if map_so.axis[i-1].var == None: result.axis[i].val = xvals[i] else: result.axis[i-1].var = xvals[i] else: result.id = value.id result.y = value.y result.var_y = value.var_y result.axis = value.axis elif (result_type == num_type or result_type == list_type): if axis.lower() == "all": result.append(tuple(value)) else: result.append(value[0]) result.append(value[1]) tuple(result) else: raise TypeError, "Object type not recognized by result_insert"\ +" function."
5d0216e70017301affdcf752a30a885d7fc5240e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/5d0216e70017301affdcf752a30a885d7fc5240e/hlr_data_helper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 563, 67, 6387, 12, 2088, 16, 28313, 16, 1132, 16, 1458, 67, 2048, 16, 4890, 1546, 93, 3113, 84, 438, 33, 20, 16, 92, 4524, 33, 7036, 4672, 3536, 1220, 445, 5530, 460, 471, 8200, 518,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 563, 67, 6387, 12, 2088, 16, 28313, 16, 1132, 16, 1458, 67, 2048, 16, 4890, 1546, 93, 3113, 84, 438, 33, 20, 16, 92, 4524, 33, 7036, 4672, 3536, 1220, 445, 5530, 460, 471, 8200, 518,...
A->A B->G C->F D->G E->G F->F G->G H->G I->K J->G K->K L->A M->G
A->A B->G C->F D->G E->G F->F G->G H->G I->K J->G K->K L->A M->G
... def __str__(self):
944a38a57407e7641b7c63f5341e83cbe0da7480 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/944a38a57407e7641b7c63f5341e83cbe0da7480/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 701, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1372, 377, 1652, 1001, 701, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aa_rows[row['aa']] = row
aa_rows[row[aa_field]] = row
def _execute(self): """ Private method for executing query, always runs query and then updates cache """ annotations = {} aa_rows = {} # main aggregate functions for field in self.angles: annotations['min_%s' % field] = Min(field) annotations['max_%s' % field] = Max(field) annotations['avg_%s' % field] = DirectionalAvg(field) for field in self.fields: annotations['min_%s' % field] = Min(field) annotations['max_%s' % field] = Max(field) annotations['avg_%s' % field] = Avg(field) annotations['stddev_%s' % field] = StdDev(field) # query with all aggregate values that can be calculated in a standard # query. save query in a list so that its members can be modified query = self.queryset query = query.values('aa') query = query.annotate(**annotations) results = list(query) # construction 2nd query for DirectionStdDev calculations for each # dihedral angle. only needed if there is at least one dihedral angle if self.angles: annotations = {} for row in results: aa_rows[row['aa']] = row for field in self.angles: avg=row['avg_%s' % field] if avg: annotations['stddev_%s' % field] = DirectionalStdDev(field, avg=avg) else: outer_row['stddev_%s' % field] = None if annotations: query = self.queryset query = query.values('aa') query = query.annotate(**annotations) # update the original results with the results of the 2nd query for row in query: outer_row = aa_rows[row['aa']] for field in self.angles: outer_row.update(row) self.results = results return results
74f9b2a1bd92e5595f4550b8f493b12de94b2b27 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6163/74f9b2a1bd92e5595f4550b8f493b12de94b2b27/directional_stddev.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 12, 2890, 4672, 3536, 8726, 707, 364, 11274, 843, 16, 3712, 7597, 843, 471, 1508, 4533, 1247, 3536, 5617, 273, 2618, 12391, 67, 3870, 273, 2618, 225, 468, 2774, 7047, 4186, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 12, 2890, 4672, 3536, 8726, 707, 364, 11274, 843, 16, 3712, 7597, 843, 471, 1508, 4533, 1247, 3536, 5617, 273, 2618, 12391, 67, 3870, 273, 2618, 225, 468, 2774, 7047, 4186, 36...
return "Plain%s%s" % (read, needsReply)
return "Plain%s%s%s" % (draft, read, needsReply)
def getCommStateName(commState): """ Return the actual name for this state """ read = (commState & CommunicationStatus.READ) and "Read" or "Unread" needsReply = (commState & CommunicationStatus.NEEDS_REPLY) and "NeedsReply" or "" # These don't depend on in vs out, so check them first. if commState & CommunicationStatus.ERROR: return "Error%s%s" % (read, needsReply) if commState & CommunicationStatus.QUEUED: return "Queued%s%s" % (read, needsReply) # Note In vs Out (Out wins if both) vs Plain (if neither, we're done). if commState & CommunicationStatus.OUT: inOut = "Out" # # and keep going... elif commState & CommunicationStatus.IN: inOut = "In" # and keep going... else: return "Plain%s%s" % (read, needsReply) # We're Out or In -- do Updating and Draft. updating = (commState & CommunicationStatus.UPDATE) and "date" or "" draft = (commState & CommunicationStatus.DRAFT) and "Draft" or "" return "%s%s%s%s%s" % (inOut, updating, draft, read, needsReply)
e885fccf4c01b0b01ccc580491779502d9e1fafd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/e885fccf4c01b0b01ccc580491779502d9e1fafd/summaryblocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12136, 1119, 461, 12, 5702, 1119, 4672, 3536, 2000, 326, 3214, 508, 364, 333, 919, 3536, 225, 855, 273, 261, 5702, 1119, 473, 31598, 1482, 18, 6949, 13, 471, 315, 1994, 6, 578, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12136, 1119, 461, 12, 5702, 1119, 4672, 3536, 2000, 326, 3214, 508, 364, 333, 919, 3536, 225, 855, 273, 261, 5702, 1119, 473, 31598, 1482, 18, 6949, 13, 471, 315, 1994, 6, 578, 31...
@bigmemtest(minsize=_2G // 3 + 2, memuse=8 + 3)
@bigmemtest(minsize=_2G // 3 + 2, memuse=8 + 3 * character_size)
def basic_test_repr(self, size): l = [0] * size s = repr(l) # The repr of a list of 0's is exactly three times the list length. self.assertEquals(len(s), size * 3) self.assertEquals(s[:5], '[0, 0') self.assertEquals(s[-5:], '0, 0]') self.assertEquals(s.count('0'), size)
f34c9b95c8f8623e46987da3a8f3e25145d03836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/f34c9b95c8f8623e46987da3a8f3e25145d03836/test_bigmem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5337, 67, 3813, 67, 12715, 12, 2890, 16, 963, 4672, 328, 273, 306, 20, 65, 380, 963, 272, 273, 8480, 12, 80, 13, 468, 1021, 8480, 434, 279, 666, 434, 374, 1807, 353, 8950, 8925, 4124...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5337, 67, 3813, 67, 12715, 12, 2890, 16, 963, 4672, 328, 273, 306, 20, 65, 380, 963, 272, 273, 8480, 12, 80, 13, 468, 1021, 8480, 434, 279, 666, 434, 374, 1807, 353, 8950, 8925, 4124...
cmd_opts[command] = ("command line", value)
cmd_opts[name] = ("command line", value)
def _parse_command_opts (self, parser, args):
83524a79f442571b7411524d49f6f5fa8e189c0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83524a79f442571b7411524d49f6f5fa8e189c0d/dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 3076, 67, 4952, 261, 2890, 16, 2082, 16, 833, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 3076, 67, 4952, 261, 2890, 16, 2082, 16, 833, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
f = open(os.path.expanduser('~/.bpython.ini'))
f = open(os.path.expanduser('~/.bpython.ini'), 'w')
def migrate_rc(path): """Use the shlex module to convert the old configuration file to the new format""" import shlex f = open(path) parser = shlex.shlex(f) bools = { 'true': True, 'yes': True, 'on': True, 'false': False, 'no': False, 'off': False } config = ConfigParser() config.add_section('general') while True: k = parser.get_token() v = None if not k: break k = k.lower() if parser.get_token() == '=': v = parser.get_token() or None if v is not None: try: v = int(v) except ValueError: if v.lower() in bools: v = bools[v.lower()] config.set('general', k, v) f.close() f = open(os.path.expanduser('~/.bpython.ini')) config.write(f) f.close()
bbf1cab3a0dd93834f1159784740570cbc010c93 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6932/bbf1cab3a0dd93834f1159784740570cbc010c93/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13187, 67, 1310, 12, 803, 4672, 3536, 3727, 326, 27180, 1605, 358, 1765, 326, 1592, 1664, 585, 358, 326, 394, 740, 8395, 1930, 27180, 284, 273, 1696, 12, 803, 13, 2082, 273, 27180, 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, 13187, 67, 1310, 12, 803, 4672, 3536, 3727, 326, 27180, 1605, 358, 1765, 326, 1592, 1664, 585, 358, 326, 394, 740, 8395, 1930, 27180, 284, 273, 1696, 12, 803, 13, 2082, 273, 27180, 18, ...
BaseRef = None def __init__(self, other=None, indirection=None):
def __init__(self, indirection, other=None):
def __repr__(self): return self.getString()
88950518abcce43f6828c7e417218c4bdb6988d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/88950518abcce43f6828c7e417218c4bdb6988d8/ContainerLeakDetector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 365, 18, 588, 780, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1001, 12715, 972, 12, 2890, 4672, 327, 365, 18, 588, 780, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
descent. Default strongloy recommended.
descent. *Default strongly recommended.*
def two_descent(self, verbose = True, selmer_only = False, first_limit = 20, second_limit = 8, n_aux = -1, second_descent = True): """ Compute 2-descent data for this curve.
9932a677a12413086a59217c4c0d425b0543b6eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/9932a677a12413086a59217c4c0d425b0543b6eb/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2795, 67, 5569, 319, 12, 2890, 16, 3988, 273, 1053, 16, 357, 6592, 67, 3700, 273, 1083, 16, 1122, 67, 3595, 273, 4200, 16, 2205, 67, 3595, 273, 1725, 16, 290, 67, 18196, 273, 300, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2795, 67, 5569, 319, 12, 2890, 16, 3988, 273, 1053, 16, 357, 6592, 67, 3700, 273, 1083, 16, 1122, 67, 3595, 273, 4200, 16, 2205, 67, 3595, 273, 1725, 16, 290, 67, 18196, 273, 300, 21...
navtrail_previous_links = bibformatadminlib.getnavtrail(''' &gt; <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/kb_manage?ln=%s">%s</a>''' % (config.weburl, ln, _("Manage Knowledge Bases")))
navtrail_previous_links = bibformatadminlib.getnavtrail(''' &gt; <a class="navtrail" href="%s/admin/bibformat/bibformatadmin.py/kb_manage?ln=%s">%s</a>''' % (config.weburl, ln, _("Manage Knowledge Bases")))
def kb_show_dependencies(req, kb, ln=config.cdslang, sortby="to"): """ Shows the dependencies of a given kb @param ln language @param kb the kb id to show @param sortby the sorting criteria ('from' or 'to') """ ln = wash_language(ln) _ = gettext_set_language(ln) navtrail_previous_links = bibformatadminlib.getnavtrail(''' &gt; <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/kb_manage?ln=%s">%s</a>''' % (config.weburl, ln, _("Manage Knowledge Bases"))) try: uid = getUid(req) except MySQLdb.Error, e: return error_page(req) (auth_code, auth_msg) = check_user(req, 'cfgbibformat') if not auth_code: kb_id = wash_url_argument(kb, 'int') kb_name = bibformatadminlib.get_kb_name(kb_id) if kb_name is None: return page(title=_("Unknown Knowledge Base"), body = "", language=ln, navtrail = navtrail_previous_links, errors = [("ERR_BIBFORMAT_KB_ID_UNKNOWN", kb)], lastupdated=__lastupdated__, req=req) return page(title=_("Knowledge Base %s Dependencies" % kb_name), body=bibformatadminlib.perform_request_knowledge_base_show_dependencies(ln=ln, kb_id=kb_id, sortby=sortby), uid=uid, language=ln, navtrail = navtrail_previous_links, lastupdated=__lastupdated__, req=req) else: return page_not_authorized(req=req, text=auth_msg, navtrail=navtrail_previous_links)
f08fe81d00d74f462e6a931c4d621a61c821b5b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/f08fe81d00d74f462e6a931c4d621a61c821b5b1/bibformatadmin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9182, 67, 4500, 67, 11037, 12, 3658, 16, 9182, 16, 7211, 33, 1425, 18, 4315, 2069, 539, 16, 1524, 1637, 1546, 869, 6, 4672, 3536, 9674, 87, 326, 5030, 434, 279, 864, 9182, 225, 632, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9182, 67, 4500, 67, 11037, 12, 3658, 16, 9182, 16, 7211, 33, 1425, 18, 4315, 2069, 539, 16, 1524, 1637, 1546, 869, 6, 4672, 3536, 9674, 87, 326, 5030, 434, 279, 864, 9182, 225, 632, ...
self.client.login(username=self.username, password=self.password)
self.client.login(username=self.user, password=self.passwords[self.user])
def setUp(self): """ The set up here makes the test use the repository and backup directory specified in the module. Once I find out how to switch databases on the fly to pull it out from the main database instead of the one that's created temporarily for tests, you won't have to specify my_repo_dir and my_backup_dir in the module. This set up also checks if anonymous is set to True or False and logs the user in accordingly """ repo_dir_setting = Setting.objects.get(attribute_name=u'repository_directory') repo_backup_setting = Setting.objects.get(attribute_name=u'backups_directory') repo_dir_setting.value = my_repo_dir repo_backup_setting.value = my_backup_dir repo_dir_setting.save() repo_backup_setting.save() if not self.anonymous: self.client.login(username=self.username, password=self.password)
8ca24efef675a4beadfcdf43741de08c4d4cba3f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14843/8ca24efef675a4beadfcdf43741de08c4d4cba3f/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3536, 1021, 444, 731, 2674, 7297, 326, 1842, 999, 326, 3352, 471, 5114, 1867, 1269, 316, 326, 1605, 18, 12419, 467, 1104, 596, 3661, 358, 1620, 16358, 603, 326, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3536, 1021, 444, 731, 2674, 7297, 326, 1842, 999, 326, 3352, 471, 5114, 1867, 1269, 316, 326, 1605, 18, 12419, 467, 1104, 596, 3661, 358, 1620, 16358, 603, 326, 21...
def f_iter(tokens, s):
def _many(tokens, s):
def f_iter(tokens, s): 'Iterative implementation preventing the stack overflow.' res = [] try: while True: (v, s) = p.run(tokens, s) res.append(v) except NoParseError, e: return (res, e.state)
a98e7a502632761f6288209a1068fea4b06004b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11574/a98e7a502632761f6288209a1068fea4b06004b2/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9353, 12, 7860, 16, 272, 4672, 296, 2360, 1535, 4471, 5309, 310, 326, 2110, 9391, 1093, 400, 273, 5378, 775, 30, 1323, 1053, 30, 261, 90, 16, 272, 13, 273, 293, 18, 2681, 12, 78...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9353, 12, 7860, 16, 272, 4672, 296, 2360, 1535, 4471, 5309, 310, 326, 2110, 9391, 1093, 400, 273, 5378, 775, 30, 1323, 1053, 30, 261, 90, 16, 272, 13, 273, 293, 18, 2681, 12, 78...
if int(val) <= 1:
if val <= 1:
def _psr_start(self, name, attrs):
06d3f3314467b15776b824d03beb76fe28b69f46 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/06d3f3314467b15776b824d03beb76fe28b69f46/form.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1121, 86, 67, 1937, 12, 2890, 16, 508, 16, 3422, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1121, 86, 67, 1937, 12, 2890, 16, 508, 16, 3422, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
s = SeqDict() s[10] = 'ten' s[20] = 'twenty' s[30] = 'thirty' del s[20] verify(s[10] == 'ten') verify(s.keys() == [10, 30]) verify(s.has_key(10)) verify(not s.has_key(20)) verify(10 in s) verify(20 not in s) verify([k for k in s] == [10, 30]) verify(len(s) == 2) verify(list(s.iteritems()) == [(10,'ten'), (30, 'thirty')]) verify(list(s.iterkeys()) == [10, 30]) verify(list(s.itervalues()) == ['ten', 'thirty']) verify(s.values() == ['ten', 'thirty']) verify(s.items() == [(10,'ten'), (30, 'thirty')]) verify(s.get(10) == 'ten') verify(s.get(15,'fifteen') == 'fifteen') verify(s.get(15) == None) verify(s.setdefault(40, 'forty') == 'forty') verify(s.setdefault(10, 'null') == 'ten') del s[40] verify(s.pop(10) == 'ten') verify(10 not in s) s[10] = 'ten' k, v = s.popitem() verify(k not in s) s[k] = v s.clear() verify(len(s) == 0) try: s.popitem() except KeyError: pass else: verify(0, "popitem from an empty list should raise KeyError") s.update({10: 'ten', 20:'twenty'}) verify(s[10]=='ten' and s[20]=='twenty') verify(s == {10: 'ten', 20:'twenty'}) t = SeqDict() t[20] = 'twenty' t[10] = 'ten' verify(s == t)
class UserDictMixinTest(unittest.TestCase): def test_all(self): s = SeqDict() s[10] = 'ten' s[20] = 'twenty' s[30] = 'thirty' del s[20] self.assertEqual(s[10], 'ten') self.assertEqual(s.keys(), [10, 30]) self.assert_(s.has_key(10)) self.assert_(not s.has_key(20)) self.assert_(10 in s) self.assert_(20 not in s) self.assertEqual([k for k in s], [10, 30]) self.assertEqual(len(s), 2) self.assertEqual(list(s.iteritems()), [(10,'ten'), (30, 'thirty')]) self.assertEqual(list(s.iterkeys()), [10, 30]) self.assertEqual(list(s.itervalues()), ['ten', 'thirty']) self.assertEqual(s.values(), ['ten', 'thirty']) self.assertEqual(s.items(), [(10,'ten'), (30, 'thirty')]) self.assertEqual(s.get(10), 'ten') self.assertEqual(s.get(15,'fifteen'), 'fifteen') self.assertEqual(s.get(15), None) self.assertEqual(s.setdefault(40, 'forty'), 'forty') self.assertEqual(s.setdefault(10, 'null'), 'ten') del s[40] self.assertEqual(s.pop(10), 'ten') self.assert_(10 not in s) s[10] = 'ten' k, v = s.popitem() self.assert_(k not in s) s[k] = v s.clear() self.assertEqual(len(s), 0) self.assertRaises(KeyError, s.popitem) s.update({10: 'ten', 20:'twenty'}) self.assertEqual(s[10], 'ten') self.assertEqual(s[20], 'twenty') self.assertEqual(s, {10: 'ten', 20:'twenty'}) t = SeqDict() t[20] = 'twenty' t[10] = 'ten' self.assertEqual(s, t) def test_main(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(UserDictTest)) suite.addTest(unittest.makeSuite(UserDictMixinTest)) test.test_support.run_suite(suite) if __name__ == "__main__": test_main()
def keys(self): return list(self.keylist)
e28be5968683241e4a785108a0023fc49ecbb03a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e28be5968683241e4a785108a0023fc49ecbb03a/test_userdict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1311, 12, 2890, 4672, 327, 666, 12, 2890, 18, 856, 1098, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1311, 12, 2890, 4672, 327, 666, 12, 2890, 18, 856, 1098, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
iVBORwoaCgAAAA1JSERSAAAARgAAAAsIAgAAAE2KbGEAAAABc1JHQgCuzhzpAAAABGdBTUEAALGP\nC /xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABOElEQVRI\nS92 UPQ6DMAyF29tyCI7ACbgAOzsza1dGRjZuQD/1SZblJFDaSlXrARnHdt6Lf67btl3+TIwSStBl\n8SLuh 24KqaoK52VZ0Od5Rh/HEX1dV3RO0/w7N2ZhZDNEfAY6732GUtd1RqPve/S2bUkLMXROv0BJ\nmAyKL45 nbm4B5TRNuDVNQ2Bd11YZLOicYk9jlRl/xN9ItVV2vY6a5aBKfqDsMhIhhixtPGG6PSR9\ne/mr08RE2 QQoG6tTGlVwzVnh2NXDT1EKKTzDlElqyQ6YiiM0Ikbv8Q0VKNW/ZH+LUqjsDrcspWEY\nFKIpEkOE5gn +2Tf6MCU9J6P8TuNZk2jXaTEgfpBC04YK2K/wEKgRfaXx/OxqxM+uBx9C1/HrB0mn\npfVg3WHoz62H0 ur4UXtxFf4oH2DfAZ+NlVJRKlJLAAAAAElFTkSuQmCC </content>
iVBORw0KGgoAAAANSUhEUgAAAEYAAAALCAIAAABNimxhAAAAAXNSR0IArs4c6QAAAARnQU1BAACx jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAThJREFU SEvdlD0OgzAMhdvbcgiOwAm4ADs7M2tXRkY2bkA/9UmW5SRQ2kpV6wEZx3bei3+u27Zd/kyMEkrQ ZfEi7oduCqmqCudlWdDneUYfxxF9XVd0TtP8OzdmYWQzRHwGOu99hlLXdUaj73v0tm1JCzF0Tr9A SZgMii+OZ25uAeU0Tbg1TUNgXddWGSzonGJPY5UZf8TfSLVVdr2OmuWgSn6g7DISIYYsbTxhuj0k fXv5q9PERNkEKBurUxpVcM1Z4djVw09RCik8w5RJaskOmIojNCJG7/ENFSjVv2R/i1Ko7A63LKVh GBSiKRJDhOYJ/tk3+jAlPSej/E7jWZNo12kxIH6QQtOGCtiv8BCoEX2l8fzsasTPrgcfQtfx6wdJ p6X1YN1h6M+th9Lq+FF7cRX+KB9g3wGfjZVSUSpSSwAAAABJRU5ErkJggg== </content>
def run(self): methods = [ method for method in dir(self) if callable(getattr(self, method)) and method.startswith("test")] for method in methods: print ".", sys.stdout.flush() test_member_function = getattr(self, method) try: self.description = str(test_member_function.__doc__) self.context = method test_member_function() except Exception, e: self.report(InternalErrorEncountered(str(e)))
18efe4af4d181273dd00ce311d4181c733cc29e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5012/18efe4af4d181273dd00ce311d4181c733cc29e1/appclienttest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 2590, 273, 306, 707, 364, 707, 316, 1577, 12, 2890, 13, 309, 4140, 12, 588, 1747, 12, 2890, 16, 707, 3719, 471, 707, 18, 17514, 1918, 2932, 3813, 7923, 65, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 2590, 273, 306, 707, 364, 707, 316, 1577, 12, 2890, 13, 309, 4140, 12, 588, 1747, 12, 2890, 16, 707, 3719, 471, 707, 18, 17514, 1918, 2932, 3813, 7923, 65, 364, ...
if True or item not in (x.name for x in load): load.append(dep)
load.append(dep)
def buildShallowDeps():
555ffb8bf8e09ae5e2daa910173022d519bc6381 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/555ffb8bf8e09ae5e2daa910173022d519bc6381/Class.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1555, 5965, 14430, 13332, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1555, 5965, 14430, 13332, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
rois = self.parse_roi()
rois = self.parse_roi(columns)
def parse_and_populate(self): """ Calls parse and populate, updating the OmeroTables instance backing our results and the OMERO database itself. """ columns = self.parse() rois = self.parse_roi() if columns is not None: self.populate(columns, rois)
2349d3dce3df3d5c74a92d50939c7530f02f708b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/2349d3dce3df3d5c74a92d50939c7530f02f708b/populate_roi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 464, 67, 19936, 12, 2890, 4672, 3536, 23665, 1109, 471, 6490, 16, 9702, 326, 25645, 2439, 6905, 791, 15394, 3134, 1686, 471, 326, 28839, 13309, 2063, 6174, 18, 3536, 2168, 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, 1109, 67, 464, 67, 19936, 12, 2890, 4672, 3536, 23665, 1109, 471, 6490, 16, 9702, 326, 25645, 2439, 6905, 791, 15394, 3134, 1686, 471, 326, 28839, 13309, 2063, 6174, 18, 3536, 2168, 273, ...
justSet=False prev = None ref = eServiceReference('%s FROM SATELLITES ORDER BY satellitePosition'%(self.service_types)) if self.isBasePathEqual(ref): if self.isPrevPathEqual(ref): justSet=True prev = self.pathUp(justSet) else: justSet=True self.clearPath() self.enterPath(ref, True) if justSet: serviceHandler = eServiceCenter.getInstance() servicelist = serviceHandler.list(ref) if not servicelist is None: while True: service = servicelist.getNext() if not service.valid(): break orbpos = service.getData(4) >> 16 if service.getPath().find("FROM PROVIDER") != -1: service_name = _("Providers") else: service_name = _("Services") try: service_name += str(' - %s'%(nimmanager.getSatDescription(orbpos))) service.setName(service_name) except: if orbpos > 1800: service.setName("%s (%3.1f" + _("W") + ")" %(str, (0 - (orbpos - 3600)) / 10.0))
refstr = '%s FROM SATELLITES ORDER BY satellitePosition'%(self.service_types) if not self.preEnterPath(refstr): ref = eServiceReference(refstr) justSet=False prev = None if self.isBasePathEqual(ref): if self.isPrevPathEqual(ref): justSet=True prev = self.pathUp(justSet) else: currentRoot = self.getRoot() if currentRoot is None or currentRoot != ref: justSet=True self.clearPath() self.enterPath(ref, True) if justSet: serviceHandler = eServiceCenter.getInstance() servicelist = serviceHandler.list(ref) if not servicelist is None: while True: service = servicelist.getNext() if not service.valid(): break orbpos = service.getData(4) >> 16 if service.getPath().find("FROM PROVIDER") != -1: service_name = _("Providers")
def showSatellites(self): justSet=False prev = None ref = eServiceReference('%s FROM SATELLITES ORDER BY satellitePosition'%(self.service_types)) if self.isBasePathEqual(ref): if self.isPrevPathEqual(ref): justSet=True prev = self.pathUp(justSet) else: justSet=True self.clearPath() self.enterPath(ref, True) if justSet: serviceHandler = eServiceCenter.getInstance() servicelist = serviceHandler.list(ref) if not servicelist is None: while True: service = servicelist.getNext() if not service.valid(): #check if end of list break orbpos = service.getData(4) >> 16 if service.getPath().find("FROM PROVIDER") != -1: service_name = _("Providers") else: service_name = _("Services") try: service_name += str(' - %s'%(nimmanager.getSatDescription(orbpos))) service.setName(service_name) # why we need this cast? except: if orbpos > 1800: # west service.setName("%s (%3.1f" + _("W") + ")" %(str, (0 - (orbpos - 3600)) / 10.0)) else: service.setName("%s (%3.1f" + _("E") + ")" % (str, orbpos / 10.0))
784137020888a4be481b786d2feddf6537663ec8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/784137020888a4be481b786d2feddf6537663ec8/ChannelSelection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 15163, 1165, 2997, 12, 2890, 4672, 2537, 694, 33, 8381, 2807, 273, 599, 1278, 273, 425, 1179, 2404, 29909, 87, 4571, 348, 1777, 4503, 1285, 3991, 10205, 6953, 25344, 2555, 11, 17105,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 15163, 1165, 2997, 12, 2890, 4672, 2537, 694, 33, 8381, 2807, 273, 599, 1278, 273, 425, 1179, 2404, 29909, 87, 4571, 348, 1777, 4503, 1285, 3991, 10205, 6953, 25344, 2555, 11, 17105,...
print "Extra node added to avoid new clips."
def _routeLine(self, line): # we have to get a list of all coGlyphs allGlyphs = self._graphFrame.canvas.getObjectsOfClass(wxpc.coGlyph)
432bb9f36bcf2f22e46da966b8044c171ca3392b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/432bb9f36bcf2f22e46da966b8044c171ca3392b/graphEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5547, 1670, 12, 2890, 16, 980, 4672, 225, 468, 732, 1240, 358, 336, 279, 666, 434, 777, 1825, 25399, 777, 25399, 273, 365, 6315, 4660, 3219, 18, 15424, 18, 588, 4710, 951, 797, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5547, 1670, 12, 2890, 16, 980, 4672, 225, 468, 732, 1240, 358, 336, 279, 666, 434, 777, 1825, 25399, 777, 25399, 273, 365, 6315, 4660, 3219, 18, 15424, 18, 588, 4710, 951, 797, 12...
compile_dir(dir, maxlevels, ddir, force)
success = success and compile_dir(dir, maxlevels, ddir, force)
def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: purported directory name for error messages" print "if no directory arguments, -l sys.path is assumed" sys.exit(2) maxlevels = 10 ddir = None force = 0 for o, a in opts: if o == '-l': maxlevels = 0 if o == '-d': ddir = a if o == '-f': force = 1 if ddir: if len(args) != 1: print "-d destdir require exactly one directory argument" sys.exit(2) try: if args: for dir in args: compile_dir(dir, maxlevels, ddir, force) else: compile_path() except KeyboardInterrupt: print "\n[interrupt]"
da80c130def30dd3e1fcbaac1638e42aac965d31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/da80c130def30dd3e1fcbaac1638e42aac965d31/compileall.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 3651, 2774, 5402, 12123, 1930, 336, 3838, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 80, 8313, 2497, 13, 1335...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 3651, 2774, 5402, 12123, 1930, 336, 3838, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 80, 8313, 2497, 13, 1335...
return self._DictIterator(3,self)
return self._DictIterator(3)
def iteritems(self): """ obj.iteritems() -> an iterator of over the (key,value) pairs of obj ordered by self.field_order """ return self._DictIterator(3,self)
579d2b0d74c64f5c9a73587dd87d4cda3aafef04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/579d2b0d74c64f5c9a73587dd87d4cda3aafef04/MythBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7674, 12, 2890, 4672, 3536, 1081, 18, 2165, 3319, 1435, 317, 392, 2775, 434, 1879, 326, 261, 856, 16, 1132, 13, 5574, 434, 1081, 5901, 635, 365, 18, 1518, 67, 1019, 3536, 327, 365, 631...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7674, 12, 2890, 4672, 3536, 1081, 18, 2165, 3319, 1435, 317, 392, 2775, 434, 1879, 326, 261, 856, 16, 1132, 13, 5574, 434, 1081, 5901, 635, 365, 18, 1518, 67, 1019, 3536, 327, 365, 631...
style |= {wx.LIST_FORMAT_LEFT: wx.TE_LEFT, wx.LIST_FORMAT_RIGHT: wx.TE_RIGHT, wx.LIST_FORMAT_CENTRE : wx.TE_CENTRE}[col_style]
style |= {wx.LIST_FORMAT_LEFT: wx.TE_LEFT, wx.LIST_FORMAT_RIGHT: wx.TE_RIGHT, wx.LIST_FORMAT_CENTRE : wx.TE_CENTRE }[col_style]
def make_editor(self, col_style=wx.LIST_FORMAT_LEFT): editor = wx.PreTextCtrl() style =wx.TE_PROCESS_ENTER|wx.TE_PROCESS_TAB|wx.TE_RICH2 style |= {wx.LIST_FORMAT_LEFT: wx.TE_LEFT, wx.LIST_FORMAT_RIGHT: wx.TE_RIGHT, wx.LIST_FORMAT_CENTRE : wx.TE_CENTRE}[col_style] editor.Create(self, -1, style=style) editor.SetBackgroundColour(wx.Colour(red=255,green=255,blue=175)) #Yellow font = self.GetFont() editor.SetFont(font)
27ed367cb23b71ba64c7176044f4b8dc33e753dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/27ed367cb23b71ba64c7176044f4b8dc33e753dd/listctrl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 9177, 12, 2890, 16, 645, 67, 4060, 33, 27226, 18, 7085, 67, 7254, 67, 10066, 4672, 4858, 273, 7075, 18, 1386, 1528, 12418, 1435, 225, 2154, 273, 27226, 18, 1448, 67, 16560, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 9177, 12, 2890, 16, 645, 67, 4060, 33, 27226, 18, 7085, 67, 7254, 67, 10066, 4672, 4858, 273, 7075, 18, 1386, 1528, 12418, 1435, 225, 2154, 273, 27226, 18, 1448, 67, 16560, 6...
self.__gens[True] = [iso(P) for P in E.gens(use_database=False)] return self.__gens[True]
try: self.__gens[True] = [iso(P) for P in E.__gens[True]] return self.__gens[True] except KeyError: pass
def gens(self, verbose=False, rank1_search=10, algorithm='mwrank_shell', only_use_mwrank=True, proof = None, use_database = True): """ Compute and return generators for the Mordell-Weil group E(Q) *modulo* torsion.
f7a64cf6494e6bba1d939cbb3cbba8332d4d2789 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/f7a64cf6494e6bba1d939cbb3cbba8332d4d2789/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 773, 12, 2890, 16, 3988, 33, 8381, 16, 6171, 21, 67, 3072, 33, 2163, 16, 4886, 2218, 81, 91, 11500, 67, 10304, 2187, 1338, 67, 1202, 67, 81, 91, 11500, 33, 5510, 16, 14601, 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, 314, 773, 12, 2890, 16, 3988, 33, 8381, 16, 6171, 21, 67, 3072, 33, 2163, 16, 4886, 2218, 81, 91, 11500, 67, 10304, 2187, 1338, 67, 1202, 67, 81, 91, 11500, 33, 5510, 16, 14601, 273,...
modified_since = stringToDatetime(modified_since)
modified_since = stringToDatetime(modified_since.split(';', 1)[0])
def setLastModified(self, when): """Set the X{Last-Modified} time for the response to this request.
b38c7162c376ab08ae6186f01d8af93857870bef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b38c7162c376ab08ae6186f01d8af93857870bef/http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 14747, 12, 2890, 16, 1347, 4672, 3536, 694, 326, 1139, 95, 3024, 17, 4575, 97, 813, 364, 326, 766, 358, 333, 590, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 14747, 12, 2890, 16, 1347, 4672, 3536, 694, 326, 1139, 95, 3024, 17, 4575, 97, 813, 364, 326, 766, 358, 333, 590, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
output)
output, 'TIMEOUT')
def PrintRegressions(self, output): """Write the regressions computed by _CalculateRegressions() to output. """
4cbe0a9c3971f44c85c837d71040dcb37f112b1c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5060/4cbe0a9c3971f44c85c837d71040dcb37f112b1c/compare_failures.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3038, 1617, 663, 1115, 12, 2890, 16, 876, 4672, 3536, 3067, 326, 960, 663, 1115, 8470, 635, 389, 8695, 1617, 663, 1115, 1435, 358, 876, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3038, 1617, 663, 1115, 12, 2890, 16, 876, 4672, 3536, 3067, 326, 960, 663, 1115, 8470, 635, 389, 8695, 1617, 663, 1115, 1435, 358, 876, 18, 3536, 2, -100, -100, -100, -100, -100, -100, ...
check('AbC', 'abc', 0) check('abc', 'AbC', 0)
check('AbC', 'abc', 0, fnmatchcase) check('abc', 'AbC', 0, fnmatchcase)
def test_fnmatchcase(self): check = self.check_match check('AbC', 'abc', 0) check('abc', 'AbC', 0)
6eedef60a28512007bf6f78072a197530a961b57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/6eedef60a28512007bf6f78072a197530a961b57/test_fnmatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4293, 1916, 3593, 12, 2890, 4672, 866, 273, 365, 18, 1893, 67, 1916, 866, 2668, 5895, 39, 2187, 296, 18947, 2187, 374, 13, 866, 2668, 18947, 2187, 296, 5895, 39, 2187, 374, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4293, 1916, 3593, 12, 2890, 4672, 866, 273, 365, 18, 1893, 67, 1916, 866, 2668, 5895, 39, 2187, 296, 18947, 2187, 374, 13, 866, 2668, 18947, 2187, 296, 5895, 39, 2187, 374, 1...
menupgc.appendChild(button) del button
endbuttons.append(button)
def createDVDAuthorXML(screensize, numberofitems): """Creates the xml file for dvdauthor to use the MythBurn menus.""" #Get the main menu node (we must only have 1) menunode=themeDOM.getElementsByTagName("menu") if menunode.length!=1: fatalError("Cannot find the menu element in the theme file") menunode=menunode[0] menuitems=menunode.getElementsByTagName("item") #Total number of video items on a single menu page (no less than 1!) itemsperpage = menuitems.length write( "Menu items per page %s" % itemsperpage) if wantChapterMenu: #Get the chapter menu node (we must only have 1) submenunode=themeDOM.getElementsByTagName("submenu") if submenunode.length!=1: fatalError("Cannot find the submenu element in the theme file") submenunode=submenunode[0] chapteritems=submenunode.getElementsByTagName("chapter") #Total number of video items on a single menu page (no less than 1!) chapters = chapteritems.length write( "Chapters per recording %s" % chapters) del chapteritems del submenunode #Page number counter page=1 #Item counter to indicate current video item itemnum=1 write( "Creating DVD XML file for dvd author") dvddom = xml.dom.minidom.parseString( '''<dvdauthor> <vmgm> <menus lang="en"> <pgc entry="title"> </pgc> </menus> </vmgm> </dvdauthor>''') dvdauthor_element=dvddom.documentElement menus_element = dvdauthor_element.childNodes[1].childNodes[1] dvdauthor_element.insertBefore( dvddom.createComment(""" DVD Variables g0=not used g1=not used g2=title number selected on current menu page (see g4) g3=1 if intro movie has played g4=last menu page on display """), dvdauthor_element.firstChild ) dvdauthor_element.insertBefore(dvddom.createComment("dvdauthor XML file created by MythBurn script"), dvdauthor_element.firstChild ) menus_element.appendChild( dvddom.createComment("Title menu used to hold intro movie") ) dvdauthor_element.setAttribute("dest",os.path.join(getTempPath(),"dvd")) video = dvddom.createElement("video") video.setAttribute("format",videomode) # set aspect ratio if mainmenuAspectRatio == "4:3": video.setAttribute("aspect", "4:3") else: video.setAttribute("aspect", "16:9") video.setAttribute("widescreen", "nopanscan") menus_element.appendChild(video) pgc=menus_element.childNodes[1] if wantIntro: #code to skip over intro if its already played pre = dvddom.createElement("pre") pgc.appendChild(pre) vmgm_pre_node=pre del pre node = themeDOM.getElementsByTagName("intro")[0] introFile = node.attributes["filename"].value #Pick the correct intro movie based on video format ntsc/pal vob = dvddom.createElement("vob") vob.setAttribute("pause","") vob.setAttribute("file",os.path.join(getThemeFile(themeName, videomode + '_' + introFile))) pgc.appendChild(vob) del vob #We use g3 to indicate that the intro has been played at least once #default g2 to point to first recording post = dvddom.createElement("post") post .appendChild(dvddom.createTextNode("{g3=1;g2=1;jump menu 2;}")) pgc.appendChild(post) del post while itemnum <= numberofitems: write( "Menu page %s" % page) #For each menu page we need to create a new PGC structure menupgc = dvddom.createElement("pgc") menus_element.appendChild(menupgc) menupgc.setAttribute("pause","inf") menupgc.appendChild( dvddom.createComment("Menu Page %s" % page) ) #Make sure the button last highlighted is selected #g4 holds the menu page last displayed pre = dvddom.createElement("pre") pre.appendChild(dvddom.createTextNode("{button=g2*1024;g4=%s;}" % page)) menupgc.appendChild(pre) vob = dvddom.createElement("vob") vob.setAttribute("file",os.path.join(getTempPath(),"menu-%s.mpg" % page)) menupgc.appendChild(vob) #Loop menu forever post = dvddom.createElement("post") post.appendChild(dvddom.createTextNode("jump cell 1;")) menupgc.appendChild(post) #Default settings for this page #Number of video items on this menu page itemsonthispage=0 #Loop through all the items on this menu page while itemnum <= numberofitems and itemsonthispage < itemsperpage: menuitem=menuitems[ itemsonthispage ] itemsonthispage+=1 #Get the XML containing information about this item infoDOM = xml.dom.minidom.parse( os.path.join(getItemTempPath(itemnum),"info.xml") ) #Error out if its the wrong XML if infoDOM.documentElement.tagName != "fileinfo": fatalError("The info.xml file (%s) doesn't look right" % os.path.join(getItemTempPath(itemnum),"info.xml")) #write( themedom.toprettyxml()) #Add this recording to this page's menu... button=dvddom.createElement("button") button.setAttribute("name","%s" % itemnum) button.appendChild(dvddom.createTextNode("{g2=" + "%s" % itemsonthispage + "; jump title %s;}" % itemnum)) menupgc.appendChild(button) del button #Create a TITLESET for each item titleset = dvddom.createElement("titleset") dvdauthor_element.appendChild(titleset) #Comment XML file with title of video titleset.appendChild( dvddom.createComment( getText( infoDOM.getElementsByTagName("title")[0]) ) ) menus= dvddom.createElement("menus") titleset.appendChild(menus) video = dvddom.createElement("video") video.setAttribute("format",videomode) # set the right aspect ratio if chaptermenuAspectRatio == "4:3": video.setAttribute("aspect", "4:3") elif chaptermenuAspectRatio == "16:9": video.setAttribute("aspect", "16:9") video.setAttribute("widescreen", "nopanscan") else: # use same aspect ratio as the video if getAspectRatioOfVideo(itemnum) > aspectRatioThreshold: video.setAttribute("aspect", "16:9") video.setAttribute("widescreen", "nopanscan") else: video.setAttribute("aspect", "4:3") menus.appendChild(video) if wantChapterMenu: mymenupgc = dvddom.createElement("pgc") menus.appendChild(mymenupgc) mymenupgc.setAttribute("pause","inf") pre = dvddom.createElement("pre") mymenupgc.appendChild(pre) if wantDetailsPage: pre.appendChild(dvddom.createTextNode("{button=s7 - 1 * 1024;}")) else: pre.appendChild(dvddom.createTextNode("{button=s7 * 1024;}")) vob = dvddom.createElement("vob") vob.setAttribute("file",os.path.join(getTempPath(),"chaptermenu-%s.mpg" % itemnum)) mymenupgc.appendChild(vob) #Loop menu forever post = dvddom.createElement("post") post.appendChild(dvddom.createTextNode("jump cell 1;")) mymenupgc.appendChild(post) # the first chapter MUST be 00:00:00 if its not dvdauthor adds it which # throws of the chapter selection - so make sure we add it if needed so we # can compensate for it in the chapter selection menu firstChapter = 0 thumbNode = infoDOM.getElementsByTagName("thumblist") if thumbNode.length > 0: thumblist = getText(thumbNode[0]) chapterlist = string.split(thumblist, ",") if chapterlist[0] != '00:00:00': firstChapter = 1 x=1 while x<=chapters: #Add this recording to this page's menu... button=dvddom.createElement("button") button.setAttribute("name","%s" % x) if wantDetailsPage: button.appendChild(dvddom.createTextNode("jump title %s chapter %s;" % (1, firstChapter + x + 1))) else: button.appendChild(dvddom.createTextNode("jump title %s chapter %s;" % (1, firstChapter + x))) mymenupgc.appendChild(button) del button x+=1 #add the titlemenu button if required submenunode = themeDOM.getElementsByTagName("submenu") submenunode = submenunode[0] titlemenunodes = submenunode.getElementsByTagName("titlemenu") if titlemenunodes.length > 0: button = dvddom.createElement("button") button.setAttribute("name","titlemenu") button.appendChild(dvddom.createTextNode("{jump vmgm menu;}")) mymenupgc.appendChild(button) del button titles = dvddom.createElement("titles") titleset.appendChild(titles) # set the right aspect ratio title_video = dvddom.createElement("video") title_video.setAttribute("format",videomode) if chaptermenuAspectRatio == "4:3": title_video.setAttribute("aspect", "4:3") elif chaptermenuAspectRatio == "16:9": title_video.setAttribute("aspect", "16:9") title_video.setAttribute("widescreen", "nopanscan") else: # use same aspect ratio as the video if getAspectRatioOfVideo(itemnum) > aspectRatioThreshold: title_video.setAttribute("aspect", "16:9") title_video.setAttribute("widescreen", "nopanscan") else: title_video.setAttribute("aspect", "4:3") titles.appendChild(title_video) #set right audio format if doesFileExist(os.path.join(getItemTempPath(itemnum), "stream0.mp2")): title_audio = dvddom.createElement("audio") title_audio.setAttribute("format", "mp2") else: title_audio = dvddom.createElement("audio") title_audio.setAttribute("format", "ac3") titles.appendChild(title_audio) pgc = dvddom.createElement("pgc") titles.appendChild(pgc) #pgc.setAttribute("pause","inf") if wantDetailsPage: #add the detail page intro for this item vob = dvddom.createElement("vob") vob.setAttribute("file",os.path.join(getTempPath(),"details-%s.mpg" % itemnum)) pgc.appendChild(vob) vob = dvddom.createElement("vob") if wantChapterMenu: vob.setAttribute("chapters",createVideoChapters(itemnum,chapters,getLengthOfVideo(itemnum),False) ) else: vob.setAttribute("chapters", createVideoChaptersFixedLength(chapterLength, getLengthOfVideo(itemnum))) vob.setAttribute("file",os.path.join(getItemTempPath(itemnum),"final.mpg")) pgc.appendChild(vob) post = dvddom.createElement("post") post.appendChild(dvddom.createTextNode("call vmgm menu %s;" % (page + 1))) pgc.appendChild(post) #Quick variable tidy up (not really required under Python) del titleset del titles del menus del video del pgc del vob del post #Loop through all the nodes inside this menu item and pick previous / next buttons for node in menuitem.childNodes: if node.nodeName=="previous": if page>1: button=dvddom.createElement("button") button.setAttribute("name","previous") button.appendChild(dvddom.createTextNode("{g2=1;jump menu %s;}" % page )) menupgc.appendChild(button) del button elif node.nodeName=="next": if itemnum < numberofitems: button=dvddom.createElement("button") button.setAttribute("name","next") button.appendChild(dvddom.createTextNode("{g2=1;jump menu %s;}" % (page + 2))) menupgc.appendChild(button) del button #On to the next item itemnum+=1 #Move on to the next page page+=1 if wantIntro: #Menu creation is finished so we know how many pages were created #add to to jump to the correct one automatically dvdcode="if (g3 eq 1) {" while (page>1): page-=1; dvdcode+="if (g4 eq %s) " % page dvdcode+="jump menu %s;" % (page + 1) if (page>1): dvdcode+=" else " dvdcode+="}" vmgm_pre_node.appendChild(dvddom.createTextNode(dvdcode)) #write(dvddom.toprettyxml()) #Save xml to file WriteXMLToFile (dvddom,os.path.join(getTempPath(),"dvdauthor.xml")) #Destroy the DOM and free memory dvddom.unlink()
49206bf7f206be3336f41ca9b0edcf135b218f2c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13713/49206bf7f206be3336f41ca9b0edcf135b218f2c/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 40, 21544, 3594, 4201, 12, 1017, 266, 773, 554, 16, 1300, 792, 3319, 4672, 3536, 2729, 326, 2025, 585, 364, 12494, 72, 4161, 358, 999, 326, 8005, 451, 38, 321, 21374, 12123, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 40, 21544, 3594, 4201, 12, 1017, 266, 773, 554, 16, 1300, 792, 3319, 4672, 3536, 2729, 326, 2025, 585, 364, 12494, 72, 4161, 358, 999, 326, 8005, 451, 38, 321, 21374, 12123, 225, ...
{}, cgi.escape(term),
{}, cgi.escape(term),
def tmpl_search_no_boolean_hits(self, ln, nearestterms): """No hits found, proposes alternative boolean queries
d80e9e5b545268d60103014de3d2c09f38531285 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2139/d80e9e5b545268d60103014de3d2c09f38531285/websearch_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 3072, 67, 2135, 67, 6494, 67, 15173, 12, 2890, 16, 7211, 16, 11431, 10112, 4672, 3536, 2279, 11076, 1392, 16, 450, 10522, 10355, 1250, 6218, 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, 10720, 67, 3072, 67, 2135, 67, 6494, 67, 15173, 12, 2890, 16, 7211, 16, 11431, 10112, 4672, 3536, 2279, 11076, 1392, 16, 450, 10522, 10355, 1250, 6218, 2, -100, -100, -100, -100, -100, -...
return (self.menuCallback != None)
return (self.menu != None)
def hasMenu(self): return (self.menuCallback != None)
d411d8cd4ee9ab090c9597ec7f76c7f2d2e5170e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4575/d411d8cd4ee9ab090c9597ec7f76c7f2d2e5170e/gungamelib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 4599, 12, 2890, 4672, 327, 261, 2890, 18, 5414, 480, 599, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 4599, 12, 2890, 4672, 327, 261, 2890, 18, 5414, 480, 599, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.sendMessage(obj['sender'], self.google(obj['msg']))
self.sendMessage(obj['sender'], "'%s'\n%s" % (self.autotranslate(obj['msg']), self.google(obj['msg'])))
def on_message_event(self, obj): #avoid infinite loop if obj['sender'] == self.login_data['primaryLoginId']: return if obj['msg'] == "dodysw:quit": self.shutdown = True return if obj['msg'] == "dodysw:friends": self.fetchContactList() print self.contacts return print "=======%s: %s" % (obj['sender'], obj['msg']) self.sendMessage(obj['sender'], self.google(obj['msg']))
435285d03d5af802b43c041f62cd46ec98058266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2802/435285d03d5af802b43c041f62cd46ec98058266/gtym.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 2150, 67, 2575, 12, 2890, 16, 1081, 4672, 468, 842, 839, 14853, 2798, 309, 1081, 3292, 15330, 3546, 422, 365, 18, 5819, 67, 892, 3292, 8258, 5358, 548, 3546, 30, 327, 309, 108...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 2150, 67, 2575, 12, 2890, 16, 1081, 4672, 468, 842, 839, 14853, 2798, 309, 1081, 3292, 15330, 3546, 422, 365, 18, 5819, 67, 892, 3292, 8258, 5358, 548, 3546, 30, 327, 309, 108...
API.unbind(id, data['repoid'])
API.unbind(id, data)
def POST(self, id): """ Unbind (unsubscribe) a user to a repository. @param id: consumer id @return: True on successful unbind """ data = self.input() API.unbind(id, data['repoid']) return self.output(True)
be3174bca5e8cb1825ad3e5c56ab898cf7777056 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/be3174bca5e8cb1825ad3e5c56ab898cf7777056/consumers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5485, 12, 2890, 16, 612, 4672, 3536, 1351, 4376, 261, 318, 9174, 13, 279, 729, 358, 279, 3352, 18, 632, 891, 612, 30, 4765, 612, 632, 2463, 30, 1053, 603, 6873, 17449, 3536, 501, 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, 5485, 12, 2890, 16, 612, 4672, 3536, 1351, 4376, 261, 318, 9174, 13, 279, 729, 358, 279, 3352, 18, 632, 891, 612, 30, 4765, 612, 632, 2463, 30, 1053, 603, 6873, 17449, 3536, 501, 273, ...
modules = self.find_modules() else: modules = []
modules.extend(self.find_modules()) if self.packages:
def find_all_modules (self): """Compute the list of all modules that will be built, whether they are specified one-module-at-a-time ('self.py_modules') or by whole packages ('self.packages'). Return a list of tuples (package, module, module_file), just like 'find_modules()' and 'find_package_modules()' do."""
bb7ab6f2da512ae49ba5305c52bfb2e3d073391c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bb7ab6f2da512ae49ba5305c52bfb2e3d073391c/build_py.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 454, 67, 6400, 261, 2890, 4672, 3536, 7018, 326, 666, 434, 777, 4381, 716, 903, 506, 6650, 16, 2856, 2898, 854, 1269, 1245, 17, 2978, 17, 270, 17, 69, 17, 957, 7707, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 454, 67, 6400, 261, 2890, 4672, 3536, 7018, 326, 666, 434, 777, 4381, 716, 903, 506, 6650, 16, 2856, 2898, 854, 1269, 1245, 17, 2978, 17, 270, 17, 69, 17, 957, 7707, 2890, ...
page_template = PageTemplate(id=id, frames=page_template_data['frame'])
template_attrs = {'id': id, 'frames': page_template_data['frame'], 'pagesize': page_size} page_template = PageTemplate(**template_attrs)
def template_stream(stream, _tag_uri, _tag_name, _attributes, _ns_decls, document_attrs): """ """ stack = [] stack.append((_tag_name, _attributes, None)) page_templates = [] page_template_data = None show_boundary = False for key in document_attrs.keys(): if _attributes.has_key((None, key)): document_attrs[key] = _attributes[(None, key)] if len(document_attrs['pageSize']) == 2: f = get_value_reportlab(document_attrs['pageSize'][0]) s = get_value_reportlab(document_attrs['pageSize'][0]) document_attrs['pageSize'] = (f, s) else: document_attrs['pageSize'] = pagesizes.A4 document_attrs['rotation'] = \ to_int(document_attrs['rotation']) document_attrs['leftMargin'] = \ get_value_reportlab(document_attrs['leftMargin']) document_attrs['rightMargin'] = \ get_value_reportlab(document_attrs['rightMargin']) document_attrs['topMargin'] = \ get_value_reportlab(document_attrs['topMargin']) document_attrs['bottomMargin'] = \ get_value_reportlab(document_attrs['bottomMargin']) document_attrs['showBoundary'] = \ to_bool(document_attrs['showBoundary'], 0) document_attrs['allowSplitting'] = \ to_bool(document_attrs['allowSplitting']) show_boundary = document_attrs['showBoundary'] while True: try: event, value, line_number = stream.next() except StopIteration: return #### START ELEMENT #### if event == START_ELEMENT: tag_uri, tag_name, attributes, ns_decls = value if tag_name == 'pageTemplate': page_template_data = {'frame':[]} stack.append((tag_name, attributes, None)) elif event == END_ELEMENT: tag_uri, tag_name = value prev_elt = stack[-1] if prev_elt[0] == _tag_name: if tag_name == _tag_name: return page_templates elif prev_elt[0] == 'pageTemplate': if tag_name == 'pageTemplate': attrs = prev_elt[1] id = attrs.get((None, 'id'), None) if id is None: # tag not well formed pass else: page_template = PageTemplate(id=id, frames=page_template_data['frame']) page_templates.append(page_template) page_template_data = None elif prev_elt[0] == 'frame': if tag_name == 'frame' and page_template_data is not None: attrs = prev_elt[1] #Frame(x1, y1, width,height, leftPadding=6, bottomPadding=6, #rightPadding=6, topPadding=6, id=None, showBoundary=0) id = attrs.get((None, 'id'), None) x1 = get_value_reportlab(attrs.get((None, 'x1'), None)) y1 = get_value_reportlab(attrs.get((None, 'y1'), None)) width = get_value_reportlab(attrs.get((None, 'width'), None)) height = get_value_reportlab(attrs.get((None, 'height'), None)) not_ok = x1 is None or y1 is None or width is None \ or height is None or id is None if not_ok: # frame tag not well formed pass else: frame_attrs = {'id': id, 'showBoundary': show_boundary, 'leftPadding': 0, 'bottomPadding': 0, 'rightPadding': 0, 'topPadding': 0, 'id': id, 'showBoundary': show_boundary} frame = Frame(x1, y1, width, height, **frame_attrs) page_template_data['frame'].append(frame) stack.pop()
51b02e012792ad1fcdef1300580c1d6a58548c1f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/51b02e012792ad1fcdef1300580c1d6a58548c1f/rml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1542, 67, 3256, 12, 3256, 16, 389, 2692, 67, 1650, 16, 389, 2692, 67, 529, 16, 389, 4350, 16, 389, 2387, 67, 323, 6429, 16, 1668, 67, 7039, 4672, 3536, 3536, 2110, 273, 5378, 2110, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1542, 67, 3256, 12, 3256, 16, 389, 2692, 67, 1650, 16, 389, 2692, 67, 529, 16, 389, 4350, 16, 389, 2387, 67, 323, 6429, 16, 1668, 67, 7039, 4672, 3536, 3536, 2110, 273, 5378, 2110, 1...
g = Generator(s, mangle_from_=1)
g = Generator(s, mangle_from_=True)
def test_mangled_from(self): s = StringIO() g = Generator(s, mangle_from_=1) g.flatten(self.msg) self.assertEqual(s.getvalue(), """\
a0a00761a500478223f0e076983fddcdfb4ac587 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a0a00761a500478223f0e076983fddcdfb4ac587/test_email.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 81, 539, 1259, 67, 2080, 12, 2890, 4672, 272, 273, 15777, 1435, 314, 273, 10159, 12, 87, 16, 312, 4341, 67, 2080, 67, 33, 5510, 13, 314, 18, 16940, 12, 2890, 18, 3576, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 81, 539, 1259, 67, 2080, 12, 2890, 4672, 272, 273, 15777, 1435, 314, 273, 10159, 12, 87, 16, 312, 4341, 67, 2080, 67, 33, 5510, 13, 314, 18, 16940, 12, 2890, 18, 3576, 13, ...
else: lastPlayed = self.db.getLastPlayedLocalTime(track)
def populateDetails(self, track): if self.db.getLastPlayedLocalTime(track) == None: lastPlayed = "-" else: lastPlayed = self.db.getLastPlayedLocalTime(track) ## should be time from last play self.clearDetails() self.addDetail("Artist: "+self.db.getArtist(track)) self.addDetail("Title: "+self.db.getTitle(track)) self.addDetail("Track: "+self.db.getTrackNumber(track)\ +" Album: "+self.db.getAlbum(track)) self.addDetail("Score: "+str(self.db.getScore(track))\ +" Last Played: "+lastPlayed) self.addDetail("Filetrack: "+self.db.getPath(track))
09ece80ad26c6521d0c61771f8c5b4674f2299cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8545/09ece80ad26c6521d0c61771f8c5b4674f2299cc/GUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6490, 3790, 12, 2890, 16, 3298, 4672, 309, 365, 18, 1966, 18, 588, 3024, 11765, 329, 2042, 950, 12, 4101, 13, 422, 599, 30, 1142, 11765, 329, 273, 7514, 7541, 1410, 506, 813, 628, 1142...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6490, 3790, 12, 2890, 16, 3298, 4672, 309, 365, 18, 1966, 18, 588, 3024, 11765, 329, 2042, 950, 12, 4101, 13, 422, 599, 30, 1142, 11765, 329, 273, 7514, 7541, 1410, 506, 813, 628, 1142...
pindices[i * 3] = c_int(f.v[0].index) pindices[i * 3 + 1] = c_int(f.v[1].index) pindices[i * 3 + 2] = c_int(f.v[2].index) i += 1
pindices[i] = c_int(f.v[0].index) pindices[i + 1] = c_int(f.v[1].index) pindices[i + 2] = c_int(f.v[2].index) i += 3
def file_callback(filename): if not filename.lower().endswith('.ctm'): filename += '.ctm' # Get object mesh from the selected object scn = bpy.data.scenes.active ob = scn.objects.active if not ob: Blender.Draw.PupMenu('Error%t|Select 1 active object') return mesh = BPyMesh.getMeshFromObject(ob, None, False, False, scn) if not mesh: Blender.Draw.PupMenu('Error%t|Could not get mesh data from active object') return # Check which mesh properties are present... hasVertexUV = mesh.vertexUV or mesh.faceUV hasVertexColors = mesh.vertexColors # Show a GUI for the export settings pupBlock = [] EXPORT_APPLY_MODIFIERS = Draw.Create(1) pupBlock.append(('Apply Modifiers', EXPORT_APPLY_MODIFIERS, 'Use transformed mesh data.')) EXPORT_NORMALS = Draw.Create(1) pupBlock.append(('Normals', EXPORT_NORMALS, 'Export vertex normal data.')) if hasVertexUV: EXPORT_UV = Draw.Create(1) pupBlock.append(('UVs', EXPORT_UV, 'Export texface UV coords.')) if hasVertexColors: EXPORT_COLORS = Draw.Create(1) pupBlock.append(('Colors', EXPORT_COLORS, 'Export vertex Colors.')) if not Draw.PupBlock('Export...', pupBlock): return # Adjust export settings according to GUI selections EXPORT_APPLY_MODIFIERS = EXPORT_APPLY_MODIFIERS.val EXPORT_NORMALS = EXPORT_NORMALS.val if hasVertexUV: EXPORT_UV = EXPORT_UV.val else: EXPORT_UV = False if hasVertexColors: EXPORT_COLORS = EXPORT_COLORS.val else: EXPORT_COLORS = False is_editmode = Blender.Window.EditMode() if is_editmode: Blender.Window.EditMode(0, '', 0) Window.WaitCursor(1) try: # Get the mesh, again, this time with/without modifiers (from GUI selection) mesh = BPyMesh.getMeshFromObject(ob, None, EXPORT_APPLY_MODIFIERS, False, scn) if not mesh: Blender.Draw.PupMenu('Error%t|Could not get mesh data from active object') return mesh.transform(ob.matrixWorld) # Count triangles (quads count as two triangles) triangleCount = 0 for f in mesh.faces: if len(f.v) == 4: triangleCount += 2 else: triangleCount += 1 # Extract indices from the Blender mesh (quads are split into two triangles) pindices = cast((c_int * 3 * triangleCount)(), POINTER(c_int)) i = 0 for f in mesh.faces: pindices[i * 3] = c_int(f.v[0].index) pindices[i * 3 + 1] = c_int(f.v[1].index) pindices[i * 3 + 2] = c_int(f.v[2].index) i += 1 if len(f.v) == 4: pindices[i * 3] = c_int(f.v[0].index) pindices[i * 3 + 1] = c_int(f.v[2].index) pindices[i * 3 + 2] = c_int(f.v[3].index) i += 1 # Extract vertex array from the Blender mesh vertexCount = len(mesh.verts) pvertices = cast((c_float * 3 * vertexCount)(), POINTER(c_float)) i = 0 for v in mesh.verts: pvertices[i * 3] = c_float(v.co.x) pvertices[i * 3 + 1] = c_float(v.co.y) pvertices[i * 3 + 2] = c_float(v.co.z) i += 1 # Extract normals if EXPORT_NORMALS: pnormals = cast((c_float * 3 * vertexCount)(), POINTER(c_float)) i = 0 for v in mesh.verts: pnormals[i * 3] = c_float(v.no.x) pnormals[i * 3 + 1] = c_float(v.no.y) pnormals[i * 3 + 2] = c_float(v.no.z) i += 1 else: pnormals = POINTER(c_float)() # Extract UVs if EXPORT_UV: ptexCoords = cast((c_float * 2 * vertexCount)(), POINTER(c_float)) if mesh.faceUV: for f in mesh.faces: for j in range(3): k = f.v[j].index if k < vertexCount: uv = f.uv[j] ptexCoords[k * 2] = uv[0] ptexCoords[k * 2 + 1] = uv[1] else: i = 0 for v in mesh.verts: ptexCoords[i * 2] = c_float(v.uvco[0]) ptexCoords[i * 2 + 1] = c_float(v.uvco[1]) i += 1 else: ptexCoords = POINTER(c_float)() # Extract colors if EXPORT_COLORS: pcolors = cast((c_float * 4 * vertexCount)(), POINTER(c_float)) for f in mesh.faces: for j in range(3): k = f.v[j].index if k < vertexCount: col = f.col[j] pcolors[k * 4] = col.r / 256.0 pcolors[k * 4 + 1] = col.g / 256.0 pcolors[k * 4 + 2] = col.b / 256.0 pcolors[k * 4 + 3] = 1.0 else: pcolors = POINTER(c_float)() # Load the OpenCTM shared library if os.name == 'nt': libHDL = WinDLL('openctm.dll') else: libName = find_library('openctm') if not libName: Blender.Draw.PupMenu('Could not find the OpenCTM shared library') return libHDL = CDLL(libName) if not libHDL: Blender.Draw.PupMenu('Could not open the OpenCTM shared library') return # Get all the functions from the shared library that we need ctmNewContext = libHDL.ctmNewContext ctmNewContext.argtypes = [c_int] ctmNewContext.restype = c_void_p ctmFreeContext = libHDL.ctmFreeContext ctmFreeContext.argtypes = [c_void_p] ctmDefineMesh = libHDL.ctmDefineMesh ctmDefineMesh.argtypes = [c_void_p, POINTER(c_float), c_int, POINTER(c_int), c_int, POINTER(c_float)] ctmSave = libHDL.ctmSave ctmSave.argtypes = [c_void_p, c_char_p] ctmAddTexMap = libHDL.ctmAddTexMap ctmAddTexMap.argtypes = [c_void_p, POINTER(c_float), c_char_p] ctmAddTexMap.restype = c_int ctmAddAttribMap = libHDL.ctmAddAttribMap ctmAddAttribMap.argtypes = [c_void_p, POINTER(c_float), c_char_p] ctmAddAttribMap.restype = c_int # Create an OpenCTM context ctm = ctmNewContext(0x0102) try: # Define the mesh ctmDefineMesh(ctm, pvertices, c_int(vertexCount), pindices, c_int(triangleCount), pnormals) # Add texture coordinates? if EXPORT_UV: ctmAddTexMap(ctm, ptexCoords, c_char_p("Pigment")) # Add colors? if EXPORT_COLORS: ctmAddAttribMap(ctm, pcolors, c_char_p("Colors")) # Save the file ctmSave(ctm, c_char_p(filename)) finally: # Free the OpenCTM context ctmFreeContext(ctm) finally: Window.WaitCursor(0) if is_editmode: Blender.Window.EditMode(1, '', 0)
97daef3528cb865209407be86e74cc9517b79903 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11511/97daef3528cb865209407be86e74cc9517b79903/openctm_export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 67, 3394, 12, 3459, 4672, 225, 309, 486, 1544, 18, 8167, 7675, 5839, 1918, 2668, 18, 299, 81, 11, 4672, 1544, 1011, 2418, 299, 81, 11, 225, 468, 968, 733, 6986, 628, 326, 3170, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 67, 3394, 12, 3459, 4672, 225, 309, 486, 1544, 18, 8167, 7675, 5839, 1918, 2668, 18, 299, 81, 11, 4672, 1544, 1011, 2418, 299, 81, 11, 225, 468, 968, 733, 6986, 628, 326, 3170, ...
ch1 = wx.colheader.ColumnHeader( self, 1001, (20, 40), (350, colHeight), 0 ) ch1.AppendItem("Sun", wx.colheader.COLUMNHEADER_JUST_Center, 50, 1, 0, 1) ch1.AppendItem("Mon", wx.colheader.COLUMNHEADER_JUST_Center, 50, 0, 0, 1) ch1.AppendItem("Tue", wx.colheader.COLUMNHEADER_JUST_Center, 50, 0, 0, 1) ch1.AppendItem("Wed", wx.colheader.COLUMNHEADER_JUST_Center, 50, 0, 0, 1) ch1.AppendItem("Thu", wx.colheader.COLUMNHEADER_JUST_Center, 50, 0, 0, 1) ch1.AppendItem("Fri", wx.colheader.COLUMNHEADER_JUST_Center, 50, 0, 0, 1) ch1.AppendItem("Sat", wx.colheader.COLUMNHEADER_JUST_Center, 50, 0, 0, 1)
ch1 = wx.colheader.ColumnHeader( self, cntlID, (20, 40), (350, colHeight), 0 ) dow = [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ] for v in dow: ch1.AppendItem( v, wx.colheader.COLUMNHEADER_JUST_Center, 50, 0, 0, 1 ) ch1.SetSelectedItemIndex( 0 )
def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log
97785f3f33dd20f2b36619b4084b435cbedc5e2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/97785f3f33dd20f2b36619b4084b435cbedc5e2e/ColumnHeader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 982, 16, 613, 262, 30, 7075, 18, 5537, 16186, 2738, 972, 12, 365, 16, 982, 16, 300, 21, 16, 2154, 33, 27226, 18, 3417, 67, 18111, 67, 862, 4066, 3217, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 982, 16, 613, 262, 30, 7075, 18, 5537, 16186, 2738, 972, 12, 365, 16, 982, 16, 300, 21, 16, 2154, 33, 27226, 18, 3417, 67, 18111, 67, 862, 4066, 3217, ...
sage: plot([solnx,solny],0,1) sage: parametric_plot((solnx,solny),0,1)
sage: plot([solnx,solny],(0,1)) sage: parametric_plot((solnx,solny),(0,1))
def desolve_system(des, vars, ics=None, ivar=None): """ Solves any size system of 1st order odes using maxima. Initials conditions are optional. INPUT: des -- list of ODEs vars -- list of dependent variables ics -- (optional) list of initial values for ivar and vars ivar -- (optional) the independent variable, which must be specified if there is more than one independent variable in the equation. EXAMPLES: sage: t = var('t') sage: x = function('x', t) sage: y = function('y', t) sage: de1 = diff(x,t) + y - 1 == 0 sage: de2 = diff(y,t) - x + 1 == 0 sage: desolve_system([de1, de2], [x,y]) [x(t) == (x(0) - 1)*cos(t) - (y(0) - 1)*sin(t) + 1, y(t) == (x(0) - 1)*sin(t) + (y(0) - 1)*cos(t) + 1] Now we give some initial conditions: sage: sol = desolve_system([de1, de2], [x,y], ics=[0,1,2]); sol [x(t) == -sin(t) + 1, y(t) == cos(t) + 1] sage: solnx, solny = sol[0].rhs(), sol[1].rhs() sage: plot([solnx,solny],0,1) sage: parametric_plot((solnx,solny),0,1) AUTHOR: Robert Bradshaw (10-2008) """ ivars = set([]) for i, de in enumerate(des): if not is_SymbolicEquation(de): des[i] = de == 0 ivars = ivars.union(set(de.variables())) if ivar is None: ivars = ivars - set(vars) if len(ivars) != 1: raise ValueError, "Unable to determine independent variable, please specify." ivar = list(ivars)[0] dvars = [v._maxima_() for v in vars] if ics is not None: ivar_ic = ics[0] for dvar, ic in zip(dvars, ics[1:]): dvar.atvalue(ivar==ivar_ic, ic) soln = dvars[0].parent().desolve(des, dvars) if str(soln).strip() == 'false': raise NotImplementedError, "Maxima was unable to solve this system." soln = list(soln) for i, sol in enumerate(soln): soln[i] = sol.sage() if ics is not None: ivar_ic = ics[0] for dvar, ic in zip(dvars, ics[:1]): dvar.atvalue(ivar==ivar_ic, dvar) return soln
d2bdcfc682cb6ee11af743343c4213b2d97b06ae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d2bdcfc682cb6ee11af743343c4213b2d97b06ae/desolvers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2832, 5390, 67, 4299, 12, 5489, 16, 4153, 16, 277, 2143, 33, 7036, 16, 277, 1401, 33, 7036, 4672, 3536, 348, 355, 3324, 1281, 963, 2619, 434, 404, 334, 1353, 320, 5489, 1450, 943, 1388...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2832, 5390, 67, 4299, 12, 5489, 16, 4153, 16, 277, 2143, 33, 7036, 16, 277, 1401, 33, 7036, 4672, 3536, 348, 355, 3324, 1281, 963, 2619, 434, 404, 334, 1353, 320, 5489, 1450, 943, 1388...
self.TrainFolder(fol, True)
folder = IMAPFolder(fol) folder.Train(self.classifier, True)
def Train(self): if options.verbose: t = time.time() if options.imap_ham_train_folders != "": ham_training_folders = options.imap_ham_train_folders.split() for fol in ham_training_folders: self.TrainFolder(fol, False) if options.imap_spam_train_folders != "": spam_training_folders = options.imap_spam_train_folders.split(' ' ) for fol in spam_training_folders: self.TrainFolder(fol, True) self.classifier.store() if options.verbose: print "Training took", time.time() - t, "seconds."
2457cec0eaf41f9285d252974e2f4c340ddc6ed2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/2457cec0eaf41f9285d252974e2f4c340ddc6ed2/imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2197, 267, 12, 2890, 4672, 309, 702, 18, 11369, 30, 268, 273, 813, 18, 957, 1435, 309, 702, 18, 12161, 67, 31698, 67, 9754, 67, 16064, 480, 1408, 30, 366, 301, 67, 17584, 67, 16064, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2197, 267, 12, 2890, 4672, 309, 702, 18, 11369, 30, 268, 273, 813, 18, 957, 1435, 309, 702, 18, 12161, 67, 31698, 67, 9754, 67, 16064, 480, 1408, 30, 366, 301, 67, 17584, 67, 16064, ...
AbelianGroup( 2, [0, 64])
Abelian Group isomorphic to Z x Z/64Z
def __init__(self, ambient, gens, names="f"): """ EXAMPLES: sage: F = AbelianGroup(5,[30,64,729],names = list("abcde")) sage: a,b,c,d,e = F.gens() sage: F.subgroup([a^3,b]) AbelianGroup( 2, [0, 0]) sage: F.subgroup([c]) AbelianGroup( 3, [2, 3, 5]) sage: F.subgroup([a,c]) AbelianGroup( 4, [0, 2, 3, 5]) sage: F.subgroup([a,b*c]) AbelianGroup( 2, [0, 0]) sage: F.subgroup([b*c,d]) AbelianGroup( 2, [0, 64]) sage: F.subgroup([a*b,c^6,d],names = list("xyz")) AbelianGroup( 3, [0, 5, 64]) sage: G = F.subgroup([a*b,c^6,d],names = list("xyz")) sage: G AbelianGroup( 3, [0, 5, 64]) sage: print G Subgroup of Abelian group on 5 generators (a, b, c, d, e) with invariants [0, 0, 30, 64, 729] generated by [a*b, c^6, d] with elementary divisors [0, 5, 64] sage: x,y,z = G.gens() sage: x.order() Infinity sage: y.order() 5 sage: z.order() 64 sage: A = AbelianGroup(5,[3, 5, 5, 7, 8], names = "abcde") sage: a,b,c,d,e = A.gens() sage: A.subgroup([a,b]) AbelianGroup( 2, [3, 5]) sage: A.subgroup([a,b,c,d^2,e]) AbelianGroup( 5, [3, 5, 5, 7, 8]) sage: A.subgroup([a,b,c,d^2,e^2]) AbelianGroup( 5, [3, 4, 5, 5, 7]) sage: B = A.subgroup([a^3,b,c,d,e^2]); B AbelianGroup( 4, [4, 5, 5, 7]) sage: B.invariants() [4, 5, 5, 7] sage: A = AbelianGroup(4,[1009, 2003, 3001, 4001], names = "abcd") sage: a,b,c,d = A.gens() sage: B = A.subgroup([a^3,b,c,d]) sage: B.invariants() [1009, 2003, 3001, 4001] sage: A.order() 24266473210027 sage: B.order() 24266473210027 sage: A = AbelianGroup(4,[1008, 2003, 3001, 4001], names = "abcd") sage: a,b,c,d = A.gens() sage: B = A.subgroup([a^3,b,c,d]) sage: B AbelianGroup( 6, [3, 7, 16, 2003, 3001, 4001]) sage: print B Subgroup of Abelian group on 4 generators (a, b, c, d) with invariants [1008, 2003, 3001, 4001] generated by [a^3, b, c, d] with elementary divisors [3, 7, 16, 2003, 3001, 4001] Infinite groups can also be handled: sage: G = AbelianGroup([3,4,0], names = "abc") sage: a,b,c = G.gens() sage: F = G.subgroup([a,b^2,c]); F AbelianGroup( 3, [0, 3, 4]) sage: F.invariants() [0, 3, 4] sage: F.gens() [a, b^2, c] sage: F.order() Infinity
474e9cd21e5543c10385340d5e9747ad7d0f1773 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/474e9cd21e5543c10385340d5e9747ad7d0f1773/abelian_group.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13232, 1979, 16, 314, 773, 16, 1257, 1546, 74, 6, 4672, 3536, 225, 5675, 8900, 11386, 30, 272, 410, 30, 478, 273, 9771, 292, 2779, 1114, 12, 25, 16, 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, 1001, 2738, 972, 12, 2890, 16, 13232, 1979, 16, 314, 773, 16, 1257, 1546, 74, 6, 4672, 3536, 225, 5675, 8900, 11386, 30, 272, 410, 30, 478, 273, 9771, 292, 2779, 1114, 12, 25, 16, 63...
STRING '"ABC"' (1, 13) (1, 19) >>> dump_tokens("x = r'abc' + r'ABC' + R'ABC' + R'ABC'") NAME 'x' (1, 0) (1, 1) OP '=' (1, 2) (1, 3) STRING "r'abc'" (1, 4) (1, 11) OP '+' (1, 12) (1, 13) STRING "r'ABC'" (1, 14) (1, 21) OP '+' (1, 22) (1, 23) STRING "R'ABC'" (1, 24) (1, 31) OP '+' (1, 32) (1, 33) STRING "R'ABC'" (1, 34) (1, 41)
STRING "r'ABC'" (1, 13) (1, 19) OP '+' (1, 20) (1, 21) STRING "R'ABC'" (1, 22) (1, 28) OP '+' (1, 29) (1, 30) STRING "R'ABC'" (1, 31) (1, 37)
... " def y(m): # A whitespace after the colon\\n"
06160749de86348e8e0743d0ff468f96f0c89d4c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/06160749de86348e8e0743d0ff468f96f0c89d4c/test_tokenize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 6647, 315, 225, 1652, 677, 12, 81, 4672, 468, 432, 7983, 1839, 326, 13336, 1695, 82, 6, 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, 1372, 6647, 315, 225, 1652, 677, 12, 81, 4672, 468, 432, 7983, 1839, 326, 13336, 1695, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return result and result != 1 and _compare_available
return _compare_available
def GeneratePNGDiff(file1, file2, output_file): _compare_available = False; try: executable = path_utils.ImageDiffPath("Debug") cmd = [executable, '--diff', file1, file2, output_file] _compare_available = True; except Exception, e: print "No command line to compare %s and %s : %s" % (file1, file2, e) result = 1 if _compare_available: try: result = subprocess.call(cmd); except OSError, e: if e.errno == errno.ENOENT or e.errno == errno.EACCES: _compare_available = False print "No possible comparison between %s and %s." % (file1, file2) else: raise e if not result: print "The given PNG images were the same!" return result and result != 1 and _compare_available
1765462345f54da8f4beafbc742493a2d8d30bbc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/1765462345f54da8f4beafbc742493a2d8d30bbc/failure_finder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 23092, 5938, 12, 768, 21, 16, 585, 22, 16, 876, 67, 768, 4672, 389, 9877, 67, 5699, 273, 1083, 31, 775, 30, 9070, 273, 589, 67, 5471, 18, 2040, 5938, 743, 2932, 2829, 7923, 179...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 23092, 5938, 12, 768, 21, 16, 585, 22, 16, 876, 67, 768, 4672, 389, 9877, 67, 5699, 273, 1083, 31, 775, 30, 9070, 273, 589, 67, 5471, 18, 2040, 5938, 743, 2932, 2829, 7923, 179...
acc = l.product_id.categ_id.property_account_expense_categ.id
acc = l.product_id.categ_id.property_account_expense_categ
def action_invoice_create(self, cr, uid, ids): res = False invoice_obj = self.pool.get('account.invoice') for exp in self.browse(cr, uid, ids): lines = [] for l in exp.line_ids: tax_id = [] if l.product_id: acc = l.product_id.product_tmpl_id.property_account_expense.id if not acc: acc = l.product_id.categ_id.property_account_expense_categ.id tax_id = [x.id for x in l.product_id.supplier_taxes_id] else: acc = self.pool.get('ir.property').get(cr, uid, 'property_account_expense_categ', 'product.category') if not acc: raise osv.except_osv(_('Error !'), _('Please configure Default Expanse account for Product purchase, `property_account_expense_categ`'))
22ba7bca40c89e239ee701497860421e5e244866 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/22ba7bca40c89e239ee701497860421e5e244866/hr_expense.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 16119, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 400, 273, 1083, 9179, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 16119, 6134, 364, 1329, 316, 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, 1301, 67, 16119, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 400, 273, 1083, 9179, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 16119, 6134, 364, 1329, 316, 365, ...
p = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE )
p = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
def __init__( self ): self.url = 'svn://nowhere.com/project/unknown' self.root = 'svn://nowhere.com/project' self.branch = 'unknown' self.uuid = '00000000-0000-0000-0000-000000000000'; self.rev = 0 self.date = '0000-00-00 00:00:00 -0000' self.wcversion = 'exported' self.official = 0 self.type = 'unofficial'
914b9b7604abc6d54ae1ad7bf95f381663d14ec4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13161/914b9b7604abc6d54ae1ad7bf95f381663d14ec4/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 262, 30, 365, 18, 718, 4202, 273, 296, 31505, 2207, 3338, 14852, 18, 832, 19, 4406, 19, 8172, 11, 365, 18, 3085, 1377, 273, 296, 31505, 2207, 3338, 14852, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 262, 30, 365, 18, 718, 4202, 273, 296, 31505, 2207, 3338, 14852, 18, 832, 19, 4406, 19, 8172, 11, 365, 18, 3085, 1377, 273, 296, 31505, 2207, 3338, 14852, 18,...
logger.debug(sql)
def getTimestampOfMostRecentlyCompletedReport(cursor, logger, nowFunction=datetime.datetime.now): """ get the date of the earliest unfinished job from the 'reports' table. Only look back as far as seven days plus fifteen minutes. If the oldest job is in that final fifteen minute time segment refuse to continue because processing is too far behind.""" now = nowFunction() sql = """ select min(date_processed) from reports where '%s' < date_processed and success is null """ % (now - datetime.timedelta(7,0,15)) logger.debug(sql) try: try: earliestUnfinishedJobTimestamp = psy.singleValueSql (cursor, sql) except psy.SQLDidNotReturnSingleValue: return now # processing is completely up to date if not earliestUnfinishedJobTimestamp: return now # processing is completely up to date if earliestUnfinishedJobTimestamp < now - datetime.timedelta(7): raise ProcessingIsTooFarBehind("there are unfinished jobs older than 7 days") else: return earliestUnfinishedJobTimestamp except ProcessingIsTooFarBehind: lib_util.reportExceptionAndAbort(logger)
98e1a819d757d2fba97177a926e390b99a561e7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12383/98e1a819d757d2fba97177a926e390b99a561e7e/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11940, 951, 18714, 17076, 715, 9556, 4820, 12, 9216, 16, 1194, 16, 2037, 2083, 33, 6585, 18, 6585, 18, 3338, 4672, 3536, 336, 326, 1509, 434, 326, 20674, 640, 13527, 1719, 628, 326, 296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11940, 951, 18714, 17076, 715, 9556, 4820, 12, 9216, 16, 1194, 16, 2037, 2083, 33, 6585, 18, 6585, 18, 3338, 4672, 3536, 336, 326, 1509, 434, 326, 20674, 640, 13527, 1719, 628, 326, 296,...
DoDeleteAction(item)
for sbCollection in sidebarCollections: if item in sbCollection: collection.remove(item) break else: trash.add(item)
def DoDeleteAction(item): # useful as a separate function so we can return at any point
766284c11afc705a58f5a2cb424c8a837e7b69ba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/766284c11afc705a58f5a2cb424c8a837e7b69ba/SideBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 2613, 1803, 12, 1726, 4672, 468, 5301, 487, 279, 9004, 445, 1427, 732, 848, 327, 622, 1281, 1634, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2256, 2613, 1803, 12, 1726, 4672, 468, 5301, 487, 279, 9004, 445, 1427, 732, 848, 327, 622, 1281, 1634, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
try: for filename in crazy_filenames: utf8_filename = filename.encode('utf-8') file_path = os.path.join(temp_dir, utf8_filename) _CreateFile(os.path.join(temp_dir, filename)) file_url = self.GetFileURLForPath(file_path) downloaded_file = os.path.join(download_dir, filename) os.path.exists(downloaded_file) and os.remove(downloaded_file) self.DownloadAndWaitForStart(file_url) self.WaitForAllDownloadsToComplete() downloads = self.GetDownloadsInfo().Downloads() self.assertEqual(len(downloads), len(crazy_filenames)) for filename in crazy_filenames: downloaded_file = os.path.join(download_dir, filename) self.assertTrue(os.path.exists(downloaded_file)) self.assertTrue( self._EqualFileContents(downloaded_file, os.path.join(temp_dir, filename))) os.path.exists(downloaded_file) and os.remove(downloaded_file) finally: shutil.rmtree(unicode(temp_dir))
for filename in crazy_filenames: utf8_filename = filename.encode('utf-8') file_path = os.path.join(temp_dir, utf8_filename) _CreateFile(os.path.join(temp_dir, filename)) file_url = self.GetFileURLForPath(file_path) downloaded_file = os.path.join(download_dir, filename) os.path.exists(downloaded_file) and os.remove(downloaded_file) self.DownloadAndWaitForStart(file_url) self.WaitForAllDownloadsToComplete() downloads = self.GetDownloadsInfo().Downloads() self.assertEqual(len(downloads), len(crazy_filenames)) for filename in crazy_filenames: downloaded_file = os.path.join(download_dir, filename) self.assertTrue(os.path.exists(downloaded_file)) self.assertTrue( self._EqualFileContents(downloaded_file, os.path.join(temp_dir, filename))) os.path.exists(downloaded_file) and os.remove(downloaded_file)
def _CreateFile(name): """Create and fill the given file with some junk.""" fp = open(name, 'w') # name could be unicode print >>fp, 'This is a junk file named %s. ' % repr(name) * 100 fp.close()
b305895514a6affd4ba076d5655fe86eb71be9cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/b305895514a6affd4ba076d5655fe86eb71be9cc/downloads.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1684, 812, 12, 529, 4672, 3536, 1684, 471, 3636, 326, 864, 585, 598, 2690, 525, 1683, 12123, 4253, 273, 1696, 12, 529, 16, 296, 91, 6134, 225, 468, 508, 3377, 506, 5252, 1172, 167...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1684, 812, 12, 529, 4672, 3536, 1684, 471, 3636, 326, 864, 585, 598, 2690, 525, 1683, 12123, 4253, 273, 1696, 12, 529, 16, 296, 91, 6134, 225, 468, 508, 3377, 506, 5252, 1172, 167...
return "%s(%s)" % (self.__class__, repr(self.position))
return "%s(%s)" % (self.__class__.__name__, repr(self.position))
def __repr__(self) : """A string representation of the location for debugging.""" assert self.extension == 0 return "%s(%s)" % (self.__class__, repr(self.position))
34fbf98369b53f32c18676dcd11873bcdf336bb6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/34fbf98369b53f32c18676dcd11873bcdf336bb6/SeqFeature.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 13, 294, 3536, 37, 533, 4335, 434, 326, 2117, 364, 10450, 12123, 1815, 365, 18, 6447, 422, 374, 327, 2213, 87, 9275, 87, 2225, 738, 261, 2890, 16186, 1106, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 13, 294, 3536, 37, 533, 4335, 434, 326, 2117, 364, 10450, 12123, 1815, 365, 18, 6447, 422, 374, 327, 2213, 87, 9275, 87, 2225, 738, 261, 2890, 16186, 1106, ...
return "Linear 2nd order recurrence, a(n) = 3 a(n-1) + 4 a(n-2)." def _precompute(self, how_many=150): try: f = self._f except AttributeError: self._f = recur_gen2(0,1,3,4) f = self._f self._b += [f.next() for i in range(how_many)] def _eval(self, n): if len(self._b) <= n: self._precompute(n - len(self._b) + 1) return self._b[n] def list(self, n): self._eval(n) return self._b[:n] class A015523(SloaneSequence): r""" Linear 2nd order recurrence, $a(0)=0$, $a(1)=1$ and $a(n) = 3 a(n-1) + 5 a(n-2)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A015523; a Linear 2nd order recurrence, a(n) = 3 a(n-1) + 5 a(n-2). sage: a(0) 0 sage: a(1) 1 sage: a(8) 17727 sage: a(41) 6173719566474529739091481 sage: a.list(12) [0, 1, 3, 14, 57, 241, 1008, 4229, 17727, 74326, 311613, 1306469] AUTHOR: -- Jaap Spies (2007-01-19) """ def __init__(self): SloaneSequence.__init__(self, offset=0) self._b = [] self._precompute(2) def _repr_(self): return "Linear 2nd order recurrence, a(n) = 3 a(n-1) + 5 a(n-2)." def _precompute(self, how_many=150): try: f = self._f except AttributeError: self._f = recur_gen2(0,1,3,5) f = self._f self._b += [f.next() for i in range(how_many)] def _eval(self, n): if len(self._b) <= n: self._precompute(n - len(self._b) + 1) return self._b[n] def list(self, n): self._eval(n) return self._b[:n] class A015530(SloaneSequence): r""" Linear 2nd order recurrence, $a(0)=0$, $a(1)=1$ and $a(n) = 4 a(n-1) + 3 a(n-2)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A015530;a Linear 2nd order recurrence, a(n) = 4 a(n-1) + 3 a(n-2). sage: a(0) 0 sage: a(1) 1 sage: a(2) 4 sage: a.offset 0 sage: a(8) 41008 sage: a.list(9) [0, 1, 4, 19, 88, 409, 1900, 8827, 41008] AUTHOR: -- Jaap Spies (2007-01-19) """ def __init__(self): SloaneSequence.__init__(self, offset=0) self._b = [] self._precompute(2) def _repr_(self): return "Linear 2nd order recurrence, a(n) = 4 a(n-1) + 3 a(n-2)." def _precompute(self, how_many=50): try: f = self._f except AttributeError: self._f = recur_gen2(0,1,4,3) f = self._f self._b += [f.next() for i in range(how_many)] def _eval(self, n): if len(self._b) <= n: self._precompute(n - len(self._b) + 1) return self._b[n] def list(self, n): self._eval(n) return self._b[:n] class A015531(SloaneSequence): r""" Linear 2nd order recurrence, $a(0)=0$, $a(1)=1$ and $a(n) = 4 a(n-1) + 5 a(n-2)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A015531;a Linear 2nd order recurrence, a(n) = 4 a(n-1) + 5 a(n-2). sage: a(0) 0 sage: a(1) 1 sage: a(2) 4 sage: a.offset 0 sage: a(8) 65104 sage: a(60) 144560289664733924534327040115992228190104 sage: a.list(9) [0, 1, 4, 21, 104, 521, 2604, 13021, 65104] AUTHOR: -- Jaap Spies (2007-01-19) """ def __init__(self): SloaneSequence.__init__(self, offset=0) self._b = [] self._precompute(2) def _repr_(self): return "Linear 2nd order recurrence, a(n) = 4 a(n-1) + 5 a(n-2)." def _precompute(self, how_many=50): try: f = self._f except AttributeError: self._f = recur_gen2(0,1,4,5) f = self._f self._b += [f.next() for i in range(how_many)] def _eval(self, n): if len(self._b) <= n: self._precompute(n - len(self._b) + 1) return self._b[n] def list(self, n): self._eval(n) return self._b[:n] class A015551(SloaneSequence): r""" Linear 2nd order recurrence, $a(0)=0$, $a(1)=1$ and $a(n) = 4 a(n-1) + 5 a(n-2)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A015531;a Linear 2nd order recurrence, a(n) = 4 a(n-1) + 5 a(n-2). sage: a(0) 0 sage: a(1) 1 sage: a(2) 4 sage: a.offset 0 sage: a(8) 65104 sage: a(60) 144560289664733924534327040115992228190104 sage: a.list(9) [0, 1, 4, 21, 104, 521, 2604, 13021, 65104] AUTHOR: -- Jaap Spies (2007-01-19) """ def __init__(self): SloaneSequence.__init__(self, offset=0) self._b = [] self._precompute(2) def _repr_(self): return "Linear 2nd order recurrence, a(n) = 4 a(n-1) + 5 a(n-2)." def _precompute(self, how_many=50): try: f = self._f except AttributeError: self._f = recur_gen2(0,1,4,5) f = self._f self._b += [f.next() for i in range(how_many)] def _eval(self, n): if len(self._b) <= n: self._precompute(n - len(self._b) + 1) return self._b[n] def list(self, n): self._eval(n) return self._b[:n]
""" EXAMPLES: sage: sloane.A015551._repr_() 'Linear 2nd order recurrence, a(n) = 6 a(n-1) + 5 a(n-2).' """ return "Linear 2nd order recurrence, a(n) = 6 a(n-1) + 5 a(n-2)."
def _repr_(self): return "Linear 2nd order recurrence, a(n) = 3 a(n-1) + 4 a(n-2)."
d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 327, 315, 15982, 576, 4880, 1353, 25939, 16, 279, 12, 82, 13, 273, 890, 279, 12, 82, 17, 21, 13, 397, 1059, 279, 12, 82, 17, 22, 14944, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 327, 315, 15982, 576, 4880, 1353, 25939, 16, 279, 12, 82, 13, 273, 890, 279, 12, 82, 17, 21, 13, 397, 1059, 279, 12, 82, 17, 22, 14944, 2, -100, -10...
self.matches['voip'] = self._vte.match_add(lboundry +
self.matches['voip'] = self.vte.match_add(lboundry +
def update_url_matches(self, posix = True): """Update the regexps used to match URLs""" userchars = "-A-Za-z0-9" passchars = "-A-Za-z0-9,?;.:/!%$^*&~\"#'" hostchars = "-A-Za-z0-9" pathchars = "-A-Za-z0-9_$.+!*(),;:@&=?/~#%'\"" schemes = "(news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:)" user = "[" + userchars + "]+(:[" + passchars + "]+)?" urlpath = "/[" + pathchars + "]*[^]'.}>) \t\r\n,\\\"]"
9e4be9ef76f3370fe7ab026103622649755a4ef9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1032/9e4be9ef76f3370fe7ab026103622649755a4ef9/terminal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 718, 67, 8436, 12, 2890, 16, 16366, 273, 1053, 4672, 3536, 1891, 326, 3936, 1121, 1399, 358, 845, 10414, 8395, 729, 7549, 273, 3701, 37, 17, 15948, 17, 94, 20, 17, 29, 6, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 718, 67, 8436, 12, 2890, 16, 16366, 273, 1053, 4672, 3536, 1891, 326, 3936, 1121, 1399, 358, 845, 10414, 8395, 729, 7549, 273, 3701, 37, 17, 15948, 17, 94, 20, 17, 29, 6, 1...
elif path == '' or path[-1:] == '/': path = path + b
elif path == '' or path.endswith('/'): path += b
def join(a, *p): """Join two or more pathname components, inserting '/' as needed""" path = a for b in p: if b[:1] == '/': path = b elif path == '' or path[-1:] == '/': path = path + b else: path = path + '/' + b return path
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 12, 69, 16, 380, 84, 4672, 3536, 4572, 2795, 578, 1898, 9806, 4085, 16, 21079, 2023, 487, 3577, 8395, 589, 273, 279, 364, 324, 316, 293, 30, 309, 324, 10531, 21, 65, 422, 2023, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 12, 69, 16, 380, 84, 4672, 3536, 4572, 2795, 578, 1898, 9806, 4085, 16, 21079, 2023, 487, 3577, 8395, 589, 273, 279, 364, 324, 316, 293, 30, 309, 324, 10531, 21, 65, 422, 2023, ...
(s,b,p,q,f,o) = urlparse.urlparse(thisrepo.proxy) if s not in ('http', 'ftp', 'https'): raise Errors.ConfigError, 'proxy must be ftp or http[s] URL: %s' % thisrepo.proxy thisrepo.set('proxy', None)
if thisrepo.proxy: (s,b,p,q,f,o) = urlparse.urlparse(thisrepo.proxy) if s not in ('http', 'ftp', 'https'): raise Errors.ConfigError, 'proxy must be ftp or http[s] URL: %s' % thisrepo.proxy thisrepo.set('proxy', None)
def cfgParserRepo(section, yumconfig, cfgparser): """take a configparser object and extract repository information from it. section: section name to grab from cfgparser object data yumconfig: the global yumconfig to apply to this repo cfgparser: cfgparser object Returns a repos.Repository object """ thisrepo = Repository(section) thisrepo.cfgparser = cfgparser thisrepo.set('yumvar', yumconfig.yumvar) for keyword in ['proxy_username', 'proxy', 'proxy_password', 'retries', 'failovermethod', 'name']: val = cfgparser._getoption(section, keyword, yumconfig.getConfigOption(keyword)) val = variableReplace(yumconfig.yumvar, val) thisrepo.set(keyword, val) for keyword in ['gpgcheck', 'keepalive', 'enablegroups', 'enabled']: val = cfgparser._getoption(section, keyword, yumconfig.getConfigOption(keyword)) val = variableReplace(yumconfig.yumvar, val) if type(val) not in (True, False): val = str(val) if val.lower() not in BOOLEAN_STATES: raise Errors.RepoError, 'Invalid value in repo config for %s::%s' % (section, keyword) val = BOOLEAN_STATES[val.lower()] thisrepo.set(keyword, val) for (keyword, getfunc) in [('bandwidth', cfgparser.getbytes), ('throttle', cfgparser.getthrottle), ('timeout', cfgparser._getfloat)]: val = getfunc(section, keyword, yumconfig.getConfigOption(keyword)) thisrepo.set(keyword, val) # lists and weird items baseurl = cfgparser._getoption(section, 'baseurl', []) baseurls = parseList(baseurl) mirrorlistfn = cfgparser._getoption(section, 'mirrorlist', None) mirrorlistfn = variableReplace(yumconfig.yumvar, mirrorlistfn) thisrepo.set('mirrorlistfn', mirrorlistfn) thisrepo.set('baseurls', baseurls) thisrepo.set('http_caching', cfgparser.getselection( section, 'http_caching', yumconfig.getConfigOption('http_caching'), HTTP_CACHING_VALS ) ) # Parse and check gpgkey URLs gpgkeys = cfgparser._getoption(section, 'gpgkey', '') gpgkeys = variableReplace(yumconfig.yumvar, gpgkeys) gpgkeys = parseList(gpgkeys) for gpgkey in gpgkeys: (s,b,p,q,f,o) = urlparse.urlparse(gpgkey) if s not in ('http', 'ftp', 'file', 'https'): raise Errors.ConfigError, 'gpgkey must be ftp, http[s], or file URL: %s' % gpgkey thisrepo.set('gpgkey', gpgkeys) # check out the proxy url (s,b,p,q,f,o) = urlparse.urlparse(thisrepo.proxy) if s not in ('http', 'ftp', 'https'): raise Errors.ConfigError, 'proxy must be ftp or http[s] URL: %s' % thisrepo.proxy thisrepo.set('proxy', None) excludelist = cfgparser._getoption(section, 'exclude', []) excludelist = variableReplace(yumconfig.yumvar, excludelist) excludelist = parseList(excludelist) thisrepo.set('excludes', excludelist) includelist = cfgparser._getoption(section, 'includepkgs', []) includelist = variableReplace(yumconfig.yumvar, includelist) includelist = parseList(includelist) thisrepo.set('includepkgs', includelist) thisrepo.set('basecachedir', yumconfig.getConfigOption('cachedir')) return thisrepo
7fd773825d309f6a3078424ca0450d91ae9409d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/7fd773825d309f6a3078424ca0450d91ae9409d1/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2776, 2678, 8791, 12, 3464, 16, 677, 379, 1425, 16, 2776, 4288, 4672, 3536, 22188, 279, 642, 4288, 733, 471, 2608, 3352, 1779, 628, 518, 18, 225, 2442, 30, 2442, 508, 358, 11086, 628, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2776, 2678, 8791, 12, 3464, 16, 677, 379, 1425, 16, 2776, 4288, 4672, 3536, 22188, 279, 642, 4288, 733, 471, 2608, 3352, 1779, 628, 518, 18, 225, 2442, 30, 2442, 508, 358, 11086, 628, ...
suite = U.TestLoader().loadTestsFromTestCase( test )
suite.addTests( U.TestLoader().loadTestsFromTestCase( test ) )
def localTest( testclass=None, verbosity=2 ): """ Perform the BiskitTest(s) found in the scope of the calling module. After the test run, all fields of the BiskitTest instance are pushed into the global namespace so that they can be inspected in the interactive interpreter. @param testclass: BiskitTest-derived class [default: first one found] @type testclass: class @param verbosity: verbosity level of TextTestRunner @type verbosity: int @return: the test result object @rtype: unittest.TestResult @raise BiskitTestError: if there is no BiskitTest-derived class defined """ outer = getOuterNamespace() if testclass: testclasses = [testclass] else: testclasses = extractTestCases( outer ) for test in testclasses: suite = U.TestLoader().loadTestsFromTestCase( test ) runner= U.TextTestRunner(verbosity=verbosity) r = runner.run( suite ) for t in suite._tests: outer.update( t.__dict__ ) return r
4c19e08506a9ff4be6773ecd6bf934adadeda8a2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/4c19e08506a9ff4be6773ecd6bf934adadeda8a2/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 4709, 12, 1842, 1106, 33, 7036, 16, 11561, 33, 22, 262, 30, 3536, 11217, 326, 605, 291, 8691, 4709, 12, 87, 13, 1392, 316, 326, 2146, 434, 326, 4440, 1605, 18, 7360, 326, 1842, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 4709, 12, 1842, 1106, 33, 7036, 16, 11561, 33, 22, 262, 30, 3536, 11217, 326, 605, 291, 8691, 4709, 12, 87, 13, 1392, 316, 326, 2146, 434, 326, 4440, 1605, 18, 7360, 326, 1842, ...
log(msg)
if not self.found_type: log("Mime type skipped: %s (mail us if this is an error)" % mime_type)
def have_type(self, typefind, probability, caps): mime_type = caps.to_string() msg = "mime type: %s" % mime_type for t in mime_whitelist: if t in mime_type: msg += " -> accepted!" self.found_type = mime_type log(msg)
379396c6578d6b0d4b61f3821f039f5fb9768a5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/379396c6578d6b0d4b61f3821f039f5fb9768a5f/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1240, 67, 723, 12, 2890, 16, 618, 4720, 16, 11331, 16, 15788, 4672, 4892, 67, 723, 273, 15788, 18, 869, 67, 1080, 1435, 1234, 273, 315, 11757, 618, 30, 738, 87, 6, 738, 4892, 67, 723...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1240, 67, 723, 12, 2890, 16, 618, 4720, 16, 11331, 16, 15788, 4672, 4892, 67, 723, 273, 15788, 18, 869, 67, 1080, 1435, 1234, 273, 315, 11757, 618, 30, 738, 87, 6, 738, 4892, 67, 723...