rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
self.failUnlessEqual(self.hr.RunHooks(self.hpath, phase, {}), (True, []))
self.failUnlessEqual(self.hr.RunHooks(self.hpath, phase, {}), [])
def testEmpty(self): """Test no hooks""" for phase in (constants.HOOKS_PHASE_PRE, constants.HOOKS_PHASE_POST): self.failUnlessEqual(self.hr.RunHooks(self.hpath, phase, {}), (True, []))
d019f8bd60a89046f649f012954c96929d036db0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/d019f8bd60a89046f649f012954c96929d036db0/ganeti.hooks_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1921, 12, 2890, 4672, 3536, 4709, 1158, 9153, 8395, 364, 6855, 316, 261, 13358, 18, 7995, 3141, 55, 67, 8939, 4429, 67, 3670, 16, 6810, 18, 7995, 3141, 55, 67, 8939, 4429, 67, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1921, 12, 2890, 4672, 3536, 4709, 1158, 9153, 8395, 364, 6855, 316, 261, 13358, 18, 7995, 3141, 55, 67, 8939, 4429, 67, 3670, 16, 6810, 18, 7995, 3141, 55, 67, 8939, 4429, 67, 37...
msg = themedir+" already exists, unable to export theme."
msg = themedir+_(" already exists, unable to export theme.")
def export_theme(self, config, filename, newfilename, save_pattern): tmpdir = tempfile.gettempdir() themedir = os.path.join(tmpdir, filename) themefile = os.path.join(tmpdir, filename+'.awn-theme') if os.path.exists(themefile): os.remove(themefile) if os.path.exists(themedir): shutil.rmtree(themedir) if os.path.exists(themedir): self.hide_export_dialog(None) msg = themedir+" already exists, unable to export theme." self.theme_message(msg) return
1dd4cdd2df8bc5b53c4886eb8af47cf699e05db1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8416/1dd4cdd2df8bc5b53c4886eb8af47cf699e05db1/awnClass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 7997, 12, 2890, 16, 642, 16, 1544, 16, 394, 3459, 16, 1923, 67, 4951, 4672, 20213, 273, 13275, 18, 588, 5814, 1214, 1435, 2182, 23210, 273, 1140, 18, 803, 18, 5701, 12, 5645,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 7997, 12, 2890, 16, 642, 16, 1544, 16, 394, 3459, 16, 1923, 67, 4951, 4672, 20213, 273, 13275, 18, 588, 5814, 1214, 1435, 2182, 23210, 273, 1140, 18, 803, 18, 5701, 12, 5645,...
def __detach_img_loop(self):
def _detach_img_loop(self):
def __detach_img_loop(self): """ Detaches the image file from the loopback device. """ logging.debug('Detaching image %s from loop device %s', self.img, self.loop) try: cmd = 'losetup -d %s' % self.loop utils.system(cmd) except error.CmdError, e: e_msg = ('Error detaching image %s from loop device %s: %s' % (self.loop, e)) raise error.AutotestError(e_msg)
19d20874c897f5bf38b3aeae31edd6def4e52bcc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/19d20874c897f5bf38b3aeae31edd6def4e52bcc/base_partition.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8238, 497, 67, 6081, 67, 6498, 12, 2890, 4672, 3536, 17867, 281, 326, 1316, 585, 628, 326, 28811, 2346, 18, 3536, 2907, 18, 4148, 2668, 17650, 310, 1316, 738, 87, 628, 2798, 2346, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8238, 497, 67, 6081, 67, 6498, 12, 2890, 4672, 3536, 17867, 281, 326, 1316, 585, 628, 326, 28811, 2346, 18, 3536, 2907, 18, 4148, 2668, 17650, 310, 1316, 738, 87, 628, 2798, 2346, ...
def articles(self, recurse=False, startFrom=None):
def articles(self, recurse=False, startFrom=None, cacheResults=False):
def articles(self, recurse=False, startFrom=None): """ Yields all articles of the current category.
04602605952634920d9232a69352ab6a8ad4169d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/04602605952634920d9232a69352ab6a8ad4169d/catlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15828, 12, 2890, 16, 11502, 33, 8381, 16, 787, 1265, 33, 7036, 16, 1247, 3447, 33, 8381, 4672, 3536, 31666, 87, 777, 15828, 434, 326, 783, 3150, 18, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15828, 12, 2890, 16, 11502, 33, 8381, 16, 787, 1265, 33, 7036, 16, 1247, 3447, 33, 8381, 4672, 3536, 31666, 87, 777, 15828, 434, 326, 783, 3150, 18, 2, -100, -100, -100, -100, -100, -1...
sage: T = CrystalOfTableaux(['C',2], shape = [2,1]) sage: T.check() True
sage: T = CrystalOfTableaux(['A',2], shape = []) sage: T.list() [[]] sage: T = CrystalOfTableaux(['C',2], shape = [1]) sage: T.check() True sage: T.list() [[[1]], [[2]], [[-2]], [[-1]]]
def positionsOfUnmatchedPlus(self, i):
09278017c3ab124b13ee4727fc8b7b57496d5405 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/09278017c3ab124b13ee4727fc8b7b57496d5405/tensor_product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6865, 951, 984, 11073, 13207, 12, 2890, 16, 277, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6865, 951, 984, 11073, 13207, 12, 2890, 16, 277, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
para = paragraph_stream(stream, 'p', {}, parameters.getSampleStyleSheet())
para = paragraph_stream(stream, 'p', {}, parameters)
def test_formatting(self): parameters = Param() data = '<p>TXT <i>TEXT<u>TEXT</u></i></p>' stream = XMLParser(data) stream.next() para = paragraph_stream(stream, 'p', {}, parameters.getSampleStyleSheet()) self.assertEqual(para.text, '<para>TXT <i>TEXT<u>TEXT</u></i></para>')
e3c78fc65729ed0a33412c3127995be39d356e50 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/e3c78fc65729ed0a33412c3127995be39d356e50/test_rml2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2139, 1787, 12, 2890, 4672, 1472, 273, 3014, 1435, 501, 273, 2368, 84, 34, 29399, 411, 77, 34, 5151, 32, 89, 34, 5151, 1757, 89, 4695, 77, 4695, 84, 1870, 1407, 273, 3167, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2139, 1787, 12, 2890, 4672, 1472, 273, 3014, 1435, 501, 273, 2368, 84, 34, 29399, 411, 77, 34, 5151, 32, 89, 34, 5151, 1757, 89, 4695, 77, 4695, 84, 1870, 1407, 273, 3167, ...
if opts:
if opts and args:
def mangle_signature(sig, max_chars=30): """ Reformat function signature to a more compact form. """ sig = re.sub(r"^\((.*)\)$", r"\1", sig) + ", " r = re.compile(r"(?P<name>[a-zA_Z0-9_*]+)(?P<default>=.*?)?, ") items = r.findall(sig) args = [] opts = [] total_len = 4 for name, default in items: if default: opts.append(name) else: args.append(name) total_len += len(name) + 2 if total_len > max_chars: if opts: opts.append('...') else: args.append('...') break if opts: sig = ", ".join(args) + "[, " + ", ".join(opts) + "]" else: sig = ", ".join(args) sig = unicode(sig).replace(u" ", u"\u00a0") return u"(%s)" % sig
f9272dc77713d95e424e925fe008c126cdd996ee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5532/f9272dc77713d95e424e925fe008c126cdd996ee/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 4341, 67, 8195, 12, 7340, 16, 943, 67, 7549, 33, 5082, 4672, 3536, 868, 2139, 445, 3372, 358, 279, 1898, 6739, 646, 18, 225, 3536, 3553, 273, 283, 18, 1717, 12, 86, 6, 17134, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 4341, 67, 8195, 12, 7340, 16, 943, 67, 7549, 33, 5082, 4672, 3536, 868, 2139, 445, 3372, 358, 279, 1898, 6739, 646, 18, 225, 3536, 3553, 273, 283, 18, 1717, 12, 86, 6, 17134, 12...
rospy.loginfo("spd: %s, ang: %s", speed, angular_rate)
def send_angular_rate_command(self, angular_rate, speed): rospy.loginfo("spd: %s, ang: %s", speed, angular_rate) self.outgoingUDP.sendto(packets.make_angular_rate_driver_packet(angular_rate, speed), self.address)
f5cd2d321b5581e63d79c668f12bb71bb38c5667 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14739/f5cd2d321b5581e63d79c668f12bb71bb38c5667/twist_receiver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 13077, 67, 5141, 67, 3076, 12, 2890, 16, 11759, 67, 5141, 16, 8632, 4672, 365, 18, 31891, 20352, 18, 4661, 869, 12, 28717, 18, 6540, 67, 13077, 67, 5141, 67, 7407, 67, 11482,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 13077, 67, 5141, 67, 3076, 12, 2890, 16, 11759, 67, 5141, 16, 8632, 4672, 365, 18, 31891, 20352, 18, 4661, 869, 12, 28717, 18, 6540, 67, 13077, 67, 5141, 67, 7407, 67, 11482,...
self.static_page("templates/landing.html", "/") class About(StaticPage): def get(self): self.static_page("templates/about.html", "/about") class FAQ(StaticPage): def get(self): self.static_page("templates/faq.html", "/faq") class Support(StaticPage): def get(self): self.static_page("templates/support.html", "/support") def post(self): mail.send_mail(sender="jtolds@gmail.com", to="jtolds@gmail.com", subject=self.request.get('subject'), body="Sender: %s\n---\n%s" % ( self.request.get('sender_email'), self.request.get('message'))) self.static_page("templates/sent.html", "/support")
return self.redirect("/") post = get
def get(self): self.static_page("templates/landing.html", "/")
74794d4bd49e99e14321270fb33f583c6f630b8d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4708/74794d4bd49e99e14321270fb33f583c6f630b8d/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 365, 18, 3845, 67, 2433, 2932, 8502, 19, 15733, 310, 18, 2620, 3113, 4016, 13, 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, 336, 12, 2890, 4672, 365, 18, 3845, 67, 2433, 2932, 8502, 19, 15733, 310, 18, 2620, 3113, 4016, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
syslog(LOG_INFO, "Asserted metadata for %s: %s, %s" % (client, image, profile)) clientdata = [cli for cli in self.element.findall("Client") if cli.get('name') == client] if len(clientdata) == 0: syslog(LOG_INFO, "Added Metadata for nonexistent client %s" % client) SubElement(self.element, "Client", name=client, image=image, profile=profile) self.WriteBack() elif len(clientdata) == 1: clientdata[0].attrib['profile'] = profile clientdata[0].attrib['image'] = image self.WriteBack()
syslog(LOG_INFO, "Metadata: Asserted metadata for %s: %s, %s" % (client, image, profile)) [self.element.remove(cli) for cli in self.element.findall("Client") if cli.get('name') == client] SubElement(self.element, "Client", name=client, image=image, profile=profile) self.WriteBack()
def FetchMetadata(self, client, image=None, profile=None): '''Get metadata for client''' if ((image != None) and (profile != None)): # Client asserted profile/image self.clients[client] = (image, profile) syslog(LOG_INFO, "Asserted metadata for %s: %s, %s" % (client, image, profile)) clientdata = [cli for cli in self.element.findall("Client") if cli.get('name') == client] if len(clientdata) == 0: syslog(LOG_INFO, "Added Metadata for nonexistent client %s" % client) SubElement(self.element, "Client", name=client, image=image, profile=profile) self.WriteBack() elif len(clientdata) == 1: # already existing client clientdata[0].attrib['profile'] = profile clientdata[0].attrib['image'] = image self.WriteBack() else: # no asserted metadata if self.clients.has_key(client): (image, profile) = self.clients[client] else: # default profile stuff goes here (image, profile) = (self.defaults['image'], self.defaults['profile']) SubElement(self.element, "Client", name=client, profile=profile, image=image) self.WriteBack()
d3fb8f59ae8659c4d1d7f2a65d3a8322c8439829 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/d3fb8f59ae8659c4d1d7f2a65d3a8322c8439829/Metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8065, 2277, 12, 2890, 16, 1004, 16, 1316, 33, 7036, 16, 3042, 33, 7036, 4672, 9163, 967, 1982, 364, 1004, 26418, 309, 14015, 2730, 480, 599, 13, 471, 261, 5040, 480, 599, 3719, 30, 468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8065, 2277, 12, 2890, 16, 1004, 16, 1316, 33, 7036, 16, 3042, 33, 7036, 4672, 9163, 967, 1982, 364, 1004, 26418, 309, 14015, 2730, 480, 599, 13, 471, 261, 5040, 480, 599, 3719, 30, 468...
condDict = {"TransformationID":transIDs,"WmsStatus":'Reserved'}
condDict = {"TransformationID":transID,"WmsStatus":'Reserved'}
def checkReservedTasks(self): gLogger.info("checkReservedTasks: Checking Reserved tasks") # Get the transformations which should be checked status = self.am_getOption('CheckReservedStatus',['Active','Stopped']) res = self._selectTransformations(transType=self.transType,status=status,agentType=[]) if not res['OK']: return res for transformation in res['Value']: transID = transformation['TransformationID'] # Select the tasks which have been in Reserved status for more than 1 hour for selected transformations condDict = {"TransformationID":transIDs,"WmsStatus":'Reserved'} time_stamp_older = str(datetime.datetime.utcnow() - datetime.timedelta(hours=1)) time_stamp_newer = str(datetime.datetime.utcnow() - datetime.timedelta(days=7)) res = self.transClient.getTransformationTasks(condDict=condDict,older=time_stamp_older,newer=time_stamp_newer, timeStamp='LastUpdateTime') if not res['OK']: gLogger.error("checkReservedTasks: Failed to get Reserved tasks for transformation", "%s %s" % (transID,res['Message'])) continue if not res['Value']: gLogger.info("checkReservedTasks: No Reserved tasks found for transformation %s" % transID) continue res = self.checkReservedTasks(taskNameList) if not res['OK']: gLogger.info("checkReservedTasks: No Reserved tasks found for transformation %s" % transID) continue noTasks = res['Value']['NoTasks'] taskNameIDs = res['Value']['TaskNameIDs'] # For the tasks with no associated request found re-set the status of the task in the transformationDB for taskName in noTasks: transID,taskID = taskName.split('_') gLogger.info("checkReservedTasks: Resetting status of %s to Reserved as no associated task found" % (taskName)) res = self.transClient.setTaskStatus(int(transID),int(taskID),'Created') if not res['OK']: gLogger.warn("checkReservedTasks: Failed to update task status and ID after recovery", "%s %s" % (taskName,res['Message'])) # For the tasks for which an associated request was found update the task details in the transformationDB for taskName,extTaskID in taskNameIDs.items(): transID,taskID = taskName.split('_') gLogger.info("checkReservedTasks: Resetting status of %s to Created with ID %s" % (taskName,extTaskID)) res = self.transClient.setTaskStatusAndWmsID(int(transID),int(taskID),'Submitted',str(extTaskID)) if not res['OK']: gLogger.warn("checkReservedTasks: Failed to update task status and ID after recovery", "%s %s" % (taskName,res['Message'])) gLogger.info("checkReservedTasks: Updating of reserved tasks complete") return S_OK()
3b03249acce9feb99385318d7d4ddb5120b6ca3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/3b03249acce9feb99385318d7d4ddb5120b6ca3d/TaskManagerAgentBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 10435, 6685, 12, 2890, 4672, 314, 3328, 18, 1376, 2932, 1893, 10435, 6685, 30, 24471, 16237, 4592, 7923, 468, 968, 326, 19245, 1492, 1410, 506, 5950, 1267, 273, 365, 18, 301, 67, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 10435, 6685, 12, 2890, 4672, 314, 3328, 18, 1376, 2932, 1893, 10435, 6685, 30, 24471, 16237, 4592, 7923, 468, 968, 326, 19245, 1492, 1410, 506, 5950, 1267, 273, 365, 18, 301, 67, 58...
js_document_mode = request.REQUEST.get('doc_mode')
js_document_mode = request.REQUEST.get('js_doc_mode')
def Render(request, template, params={}, category=None): """Wrapper function to render templates with global and category vars.""" params['app_title'] = settings.APP_TITLE params['version_id'] = os.environ['CURRENT_VERSION_ID'] params['build'] = settings.BUILD params['resource_version'] = custom_filters.get_resource_version() params['epoch'] = int(time.time()) # we never want o=xhr in our request_path, right? params['request_path'] = request.get_full_path().replace('&o=xhr', '') params['request_path_lastbit'] = re.sub('^.+\/([^\/]+$)', '\\1', request.path) params['request_path_noparams'] = request.path params['current_ua_string'] = request.META.get('HTTP_USER_AGENT') if params['current_ua_string']: js_user_agent_string = request.REQUEST.get('js_ua') js_document_mode = request.REQUEST.get('doc_mode') ua = models.user_agent.UserAgent.factory(params['current_ua_string'], js_user_agent_string=js_user_agent_string, js_document_mode=js_document_mode) #params['current_ua'] = ua.pretty() params['current_ua'] = ua params['chromeframe_enabled'] = request.COOKIES.get( 'browserscope-chromeframe-enabled', '0') params['app_categories'] = [] params['is_admin'] = users.is_current_user_admin() current_user = users.get_current_user() if current_user: params['user_id'] = current_user.user_id() params['is_elsigh'] = current_user.nickname() == 'elsigh' else: params['user_id'] = None params['is_elsigh'] = False params['user'] = current_user params['sign_in'] = users.create_login_url(request.get_full_path()) params['sign_out'] = users.create_logout_url('/') forced_categories = [ c for c in (category, params.get('stats_table_category', None)) if c] for test_set in all_test_sets.GetVisibleTestSets(forced_categories): params['app_categories'].append((test_set.category, test_set.category_name)) if category == test_set.category: # Select the category of the current page. params['app_category'] = test_set.category params['app_category_name'] = test_set.category_name if (category and template not in (TEST_DRIVER_TPL, MULTI_TEST_DRIVER_TPL, MULTI_TEST_FRAMESET_TPL, ABOUT_TPL)): template = '%s/%s' % (category, template) mimetype = 'text/html' if params.has_key('mimetype'): mimetype = params['mimetype'] return shortcuts.render_to_response(template, params, mimetype=mimetype)
bc59a0163627cf0f1755b0c5920e7287dadf1a10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5745/bc59a0163627cf0f1755b0c5920e7287dadf1a10/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6987, 12, 2293, 16, 1542, 16, 859, 28793, 3150, 33, 7036, 4672, 3536, 3611, 445, 358, 1743, 5539, 598, 2552, 471, 3150, 4153, 12123, 859, 3292, 2910, 67, 2649, 3546, 273, 1947, 18, 7215,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6987, 12, 2293, 16, 1542, 16, 859, 28793, 3150, 33, 7036, 4672, 3536, 3611, 445, 358, 1743, 5539, 598, 2552, 471, 3150, 4153, 12123, 859, 3292, 2910, 67, 2649, 3546, 273, 1947, 18, 7215,...
self.matcher = util.matcher(repo.root, inc=inc, exc=exc)[1]
self.matcher = util.matcher(repo.root, inc=kwtools['inc'], exc=kwtools['exc'])[1]
def __init__(self, ui, repo, inc, exc): self.ui = ui self.repo = repo self.matcher = util.matcher(repo.root, inc=inc, exc=exc)[1] self.restrict = kwtools['hgcmd'] in restricted.split()
f0f2f142857321e7962ce6419c8ae2230b506410 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/f0f2f142857321e7962ce6419c8ae2230b506410/keyword.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5915, 16, 3538, 16, 7290, 16, 3533, 4672, 365, 18, 4881, 273, 5915, 365, 18, 7422, 273, 3538, 365, 18, 22761, 273, 1709, 18, 22761, 12, 7422, 18, 3085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5915, 16, 3538, 16, 7290, 16, 3533, 4672, 365, 18, 4881, 273, 5915, 365, 18, 7422, 273, 3538, 365, 18, 22761, 273, 1709, 18, 22761, 12, 7422, 18, 3085, ...
cond,typ=legacy_codes[code]
cond=legacy_codes[code] typ,x=stanza_errors[cond]
def upgrade(self): if not self.node.hasProp("code"): code=None else: try: code=int(self.node.prop("code")) except ValueError,KeyError: code=None if code and legacy_codes.has_key(code): cond,typ=legacy_codes[code] else: cond=None typ="cancel" if not self.node.hasProp("type"): self.node.setProp("type",typ) condition=self.xpath_eval("ns:*",{'ns':self.ns}) if condition: return elif cond is None: condition=self.node.newChild(None,"internal-server-error",None) ns=condition.newNs(self.ns,None) condition.setNs(ns) condition=self.node.newChild(None,"unknown-legacy-error",None) ns=condition.newNs(PYXMPP_ERROR_NS.ns,None) condition.setNs(ns) else: condition=self.node.newChild(None,cond,None) ns=condition.newNs(self.ns,None) condition.setNs(ns)
fd56a1cbfc7601f40ffa88d6d9e8e24e70835a8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/fd56a1cbfc7601f40ffa88d6d9e8e24e70835a8b/error.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8400, 12, 2890, 4672, 309, 486, 365, 18, 2159, 18, 5332, 4658, 2932, 710, 6, 4672, 981, 33, 7036, 469, 30, 775, 30, 981, 33, 474, 12, 2890, 18, 2159, 18, 5986, 2932, 710, 6, 3719, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8400, 12, 2890, 4672, 309, 486, 365, 18, 2159, 18, 5332, 4658, 2932, 710, 6, 4672, 981, 33, 7036, 469, 30, 775, 30, 981, 33, 474, 12, 2890, 18, 2159, 18, 5986, 2932, 710, 6, 3719, ...
raise error_reply, resp
raise NNTPReplyError(resp)
def group(self, name): """Process a GROUP command. Argument: - group: the group name Returns: - resp: server response if succesful - count: number of articles (string) - first: first article number (string) - last: last article number (string) - name: the group name"""
4e07be6953691f89f9e6cbb75dc0fc194ecbf3e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4e07be6953691f89f9e6cbb75dc0fc194ecbf3e8/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1041, 12, 2890, 16, 508, 4672, 3536, 2227, 279, 13839, 1296, 18, 225, 5067, 30, 300, 1041, 30, 326, 1041, 508, 2860, 30, 300, 1718, 30, 1438, 766, 309, 8667, 764, 2706, 300, 1056, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1041, 12, 2890, 16, 508, 4672, 3536, 2227, 279, 13839, 1296, 18, 225, 5067, 30, 300, 1041, 30, 326, 1041, 508, 2860, 30, 300, 1718, 30, 1438, 766, 309, 8667, 764, 2706, 300, 1056, 30, ...
order = [portlet_id for portlet_id in portletsdata[manager_name]['order'] if portlet_id in portletsdata[manager_name].keys()] if order: portlets._order = order.split(',')
def setData(self, portletsdata, metadata): """create or updates portlet informations """ for manager_name in portletsdata.keys(): column = queryUtility(IPortletManager, name=manager_name, context=self.object) if column is None: Acontinue #ok we have a portlet manager #get all current assigned portlets portlets = getMultiAdapter((self.object, column,), IPortletAssignmentMapping, context=self.object) #set order and filter out not transfered portlets order = [portlet_id for portlet_id in portletsdata[manager_name]['order'] if portlet_id in portletsdata[manager_name].keys()] if order: portlets._order = order.split(',') #set blackliststatus blacklist = getMultiAdapter((self.object, column), ILocalPortletAssignmentManager) blacklistdata = portletsdata[manager_name]['blackliststatus'] blacklist.setBlacklistStatus(GROUP_CATEGORY,blacklistdata[GROUP_CATEGORY]) blacklist.setBlacklistStatus(USER_CATEGORY,blacklistdata[USER_CATEGORY]) blacklist.setBlacklistStatus(CONTENT_TYPE_CATEGORY,blacklistdata[CONTENT_TYPE_CATEGORY]) blacklist.setBlacklistStatus(CONTEXT_CATEGORY,blacklistdata[CONTEXT_CATEGORY]) #bit clean up del portletsdata[manager_name]['blackliststatus'] del portletsdata[manager_name]['order']
b44efe95913a4ba54b02d3073e7a697c4346347a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12934/b44efe95913a4ba54b02d3073e7a697c4346347a/portlet_data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 13114, 87, 892, 16, 1982, 4672, 3536, 2640, 578, 4533, 13114, 26978, 3536, 225, 364, 3301, 67, 529, 316, 13114, 87, 892, 18, 2452, 13332, 1057, 273, 843, 6497, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 13114, 87, 892, 16, 1982, 4672, 3536, 2640, 578, 4533, 13114, 26978, 3536, 225, 364, 3301, 67, 529, 316, 13114, 87, 892, 18, 2452, 13332, 1057, 273, 843, 6497, 12, ...
MyProxyServer = "myproxy.cern.ch"
MyProxyServer = "myproxy.cern.ch";
def __writeConfFiles(self,job,workingDirectory): """ Creates configuration files necessary for the LCG job submission """ self.log.debug('Writing configuration files for LCG job submission') self.confFile1 = '%s/%s/edgLHCb1.conf' % (workingDirectory,job) confFile1 = open(self.confFile1,'w') confFile1.write("""
dfc9e624e697944ec2075e8aea40117e1b483445 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/dfc9e624e697944ec2075e8aea40117e1b483445/LCGAgentDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2626, 3976, 2697, 12, 2890, 16, 4688, 16, 20478, 2853, 4672, 3536, 10210, 1664, 1390, 4573, 364, 326, 511, 20585, 1719, 8515, 3536, 365, 18, 1330, 18, 4148, 2668, 18835, 1664, 1390, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 3976, 2697, 12, 2890, 16, 4688, 16, 20478, 2853, 4672, 3536, 10210, 1664, 1390, 4573, 364, 326, 511, 20585, 1719, 8515, 3536, 365, 18, 1330, 18, 4148, 2668, 18835, 1664, 1390, ...
if axis is not None:
if axis is not None and axis > 0:
def all(self, axis=None, out=None):
ce23e8f09f38a59b3eda64bcd0f7dcdf9fa7b8d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/ce23e8f09f38a59b3eda64bcd0f7dcdf9fa7b8d8/farray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 12, 2890, 16, 2654, 33, 7036, 16, 596, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 12, 2890, 16, 2654, 33, 7036, 16, 596, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
rng = numpy.random.RandomState(823874) random[out.rng] = numpy.random.RandomState(823874)
rng = numpy.random.RandomState(utt.fetch_seed()) random[out.rng] = numpy.random.RandomState(utt.fetch_seed())
def test_setitem(self):
767a7312c152b7ed8872e5185c2457d0aa95a8d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/767a7312c152b7ed8872e5185c2457d0aa95a8d0/test_shared_randomstreams.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 1726, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 1726, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
logging.info("Created system group %s." % styles.stylize(styles.ST_NAME, group_name))
logging.info("Created system group %s." % styles.stylize(styles.ST_NAME, group_name))
def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 19233, 3163, 3621, 12, 2890, 16, 1041, 16, 16745, 33, 5510, 16, 2581, 33, 8381, 16, 3656, 67, 13490, 33, 7036, 16, 2944, 33, 8381, 4672, 3536, 1564, 326, 2619, 3252, 716, 279, 45...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 19233, 3163, 3621, 12, 2890, 16, 1041, 16, 16745, 33, 5510, 16, 2581, 33, 8381, 16, 3656, 67, 13490, 33, 7036, 16, 2944, 33, 8381, 4672, 3536, 1564, 326, 2619, 3252, 716, 279, 45...
from types import ListType
def _repr_(self): from types import ListType if isinstance(self._deg,ListType): deg = len(self._deg) else: deg = self.degree() return "Alternating group of order %s!/2 as a permutation group"%deg
3925619b4c3cdb4af3ef6393e559ce9695805ac6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/3925619b4c3cdb4af3ef6393e559ce9695805ac6/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 309, 1549, 12, 2890, 6315, 9923, 16, 19366, 4672, 5843, 273, 562, 12, 2890, 6315, 9923, 13, 469, 30, 5843, 273, 365, 18, 21361, 1435, 327, 315, 11719, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 309, 1549, 12, 2890, 6315, 9923, 16, 19366, 4672, 5843, 273, 562, 12, 2890, 6315, 9923, 13, 469, 30, 5843, 273, 365, 18, 21361, 1435, 327, 315, 11719, 1...
if filename.endswith(".pyc"):
if filename.endswith('.pyc'):
def _reloader_thread(modification_callback): """When this function is run from the main thread, it will force other threads to exit when any modules currently loaded change. @param modification_callback: Function taking a single argument, the modified file, and is called after a modification is detected.""" mtimes = {} while True: for filename in filter(None, [getattr(module, "__file__", None) for module in sys.modules.values()]): while not os.path.isfile(filename): # Probably in an egg or zip file filename = os.path.dirname(filename) if not filename: break if not filename: # Couldn't map to physical file, so just ignore continue if filename.endswith(".pyc"): filename = filename[:-1] mtime = os.stat(filename).st_mtime if filename not in mtimes: mtimes[filename] = mtime continue if mtime > mtimes[filename]: modification_callback(filename) sys.exit(3) time.sleep(_SLEEP_TIME)
f3c0b0579f745f6bc2cba13d8c17ede0c66b463b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/f3c0b0579f745f6bc2cba13d8c17ede0c66b463b/autoreload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 266, 6714, 67, 5930, 12, 31064, 67, 3394, 4672, 3536, 9434, 333, 445, 353, 1086, 628, 326, 2774, 2650, 16, 518, 903, 2944, 1308, 7403, 358, 2427, 1347, 1281, 4381, 4551, 4203, 2549,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 266, 6714, 67, 5930, 12, 31064, 67, 3394, 4672, 3536, 9434, 333, 445, 353, 1086, 628, 326, 2774, 2650, 16, 518, 903, 2944, 1308, 7403, 358, 2427, 1347, 1281, 4381, 4551, 4203, 2549,...
name = 'Inherited from %s' % uid.cls().shortname() if not inh_groups.has_key(name): inh_groups[name] = [] inh_groups[name].append(uid)
groupname = 'Inherited from %s' % uid.cls().shortname() if not self._groupmembers.has_key(groupname): inh_groups[uid.cls()] = 1 self._groupmembers[groupname] = {} self._groupmembers[groupname][link.name()] = 1 self._anygroup[link.name()] = 1
def _add_inheritance_groups(self): for (groupname, groupmembers) in self._groups: if groupname.startswith('Inherited'): estr = '"Inherited..." is a reserved group name.' self._field_warnings.append(estr)
ab822894d6e2a7d6720010ae6c6d714b5b5fea7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/ab822894d6e2a7d6720010ae6c6d714b5b5fea7f/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 6018, 1359, 67, 4650, 12, 2890, 4672, 364, 261, 1655, 529, 16, 1041, 7640, 13, 316, 365, 6315, 4650, 30, 309, 25329, 18, 17514, 1918, 2668, 29078, 11, 4672, 5001, 313, 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, 389, 1289, 67, 6018, 1359, 67, 4650, 12, 2890, 4672, 364, 261, 1655, 529, 16, 1041, 7640, 13, 316, 365, 6315, 4650, 30, 309, 25329, 18, 17514, 1918, 2668, 29078, 11, 4672, 5001, 313, 2...
self.zone_refresh.stop_timer()
self.zone_refresh.shutdown()
def test_shutdown(self): self.zone_refresh._check_sock = self.zone_refresh._master_socket listener = threading.Thread(target = self.zone_refresh.run_timer) listener.start() self.assertTrue(listener.is_alive()) # Shut down the timer thread self.zone_refresh.stop_timer() self.assertFalse(listener.is_alive())
c5a9ab2da56fc81874bd9c434ab7907afa578f9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6792/c5a9ab2da56fc81874bd9c434ab7907afa578f9a/zonemgr_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 15132, 12, 2890, 4672, 365, 18, 3486, 67, 9144, 6315, 1893, 67, 15031, 273, 365, 18, 3486, 67, 9144, 6315, 7525, 67, 7814, 2991, 273, 17254, 18, 3830, 12, 3299, 273, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 15132, 12, 2890, 4672, 365, 18, 3486, 67, 9144, 6315, 1893, 67, 15031, 273, 365, 18, 3486, 67, 9144, 6315, 7525, 67, 7814, 2991, 273, 17254, 18, 3830, 12, 3299, 273, 365, 18,...
result.append(fileName)
result.append(os.path.join(dirName, fileName))
def getFilesToDelete(self): """ Determine the files to delete when rolling over.
1d9c60b8e89d2417c813b5b396f97ad431ecafa3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/1d9c60b8e89d2417c813b5b396f97ad431ecafa3/handlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18262, 14976, 12, 2890, 4672, 3536, 10229, 326, 1390, 358, 1430, 1347, 21793, 1879, 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, ...
[ 1, 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, 18262, 14976, 12, 2890, 4672, 3536, 10229, 326, 1390, 358, 1430, 1347, 21793, 1879, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
content_type = IsComposingMessage.content_type
def send_composing_indication(self, state, refresh, last_active=None, remote_identity=None): if self.direction == 'recvonly': raise ChatStreamError('Cannot send message on recvonly stream') content_type = IsComposingMessage.content_type if state not in ('active', 'idle'): raise ValueError('Invalid value for composing indication state') message_id = '%x' % random.getrandbits(64) content = IsComposingMessage(state=State(state), refresh=Refresh(max(refresh, 60)), last_active=LastActive(last_active or datetime.now()), content_type=ContentType('text')).toxml() if self.cpim_enabled: if remote_identity is None: remote_identity = self.remote_identity elif not self.private_messages_allowed and remote_identity != self.remote_identity: raise ChatStreamError('The remote end does not support private messages') dt = datetime.utcnow() msg = MessageCPIM(content, content_type, from_=self.local_identity, to=remote_identity, datetime=dt) self._enqueue_message(message_id, str(msg), 'message/cpim', failure_report='partial', success_report='no') else: if remote_identity is not None and remote_identity != self.remote_identity: raise ChatStreamError('Private messages are not available, because CPIM wrapper is not used') self._enqueue_message(message_id, content, content_type, failure_report='partial', success_report='no') return message_id
53d8a757b5ad03567337a6d2e9fa055bba0ab4ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/53d8a757b5ad03567337a6d2e9fa055bba0ab4ce/msrp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 832, 24014, 67, 728, 829, 12, 2890, 16, 919, 16, 4460, 16, 1142, 67, 3535, 33, 7036, 16, 2632, 67, 10781, 33, 7036, 4672, 309, 365, 18, 9855, 422, 296, 18334, 3700, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 832, 24014, 67, 728, 829, 12, 2890, 16, 919, 16, 4460, 16, 1142, 67, 3535, 33, 7036, 16, 2632, 67, 10781, 33, 7036, 4672, 309, 365, 18, 9855, 422, 296, 18334, 3700, 4278, 1...
tmp = '' if expand_entities: tmp = dtd.serialize()
tmp = dtd.serialize()
def normalizeString(text, ignorewhitespace = 1): """Normalizes string to be used as key for gettext lookup. Removes all unnecessary whitespace.""" if not ignorewhitespace: return text try: # Lets add document DTD so entities are resolved dtd = doc.intSubset() tmp = '' if expand_entities: # FIXME: we get a "Segmentation fault" in libxml2.parseMemory() when we include DTD otherwise tmp = dtd.serialize() tmp = tmp + '<norm>%s</norm>' % text except: tmp = '<norm>%s</norm>' % text try: #libxml2.replaceEntities(0) tree = libxml2.parseMemory(tmp,len(tmp)) newnode = tree.getRootElement() except: print >> sys.stderr, """Error while normalizing string as XML:\n"%s"\n""" % (text) return text normalizeNode(newnode) result = '' child = newnode.children while child: result += child.serialize('utf-8') child = child.next result = re.sub('^ ','', result) result = re.sub(' $','', result) return result
e6dcb559a16ac34361c0ffe8adf111397ed224c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11802/e6dcb559a16ac34361c0ffe8adf111397ed224c8/xml2po.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 780, 12, 955, 16, 2305, 18777, 273, 404, 4672, 3536, 26265, 533, 358, 506, 1399, 487, 498, 364, 24972, 3689, 18, 225, 20284, 777, 19908, 7983, 12123, 309, 486, 2305, 18777, 30, 327...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 780, 12, 955, 16, 2305, 18777, 273, 404, 4672, 3536, 26265, 533, 358, 506, 1399, 487, 498, 364, 24972, 3689, 18, 225, 20284, 777, 19908, 7983, 12123, 309, 486, 2305, 18777, 30, 327...
pfn = re.sub('srm://storm-fe.cr.cnaf.infn.it/','file:///storage/gpfs_storm/',surl)
pfn = re.sub('srm://storm-fe.cr.cnaf.infn.it/','file:///storage/gpfs_atlas1/',surl)
def _getPFNsLFC(guidMap, defaultSE, localsitesrm): guidReplicas = {} mapLFN = {} stUrlMap = {} fsizeMap = {} md5sumMap = {} print 'defaultSE: %s' %defaultSE # lfc_list structure stat = lfc.lfc_filestatg() # support of bulk-operation enableBulkOps = hasattr(lfc,'lfc_getreplicas') #enableBulkOps = False if enableBulkOps: print 'LFC bulk reading...' guids = guidMap.values() lfcattempts = 0 while lfcattempts<5: (res, rep_entries) = lfc.lfc_getreplicas(guids, '') if res == 0 or rep_entries != None: break lfcattempts = lfcattempts + 1 print 'End of LFC bulk reading.' for lfn,guid in guidMap.iteritems(): mapLFN[guid] = lfn for rep in rep_entries: if rep != None and ((not hasattr(rep,'errcode')) or \ (hasattr(rep,'errcode') and rep.errcode == 0)): #pat = re.compile(r'[^srm://][^/]+') pat = re.compile(r'^[^:]+://([^:/]+)') name = re.findall(pat, rep.sfn) if name: host = name[0] else: host = '' if (defaultSE and host in defaultSE) or \ rep.sfn.startswith(localsitesrm): surl = rep.sfn lfn = mapLFN[rep.guid] guidReplicas[lfn] = surl fsizeMap[lfn] = long(rep.filesize) md5sumMap[lfn] = rep.csumvalue # TURL match = re.search('^[^:]+://([^:/]+):*\d*/', surl) try: sURLHost = match.group(1) except: sURLHost = defaultSE[0] turl = [] if configLOCALPROTOCOL!='gfal' \ and not stUrlMap.has_key(sURLHost) \ and configLOCALPROTOCOL!='rfio' \ and configLOCALPROTOCOL!='file' \ and not 'ccsrm.in2p3.fr' in defaultSE: print 'Using lcg-gt for turl retrieval ...' cmd = "lcg-gt -t 60 " + surl + " " + configLOCALPROTOCOL print cmd try: signal.signal(signal.SIGALRM, ghandler) signal.alarm(240) child = popen2.Popen3(cmd,1) child.tochild.close() out=child.fromchild err=child.childerr line=out.readline() if line: match = re.search('^[^:]+://([^:/]+:*\d*)/', line) if match: turl = line.split() signal.alarm(0) except IOError: print 'lcg-gt time out !' pass signal.alarm(0) if turl and turl[0]: match = re.search('^[^:]+://([^:/]+:*\d*)/', turl[0]) tURLHost = match.group(1) stUrlMap[sURLHost] = tURLHost else: print 'LFC single reading...' # start LFC session try: lfc.lfc_startsess('','') except NameError: pass for lfn,guid in guidMap.iteritems(): mapLFN[guid] = lfn if globalVerbose: sys.stdout.write('.') sys.stdout.flush() # get replica listp = lfc.lfc_list() fr = lfc.lfc_listreplica('',guid,lfc.CNS_LIST_BEGIN,listp) while fr: if defaultSE and fr.host in defaultSE: break fr = lfc.lfc_listreplica('',guid,lfc.CNS_LIST_CONTINUE,listp) lfc.lfc_listreplica('',guid,lfc.CNS_LIST_END,listp) # found if fr: if fr.sfn.startswith(localsitesrm): surl = fr.sfn guidReplicas[lfn] = surl res = lfc.lfc_statg("",guid,stat) fsizeMap[lfn] = long(stat.filesize) md5sumMap[lfn] = stat.csumvalue # TURL match = re.search('^[^:]+://([^:/]+):*\d*/', surl) try: sURLHost = match.group(1) except: sURLHost = defaultSE[0] turl = [] if configLOCALPROTOCOL!='gfal' \ and not stUrlMap.has_key(sURLHost) \ and configLOCALPROTOCOL!='rfio' \ and configLOCALPROTOCOL!='file' \ and not 'ccsrm.in2p3.fr' in defaultSE: print 'Using lcg-gt for turl retrieval ...' cmd = "lcg-gt -t 60 " + surl + " " + configLOCALPROTOCOL try: signal.signal(signal.SIGALRM, ghandler) signal.alarm(240) child = popen2.Popen3(cmd,1) child.tochild.close() out=child.fromchild err=child.childerr line=out.readline() if line: match = re.search('^[^:]+://([^:/]+:*\d*)/', line) if match: turl = line.split() signal.alarm(0) except IOError: print 'lcg-gt time-out !' pass signal.alarm(0) if turl and turl[0]: match = re.search('^[^:]+://([^:/]+:*\d*)/', turl[0]) tURLHost = match.group(1) stUrlMap[sURLHost] = tURLHost try: lfc.lfc_endsess() except NameError: pass # Create TURL map tUrlMap = {} for lfn, surl in guidReplicas.iteritems(): if configLOCALPROTOCOL in [ "dcap", 'Xrootd', 'gsidcap' ]: match = re.search('^[^:]+://([^:/]+):*\d*/', surl) try: sURLHost = match.group(1) except: sURLHost = defaultSE[0] if stUrlMap.has_key(sURLHost): pfn = re.sub(sURLHost,stUrlMap[sURLHost],surl) else: if not 'ccsrm.in2p3.fr' in defaultSE: pfn = 'gfal:'+surl else: pfn = surl if configLOCALPROTOCOL == "dcap" and (stUrlMap.has_key(sURLHost) or 'ccsrm.in2p3.fr' in defaultSE): pfn = re.sub('srm://','dcap://',pfn) # Hack for ccin2p3 pfn = re.sub('ccsrm','ccdcapatlas',pfn) # Hack for TRIUMF if 'srm.triumf.ca' in defaultSE: pfn = re.sub('/atlas/dq2/','//pnfs/triumf.ca/data/atlas/dq2/',pfn) pfn = re.sub('/atlas/users/','//pnfs/triumf.ca/data/atlas/users/',pfn) pfn = re.sub('22125/atlas/','22125//pnfs/triumf.ca/data/atlas/',pfn) # Hack for SFU if 'wormhole.westgrid.ca' in defaultSE: pfn = re.sub('/atlas/dq2/','//pnfs/sfu.ca/data/atlas/dq2/',pfn) pfn = re.sub('/atlas/users/','//pnfs/sfu.ca/data/atlas/users/',pfn) pfn = re.sub('22125/atlas/','22125//pnfs/sfu.ca/data/atlas/',pfn) elif configLOCALPROTOCOL == "Xrootd": pfn = re.sub('srm://','root://',pfn) # Hack for ccin2p3 pfn = re.sub('ccsrm','ccxroot',pfn) pfn = re.sub('ccdcamli01','ccxroot',pfn) pfn = re.sub(':1094',':1094/',pfn) elif configLOCALPROTOCOL == "gsidcap": pfn = re.sub('srm://','gfal:gsidcap://',pfn) pfn = re.sub('22128/pnfs','22128//pnfs',pfn) elif (configLOCALPROTOCOL == "rfio" and configSTORAGEROOT == '/castor' \ and not sURLHost == 'castorsc.grid.sinica.edu.tw') \ or localsitesrm.find('gla.scotgrid.ac.uk')>-1: # remove protocol and host pfn = re.sub('^[^:]+://[^/]+','',surl) # remove redundant / pfn = re.sub('^//','/',pfn) if 'srm.grid.sinica.edu.tw' in defaultSE: pfn = "rfio://castor.grid.sinica.edu.tw/?path=" + pfn else: pfn = "rfio:" + pfn elif ( configLOCALPROTOCOL == "rfio" and \ ( configSTORAGEROOT == '/dpm' or sURLHost == 'castorsc.grid.sinica.edu.tw')) \ or ( configLOCALPROTOCOL == "file" and 'storm-fe.cr.cnaf.infn.it' in defaultSE): turl = [] print 'Using lcg-gt for turl retrieval ...' cmd = "lcg-gt -t 60 " + surl + " " + configLOCALPROTOCOL print cmd try: signal.signal(signal.SIGALRM, ghandler) signal.alarm(240) child = popen2.Popen3(cmd,1) child.tochild.close() out=child.fromchild err=child.childerr line=out.readline() if line and line.find('rfio://')>=0: turl = [line.strip()] elif line and line.find('file://')>=0: turl = [line.strip()] signal.alarm(0) except IOError: print 'lcg-gt time-out !' pass signal.alarm(0) if turl and turl[0]: pfn = turl[0] elif 'storm-fe.cr.cnaf.infn.it' in defaultSE: pfn = re.sub('srm://storm-fe.cr.cnaf.infn.it/','file:///storage/gpfs_storm/',surl) else: # If CNAF TURL fails if 'storm-fe.cr.cnaf.infn.it' in defaultSE: pfn = re.sub('srm://storm-fe.cr.cnaf.infn.it/','file:///storage/gpfs_storm/',surl) else: # remove protocol and host pfn = re.sub('^[^:]+://[^/]+','',surl) # remove redundant / pfn = re.sub('^//','/',pfn) # prepend protocol pfn = configLOCALPROTOCOL + ":" + pfn # file protocol used on lustre at IFIC and LIP-LISBON (no lcg-gt) elif configLOCALPROTOCOL == "file": # remove protocol and host pfn = re.sub('^[^:]+://[^/]+','',surl) # remove redundant / pfn = re.sub('^//','/',pfn) # prepend protocol pfn = configLOCALPROTOCOL + "://" + pfn # If all fails use gfal:srm://... else: pfn = "gfal:"+surl tUrlMap[lfn] = pfn return guidReplicas, tUrlMap, fsizeMap, md5sumMap
309202ba42e88aa479428f6c3557915bc1c229ee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/309202ba42e88aa479428f6c3557915bc1c229ee/ganga-stage-in-out-dq2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 22026, 10386, 48, 4488, 12, 14066, 863, 16, 805, 1090, 16, 8985, 2997, 8864, 4672, 225, 9875, 17248, 273, 2618, 852, 9105, 50, 273, 2618, 384, 1489, 863, 273, 2618, 284, 1467, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 22026, 10386, 48, 4488, 12, 14066, 863, 16, 805, 1090, 16, 8985, 2997, 8864, 4672, 225, 9875, 17248, 273, 2618, 852, 9105, 50, 273, 2618, 384, 1489, 863, 273, 2618, 284, 1467, ...
m = "+ " + msg
m = "+ %s" % msg
def info(msg, *args): "Log an informative message" m = "+ " + msg logger.info(m, *args)
f5a94215d9063a28122dc9278fa8f77bc614636c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/f5a94215d9063a28122dc9278fa8f77bc614636c/log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 12, 3576, 16, 380, 1968, 4672, 315, 1343, 392, 13235, 1535, 883, 6, 312, 273, 13773, 738, 87, 6, 738, 1234, 1194, 18, 1376, 12, 81, 16, 380, 1968, 13, 225, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 12, 3576, 16, 380, 1968, 4672, 315, 1343, 392, 13235, 1535, 883, 6, 312, 273, 13773, 738, 87, 6, 738, 1234, 1194, 18, 1376, 12, 81, 16, 380, 1968, 13, 225, 2, -100, -100, -100,...
ids = [] if ids: self.load_completion(ids)
names = [] if names: self.load_completion(names)
def __init__(self, window, parent, model, attrs=None): if attrs is None: attrs = {} WidgetInterface.__init__(self, window, parent, model, attrs)
2d2bbf42b9cf50cc550915341ad69adccfd126c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/2d2bbf42b9cf50cc550915341ad69adccfd126c8/many2one.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2742, 16, 982, 16, 938, 16, 3422, 33, 7036, 4672, 309, 3422, 353, 599, 30, 3422, 273, 2618, 11103, 1358, 16186, 2738, 972, 12, 2890, 16, 2742, 16, 982, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2742, 16, 982, 16, 938, 16, 3422, 33, 7036, 4672, 309, 3422, 353, 599, 30, 3422, 273, 2618, 11103, 1358, 16186, 2738, 972, 12, 2890, 16, 2742, 16, 982, ...
raise error, "illegal character in group name"
raise error, "bad character in group name"
def _parse(source, state): # parse a simple pattern subpattern = SubPattern(state) while 1: if source.next in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if state.flags & SRE_FLAG_VERBOSE: # skip whitespace and comments if this in WHITESPACE: continue if this == "#": while 1: this = source.get() if this in (None, "\n"): break continue if this and this[0] not in SPECIAL_CHARS: subpattern.append((LITERAL, ord(this))) elif this == "[": # character set set = []
470ea5ab9493993b0e65842db2aa412ed9807e37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/470ea5ab9493993b0e65842db2aa412ed9807e37/sre_parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 12, 3168, 16, 919, 4672, 468, 1109, 279, 4143, 1936, 225, 720, 4951, 273, 2592, 3234, 12, 2019, 13, 225, 1323, 404, 30, 225, 309, 1084, 18, 4285, 316, 7566, 96, 3113, 7310, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 12, 3168, 16, 919, 4672, 468, 1109, 279, 4143, 1936, 225, 720, 4951, 273, 2592, 3234, 12, 2019, 13, 225, 1323, 404, 30, 225, 309, 1084, 18, 4285, 316, 7566, 96, 3113, 7310, ...
self.jigsGroundAction.setIconSet(QIconSet(self.image49))
self.jigsGroundAction.setIconSet(QIconSet(self.image45))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
2bdc60455ab85cd2792604c15ae9034d3632b0df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/2bdc60455ab85cd2792604c15ae9034d3632b0df/MainWindowUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 2242, 273, 374, 4672, 2238, 6376, 3829, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 2242, 13, 365, 18, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 2242, 273, 374, 4672, 2238, 6376, 3829, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 2242, 13, 365, 18, 23...
clientdb.add_client(username, pubkey.toString(type='openssh'))
clientdb.add_client(username, pubkey_str)
def add_default_client(Session): """ Adds the default client. """ from twisted.conch.ssh import keys from getpass import getuser clientdb = ClientDatabase(Session) username = getuser() pubkey_file = os.path.join(DSAGE_DIR, 'dsage_key.pub') pubkey = keys.Key.fromFile(pubkey_file) if clientdb.get_client(username) is None: clientdb.add_client(username, pubkey.toString(type='openssh')) print 'Added user %s.\n' % (username) else: client = clientdb.get_client(username) if client.public_key != pubkey: clientdb.del_client(username) clientdb.add_client(username, pubkey) print "User %s's pubkey changed, setting to new one." % (username) else: print 'User %s already exists.' % (username)
cfa274c2375ab6e9c499a36eb312907307523ff0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cfa274c2375ab6e9c499a36eb312907307523ff0/dsage_setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1886, 67, 2625, 12, 2157, 4672, 3536, 15605, 326, 805, 1004, 18, 225, 3536, 225, 628, 2339, 25444, 18, 591, 343, 18, 10975, 1930, 1311, 628, 31889, 1930, 336, 1355, 225, 1004, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1886, 67, 2625, 12, 2157, 4672, 3536, 15605, 326, 805, 1004, 18, 225, 3536, 225, 628, 2339, 25444, 18, 591, 343, 18, 10975, 1930, 1311, 628, 31889, 1930, 336, 1355, 225, 1004, ...
if isinstance(encoding,str):
if isinstance(encoding, str):
def encode(v, encoding=None, errors='strict'): """encode(obj, [encoding[,errors]]) -> object Encodes obj using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is 'strict' meaning that encoding errors raise a ValueError. Other possible values are 'ignore', 'replace' and 'xmlcharrefreplace' as well as any other name registered with codecs.register_error that can handle ValueErrors. """ if encoding == None: encoding = sys.getdefaultencoding() if isinstance(encoding,str): encoder = lookup(encoding)[0] if encoder and isinstance(errors,str): res = encoder(v,errors) return res[0] else: raise TypeError("Errors must be a string") else: raise TypeError("Encoding must be a string")
16ed2024742360e02d96bf99f8cb5ce4527577cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/16ed2024742360e02d96bf99f8cb5ce4527577cd/app_codecs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 90, 16, 2688, 33, 7036, 16, 1334, 2218, 13948, 11, 4672, 3536, 3015, 12, 2603, 16, 306, 5999, 63, 16, 4324, 65, 5717, 317, 733, 225, 1374, 7000, 1081, 1450, 326, 9196, 4104, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 90, 16, 2688, 33, 7036, 16, 1334, 2218, 13948, 11, 4672, 3536, 3015, 12, 2603, 16, 306, 5999, 63, 16, 4324, 65, 5717, 317, 733, 225, 1374, 7000, 1081, 1450, 326, 9196, 4104, ...
for mod in ['_vq', '_hierarchy_wrap']:
for mod in ['_vq', '_hierarchy_wrap', '_fftpack', 'convolve']:
def custom_mangling(filename): import_mangling = [ os.path.join('cluster', '__init__.py'), os.path.join('cluster', 'hierarchy.py'), os.path.join('cluster', 'vq.py'), ] if any(filename.endswith(x) for x in import_mangling): f = open(filename, 'r') text = f.read() f.close() for mod in ['_vq', '_hierarchy_wrap']: text = re.sub(r'^(\s*)import %s' % mod, r'\1from . import %s' % mod, text, flags=re.M) text = re.sub(r'^(\s*)from %s import' % mod, r'\1from .%s import' % mod, text, flags=re.M) #text = text.replace('from matrixlib', 'from .matrixlib') f = open(filename, 'w') f.write(text) f.close()
be76acfc701954512f1038d18f99890691c6b4ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12971/be76acfc701954512f1038d18f99890691c6b4ef/py3tool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1679, 67, 81, 539, 2456, 12, 3459, 4672, 1930, 67, 81, 539, 2456, 273, 306, 1140, 18, 803, 18, 5701, 2668, 7967, 2187, 4940, 2738, 25648, 2074, 19899, 1140, 18, 803, 18, 5701, 2668, 79...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1679, 67, 81, 539, 2456, 12, 3459, 4672, 1930, 67, 81, 539, 2456, 273, 306, 1140, 18, 803, 18, 5701, 2668, 7967, 2187, 4940, 2738, 25648, 2074, 19899, 1140, 18, 803, 18, 5701, 2668, 79...
def check_for_module_loaded(modulename): log.info("Checking if module '%s' is loaded... " % modulename) f = open('/proc/modules')
def check_for_module_loaded(modulename, procfile): log.info("Checking if module '%s' is present in %s... " % (modulename, procfile)) f = open(procfile)
def check_for_module_loaded(modulename): log.info("Checking if module '%s' is loaded... " % modulename) f = open('/proc/modules') lines = f.readlines() f.close() for l in lines: mod = l.split()[0] if mod == modulename or mod == modulename.replace('-', '_'): log.info(" found") return True log.info(" not found") return False
f66f3fa9cd34251e3961a80bce21ea5f5fe4a10e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11526/f66f3fa9cd34251e3961a80bce21ea5f5fe4a10e/ffado_diag_helpers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1884, 67, 2978, 67, 4230, 12, 1711, 332, 1069, 16, 5418, 768, 4672, 613, 18, 1376, 2932, 14294, 309, 1605, 1995, 87, 11, 353, 3430, 316, 738, 87, 2777, 315, 738, 261, 1711, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1884, 67, 2978, 67, 4230, 12, 1711, 332, 1069, 16, 5418, 768, 4672, 613, 18, 1376, 2932, 14294, 309, 1605, 1995, 87, 11, 353, 3430, 316, 738, 87, 2777, 315, 738, 261, 1711, ...
print(' ===> Imported ' + file + ('[%d/%d, %5.2f%%] +%-6d %9d' % (at, len(sweep_files), 100 * float(at) / len(sweep_files), nloaded, ntot)))
t1 = time.time() time_pass = (t1 - t0) / 60 time_tot = time_pass / at * len(sweep_files) sfile = "..." + file[-67:] if len(file) > 70 else file print(' ===> Imported %-70s [%d/%d, %5.2f%%] +%-6d %9d (%.0f/%.0f min.)' % (sfile, at, len(sweep_files), 100 * float(at) / len(sweep_files), nloaded, ntot, time_pass, time_tot))
def import_from_sweeps(catdir, sweep_files, create=False): """ Import SDSS (stellar) catalog from a collection of SDSS sweep files. Note: Assumes underlying shared storage for all catalog cells (i.e., any worker is able to write to any cell). """ if create: # Create the new database cat = catalog.Catalog(catdir, name='sdss', mode='c') cat.create_table('astrometry', { 'columns': to_dtype(astromCols), 'primary_key': 'id', 'spatial_keys': ('ra', 'dec'), "cached_flag": "cached" }) cat.create_table('survey', { 'columns': to_dtype(surveyCols) }) cat.create_table('photometry', { 'columns': to_dtype(photoCols) }) else: cat = catalog.Catalog(catdir) at = 0; ntot = 0 pool = pool2.Pool() for (file, nloaded, nin) in pool.imap_unordered(sweep_files, import_from_sweeps_aux, (cat,)): #for (file, nloaded, nin) in imap(lambda file: import_from_sweeps_aux(file, cat), sweep_files): at = at + 1 ntot = ntot + nloaded print(' ===> Imported ' + file + ('[%d/%d, %5.2f%%] +%-6d %9d' % (at, len(sweep_files), 100 * float(at) / len(sweep_files), nloaded, ntot)))
32a66493c6f9400b454af4003f854de728f243da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13091/32a66493c6f9400b454af4003f854de728f243da/sdss.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 2080, 67, 87, 1814, 13058, 12, 2574, 1214, 16, 17462, 67, 2354, 16, 752, 33, 8381, 4672, 3536, 6164, 15951, 1260, 261, 334, 24276, 13, 6222, 628, 279, 1849, 434, 15951, 1260, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 2080, 67, 87, 1814, 13058, 12, 2574, 1214, 16, 17462, 67, 2354, 16, 752, 33, 8381, 4672, 3536, 6164, 15951, 1260, 261, 334, 24276, 13, 6222, 628, 279, 1849, 434, 15951, 1260, ...
smart_rmtree(tmpdir)
rmtree(tmpdir)
def easy_install(self, spec, deps=False): tmpdir = tempfile.mkdtemp(prefix="easy_install-") download = None
0f5d6581ea5cb8c8f74c6dca9207114b47ac08fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8186/0f5d6581ea5cb8c8f74c6dca9207114b47ac08fe/easy_install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12779, 67, 5425, 12, 2890, 16, 857, 16, 8740, 33, 8381, 4672, 20213, 273, 13275, 18, 24816, 72, 5814, 12, 3239, 1546, 73, 15762, 67, 5425, 17, 7923, 4224, 273, 599, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12779, 67, 5425, 12, 2890, 16, 857, 16, 8740, 33, 8381, 4672, 20213, 273, 13275, 18, 24816, 72, 5814, 12, 3239, 1546, 73, 15762, 67, 5425, 17, 7923, 4224, 273, 599, 2, -100, -100, -100...
print document % (title, identifier, identifier, title, revFrom, revTo, " hidden", result)
print document % (title, identifier, identifier, title, revFrom, revTo, result)
def startFormatting(title, identifier, source): document = """Content-Type:text/html;charset=UTF-8
943afbec53903141cfdc88408bfe2ea256880388 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10248/943afbec53903141cfdc88408bfe2ea256880388/trackerlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 23974, 12, 2649, 16, 2756, 16, 1084, 4672, 1668, 273, 3536, 1350, 17, 559, 30, 955, 19, 2620, 31, 9999, 33, 5159, 17, 28, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 23974, 12, 2649, 16, 2756, 16, 1084, 4672, 1668, 273, 3536, 1350, 17, 559, 30, 955, 19, 2620, 31, 9999, 33, 5159, 17, 28, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
regexGrepResult=re.compile("^\\([a-zA-Z]:[^(]*\\)(\\([0-9]+\\))")
regexGrep=re.compile(r"^([a-zA-Z]:[^(]*)\(([0-9]+)\)")
def __radd__(self, other): if type(other) == type(self) or type(other) == type([]): return other.dirs + self.dirs
eedc25b3727e47d19e18ebe793f96f6b8df0175e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/eedc25b3727e47d19e18ebe793f96f6b8df0175e/sgrepmdi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 354, 449, 972, 12, 2890, 16, 1308, 4672, 309, 618, 12, 3011, 13, 422, 618, 12, 2890, 13, 578, 618, 12, 3011, 13, 422, 618, 3816, 65, 4672, 327, 1308, 18, 8291, 397, 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, 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, 354, 449, 972, 12, 2890, 16, 1308, 4672, 309, 618, 12, 3011, 13, 422, 618, 12, 2890, 13, 578, 618, 12, 3011, 13, 422, 618, 3816, 65, 4672, 327, 1308, 18, 8291, 397, 365, 18, ...
wx.CallAfter(self.eventLoop) self._chkTimer = wx.PyTimer(self._checkYield)
if wx.Platform not in MAINLOOP_PLATFORMS: wx.CallAfter(self.eventLoop) self._chkTimer = wx.PyTimer(self._checkYield)
def __init__(self, *args, **kwargs): self.evScheduler = EventScheduler.EventScheduler() self._yielding = False wx.App.__init__(self, *args, **kwargs) #Start calling out own event loop wx.CallAfter(self.eventLoop) #This timer is used to make sure that we continue to call our functions #even when we are stuck processing GUI event(s) like ShowModal self._chkTimer = wx.PyTimer(self._checkYield)
a61469a9ed0d2d45f23691a5b99ca4bd75415093 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5969/a61469a9ed0d2d45f23691a5b99ca4bd75415093/EventSchedulerApp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 365, 18, 14965, 11870, 273, 2587, 11870, 18, 1133, 11870, 1435, 365, 6315, 23604, 310, 273, 1083, 7075, 18, 3371, 16186, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 365, 18, 14965, 11870, 273, 2587, 11870, 18, 1133, 11870, 1435, 365, 6315, 23604, 310, 273, 1083, 7075, 18, 3371, 16186, 2...
_logger.debug(out)
_logger.debug("%s %s" % (self.timestamp,out))
def _setupDestination(self): destError = {} datasetList = {} newnameList = {} for job in self.jobs: # ignore failed jobs if job.jobStatus == 'failed': continue _logger.debug('%s %s in setupDestination 1' % (self.timestamp,job.PandaID)) for file in job.Files: # ignore input files if file.type == 'input': continue # extract destinationDBlock, destinationSE and computingSite dest = (file.destinationDBlock,file.destinationSE,job.computingSite,file.destinationDBlockToken) if not destError.has_key(dest): destError[dest] = '' originalName = '' if job.prodSourceLabel != 'panda': # get serial number sn,freshFlag = self.taskBuffer.getSerialNumber(file.destinationDBlock) if sn == -1: destError[dest] = "Setupper._setupDestination() could not get serial num for %s" % name continue # new dataset name newnameList[dest] = "%s_sub0%s" % (file.destinationDBlock,sn) if freshFlag: # register original dataset and new dataset nameList = [file.destinationDBlock,newnameList[dest]] originalName = file.destinationDBlock else: # register new dataset only nameList = [newnameList[dest]] else: # keep original name nameList = [file.destinationDBlock] # create dataset for name in nameList: computingSite = job.computingSite if name == originalName: # for original dataset computingSite = file.destinationSE # use DQ2 if (not self.pandaDDM) and (job.prodSourceLabel != 'ddm'): # register dataset time.sleep(1) _logger.debug(('registerNewDataset',name)) atFailed = 0 for iDDMTry in range(3): status,out = ddm.DQ2.main('registerNewDataset',name) if status != 0 and out.find('DQDatasetExistsException') != -1: atFailed = iDDMTry break elif status != 0 or out.find("DQ2 internal server exception") != -1 \ or out.find("An error occurred on the central catalogs") != -1 \ or out.find("MySQL server has gone away") != -1: _logger.debug("sleep %s for %s" % (iDDMTry,name)) _logger.debug(status) _logger.debug(out) _logger.debug("-------------") time.sleep(60) else: break _logger.debug(out) if status != 0 or out.find('Error') != -1: # unset vuidStr vuidStr = "" # ignore 'already exists' ERROR because original dataset may be registered by upstream. # atFailed > 0 is for the case in which the first attempt succeeded but report failure if (job.prodSourceLabel == 'panda' or name == originalName or atFailed > 0) and \ out.find('DQDatasetExistsException') != -1: _logger.debug('ignored ERROR') else: destError[dest] = "Setupper._setupDestination() could not register : %s" % name _logger.error(out) continue else: vuidStr = "vuid = %s['vuid']" % out # conversion is needed for unknown sites tmpSrcDDM = self.siteMapper.getSite(computingSite).ddm tmpDstDDM = self.siteMapper.getSite(file.destinationSE).ddm tmpTokenList = file.destinationDBlockToken.split(',') if name == originalName or tmpSrcDDM != tmpDstDDM or \ job.prodSourceLabel == 'panda' or len(tmpTokenList) > 1: time.sleep(1) # register location dq2IDList = [self.siteMapper.getSite(computingSite).ddm] # use another location when token is set if not file.destinationDBlockToken in ['NULL','']: dq2IDList = [] for tmpToken in tmpTokenList: # set default dq2ID = self.siteMapper.getSite(computingSite).ddm # convert token to DQ2ID if self.siteMapper.getSite(computingSite).setokens.has_key(tmpToken): dq2ID = self.siteMapper.getSite(computingSite).setokens[tmpToken] # replace or append if len(tmpTokenList) <= 1 or name != originalName: # use location consistent with token dq2IDList = [dq2ID] break else: # use multiple locations for _tid if not dq2ID in dq2IDList: dq2IDList.append(dq2ID) # loop over all locations for dq2ID in dq2IDList: _logger.debug(('registerDatasetLocation',name,dq2ID)) for iDDMTry in range(3): status,out = ddm.DQ2.main('registerDatasetLocation',name,dq2ID) if status != 0 and out.find('DQLocationExistsException') != -1: break elif status != 0 or out.find("DQ2 internal server exception") != -1 \ or out.find("An error occurred on the central catalogs") != -1 \ or out.find("MySQL server has gone away") != -1: time.sleep(60) else: break _logger.debug(out) # ignore "already exists at location XYZ" if out.find('DQLocationExistsException') != -1: _logger.debug('ignored ERROR') status,out = 0,'' # failed if status != 0 or out.find('Error') != -1: break else: # skip registerDatasetLocations status,out = 0,'' if status != 0 or out.find('Error') != -1: _logger.error(out) destError[dest] = "Setupper._setupDestination() could not register location : %s" % name elif job.prodSourceLabel == 'panda': # do nothing for "panda" job pass elif name == originalName and job.prodSourceLabel in ['managed','test']: # set metadata time.sleep(1) dq2ID = self.siteMapper.getSite(file.destinationSE).ddm # use another location when token is set if not file.destinationDBlockToken in ['NULL','']: # register only the first token becasue it is used as the location tmpFirstToken = file.destinationDBlockToken.split(',')[0] if self.siteMapper.getSite(file.destinationSE).setokens.has_key(tmpFirstToken): dq2ID = self.siteMapper.getSite(file.destinationSE).setokens[tmpFirstToken] _logger.debug(('setMetaDataAttribute',name,'origin',dq2ID)) for iDDMTry in range(3): status,out = ddm.DQ2.main('setMetaDataAttribute',name,'origin',dq2ID) if status != 0 or out.find("DQ2 internal server exception") != -1 \ or out.find("An error occurred on the central catalogs") != -1 \ or out.find("MySQL server has gone away") != -1: time.sleep(60) else: break _logger.debug(out) if status != 0 or (out != 'None' and out.find('already exists') == -1): _logger.error(out) destError[dest] = "Setupper._setupDestination() could not set metadata : %s" % name # use PandaDDM else: # create a fake vuidStr for PandaDDM vuidStr = 'vuid="%s"' % commands.getoutput('uuidgen') # get vuid if vuidStr == '': _logger.debug(('queryDatasetByName',name)) for iDDMTry in range(3): status,out = ddm.repositoryClient.main('queryDatasetByName',name) if status != 0 or out.find("DQ2 internal server exception") != -1 \ or out.find("An error occurred on the central catalogs") != -1 \ or out.find("MySQL server has gone away") != -1: time.sleep(60) else: break _logger.debug(out) if status != 0 or out.find('Error') != -1: _logger.error(out) vuidStr = "vuid = %s['%s']['vuids'][0]" % (out.split('\n')[0],name) try: exec vuidStr # dataset spec ds = DatasetSpec() ds.vuid = vuid ds.name = name ds.type = 'output' ds.numberfiles = 0 ds.currentfiles = 0 ds.status = 'defined' # append datasetList[(name,file.destinationSE,computingSite)] = ds # logging if not self.pandaDDM: dq2ID = self.siteMapper.getSite(file.destinationSE).ddm message = '%s - siteID:%s type:output vuid:%s' % (commands.getoutput('hostname'),dq2ID,vuid) # get logger _pandaLogger = PandaLogger() _pandaLogger.lock() _pandaLogger.setParams({'Type':'registerSubscription'}) logger = _pandaLogger.getHttpLogger(panda_config.loggername) # add message logger.info(message) # release HTTP handler _pandaLogger.release() except: # set status type, value, traceBack = sys.exc_info() _logger.error("_setupDestination() : %s %s" % (type,value)) destError[dest] = "Setupper._setupDestination() could not get VUID : %s" % name # set new destDBlock if newnameList.has_key(dest): file.destinationDBlock = newnameList[dest] # update job status if failed if destError[dest] != '': job.jobStatus = 'failed' job.ddmErrorCode = ErrorCode.EC_Setupper job.ddmErrorDiag = destError[dest] else: newdest = (file.destinationDBlock,file.destinationSE,job.computingSite) # increment number of files datasetList[newdest].numberfiles = datasetList[newdest].numberfiles + 1 _logger.debug('%s %s in setupDestination 2' % (self.timestamp,job.PandaID)) # insert datasets to DB return self.taskBuffer.insertDatasets(datasetList.values())
4e25ff459b78e50b61ea2614281204d0c39c6fc9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7525/4e25ff459b78e50b61ea2614281204d0c39c6fc9/Setupper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 5683, 12, 2890, 4672, 1570, 668, 282, 273, 2618, 3709, 682, 273, 2618, 26722, 682, 273, 2618, 364, 1719, 316, 365, 18, 10088, 30, 468, 2305, 2535, 6550, 309, 1719, 18, 4688, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8401, 5683, 12, 2890, 4672, 1570, 668, 282, 273, 2618, 3709, 682, 273, 2618, 26722, 682, 273, 2618, 364, 1719, 316, 365, 18, 10088, 30, 468, 2305, 2535, 6550, 309, 1719, 18, 4688, ...
print 'existing:', existing_work print 'subtitle:', existing_work.get('subtitle', 'n/a')
print >> fh_log, 'existing:', existing_work print >> fh_log, 'subtitle:', existing_work.get('subtitle', 'n/a')
def update_works(akey, works, do_updates=False): # we can now look up all works by an author while True: # until redirects repaired q = {'type':'/type/edition', 'authors': akey, 'works': None} work_to_edition = defaultdict(set) edition_to_work = defaultdict(set) for e in query_iter(q): if e.get('works', None): for w in e['works']: work_to_edition[w['key']].add(e['key']) edition_to_work[e['key']].add(w['key']) work_by_key = {} fix_redirects = [] for k, editions in work_to_edition.items(): w = withKey(k) if w['type']['key'] == '/type/redirect': print 'redirect found' wkey = w['location'] assert re_work_key.match(wkey) for ekey in editions: e = withKey(ekey) e['works'] = [Reference(wkey)] fix_redirects.append(e) continue work_by_key[k] = w if not fix_redirects: print 'no redirects left' break print 'save redirects' ol.save_many(fix_redirects, "merge works")
fdc40d1c05e36c09d13aa8bf1352122ac212737c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/fdc40d1c05e36c09d13aa8bf1352122ac212737c/find_works.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 18597, 12, 581, 402, 16, 6330, 16, 741, 67, 14703, 33, 8381, 4672, 468, 732, 848, 2037, 2324, 731, 777, 6330, 635, 392, 2869, 1323, 1053, 30, 468, 3180, 18064, 2071, 69, 2921...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 18597, 12, 581, 402, 16, 6330, 16, 741, 67, 14703, 33, 8381, 4672, 468, 732, 848, 2037, 2324, 731, 777, 6330, 635, 392, 2869, 1323, 1053, 30, 468, 3180, 18064, 2071, 69, 2921...
if gl.config.display_tray_icon and self.tray_icon is None:
if gl.config.display_tray_icon and have_trayicon and self.tray_icon is None:
def show_hide_tray_icon(self): if gl.config.display_tray_icon and self.tray_icon is None: self.tray_icon = trayicon.GPodderStatusIcon(self, scalable_dir) elif not gl.config.display_tray_icon and self.tray_icon is not None: self.tray_icon.set_visible(False) del self.tray_icon self.tray_icon = None
d6b38e38868707bc7ac9a260341bbdd15fa35879 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/d6b38e38868707bc7ac9a260341bbdd15fa35879/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 11248, 67, 313, 528, 67, 3950, 12, 2890, 4672, 309, 5118, 18, 1425, 18, 5417, 67, 313, 528, 67, 3950, 471, 1240, 67, 313, 528, 3950, 471, 365, 18, 313, 528, 67, 3950, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 11248, 67, 313, 528, 67, 3950, 12, 2890, 4672, 309, 5118, 18, 1425, 18, 5417, 67, 313, 528, 67, 3950, 471, 1240, 67, 313, 528, 3950, 471, 365, 18, 313, 528, 67, 3950, 353, ...
password=credentials.password if credentials else '')
password=credentials.password if credentials else '', use_tls=settings.msrp.transport=='tls')
def initialize(self, session, direction): self.greenlet = api.getcurrent() settings = SIPSimpleSettings() notification_center = NotificationCenter() notification_center.add_observer(self, sender=self) try: self.session = session outgoing = direction=='outgoing' if isinstance(self.account, Account): if (outgoing and self.account.nat_traversal.use_msrp_relay_for_outbound) or (not outgoing and self.account.nat_traversal.use_msrp_relay_for_inbound): credentials = self.account.credentials if self.account.nat_traversal.msrp_relay is None: relay = MSRPRelaySettings(domain=self.account.uri.host, username=self.account.uri.user, password=credentials.password if credentials else '') self.transport = settings.msrp.transport else: relay = MSRPRelaySettings(domain=self.account.uri.host, username=self.account.uri.user, password=credentials.password if credentials else '', host=self.account.nat_traversal.msrp_relay.host, port=self.account.nat_traversal.msrp_relay.port, use_tls=self.account.nat_traversal.msrp_relay.transport=='tls') self.transport = self.account.nat_traversal.msrp_relay.transport if self.transport != settings.msrp.transport: raise MSRPStreamError("MSRP relay transport conflicts with MSRP transport setting") else: relay = None self.transport = settings.msrp.transport else: relay = None self.transport = self.account.msrp.transport if not outgoing and relay is None and self.transport == 'tls' and None in (self.account.tls_credentials.cert, self.account.tls_credentials.key): raise MSRPStreamError("cannot create incoming MSRP stream without a certificate and private key") logger = NotificationProxyLogger() self.msrp_connector = get_connector(relay=relay, logger=logger) if outgoing else get_acceptor(relay=relay, logger=logger) local_uri = URI(host=host.default_ip, port=0, use_tls=self.transport=='tls', credentials=self.account.tls_credentials) full_local_path = self.msrp_connector.prepare(local_uri) self.local_media = self._create_local_media(full_local_path) except api.GreenletExit: raise except Exception, ex: ndata = TimestampedNotificationData(context='initialize', failure=Failure(), reason=str(ex)) notification_center.post_notification('MediaStreamDidFail', self, ndata) else: notification_center.post_notification('MediaStreamDidInitialize', self, data=TimestampedNotificationData()) finally: if self.msrp_session is None and self.msrp is None and self.msrp_connector is None: notification_center.remove_observer(self, sender=self) self.greenlet = None
ac8f3f07e5ddd96b9d7588708ba7816f14fdae3f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5703/ac8f3f07e5ddd96b9d7588708ba7816f14fdae3f/msrp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 16, 1339, 16, 4068, 4672, 365, 18, 11571, 1810, 273, 1536, 18, 588, 2972, 1435, 1947, 273, 348, 2579, 5784, 2628, 1435, 3851, 67, 5693, 273, 8050, 8449, 1435, 3851, 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, 4046, 12, 2890, 16, 1339, 16, 4068, 4672, 365, 18, 11571, 1810, 273, 1536, 18, 588, 2972, 1435, 1947, 273, 348, 2579, 5784, 2628, 1435, 3851, 67, 5693, 273, 8050, 8449, 1435, 3851, 67, ...
return [self(i) for i in range(1,self.cartanType.n+1)]
return [self(i) for i in range(1,self.cartanType.n+2)]
def list(self): return [self(i) for i in range(1,self.cartanType.n+1)]
aa4892f4e9b1a9558832a691063ee04478a1dccc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/aa4892f4e9b1a9558832a691063ee04478a1dccc/letters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 12, 2890, 4672, 327, 306, 2890, 12, 77, 13, 364, 277, 316, 1048, 12, 21, 16, 2890, 18, 11848, 304, 559, 18, 82, 15, 21, 25887, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 666, 12, 2890, 4672, 327, 306, 2890, 12, 77, 13, 364, 277, 316, 1048, 12, 21, 16, 2890, 18, 11848, 304, 559, 18, 82, 15, 21, 25887, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
except AttributeError:
except (AttributeError, ValueError):
def finish_endtag(self, tag): if not tag: found = len(self.stack) - 1 if found < 0: self.unknown_endtag(tag) return else: if tag not in self.stack: try: method = getattr(self, 'end_' + tag) except AttributeError: self.unknown_endtag(tag) else: self.report_unbalanced(tag) return found = len(self.stack) for i in range(found): if self.stack[i] == tag: found = i while len(self.stack) > found: tag = self.stack[-1] try: method = getattr(self, 'end_' + tag) except AttributeError: method = None if method: self.handle_endtag(tag, method) else: self.unknown_endtag(tag) del self.stack[-1]
b74ece53a24b3374086d018a357b72780bcca280 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/b74ece53a24b3374086d018a357b72780bcca280/sgmllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 409, 2692, 12, 2890, 16, 1047, 4672, 309, 486, 1047, 30, 1392, 273, 562, 12, 2890, 18, 3772, 13, 300, 404, 309, 1392, 411, 374, 30, 365, 18, 8172, 67, 409, 2692, 12, 2692, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 409, 2692, 12, 2890, 16, 1047, 4672, 309, 486, 1047, 30, 1392, 273, 562, 12, 2890, 18, 3772, 13, 300, 404, 309, 1392, 411, 374, 30, 365, 18, 8172, 67, 409, 2692, 12, 2692, ...
mainvbox.Add((0,DV.border_padding*2))
mainvbox.Add((0, DV.border_padding * 2))
def __init__(self, content, aborted=False, main=None): Damnlog('Done dialog opening with parameters content =',content,'; aborted?',aborted) dirs=[] files={} icons={} for i in content: if i[1] not in dirs: dirs.append(i[1]) files[i[1]]=[] files[i[1]].append(i[0]) icons[i[1]+i[0]]=i[2] dirs.sort() for i in dirs: files[i].sort() Damnlog('Done dialog parsed content; dirs =',dirs,'; files =',files) self.parent=main title='Processing done.' if aborted: title='Processing aborted.' wx.Dialog.__init__(self, None, -1, DV.l(title)) absbox1 = wx.BoxSizer(wx.VERTICAL) absbox2 = wx.BoxSizer(wx.HORIZONTAL) self.SetSizer(absbox1) absbox1.Add((0, DV.border_padding)) absbox1.Add(absbox2) absbox1.Add((0, DV.border_padding)) topvbox = wx.BoxSizer(wx.VERTICAL) absbox2.Add((DV.border_padding, 0)) absbox2.Add(topvbox) absbox2.Add((DV.border_padding, 0)) panel = wx.Panel(self, -1) topvbox.Add(panel, 1, wx.EXPAND) mainvbox=wx.BoxSizer(wx.VERTICAL) panel.SetSizer(mainvbox) self.underlined=wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT) self.underlined.SetUnderlined(True) # Build UI Damnlog('Building center UI of done dialog.') if aborted: title = wx.StaticText(panel, -1, DV.l('Video conversion aborted.')) title.SetFont(wx.Font(14, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD)) else: title = wx.StaticText(panel, -1, DV.l('Video conversion successful.')) title.SetFont(wx.Font(14, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD)) mainvbox.Add(title) mainvbox.Add((0,DV.border_padding*2)) if len(content): Damnlog('There is content, so we\'re gonna build tree.') mainvbox.Add(wx.StaticText(panel,-1,DV.l('The following videos have been processed:'))) foldericon=wx.Bitmap(DV.images_path + 'foldermovie.png') for d in dirs: Damnlog('Building videos list for directory',d) tmpvbox=wx.BoxSizer(wx.VERTICAL) mainvbox.Add(tmpvbox) tmphbox=wx.BoxSizer(wx.HORIZONTAL) tmpvbox.Add(tmphbox) tmphbox.Add(self.bindAndCursor(wx.StaticBitmap(panel, -1, foldericon), launchdir=d), 0, wx.ALIGN_CENTER_VERTICAL) tmphbox.Add((DV.border_padding/2,0)) tmphbox.Add(self.makeLabel(panel, d, launchdir=d)) tmpinnerhbox=wx.BoxSizer(wx.HORIZONTAL) tmpvbox.Add(tmpinnerhbox) tmpinnerhbox.Add((foldericon.GetWidth()+DV.border_padding,0)) tmpinnervbox=wx.BoxSizer(wx.VERTICAL) tmpinnerhbox.Add(tmpinnervbox,1) for f in files[d]: tmphbox2=wx.BoxSizer(wx.HORIZONTAL) tmpinnervbox.Add(tmphbox2) tmphbox2.Add(self.bindAndCursor(wx.StaticBitmap(panel, -1, DV.listicons.getRawBitmap(icons[d+f])), launchfile=d+f), 0, wx.ALIGN_CENTER_VERTICAL) tmphbox2.Add((DV.border_padding/2,0)) tmphbox2.Add(self.makeLabel(panel, f, launchfile=d+f)) mainvbox.Add((0,DV.border_padding)) else: Damnlog('There\'s no content, so we\'re not gonna build much.') mainvbox.Add(wx.StaticText(panel,-1,DV.l('No videos were processed.'))) mainvbox.Add((0,DV.border_padding)) mainvbox.Add((0,DV.border_padding)) # Again! okhbox=wx.BoxSizer(wx.HORIZONTAL) mainvbox.Add(okhbox,0,wx.ALIGN_RIGHT) okButton = wx.Button(panel,-1,DV.l('OK')) okhbox.Add(okButton) self.Bind(wx.EVT_BUTTON, self.onOK, okButton) Damnlog('Finished building done dialog UI, displaying it.') # Finished building UI self.SetClientSize(self.GetBestSize()) self.Center() Damnlog('Done dialog displayed and centered.')
2e4d33b2a8b84c7e2a1d15176545dae986a39d07 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/2e4d33b2a8b84c7e2a1d15176545dae986a39d07/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 913, 16, 18166, 33, 8381, 16, 2774, 33, 7036, 4672, 463, 301, 82, 1330, 2668, 7387, 6176, 10890, 598, 1472, 913, 273, 2187, 1745, 11189, 31, 18166, 35, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 913, 16, 18166, 33, 8381, 16, 2774, 33, 7036, 4672, 463, 301, 82, 1330, 2668, 7387, 6176, 10890, 598, 1472, 913, 273, 2187, 1745, 11189, 31, 18166, 35, 2...
result = litTexturePattern.match(line) if result:
if textureFound == 2: break result = v8LitTexturePattern.match(line) if result: textureFound = textureFound + 1
def handleObject(dirpath, filename, libraryFileHandle, libraryPlaceholderFileHandle, objects, authors): objectSourcePath = os.path.join(dirpath, filename) parts = dirpath.split("/", 2) print "Handling object: " + objectSourcePath # Create an instance of the SceneryObject class sceneryObject = classes.SceneryObject(parts[2], filename) # Set up paths and copy files if not copySupportFiles(dirpath, parts): return # Handle the info.txt file if not handleInfoFile(dirpath, parts, ".obj", sceneryObject, authors): return # Copy the object file shutil.copyfile(objectSourcePath, os.path.join(classes.Configuration.osxFolder, parts[2], filename)) # Open the object file = open(objectSourcePath, "rU") objectFileContents = file.readlines() file.close() # Define the regex patterns: texturePattern = re.compile("TEXTURE\s+(.*)") litTexturePattern = re.compile("TEXTURE_LIT\s+(.*)") foundTexture = 0 for line in objectFileContents: result = texturePattern.match(line) if result: textureFile = os.path.join(dirpath, result.group(1)) if (result.group(1) == ""): print " WARNING: Object specifies a blank texture - valid but may not be as intended" elif os.path.isfile(textureFile): shutil.copyfile(textureFile, os.path.join(classes.Configuration.osxFolder, parts[2], result.group(1))) else: print " ERROR: Cannot find texture - object excluded (" + textureFile + ")" return result = litTexturePattern.match(line) if result: textureFile = os.path.join(dirpath, result.group(1)) if os.path.isfile(textureFile): shutil.copyfile(textureFile, os.path.join(classes.Configuration.osxFolder, parts[2], result.group(1))) else: print " ERROR: Cannot find LIT texture - object excluded (" + textureFile + ")" return # Object is valid, append it to the list objects.append(sceneryObject) # Write to the library.txt file for virtualPath in sceneryObject.virtualPaths: libraryFileHandle.write("EXPORT opensceneryx/" + virtualPath + " " + sceneryObject.getFilePath() + "\n") libraryPlaceholderFileHandle.write("EXPORT_BACKUP opensceneryx/" + virtualPath + " opensceneryx/placeholder.obj\n")
5d85d733c345934088eebd21200220a1ee2d66fa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5176/5d85d733c345934088eebd21200220a1ee2d66fa/functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 921, 12, 1214, 803, 16, 1544, 16, 5313, 812, 3259, 16, 5313, 14038, 812, 3259, 16, 2184, 16, 14494, 4672, 733, 1830, 743, 273, 1140, 18, 803, 18, 5701, 12, 1214, 803, 16, 1544, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 921, 12, 1214, 803, 16, 1544, 16, 5313, 812, 3259, 16, 5313, 14038, 812, 3259, 16, 2184, 16, 14494, 4672, 733, 1830, 743, 273, 1140, 18, 803, 18, 5701, 12, 1214, 803, 16, 1544, ...
""" Should return True if `stdin` is a socket and raises error """
""" Should return True if `stdin` is a socket and raises error. """
def test_returns_false_if_stdin_socket_raises_error(self): """ Should return True if `stdin` is a socket and raises error """ test_fd = 23 getsockopt = self.mock_socket.getsockopt getsockopt.mock_raises = socket.error( object(), "Weird socket stuff") expect_result = True result = daemon.daemon.is_socket(test_fd) self.failUnlessIs(expect_result, result)
33a5bfc655a6417210c5c80d9f942714bf596533 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4939/33a5bfc655a6417210c5c80d9f942714bf596533/test_daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6154, 67, 5743, 67, 430, 67, 21772, 67, 7814, 67, 354, 6141, 67, 1636, 12, 2890, 4672, 3536, 9363, 327, 1053, 309, 1375, 21772, 68, 353, 279, 2987, 471, 14183, 555, 18, 3536,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6154, 67, 5743, 67, 430, 67, 21772, 67, 7814, 67, 354, 6141, 67, 1636, 12, 2890, 4672, 3536, 9363, 327, 1053, 309, 1375, 21772, 68, 353, 279, 2987, 471, 14183, 555, 18, 3536,...
if field_detail['type'] in ('one2many', 'many2many'):
if field_detail['type'] in ('one2many', 'many2many') and i != len(self.arg) - 1:
def _fnct_read(self, obj, cr, uid, ids, field_name, args, context=None): self._field_get2(cr, uid, obj, context) if not ids: return {} relation = obj._name res = {}.fromkeys(ids, False) objlst = obj.browse(cr, uid, ids) for data in objlst: if not data: continue t_data = data relation = obj._name for i in range(len(self.arg)): field_detail = self._relations[i] relation = field_detail['object'] try: if not t_data[self.arg[i]]: t_data = False break except: t_data = False break if field_detail['type'] in ('one2many', 'many2many'):# and i != len(self.arg) - 1: t_data = t_data[self.arg[i]][0] else: t_data = t_data[self.arg[i]] if type(t_data) == type(objlst[0]): res[data.id] = t_data.id else: res[data.id] = t_data
e9247e60e838c909d0b7c1734149f79d4ca15e49 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/e9247e60e838c909d0b7c1734149f79d4ca15e49/fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4293, 299, 67, 896, 12, 2890, 16, 1081, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 833, 16, 819, 33, 7036, 4672, 365, 6315, 1518, 67, 588, 22, 12, 3353, 16, 4555, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4293, 299, 67, 896, 12, 2890, 16, 1081, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 833, 16, 819, 33, 7036, 4672, 365, 6315, 1518, 67, 588, 22, 12, 3353, 16, 4555, 16,...
fldID=fldID,
fldID=fldID,
def modifyfieldvalue(req, colID, fldID, fldvID, ln=CFG_SITE_LANG, name='', value='', callback="yes", confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """&gt; <a class="navtrail" href="%s/admin/websearch/websearchadmin.py/">WebSearch Admin</a> """ % (CFG_SITE_URL) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_modifyfieldvalue(colID=colID, fldID=fldID, fldvID=fldvID, ln=ln, name=name, value=value, callback=callback, confirm=confirm), uid=uid, language=ln, navtrail = navtrail_previous_links, req=req, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links)
123007a0375243292b7f0b102a4fa413356c9b25 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2139/123007a0375243292b7f0b102a4fa413356c9b25/websearchadmin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5612, 1518, 1132, 12, 3658, 16, 645, 734, 16, 9880, 734, 16, 9880, 90, 734, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 16, 508, 2218, 2187, 460, 2218, 2187, 1348, 1546, 9707, 3113, 693...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5612, 1518, 1132, 12, 3658, 16, 645, 734, 16, 9880, 734, 16, 9880, 90, 734, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 16, 508, 2218, 2187, 460, 2218, 2187, 1348, 1546, 9707, 3113, 693...
filter_parts(msg, filtertypes)
filter_parts(msg, filtertypes, passtypes)
def process(mlist, msg, msgdata): # Short-circuits if not mlist.filter_content or not mlist.filter_mime_types: return # We also don't care about our own digests or plaintext ctype = msg.get_type('text/plain') mtype = msg.get_main_type('text') if msgdata.get('isdigest') or ctype == 'text/plain': return # Check to see if the outer type matches one of the filter types filtertypes = mlist.filter_mime_types if ctype in filtertypes or mtype in filtertypes: raise Errors.DiscardMessage numparts = len([subpart for subpart in msg.walk()]) # If the message is a multipart, filter out matching subparts if msg.is_multipart(): # Recursively filter out any subparts that match the filter list prelen = len(msg.get_payload()) filter_parts(msg, filtertypes) # If the outer message is now an emtpy multipart (and it wasn't # before!) then, again it gets discarded. postlen = len(msg.get_payload()) if postlen == 0 and prelen > 0: raise Errors.DiscardMessage # Now replace all multipart/alternatives with just the first non-empty # alternative. BAW: We have to special case when the outer part is a # multipart/alternative because we need to retain most of the outer part's # headers. For now we'll move the subpart's payload into the outer part, # and then copy over its Content-Type: and Content-Transfer-Encoding: # headers (any others?). collapse_multipart_alternatives(msg) if msg.get_type() == 'multipart/alternative': firstalt = msg.get_payload(0) msg.set_payload(firstalt.get_payload()) del msg['content-type'] del msg['content-transfer-encoding'] del msg['content-disposition'] del msg['content-description'] msg['Content-Type'] = firstalt.get('content-type', 'text/plain') cte = firstalt.get('content-transfer-encoding') if cte: msg['Content-Transfer-Encoding'] = cte cdisp = firstalt.get('content-disposition') if cdisp: msg['Content-Disposition'] = cdisp cdesc = firstalt.get('content-description') if cdesc: msg['Content-Description'] = cdesc # We we removed some parts, make note of this changedp = 0 if numparts <> len([subpart for subpart in msg.walk()]): changedp = 1 # Now perhaps convert all text/html to text/plain if mlist.convert_html_to_plaintext and mm_cfg.HTML_TO_PLAIN_TEXT_COMMAND: changedp += to_plaintext(msg) if changedp: msg['X-Content-Filtered-By'] = 'Mailman/MimeDel %s' % VERSION
4f252a75eac70ff307ed69237cc9a6138f98ba97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/4f252a75eac70ff307ed69237cc9a6138f98ba97/MimeDel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 781, 376, 16, 1234, 16, 1234, 892, 4672, 468, 7925, 17, 11614, 30091, 309, 486, 312, 1098, 18, 2188, 67, 1745, 578, 486, 312, 1098, 18, 2188, 67, 11757, 67, 2352, 30, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 781, 376, 16, 1234, 16, 1234, 892, 4672, 468, 7925, 17, 11614, 30091, 309, 486, 312, 1098, 18, 2188, 67, 1745, 578, 486, 312, 1098, 18, 2188, 67, 11757, 67, 2352, 30, 327, ...
if _str.lower() in [ 'true', 'false', 'none' ]:
if 'str' not in self.typeValidator.typeList and _str.lower() in [ 'true', 'false', 'none' ]:
def get( self, validateOnly = False ): _str = str( self.lineEdit.text() ).strip() try: float( _str ) except: if _str.lower() in [ 'true', 'false', 'none' ]: _str = _str.capitalize() elif not _str or _str[0] not in ['"',"'"]: _str = '"%s"' % _str try: _val = eval( _str ) except: if validateOnly: log.error( "%s: Pre-validation eval failed. %s is not valid Python syntax." % ( str( self.textLabel.text() ), _str ) ) return False else: raise Ganga_Errors.TypeException( "%s: Pre-validation eval failed. %s is not valid Python syntax." % ( str( self.textLabel.text() ), _str ) )
7fa61f6432736f71c0634d250154551367c02be6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/7fa61f6432736f71c0634d250154551367c02be6/widget_set.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 365, 16, 1954, 3386, 273, 1083, 262, 30, 389, 701, 273, 609, 12, 365, 18, 1369, 4666, 18, 955, 1435, 262, 18, 6406, 1435, 775, 30, 1431, 12, 389, 701, 262, 1335, 30, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 365, 16, 1954, 3386, 273, 1083, 262, 30, 389, 701, 273, 609, 12, 365, 18, 1369, 4666, 18, 955, 1435, 262, 18, 6406, 1435, 775, 30, 1431, 12, 389, 701, 262, 1335, 30, 309, ...
if abs( ldy) > 0:
if abs( ldy) > 0.0001:
def intersection_of_line_and_rect( line, rect, round_edges=0): """finds a point where a line and a rectangle intersect, both are given as lists of len == 4""" lx0, ly0, lx1, ly1 = map( float, line) rx0, ry0, rx1, ry1 = map( float, normalize_coords( rect)) # find which end of line is in the rect and reverse the line if needed if (lx0 > rx0) and (lx0 < rx1) and (ly0 > ry0) and (ly0 < ry1): lx0, lx1 = lx1, lx0 ly0, ly1 = ly1, ly0 # the computation itself ldx = lx1 - lx0 ldy = ly1 - ly0 if abs( ldx) > 0: # we calculate using y = f(x) k = ldy/ldx q = ly0 - k*lx0 if ldx < 0: xx = rx1 else: xx = rx0 xy = k*xx + q # the result must be in the rectangle boundaries # but sometimes is not because rounding problems if not ry0 < xy < ry1: xx = lx0 xy = ly0 else: xx = lx0 xy = ly0 if abs( ldy) > 0: # we calculate using x = f(y) k = ldx/ldy q = lx0 - k*ly0 if ldy < 0: yy = ry1 else: yy = ry0 yx = k*yy + q # the result must be in the rectangle boundaries # but sometimes is not because rounding problems if not rx0 < yx < rx1: yy = ly0 yx = lx0 else: yy = ly0 yx = lx0 if point_distance( lx0, ly0, xx, xy) < point_distance( lx0, ly0, yx, yy): return (yx, yy) else: return (xx, xy)
fc364a1ffe8ea156721a11648d240970f5e31a71 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4298/fc364a1ffe8ea156721a11648d240970f5e31a71/geometry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7619, 67, 792, 67, 1369, 67, 464, 67, 2607, 12, 980, 16, 4917, 16, 3643, 67, 8746, 33, 20, 4672, 3536, 4720, 87, 279, 1634, 1625, 279, 980, 471, 279, 11845, 9136, 16, 3937, 854, 864,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7619, 67, 792, 67, 1369, 67, 464, 67, 2607, 12, 980, 16, 4917, 16, 3643, 67, 8746, 33, 20, 4672, 3536, 4720, 87, 279, 1634, 1625, 279, 980, 471, 279, 11845, 9136, 16, 3937, 854, 864,...
axisAndStrandAtomPairsToBond.append((atm_to_keep,
axis_and_strand_atomPairs_to_bond.append((atm_to_keep,
def _replace_overlapping_axisAtoms_of_new_dna(self, new_endBaseAtomList): """ Checks if the new dna (which is a single strand in this class) has any axis atoms that overlap the axis atoms of the original dna. If it finds such atoms, the such overlapping atoms of the new dna are replaced with that on the original dna. Because of this operation, the strand atoms of the new dna are left without axis atoms. So, this method then calls appropriate method to create bonds between new strand atoms and corresponding axis atoms of the original dna. Also, the replacement operation could leave out some neighboring axis atoms of the *new dna* without bonds. So those need to be bonded with the axis atom of the original dna which replaced their neighbor. This is done by calling self._bond_axisNeighbors_with_orig_axisAtoms() @see self._fuse_new_dna_with_original_duplex() for a detail example @see: self._bond_bare_strandAtoms_with_orig_axisAtoms() @see self._bond_axisNeighbors_with_orig_axisAtoms() @BUG: Bug or unsupported feature: If the axis atoms of the original dna have a broken bond in between, then the wholechain will stop at the broken bond and thus, overlapping axis atoms of new dna after that bond won't be removed --- in short, the extended strand won't be properly fused. We need to come up with well defined rules ..example -- when the strand should decide it needs to remove overlapping atoms? ...even when it is overlapping with a different dna? (not the one we are resizing ) etc. """ #new dna generated by self.modify endAxisAtom_new_dna = new_endBaseAtomList[1] axis_wholechain_new_dna = endAxisAtom_new_dna.molecule.wholechain atomlist_with_overlapping_atoms = axis_wholechain_new_dna.get_all_baseatoms() #dna being resized (the original structure which is being resized) axis_wholechain_orig_dna = self._resizeEndAxisAtom.molecule.wholechain atomlist_to_keep = axis_wholechain_orig_dna.get_all_baseatoms() axisEndBaseAtoms_orig_dna = axis_wholechain_orig_dna.end_baseatoms() overlapping_atoms = \ self._find_overlapping_axisAtomPairs(atomlist_to_keep, atomlist_with_overlapping_atoms) axisAndStrandAtomPairsToBond = [] axisAndAxisAtomPairsToBond = [] fusableAxisAtomPairsDict = {} for atm_to_keep, atm_to_delete in overlapping_atoms: #Make sure that atm_to_keep (the axis atom on original dna) #has only one strand neighbor, OTHERWISE , if we delete #the overlapping axis atoms on the new dna, the bare strand of #the new dna can not be bonded with the old dna axis! and we #will endup having a bare strand with no axis atom! #-Ninad 2008-04-04 strand_neighbors_of_atm_to_keep = atm_to_keep.strand_neighbors() #Before deleting the overlapping axis atom of the new dna, #make sure that the corresponding old axis atom has only #one strand neighbor. Otherwise, there will be no axis atom #available for the bare strand atom that will result because #of this delete operation! if len(strand_neighbors_of_atm_to_keep) == 1 and atm_to_delete: #We know that the new dna is a single strand. So the #axis atom will ONLY have a single strand atom atatched. #If not, it will be a bug! strand_atom_new_dna = atm_to_delete.strand_neighbors()[0] #We will fuse this strand atom to the old axis atom axisAndStrandAtomPairsToBond.append((atm_to_keep, strand_atom_new_dna)) fusableAxisAtomPairsDict[atm_to_keep] = atm_to_delete ##fusableAxisAtomPairs.append((atm_to_keep, atm_to_delete)) for atm_to_keep in axisEndBaseAtoms_orig_dna: #This means that we are at the end of the chain of the #original dna. There could be some more axis atoms on the #new dna that go beyond the original dna axis chain -- [A] #Thus, after we replace the overlapping axis atoms of the #new dna with the original axis atoms, we should make sure #to bond them with the atoms [A] mentioned above if fusableAxisAtomPairsDict.has_key(atm_to_keep): atm_to_delete = fusableAxisAtomPairsDict[atm_to_keep] for neighbor in atm_to_delete.axis_neighbors(): if neighbor is not None and \ neighbor not in fusableAxisAtomPairsDict.values(): axisAndAxisAtomPairsToBond.append((atm_to_keep, neighbor)) for atm_to_delete in fusableAxisAtomPairsDict.values(): try: #Now delete the overlapping axis atom on new dna atm_to_delete.kill() except: print_compact_stack("Strand resizing: Error killing axis atom") self._bond_bare_strandAtoms_with_orig_axisAtoms(axisAndStrandAtomPairsToBond) self._bond_axisNeighbors_with_orig_axisAtoms(axisAndAxisAtomPairsToBond)
0f66720dc7592e697b0246deb3b5551a198d4c93 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/0f66720dc7592e697b0246deb3b5551a198d4c93/B_Dna_PAM3_SingleStrand.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2079, 67, 17946, 1382, 67, 4890, 14280, 67, 792, 67, 2704, 67, 5176, 69, 12, 2890, 16, 394, 67, 409, 2171, 3641, 682, 4672, 3536, 13074, 309, 326, 394, 31702, 261, 12784, 353, 279...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2079, 67, 17946, 1382, 67, 4890, 14280, 67, 792, 67, 2704, 67, 5176, 69, 12, 2890, 16, 394, 67, 409, 2171, 3641, 682, 4672, 3536, 13074, 309, 326, 394, 31702, 261, 12784, 353, 279...
return conn.settings_dict[setting_name]
return connection.settings_dict[setting_name]
def _get_setting(self, setting_name): """ Allows code to get a setting (like, for example, STORAGE_ENGINE) """ setting_name = setting_name.upper() connection = self._get_connection() if not hasattr(conn, 'settings_dict'): # Django 1.1 and below return getattr(settings, "DATABASE_%s" % setting_name) else: # Django 1.2 and above return conn.settings_dict[setting_name]
47958d7dfffc19243253f110db61f2705f4bb183 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13142/47958d7dfffc19243253f110db61f2705f4bb183/generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 8920, 12, 2890, 16, 3637, 67, 529, 4672, 3536, 25619, 981, 358, 336, 279, 3637, 261, 5625, 16, 364, 3454, 16, 2347, 15553, 67, 28980, 13, 3536, 3637, 67, 529, 273, 3637, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 8920, 12, 2890, 16, 3637, 67, 529, 4672, 3536, 25619, 981, 358, 336, 279, 3637, 261, 5625, 16, 364, 3454, 16, 2347, 15553, 67, 28980, 13, 3536, 3637, 67, 529, 273, 3637, ...
top_value = a[0][j] + 1
top_value = a[0][j]
def rank(a, j, reverse=False): if len(a) <= 0: return if reverse: a.sort(lambda x, y: 1 if x[j] > y[j] else -1 if x[j] < y[j] else 0) top_value = a[0][j] - 1 top_rank = len(a) min_rank = float(len(a)) for k in range(len(a)): if top_value < a[k][j]: top_value = a[k][j] a[k][j] = top_rank / min_rank else: a[k][j] = a[k-1][j] top_rank -= 1 else: a.sort(lambda x, y: 1 if x[j] < y[j] else -1 if x[j] > y[j] else 0) top_value = a[0][j] + 1 top_rank = len(a) max_rank = float(len(a)) for k in range(len(a)): if top_value > a[k][j]: top_value = a[k][j] a[k][j] = top_rank / max_rank else: a[k][j] = a[k-1][j] top_rank -= 1
bdcf57f6fae17f5127acc1bac812868f96e087df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/bdcf57f6fae17f5127acc1bac812868f96e087df/OWNetExplorer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6171, 12, 69, 16, 525, 16, 4219, 33, 8381, 4672, 309, 562, 12, 69, 13, 1648, 374, 30, 327, 225, 309, 4219, 30, 279, 18, 3804, 12, 14661, 619, 16, 677, 30, 404, 309, 619, 63, 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, 6171, 12, 69, 16, 525, 16, 4219, 33, 8381, 4672, 309, 562, 12, 69, 13, 1648, 374, 30, 327, 225, 309, 4219, 30, 279, 18, 3804, 12, 14661, 619, 16, 677, 30, 404, 309, 619, 63, 78, ...
codecs.StreamWriter.__init__(self,strict,errors)
codecs.StreamWriter.__init__(self,stream,errors)
def __init__(self,stream,errors='strict',mapping=None):
598260ef704eca7b332e06d17287c0166917fccd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/598260ef704eca7b332e06d17287c0166917fccd/charmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3256, 16, 4324, 2218, 13948, 2187, 6770, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 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, 2738, 972, 12, 2890, 16, 3256, 16, 4324, 2218, 13948, 2187, 6770, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'No Python documentation found for %s.' % repr(path))
'no Python documentation found for %s' % repr(path))
def do_GET(self): path = self.path if path[-5:] == '.html': path = path[:-5] if path[:1] == '/': path = path[1:] if path and path != '.': try: p, x = locate(path) except DocImportError, value: self.send_document(path, html.escape( 'Problem in %s - %s' % (value.filename, value.args))) return if x: self.send_document(describe(x), html.document(x)) else: self.send_document(path,
2c3f3ddf9452a1f3f228e0d8c7abdbeed214a6b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2c3f3ddf9452a1f3f228e0d8c7abdbeed214a6b7/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3264, 12, 2890, 4672, 589, 273, 365, 18, 803, 309, 589, 18919, 25, 26894, 422, 2418, 2620, 4278, 589, 273, 589, 10531, 17, 25, 65, 309, 589, 10531, 21, 65, 422, 2023, 30, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3264, 12, 2890, 4672, 589, 273, 365, 18, 803, 309, 589, 18919, 25, 26894, 422, 2418, 2620, 4278, 589, 273, 589, 10531, 17, 25, 65, 309, 589, 10531, 21, 65, 422, 2023, 30, 58...
text = self.standardizeInterwiki(text) text = self.standardizeCategories(text)
text = self.standardizePageFooter(text)
def change(self, text): """ Given a wiki source code text, return the cleaned up version. """ oldText = text text = self.fixSelfInterwiki(text) text = self.standardizeInterwiki(text) text = self.standardizeCategories(text) text = self.cleanUpLinks(text) text = self.cleanUpSectionHeaders(text) text = self.putSpacesInLists(text) text = self.translateAndCapitalizeNamespaces(text) text = self.resolveHtmlEntities(text) text = self.validXhtml(text) text = self.removeUselessSpaces(text) text = self.removeNonBreakingSpaceBeforePercent(text) text = self.fixSyntaxSave(text) text = self.fixHtml(text) try: text = isbn.hyphenateIsbnNumbers(text) except isbn.InvalidIsbnException, error: pass if self.debug: pywikibot.showDiff(oldText, text) return text
ad9930d929e404de0e57f566c619123c3b02e28c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/ad9930d929e404de0e57f566c619123c3b02e28c/cosmetic_changes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 12, 2890, 16, 977, 4672, 3536, 16803, 279, 9050, 1084, 981, 977, 16, 327, 326, 9426, 731, 1177, 18, 3536, 1592, 1528, 273, 977, 977, 273, 365, 18, 904, 10084, 2465, 13044, 12, 95...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 12, 2890, 16, 977, 4672, 3536, 16803, 279, 9050, 1084, 981, 977, 16, 327, 326, 9426, 731, 1177, 18, 3536, 1592, 1528, 273, 977, 977, 273, 365, 18, 904, 10084, 2465, 13044, 12, 95...
self.ask_time=ret[1]
tmp = ret[1] % 900 self.ask_time = ret[1] - tmp
def onDateTimeInputClosed(self, ret): if len(ret) > 1: if ret[0]: self.ask_time=ret[1] l = self["list"] l.resetOffset() l.fillMultiEPG(self.services, ret[1]) self.moveTimeLines(True)
a78ee85be25e5d014592ef3777c15754383810ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/a78ee85be25e5d014592ef3777c15754383810ff/GraphMultiEpg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 5096, 1210, 7395, 12, 2890, 16, 325, 4672, 309, 562, 12, 1349, 13, 405, 404, 30, 309, 325, 63, 20, 14542, 1853, 273, 325, 63, 21, 65, 738, 2468, 713, 365, 18, 835, 67, 957, 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, 603, 5096, 1210, 7395, 12, 2890, 16, 325, 4672, 309, 562, 12, 1349, 13, 405, 404, 30, 309, 325, 63, 20, 14542, 1853, 273, 325, 63, 21, 65, 738, 2468, 713, 365, 18, 835, 67, 957, 27...
new[3] = new[3] & ~TERMIOS.ICANON & ~TERMIOS.ECHO new[6][TERMIOS.VMIN] = 1 new[6][TERMIOS.VTIME] = 0 termios.tcsetattr(fd, TERMIOS.TCSANOW, new)
new[3] = new[3] & ~termios.ICANON & ~termios.ECHO new[6][termios.VMIN] = 1 new[6][termios.VTIME] = 0 termios.tcsetattr(fd, termios.TCSANOW, new)
def getkey(): while 1: if echo: z = msvcrt.getche() else: z = msvcrt.getch() if z == '\0' or z == '\xe0': #functions keys msvcrt.getch() else: return z
b7466daf4f82c4ddea5947442be2cc17bce59bf9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2937/b7466daf4f82c4ddea5947442be2cc17bce59bf9/miniterm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 856, 13332, 1323, 404, 30, 309, 3376, 30, 998, 273, 4086, 90, 3353, 88, 18, 588, 18706, 1435, 469, 30, 998, 273, 4086, 90, 3353, 88, 18, 588, 343, 1435, 309, 998, 422, 2337, 20,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 856, 13332, 1323, 404, 30, 309, 3376, 30, 998, 273, 4086, 90, 3353, 88, 18, 588, 18706, 1435, 469, 30, 998, 273, 4086, 90, 3353, 88, 18, 588, 343, 1435, 309, 998, 422, 2337, 20,...
""" hook for detecting any notification type messages (e.g. file transfer) """
""" hook for detecting any notification type messages (e.g. file transfer) """
def checkMessage(self, message): """ hook for detecting any notification type messages (e.g. file transfer) """ cTypes = [s.lstrip() for s in message.getHeader('Content-Type').split(';')] if self._checkTyping(message, cTypes): return 0 if 'text/x-msmsgsinvite' in cTypes: # header like info is sent as part of the message body. info = {} for line in message.message.split('\r\n'): try: key, val = line.split(':') info[key] = val.lstrip() except ValueError: continue if self._checkFileInvitation(message, info) or self._checkFileInfo(message, info) or self._checkFileResponse(message, info): return 0 return 1
9b2b7163e441396d9e5e7f46775cd7809b4655be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b2b7163e441396d9e5e7f46775cd7809b4655be/msn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26378, 12, 2890, 16, 883, 4672, 3536, 3953, 364, 5966, 310, 1281, 3851, 618, 2743, 261, 73, 18, 75, 18, 585, 7412, 13, 3536, 276, 2016, 273, 306, 87, 18, 80, 6406, 1435, 364, 272, 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, 26378, 12, 2890, 16, 883, 4672, 3536, 3953, 364, 5966, 310, 1281, 3851, 618, 2743, 261, 73, 18, 75, 18, 585, 7412, 13, 3536, 276, 2016, 273, 306, 87, 18, 80, 6406, 1435, 364, 272, 31...
if len(op2.int) > len(op1.int): diff = len(op2.int) - len(op1.int) op1.int.extend([0]*diff) op1.exp -= diff adjust = diff if len(op1.int) == len(op2.int) and op1.int < op2.int: op1.int.append(0)
while op2.int > op1.int: op1.int *= 10
def _adjust_coefficients(op1, op2): """Adjust op1, op2 so that op2.int+[0] > op1.int >= op2.int. Returns the adjusted op1, op2 as well as the change in op1.exp-op2.exp. Used on _WorkRep instances during division. """ adjust = 0 #If op1 is smaller, get it to same size if len(op2.int) > len(op1.int): diff = len(op2.int) - len(op1.int) op1.int.extend([0]*diff) op1.exp -= diff adjust = diff #Same length, wrong order if len(op1.int) == len(op2.int) and op1.int < op2.int: op1.int.append(0) op1.exp -= 1 adjust+= 1 return op1, op2, adjust if len(op1.int) > len(op2.int) + 1: diff = len(op1.int) - len(op2.int) - 1 op2.int.extend([0]*diff) op2.exp -= diff adjust -= diff if len(op1.int) == len(op2.int)+1 and op1.int > op2.int: op2.int.append(0) op2.exp -= 1 adjust -= 1 return op1, op2, adjust
1a63da64df2af26e1f050749c19281f1de9084fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1a63da64df2af26e1f050749c19281f1de9084fa/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13362, 67, 8075, 12344, 12, 556, 21, 16, 1061, 22, 4672, 3536, 10952, 1061, 21, 16, 1061, 22, 1427, 716, 1061, 22, 18, 474, 15, 63, 20, 65, 405, 1061, 21, 18, 474, 1545, 1061, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13362, 67, 8075, 12344, 12, 556, 21, 16, 1061, 22, 4672, 3536, 10952, 1061, 21, 16, 1061, 22, 1427, 716, 1061, 22, 18, 474, 15, 63, 20, 65, 405, 1061, 21, 18, 474, 1545, 1061, ...
def _get_tb_next(self): return self._tb_next tb_next = property(_get_tb_next, _set_tb_next) del _get_tb_next, _set_tb_next
def _set_tb_next(self, next): if tb_set_next is not None: tb_set_next(self.tb, next and next.tb or None) self._tb_next = next
9e5d08326842b9ee0070794639faad72fed72ff6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14446/9e5d08326842b9ee0070794639faad72fed72ff6/debug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 18587, 67, 4285, 12, 2890, 16, 1024, 4672, 309, 8739, 67, 542, 67, 4285, 353, 486, 599, 30, 8739, 67, 542, 67, 4285, 12, 2890, 18, 18587, 16, 1024, 471, 1024, 18, 18587...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 18587, 67, 4285, 12, 2890, 16, 1024, 4672, 309, 8739, 67, 542, 67, 4285, 353, 486, 599, 30, 8739, 67, 542, 67, 4285, 12, 2890, 18, 18587, 16, 1024, 471, 1024, 18, 18587...
except ValueError:pass
except Exception:pass
def _decode_string(clazz, str): """ >>> decoder._decode_string(None) >>> decoder._decode_string('True') True >>> decoder._decode_string('False') False >>> decoder._decode_string('11') 11 >>> decoder._decode_string('12L') 12L >>> decoder._decode_string('11.') 11.0 >>> decoder._decode_string('some') u'some' >>> decoder._decode_string('"some"') u'"some"' >>> decoder._decode_string('"some') u'"some' """ if str is None: return None elif str == TRUE_LABEL: return True elif str == FALSE_LABEL: return False try: return int(str) except ValueError:pass try: return long(str) except ValueError:pass try: return float(str) except ValueError:pass str = unicode(str) if str[0] == '"' and str[-1] == '"': original = (str.replace('\\"', '"'))[1:-1] if encoder._escape_string(original) == str: return original return unicode(str)
aa701f9cc79648fdd166a7c1748b9a9fdf829398 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10801/aa701f9cc79648fdd166a7c1748b9a9fdf829398/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3922, 67, 1080, 12, 830, 3638, 16, 609, 4672, 3536, 4080, 8320, 6315, 3922, 67, 1080, 12, 7036, 13, 4080, 8320, 6315, 3922, 67, 1080, 2668, 5510, 6134, 1053, 4080, 8320, 6315, 3922,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3922, 67, 1080, 12, 830, 3638, 16, 609, 4672, 3536, 4080, 8320, 6315, 3922, 67, 1080, 12, 7036, 13, 4080, 8320, 6315, 3922, 67, 1080, 2668, 5510, 6134, 1053, 4080, 8320, 6315, 3922,...
queue = vortex.AsyncQueue ();
queue = vortex.AsyncQueue ()
def test_00_a(): ########## # create a queue queue = vortex.AsyncQueue (); # call to terminate queue del queue; ######### # create a queue queue = vortex.AsyncQueue (); # call to unref iterator = 0 while iterator < 100: # unref queue.unref (); # next operation iterator += 1; # and now finish del queue; ######### now check data storage queue = vortex.AsyncQueue (); # push items queue.push (1); queue.push (2); queue.push (3); # get items value = queue.pop (); if value != 3: error ("Expected to find 3 but found: " + value); return False; if value != 2: error ("Expected to find 2 but found: " + value); return False; if value != 1: error ("Expected to find 1 but found: " + value); return False; # call to unref queue.unref (); return True;
44bc361f3b497230e1d601079e2df89085d4b1cd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1306/44bc361f3b497230e1d601079e2df89085d4b1cd/vortex-regression-client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 713, 67, 69, 13332, 468, 3228, 7, 468, 752, 279, 2389, 2389, 273, 331, 20873, 18, 2771, 3183, 1832, 225, 468, 745, 358, 10850, 2389, 1464, 2389, 31, 225, 468, 3228, 225, 468,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 713, 67, 69, 13332, 468, 3228, 7, 468, 752, 279, 2389, 2389, 273, 331, 20873, 18, 2771, 3183, 1832, 225, 468, 745, 358, 10850, 2389, 1464, 2389, 31, 225, 468, 3228, 225, 468,...
elif key == 9:
elif key == wx.WXK_TAB:
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.command_buffer.append(value) self.txt_edit.SetValue("") self.current_area_up = 0 self.current_area_down = 0 self.tmp_buffer = "" self.server.text_command(value,self) # Do nothing after this! We might be destroyed!
27fbeb2ff1603a38af53d47f26e78175c77bddc4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/27fbeb2ff1603a38af53d47f26e78175c77bddc4/window_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6463, 67, 4619, 67, 73, 11734, 67, 3001, 12, 2890, 16, 871, 4672, 3536, 8185, 1347, 326, 729, 6103, 2690, 977, 316, 326, 1241, 3604, 12123, 498, 273, 871, 18, 967, 653, 1085, 1435, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6463, 67, 4619, 67, 73, 11734, 67, 3001, 12, 2890, 16, 871, 4672, 3536, 8185, 1347, 326, 729, 6103, 2690, 977, 316, 326, 1241, 3604, 12123, 498, 273, 871, 18, 967, 653, 1085, 1435, 309...
@type lfns: LFN list [] @return: S_OK,S_ERROR """
@type lfns: list @param maxFilesPerJob: Number of files per bunch @type maxFilesPerJob: integer @param printOutput: Optional flag to print result @type printOutput: boolean @return: S_OK,S_ERROR """ if type(lfns)==type(" "): lfns = lfns.replace('LFN:','') elif type(lfns)==type([]): try: lfns = [str(lfn.replace('LFN:','')) for lfn in lfns] except Exception,x: return self.__errorReport(str(x),'Expected strings for LFNs') else: return self.__errorReport('Expected single string or list of strings for LFN(s)') if not type(maxFilesPerJob)==type(2): try: maxFilesPerJob = int(maxFilesPerJob) except Exception,x: return self.__errorReport(str(x),'Expected integer for maxFilesPerJob')
def splitInputData(self,lfns,maxFilesPerJob=20,printOutput=False): """Split the supplied lfn list by the replicas present.
2762b06242602a0ca2e8c502d626d42c8ff88c1b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/2762b06242602a0ca2e8c502d626d42c8ff88c1b/Dirac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 1210, 751, 12, 2890, 16, 20850, 2387, 16, 1896, 2697, 2173, 2278, 33, 3462, 16, 1188, 1447, 33, 8381, 4672, 3536, 5521, 326, 4580, 328, 4293, 666, 635, 326, 21545, 3430, 18, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 1210, 751, 12, 2890, 16, 20850, 2387, 16, 1896, 2697, 2173, 2278, 33, 3462, 16, 1188, 1447, 33, 8381, 4672, 3536, 5521, 326, 4580, 328, 4293, 666, 635, 326, 21545, 3430, 18, 2, -...
def putrequest(self, method, url):
def putrequest(self, method, url, skip_host=0):
def putrequest(self, method, url): """Send a request to the server.
3921ff675ec544f3738bcaf606cca745b9a508ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3921ff675ec544f3738bcaf606cca745b9a508ea/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 2293, 12, 2890, 16, 707, 16, 880, 16, 2488, 67, 2564, 33, 20, 4672, 3536, 3826, 279, 590, 358, 326, 1438, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 2293, 12, 2890, 16, 707, 16, 880, 16, 2488, 67, 2564, 33, 20, 4672, 3536, 3826, 279, 590, 358, 326, 1438, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
args = args[1:]
args = args[2:]
def runCommand(self, cfg, argSet, args, profile = False, callback = None, repos = None): args = args[1:] troveSpecs = [] labelList = [] for arg in args: if '--' in args: labelList.append(arg.split('--', 1)) else: troveSpecs.append(arg) if not labelList or not troveSpecs: return self.usage()
b38abf9b8b842aa2c9ba592a8d4a9813cfb78a23 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/b38abf9b8b842aa2c9ba592a8d4a9813cfb78a23/cvc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31933, 12, 2890, 16, 2776, 16, 1501, 694, 16, 833, 16, 3042, 273, 1083, 16, 1348, 273, 599, 16, 13686, 273, 599, 4672, 833, 273, 833, 63, 22, 26894, 23432, 537, 15999, 273, 5378, 1433,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31933, 12, 2890, 16, 2776, 16, 1501, 694, 16, 833, 16, 3042, 273, 1083, 16, 1348, 273, 599, 16, 13686, 273, 599, 4672, 833, 273, 833, 63, 22, 26894, 23432, 537, 15999, 273, 5378, 1433,...
cur = self.cursor() self.db.commit()
self.lock.acquire() try: self.db.commit() except ProgrammingError, e: log('Error commiting changes: %s', e, sender=self, traceback=True) self.lock.release()
def commit(self): # grab a cursor to lock threads cur = self.cursor() self.db.commit()
8b4bdc092a652d553b2313fed64d96bca4185538 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/8b4bdc092a652d553b2313fed64d96bca4185538/dbsqlite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 2890, 4672, 468, 11086, 279, 3347, 358, 2176, 7403, 662, 273, 365, 18, 9216, 1435, 365, 18, 1966, 18, 7371, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 2890, 4672, 468, 11086, 279, 3347, 358, 2176, 7403, 662, 273, 365, 18, 9216, 1435, 365, 18, 1966, 18, 7371, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
import base64
def fromBase64(cls, data): import base64 return cls(base64.decodestring(data))
7d37fe2286e7096e85473de54b86458ceaf417e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7d37fe2286e7096e85473de54b86458ceaf417e4/plistlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 2171, 1105, 12, 6429, 16, 501, 4672, 327, 2028, 12, 1969, 1105, 18, 4924, 1145, 371, 12, 892, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 2171, 1105, 12, 6429, 16, 501, 4672, 327, 2028, 12, 1969, 1105, 18, 4924, 1145, 371, 12, 892, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
commonStyleIdNames = eval(cfg.Read('common.styleidnames'))
commonStyleIdNames = readPyValFromConfig(cfg, 'common.styleidnames')
def initFromConfig(configFile, lang): cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(false) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = len(groupPrefix) predefStyleGroupNames, otherLangStyleGroupNames = [], [] cont, val, idx = cfg.GetFirstGroup() while cont: if val != groupPrefix and len(val) >= 5 and val[:5] == 'style': if len(val) > gpLen and val[:gpLen] == groupPrefix: predefStyleGroupNames.append(val) else: otherLangStyleGroupNames.append(val) cont, val, idx = cfg.GetNextGroup(idx) # read in common elements commonDefs = eval(cfg.Read(commonDefsFile)) assert type(commonDefs) is type({}), \ 'Common definitions (%s) not a valid dict'%commonDefsFile commonStyleIdNames = eval(cfg.Read('common.styleidnames')) assert type(commonStyleIdNames) is type({}), \ 'Common definitions (%s) not a valid dict'%'common.styleidnames' # Lang spesific settings cfg.SetPath(lang) styleIdNames = eval(cfg.Read('styleidnames')) assert type(commonStyleIdNames) is type({}), \ 'Not a valid dict [%s] styleidnames)'%lang styleIdNames.update(commonStyleIdNames) braceInfo = eval(cfg.Read('braces')) assert type(commonStyleIdNames) is type({}), \ 'Not a valid dict [%s] braces)'%lang displaySrc = cfg.Read('displaysrc') lexer = eval(cfg.Read('lexer')) keywords = cfg.Read('keywords') cfg.SetPath('') # read in current styles styles = readStylesFromConfig(cfg, groupPrefix) # read in predefined styles predefStyleGroups = {} for group in predefStyleGroupNames: predefStyleGroups[group] = readStylesFromConfig(cfg, group) # read in all other style sections otherLangStyleGroups = {} for group in otherLangStyleGroupNames: otherLangStyleGroups[group] = readStylesFromConfig(cfg, group) return (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames, predefStyleGroups, otherLangStyleGroupNames, otherLangStyleGroups, displaySrc, lexer, keywords, braceInfo)
44b2e06aa783edb8e94a97a152c4949f8c1b0b78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/44b2e06aa783edb8e94a97a152c4949f8c1b0b78/STCStyleEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 22102, 12, 1425, 812, 16, 3303, 4672, 2776, 273, 7075, 812, 809, 12, 3729, 5359, 33, 1425, 812, 16, 2154, 33, 27226, 7203, 67, 8001, 67, 14922, 67, 3776, 13, 2776, 18, 694, 12271...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 22102, 12, 1425, 812, 16, 3303, 4672, 2776, 273, 7075, 812, 809, 12, 3729, 5359, 33, 1425, 812, 16, 2154, 33, 27226, 7203, 67, 8001, 67, 14922, 67, 3776, 13, 2776, 18, 694, 12271...
ki[0,0] = s0 ki[1,0] = s1
ki[0, 0] = s0 ki[1, 0] = s1
def key_schedule(self, kj, i): """ Return $k_i$ for a given $i$ and $k_j$ with $j = i-1$.
26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 10676, 12, 2890, 16, 417, 78, 16, 277, 4672, 3536, 2000, 271, 79, 67, 77, 8, 364, 279, 864, 271, 77, 8, 471, 271, 79, 67, 78, 8, 598, 271, 78, 273, 277, 17, 21, 8, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 10676, 12, 2890, 16, 417, 78, 16, 277, 4672, 3536, 2000, 271, 79, 67, 77, 8, 364, 279, 864, 271, 77, 8, 471, 271, 79, 67, 78, 8, 598, 271, 78, 273, 277, 17, 21, 8, 18,...
transport = tcp.Client(smartHostIP, 25, protocol)
transport = tcp.Client(smartHostAddr[0], smartHostAddr[1], protocol)
def checkState(self): '''call me periodically to check I am still up to date
27ade2f80864d50ca2da00553ff3b93709bdea6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/27ade2f80864d50ca2da00553ff3b93709bdea6f/relaymanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13632, 12, 2890, 4672, 9163, 1991, 1791, 26736, 358, 866, 467, 2125, 4859, 731, 358, 1509, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 13632, 12, 2890, 4672, 9163, 1991, 1791, 26736, 358, 866, 467, 2125, 4859, 731, 358, 1509, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
""" return transferDB.increaseChannelFiles(channelID)
""" return transferDB.increaseChannelFiles( channelID )
def export_increaseChannelFiles(self,channelID): """ Increase the numner of files on a channel """ return transferDB.increaseChannelFiles(channelID)
fbaa0cc38e2ebaeb3cf9a01c58d193b76f63bf22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/fbaa0cc38e2ebaeb3cf9a01c58d193b76f63bf22/TransferDBMonitoringHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 267, 11908, 2909, 2697, 12, 2890, 16, 4327, 734, 4672, 3536, 657, 11908, 326, 290, 755, 264, 434, 1390, 603, 279, 1904, 3536, 327, 7412, 2290, 18, 267, 11908, 2909, 2697, 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, 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, 3359, 67, 267, 11908, 2909, 2697, 12, 2890, 16, 4327, 734, 4672, 3536, 657, 11908, 326, 290, 755, 264, 434, 1390, 603, 279, 1904, 3536, 327, 7412, 2290, 18, 267, 11908, 2909, 2697, 12, ...
return cmp_data_filename
def findOutCmpDataFilename(cls, cmp_data_filename, QC_method_id, QCMethod_class): """ 2008-08-26 add QCMethod_class 2008-08-16 split from run() to let QC_149.py to call it """ # if cmp_data_filename not specified, try to find in the data_description column in table QC_method. if not cmp_data_filename and QC_method_id!=0: qm = QCMethod_class.query.get(QC_method_id) if qm and qm.data_description: data_description_ls = qm.data_description.split('=') if len(data_description_ls)>1: cmp_data_filename = qm.data_description.split('=')[1].strip() return cmp_data_filename #after db query, cmp_data_filename is still nothing, exit program. if not cmp_data_filename and QC_method_id!=0: sys.stderr.write("cmp_data_filename is still nothing even after db query. please specify it on the commandline.\n") sys.exit(3)
56da880e60672dcb23592a374c5527a0391ff61f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/56da880e60672dcb23592a374c5527a0391ff61f/QC_250k.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 1182, 31832, 751, 5359, 12, 6429, 16, 9411, 67, 892, 67, 3459, 16, 2238, 39, 67, 2039, 67, 350, 16, 2238, 39, 1305, 67, 1106, 4672, 3536, 4044, 28, 17, 6840, 17, 5558, 527, 223...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1182, 31832, 751, 5359, 12, 6429, 16, 9411, 67, 892, 67, 3459, 16, 2238, 39, 67, 2039, 67, 350, 16, 2238, 39, 1305, 67, 1106, 4672, 3536, 4044, 28, 17, 6840, 17, 5558, 527, 223...
def decorator(func): def new_func(self): return time.time(), "ok", func(self) new_func.func_name = func.func_name return new_func return decorator
def new_func(self): return time.time(), "ok", func(self) new_func.func_name = func.func_name return new_func
def decorator(func): def new_func(self): return time.time(), "ok", func(self) new_func.func_name = func.func_name return new_func
ef28e9864f5970def4199c87d4795df24549e109 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10400/ef28e9864f5970def4199c87d4795df24549e109/proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7367, 12, 644, 4672, 1652, 394, 67, 644, 12, 2890, 4672, 327, 813, 18, 957, 9334, 315, 601, 3113, 1326, 12, 2890, 13, 394, 67, 644, 18, 644, 67, 529, 273, 1326, 18, 644, 67, 529, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7367, 12, 644, 4672, 1652, 394, 67, 644, 12, 2890, 4672, 327, 813, 18, 957, 9334, 315, 601, 3113, 1326, 12, 2890, 13, 394, 67, 644, 18, 644, 67, 529, 273, 1326, 18, 644, 67, 529, 3...
expand_autotemplate_closing(result, state)
if state.autotemplate_opened: result.append(get_autotemplate_closing())
def convert2beamer(lines): """ convert to LaTeX """ state = w2bstate() result = [] codebuffer = [] autotemplatebuffer = [] nowikimode = False codemode = False autotemplatemode = False for line in lines: (line, nowikimode) = get_nowikimode(line, nowikimode) if nowikimode: result.append(line) else: (line, _codemode) = get_codemode(line, codemode) if _codemode and not codemode: #code mode was turned on codebuffer = [] elif not _codemode and codemode: #code mode was turned off expand_code_segment(result, codebuffer, state) codemode = _codemode if codemode: codebuffer.append(line) else: (line, _autotemplatemode) = get_autotemplatemode(line, autotemplatemode) if _autotemplatemode and not autotemplatemode: #autotemplate mode was turned on autotemplatebuffer = [] elif not _autotemplatemode and autotemplatemode: #autotemplate mode was turned off expand_autotemplate_opening(result, autotemplatebuffer, state) autotemplatemode = _autotemplatemode if autotemplatemode: autotemplatebuffer.append(line) else: state.current_line = len(result) result.append(transform(line, state)) result.append(transform("", state)) # close open environments if state.frame_opened: result.append(get_frame_closing(state)) expand_autotemplate_closing(result, state) return result
9486dec8f66e2ea1f1a076ce276fbe103b4b972b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14466/9486dec8f66e2ea1f1a076ce276fbe103b4b972b/wiki2beamer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 22, 2196, 24458, 12, 3548, 4672, 3536, 1765, 358, 21072, 21575, 60, 3536, 919, 273, 341, 22, 70, 2019, 1435, 563, 273, 5378, 981, 4106, 273, 5378, 2059, 352, 29761, 4106, 273, 5378...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 22, 2196, 24458, 12, 3548, 4672, 3536, 1765, 358, 21072, 21575, 60, 3536, 919, 273, 341, 22, 70, 2019, 1435, 563, 273, 5378, 981, 4106, 273, 5378, 2059, 352, 29761, 4106, 273, 5378...
"""Parse a sequence of RFC-822 phrases. A phrase is a sequence of words, which are in turn either RFC-822 atoms or quoted-strings. Phrases are canonicalized by squeezing all runs of continuous whitespace into one space.
"""Parse a sequence of RFC 2822 phrases. A phrase is a sequence of words, which are in turn either RFC 2822 atoms or quoted-strings. Phrases are canonicalized by squeezing all runs of continuous whitespace into one space.
def getphraselist(self): """Parse a sequence of RFC-822 phrases.
27c74ac513fcc0a7da917d190a1f15e98f8beb04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/27c74ac513fcc0a7da917d190a1f15e98f8beb04/_parseaddr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 844, 21636, 5449, 12, 2890, 4672, 3536, 3201, 279, 3102, 434, 8372, 17, 24532, 31413, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 844, 21636, 5449, 12, 2890, 4672, 3536, 3201, 279, 3102, 434, 8372, 17, 24532, 31413, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
@staticmethod def guessReadingDialect(string, includeToneless=False):
@classmethod def guessReadingDialect(cls, string, includeToneless=False):
def _getDiacriticVowels(): """ Gets a list of Cantonese Yale vowels with diacritical marks for tones.
32880dade63f5fc028e7ac3111bdc54fe01234ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11128/32880dade63f5fc028e7ac3111bdc54fe01234ad/operator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 14521, 1077, 583, 335, 58, 25068, 13332, 3536, 11881, 279, 666, 434, 385, 970, 265, 3392, 1624, 5349, 331, 25068, 598, 4314, 1077, 15197, 13999, 364, 268, 5322, 18, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 14521, 1077, 583, 335, 58, 25068, 13332, 3536, 11881, 279, 666, 434, 385, 970, 265, 3392, 1624, 5349, 331, 25068, 598, 4314, 1077, 15197, 13999, 364, 268, 5322, 18, 2, -100, -1...
inherits = [ cxx.Inherit(channelname +'::Listener') ]
channellistener = channelname +'::'+ channellistener inherits = [ cxx.Inherit(channellistener) ]
def visitProtocol(self, p): if p.decl.type.isManager(): self.file.addthing(cxx.CppDirective('include', '"base/id_map.h"'))
47e714eabd12f0fda557e26a352efa7fd722e1bf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/47e714eabd12f0fda557e26a352efa7fd722e1bf/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 5752, 12, 2890, 16, 293, 4672, 309, 293, 18, 8840, 18, 723, 18, 291, 1318, 13332, 365, 18, 768, 18, 1289, 4274, 12, 71, 5279, 18, 39, 11858, 13307, 2668, 6702, 2187, 2119, 1969, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3757, 5752, 12, 2890, 16, 293, 4672, 309, 293, 18, 8840, 18, 723, 18, 291, 1318, 13332, 365, 18, 768, 18, 1289, 4274, 12, 71, 5279, 18, 39, 11858, 13307, 2668, 6702, 2187, 2119, 1969, ...
end = self.textbuffer.get_iter_at_line(self.breakpointlineno)
end = self.textbuffer.get_iter_at_line(self.breakpointlineno-1)
def toggle_breakpoint(self, widget, data=None): #print "toggle breakpoint", self.breakpointlineno if not self.breakpointdict.get(self.breakpointlineno): self.debuggee.send('break %s\n'%self.breakpointlineno) self.handle_debuggee_output() if self.breakpointsuccess: mark = self.textbuffer.create_source_mark(None, "breakpoint", self.textbuffer.get_iter_at_line(self.breakpointlineno-1)) print "Make breakpoint with no", self.breakpointno self.breakpointdict[self.breakpointlineno] = self.breakpointno else: "TODO put can't set breakpoint into status line" #print self.breakpointdict else: bpno = self.breakpointdict.get(self.breakpointlineno) if not bpno: print "TODO put error in status line" return self.clearbpsuccess = None print "Clear Breakpoint {0}".format(bpno) self.debuggee_send('clear {0}\n'.format(bpno)) #self.debuggee.send('clear {0}\n'.format(bpno)) #self.handle_debuggee_output() if self.clearbpsuccess == True: start = self.textbuffer.get_iter_at_line(self.breakpointlineno-1) end = self.textbuffer.get_iter_at_line(self.breakpointlineno) self.textbuffer.remove_source_marks(start, end, category=None) del self.breakpointdict[self.breakpointlineno] "Toggle breakpoint" "clear from dictionary" elif self.clearbpsuccess == False: print "Couldn't delete breakpoint" "Error message" else: print 'Critical Error' #print "Deleting breakpoints not implemented yet"
6b526b2ea2272fe3c6316d6cf8b8e9ac5d554ddb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4616/6b526b2ea2272fe3c6316d6cf8b8e9ac5d554ddb/gepdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10486, 67, 8820, 1153, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 468, 1188, 315, 14401, 18820, 3113, 365, 18, 8820, 1153, 17782, 309, 486, 365, 18, 8820, 1153, 1576, 18, 588, 12, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10486, 67, 8820, 1153, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 468, 1188, 315, 14401, 18820, 3113, 365, 18, 8820, 1153, 17782, 309, 486, 365, 18, 8820, 1153, 1576, 18, 588, 12, 28...
return _ldap_call(self._l.abandon,msgid)
return self._ldap_call(self._l.abandon,msgid)
def abandon(self,msgid): return _ldap_call(self._l.abandon,msgid)
140b2770ed9a36efdac97d90834cdd76cd0d786b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4610/140b2770ed9a36efdac97d90834cdd76cd0d786b/ldapthreadlock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1223, 464, 265, 12, 2890, 16, 3576, 350, 4672, 327, 389, 14394, 67, 1991, 12, 2890, 6315, 80, 18, 378, 464, 265, 16, 3576, 350, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1223, 464, 265, 12, 2890, 16, 3576, 350, 4672, 327, 389, 14394, 67, 1991, 12, 2890, 6315, 80, 18, 378, 464, 265, 16, 3576, 350, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
request.setHeader('Content-Type', self.CONTENT_TYPE)
def render_POST(self, request): """Process an incoming AMF packet.""" if request.content: d = defer.Deferred() d.addCallbacks(request.content.read, self.fail, errbackArgs=(request,)) d.addCallbacks(self.decode, self.fail, callbackArgs=(request,), errbackArgs=(request,)) d.addCallbacks(self.invoke, self.fail, errbackArgs=(request,)) d.addCallbacks(self.checkComplete, self.fail, callbackArgs=(request,), errbackArgs=(request,)) d.callback(int(request.getHeader('Content-Length')))
d785cf670cda0d67244697c522169fa38ac7194b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5028/d785cf670cda0d67244697c522169fa38ac7194b/twisted_channel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 3798, 12, 2890, 16, 590, 4672, 3536, 2227, 392, 6935, 432, 13542, 4414, 12123, 309, 590, 18, 1745, 30, 302, 273, 2220, 18, 16886, 1435, 302, 18, 1289, 10617, 12, 2293, 18, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 3798, 12, 2890, 16, 590, 4672, 3536, 2227, 392, 6935, 432, 13542, 4414, 12123, 309, 590, 18, 1745, 30, 302, 273, 2220, 18, 16886, 1435, 302, 18, 1289, 10617, 12, 2293, 18, 17...
cmd_link = $(LD) $(LDFLAGS) -o $@ -Wl,--start-group $^ -Wl,--end-group $(LIBS)
cmd_link = $(LD) $(LDFLAGS) -o $@ -Wl,--start-group $^ -Wl,--end-group
ifdef V quiet=
33fe67cb2be7bc93b3820f3805f84fd521c8455c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/33fe67cb2be7bc93b3820f3805f84fd521c8455c/make.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 536, 776, 10902, 33, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 536, 776, 10902, 33, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
cmd = "built\\bin\\interrogate_module.exe "
cmd = PREFIX+"/bin/interrogate_module.exe "
def InterrogateModule(outc=0, module=0, library=0, files=0): if ((outc==0)|(module==0)|(library==0)|(files==0)): sys.exit("syntax error in InterrogateModule directive"); outc = "built/tmp/"+outc files = xpaths("built/etc/",files,"") if (older(outc, files)): if (COMPILER=="MSVC7"): cmd = "built\\bin\\interrogate_module.exe " if (COMPILER=="LINUXA"): cmd = "built/bin/interrogate_module " cmd = cmd + " -oc \"" + outc + '" -module "' + module + '" -library "' + library + '" -python ' for x in files: cmd = cmd + ' "' + x + '" ' oscmd(cmd) updatefiledate(outc);
aa9700942409f59dfc63d4542d0bad0a01230726 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/aa9700942409f59dfc63d4542d0bad0a01230726/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5294, 15283, 3120, 12, 659, 71, 33, 20, 16, 1605, 33, 20, 16, 5313, 33, 20, 16, 1390, 33, 20, 4672, 309, 14015, 659, 71, 631, 20, 14047, 12, 2978, 631, 20, 14047, 12, 12083, 631, 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, 5294, 15283, 3120, 12, 659, 71, 33, 20, 16, 1605, 33, 20, 16, 5313, 33, 20, 16, 1390, 33, 20, 4672, 309, 14015, 659, 71, 631, 20, 14047, 12, 2978, 631, 20, 14047, 12, 12083, 631, 2...
indent -= self.GetIndent()
if extra != "block dedent": indent -= self.GetIndent()
def getReindentColumn(self, linenum, linestart, pos, before, col, ind): """Reindent the specified line to the correct level.
8702a4cf9d9c81a2e7abfdd28d9a49b2831832e0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/8702a4cf9d9c81a2e7abfdd28d9a49b2831832e0/python_mode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 9355, 1494, 12, 2890, 16, 4739, 7924, 16, 4739, 27893, 16, 949, 16, 1865, 16, 645, 16, 1547, 4672, 3536, 426, 9355, 326, 1269, 980, 358, 326, 3434, 1801, 18, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 9355, 1494, 12, 2890, 16, 4739, 7924, 16, 4739, 27893, 16, 949, 16, 1865, 16, 645, 16, 1547, 4672, 3536, 426, 9355, 326, 1269, 980, 358, 326, 3434, 1801, 18, 2, -100, -100, -100,...
"Returns the year for each date in self._dates."
"""Returns the year for each date in self._dates."""
def year(self): "Returns the year for each date in self._dates." return self._dates.year
fa55c4c696ec9c654bfe9099b550f554a05ac28b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/fa55c4c696ec9c654bfe9099b550f554a05ac28b/tseries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3286, 12, 2890, 4672, 3536, 1356, 326, 3286, 364, 1517, 1509, 316, 365, 6315, 9683, 12123, 327, 365, 6315, 9683, 18, 6874, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3286, 12, 2890, 4672, 3536, 1356, 326, 3286, 364, 1517, 1509, 316, 365, 6315, 9683, 12123, 327, 365, 6315, 9683, 18, 6874, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
utils.vprint("The Proxy now has %s left" % utils.strTime(result), verbosity, printTime = True)
utils.vprint("The proxy now has %s left" % utils.strTime(result), verbosity, printTime = True)
def timeleft(self, checkedForTime = None): if not checkedForTime: checkedForTime = self.lowerLimit delta = time.time() - self._lastUpdate cachedTimeleft = max(0, self.getTimeleft(False, checkedForTime) - delta) # recheck proxy: # * when time is running out (but at most once per minute) # * after at least 30min have passed if (cachedTimeleft < checkedForTime and delta > 60) or delta > 60*60: self._lastUpdate = time.time() result = self.getTimeleft(True, checkedForTime) if cachedTimeleft < checkedForTime: verbosity = -1 else: verbosity = 0 utils.vprint("The Proxy now has %s left" % utils.strTime(result), verbosity, printTime = True) return result else: return cachedTimeleft
d7fd7a61529b4c10537fa272657c08ee5ceb6c01 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8443/d7fd7a61529b4c10537fa272657c08ee5ceb6c01/proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1658, 6516, 1222, 12, 2890, 16, 5950, 1290, 950, 273, 599, 4672, 309, 486, 5950, 1290, 950, 30, 5950, 1290, 950, 273, 365, 18, 8167, 3039, 3622, 273, 813, 18, 957, 1435, 300, 365, 6315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1658, 6516, 1222, 12, 2890, 16, 5950, 1290, 950, 273, 599, 4672, 309, 486, 5950, 1290, 950, 30, 5950, 1290, 950, 273, 365, 18, 8167, 3039, 3622, 273, 813, 18, 957, 1435, 300, 365, 6315...
return self.socket.listen (num) def bind (self, addr):
return self.socket.listen(num) def bind(self, addr):
def listen (self, num): self.accepting = 1 if os.name == 'nt' and num > 5: num = 1 return self.socket.listen (num)
52c4de7c23c31563e4f0316b68865e17bb8c0f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/52c4de7c23c31563e4f0316b68865e17bb8c0f33/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6514, 261, 2890, 16, 818, 4672, 365, 18, 9436, 310, 273, 404, 309, 1140, 18, 529, 422, 296, 496, 11, 471, 818, 405, 1381, 30, 818, 273, 404, 327, 365, 18, 7814, 18, 18085, 261, 2107,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6514, 261, 2890, 16, 818, 4672, 365, 18, 9436, 310, 273, 404, 309, 1140, 18, 529, 422, 296, 496, 11, 471, 818, 405, 1381, 30, 818, 273, 404, 327, 365, 18, 7814, 18, 18085, 261, 2107,...
dphi1ix = N.abs(qix[:, N.newaxis]-kix) -1
dphi1ix = N.abs(kix-qix[:, N.newaxis]) -1
def getsourceandintegrate(m, savefile=None, intmethod=None, srcfunc=slowrollsrcterm): """Calculate and save integrated source term. Using first order results in the specified model, the source term for second order perturbations is obtained from the given source function. The convolution integral is performed and the results are saved in a file with the specified filename. Parameters ---------- m: compatible cosmomodels model instance The model class should contain first order results as in `cosmomodels.FOCanonicalTwoStage` savefile: String, optional Filename where results should be saved. intmethod: {"romb", "simps"} Two different integration methods to perform convolution integral with. If neither is specified the length of the `k` array is checked to see whether the preferred choice of romberg integration is possible. Integration methods are `numpy.integrate.romb` and `numpy.integrate.simps`. srcfunc: function, optional Function which returns unintegrated source term. Defaults to slowrollsrcterm in this module. Function signature is `srcfunc(k, q, a, potentials, bgvars, fovars, s2shape)`. Returns ------- savefile: String Filename where results have been saved. """ #testing
de72eeab8eb284f10f1ec94d998f80cfaafd620b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7283/de72eeab8eb284f10f1ec94d998f80cfaafd620b/sosource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3168, 464, 14970, 5141, 12, 81, 16, 1923, 768, 33, 7036, 16, 509, 2039, 33, 7036, 16, 1705, 644, 33, 87, 821, 2693, 11254, 299, 1035, 4672, 3536, 8695, 471, 1923, 31121, 1084, 248...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3168, 464, 14970, 5141, 12, 81, 16, 1923, 768, 33, 7036, 16, 509, 2039, 33, 7036, 16, 1705, 644, 33, 87, 821, 2693, 11254, 299, 1035, 4672, 3536, 8695, 471, 1923, 31121, 1084, 248...
if not wrapper.package_installed(self.category + '/' + self.pn, self.pm):
if not wrapper.package_installed(package, self.pm):
def packageavail(self): ''' Check to see whether the given package has been installed or not.
ac35a177289eca4a7b65d96933d76246f5a4f919 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10458/ac35a177289eca4a7b65d96933d76246f5a4f919/db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2181, 842, 671, 12, 2890, 4672, 9163, 2073, 358, 2621, 2856, 326, 864, 2181, 711, 2118, 5876, 578, 486, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2181, 842, 671, 12, 2890, 4672, 9163, 2073, 358, 2621, 2856, 326, 864, 2181, 711, 2118, 5876, 578, 486, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
troveName, versionSpec,
cu.encode(troveName), cu.encode(versionSpec),
def _setupTroveFilter(self, cu, troveSpecs, flavorIndices): self.log(3, troveSpecs, flavorIndices) schema.resetTable(cu, 'tmpGTVL') for troveName, versionDict in troveSpecs.iteritems(): if type(versionDict) is list: versionDict = dict.fromkeys(versionDict, [ None ])
2cf804164d472d5951ad81dfdfb40ec47b42618c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8747/2cf804164d472d5951ad81dfdfb40ec47b42618c/netserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 56, 303, 537, 1586, 12, 2890, 16, 15985, 16, 23432, 537, 15999, 16, 19496, 8776, 4672, 365, 18, 1330, 12, 23, 16, 23432, 537, 15999, 16, 19496, 8776, 13, 1963, 18, 6208, 138...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8401, 56, 303, 537, 1586, 12, 2890, 16, 15985, 16, 23432, 537, 15999, 16, 19496, 8776, 4672, 365, 18, 1330, 12, 23, 16, 23432, 537, 15999, 16, 19496, 8776, 13, 1963, 18, 6208, 138...
f.url(0),
i != cur_page and f.url(0) or '',
def formatPrevNextPageLinks(self, hitsFrom, hitsPerPage, hitsNum): """ Format previous and next page links in page
18e03d9357d873fdddb3750259977e1f4fe5964d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/18e03d9357d873fdddb3750259977e1f4fe5964d/results.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 9958, 21563, 7100, 12, 2890, 16, 11076, 1265, 16, 11076, 13005, 16, 11076, 2578, 4672, 3536, 4077, 2416, 471, 1024, 1363, 4716, 316, 1363, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 740, 9958, 21563, 7100, 12, 2890, 16, 11076, 1265, 16, 11076, 13005, 16, 11076, 2578, 4672, 3536, 4077, 2416, 471, 1024, 1363, 4716, 316, 1363, 2, -100, -100, -100, -100, -100, -100, -100,...
strip --strip-all portmidi.dll
dlltool -D portmidi.dll -d portmidi.def -l portmidi.dll.a
5ed962a58a84830cbe0f649aee7072426feb4c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/5ed962a58a84830cbe0f649aee7072426feb4c22/msys_link_VC_2008_dlls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 302, 2906, 6738, 300, 40, 1756, 13138, 77, 18, 27670, 300, 72, 1756, 13138, 77, 18, 536, 300, 80, 1756, 13138, 77, 18, 27670, 18, 69, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 302, 2906, 6738, 300, 40, 1756, 13138, 77, 18, 27670, 300, 72, 1756, 13138, 77, 18, 536, 300, 80, 1756, 13138, 77, 18, 27670, 18, 69, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
print "debug (once-per-session message): why are some glnames duplicated on the namestack?",names
print "debug (once-per-session message): why are some glnames duplicated on the namestack?", names
def do_glselect_if_wanted(self): #bruce 070919 split this out """ Do the glRenderMode(GL_SELECT) drawing for one frame (and related individual object depth/stencil buffer drawing) if desired for this frame. """ if self.glselect_wanted: # note: this will be reset below. ####@@@@ WARNING: The original code for this, here in GLPane, has been duplicated and slightly modified # in at least three other places (search for glRenderMode to find them). This is bad; common code # should be used. Furthermore, I suspect it's sometimes needlessly called more than once per frame; # that should be fixed too. [bruce 060721 comment] wX, wY, self.targetdepth = self.glselect_wanted # wX, wY is the point to do the hit-test at # targetdepth is the depth buffer value to look for at that point, during ordinary drawing phase # (could also be used to set up clipping planes to further restrict hit-test, but this isn't yet done) # (Warning: targetdepth could in theory be out of date, if more events come between bareMotion # and the one caused by its gl_update, whose paintGL is what's running now, and if those events # move what's drawn. Maybe that could happen with mousewheel events or (someday) with keypresses # having a graphical effect. Ideally we'd count intentional redraws, and disable this picking in that case.) self.wX, self.wY = wX, wY self.glselect_wanted = 0 self.current_glselect = (wX, wY, 3, 3) #bruce 050615 for use by nodes which want to set up their own projection matrix self._setup_projection( glselect = self.current_glselect ) # option makes it use gluPickMatrix # replace 3, 3 with 1, 1? 5, 5? not sure whether this will matter... in principle should have no effect except speed self._compute_frustum_planes() # piotr 080331 - the frustum planes have to be setup after the # projection matrix is setup. I'm not sure if there may # be any side effects - see the comment below about # possible optimization. glSelectBuffer(self.glselectBufferSize) glRenderMode(GL_SELECT) glInitNames() ## glPushName(0) # this would be ignored if not in GL_SELECT mode, so do it after we enter that! [no longer needed] glMatrixMode(GL_MODELVIEW) try: self.drawing_phase = 'glselect' #bruce 070124 self.graphicsMode.Draw() # OPTIM: should perhaps optim by skipping chunks based on bbox... don't know if that would help or hurt # Note: this might call some display lists which, when created, registered namestack names, # so we need to still know those names! except: print_compact_traceback("exception in mode.Draw() during GL_SELECT; ignored; restoring modelview matrix: ") glMatrixMode(GL_MODELVIEW) self._setup_modelview( ) ### REVIEW: correctness of this is unreviewed! # now it's important to continue, at least enough to restore other gl state self._frustum_planes_available = False # piotr 080331 # just to be safe and not use the frustum planes computed for # the pick matrix self.drawing_phase = '?' self.current_glselect = False ###e On systems with no stencil buffer, I think we'd also need to draw selobj here in highlighted form # (in case that form is bigger than when it's not highlighted), or (easier & faster) just always pretend # it passes the hit test and add it to glselect_dict -- and, make sure to give it "first dibs" for being # the next selobj. I'll implement some of this now (untested when no stencil buffer) but not yet all. [bruce 050612] selobj = self.selobj if selobj is not None: self.glselect_dict[id(selobj)] = selobj ###k unneeded, if the func that looks at this dict always tries selobj first # (except for a kluge near "if self.glselect_dict", commented on below) glFlush() hit_records = list(glRenderMode(GL_RENDER)) ## print "%d hits" % len(hit_records) for (near, far, names) in hit_records: # see example code, renderpass.py ## print "hit record: near, far, names:", near, far, names # e.g. hit record: near, far, names: 1439181696 1453030144 (1638426L,) # which proves that near/far are too far apart to give actual depth, # in spite of the 1-pixel drawing window (presumably they're vertices # taken from unclipped primitives, not clipped ones). if 1: # partial workaround for bug 1527. This can be removed once that bug (in drawer.py) # is properly fixed. This exists in two places -- GLPane.py and modes.py. [bruce 060217] if names and names[-1] == 0: print "%d(g) partial workaround for bug 1527: removing 0 from end of namestack:" % env.redraw_counter, names names = names[:-1]
498839aedfd28994ad03aaba2f4960caabdea001 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/498839aedfd28994ad03aaba2f4960caabdea001/GLPane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 7043, 4025, 67, 430, 67, 25861, 12, 2890, 4672, 468, 2848, 3965, 10934, 5908, 3657, 1416, 333, 596, 3536, 2256, 326, 5118, 3420, 2309, 12, 11261, 67, 4803, 13, 16327, 364, 1245,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 7043, 4025, 67, 430, 67, 25861, 12, 2890, 4672, 468, 2848, 3965, 10934, 5908, 3657, 1416, 333, 596, 3536, 2256, 326, 5118, 3420, 2309, 12, 11261, 67, 4803, 13, 16327, 364, 1245,...
exc_typename = space.getattr(self.w_type, w('__name__'))
exc_typename = space.unwrap( space.getattr(self.w_type, w('__name__')))
def print_detailed_traceback(self, space=None, file=None): """Dump a nice detailed interpreter- and application-level traceback, useful to debug the interpreter.""" if file is None: file = sys.stderr for i in range(len(self.debug_tbs)-1, -1, -1): import traceback interpr_file = LinePrefixer(file, '||') print >> interpr_file, "Traceback (interpreter-level):" traceback.print_tb(self.debug_tbs[i], file=interpr_file) self.print_app_tb_only(file) if space is None: exc_typename = str(self.w_type) exc_value = self.w_value else: w = space.wrap exc_typename = space.getattr(self.w_type, w('__name__')) exc_value = space.unwrap(space.str(self.w_value)) print >> file, '(application-level)', if exc_value is None: print >> file, exc_typename else: print >> file, exc_typename+':', exc_value
e844c6561a3f5ece196d463be83aa7e9ba11967a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/e844c6561a3f5ece196d463be83aa7e9ba11967a/executioncontext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 72, 6372, 67, 21696, 12, 2890, 16, 3476, 33, 7036, 16, 585, 33, 7036, 4672, 3536, 10628, 279, 13752, 6864, 16048, 17, 471, 2521, 17, 2815, 10820, 16, 5301, 358, 1198, 326, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 72, 6372, 67, 21696, 12, 2890, 16, 3476, 33, 7036, 16, 585, 33, 7036, 4672, 3536, 10628, 279, 13752, 6864, 16048, 17, 471, 2521, 17, 2815, 10820, 16, 5301, 358, 1198, 326, 16...