rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
headlines.extend([ que.question.uniq_name for que in event.game.questionforgame_set.manall() ])
headlines.extend([ que.question.uniq_name for que in event.game.questionforgame_set.all() ])
def show_applied_people(request, eventid, slotted=False, cvsexport=False): event = Event.objects.get(id=eventid) regs = Registration.objects.filter(event=event).order_by(u"player") people = [ reg.player for reg in regs ] people.sort(lambda x,y: cmp(x.surname, y.surname)) headlines = [ u"Příjmení", u"Jméno", u"Přezdívka", u"Telefon", u"Email", u"Rok narození"] + [ que.question.uniq_name for que in event.question.all() ] if event.game is not None: headlines.extend([ que.question.uniq_name for que in event.game.questionforgame_set.manall() ]) if slotted and event.type == "multi": slots = MultiGameSlot.objects.filter(event=event) headlines.extend([ slot.name for slot in slots ]) else: slots=[] cells = [] for player in people: row = [ player.surname, player.name, player.nick] row += [ player.phone, player.user.email, player.year_of_birth] reg = Registration.objects.get(player=player, event=event) for question in [ que.question for que in event.question.all()]: answers = reg.answers.filter(question=question) row += [ u",".join( [ ans.answer for ans in answers ]) ] if event.game is not None: for question in [ que.question for que in event.game.questionforgame_set.all()]: answers = reg.answers.filter(question=question) row += [ ",".join( [ ans.answer for ans in answers ]) ] for slot in slots: game = slot.getGameForPlayer(player) if game: row.append(game.game.name) else: row.append("--nic---") cells.append(row) if cvsexport: cells = [headlines] + cells print cells return HttpResponse("\n".join([",".join([ u'"%s"' % elm for elm in row]) for row in cells ]), mimetype="text/plain") return render_to_response('admin/eventpeople.html', {'menuitems' : createMenuItems(), 'title' : u"Lidé přihlášení na %s" % event.name, 'user' : request.user, 'cells' : cells, 'headers' : headlines, 'event' : event}, )
cab65551718ccd37eb97e28a1568bbc2007db812 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7994/cab65551718ccd37eb97e28a1568bbc2007db812/events_views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 438, 3110, 67, 28035, 12, 2293, 16, 871, 350, 16, 4694, 2344, 33, 8381, 16, 8951, 20909, 655, 33, 8381, 4672, 871, 273, 2587, 18, 6911, 18, 588, 12, 350, 33, 2575, 350, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 438, 3110, 67, 28035, 12, 2293, 16, 871, 350, 16, 4694, 2344, 33, 8381, 16, 8951, 20909, 655, 33, 8381, 4672, 871, 273, 2587, 18, 6911, 18, 588, 12, 350, 33, 2575, 350, 13,...
seg_str = seg_str.strip() for var in vars_dict: regex = re.compile("`"+var) replacement = vars_dict.get(var)[0] seg_str = regex.sub(replacement,seg_str)
pp_seg_str = pp_seg_str.strip() pp_seg_str_lines = pp_seg_str.split("\n") new_pp_seg_str_lines = [] pp_print_regex = re.compile("print\(") for line in pp_seg_str_lines: if not pp_print_regex.search(line): i = 0 for pp_var in pp_vars_dict: pp_regex = re.compile("`"+pp_var) pp_replacement = pp_vars_dict.get(pp_var)[0] line = pp_regex.sub(pp_replacement, line) new_pp_seg_str_lines.append(line) pp_seg_str = "\n".join(new_pp_seg_str_lines)
def parsePreSeg(seg_str,vars_dict): # Strip whitespace seg_str = seg_str.strip() # Replace any defined variables using regex search & replace for var in vars_dict: regex = re.compile("`"+var) replacement = vars_dict.get(var)[0] seg_str = regex.sub(replacement,seg_str) # Get rid of carriage return regex = re.compile(".\n") regex2 = re.compile("\r") seg_str = regex.sub("\n",seg_str) seg_str = regex2.sub("",seg_str) # Replace "print(" with "pbuffer(" regex = re.compile("print\(") seg_str = regex.sub("pbuffer(False,",seg_str) # Execute the segment try: exec(seg_str) except: print "Error executing the following code:\n" + seg_str sys.exit(1)
bc7caa6020ce9c0d3efd9e0dbbc8e121c4373dda /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3352/bc7caa6020ce9c0d3efd9e0dbbc8e121c4373dda/preprocessor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1386, 3289, 12, 5680, 67, 701, 16, 4699, 67, 1576, 4672, 225, 468, 15589, 7983, 2291, 67, 701, 273, 2291, 67, 701, 18, 6406, 1435, 225, 468, 6910, 1281, 2553, 3152, 1450, 3936, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1386, 3289, 12, 5680, 67, 701, 16, 4699, 67, 1576, 4672, 225, 468, 15589, 7983, 2291, 67, 701, 273, 2291, 67, 701, 18, 6406, 1435, 225, 468, 6910, 1281, 2553, 3152, 1450, 3936, 1...
author = sanitize_file_name(authors.split(',')[0][:self.PATH_LIMIT]).decode(filesystem_encoding) title = sanitize_file_name(self.title(id, index_is_id=True)[:self.PATH_LIMIT]).decode(filesystem_encoding)
author = sanitize_file_name(authors.split(',')[0][:self.PATH_LIMIT]).decode(filesystem_encoding, 'ignore') title = sanitize_file_name(self.title(id, index_is_id=True)[:self.PATH_LIMIT]).decode(filesystem_encoding, 'ignore')
def construct_path_name(self, id): ''' Construct the directory name for this book based on its metadata. ''' authors = self.authors(id, index_is_id=True) if not authors: authors = _('Unknown') author = sanitize_file_name(authors.split(',')[0][:self.PATH_LIMIT]).decode(filesystem_encoding) title = sanitize_file_name(self.title(id, index_is_id=True)[:self.PATH_LIMIT]).decode(filesystem_encoding) path = author + '/' + title + ' (%d)'%id return path
39e94cdc1118237941ec8b128658e4a5b2c74614 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/39e94cdc1118237941ec8b128658e4a5b2c74614/database2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4872, 67, 803, 67, 529, 12, 2890, 16, 612, 4672, 9163, 14291, 326, 1867, 508, 364, 333, 6978, 2511, 603, 2097, 1982, 18, 9163, 14494, 273, 365, 18, 19368, 12, 350, 16, 770, 67, 291, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4872, 67, 803, 67, 529, 12, 2890, 16, 612, 4672, 9163, 14291, 326, 1867, 508, 364, 333, 6978, 2511, 603, 2097, 1982, 18, 9163, 14494, 273, 365, 18, 19368, 12, 350, 16, 770, 67, 291, ...
plain_href = req.href.browser(node.path, rev=use_rev,
plain_href = req.href.browser(node.path, rev=rev,
def get_mime_type(content=None): mime_type = node.content_type if not mime_type or mime_type == 'application/octet-stream': mime_type = get_mimetype(node.name, content) or \ mime_type or 'text/plain' return mime_type
2520034890636ae992a119fd22202c074b4735a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2520034890636ae992a119fd22202c074b4735a7/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11757, 67, 723, 12, 1745, 33, 7036, 4672, 4892, 67, 723, 273, 756, 18, 1745, 67, 723, 309, 486, 4892, 67, 723, 578, 4892, 67, 723, 422, 296, 3685, 19, 17909, 17, 3256, 4278,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11757, 67, 723, 12, 1745, 33, 7036, 4672, 4892, 67, 723, 273, 756, 18, 1745, 67, 723, 309, 486, 4892, 67, 723, 578, 4892, 67, 723, 422, 296, 3685, 19, 17909, 17, 3256, 4278,...
self.setVolume('outspdif', -a0)
self.setVolume('outspdif', a0)
def setVolumeSPDIFOut(self,a0): self.setVolume('outspdif', -a0)
4e960f4e5280d7ae4d0e3f99bb73ac0fdab4c9e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11526/4e960f4e5280d7ae4d0e3f99bb73ac0fdab4c9e8/mixer_phase24.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 4545, 3118, 2565, 42, 1182, 12, 2890, 16, 69, 20, 4672, 365, 18, 542, 4545, 2668, 659, 1752, 11593, 2187, 300, 69, 20, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 4545, 3118, 2565, 42, 1182, 12, 2890, 16, 69, 20, 4672, 365, 18, 542, 4545, 2668, 659, 1752, 11593, 2187, 300, 69, 20, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
c.drawImage('pythonpowered.gif', 3*inch, 1.2*inch, w, h, mask=myMask)
c.drawImage(gif, 3*inch, 1.2*inch, w, h, mask=myMask)
def makeDocument(filename, pageCallBack=None): #the extra arg is a hack added later, so other #tests can get hold of the canvas just before it is #saved global titlelist, closeit titlelist = [] closeit = 0 c = canvas.Canvas(filename) c.setPageCompression(0) c.setPageCallBack(pageCallBack) framePageForm(c) # define the frame form c.showOutline() framePage(c, 'PDFgen graphics API test script') makesubsection(c, "PDFgen", 10*inch) t = c.beginText(inch, 10*inch) t.setFont('Times-Roman', 10) drawCrossHairs(c, t.getX(),t.getY()) t.textLines("""
b4dc02db9b5691ba384e69ee2eb2525c4c1d354f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b4dc02db9b5691ba384e69ee2eb2525c4c1d354f/test_pdfgen_general.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 2519, 12, 3459, 16, 1363, 30008, 33, 7036, 4672, 468, 5787, 2870, 1501, 353, 279, 11769, 3096, 5137, 16, 1427, 1308, 468, 16341, 848, 336, 6887, 434, 326, 5953, 2537, 1865, 518, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 2519, 12, 3459, 16, 1363, 30008, 33, 7036, 4672, 468, 5787, 2870, 1501, 353, 279, 11769, 3096, 5137, 16, 1427, 1308, 468, 16341, 848, 336, 6887, 434, 326, 5953, 2537, 1865, 518, 35...
parent = elementsToTreeItems[parent] if parent else self.treeRoot item = self.tree.AppendItem(parent, element.text)
if parent: parent = elementsToTreeItems.get(parent) item = self.tree.AppendItem(parent or self.treeRoot, element.text)
def updateFilter(self, newElementType=False): # If this is a new element type, use the element nearest the cursor. # Otherwise, use the currently selected element. defaultElement = self._initialElement if newElementType else self.tree.GetItemPyData(self.tree.GetSelection()) # Clear the tree. self.tree.DeleteChildren(self.treeRoot)
7ec157fb17fb043c15a2071861f60ec4a01386cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/7ec157fb17fb043c15a2071861f60ec4a01386cb/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1586, 12, 2890, 16, 394, 17481, 33, 8381, 4672, 468, 971, 333, 353, 279, 394, 930, 618, 16, 999, 326, 930, 11431, 326, 3347, 18, 468, 5272, 16, 999, 326, 4551, 3170, 930, 18, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1586, 12, 2890, 16, 394, 17481, 33, 8381, 4672, 468, 971, 333, 353, 279, 394, 930, 618, 16, 999, 326, 930, 11431, 326, 3347, 18, 468, 5272, 16, 999, 326, 4551, 3170, 930, 18, 8...
self.show(name, title, text)
self.show(name, title, text, edit=0)
def do_edit(self):
1a24a0c287de2f2aca6781bfdb3a921702e881ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1a24a0c287de2f2aca6781bfdb3a921702e881ff/faqmain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4619, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4619, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
parts = [] for content, attrs in records: attrlist = [] for key, value in attrs.iteritems(): attrlist.append('%s="%s"' % (key, value)) attrstr = ' '.join(attrlist) record_str = ('<record %s>' '<content encoding="base64binary">%s</content>' '</record>') % (attrstr, base64.encodestring(content)) parts.append(record_str)
parts = [self.generateFeedRecord(attrs, None, content) for content, attrs in records]
def sendMultiContentFeed(self, records, feed_type='incremental'): """Sends a content feed to the GSA, containing multiple records.
34af3fc9369639f45a1144d4c6264b77845a50ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6393/34af3fc9369639f45a1144d4c6264b77845a50ed/connectormanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 5002, 1350, 8141, 12, 2890, 16, 3853, 16, 4746, 67, 723, 2218, 15016, 287, 11, 4672, 3536, 10501, 279, 913, 4746, 358, 326, 611, 5233, 16, 4191, 3229, 3853, 18, 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, 1366, 5002, 1350, 8141, 12, 2890, 16, 3853, 16, 4746, 67, 723, 2218, 15016, 287, 11, 4672, 3536, 10501, 279, 913, 4746, 358, 326, 611, 5233, 16, 4191, 3229, 3853, 18, 2, -100, -100, -1...
if (self.use_proxy): cnxn_point = self.proxy
if (self.use_proxy): cnxn_point = self.proxy
def make_http_connection(self):
2fe74a95373a426e5d7017f280b8f32e8a3fcd03 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1098/2fe74a95373a426e5d7017f280b8f32e8a3fcd03/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2505, 67, 4071, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2505, 67, 4071, 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,...
print r
def __call(self, name, args, kw, ns = None, sa = None, hd = None, ma = None):
065e7c22efd194cd6a17d02522ce0bffa825769d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/065e7c22efd194cd6a17d02522ce0bffa825769d/Client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 12, 2890, 16, 508, 16, 833, 16, 5323, 16, 3153, 273, 599, 16, 7864, 273, 599, 16, 15921, 273, 599, 16, 10843, 273, 599, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 12, 2890, 16, 508, 16, 833, 16, 5323, 16, 3153, 273, 599, 16, 7864, 273, 599, 16, 15921, 273, 599, 16, 10843, 273, 599, 4672, 2, -100, -100, -100, -100, -100, -100, -100, ...
condition = Condition()
fromGtkThread = type(currentThread()) == _MainThread if not fromGtkThread: condition = Condition()
def __init__ (self, gamemodel): gobject.GObject.__init__(self) # # Initialize tab label # tabhbox = gtk.HBox() tabhbox.set_spacing(4) tabhbox.pack_start(createImage(light_off), expand=False) close_button = gtk.Button() close_button.set_property("can-focus", False) close_button.add(createImage(gtk_close)) close_button.set_relief(gtk.RELIEF_NONE) close_button.set_size_request(19,18) close_button.connect("clicked", lambda w: self.emit("closed")) tabhbox.pack_end(close_button, expand=False) tabhbox.pack_end(gtk.Label("")) tabhbox.show_all() # Gtk doesn't show tab labels when the rest is # show_all'ed # # Initialize center # mvbox = gtk.VBox() headchild = gtk.HSeparator() global head2mainDic head2mainDic[headchild] = self align = createAlignment (3, 2, 4, 2) hbox = gtk.HBox() hbox.set_spacing(4) lvbox = gtk.VBox() lvbox.set_spacing(4) # # Initialize left center - clock and board # ccalign = createAlignment(0,0,0,0) cclock = ChessClock() ccalign.add(cclock) ccalign.set_size_request(-1, 32) board = BoardControl(gamemodel) lvbox.pack_start(ccalign, expand=False) lvbox.pack_start(board) # # Initialize right box # rvbox = gtk.VBox() rvbox.set_spacing(4) top_align = createAlignment(0,0,0,0) top_align.set_size_request(-1, 32) side_top_hbox = gtk.HBox() toggle_combox = ToggleComboBox() side_closebut = gtk.Button() side_closebut.add(createImage(gtk_close20)) side_closebut.connect("clicked", lambda w: show_side_panel(False)) side_closebut.set_relief(gtk.RELIEF_NONE) side_top_hbox.pack_start(toggle_combox) side_top_hbox.pack_start(side_closebut, expand=False) top_align.add(side_top_hbox) side_book = gtk.Notebook() side_book.set_show_border(False) side_book.set_show_tabs(False) rvbox.pack_start(top_align, expand=False) rvbox.pack_start(side_book) hbox.pack_start(lvbox) hbox.pack_start(rvbox, expand=False) align.add(hbox) # # Initialize statusbar # stat_hbox = gtk.HBox() page_vbox = gtk.VBox() page_vbox.set_spacing(1) sep = gtk.HSeparator() page_hbox = gtk.HBox() startbut = gtk.Button() startbut.add(createImage(media_previous)) startbut.set_relief(gtk.RELIEF_NONE) backbut = gtk.Button() backbut.add(createImage(media_rewind)) backbut.set_relief(gtk.RELIEF_NONE) forwbut = gtk.Button() forwbut.add(createImage(media_forward)) forwbut.set_relief(gtk.RELIEF_NONE) endbut = gtk.Button() endbut.add(createImage(media_next)) endbut.set_relief(gtk.RELIEF_NONE) startbut.connect("clicked", lambda w: board.view.showFirst()) backbut.connect("clicked", lambda w: board.view.showPrevious()) forwbut.connect("clicked", lambda w: board.view.showNext()) endbut.connect("clicked", lambda w: board.view.showLast()) page_hbox.pack_start(startbut) page_hbox.pack_start(backbut) page_hbox.pack_start(forwbut) page_hbox.pack_start(endbut) page_vbox.pack_start(sep) page_vbox.pack_start(page_hbox) statusbar = gtk.Statusbar() stat_hbox.pack_start(page_vbox, expand=False) stat_hbox.pack_start(statusbar) mvbox.pack_start(align) mvbox.pack_start(stat_hbox, expand=False) # # Name most common variables # self.widgets = w = {} w["board"] = board w["ccalign"] = ccalign w["cclock"] = cclock w["sidepanel"] = rvbox w["statusbar"] = statusbar w["tabhbox"] = tabhbox w["close_button"] = close_button w["mvbox"] = mvbox w["headchild"] = headchild w["tabhbox"] = tabhbox # # Add sidepanels # condition = Condition() def func (): start = 0 path = prefix("sidepanel") pf = "Panel.py" panels = [f[:-3] for f in os.listdir(path) if f.endswith(pf)] panels = \ [imp.load_module(f,*imp.find_module(f,[path])) for f in panels] for panel in panels: toggle_combox.addItem(panel.__title__) s = panel.Sidepanel() num = side_book.append_page(s.load(self)) if hasattr(panel, "__active__") and panel.__active__: start = num toggle_combox.connect("changed", lambda w,i: side_book.set_current_page(i)) side_book.set_current_page(start) toggle_combox.active = start condition.acquire() condition.notify() condition.release() gobject.idle_add(func, priority=gobject.PRIORITY_HIGH) condition.acquire() condition.wait()
ffaca10d02791d7862dda229bf9e6fc663b2f4a2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5339/ffaca10d02791d7862dda229bf9e6fc663b2f4a2/gamewidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 7920, 2284, 4672, 314, 1612, 18, 43, 921, 16186, 2738, 972, 12, 2890, 13, 225, 468, 468, 9190, 3246, 1433, 468, 225, 3246, 76, 2147, 273, 22718, 18, 44,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2890, 16, 7920, 2284, 4672, 314, 1612, 18, 43, 921, 16186, 2738, 972, 12, 2890, 13, 225, 468, 468, 9190, 3246, 1433, 468, 225, 3246, 76, 2147, 273, 22718, 18, 44,...
def fl_set_chart_lcolor(ob, lcol): """ fl_set_chart_lcolor(ob, lcol) """ _fl_set_chart_lcolor(ob, lcol) _fl_set_chart_baseline = cfuncproto(so_libforms, "fl_set_chart_baseline", None, [cty.POINTER(FL_OBJECT), cty.c_int],
def fl_set_chart_lcolor(pObject, lcol): """ fl_set_chart_lcolor(pObject, lcol) """ _fl_set_chart_lcolor(pObject, lcol) _fl_set_chart_baseline = cfuncproto(so_libforms, "fl_set_chart_baseline", None, [cty.POINTER(FL_OBJECT), cty.c_int],
def fl_set_chart_lcolor(ob, lcol): """ fl_set_chart_lcolor(ob, lcol) """ _fl_set_chart_lcolor(ob, lcol)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 11563, 67, 80, 3266, 12, 947, 16, 328, 1293, 4672, 3536, 1183, 67, 542, 67, 11563, 67, 80, 3266, 12, 947, 16, 328, 1293, 13, 3536, 225, 389, 2242, 67, 542, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 11563, 67, 80, 3266, 12, 947, 16, 328, 1293, 4672, 3536, 1183, 67, 542, 67, 11563, 67, 80, 3266, 12, 947, 16, 328, 1293, 13, 3536, 225, 389, 2242, 67, 542, 67, 1...
entryDate = entry.getDate() if not entry.isSnapshotIncrement(): entryDate = self._getFirstBackupAfterDate(entry.getDate())
def getDirEntries(self): """ returns dictionary of dir entries, keyed by dir name """ entriesDict = {}
d700d883f756d8320453492b61364b69cf6919ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2223/d700d883f756d8320453492b61364b69cf6919ad/librdiff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26505, 5400, 12, 2890, 4672, 3536, 1135, 3880, 434, 1577, 3222, 16, 17408, 635, 1577, 508, 3536, 3222, 5014, 273, 2618, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 26505, 5400, 12, 2890, 4672, 3536, 1135, 3880, 434, 1577, 3222, 16, 17408, 635, 1577, 508, 3536, 3222, 5014, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.ElemInfoSolid['fptrBmatrix'] = lm3d.bmatrixn self.ElemInfoSolid['fptrGetShape'] = lm3d.getshapn
self.elemInfoSolid['fptrBmatrix'] = lm3d.bmatrixn self.elemInfoSolid['fptrGetShape'] = lm3d.getshapn
def getdef(self, elemTypeInt, quadratureOrderInt): """Gets dimension and quadrature info, depending on the global quadrature order setting."""
434cb9a616d7418807b0ac6af3c81881e5d8d66c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8645/434cb9a616d7418807b0ac6af3c81881e5d8d66c/ElemDefSolid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 536, 12, 2890, 16, 3659, 559, 1702, 16, 9474, 86, 1231, 2448, 1702, 4672, 3536, 3002, 4968, 471, 9474, 86, 1231, 1123, 16, 8353, 603, 326, 2552, 9474, 86, 1231, 1353, 3637, 12123, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 536, 12, 2890, 16, 3659, 559, 1702, 16, 9474, 86, 1231, 2448, 1702, 4672, 3536, 3002, 4968, 471, 9474, 86, 1231, 1123, 16, 8353, 603, 326, 2552, 9474, 86, 1231, 1353, 3637, 12123, ...
mx[i] = data.getFloat64() my[i] = data.getFloat64()
if (mode == MODE_4P): mx[i] = data.getFloat64() my[i] = data.getFloat64() elif (mode==MODE_2P): mx[3] = mx[2] = data.getFloat64() my[3] = my[2] = data.getFloat64()
def setOpponentMove(data, sender=0): global mx, my mx[i] = data.getFloat64() my[i] = data.getFloat64()
73d04275d5aecffbeaa4958b270fc22e07a236dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12834/73d04275d5aecffbeaa4958b270fc22e07a236dc/kickern.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3817, 1029, 7607, 12, 892, 16, 5793, 33, 20, 4672, 2552, 7938, 16, 3399, 309, 261, 3188, 422, 11741, 67, 24, 52, 4672, 7938, 63, 77, 65, 273, 501, 18, 588, 4723, 1105, 1435, 339...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3817, 1029, 7607, 12, 892, 16, 5793, 33, 20, 4672, 2552, 7938, 16, 3399, 309, 261, 3188, 422, 11741, 67, 24, 52, 4672, 7938, 63, 77, 65, 273, 501, 18, 588, 4723, 1105, 1435, 339...
if self.bCreating: return 0
if self.bCreating: return 0
def NeedRecreateWindow(self): if self.bCreating: return 0 try: cb = win32ui.GetMainFrame().GetControlBar(ID_DOCKED_INTERACTIVE_CONTROLBAR) return not cb.IsWindowVisible() except win32ui.error: return 0 # We are dieing!
08bc97485c777d09802af59a0e004dba1a41d34a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/08bc97485c777d09802af59a0e004dba1a41d34a/interact.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12324, 426, 2640, 3829, 12, 2890, 4672, 309, 365, 18, 70, 11092, 30, 327, 374, 775, 30, 2875, 273, 5657, 1578, 4881, 18, 967, 6376, 3219, 7675, 967, 3367, 5190, 12, 734, 67, 3191, 3507...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12324, 426, 2640, 3829, 12, 2890, 4672, 309, 365, 18, 70, 11092, 30, 327, 374, 775, 30, 2875, 273, 5657, 1578, 4881, 18, 967, 6376, 3219, 7675, 967, 3367, 5190, 12, 734, 67, 3191, 3507...
try: raise except (rpki.async.ExitNow, SystemExit): raise except Exception, edata:
etype, edata = sys.exc_info()[:2] if etype in (SystemExit, rpki.async.ExitNow): raise edata else:
def handle_error(self): http_stream.handle_error(self) self.queue.detach(self) try: raise except (rpki.async.ExitNow, SystemExit): raise except Exception, edata: self.queue.return_result(edata)
e43c0c6116f9131646b5df0aa1ec03d6478ef9cc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/119/e43c0c6116f9131646b5df0aa1ec03d6478ef9cc/https.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 4672, 1062, 67, 3256, 18, 4110, 67, 1636, 12, 2890, 13, 365, 18, 4000, 18, 8238, 497, 12, 2890, 13, 24700, 16, 1675, 396, 273, 2589, 18, 10075, 67, 1376, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 4672, 1062, 67, 3256, 18, 4110, 67, 1636, 12, 2890, 13, 365, 18, 4000, 18, 8238, 497, 12, 2890, 13, 24700, 16, 1675, 396, 273, 2589, 18, 10075, 67, 1376, 14...
def create_plot(tempo_results, xkey, ykey, postfit=True, prefit=False, \ interactive=True, mark_peri=False, show_legend=True):
def create_plot():
def create_plot(tempo_results, xkey, ykey, postfit=True, prefit=False, \ interactive=True, mark_peri=False, show_legend=True): # Set up the plot fig = plt.figure(figsize=(11,8.5)) plot_data(tempo_results, xkey, ykey, postfit, prefit, \ interactive, mark_peri, show_legend) # Register event callbacks function and show the plot cid_keypress = fig.canvas.mpl_connect('key_press_event', keypress) cid_pick = fig.canvas.mpl_connect('pick_event', pick) if interactive: plt.ion() plt.show() else: # Save figure and quit savefigure() quit()
0e6f18e4ccc8ea5b1b47bf4feab12a06fb0177b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3485/0e6f18e4ccc8ea5b1b47bf4feab12a06fb0177b6/pyplotres.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4032, 13332, 468, 1000, 731, 326, 3207, 4291, 273, 5451, 18, 19675, 12, 470, 1467, 28657, 2499, 16, 28, 18, 25, 3719, 225, 3207, 67, 892, 12, 874, 1631, 67, 4717, 16, 619, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4032, 13332, 468, 1000, 731, 326, 3207, 4291, 273, 5451, 18, 19675, 12, 470, 1467, 28657, 2499, 16, 28, 18, 25, 3719, 225, 3207, 67, 892, 12, 874, 1631, 67, 4717, 16, 619, 8...
def noop(*args,**kws): pass
def noop(*args, **kws): pass
def noop(*args,**kws): pass
849f3d3344b63fffc1cf4b1f1ed5eb69fa683482 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11221/849f3d3344b63fffc1cf4b1f1ed5eb69fa683482/constants.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17065, 30857, 1968, 16, 2826, 79, 4749, 4672, 1342, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 17065, 30857, 1968, 16, 2826, 79, 4749, 4672, 1342, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self._old_module_ids.remove(mId)
def delete_selected_items(self): selectedItems = self.selectedItems() if len(selectedItems)>0:
88aeefa371329e2d3ec0d78d76071429806ef0c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/88aeefa371329e2d3ec0d78d76071429806ef0c5/pipeline_view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 8109, 67, 3319, 12, 2890, 4672, 3170, 3126, 273, 365, 18, 8109, 3126, 1435, 309, 562, 12, 8109, 3126, 13, 34, 20, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 8109, 67, 3319, 12, 2890, 4672, 3170, 3126, 273, 365, 18, 8109, 3126, 1435, 309, 562, 12, 8109, 3126, 13, 34, 20, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Note that the construction should be done using arc::
Note that the construction should be done using ``arc``::
def is_cyclic_ordered(x1,x2,x3): return ( (x1 < x2 and x2 < x3) or (x2 < x3 and x3 < x1) or (x3 < x1 and x1 < x2))
e24dd3c62ad1f440792ccb94718bf5873e280f2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/e24dd3c62ad1f440792ccb94718bf5873e280f2a/arc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2431, 18964, 67, 9885, 12, 92, 21, 16, 92, 22, 16, 92, 23, 4672, 327, 261, 261, 92, 21, 411, 619, 22, 471, 619, 22, 411, 619, 23, 13, 578, 261, 92, 22, 411, 619, 23, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2431, 18964, 67, 9885, 12, 92, 21, 16, 92, 22, 16, 92, 23, 4672, 327, 261, 261, 92, 21, 411, 619, 22, 471, 619, 22, 411, 619, 23, 13, 578, 261, 92, 22, 411, 619, 23, 4...
newfunc.__doc__ += func.__doc__
if func.__doc__ is not None: newfunc.__doc__ += func.__doc__
def newfunc (*args, **kwargs): """ Execute function synchronized. """ lock.acquire(True) # blocking try: return func(*args, **kwargs) finally: lock.release()
b786bca2bd1448c567a75ba57e788bfda734efe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/b786bca2bd1448c567a75ba57e788bfda734efe5/decorators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 644, 261, 14, 1968, 16, 2826, 4333, 4672, 3536, 7903, 445, 3852, 18, 3536, 2176, 18, 1077, 1039, 12, 5510, 13, 468, 9445, 775, 30, 327, 1326, 30857, 1968, 16, 2826, 4333, 13, 3095...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 394, 644, 261, 14, 1968, 16, 2826, 4333, 4672, 3536, 7903, 445, 3852, 18, 3536, 2176, 18, 1077, 1039, 12, 5510, 13, 468, 9445, 775, 30, 327, 1326, 30857, 1968, 16, 2826, 4333, 13, 3095...
twisted_error(self, failure)
self.twisted_error(failure)
def error(failure): # Code 6 means "moderated", which isn't an error if failure.value.code != 6: twisted_error(self, failure)
11c7a7ead45e06146e9276d29968d64c3f97ff78 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11023/11c7a7ead45e06146e9276d29968d64c3f97ff78/postr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 555, 12, 12251, 4672, 468, 3356, 1666, 4696, 315, 1711, 19007, 3113, 1492, 5177, 1404, 392, 555, 309, 5166, 18, 1132, 18, 710, 480, 1666, 30, 2339, 25444, 67, 1636, 12, 2890, 16, 5166, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 555, 12, 12251, 4672, 468, 3356, 1666, 4696, 315, 1711, 19007, 3113, 1492, 5177, 1404, 392, 555, 309, 5166, 18, 1132, 18, 710, 480, 1666, 30, 2339, 25444, 67, 1636, 12, 2890, 16, 5166, ...
'__module__', '__name__']: return 0
'__module__', '__name__', '__slots__']: return 0
def visiblename(name, all=None): """Decide whether to show documentation on a variable.""" # Certain special names are redundant. if name in ['__builtins__', '__doc__', '__file__', '__path__', '__module__', '__name__']: return 0 # Private names are hidden, but special names are displayed. if name.startswith('__') and name.endswith('__'): return 1 if all is not None: # only document that which the programmer exported in __all__ return name in all else: return not name.startswith('_')
41b8b8a0df4f3e404b0e2be71e8c5ba7ae6ac80c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/41b8b8a0df4f3e404b0e2be71e8c5ba7ae6ac80c/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2281, 495, 14724, 12, 529, 16, 777, 33, 7036, 4672, 3536, 1799, 831, 2856, 358, 2405, 7323, 603, 279, 2190, 12123, 468, 11921, 530, 4582, 1257, 854, 19530, 18, 309, 508, 316, 10228, 972,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2281, 495, 14724, 12, 529, 16, 777, 33, 7036, 4672, 3536, 1799, 831, 2856, 358, 2405, 7323, 603, 279, 2190, 12123, 468, 11921, 530, 4582, 1257, 854, 19530, 18, 309, 508, 316, 10228, 972,...
(type=C{int}) - C{variable_tooltip_linelength}: The maximum line length
@type variable_tooltip_linelength: C{int} @keyword variable_tooltip_linelength: The maximum line length
def __init__(self, docmap, **kwargs): """ Construct a new HTML formatter, using the given documentation map. @param docmap: The documentation to output. @type docmap: L{DocMap} @param kwargs: Keyword arguments: - C{prj_name}: The name of the project. Defaults to none. (type=C{string}) - C{prj_url}: The target for the project hopeage link on the navigation bar. If C{prj_url} is not specified, then no hyperlink is created. (type=C{string}) - C{prj_link}: The label for the project link on the navigation bar. This link can contain arbitrary HTML code (e.g. images). By default, a label is constructed from C{prj_name}. (type=C{string}) - C{top}: The top page for the documentation. This is the default page shown main frame, when frames are enabled. C{top} can be a URL, the name of a module, the name of a class, or one of the special strings C{"trees.html"}, C{"indices.html"}, or C{"help.html"}. By default, the top-level package or module is used, if there is one; otherwise, C{"trees"} is used. (type=C{string}) - C{css}: The CSS stylesheet file. If C{css} is a file name, then the specified file's conents will be used. Otherwise, if C{css} is the name of a CSS stylesheet in L{epydoc.css}, then that stylesheet will be used. Otherwise, an error is reported. If no stylesheet is specified, then the default stylesheet is used. (type=C{string}) - C{private_css}: The CSS stylesheet file for the private API documentation. If C{css} is a file name, then the specified file's conents will be used. Otherwise, if C{css} is the name of a CSS stylesheet in L{epydoc.css}, then that stylesheet will be used. Otherwise, an error is reported. If no stylesheet is specified, then the private API documentation will use the same stylesheet as the public API documentation. (type=C{string}) - C{help}: The name of the help file. If no help file is specified, then the default help file will be used. (type=C{string}) - C{private}: Whether to create documentation for private objects. By default, private objects are documented. (type=C{boolean}) - C{frames}: Whether to create a frames-based table of contents. By default, it is produced. (type=C{boolean}) - C{show_imports}: Whether or not to display lists of imported functions and classes. By default, they are not shown. (type=C{boolean}) - C{index_parameters}: Whether or not to include function parameters in the identifier index. By default, they are not included. (type=C{boolean}) - C{variable_maxlines}: The maximum number of lines that should be displayed for the value of a variable in the variable details section. By default, 8 lines are displayed. (type=C{int}) - C{variable_linelength}: The maximum line length used for displaying the values of variables in the variable details sections. If a line is longer than this length, then it will be wrapped to the next line. The default line length is 70 characters. (type=C{int}) - C{variable_summary_linelength}: The maximum line length used for displaying the values of variables in the summary section. If a line is longer than this length, then it will be truncated. The default is 40 characters. (type=C{int}) - C{variable_tooltip_linelength}: The maximum line length used for tooltips for the values of variables. If a line is longer than this length, then it will be truncated. The default is 600 characters. (type=C{int}) - C{inheritance}: How inherited objects should be displayed. If C{inheritance='grouped'}, then inherited objects are gathered into groups; if C{inheritance='listed'}, then inherited objects are listed in a short list at the end of their group; if C{inheritance='included'}, then inherited objects are mixed in with non-inherited objects. The default is 'grouped'. (type=C{string}) """ self._docmap = docmap
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 997, 1458, 16, 2826, 4333, 4672, 3536, 14291, 279, 394, 3982, 4453, 16, 1450, 326, 864, 7323, 852, 18, 632, 891, 997, 1458, 30, 1021, 7323, 358, 876, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 997, 1458, 16, 2826, 4333, 4672, 3536, 14291, 279, 394, 3982, 4453, 16, 1450, 326, 864, 7323, 852, 18, 632, 891, 997, 1458, 30, 1021, 7323, 358, 876, 18,...
else:
elif e.code == 408 or 500 <= e.code <= 599:
def _CH_subscribe(self, command): if self.state in ('stopping', 'stopped'): return notification_center = NotificationCenter() settings = SIPSimpleSettings() if self.subscription_timer is not None and self.subscription_timer.active(): self.subscription_timer.cancel() self.subscription_timer = None if self.subscription is not None: notification_center.remove_observer(self, sender=self.subscription) self.subscription.end() self.subscription = None try: if not self.account.xcap.use_xcap_diff: raise SubscriptionError(error='xcap-diff is disabled', timeout=120) if self.account.sip.outbound_proxy is not None: uri = SIPURI(host=self.account.sip.outbound_proxy.host, port=self.account.sip.outbound_proxy.port, parameters={'transport': self.account.sip.outbound_proxy.transport}) else: uri = SIPURI(host=self.account.id.domain) lookup = DNSLookup() try: routes = lookup.lookup_sip_proxy(uri, settings.sip.transport_list).wait() except DNSLookupError, e: timeout = random.uniform(15, 30) raise SubscriptionError(error='DNS lookup failed: %s' % e, timeout=timeout)
cfb3c7036c1d64cd5aa5992a6217d658b75bf517 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/cfb3c7036c1d64cd5aa5992a6217d658b75bf517/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1792, 67, 9174, 12, 2890, 16, 1296, 4672, 309, 365, 18, 2019, 316, 7707, 5681, 1382, 2187, 296, 24228, 11, 4672, 327, 3851, 67, 5693, 273, 8050, 8449, 1435, 1947, 273, 348, 2579, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1792, 67, 9174, 12, 2890, 16, 1296, 4672, 309, 365, 18, 2019, 316, 7707, 5681, 1382, 2187, 296, 24228, 11, 4672, 327, 3851, 67, 5693, 273, 8050, 8449, 1435, 1947, 273, 348, 2579, ...
"Diffs",
"patches",
def main(): import sys, getopt, time, string, socket try: opts, args = getopt.getopt(sys.argv[1:], "d:i:h:l:u:r:Rt:DL:", ["date", "indent", "hostname", "length", "user", "rlog_options", #### not yet supported "Recursive", #### not yet supported "tabwidth", "Diffs", #### not yet supported "Logfile"]) except getopt.error, msg: sys.stdout = sys.stderr print msg print "Usage: Options:" print "[-h hostname] [-i indent] [-l length] [-R]" print "[-r rlog_option] [-d rcs date]\n[-t tabwidth] [-u 'login<TAB>fullname<TAB>mailaddr']..." sys.exit(2) # Set up defaults for all of the command line options. cvsrepository=GetCVSRepository() if not cvsrepository: print "cvs2log.py must be executed in a working CVS directory" sys.exit(2) indent=8 hostname=socket.gethostbyaddr(socket.gethostname())[1][0] length=63 user=0 recursive=0 tabwidth=8 rlog_options=0 logfile=None date_option = "" diffs=1 # override defaults if specified on the command line for o, a in opts: if o == '-h' : hostname = a elif o == '-i' : indent = a elif o == '-l' : length = a elif o == '-t' : tabwidth = a elif o == '-u' : user = a elif o == '-r' : rlog_options = a elif o == '-R' : recursive = 1 elif o == '-d' : date_option = "-d " + "'" + a + "'" elif o == '-D' : diffs = 0 elif o == '-L' : logfile = a else: print "getopt should have failed already" # set up the cvs log command arguments. If a logfile is specified # we get all dates later than the logfile. if logfile: date_option = "'" + "-d>" + time.asctime(LastLogDate2CtimeTuple(logfile)) + "'" log_date_command= 'cvs -d ' + GetCVSRepository() + ' -Q log -N ' + date_option # build the logs. log = BuildLog(log_date_command) # chronologically reversed. We reverse everything in the list as # well. log.sort() log.reverse() # Pass through the logs creating new entries based on changing # authors, dates and descriptions. last_date = None last_author = None entry_dict = {} for date, author, description, rcs_file, revision in log: if author != last_author or date != last_date: # clear out any old revisions, descriptions, and filenames # that belong with the last log. if entry_dict: print ChangeLogFileRevDesc(entry_dict, indent, length) # clear the entry log for the next group of changes # if we have a new author or date we print a date, time, # author, and email address. entry_dict = {} print ChangeLogDateNameHeader(date, author, hostname, tabwidth) # build string from description list so we can use it as a key # for the entry dictionary description_data = indent * ' ' for line in description: description_data = description_data + line + indent * ' ' # put the revisions and rcs files in decription-keyed # dictionary. if entry_dict.has_key(description_data): entry_dict[description_data].append(revision, rcs_file) else: entry_dict[description_data] = [(revision, rcs_file)] last_author = author last_date = date last_description = description # print the last entry if there is one (i.e. the last two entries # have the same author and date) if entry_dict: print ChangeLogFileRevDesc(entry_dict, indent, length)
42ecb661e06383ac8af5bf242e802c26a1bbfe5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/42ecb661e06383ac8af5bf242e802c26a1bbfe5f/cvs2log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1930, 2589, 16, 336, 3838, 16, 813, 16, 533, 16, 2987, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 72, 30, 77, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1930, 2589, 16, 336, 3838, 16, 813, 16, 533, 16, 2987, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 72, 30, 77, 3...
LibName("OPENGL", "opengl32.lib") LibName("OPENGL", "glu32.lib")
LibName("GL", "opengl32.lib") LibName("GL", "glu32.lib") LibName("GLES", "libgles_cm.lib") LibName("GLES2", "libGLESv2.lib") LibName("EGL", "libEGL.lib")
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static","host=","debversion=","rpmrelease="] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) elif (option=="--host"): HOST_URL=value elif (option=="--debversion"): DEBVERSION=value elif (option=="--rpmrelease"): RPMRELEASE=value else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
397a7f9736d1ffe1daf985de6c0bb8e5fc4b1c61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8543/397a7f9736d1ffe1daf985de6c0bb8e5fc4b1c61/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 22880, 4685, 654, 16, 12185, 2565, 882, 16, 54, 25375, 16, 16652, 9560, 16, 2565, 27424, 1693, 916, 16, 5757, 2552, 5423, 22526, 916, 16, 21730, 7240, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 22880, 4685, 654, 16, 12185, 2565, 882, 16, 54, 25375, 16, 16652, 9560, 16, 2565, 27424, 1693, 916, 16, 5757, 2552, 5423, 22526, 916, 16, 21730, 7240, 1...
zip(line[::2], line[1::2])]
zip(rest[::2], rest[1::2])]
def read_obstacles(self): self.expect('begin')
bb94029b5f93b7e2ef96527c237138829463ecdf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9601/bb94029b5f93b7e2ef96527c237138829463ecdf/bzrc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 947, 334, 69, 9558, 12, 2890, 4672, 365, 18, 12339, 2668, 10086, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 947, 334, 69, 9558, 12, 2890, 4672, 365, 18, 12339, 2668, 10086, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
ctx = SSL.Context() ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 9, self.verify_cb_exception) s = SSL.Connection(ctx) self.assertRaises(SSL.SSLError, s.connect, self.srv_addr) s.close() self.stop_server(pid)
try: ctx = SSL.Context() ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 9, self.verify_cb_exception) s = SSL.Connection(ctx) self.assertRaises(SSL.SSLError, s.connect, self.srv_addr) s.close() finally: self.stop_server(pid)
def test_verify_cb_exception(self): pid = self.start_server(self.args) ctx = SSL.Context() ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 9, self.verify_cb_exception) s = SSL.Connection(ctx) self.assertRaises(SSL.SSLError, s.connect, self.srv_addr) s.close() self.stop_server(pid)
6d956155dfc0f9670dea38b076c5bfe3b3bf8e6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/6d956155dfc0f9670dea38b076c5bfe3b3bf8e6a/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8705, 67, 7358, 67, 4064, 12, 2890, 4672, 4231, 273, 365, 18, 1937, 67, 3567, 12, 2890, 18, 1968, 13, 1103, 273, 7419, 18, 1042, 1435, 1103, 18, 542, 67, 8705, 12, 6745, 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, 8705, 67, 7358, 67, 4064, 12, 2890, 4672, 4231, 273, 365, 18, 1937, 67, 3567, 12, 2890, 18, 1968, 13, 1103, 273, 7419, 18, 1042, 1435, 1103, 18, 542, 67, 8705, 12, 6745, 18...
osm = self.main.osm
def handlePrivMsg(self, ad, data, cb): # Common code for handling private messages (PM, CA, CP)
670afcc3701bc402aa5fdbec44ae13728772f1df /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8524/670afcc3701bc402aa5fdbec44ae13728772f1df/dtella_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 15475, 3332, 12, 2890, 16, 1261, 16, 501, 16, 2875, 4672, 468, 5658, 981, 364, 5057, 3238, 2743, 261, 12728, 16, 6425, 16, 5181, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 15475, 3332, 12, 2890, 16, 1261, 16, 501, 16, 2875, 4672, 468, 5658, 981, 364, 5057, 3238, 2743, 261, 12728, 16, 6425, 16, 5181, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
if not InventoryCreator().locationExists(self.config.default_entity): self.logger.error("Default entity '%s' does not exist in database" % self.config.default_entity) return False
def initialise(self, config): self.logger = logging.getLogger() self.xmlmapping = config.ocsmapping try: OcsMapping().initialize(self.xmlmapping) except IOError, e: self.logger.error(e) return False try: InventoryCreator().activate(config) except Exception, e : self.logger.error(e) return False if not InventoryCreator().db_check(): return False self.config = config # Initialize the computer to entity mapping if self.config.entities_rules_file: try: InventoryCreator().rules = EntitiesRules(self.config.entities_rules_file) except Exception, e: self.logger.error(e) return False else: InventoryCreator().rules = DefaultEntityRules(self.config.default_entity) # Check that the default assigned entity exists if not InventoryCreator().locationExists(self.config.default_entity): self.logger.error("Default entity '%s' does not exist in database" % self.config.default_entity) return False self.bind = config.bind self.port = int(config.port) return True
2a8c666200c87b141a03940a22d894581bc7a527 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5988/2a8c666200c87b141a03940a22d894581bc7a527/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21301, 12, 2890, 16, 642, 4672, 365, 18, 4901, 273, 2907, 18, 588, 3328, 1435, 365, 18, 2902, 6770, 273, 642, 18, 22280, 6770, 775, 30, 531, 2143, 3233, 7675, 11160, 12, 2890, 18, 2902...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21301, 12, 2890, 16, 642, 4672, 365, 18, 4901, 273, 2907, 18, 588, 3328, 1435, 365, 18, 2902, 6770, 273, 642, 18, 22280, 6770, 775, 30, 531, 2143, 3233, 7675, 11160, 12, 2890, 18, 2902...
........
--------
def remap_image(image, parm_vector, resample='linear'): """ remaped_image = remap_image(image, parm_vector, resample='linear') rotates and translates image using the 3 angles and 3 translations in the 6-dim parm_vector. The mapping is stored in the 4x4 M_inverse matrix from the get_inverse_mapping method. Parameters .......... image : {dictionary} image is the source image to be remapped. it is a dictionary with the data as an ndarray in the ['data'] component. parm_vector : {ndarray} parm_vector is the 6-dimensional vector (3 angles, 3 translations) generated from the registration. resample : {'linear', 'cubic'}, optional Returns ....... remaped_image : {dictionary} Examples ........ image = fmri_series[i] x[0:6] = measures[i]['align_rotate'][0:6] # overwrite the fMRI volume with the aligned volume fmri_series[i] = remap_image(image, x, resample='cubic') """ # # remap imageG to coordinates of imageF (creates imageG') # use the 6 dim parm_vector (3 angles, 3 translations) to remap # M_inverse = get_inverse_mappings(parm_vector) (layers, rows, cols) = image['data'].shape # allocate the zero image remaped_image = N.zeros(layers*rows*cols, dtype=N.uint8).reshape(layers, rows, cols) remaped_image = {'data' : remaped_image, 'mat' : image['mat'], 'dim' : image['dim'], 'fwhm' : image['fwhm']} imdata = build_structs() if resample == 'linear': # trilinear interpolation mapping. R.register_linear_resample(image['data'], remaped_image['data'], M_inverse, imdata['step']) elif resample == 'cubic': # tricubic convolve interpolation mapping. R.register_cubic_resample(image['data'], remaped_image['data'], M_inverse, imdata['step']) return remaped_image
de681f926e982b0212f2f58bf637917926737f89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/de681f926e982b0212f2f58bf637917926737f89/_registration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21674, 67, 2730, 12, 2730, 16, 19924, 67, 7737, 16, 19220, 2218, 12379, 11, 4672, 3536, 849, 5994, 67, 2730, 273, 21674, 67, 2730, 12, 2730, 16, 19924, 67, 7737, 16, 19220, 2218, 12379, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21674, 67, 2730, 12, 2730, 16, 19924, 67, 7737, 16, 19220, 2218, 12379, 11, 4672, 3536, 849, 5994, 67, 2730, 273, 21674, 67, 2730, 12, 2730, 16, 19924, 67, 7737, 16, 19220, 2218, 12379, ...
self._font = None self.font = pygame.font.Font(None, 32) self._fixSize()
try: self._font = None self.font = pygame.font.Font(None, 32) self._fixSize() except: pass
def __init__(self, *options): """Initialise the EzMenu! options should be a sequence of lists in the format of [option_name, option_function] """ KezMenuEffectAble.__init__(self) self.options = [{'label': x[0], 'callable': x[1]} for x in options] self.x = 0 self.y = 0 self.screen_topleft_offset = (0,0) self.option = 0 self.width = 0 self.height = 0 self.color = (0, 0, 0, 0) self.focus_color = (255, 0, 0, 255) self.mouse_enabled = True self.mouse_focus = False # The 2 lines below seem stupid, but for effects I can need different font for every line. self._font = None self.font = pygame.font.Font(None, 32) self._fixSize()
9bd3b9496657fa1794a84a06cbac34df43971e92 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9102/9bd3b9496657fa1794a84a06cbac34df43971e92/kezmenu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 2116, 4672, 3536, 4435, 784, 326, 512, 94, 4599, 5, 702, 1410, 506, 279, 3102, 434, 6035, 316, 326, 740, 434, 306, 3482, 67, 529, 16, 1456, 67, 91...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2116, 4672, 3536, 4435, 784, 326, 512, 94, 4599, 5, 702, 1410, 506, 279, 3102, 434, 6035, 316, 326, 740, 434, 306, 3482, 67, 529, 16, 1456, 67, 91...
if _debug: sys.stderr.write('xml parsing failed\n') feedparser.bozo = 1 feedparser.bozo_exception = feedparser.exc or e if feedparser.bozo:
if _debug: import traceback traceback.print_stack() traceback.print_exc() sys.stderr.write('xml parsing failed\n')
def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, referrer=None): """Parse a feed from a URL, file, stream, or string""" result = FeedParserDict() f = _open_resource(url_file_stream_or_string, etag=etag, modified=modified, agent=agent, referrer=referrer) data = f.read() if hasattr(f, "headers"): if gzip and f.headers.get('content-encoding', '') == 'gzip': try: data = gzip.GzipFile(fileobj=_StringIO(data)).read() except: # some feeds claim to be gzipped but they're not, so we get garbage data = '' if hasattr(f, "info"): info = f.info() result["etag"] = info.getheader("ETag") last_modified = info.getheader("Last-Modified") if last_modified: result["modified"] = _parse_date(last_modified) if hasattr(f, "url"): result["url"] = f.url result["status"] = 200 # default, may be overridden later if hasattr(f, "status"): result["status"] = f.status if hasattr(f, "headers"): result["headers"] = f.headers.dict f.close() if result.get("status", 0) == 304: result['feed'] = FeedParserDict() result['entries'] = [] result['debug_message'] = "The feed has not changed since you last checked, so the server sent no data. This is a feature, not a bug!" return result result['encoding'], http_encoding, xml_encoding = _getCharacterEncoding(result.get("headers", {}), data) result['version'], data = _stripDoctype(data) baseuri = result.get('headers', {}).get('content-location', result.get('url')) # try true XML parser first if not _XML_AVAILABLE: if _debug: sys.stderr.write('no xml libraries available\n') use_strict_parser = _XML_AVAILABLE if use_strict_parser: if _debug: sys.stderr.write('using xml library\n') result['bozo'] = 0 feedparser = _StrictFeedParser(baseuri, result['encoding']) if _debug and _debug_never_use_libxml2: sys.stderr.write('not using libxml2 (even if available)\n') additional_parsers = [] else: additional_parsers = ["drv_libxml2"] saxparser = xml.sax.make_parser(additional_parsers) saxparser.setFeature(xml.sax.handler.feature_namespaces, 1) saxparser.setContentHandler(feedparser) saxparser.setErrorHandler(feedparser) try: saxparser.setDTDHandler(feedparser) except xml.sax.SAXNotSupportedException: # libxml2 driver does not support DTDHandler if _debug: sys.stderr.write('using an xml library that does not support DTDHandler (not a big deal)\n') try: saxparser.setEntityResolver(feedparser) except xml.sax.SAXNotSupportedException: # libxml2 driver does not support EntityResolver if _debug: sys.stderr.write('using an xml library that does not support EntityResolver (not a big deal)\n') encoding_set = (result['encoding'] == xml_encoding) if not encoding_set: bozo_exception = None proposed_encodings = [result['encoding'], xml_encoding, 'utf-8', 'iso-8859-1', 'windows-1252'] tried_encodings = [] for proposed_encoding in proposed_encodings: if proposed_encodings in tried_encodings: continue tried_encodings.append(proposed_encoding) try: data = _changeEncodingDeclaration(data, proposed_encoding) except Exception, bozo_exception: if _debug: sys.stderr.write('character encoding is wrong\n') else: if proposed_encoding != result['encoding']: try: raise CharacterEncodingOverride, "document declared as %s, but parsed as %s" % (result['encoding'], proposed_encoding) except CharacterEncodingOverride, bozo_exception: result['bozo'] = 1 result['bozo_exception'] = bozo_exception result['encoding'] = proposed_encoding encoding_set = 1 break if not encoding_set: result['bozo'] = 1 result['bozo_exception'] = bozo_exception use_strict_parser = 0 if use_strict_parser: source = xml.sax.xmlreader.InputSource() source.setByteStream(_StringIO(data)) if hasattr(saxparser, '_ns_stack'): # work around bug in built-in SAX parser (doesn't recognize xml: namespace) # PyXML doesn't have this problem, and it doesn't have _ns_stack either saxparser._ns_stack.append({'http://www.w3.org/XML/1998/namespace':'xml'}) try: saxparser.parse(source) except Exception, e: if _debug: sys.stderr.write('xml parsing failed\n') feedparser.bozo = 1 feedparser.bozo_exception = feedparser.exc or e if feedparser.bozo: # feed is not well-formed XML, fall back on regex-based parser result['bozo'] = 1 result['bozo_exception'] = feedparser.bozo_exception use_strict_parser = 0 if not use_strict_parser: if _debug: sys.stderr.write('using regexes, now you have two problems\n') feedparser = _LooseFeedParser(baseuri, result['encoding']) feedparser.feed(data) result['feed'] = feedparser.feeddata result['entries'] = feedparser.entries result['version'] = result['version'] or feedparser.version return result
99200d105c483d0627b0c87195d2d3372fe4ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/99200d105c483d0627b0c87195d2d3372fe4ba91/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 718, 67, 768, 67, 3256, 67, 280, 67, 1080, 16, 13655, 33, 7036, 16, 4358, 33, 7036, 16, 4040, 33, 7036, 16, 14502, 33, 7036, 4672, 3536, 3201, 279, 4746, 628, 279, 1976, 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, 1109, 12, 718, 67, 768, 67, 3256, 67, 280, 67, 1080, 16, 13655, 33, 7036, 16, 4358, 33, 7036, 16, 4040, 33, 7036, 16, 14502, 33, 7036, 4672, 3536, 3201, 279, 4746, 628, 279, 1976, 16...
found=methoddef.search(line) if found: typename, cname, methodname, argkw, doc = found.group("typename", "cname", "methodname", "argkw", "doc")
else: found=methoddef.search(line) if found: typename, cname, methodname, argkw, doc = found.group("typename", "cname", "methodname", "argkw", "doc") if typename:
def detectMethods(line, classdefs): # The below if is to avoid methods, like, for instance, map's clear to be recognized # also as a special method. Special methods never include PYARGS... if line.find("PYARGS")<0: found=specialmethoddef.search(line) if found: typename, methodname = found.group("typename", "methodname") addClassDef(classdefs, typename, parsedFile) classdefs[typename].specialmethods[methodname]=1 found=methoddef.search(line) if found: typename, cname, methodname, argkw, doc = found.group("typename", "cname", "methodname", "argkw", "doc") if not classdefs.has_key(typename) and "_" in typename: com = typename.split("_") if len(com)==2 and classdefs.has_key(com[0]): typename = com[0] cname = com[1] + "_" + cname if not methodname: methodname = cname addClassDef(classdefs, typename, parsedFile) classdefs[typename].methods[methodname]=MethodDefinition(argkw=argkw, arguments=doc, cname=cname) return 1
9ef61b5fe23b958aa80a57e1aa7994be56216f18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/9ef61b5fe23b958aa80a57e1aa7994be56216f18/pyxtract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 4712, 12, 1369, 16, 667, 12537, 4672, 468, 1021, 5712, 309, 353, 358, 4543, 2590, 16, 3007, 16, 364, 791, 16, 852, 1807, 2424, 358, 506, 16332, 468, 2546, 487, 279, 4582, 707, 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, 5966, 4712, 12, 1369, 16, 667, 12537, 4672, 468, 1021, 5712, 309, 353, 358, 4543, 2590, 16, 3007, 16, 364, 791, 16, 852, 1807, 2424, 358, 506, 16332, 468, 2546, 487, 279, 4582, 707, 18...
if secret_key:
if secret_key is not None:
def get_credentials(self, access_key=None, secret_key=None): access_key_name, secret_key_name = self.CredentialMap[self.name] if access_key: self.access_key = access_key elif os.environ.has_key(access_key_name.upper()): self.access_key = os.environ[access_key_name.upper()] elif config.has_option('Credentials', access_key_name): self.access_key = config.get('Credentials', access_key_name)
bbb705d7cc200745e811b0e946e6fceb0cbb333e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1098/bbb705d7cc200745e811b0e946e6fceb0cbb333e/provider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11687, 12, 2890, 16, 2006, 67, 856, 33, 7036, 16, 4001, 67, 856, 33, 7036, 4672, 2006, 67, 856, 67, 529, 16, 4001, 67, 856, 67, 529, 273, 365, 18, 8605, 863, 63, 2890, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11687, 12, 2890, 16, 2006, 67, 856, 33, 7036, 16, 4001, 67, 856, 33, 7036, 4672, 2006, 67, 856, 67, 529, 16, 4001, 67, 856, 67, 529, 273, 365, 18, 8605, 863, 63, 2890, 18,...
self.config= dict (block_size=4096)
self.config= dict ( block_size=4096, in_format=u'%(poster)s: [ found_format=u'[
def init(self, config): self.register (self.events.PUBLIC_MESSAGE, self.message) self.config= dict (block_size=4096) self.config.update (config) self.logger.debug (self.config) self.titleFound= False self.magic= magic.open (magic.MAGIC_MIME) self.magic.load ()
b095e4bb603035f9ad42ee452d8fa5b96db33b12 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5759/b095e4bb603035f9ad42ee452d8fa5b96db33b12/url.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 642, 4672, 365, 18, 4861, 261, 2890, 18, 5989, 18, 14939, 67, 8723, 16, 365, 18, 2150, 13, 365, 18, 1425, 33, 2065, 261, 1203, 67, 1467, 33, 24, 5908, 26, 16, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 642, 4672, 365, 18, 4861, 261, 2890, 18, 5989, 18, 14939, 67, 8723, 16, 365, 18, 2150, 13, 365, 18, 1425, 33, 2065, 261, 1203, 67, 1467, 33, 24, 5908, 26, 16, 3...
out += '<small class="detailedRecordActions">%s:</small> ' % descr
out += '<div><small class="detailedRecordActions">%s:</small> ' % descr
def format(bfo, style, separator='; ', show_icons='no'): """ This is the format for formatting fulltext links in the mini panel. @param separator the separator between urls. @param style CSS class of the link @param show_icons if 'yes', print icons for fulltexts """ _ = gettext_set_language(bfo.lang) out = '' # Retrieve files (parsed_urls, old_versions, additionals) = get_files(bfo) main_urls = parsed_urls['main_urls'] others_urls = parsed_urls['others_urls'] if parsed_urls.has_key('cern_urls'): cern_urls = parsed_urls['cern_urls'] # Prepare style if style != "": style = 'class="'+style+'"' # Build urls list. # Escape special chars for <a> tag value. additional_str = '' if additionals: additional_str = separator + '<small>(<a '+style+' href="'+CFG_SITE_URL+'/record/'+str(bfo.recID)+'/files/">%s</a>)</small>' % _("additional files") versions_str = '' if old_versions: versions_str = separator + '<small>(<a '+style+' href="'+CFG_SITE_URL+'/record/'+str(bfo.recID)+'/files/">%s</a>)</small>' % _("older versions") if main_urls: # Put a big file icon if only one file if len(main_urls.keys()) == 1 and len(main_urls.items()[0][1]) == 1 and \ (not CFG_CERN_SITE or len(cern_urls) == 0) and len(others_urls) == 0 and \ show_icons.lower() == 'yes': file_icon = '<img style="border:none" src="%s/img/file-icon-text-34x48.gif" alt="%s" /><br />' % (CFG_SITE_URL, _("Download fulltext")) elif show_icons.lower() == 'yes': file_icon = '<img style="border:none" src="%s/img/file-icon-text-12x16.gif" alt="%s"/>' % (CFG_SITE_URL, _("Download fulltext")) else: file_icon = '' last_name = "" for descr, urls in main_urls.items(): out += '<small class="detailedRecordActions">%s:</small> ' % descr url_list = [] urls.sort(lambda (url1, name1, format1), (url2, name2, format2): url1 < url2 and -1 or url1 > url2 and 1 or 0) for url, name, format in urls: if not name == last_name and len(main_urls) > 1: print_name = "<em>%s</em> - " % name else: print_name = "" last_name = name url_list.append(print_name + '<a '+style+' href="'+escape(url)+'">'+file_icon+format.upper()+'</a>') out += separator + separator.join(url_list) + \ additional_str + versions_str + '</div>' if CFG_CERN_SITE and cern_urls: # Put a big file icon if only one file if len(main_urls.keys()) == 0 and \ len(cern_urls) == 1 and len(others_urls) == 0 and \ show_icons.lower() == 'yes': file_icon = '<img style="border:none" src="%s/img/file-icon-text-34x48.gif" alt="%s" /><br />' % (CFG_SITE_URL, _("Download fulltext")) elif show_icons.lower() == 'yes': file_icon = '<img style="border:none" src="%s/img/file-icon-text-12x16.gif" alt="%s"/>' % (CFG_SITE_URL, _("Download fulltext")) else: file_icon = '' link_word = len(cern_urls) == 1 and _('link') or _('links') out += '<small class="detailedRecordActions">(%s)</small><br />' % _("CERN %(link_or_links)s" % {'link_or_links' : link_word}) url_list = [] for url, descr in cern_urls: url_list.append('<a '+style+' href="'+escape(url)+'">'+file_icon+escape(str(descr))+'</a>') out += separator.join(url_list) if others_urls: # Put a big file icon if only one file if len(main_urls.keys()) == 0 and \ (not CFG_CERN_SITE or len(cern_urls) == 0) and len(others_urls) == 1 and \ show_icons.lower() == 'yes': file_icon = '<img style="border:none" src="%s/img/file-icon-text-34x48.gif" alt="%s" /><br />' % (CFG_SITE_URL, _("Download fulltext")) elif show_icons.lower() == 'yes': file_icon = '<img style="border:none" src="%s/img/file-icon-text-12x16.gif" alt="%s"/>' % (CFG_SITE_URL, _("Download fulltext")) else: file_icon = '' link_word = len(others_urls) == 1 and _('link') or _('links') out += '<small class="detailedRecordActions">(%s)</small>%s' % (_("external %(link_or_links)s") % {'link_or_links' : link_word}, separator) url_list = [] for url, descr in others_urls: url_list.append('<a '+style+' href="'+escape(url)+'">'+file_icon+escape(str(descr))+'</a>') out += '<small>' + separator.join(url_list) + '</small>' if out.endswith('<br />'): out = out[:-len('<br />')] return out
a1fa94e81816e504670fd6ec9041803fedcc4874 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2763/a1fa94e81816e504670fd6ec9041803fedcc4874/bfe_fulltext_mini.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 70, 617, 16, 2154, 16, 4182, 2218, 31, 2265, 2405, 67, 14516, 2218, 2135, 11, 4672, 3536, 1220, 353, 326, 740, 364, 10407, 1983, 955, 4716, 316, 326, 21959, 6594, 18, 632, 891...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 70, 617, 16, 2154, 16, 4182, 2218, 31, 2265, 2405, 67, 14516, 2218, 2135, 11, 4672, 3536, 1220, 353, 326, 740, 364, 10407, 1983, 955, 4716, 316, 326, 21959, 6594, 18, 632, 891...
Paragraph:[Paragraph]}
Paragraph:[Paragraph] }
def __init__(self, tree, save_reports=False, nesting_strictness='loose'): """Init with parsetree.
853dc8d05b40aa3df5d186ebf0b6b5b8c087eb3c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/853dc8d05b40aa3df5d186ebf0b6b5b8c087eb3c/treecleaner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2151, 16, 1923, 67, 20195, 33, 8381, 16, 17174, 67, 13948, 4496, 2218, 383, 2584, 11, 4672, 3536, 2570, 598, 779, 542, 992, 18, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2151, 16, 1923, 67, 20195, 33, 8381, 16, 17174, 67, 13948, 4496, 2218, 383, 2584, 11, 4672, 3536, 2570, 598, 779, 542, 992, 18, 2, -100, -100, -100, -100...
self.file.close() self.sock.close()
self.shutdown()
def logout(self): """Shutdown connection to server.
ed860500914c98bc53bdadf292c180ffad9bec09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ed860500914c98bc53bdadf292c180ffad9bec09/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12735, 12, 2890, 4672, 3536, 10961, 1459, 358, 1438, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 12735, 12, 2890, 4672, 3536, 10961, 1459, 358, 1438, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
bob = D20Character( "Bob", race, { 'STR': 13, 'DEX':15, 'CON':12, 'INT':10, 'WIS':8, 'CHA':18, 'HEIGHT':72, 'WEIGHT':221, 'WIDTH':24, 'DEPTH':12 } )
bob = D20Character( "Bob", race, { 'STR': 150, 'DEX':15, 'CON':12, 'INT':10, 'WIS':8, 'CHA':18, 'HEIGHT':72, 'WEIGHT':221, 'WIDTH':24, 'DEPTH':12 } )
def getLevel( self ): charlevelnum = 1 try: for level in self.levels[ 'RACE' ].values( ): if level.enabled: charlevelnum += 1 except KeyError: pass return charlevelnum
207ed87faf315ab793ddacf4ee0ecdc556ae8941 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2289/207ed87faf315ab793ddacf4ee0ecdc556ae8941/d20rep.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17236, 12, 365, 262, 30, 1149, 2815, 2107, 273, 404, 775, 30, 364, 1801, 316, 365, 18, 12095, 63, 296, 9254, 11, 308, 18, 2372, 12, 262, 30, 309, 1801, 18, 5745, 30, 1149, 2815, 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, 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, 17236, 12, 365, 262, 30, 1149, 2815, 2107, 273, 404, 775, 30, 364, 1801, 316, 365, 18, 12095, 63, 296, 9254, 11, 308, 18, 2372, 12, 262, 30, 309, 1801, 18, 5745, 30, 1149, 2815, 2107...
'miro.compiled_templates', 'miro.compiled_templates.unittest',
def setup_distribution(self): self.distribution.app = ['Miro.py'] self.distribution.ext_modules = list() self.distribution.ext_modules.append(self.get_idletime_ext()) self.distribution.ext_modules.append(self.get_keychain_ext()) self.distribution.ext_modules.append(self.get_qtcomp_ext()) self.distribution.ext_modules.append(self.get_database_ext()) self.distribution.ext_modules.append(self.get_sorts_ext()) self.distribution.ext_modules.append(self.get_fasttypes_ext()) self.distribution.ext_modules.append(self.get_libtorrent_ext())
300896b73fbf67a5781ad4266f7594d526dbcce7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/300896b73fbf67a5781ad4266f7594d526dbcce7/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 16279, 12, 2890, 4672, 365, 18, 16279, 18, 2910, 273, 10228, 49, 11373, 18, 2074, 3546, 365, 18, 16279, 18, 408, 67, 6400, 273, 666, 1435, 365, 18, 16279, 18, 408, 67, 6400, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 16279, 12, 2890, 4672, 365, 18, 16279, 18, 2910, 273, 10228, 49, 11373, 18, 2074, 3546, 365, 18, 16279, 18, 408, 67, 6400, 273, 666, 1435, 365, 18, 16279, 18, 408, 67, 6400, ...
if qt: img = QImage(10, 10, QImage.Format_ARGB32_Premultiplied) try: if not img.loadFromData(raw): continue except: continue width, height = img.width(), img.height() else: f = cStringIO.StringIO(raw) try: im = PILImage.open(f) except IOError: continue width, height = im.size
try: img = Image() img.load(raw) except: continue width, height = img.size
def rescale(self, qt=True): from PyQt4.Qt import QImage, Qt from calibre.gui2 import pixmap_to_data try: from PIL import Image as PILImage PILImage except ImportError: import Image as PILImage
19d3a38ee969834ef92e91c2e51fc7c01f1857e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/19d3a38ee969834ef92e91c2e51fc7c01f1857e2/rescale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30323, 12, 2890, 16, 25672, 33, 5510, 4672, 628, 4707, 23310, 24, 18, 23310, 1930, 2238, 2040, 16, 7354, 628, 26139, 266, 18, 20292, 22, 1930, 11871, 1458, 67, 869, 67, 892, 775, 30, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30323, 12, 2890, 16, 25672, 33, 5510, 4672, 628, 4707, 23310, 24, 18, 23310, 1930, 2238, 2040, 16, 7354, 628, 26139, 266, 18, 20292, 22, 1930, 11871, 1458, 67, 869, 67, 892, 775, 30, 6...
dat=N.array(res[1])
def __read_param(self): ''' Read params.log file and write corresponding data Should only be called by __init__''' if self.__creating: fpar=param_file(self.datadir+'params.log',precision=self.precision) while True: (descr,res)=fpar.readline() if descr=='i': sec='init' elif descr=='r': if sec=='init': sec='run' firstrun=True else: firstrun=False elif descr=='d': self.param[sec].attrs['date']=res elif descr=='t' and sec=='run': if firstrun: self.param['run'].create_dataset('timerun',(1,),data=res,maxshape=(None,)) else: append(self.param['run/timerun'],res) elif descr=='&': if sec=='run' and firstrun==False: subsec=self.param[sec+'/'+res] else: subsec=self.param[sec].create_group(res) elif descr=='p': if sec=='run': if firstrun==False: append(subsec[res[0]],res[1]) else: dat=N.array(res[1]) try: subsec.create_dataset(res[0],data=dat.reshape([1]+list(dat.shape)),maxshape=tuple([None]+list(dat.shape))) except ValueError: print "Warning! Multiple presence of "+res[0]+" in params.log run parameters" subsec[res[0]][0]=res[1] else: try: subsec.create_dataset(res[0],data=res[1]) except ValueError: print "Warning! Multiple presence of "+res[0]+" in params.log init parameters" subsec[res[0]][0]=res[1] elif descr=='e': break del(fpar)
bf1a599ad9cde581f4679533ab3c54c55f5e9732 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1377/bf1a599ad9cde581f4679533ab3c54c55f5e9732/hdf5.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 67, 891, 12, 2890, 4672, 9163, 2720, 859, 18, 1330, 585, 471, 1045, 4656, 501, 9363, 1338, 506, 2566, 635, 1001, 2738, 972, 26418, 309, 365, 16186, 23799, 30, 284, 1065, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 67, 891, 12, 2890, 4672, 9163, 2720, 859, 18, 1330, 585, 471, 1045, 4656, 501, 9363, 1338, 506, 2566, 635, 1001, 2738, 972, 26418, 309, 365, 16186, 23799, 30, 284, 1065, 33, ...
method_id.append(struct.pack('>q', hash(func_code.co_consts)))
method_id.append(struct.pack('>q', hash(func_code.co_consts[1:])))
def generate_webmethod_etag(context, item, registration, wrapper): if item is not None: # locate web method's descriptor filter_class = wrapper.__class__ while wrapper.__class__.__module__ == filter_class.__module__: wrapper = wrapper.decorator
1692745fd9975a8e1a00c7f44871a075546ae2ed /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2504/1692745fd9975a8e1a00c7f44871a075546ae2ed/caching.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4875, 2039, 67, 20788, 12, 2472, 16, 761, 16, 7914, 16, 4053, 4672, 309, 761, 353, 486, 599, 30, 468, 10627, 3311, 707, 1807, 4950, 1034, 67, 1106, 273, 4053, 16186, 1106, 97...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4875, 2039, 67, 20788, 12, 2472, 16, 761, 16, 7914, 16, 4053, 4672, 309, 761, 353, 486, 599, 30, 468, 10627, 3311, 707, 1807, 4950, 1034, 67, 1106, 273, 4053, 16186, 1106, 97...
setupTools(self)
if not reinstall: setupTools(self)
def install(self, out=None): if out is None: out = StringIO() setupTools(self) installSubSkin(self, skin_name, out) # Install configlet cptool = getToolByName(self, 'portal_controlpanel') try: cptool.unregisterConfiglet(placeful_prefs_configlet['id']) except: pass try: cptool.registerConfiglet(**placeful_prefs_configlet) except: pass return out.getvalue()
d54a8672d097321fe2dab06540f1857807371573 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11955/d54a8672d097321fe2dab06540f1857807371573/Install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 12, 2890, 16, 596, 33, 7036, 4672, 309, 596, 353, 599, 30, 596, 273, 15777, 1435, 225, 309, 486, 283, 5425, 30, 3875, 10348, 12, 2890, 13, 225, 3799, 1676, 26827, 12, 2890, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 12, 2890, 16, 596, 33, 7036, 4672, 309, 596, 353, 599, 30, 596, 273, 15777, 1435, 225, 309, 486, 283, 5425, 30, 3875, 10348, 12, 2890, 13, 225, 3799, 1676, 26827, 12, 2890, 16, ...
return httptools.redirect("/ecomap/" + str(self.ecomap.id) + "/")
return httptools.redirect("/ecomap/" + str(ecomap.id) + "/")
def edit(self,name="",description=""): es = EcomapSchema() try: d = es.to_python({'name' : name, 'description' : description, 'owner' : self.ecomap.ownerID}) self.ecomap.name = d['name'] self.ecomap.description = d['description'] self.ecomap.modified = DateTime.now() cherrypy.session['message'] = "changes saved" return httptools.redirect("/ecomap/" + str(self.ecomap.id) + "/")
bd620ed6e7bc94139cb8bd730d5c5775ee916a14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5854/bd620ed6e7bc94139cb8bd730d5c5775ee916a14/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 12, 2890, 16, 529, 1546, 3113, 3384, 1546, 6, 4672, 5001, 273, 512, 832, 438, 3078, 1435, 775, 30, 302, 273, 5001, 18, 869, 67, 8103, 12590, 11, 529, 11, 294, 508, 16, 296, 338...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 12, 2890, 16, 529, 1546, 3113, 3384, 1546, 6, 4672, 5001, 273, 512, 832, 438, 3078, 1435, 775, 30, 302, 273, 5001, 18, 869, 67, 8103, 12590, 11, 529, 11, 294, 508, 16, 296, 338...
def __init__(self, address, callback):
def __init__(self, port, callback): self.address = ('127.0.0.1', port) self.url = 'http://127.0.0.1:%d/' % port
def __init__(self, address, callback): self.callback = callback self.base.__init__(self, address, self.handler)
bb384e153d6614fce08e58bada5e06402dc8b3e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/bb384e153d6614fce08e58bada5e06402dc8b3e4/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1756, 16, 1348, 4672, 365, 18, 2867, 273, 7707, 14260, 18, 20, 18, 20, 18, 21, 2187, 1756, 13, 365, 18, 718, 273, 296, 2505, 2207, 14260, 18, 20, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1756, 16, 1348, 4672, 365, 18, 2867, 273, 7707, 14260, 18, 20, 18, 20, 18, 21, 2187, 1756, 13, 365, 18, 718, 273, 296, 2505, 2207, 14260, 18, 20, 18, ...
try:
def __repr__ (self): try: status = [self.__class__.__module__+"."+self.__class__.__name__] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr: if type(self.addr) == types.TupleType: status.append ('%s:%d' % self.addr) else: status.append (self.addr) return '<%s at %#x>' % (' '.join (status), id (self)) except: pass
8c78ff4da0a516b57cb5882531d99104f951b057 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c78ff4da0a516b57cb5882531d99104f951b057/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 261, 2890, 4672, 1267, 273, 306, 2890, 16186, 1106, 972, 16186, 2978, 972, 9078, 1199, 15, 2890, 16186, 1106, 972, 16186, 529, 972, 65, 309, 365, 18, 9436, 310, 471, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 261, 2890, 4672, 1267, 273, 306, 2890, 16186, 1106, 972, 16186, 2978, 972, 9078, 1199, 15, 2890, 16186, 1106, 972, 16186, 529, 972, 65, 309, 365, 18, 9436, 310, 471, 36...
self.atoms = list(atomlist) for atm in atomlist:
self.atoms = list(atomList) for atm in atomList:
def setAtoms(self, atomList): """ Set the jig's atoms to the atoms in the parameter atomList. If this jig already has atoms, it first removes its reference. It also makes sure that this jig is not already in the atom.jigs (a list that each individual atom in the atomList maintains) @param atomList: List of atoms to which this jig needs to be attached. @type atomList: list @see: L{self._remove_all_atoms} @see: L{RotaryMotorEditController._modifyStructure} for an example use @see: L{self.setShaft} """ # [as of 050415 (and long before) this is only used for # motors; __init__ does same thing for other jigs] if self.atoms: # intended to fix bug 2561 more safely than the prior change [bruce 071010] self._remove_all_atoms() self.atoms = list(atomlist) # copy the list for atm in atomlist: if self in atm.jigs: print "bug: %r is already in %r.jigs, just before we want" \ " to add it" % (self, atm) else: atm.jigs.append(self) #k not sure if following is needed -- bruce 060322 _changed_structure_Atoms[atm.key] = atm return
3265b3295e69ff7a5be5d40da77184cbde1f99a3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/3265b3295e69ff7a5be5d40da77184cbde1f99a3/jigs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 14280, 12, 2890, 16, 3179, 682, 4672, 3536, 1000, 326, 525, 360, 1807, 9006, 358, 326, 9006, 316, 326, 1569, 3179, 682, 18, 971, 333, 525, 360, 1818, 711, 9006, 16, 518, 1122, 715...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 14280, 12, 2890, 16, 3179, 682, 4672, 3536, 1000, 326, 525, 360, 1807, 9006, 358, 326, 9006, 316, 326, 1569, 3179, 682, 18, 971, 333, 525, 360, 1818, 711, 9006, 16, 518, 1122, 715...
tab = gtk.Label(label)
tab = gtk.HBox(False, 0) tab.set_border_width(2) labelbox = gtk.Label(label) tab.pack_end(labelbox, True, True, 3) image = gtk.Image() icon = settings.get("icon", "") if os.path.exists(icon): (labelx, labely) = labelbox.size_request() pixbuf = gtk.gdk.pixbuf_new_from_file(os.path.realpath(icon)) icon_width = pixbuf.get_width() icon_height = pixbuf.get_height() if (icon_height > labely): icon_aspectratio = float(icon_width) / icon_height icon_height = labely icon_width = int(icon_aspectratio * icon_height) scaled_buf = pixbuf.scale_simple(icon_width,icon_height,gtk.gdk.INTERP_BILINEAR) image.set_from_pixbuf(scaled_buf) tab.pack_start(image, False, False, 3) image.show() labelbox.show()
def build(self, items):
42a457cb6cc9f762725598ee1c6614908be15aec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5768/42a457cb6cc9f762725598ee1c6614908be15aec/ConfigDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 2890, 16, 1516, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 2890, 16, 1516, 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, -10...
"email-from=","rotate","verbose","stats","sort"])
"email-from=","rotate","verbose","stats","sort", "debug"])
def main(): # The defaults logfile = "/var/log/syslog" configfile = "/etc/box/bbackupd.conf" email_to = None email_from = "report@boxbackup" rotate = False verbose = False stats = False sort = False # Parse the options try: opts, args = getopt.getopt(sys.argv[1:], "osrvhl:c:t:f:", ["help", "logfile=", "configfile=","email-to=", "email-from=","rotate","verbose","stats","sort"]) except getopt.GetoptError: usage() return for opt, arg in opts: if(opt in ("--logfile","-l")): logfile = arg elif(opt in ("--configfile", "-c")): configfile = arg elif(opt in ("--email-to", "-t")): email_to = arg elif(opt in ("--email-from", "-f")): email_from = arg elif(opt in ("--rotate", "-r")): rotate = True elif(opt in ("--verbose", "-v")): verbose = True elif(opt in ("--stats", "-s")): stats = True elif(opt in ("--sort", "-o")): sort = True elif(opt in ("--help", "-h")): usage() return # Run the reporter bbr = BoxBackupReporter(configfile, logfile, email_to, email_from, rotate, verbose, stats, sort) try: bbr.run() bbr.deliver() except BoxBackupReporter.BoxBackupReporterError, error_msg: print error_msg
601d178ad8d63fc13ab2f6ac5f533a7c3a13077d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4252/601d178ad8d63fc13ab2f6ac5f533a7c3a13077d/bbreporter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 1021, 3467, 15204, 273, 2206, 1401, 19, 1330, 19, 9499, 1330, 6, 642, 768, 273, 2206, 14175, 19, 2147, 19, 70, 823, 5533, 18, 3923, 6, 2699, 67, 869, 273, 599, 2699, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 1021, 3467, 15204, 273, 2206, 1401, 19, 1330, 19, 9499, 1330, 6, 642, 768, 273, 2206, 14175, 19, 2147, 19, 70, 823, 5533, 18, 3923, 6, 2699, 67, 869, 273, 599, 2699, ...
fashion_help_wizard('fashion.help.wizard')
fashion_help_wizard('fashion.help.wizard')
def field_value(f): res=data['form'][f] if isinstance(res, list): if len(res): res=res[0][2] else: res=False return res
b487e7b94b0afc52953a6eecd307f6353774256a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/b487e7b94b0afc52953a6eecd307f6353774256a/fashion_help_wizard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 67, 1132, 12, 74, 4672, 400, 33, 892, 3292, 687, 3546, 63, 74, 65, 309, 1549, 12, 455, 16, 666, 4672, 309, 562, 12, 455, 4672, 400, 33, 455, 63, 20, 6362, 22, 65, 469, 30, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 67, 1132, 12, 74, 4672, 400, 33, 892, 3292, 687, 3546, 63, 74, 65, 309, 1549, 12, 455, 16, 666, 4672, 309, 562, 12, 455, 4672, 400, 33, 455, 63, 20, 6362, 22, 65, 469, 30, 4...
os.system('foobnix --stop')
thread.start_new_thread(os.system,("foobnix --stop",))
def on_mediakey(comes_from, what): """ gets called when multimedia keys are pressed down. """ if what in ['Stop', 'Play', 'Next', 'Previous']: if what == 'Stop': os.system('foobnix --stop') elif what == 'Play': os.system('foobnix --play') elif what == 'Next': os.system('foobnix --next') elif what == 'Previous': os.system('foobnix --prev') else: print ('Got a multimedia key...')
486ba87cdfca52d09c74ac28da083e37ee35da92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/486ba87cdfca52d09c74ac28da083e37ee35da92/foobnix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5660, 581, 402, 12, 10127, 67, 2080, 16, 4121, 4672, 3536, 5571, 2566, 1347, 1778, 381, 1980, 1311, 854, 19504, 2588, 18, 3536, 309, 4121, 316, 10228, 4947, 2187, 296, 11765, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5660, 581, 402, 12, 10127, 67, 2080, 16, 4121, 4672, 3536, 5571, 2566, 1347, 1778, 381, 1980, 1311, 854, 19504, 2588, 18, 3536, 309, 4121, 316, 10228, 4947, 2187, 296, 11765, 21...
str = str % tuple([__fix_arg(a) for a in args])
cmd = cmd % tuple([_fix_arg(a) for a in args])
def _execute(self, str, *args): if args: argtype = type(args[0]) if argtype in [types.TupleType, types.DictType]: args = args[0] # ignore any other args else: argtype = types.TupleType
a0e4a88c1bf0f58a9f00b2a09f3a7f9510e22ed1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1238/a0e4a88c1bf0f58a9f00b2a09f3a7f9510e22ed1/bpgsql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 12, 2890, 16, 609, 16, 380, 1968, 4672, 309, 833, 30, 1501, 723, 273, 618, 12, 1968, 63, 20, 5717, 309, 1501, 723, 316, 306, 2352, 18, 9038, 559, 16, 1953, 18, 5014, 559, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 12, 2890, 16, 609, 16, 380, 1968, 4672, 309, 833, 30, 1501, 723, 273, 618, 12, 1968, 63, 20, 5717, 309, 1501, 723, 316, 306, 2352, 18, 9038, 559, 16, 1953, 18, 5014, 559, ...
print " %s trained." % (num_spam_trained)
print "\n %s trained." % (num_spam_trained)
def Train(self): if options["globals", "verbose"]: t = time.time()
5a4e609987efb116d678d8ab51380afe0d8b948e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/5a4e609987efb116d678d8ab51380afe0d8b948e/sb_imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2197, 267, 12, 2890, 4672, 309, 702, 9614, 16227, 3113, 315, 11369, 11929, 30, 268, 273, 813, 18, 957, 1435, 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, 2197, 267, 12, 2890, 4672, 309, 702, 9614, 16227, 3113, 315, 11369, 11929, 30, 268, 273, 813, 18, 957, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print productid, c.getProduct().getHash()
def filter_entitlements_by_products(self, products): matched_data_dict = {} for c in self.entitlement_directory.list(): print "cert", c for product in products: productid = product.getProduct().getHash() print productid, c.getProduct().getHash() if productid == c.getProduct().getHash(): matched_data_dict[c.serialNumber()] = c return matched_data_dict
80ba406f4eadd2bf1f4dc8fd08f1b4dbfc2bfa09 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/80ba406f4eadd2bf1f4dc8fd08f1b4dbfc2bfa09/managerlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 319, 19025, 87, 67, 1637, 67, 18736, 12, 2890, 16, 10406, 4672, 4847, 67, 892, 67, 1576, 273, 2618, 364, 276, 316, 365, 18, 319, 19025, 67, 5149, 18, 1098, 13332, 1172, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 319, 19025, 87, 67, 1637, 67, 18736, 12, 2890, 16, 10406, 4672, 4847, 67, 892, 67, 1576, 273, 2618, 364, 276, 316, 365, 18, 319, 19025, 67, 5149, 18, 1098, 13332, 1172, 315, ...
print "Filtering took", time.time() - t, "seconds."
if count is not None: print "\nClassified %s ham, %s spam, and %s unsure." % \ (count["ham"], count["spam"], count["unsure"]) print "Classifying took", time.time() - t, "seconds."
def Filter(self): if options["globals", "verbose"]: t = time.time()
ab09767a7ff8193e46555737b7617a814f80264c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/ab09767a7ff8193e46555737b7617a814f80264c/imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4008, 12, 2890, 4672, 309, 702, 9614, 16227, 3113, 315, 11369, 11929, 30, 268, 273, 813, 18, 957, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4008, 12, 2890, 4672, 309, 702, 9614, 16227, 3113, 315, 11369, 11929, 30, 268, 273, 813, 18, 957, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if robustlist and robustify: for mname in robustlist: m=classdict.get(mname) if m and isinstance(m, types.FunctionType): classdict[mname]=robustify(m)
for mname in robustlist: m=classdict.get(mname) if not m: for b in bases: if hasattr(b, mname): m=getattr(b, mname) break if m: classdict[mname]=_robustify(m) else: print type(m)
def __new__(self, classname, bases, classdict): robustlist=classdict.get('robust') robustify=classdict.get('robustify') if robustlist and robustify: for mname in robustlist: m=classdict.get(mname) if m and isinstance(m, types.FunctionType): classdict[mname]=robustify(m) return type.__new__(self, classname, bases, classdict)
f4eb437d00a665f662ae25d75ce8531afedea6b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/f4eb437d00a665f662ae25d75ce8531afedea6b7/ftpfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 2890, 16, 7479, 16, 8337, 16, 667, 1576, 4672, 27920, 1098, 33, 1106, 1576, 18, 588, 2668, 303, 70, 641, 6134, 27920, 1164, 33, 1106, 1576, 18, 588, 2668, 303, 70,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2704, 972, 12, 2890, 16, 7479, 16, 8337, 16, 667, 1576, 4672, 27920, 1098, 33, 1106, 1576, 18, 588, 2668, 303, 70, 641, 6134, 27920, 1164, 33, 1106, 1576, 18, 588, 2668, 303, 70,...
self.roomsmodel.prepend([room, num, 10000 + num])
self.roomsmodel.prepend([room, num, 1])
def SetPrivateRooms(self, rooms=[]): for room in rooms: if room[0] not in self.PrivateRooms.keys(): self.PrivateRooms[room[0]] = {"users": [], "joined": room[1], "operators": [], "owned":True, "operator":False} iter = self.roomsmodel.get_iter_root() while iter is not None: room = self.roomsmodel.get_value(iter, 0) lastiter = iter iter = self.roomsmodel.iter_next(iter) if self.IsPrivateRoomOwned(room) or self.IsPrivateRoomMember(room): self.roomsmodel.remove(lastiter) for room in self.PrivateRooms: num = self.PrivateRooms[room]["joined"] if self.IsPrivateRoomOwned(room): self.roomsmodel.prepend([room, num, 20000 + num]) elif self.IsPrivateRoomMember(room): self.roomsmodel.prepend([room, num, 10000 + num])
bd22d9a79d709d993463602575ff87e47daaa60e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/bd22d9a79d709d993463602575ff87e47daaa60e/chatrooms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 6014, 13646, 87, 12, 2890, 16, 26450, 33, 8526, 4672, 364, 7725, 316, 26450, 30, 309, 7725, 63, 20, 65, 486, 316, 365, 18, 6014, 13646, 87, 18, 2452, 13332, 365, 18, 6014, 13646,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 6014, 13646, 87, 12, 2890, 16, 26450, 33, 8526, 4672, 364, 7725, 316, 26450, 30, 309, 7725, 63, 20, 65, 486, 316, 365, 18, 6014, 13646, 87, 18, 2452, 13332, 365, 18, 6014, 13646,...
if wid:
if KILLUNKNOWNWINDOWS and wid:
def do_updateEvt(self, event): (what, message, when, where, modifiers) = event wid = Win.WhichWindow(message) if wid and self._windows.has_key(wid): window = self._windows[wid] window.do_rawupdate(wid, event) else: if wid: wid.HideWindow() import sys sys.stderr.write("XXX killed unknown (crashed?) Python window.\n") else: MacOS.HandleEvent(event)
3c8223171f480f081f5718acc3d6edf3b516752c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3c8223171f480f081f5718acc3d6edf3b516752c/Wapplication.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2725, 30990, 12, 2890, 16, 871, 4672, 261, 23770, 16, 883, 16, 1347, 16, 1625, 16, 10429, 13, 273, 871, 15481, 273, 21628, 18, 2888, 1354, 3829, 12, 2150, 13, 309, 15481, 471,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2725, 30990, 12, 2890, 16, 871, 4672, 261, 23770, 16, 883, 16, 1347, 16, 1625, 16, 10429, 13, 273, 871, 15481, 273, 21628, 18, 2888, 1354, 3829, 12, 2150, 13, 309, 15481, 471,...
(PF_STRING, "save_path", "The path to export the HTML to", os.getcwd()),
(PF_DIRNAME, "save_path", "The path to export the HTML to", os.getcwd()),
def parse_urls (self): """ This will parse any url targets in the href="XX" fields of the given file and return then as a list """ import re url_list = [] try: html_file = open (self.filename) #Regular expression to pick everything up to the next doublequote #character after finding the sequence 'href="'. The found sequences #will be returned as a list by the "findall" method. expr = re.compile (r"""href\=\"([^\"]*?)\"""") url_list = expr.findall (html_file.read (2 ** 18)) html_file.close() except: #silently ignore any errors parsing this. The file being #ovewriten may not be a file genrated by py-slice. pass return url_list
3f1dd8ace4366c5288589187bd8690b2ec8356e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/3f1dd8ace4366c5288589187bd8690b2ec8356e4/py-slice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 10518, 261, 2890, 4672, 3536, 1220, 903, 1109, 1281, 880, 5774, 316, 326, 3897, 1546, 5619, 6, 1466, 434, 326, 864, 585, 471, 327, 1508, 487, 279, 666, 3536, 1930, 283, 880, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 10518, 261, 2890, 4672, 3536, 1220, 903, 1109, 1281, 880, 5774, 316, 326, 3897, 1546, 5619, 6, 1466, 434, 326, 864, 585, 471, 327, 1508, 487, 279, 666, 3536, 1930, 283, 880, ...
dead_pids = set( self.get_process_ids() )
dead_pids = set( self.__processDict.keys() )
def scan_processes_and_threads(self): """ Populates the snapshot with running processes and threads. """ our_pid = win32.GetProcessId( win32.GetCurrentProcess() ) dead_pids = set( self.get_process_ids() ) found_tids = set()
d871788990d36af2a5520f8918a87b71c5035ab2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/d871788990d36af2a5520f8918a87b71c5035ab2/system.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 67, 18675, 67, 464, 67, 12495, 12, 2890, 4672, 3536, 10264, 17099, 326, 4439, 598, 3549, 8488, 471, 7403, 18, 3536, 3134, 67, 6610, 565, 273, 5657, 1578, 18, 967, 2227, 548, 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, 4135, 67, 18675, 67, 464, 67, 12495, 12, 2890, 4672, 3536, 10264, 17099, 326, 4439, 598, 3549, 8488, 471, 7403, 18, 3536, 3134, 67, 6610, 565, 273, 5657, 1578, 18, 967, 2227, 548, 12, ...
if message.startswith("SHOWSTOPBUTTON: "):
if message.startswith(u"SHOWSTOPBUTTON: "):
def processSocketMsg(self, message): if message.startswith("ACTIVATE: "): NSApp.activateIgnoringOtherApps_(True) return "" if message.startswith("HIDE: "): self.window.orderOut_(self) return "" if message.startswith("SHOW: "): self.window.orderFront_(self) return "" if message.startswith("TITLE: "): self.window.setTitle_(message[7:]) return "" if message.startswith("MESSAGE: "): self.messageFld.setStringValue_(message[9:]) return "" if message.startswith("DETAIL: "): self.detailFld.setStringValue_(message[8:]) return "" if message.startswith("PERCENT: "): self.setPercentageDone(message[9:]) return "" if message.startswith("GETSTOPBUTTONSTATE: "): return "%s\n" % self.stopBtnState if message.startswith("HIDESTOPBUTTON: "): self.stopBtn.setHidden_(True) return "" if message.startswith("SHOWSTOPBUTTON: "): self.stopBtn.setHidden_(False) return "" if message.startswith("ENABLESTOPBUTTON: "): self.stopBtn.setEnabled_(True) return "" if message.startswith("DISABLESTOPBUTTON: "): self.stopBtn.setEnabled_(False) return "" if message.startswith("RESTARTALERT: "): self.doRestartAlert() while 1: if self.restartAlertDismissed: break return "1\n"
54e92711e9eb2572d70240c4a8cff7dd10c36120 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6241/54e92711e9eb2572d70240c4a8cff7dd10c36120/MSController.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 4534, 3332, 12, 2890, 16, 883, 4672, 309, 883, 18, 17514, 1918, 2932, 22271, 1777, 30, 315, 4672, 11472, 3371, 18, 10014, 21702, 8290, 16339, 67, 12, 5510, 13, 327, 1408, 309, 883,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4534, 3332, 12, 2890, 16, 883, 4672, 309, 883, 18, 17514, 1918, 2932, 22271, 1777, 30, 315, 4672, 11472, 3371, 18, 10014, 21702, 8290, 16339, 67, 12, 5510, 13, 327, 1408, 309, 883,...
'their own execution. A call to this function wont prevent a '
'their own execution. A call to this function won\'t prevent a '
def viewpermission(context, request): return result
e835cc22e93fb722d75b567f9092cd8133297539 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14321/e835cc22e93fb722d75b567f9092cd8133297539/testing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 9827, 12, 2472, 16, 590, 4672, 327, 563, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 9827, 12, 2472, 16, 590, 4672, 327, 563, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def referrersStr(self, numEach=3):
def printReferrers(self, numEach=3):
def referrersStr(self, numEach=3): """referrers of the first few of each type of object""" s = '' counts = list(set(self._count2types.keys())) counts.sort() counts.reverse() for count in counts: types = makeList(self._count2types[count]) for typ in types: s += '\n\nTYPE: %s' % typ for i in xrange(min(numEach,len(self._type2objs[typ]))): obj = self._type2objs[typ][i] s += '\nOBJ: %s\n' % safeRepr(obj) referrers = gc.get_referrers(obj) s += '%s REFERRERS:\n' % len(referrers) if len(referrers): s += getNumberedTypedString(referrers, maxLen=80, numPrefix='REF') else: s += '<No Referrers>' return s
2f68815351a8c1fda94205efb8571c23be860b44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/2f68815351a8c1fda94205efb8571c23be860b44/ObjectPool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 1957, 370, 414, 12, 2890, 16, 818, 3442, 33, 23, 4672, 3536, 1734, 370, 414, 434, 326, 1122, 11315, 434, 1517, 618, 434, 733, 8395, 272, 273, 875, 6880, 273, 666, 12, 542, 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, 1172, 1957, 370, 414, 12, 2890, 16, 818, 3442, 33, 23, 4672, 3536, 1734, 370, 414, 434, 326, 1122, 11315, 434, 1517, 618, 434, 733, 8395, 272, 273, 875, 6880, 273, 666, 12, 542, 12, ...
ipctx.set(0)
idle.set(1)
def openfile(event=NONE): global mrudir,fileopened,nopen,tw nopen=1 #Work-around for "click feedthrough" bug upload.set(0) try: os.chdir(mrudir) except: pass fname=askopenfilename(filetypes=[("Wave files","*.wav *.WAV")]) if fname: w.getfile(fname,len(fname)) mrudir=os.path.dirname(fname) fileopened=os.path.basename(fname) i1=fileopened.find('.') t=fileopened[i1-4:i1] t=t[0:2] + ':' + t[2:4] n=len(tw) if n>12: tw=tw[:n-1] tw=[t,] + tw os.chdir(appdir) ipctx.set(0)
da08b4dbc3df64eaf704085c9e6e6d31a04809e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2394/da08b4dbc3df64eaf704085c9e6e6d31a04809e4/wspr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 768, 12, 2575, 33, 9826, 4672, 2552, 9752, 1100, 481, 16, 768, 25304, 16, 82, 3190, 16, 11246, 290, 3190, 33, 21, 7682, 468, 2421, 17, 12716, 364, 315, 7475, 4746, 10064, 6, 7934...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 768, 12, 2575, 33, 9826, 4672, 2552, 9752, 1100, 481, 16, 768, 25304, 16, 82, 3190, 16, 11246, 290, 3190, 33, 21, 7682, 468, 2421, 17, 12716, 364, 315, 7475, 4746, 10064, 6, 7934...
ERROR_TOKEN = 'Invalid proxy token request'
def callBack(self, threadedJob, submitResult): if not submitResult['OK']: self.log.error( submitResult['Message'] )
6271afc9c4bbb66e2201ad46655c110521589002 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/6271afc9c4bbb66e2201ad46655c110521589002/TaskQueueDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 2711, 12, 2890, 16, 286, 20528, 2278, 16, 4879, 1253, 4672, 309, 486, 4879, 1253, 3292, 3141, 3546, 30, 365, 18, 1330, 18, 1636, 12, 4879, 1253, 3292, 1079, 3546, 262, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 2711, 12, 2890, 16, 286, 20528, 2278, 16, 4879, 1253, 4672, 309, 486, 4879, 1253, 3292, 3141, 3546, 30, 365, 18, 1330, 18, 1636, 12, 4879, 1253, 3292, 1079, 3546, 262, 2, -100, -1...
-x^6 - (x^8/2)
-x^6 - x^8/2
def taylor(self, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable v around the point a, containing terms through $(x - a)^n$.
4abaf2c6ed0ea24bec64bbddc272c657c3f1ea05 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/4abaf2c6ed0ea24bec64bbddc272c657c3f1ea05/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 2890, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 331, 6740, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 2890, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 331, 6740, 326, 16...
data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri))
data = w.page_body_start(uri, http_user, ctxtnav, title, False)
def delete(uri, http_user, name, sure = False, no_archive = False, yes = None): """ Remove group and archive (or not) group shared dir. """ del yes title = _("Remove group %s") % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) groups.reload() if groups.is_system_group(name): return w.page(title, w.error(_("Failed to remove group"), [ _("alter system group.") ], _("insufficient permissions to perform operation."))) if not sure: data += w.question(_("Are you sure you want to remove group <strong>%s</strong>?") % name, _("""Group shared data will be archived in directory %s, and accessible to members of group %s for eventual recovery. However, you can decideto remove them permanently.""") % (configuration.home_archive_dir, configuration.defaults.admin_group), yes_values = [ _("Remove") + ' >>', "/groups/delete/%s/sure" % name, _("R") ], no_values = [ '<< ' + _("Cancel"), "/groups/list", _("N") ], form_options = w.checkbox("no_archive", "True", _("Definitely remove group shared data."), checked = False) ) return w.page(title, data) else: # we are sure, do it ! command = [ 'sudo', 'del', 'group', '--quiet', '--no-colors', '--name', name ] if no_archive: command.extend(['--no-archive']) return w.page(title, data + w.run(command, uri, successfull_redirect = "/groups/list", err_msg = _("Failed to remove group <strong>%s</strong>!") % name))
e74a9415e90d5a3af83e10abed2f1876ae4e528a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/e74a9415e90d5a3af83e10abed2f1876ae4e528a/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 1650, 16, 1062, 67, 1355, 16, 508, 16, 3071, 273, 1083, 16, 1158, 67, 10686, 273, 1083, 16, 12465, 273, 599, 4672, 3536, 3581, 1041, 471, 5052, 261, 280, 486, 13, 1041, 5116,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 1650, 16, 1062, 67, 1355, 16, 508, 16, 3071, 273, 1083, 16, 1158, 67, 10686, 273, 1083, 16, 12465, 273, 599, 4672, 3536, 3581, 1041, 471, 5052, 261, 280, 486, 13, 1041, 5116,...
LINE_LEN = 30 csym_split_rxx = re.compile ("^(.{,%d}[<,:])(.*)$" % LINE_LEN)
def split_to_ints (l): v = l.split () try: v = [ my_int (x) for x in v] except ValueError: v = None return v
28008532aef10b3cdeb86e9d6e2ab1cf4b2e7903 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11834/28008532aef10b3cdeb86e9d6e2ab1cf4b2e7903/profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 67, 869, 67, 28142, 261, 80, 4672, 331, 273, 328, 18, 4939, 1832, 775, 30, 331, 273, 306, 3399, 67, 474, 261, 92, 13, 364, 619, 316, 331, 65, 1335, 2068, 30, 331, 273, 599, 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, 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, 67, 869, 67, 28142, 261, 80, 4672, 331, 273, 328, 18, 4939, 1832, 775, 30, 331, 273, 306, 3399, 67, 474, 261, 92, 13, 364, 619, 316, 331, 65, 1335, 2068, 30, 331, 273, 599, 3...
self.failUnlessEqual(3, getargs_I(3.14))
self.assertRaises(TypeError, getargs_I, 3.14)
def test_I(self): from _testcapi import getargs_I # I returns 'unsigned int', no range checking self.failUnlessEqual(3, getargs_I(3.14)) self.failUnlessEqual(99, getargs_I(Long())) self.failUnlessEqual(99, getargs_I(Int()))
2eaa053bbac0422f04c5d83e555aac57c3253ce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2eaa053bbac0422f04c5d83e555aac57c3253ce5/test_getargs2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 45, 12, 2890, 4672, 628, 389, 3813, 71, 2425, 1930, 336, 1968, 67, 45, 468, 467, 1135, 296, 22297, 509, 2187, 1158, 1048, 6728, 365, 18, 11231, 12649, 6141, 12, 19030, 16, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 45, 12, 2890, 4672, 628, 389, 3813, 71, 2425, 1930, 336, 1968, 67, 45, 468, 467, 1135, 296, 22297, 509, 2187, 1158, 1048, 6728, 365, 18, 11231, 12649, 6141, 12, 19030, 16, 33...
def initialize_prebuilt_instance(self, value, classdef, result):
def initialize_prebuilt_data(self, value, classdef, result):
def initialize_prebuilt_instance(self, value, classdef, result): if self.classdef is not None: # recursively build the parent part of the instance self.rbase.initialize_prebuilt_instance(value, classdef, result.super) # then add instance attributes from this level for name, (mangled_name, r) in self.fields.items(): if r.lowleveltype is Void: llattrvalue = None elif name == '_hash_cache_': # hash() support llattrvalue = hash(value) else: try: attrvalue = getattr(value, name) except AttributeError: attrvalue = self.classdef.classdesc.read_attribute(name, None) if attrvalue is None: warning("prebuilt instance %r has no attribute %r" % ( value, name)) llattrvalue = r.lowleveltype._defl() else: llattrvalue = r.convert_desc_or_const(attrvalue) else: llattrvalue = r.convert_const(attrvalue) setattr(result, mangled_name, llattrvalue) else: # OBJECT part rclass = getclassrepr(self.rtyper, classdef) result.typeptr = rclass.getvtable()
c2dde63a9e37a14bcd5720a1028bc8d3b45baebd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/c2dde63a9e37a14bcd5720a1028bc8d3b45baebd/rclass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 1484, 12406, 67, 892, 12, 2890, 16, 460, 16, 667, 536, 16, 563, 4672, 309, 365, 18, 1106, 536, 353, 486, 599, 30, 468, 8536, 1361, 326, 982, 1087, 434, 326, 791, 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, 4046, 67, 1484, 12406, 67, 892, 12, 2890, 16, 460, 16, 667, 536, 16, 563, 4672, 309, 365, 18, 1106, 536, 353, 486, 599, 30, 468, 8536, 1361, 326, 982, 1087, 434, 326, 791, 365, 18, ...
area_colored.__init__( self)
meta_enabled.__init__( self, standard=paper.standard)
def __init__( self, paper, xy=(), package=None): meta_enabled.__init__( self, standard=paper.standard) point_drawable.__init__( self) with_font.__init__( self) area_colored.__init__( self)
c4b458dc1f3f8bed2dec89722d1450f999527868 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4298/c4b458dc1f3f8bed2dec89722d1450f999527868/classes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 15181, 16, 7668, 33, 9334, 2181, 33, 7036, 4672, 2191, 67, 5745, 16186, 2738, 972, 12, 365, 16, 4529, 33, 27400, 18, 10005, 13, 1634, 67, 9446, 429, 16186...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 15181, 16, 7668, 33, 9334, 2181, 33, 7036, 4672, 2191, 67, 5745, 16186, 2738, 972, 12, 365, 16, 4529, 33, 27400, 18, 10005, 13, 1634, 67, 9446, 429, 16186...
self.assertEqual(fdata.encode(), open(writtenfile, "rb").read())
with open(writtenfile, "rb") as f: self.assertEqual(fdata.encode(), f.read())
def test_extract(self): with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp: for fpath, fdata in SMALL_TEST_DATA: zipfp.writestr(fpath, fdata)
df64e4ebf884a9041c9514c1c88905dd4793c799 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/df64e4ebf884a9041c9514c1c88905dd4793c799/test_zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8004, 12, 2890, 4672, 598, 18823, 18, 29394, 12, 16961, 19793, 22, 16, 315, 91, 3113, 18823, 18, 13951, 67, 31487, 5879, 13, 487, 3144, 7944, 30, 364, 13543, 16, 284, 892, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8004, 12, 2890, 4672, 598, 18823, 18, 29394, 12, 16961, 19793, 22, 16, 315, 91, 3113, 18823, 18, 13951, 67, 31487, 5879, 13, 487, 3144, 7944, 30, 364, 13543, 16, 284, 892, 31...
'')), (None, <function provideInterface>, ('', <InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>)), (None, <function provideInterface>, ('', <InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.IX>)), (None, <function provideInterface>, ('', <InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>)))
''), {}), (None, <function provideInterface>, ('', <InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>), {}), (None, <function provideInterface>, ('', <InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.IX>), {}), (None, <function provideInterface>, ('', <InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>), {}))
def test_w_for_factory(): """ >>> context = Context() >>> addMenuItem(context, for_=IX, factory="x.y.z", title="Add an X", ... permission="zope.ManageContent", description="blah blah", ... filter="context/foo") >>> context ((None, <function provideInterface>, ('', <InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.IX>)), (('adapter', (<InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.IX>, <InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>), <InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>, 'Add an X'), <function handler>, ('registerAdapter', <zope.app.publisher.browser.menumeta.MenuItemFactory object>, (<InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.IX>, <InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>), <InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>, 'Add an X', '')), (None, <function provideInterface>, ('', <InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>)), (None, <function provideInterface>, ('', <InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.IX>)), (None, <function provideInterface>, ('', <InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>))) """
a9a3a1a5c0e09bd96df2bc32787c0f82fca1e8b4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9523/a9a3a1a5c0e09bd96df2bc32787c0f82fca1e8b4/test_addMenuItem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 91, 67, 1884, 67, 6848, 13332, 3536, 4080, 819, 273, 1772, 1435, 4080, 527, 12958, 12, 2472, 16, 364, 67, 33, 12507, 16, 3272, 1546, 92, 18, 93, 18, 94, 3113, 2077, 1546, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 91, 67, 1884, 67, 6848, 13332, 3536, 4080, 819, 273, 1772, 1435, 4080, 527, 12958, 12, 2472, 16, 364, 67, 33, 12507, 16, 3272, 1546, 92, 18, 93, 18, 94, 3113, 2077, 1546, 9...
clients.append(ClientLoop(b, ["perftest", "--count", "100", "--port", b.port()])) clients.append(ClientLoop(b, ["qpid-queue-stats", "-a", "localhost:%s" %(b.port())])) endtime = time.time() + self.duration()
start_clients(b) start_mclients(b)
def stop(self): self.lock.acquire() try: self.stopped = True try: self.process.terminate() except: pass finally: self.lock.release() StoppableThread.stop(self)
471f6b95e932010ab57c2f72ffbc859215d82ad5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/198/471f6b95e932010ab57c2f72ffbc859215d82ad5/cluster_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 365, 18, 739, 18, 1077, 1039, 1435, 775, 30, 365, 18, 24228, 273, 1053, 775, 30, 365, 18, 2567, 18, 30017, 1435, 1335, 30, 1342, 3095, 30, 365, 18, 739, 18, 934...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 365, 18, 739, 18, 1077, 1039, 1435, 775, 30, 365, 18, 24228, 273, 1053, 775, 30, 365, 18, 2567, 18, 30017, 1435, 1335, 30, 1342, 3095, 30, 365, 18, 739, 18, 934...
tree = get_param(form, "tree")
def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ)
6df5ccdcda4ca562343909bddd8871a4d7ca7829 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/6df5ccdcda4ca562343909bddd8871a4d7ca7829/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 646, 273, 276, 10052, 18, 974, 3245, 12, 7944, 33, 28684, 3292, 28539, 18, 2630, 17337, 5473, 33, 28684, 13, 2295, 67, 529...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 646, 273, 276, 10052, 18, 974, 3245, 12, 7944, 33, 28684, 3292, 28539, 18, 2630, 17337, 5473, 33, 28684, 13, 2295, 67, 529...
item = UnpackTVItem(buf_item)
item = UnpackTVITEM(buf_item)
def UnpackTVDISPINFO(lparam): format = "iii40s" buf = win32gui.PyMakeBuffer(struct.calcsize(format), lparam) hwndFrom, id, code, buf_item = struct.unpack(format, buf) item = UnpackTVItem(buf_item) return hwndFrom, id, code, item
d8663568c16982b373a9214ab96c701db890d557 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/d8663568c16982b373a9214ab96c701db890d557/win32gui_struct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25411, 15579, 2565, 3118, 5923, 12, 80, 891, 4672, 740, 273, 315, 2835, 77, 7132, 87, 6, 1681, 273, 5657, 1578, 20292, 18, 9413, 6464, 1892, 12, 1697, 18, 12448, 1467, 12, 2139, 3631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25411, 15579, 2565, 3118, 5923, 12, 80, 891, 4672, 740, 273, 315, 2835, 77, 7132, 87, 6, 1681, 273, 5657, 1578, 20292, 18, 9413, 6464, 1892, 12, 1697, 18, 12448, 1467, 12, 2139, 3631, ...
uris = self.client.get_list(defs.WINMAN, defs.LAUNCHERS, awn.CONFIG_LIST_STRING)
uris = self.last_uris[:]
def remove(self, button): selection = self.treeview.get_selection() (model, iter) = selection.get_selected() uri = model.get_value(iter, 2) if os.path.exists(uri): uris = self.client.get_list(defs.WINMAN, defs.LAUNCHERS, awn.CONFIG_LIST_STRING) uris.remove(uri) if uri.startswith(defs.HOME_LAUNCHERS_DIR): os.remove(uri) self.refresh_tree(uris)
fde67393cc0a1f2025885afdc17b1209dff21c81 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8416/fde67393cc0a1f2025885afdc17b1209dff21c81/awnLauncher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 3568, 4672, 4421, 273, 365, 18, 3413, 1945, 18, 588, 67, 10705, 1435, 261, 2284, 16, 1400, 13, 273, 4421, 18, 588, 67, 8109, 1435, 2003, 273, 938, 18, 588, 67, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 3568, 4672, 4421, 273, 365, 18, 3413, 1945, 18, 588, 67, 10705, 1435, 261, 2284, 16, 1400, 13, 273, 4421, 18, 588, 67, 8109, 1435, 2003, 273, 938, 18, 588, 67, 11...
for line in lines: if not line.startswith('--- '): continue words = line.split(None, 2) filename, fromrev = words[1], 'old' groups, blocks = None, None
try:
def htmlify(match): div, mod = divmod(len(match.group(0)), 2) return div * '&nbsp; ' + mod * '&nbsp;'
1da914240b7dd02e7a4e49314577f2adecb40058 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/1da914240b7dd02e7a4e49314577f2adecb40058/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, ...
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff, longname=LONGMODNAME)
def parseArgumentList(self, args): args0, arg1, argsrest = args[:1], args[1], args[2:] t0, n0, m0 = arg1 args = args0 + argsrest if m0 != InMode: raise ValueError, "method's 'self' must be 'InMode'" self.itself = Variable(t0, "_self->ob_itself", SelfMode) FunctionGenerator.parseArgumentList(self, args) self.argumentList.insert(2, self.itself)
0d3945c1b6ce8c3d7027bc8f9a84299861cf9b01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0d3945c1b6ce8c3d7027bc8f9a84299861cf9b01/filesupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1379, 682, 12, 2890, 16, 833, 4672, 833, 20, 16, 1501, 21, 16, 833, 8792, 273, 833, 10531, 21, 6487, 833, 63, 21, 6487, 833, 63, 22, 26894, 268, 20, 16, 290, 20, 16, 312, 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, 1109, 1379, 682, 12, 2890, 16, 833, 4672, 833, 20, 16, 1501, 21, 16, 833, 8792, 273, 833, 10531, 21, 6487, 833, 63, 21, 6487, 833, 63, 22, 26894, 268, 20, 16, 290, 20, 16, 312, 20,...
ET.SubElement(root, 'upnp:album').text = self.album
ET.SubElement(root, qname('album',UPNP_NS)).text = self.album
def toElement(self,**kwargs):
e9c4345533fd24eede4febe6e6cd4c5c3b16e15c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11626/e9c4345533fd24eede4febe6e6cd4c5c3b16e15c/DIDLLite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 1046, 12, 2890, 16, 636, 4333, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 1046, 12, 2890, 16, 636, 4333, 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,...
env1.eval("spy=function(){return spy;}")
env1.eval("spy=function(){return spy;}")
def _testSecurityChecks(self): with JSContext() as env1: env1.securityToken = "foo" # Create a function in env1. env1.eval("spy=function(){return spy;}")
550f86f8e1997ee990877076421feaf1936da8eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5451/550f86f8e1997ee990877076421feaf1936da8eb/PyV8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 4368, 4081, 12, 2890, 4672, 598, 6756, 1042, 1435, 487, 1550, 21, 30, 1550, 21, 18, 7462, 1345, 273, 315, 11351, 6, 225, 468, 1788, 279, 445, 316, 1550, 21, 18, 1550, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 4368, 4081, 12, 2890, 4672, 598, 6756, 1042, 1435, 487, 1550, 21, 30, 1550, 21, 18, 7462, 1345, 273, 315, 11351, 6, 225, 468, 1788, 279, 445, 316, 1550, 21, 18, 1550, 21, ...
self._node_link_func(start_node, end_node)
self._node_link_func(self._node_link_source_node, node)
def _start_pos(): return widget.rect().center
9ec353080379e33e6ff3e4de6b6753ac7e750aed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5406/9ec353080379e33e6ff3e4de6b6753ac7e750aed/GraphWidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1937, 67, 917, 13332, 327, 3604, 18, 2607, 7675, 5693, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1937, 67, 917, 13332, 327, 3604, 18, 2607, 7675, 5693, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.assertIs(self.client.sock.context, ctx)
self.assertIs(sock.context, ctx)
def test_context(self): self.client.quit() ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1) self.assertRaises(ValueError, ftplib.FTP_TLS, keyfile=CERTFILE, context=ctx) self.assertRaises(ValueError, ftplib.FTP_TLS, certfile=CERTFILE, context=ctx) self.assertRaises(ValueError, ftplib.FTP_TLS, certfile=CERTFILE, keyfile=CERTFILE, context=ctx)
c319c3018bce0664b4786deaea1c338bb7984a72 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/c319c3018bce0664b4786deaea1c338bb7984a72/test_ftplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2472, 12, 2890, 4672, 365, 18, 2625, 18, 27176, 1435, 1103, 273, 5832, 18, 6745, 1042, 12, 8157, 18, 16850, 67, 9905, 90, 21, 13, 365, 18, 11231, 12649, 6141, 12, 23610, 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, 1842, 67, 2472, 12, 2890, 4672, 365, 18, 2625, 18, 27176, 1435, 1103, 273, 5832, 18, 6745, 1042, 12, 8157, 18, 16850, 67, 9905, 90, 21, 13, 365, 18, 11231, 12649, 6141, 12, 23610, 16, ...
assert len(rpmdeps) == len(rpmvers)
if len(rpmdeps) != len(rpmvers): rpmvers = itertools.repeat(None, len(rpmdeps))
def _getDepsetFromHeader(self, tags): if isinstance(tags, tuple): assert len(tags) == 2 rpmdeps = self.get(tags[0], []) rpmvers = self.get(tags[1], []) assert len(rpmdeps) == len(rpmvers) else: rpmdeps = self.get(tags, []) rpmvers = itertools.repeat(None, len(rpmdeps))
020ee30503785b8a7b7e6d6e42d6025fb8726be9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8747/020ee30503785b8a7b7e6d6e42d6025fb8726be9/rpmhelper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 16316, 542, 1265, 1864, 12, 2890, 16, 2342, 4672, 309, 1549, 12, 4156, 16, 3193, 4672, 1815, 562, 12, 4156, 13, 422, 576, 25228, 14877, 273, 365, 18, 588, 12, 4156, 63, 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, 389, 588, 16316, 542, 1265, 1864, 12, 2890, 16, 2342, 4672, 309, 1549, 12, 4156, 16, 3193, 4672, 1815, 562, 12, 4156, 13, 422, 576, 25228, 14877, 273, 365, 18, 588, 12, 4156, 63, 20, ...
curs.execute(query, (one_day, ed))
if host: curs.execute(query, (one_day, ed, host)) elif user: curs.execute(query, (one_day, ed, user)) else: curs.execute(query, (one_day, ed))
def get_key_statistics(self, end_date, report_days, host=None, user=None, email=None): if email: return None
23256af1e8e77c746a31d94ef7f2cab0675707b6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/87/23256af1e8e77c746a31d94ef7f2cab0675707b6/untangle_base_webfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 856, 67, 14438, 12, 2890, 16, 679, 67, 712, 16, 2605, 67, 9810, 16, 1479, 33, 7036, 16, 729, 33, 7036, 16, 2699, 33, 7036, 4672, 309, 2699, 30, 327, 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, 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, 336, 67, 856, 67, 14438, 12, 2890, 16, 679, 67, 712, 16, 2605, 67, 9810, 16, 1479, 33, 7036, 16, 729, 33, 7036, 16, 2699, 33, 7036, 4672, 309, 2699, 30, 327, 599, 2, -100, -100, -1...
try: self.assertTrue(csv.get_dialect(name).delimiter, '\t') got_dialects = csv.list_dialects() got_dialects.sort() self.assertEqual(expected_dialects, got_dialects) finally: csv.unregister_dialect(name)
self.addCleanup(csv.unregister_dialect, name) self.assertEqual(csv.get_dialect(name).delimiter, '\t') got_dialects = sorted(csv.list_dialects()) self.assertEqual(expected_dialects, got_dialects)
def test_registry(self): class myexceltsv(csv.excel): delimiter = "\t" name = "myexceltsv" expected_dialects = csv.list_dialects() + [name] expected_dialects.sort() csv.register_dialect(name, myexceltsv) try: self.assertTrue(csv.get_dialect(name).delimiter, '\t') got_dialects = csv.list_dialects() got_dialects.sort() self.assertEqual(expected_dialects, got_dialects) finally: csv.unregister_dialect(name)
e5b892f80f6f75773644e0c6f233e77cdb777c1c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/e5b892f80f6f75773644e0c6f233e77cdb777c1c/test_csv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9893, 12, 2890, 4672, 667, 3399, 24121, 25338, 12, 6715, 18, 24121, 4672, 5654, 273, 1548, 88, 6, 508, 273, 315, 4811, 24121, 25338, 6, 2665, 67, 25909, 386, 87, 273, 6101, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9893, 12, 2890, 4672, 667, 3399, 24121, 25338, 12, 6715, 18, 24121, 4672, 5654, 273, 1548, 88, 6, 508, 273, 315, 4811, 24121, 25338, 6, 2665, 67, 25909, 386, 87, 273, 6101, 1...
data = DAV_NotFound
pass
def get_data(self, cursor, user, uri, context=None, cache=None): from DAV.errors import DAV_NotFound attachment_obj = self.pool.get('ir.attachment') report_obj = self.pool.get('ir.action.report')
993ff2d321de105954db9e2ba9648c6707becb87 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/993ff2d321de105954db9e2ba9648c6707becb87/webdav.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 892, 12, 2890, 16, 3347, 16, 729, 16, 2003, 16, 819, 33, 7036, 16, 1247, 33, 7036, 4672, 628, 463, 5856, 18, 4324, 1930, 463, 5856, 67, 2768, 6042, 67, 2603, 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, 336, 67, 892, 12, 2890, 16, 3347, 16, 729, 16, 2003, 16, 819, 33, 7036, 16, 1247, 33, 7036, 4672, 628, 463, 5856, 18, 4324, 1930, 463, 5856, 67, 2768, 6042, 67, 2603, 273, 365, 18, ...
sys.stdout.write("Connection closed.\r\n")
sys.stdout.write("Connection closed.\r")
def xmpp_message(self, con, event): type = event.getType() fromjid = event.getFrom().getStripped() if type in ['message', 'chat', None] and fromjid == self.remotejid: if event.getBody() == '!EX': sys.stdout.write("Connection closed.\r\n") sys.exit(0) if not self.hasresponded: sys.stdout.write("Sysop has responded.\r\n") self.hasresponded = True sys.stdout.write(event.getBody() + '\r\n')
dc14f2283f43a8418f2c4f7f0bd9fa7e12949100 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14053/dc14f2283f43a8418f2c4f7f0bd9fa7e12949100/ax25xmpp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 24109, 67, 2150, 12, 2890, 16, 356, 16, 871, 4672, 618, 273, 871, 18, 588, 559, 1435, 628, 18252, 273, 871, 18, 588, 1265, 7675, 588, 16632, 1845, 1435, 309, 618, 316, 10228, 2150...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 24109, 67, 2150, 12, 2890, 16, 356, 16, 871, 4672, 618, 273, 871, 18, 588, 559, 1435, 628, 18252, 273, 871, 18, 588, 1265, 7675, 588, 16632, 1845, 1435, 309, 618, 316, 10228, 2150...
Y = numpy.zeros(N).astype('i')
Y = numpy.zeros(N, 'i')
def raw_reduce(x, buffer, op, source, vanilla=0): pypar.reduce(x, op, source, buffer=buffer, vanilla=0)
e32b193ad1bee5688c8c7ac138abfcba2d3b57c2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9158/e32b193ad1bee5688c8c7ac138abfcba2d3b57c2/test_pypar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1831, 67, 12498, 12, 92, 16, 1613, 16, 1061, 16, 1084, 16, 331, 26476, 33, 20, 4672, 18951, 297, 18, 12498, 12, 92, 16, 1061, 16, 1084, 16, 1613, 33, 4106, 16, 331, 26476, 33, 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, 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, 1831, 67, 12498, 12, 92, 16, 1613, 16, 1061, 16, 1084, 16, 331, 26476, 33, 20, 4672, 18951, 297, 18, 12498, 12, 92, 16, 1061, 16, 1084, 16, 1613, 33, 4106, 16, 331, 26476, 33, 20, ...
raise SMTPRecipientsRefused(string.join( map(lambda x:"%s: %s" % (x[0], x[1][1]), senderrs.items()), '; ')) code=self.data(msg) if code <>250 :
raise SMTPRecipientsRefused(senderrs) (code,resp)=self.data(msg) if code <> 250:
def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """This command performs an entire mail transaction.
53ecf9d0a34d0a10b05db7f05f9837e5aa9ed6d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/53ecf9d0a34d0a10b05db7f05f9837e5aa9ed6d9/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 12, 2890, 16, 628, 67, 4793, 16, 358, 67, 23305, 16, 1234, 16, 4791, 67, 2116, 22850, 6487, 4519, 337, 67, 2116, 33, 8526, 4672, 3536, 2503, 1296, 11199, 392, 7278, 4791, 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, 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, 1366, 4408, 12, 2890, 16, 628, 67, 4793, 16, 358, 67, 23305, 16, 1234, 16, 4791, 67, 2116, 22850, 6487, 4519, 337, 67, 2116, 33, 8526, 4672, 3536, 2503, 1296, 11199, 392, 7278, 4791, 2...
sage: B.det() 5 sage: B.trace() 123 sage: EllipticCurve([-1, 1/4]).ap(5) -2
sage: B.det() 5 sage: B.trace() 123 sage: EllipticCurve([-1, 1/4]).ap(5) -2
def matrix_of_frobenius(Q, p, M, trace=None, compute_exact_forms=False): """ Computes the matrix of Frobenius on Monsky-Washnitzer cohomology, with respect to the basis $(dx/y, x dx/y)$. INPUT: Q -- cubic polynomial $Q(x) = x^3 + ax + b$ defining an elliptic curve E by $y^2 = Q(x)$. The coefficient ring of Q should be a $\Z/(p^M)\Z$-algebra in which the matrix of frobenius will be constructed. p -- prime >= 5 for which E has good reduction M -- integer >= 2; $p$-adic precision of the coefficient ring trace -- (optional) the trace of the matrix, if known in advance. This is easy to compute because it's just the $a_p$ of the curve. If the trace is supplied, matrix_of_frobenius will use it to speed the computation (i.e. we know the determinant is $p$, so we have two conditions, so really only column of the matrix needs to be computed. It's actually a little more complicated than that, but that's the basic idea.) If trace=None, then both columns will be computed independently, and you can get a strong indication of correctness by verifying the trace afterwards. WARNING: -- THE RESULT WILL NOT NECESSARILY BE CORRECT TO M p-ADIC DIGITS. If you want prec digits of precision, you need to use the function adjusted_prec(), and then you need to reduce the answer mod p^prec at the end. OUTPUT: 2x2 matrix of frobenius on Monsky-Washnitzer cohomology, with entries in the coefficient ring of Q. EXAMPLES: A simple example: sage: p = 5 sage: prec = 3 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: M 5 sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), p, M) sage: A [3090 187] [2945 408] But the result is only accurate to prec digits: sage: B = A.change_ring(Integers(p**prec)) sage: B [90 62] [70 33] Check trace (123 = -2 mod 125) and determinant: sage: B.det() 5 sage: B.trace() 123 sage: EllipticCurve([-1, 1/4]).ap(5) -2 Try using the trace to speed up the calculation: sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), ... p, M, -2) sage: A [2715 187] [1445 408] Hmmm... it looks different, but that's because the trace of our first answer was only -2 modulo $5^3$, not -2 modulo $5^5$. So the right answer is: sage: A.change_ring(Integers(p**prec)) [90 62] [70 33] Check it works with only one digit of precision: sage: p = 5 sage: prec = 1 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), p, M) sage: A.change_ring(Integers(p)) [0 2] [0 3] Here's an example that's particularly badly conditioned for using the trace trick: sage: p = 11 sage: prec = 3 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 + 7*x + 8, p, M) sage: A.change_ring(Integers(p**prec)) [1144 176] [ 847 185] The problem here is that the top-right entry is divisible by 11, and the bottom-left entry is divisible by $11^2$. So when you apply the trace trick, neither $F(dx/y)$ nor $F(x dx/y)$ is enough to compute the whole matrix to the desired precision, even if you try increasing the target precision by one. Nevertheless, \code{matrix_of_frobenius} knows how to get the right answer by evaluating $F((x+1) dx/y)$ instead: sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 + 7*x + 8, p, M, -2) sage: A.change_ring(Integers(p**prec)) [1144 176] [ 847 185] The running time is about \code{O(p * prec**2)} (times some logarithmic factors), so it's feasible to run on fairly large primes, or precision (or both?!?!): sage: p = 10007 sage: prec = 2 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius( # long time ... x^3 - x + R(1/4), p, M) # long time sage: B = A.change_ring(Integers(p**prec)); B # long time [74311982 57996908] [95877067 25828133] sage: B.det() # long time 10007 sage: B.trace() # long time 66 sage: EllipticCurve([-1, 1/4]).ap(10007) # long time 66 sage: p = 5 sage: prec = 300 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius( # long time ... x^3 - x + R(1/4), p, M) # long time sage: B = A.change_ring(Integers(p**prec)) # long time sage: B.det() # long time 5 sage: -B.trace() # long time 2 sage: EllipticCurve([-1, 1/4]).ap(5) # long time -2 Let's check consistency of the results for a range of precisions: sage: p = 5 sage: max_prec = 60 sage: M = monsky_washnitzer.adjusted_prec(p, max_prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), p, M) # long time sage: A = A.change_ring(Integers(p**max_prec)) # long time sage: result = [] # long time sage: for prec in range(1, max_prec): # long time ... M = monsky_washnitzer.adjusted_prec(p, prec) # long time ... R.<x> = PolynomialRing(Integers(p^M),'x') # long time ... B = monsky_washnitzer.matrix_of_frobenius( # long time ... x^3 - x + R(1/4), p, M) # long time ... B = B.change_ring(Integers(p**prec)) # long time ... result.append(B == A.change_ring( # long time ... Integers(p**prec))) # long time sage: result == [True] * (max_prec - 1) # long time True The remaining examples discuss what happens when you take the coefficient ring to be a power series ring; i.e. in effect you're looking at a family of curves. The code does in fact work... sage: p = 11 sage: prec = 3 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: S.<t> = PowerSeriesRing(Integers(p**M), default_prec=4) sage: a = 7 + t + 3*t^2 sage: b = 8 - 6*t + 17*t^2 sage: R.<x> = PolynomialRing(S) sage: Q = x**3 + a*x + b sage: A = monsky_washnitzer.matrix_of_frobenius(Q, p, M) # long time sage: B = A.change_ring(PowerSeriesRing(Integers(p**prec), 't', default_prec=4)) # long time sage: B # long time [1144 + 264*t + 841*t^2 + 1025*t^3 + O(t^4) 176 + 1052*t + 216*t^2 + 523*t^3 + O(t^4)] [ 847 + 668*t + 81*t^2 + 424*t^3 + O(t^4) 185 + 341*t + 171*t^2 + 642*t^3 + O(t^4)] The trace trick should work for power series rings too, even in the badly- conditioned case. Unfortunately I don't know how to compute the trace in advance, so I'm not sure exactly how this would help. Also, I suspect the running time will be dominated by the expansion, so the trace trick won't really speed things up anyway. Another problem is that the determinant is not always p: sage: B.det() # long time 11 + 484*t^2 + 451*t^3 + O(t^4) However, it appears that the determinant always has the property that if you substitute t -> 11t, you do get the constant series p (mod p**prec). Similarly for the trace. And since the parameter only really makes sense when it's divisible by p anyway, perhaps this isn't a problem after all. """ M = int(M) if M < 2: raise ValueError, "M (=%s) must be at least 2" % M base_ring = Q.base_ring() # Expand out frobenius of dx/y and x dx/y. # (You can substitute frobenius_expansion_by_series here, that will work # as well. See its docstring for some performance notes.) F0, F1, offset = frobenius_expansion_by_newton(Q, p, M) #F0, F1, offset = frobenius_expansion_by_series(Q, p, M) if compute_exact_forms: # we need to do all the work to get the exact expressions f such that F(x^i dx/y) = df + \sum a_i x^i dx/y F0_coeffs = transpose_list(F0.coeffs()) F0_reduced, f_0 = reduce_all(Q, p, F0_coeffs, offset, True) F1_coeffs = transpose_list(F1.coeffs()) F1_reduced, f_1 = reduce_all(Q, p, F1_coeffs, offset, True) elif M == 2: # This implies that only one digit of precision is valid, so we only need # to reduce the second column. Also, the trace doesn't help at all. F0_reduced = [ base_ring(0), base_ring(0) ] F1_coeffs = transpose_list(F1.coeffs()) F1_reduced = reduce_all(Q, p, F1_coeffs, offset) elif trace is None: # No trace provided, just reduce F(dx/y) and F(x dx/y) separately. F0_coeffs = transpose_list(F0.coeffs()) F0_reduced = reduce_all(Q, p, F0_coeffs, offset) F1_coeffs = transpose_list(F1.coeffs()) F1_reduced = reduce_all(Q, p, F1_coeffs, offset) else: # Trace has been provided. # In most cases this can be used to quickly compute F(dx/y) from # F(x dx/y). However, if we're unlucky, the (dx/y)-component of # F(x dx/y) (i.e. the top-right corner of the matrix) may be divisible # by p, in which case there isn't enough information to get the # (x dx/y)-component of F(dx/y) to the desired precision. When this # happens, it turns out that F((x+1) dx/y) always *does* give enough # information (together with the trace) to get both columns to the # desired precision. # First however we need a quick way of telling whether the top-right # corner is divisible by p, i.e. we want to compute the second column # of the matrix mod p. We could do this by just running the entire # algorithm with M = 2 (which assures precision 1). Luckily, we've # already done most of the work by computing F1 to high precision; so # all we need to do is extract the coefficients that would correspond # to the first term of the series, and run the reduction on them. # todo: actually we only need to do this reduction step mod p^2, not # mod p^M, which is what the code currently does. If the base ring # is Integers(p^M), then it's easy. Otherwise it's tricky to construct # the right ring, I don't know how to do it. F1_coeffs = transpose_list(F1.coeffs()) F1_modp_coeffs = F1_coeffs[int((M-2)*p):] # make a copy, because reduce_all will destroy the coefficients: F1_modp_coeffs = [[cell for cell in row] for row in F1_modp_coeffs] F1_modp_offset = offset - (M-2)*p F1_modp_reduced = reduce_all(Q, p, F1_modp_coeffs, F1_modp_offset) if F1_modp_reduced[0].is_unit(): # If the first entry is invertible mod p, then F(x dx/y) is sufficient # to get the whole matrix. F1_reduced = reduce_all(Q, p, F1_coeffs, offset) F0_reduced = [ base_ring(trace) - F1_reduced[1], None ] # using that the determinant is p: F0_reduced[1] = (F0_reduced[0] * F1_reduced[1] - base_ring(p)) \ / F1_reduced[0] else: # If the first entry is zero mod p, then F((x+1) dx/y) will be sufficient # to get the whole matrix. (Here we are using the fact that the second # entry *cannot* be zero mod p. This is guaranteed by some results in # section 3.2 of ``Computation of p-adic Heights and Log Convergence'' # by Mazur, Stein, Tate. But let's quickly check it anyway :-)) assert F1_modp_reduced[1].is_unit(), \ "Hey that's impossible! The second entry in the second column " \ "should be invertible mod p!" G0_coeffs = transpose_list( (F0 + F1).coeffs()) G0_reduced = reduce_all(Q, p, G0_coeffs, offset) # Now G0_reduced expresses F((x+1) dx/y) in terms of dx/y and x dx/y. # Re-express this in terms of (x+1) dx/y and x dx/y. H0_reduced = [ G0_reduced[0], G0_reduced[1] - G0_reduced[0] ] # The thing we're about to divide by better be a unit. assert H0_reduced[1].is_unit(), \ "Hey that's impossible! The second entry in this column " \ "should be invertible mod p!" # Figure out the second column using the trace... H1_reduced = [ None, base_ring(trace) - H0_reduced[0] ] # ... and using that the determinant is p: H1_reduced[0] = (H0_reduced[0] * H1_reduced[1] - base_ring(p)) \ / H0_reduced[1] # Finally, change back to the usual basis (dx/y, x dx/y) F1_reduced = [ H1_reduced[0], \ H1_reduced[0] + H1_reduced[1] ] F0_reduced = [ H0_reduced[0] - F1_reduced[0], H0_reduced[0] + H0_reduced[1] - F1_reduced[1] ] # One more sanity check: our final result should be congruent mod p # to the approximation we used earlier. assert not ( (F1_reduced[0] - F1_modp_reduced[0]).is_unit() or \ (F1_reduced[1] - F1_modp_reduced[1]).is_unit() or \ F0_reduced[0].is_unit() or F0_reduced[1].is_unit()), \ "Hey that's impossible! The output matrix is not congruent mod p " \ "to the approximation found earlier!" if compute_exact_forms: return matrix(base_ring, 2, 2, [F0_reduced[0], F1_reduced[0], F0_reduced[1], F1_reduced[1]]), f_0, f_1 else: return matrix(base_ring, 2, 2, [F0_reduced[0], F1_reduced[0], F0_reduced[1], F1_reduced[1]])
894b878ec3bbe6ef06c36aa7cf3e8cd6f2838986 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/894b878ec3bbe6ef06c36aa7cf3e8cd6f2838986/monsky_washnitzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 67, 792, 67, 74, 303, 19425, 8384, 12, 53, 16, 293, 16, 490, 16, 2606, 33, 7036, 16, 3671, 67, 17165, 67, 9741, 33, 8381, 4672, 3536, 14169, 281, 326, 3148, 434, 478, 303, 1942...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 67, 792, 67, 74, 303, 19425, 8384, 12, 53, 16, 293, 16, 490, 16, 2606, 33, 7036, 16, 3671, 67, 17165, 67, 9741, 33, 8381, 4672, 3536, 14169, 281, 326, 3148, 434, 478, 303, 1942...
clientbit = 1 serverbit = 1 c1 = (clientbit << 1) + serverbit basiccommand = self.command_move
def domove(self, frompos, topos): #(x, y) = frompos (x2, y2) = topos
c79d18b86f21957cf4bae5c10e626824ad3d923e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3479/c79d18b86f21957cf4bae5c10e626824ad3d923e/net_go.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4092, 841, 12, 2890, 16, 628, 917, 16, 358, 917, 4672, 468, 12, 92, 16, 677, 13, 273, 628, 917, 261, 92, 22, 16, 677, 22, 13, 273, 358, 917, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4092, 841, 12, 2890, 16, 628, 917, 16, 358, 917, 4672, 468, 12, 92, 16, 677, 13, 273, 628, 917, 261, 92, 22, 16, 677, 22, 13, 273, 358, 917, 2, -100, -100, -100, -100, -100, -100, ...
debug(" domain %s is not in user allow-list", cookie.domain)
_debug(" domain %s is not in user allow-list", cookie.domain)
def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request_host(request) domain = cookie.domain if self.strict_domain and (domain.count(".") >= 2): # XXX This should probably be compared with the Konqueror # (kcookiejar.cpp) and Mozilla implementations, but it's a # losing battle. i = domain.rfind(".") j = domain.rfind(".", 0, i) if j == 0: # domain like .foo.bar tld = domain[i+1:] sld = domain[j+1:i] if sld.lower() in ("co", "ac", "com", "edu", "org", "net", "gov", "mil", "int", "aero", "biz", "cat", "coop", "info", "jobs", "mobi", "museum", "name", "pro", "travel", "eu") and len(tld) == 2: # domain like .co.uk debug(" country-code second level domain %s", domain) return False if domain.startswith("."): undotted_domain = domain[1:] else: undotted_domain = domain embedded_dots = (undotted_domain.find(".") >= 0) if not embedded_dots and domain != ".local": debug(" non-local domain %s contains no embedded dot", domain) return False if cookie.version == 0: if (not erhn.endswith(domain) and (not erhn.startswith(".") and not ("."+erhn).endswith(domain))): debug(" effective request-host %s (even with added " "initial dot) does not end end with %s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainRFC2965Match)): if not domain_match(erhn, domain): debug(" effective request-host %s does not domain-match " "%s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainStrictNoDots)): host_prefix = req_host[:-len(domain)] if (host_prefix.find(".") >= 0 and not IPV4_RE.search(req_host)): debug(" host prefix %s for domain %s contains a dot", host_prefix, domain) return False return True
15f04d8bbaf4e2b7d0d25228ce9bc84f1e501e81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/15f04d8bbaf4e2b7d0d25228ce9bc84f1e501e81/cookielib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 601, 67, 4308, 12, 2890, 16, 3878, 16, 590, 4672, 309, 365, 18, 291, 67, 23156, 12, 8417, 18, 4308, 4672, 1198, 2932, 282, 2461, 738, 87, 353, 316, 729, 1203, 17, 1098, 3113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 601, 67, 4308, 12, 2890, 16, 3878, 16, 590, 4672, 309, 365, 18, 291, 67, 23156, 12, 8417, 18, 4308, 4672, 1198, 2932, 282, 2461, 738, 87, 353, 316, 729, 1203, 17, 1098, 3113...
filter = self.distance_array()[R + max] < self.couplingradius
filter = self.distance_array()[R + max] < self.couplingradius
def get_hamiltonian_kpoint(self, kpt_c, calc): """Get Hamiltonian at some new arbitrary k-vector
21695c1ef91b5e7baceceb881c3e64b616c594fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5572/21695c1ef91b5e7baceceb881c3e64b616c594fb/wannier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 76, 11580, 1917, 2779, 67, 79, 1153, 12, 2890, 16, 417, 337, 67, 71, 16, 7029, 4672, 3536, 967, 670, 11580, 1917, 2779, 622, 2690, 394, 11078, 417, 17, 7737, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 76, 11580, 1917, 2779, 67, 79, 1153, 12, 2890, 16, 417, 337, 67, 71, 16, 7029, 4672, 3536, 967, 670, 11580, 1917, 2779, 622, 2690, 394, 11078, 417, 17, 7737, 2, -100, -100, ...
except connection.RestlibException, e: log.error(failed_msg % e.msg) errorWindow(constants.REGISTER_ERROR % linkify(e.msg)) self.close_window() return False
def register(self, testing=None): self.uname = registration_xml.get_widget("account_login") self.passwd = registration_xml.get_widget("account_password") self.consumer_name = registration_xml.get_widget("consumer_name")
af52eb1799948d327d20a1871e4beb16c2b3230d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/af52eb1799948d327d20a1871e4beb16c2b3230d/managergui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 12, 2890, 16, 7769, 33, 7036, 4672, 365, 18, 318, 339, 273, 7914, 67, 2902, 18, 588, 67, 6587, 2932, 4631, 67, 5819, 7923, 365, 18, 24002, 273, 7914, 67, 2902, 18, 588, 67, 658...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 12, 2890, 16, 7769, 33, 7036, 4672, 365, 18, 318, 339, 273, 7914, 67, 2902, 18, 588, 67, 6587, 2932, 4631, 67, 5819, 7923, 365, 18, 24002, 273, 7914, 67, 2902, 18, 588, 67, 658...