rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
self.check_for_cover_art() if hasattr(self, 'cover'): _,ext = os.path.splitext(self.cover) """ add the cover image extension to help clients not reacting on the mimetype """ self.item.albumArtURI = ''.join((urlbase,str(self.id),'?cover',ext))
if(isinstance(self.location,FilePath) and self.location.isdir() == True): self.check_for_cover_art() if hasattr(self, 'cover'): _,ext = os.path.splitext(self.cover) """ add the cover image extension to help clients not reacting on the mimetype """ self.item.albumArtURI = ''.join((urlbase,str(self.id),'?cover',ext))
def __init__(self, object_id, parent, path, mimetype, urlbase, UPnPClass,update=False): self.id = object_id self.parent = parent if parent: parent.add_child(self,update=update) if mimetype == 'root': self.location = unicode(path) else: if mimetype == 'item' and path is None: path = os.path.join(parent.get_path(),str(self.id)) self.location = FilePath(unicode(path)) self.mimetype = mimetype if urlbase[-1] != '/': urlbase += '/' self.url = urlbase + str(self.id)
12fa33f90b83b21da40da56c61f5600f99241fda /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11626/12fa33f90b83b21da40da56c61f5600f99241fda/fs_storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 733, 67, 350, 16, 982, 16, 589, 16, 12595, 16, 880, 1969, 16, 7376, 82, 52, 797, 16, 2725, 33, 8381, 4672, 365, 18, 350, 273, 733, 67, 350, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 733, 67, 350, 16, 982, 16, 589, 16, 12595, 16, 880, 1969, 16, 7376, 82, 52, 797, 16, 2725, 33, 8381, 4672, 365, 18, 350, 273, 733, 67, 350, 365, 18, ...
def plotStreams(self, groupAddrs):
def plotStreams(self, groupAddrs, genImage=""):
def plotStreams(self, groupAddrs):
ed330f6b89df5e36da27e444855e0b166dc9eda1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10061/ed330f6b89df5e36da27e444855e0b166dc9eda1/knxmonitor_decoder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 10301, 12, 2890, 16, 1041, 13811, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3207, 10301, 12, 2890, 16, 1041, 13811, 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, -...
if not line: self.cmd_missing_arg() return
def ftp_MKD(self, line): if not line: self.cmd_missing_arg() return
42cfb92815cfe91b8e9573da1b07cf8dce19a9ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/42cfb92815cfe91b8e9573da1b07cf8dce19a9ff/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 49, 47, 40, 12, 2890, 16, 980, 4672, 309, 486, 980, 30, 365, 18, 4172, 67, 7337, 67, 3175, 1435, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 49, 47, 40, 12, 2890, 16, 980, 4672, 309, 486, 980, 30, 365, 18, 4172, 67, 7337, 67, 3175, 1435, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
grabber = grab.Grabber(21235)
grabber = grab.Grabber(137717)
def test005_extract_info_no_advisor(self): # Test the extractNodeInformation() method for a record with no advisor. grabber = grab.Grabber(21235) [name, institution, year, advisors, descendents] = grabber.extractNodeInformation() self.assertEquals(name, u"Otto Mencke") self.assertEquals(institution, u"Universit\xe4t Leipzig") self.assertEquals(year, 1665) self.assertEquals(advisors, []) self.assertEquals(descendents, [77909, 72669])
aa1f8658c17088671196ef8e1f53aa9dafdabf3c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12348/aa1f8658c17088671196ef8e1f53aa9dafdabf3c/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 28564, 67, 8004, 67, 1376, 67, 2135, 67, 361, 10227, 12, 2890, 4672, 468, 7766, 326, 2608, 907, 5369, 1435, 707, 364, 279, 1409, 598, 1158, 1261, 10227, 18, 11086, 744, 273, 11086,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 28564, 67, 8004, 67, 1376, 67, 2135, 67, 361, 10227, 12, 2890, 4672, 468, 7766, 326, 2608, 907, 5369, 1435, 707, 364, 279, 1409, 598, 1158, 1261, 10227, 18, 11086, 744, 273, 11086,...
for line in pipe: words = line.lower().split() for i in range(len(words)): if words[i] in hw_identifiers: return int(words[get_index(i)].replace(':', ''), 16)
def _find_mac(command, args, hw_identifiers, get_index): import os for dir in ['', '/sbin/', '/usr/sbin']: executable = os.path.join(dir, command) if not os.path.exists(executable): continue try: # LC_ALL to get English output, 2>/dev/null to # prevent output on stderr cmd = 'LC_ALL=C %s %s 2>/dev/null' % (executable, args) pipe = os.popen(cmd) except IOError: continue for line in pipe: words = line.lower().split() for i in range(len(words)): if words[i] in hw_identifiers: return int(words[get_index(i)].replace(':', ''), 16) return None
932acb9a8a57a559c2376c8e4322f96ee3dd9c86 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/932acb9a8a57a559c2376c8e4322f96ee3dd9c86/uuid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 67, 5821, 12, 3076, 16, 833, 16, 16139, 67, 20218, 16, 336, 67, 1615, 4672, 1930, 1140, 364, 1577, 316, 10228, 2187, 1173, 87, 4757, 19, 2187, 1173, 13640, 19, 87, 4757, 354...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4720, 67, 5821, 12, 3076, 16, 833, 16, 16139, 67, 20218, 16, 336, 67, 1615, 4672, 1930, 1140, 364, 1577, 316, 10228, 2187, 1173, 87, 4757, 19, 2187, 1173, 13640, 19, 87, 4757, 354...
def destination(self, type, name, arglist): classname = "Function" listname = "functions" if arglist: t, n, m = arglist[0] if t in OBJECTS and m == "InMode": classname = "Method" listname = t + "_methods" return classname, listname
from macsupport import *
def destination(self, type, name, arglist): classname = "Function" listname = "functions" if arglist: t, n, m = arglist[0] if t in OBJECTS and m == "InMode": classname = "Method" listname = t + "_methods" return classname, listname
a437765b6255e504728628d6d955e1e4759ec266 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a437765b6255e504728628d6d955e1e4759ec266/mltesupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2929, 12, 2890, 16, 618, 16, 508, 16, 31805, 4672, 7479, 273, 315, 2083, 6, 666, 529, 273, 315, 10722, 6, 309, 31805, 30, 268, 16, 290, 16, 312, 273, 31805, 63, 20, 65, 309, 268, 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, 2929, 12, 2890, 16, 618, 16, 508, 16, 31805, 4672, 7479, 273, 315, 2083, 6, 666, 529, 273, 315, 10722, 6, 309, 31805, 30, 268, 16, 290, 16, 312, 273, 31805, 63, 20, 65, 309, 268, 3...
index = item.CLASSRESTRICTIONS.index(a0.text())
index = item.CLASSRESTRICTIONS.index(str(a0.text()))
def classRestrictionsChanged(self,a0=None): item = self.itemattrlist[self.currentTabLabel] if self.nocalc: return if a0.text() == "All": if a0.checkState() == Qt.Checked: for row in range(1, self.ClassRestrictionTable.count()): self.ClassRestrictionTable.item(row).setCheckState(Qt.Unchecked) item.CLASSRESTRICTIONS = ['All'] elif 'All' in item.CLASSRESTRICTIONS: index = item.CLASSRESTRICTIONS.index('All') del item.CLASSRESTRICTIONS[index] else: return elif a0.checkState() == Qt.Checked: if self.ClassRestrictionTable.item(0).checkState() == Qt.Checked: self.ClassRestrictionTable.item(0).setCheckState(Qt.Unchecked) if 'All' in item.CLASSRESTRICTIONS: index = item.CLASSRESTRICTIONS.index('All') del item.CLASSRESTRICTIONS[index] i = 0 while i < len(item.CLASSRESTRICTIONS): if a0.text() == item.CLASSRESTRICTIONS[i]: return if a0.text() > item.CLASSRESTRICTIONS[i]: break i = i + 1 item.CLASSRESTRICTIONS.insert(i, a0.text()) elif a0.text() in item.CLASSRESTRICTIONS: index = item.CLASSRESTRICTIONS.index(a0.text()) del item.CLASSRESTRICTIONS[index] else: return self.modified = True
5002fd7e0de794b3a10ffc6e247dd48648f759be /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6671/5002fd7e0de794b3a10ffc6e247dd48648f759be/ScWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 667, 26175, 5033, 12, 2890, 16, 69, 20, 33, 7036, 4672, 761, 273, 365, 18, 1726, 1747, 1098, 63, 2890, 18, 2972, 5661, 2224, 65, 309, 365, 18, 82, 23735, 71, 30, 327, 309, 279, 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, 667, 26175, 5033, 12, 2890, 16, 69, 20, 33, 7036, 4672, 761, 273, 365, 18, 1726, 1747, 1098, 63, 2890, 18, 2972, 5661, 2224, 65, 309, 365, 18, 82, 23735, 71, 30, 327, 309, 279, 20, ...
indent_re = re.compile("^\s*", re.UNICODE)
indent_re = re.compile(ur"^\s*", re.UNICODE)
def format(self, formatter): """ For each line, scan through looking for magic strings, outputting verbatim any intervening text. """ self.formatter = formatter self.hilite_re = self.formatter.page.hilite_re
039aeb312538534f771646f4e3375daac0d9b948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/039aeb312538534f771646f4e3375daac0d9b948/text_moin_wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 2890, 16, 4453, 4672, 3536, 2457, 1517, 980, 16, 4135, 3059, 7849, 364, 8146, 2064, 16, 876, 1787, 29526, 1281, 1554, 3995, 310, 977, 18, 3536, 365, 18, 12354, 273, 4453, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 2890, 16, 4453, 4672, 3536, 2457, 1517, 980, 16, 4135, 3059, 7849, 364, 8146, 2064, 16, 876, 1787, 29526, 1281, 1554, 3995, 310, 977, 18, 3536, 365, 18, 12354, 273, 4453, 365, ...
sgui.setWindowState(sgui.windowState() | Qt.WindowMaximized)
def aboutQt(self): QMessageBox.aboutQt(self)
6089727d25b87a865d9ffa5623cfc109f94d53cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11141/6089727d25b87a865d9ffa5623cfc109f94d53cb/smewg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2973, 23310, 12, 2890, 4672, 30728, 18, 21071, 23310, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2973, 23310, 12, 2890, 4672, 30728, 18, 21071, 23310, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
wikipedia.setAction(msg_remove[wikipedia.chooselang(wikipedia.mylang,msg_remove)] % old_title)
wikipedia.setAction(msg_remove[wikipedia.chooselang(wikipedia.mylang,msg_remove)] % old_cat_title)
def remove_category(): old_title = wikipedia.input('Please enter the name of the category that should be removed: ') old_cat = catlib.CatLink(old_title) # get edit summary message wikipedia.setAction(msg_remove[wikipedia.chooselang(wikipedia.mylang,msg_remove)] % old_title) articles = old_cat.articles(recurse = 0) if len(articles) == 0: print 'There are no articles in category ' + old_title else: for article in articles: change_category(article, old_cat, None) subcategories = old_cat.subcategories(recurse = 0) if len(subcategories) == 0: print 'There are no subcategories in category ' + old_title else: for subcategory in subcategories: change_category(subcategory, old_cat, None)
8fe4e1817561eb473c4b424b96ecd3c166227672 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/8fe4e1817561eb473c4b424b96ecd3c166227672/category.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 4743, 13332, 1592, 67, 2649, 273, 21137, 18, 2630, 2668, 8496, 6103, 326, 508, 434, 326, 3150, 716, 1410, 506, 3723, 30, 8624, 1592, 67, 2574, 273, 6573, 2941, 18, 11554, 2098,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4743, 13332, 1592, 67, 2649, 273, 21137, 18, 2630, 2668, 8496, 6103, 326, 508, 434, 326, 3150, 716, 1410, 506, 3723, 30, 8624, 1592, 67, 2574, 273, 6573, 2941, 18, 11554, 2098,...
print review_request.diffset_history.diffset_set.count()
def new_diff(request, review_request_id): review_request = get_object_or_404(ReviewRequest, pk=review_request_id) if review_request.submitter != request.user: return JsonResponseError(request, PERMISSION_DENIED) form_data = request.POST.copy() form = UploadDiffForm(review_request.repository, form_data, request.FILES) if not form.is_valid(): return JsonResponseFormError(request, form) try: diffset = form.create(request.FILES['path'], review_request.diffset_history) except scmtools.FileNotFoundError, e: return JsonResponseError(request, REPO_FILE_NOT_FOUND, { 'file': e.path, 'revision': e.revision }) except EmptyDiffError, e: return JsonResponseError(request, INVALID_FORM_DATA, { 'fields': { 'path': [str(e)] } }) except Exception, e: # This could be very wrong, but at least they'll see the error. # We probably want a new error type for this. return JsonResponseError(request, INVALID_FORM_DATA, { 'fields': { 'path': [str(e)] } }) try: draft = review_request.reviewrequestdraft_set.get() if draft.diffset and draft.diffset != diffset: draft.diffset.delete() except ReviewRequestDraft.DoesNotExist: draft = _prepare_draft(request, review_request) draft.diffset = diffset # We only want to add default reviewers the first time. Was bug 318. print review_request.diffset_history.diffset_set.count() if review_request.diffset_history.diffset_set.count() == 0: draft.add_default_reviewers(); draft.save() # E-mail gets sent when the draft is saved. return JsonResponse(request, {'diffset_id': diffset.id})
e113440797f1426214984114a50a025366aa7e4a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1600/e113440797f1426214984114a50a025366aa7e4a/json.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 5413, 12, 2293, 16, 10725, 67, 2293, 67, 350, 4672, 10725, 67, 2293, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 9159, 691, 16, 2365, 33, 16041, 67, 2293, 67, 350, 13, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 5413, 12, 2293, 16, 10725, 67, 2293, 67, 350, 4672, 10725, 67, 2293, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 9159, 691, 16, 2365, 33, 16041, 67, 2293, 67, 350, 13, 225, ...
id=oid
id=''
def f(con, detail=detail, rc=sys.getrefcount): for oid, ob in con._cache.items(): id=oid if hasattr(ob,'__dict__'): d=ob.__dict__ if d.has_key('id'): id="%s (%s)" % (oid, d['id']) elif d.has_key('__name__'): id="%s (%s)" % (oid, d['__name__'])
fb7b9b4dff99b8d898e08be3452fe6ab91e029f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fb7b9b4dff99b8d898e08be3452fe6ab91e029f9/DB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 12, 591, 16, 7664, 33, 8992, 16, 4519, 33, 9499, 18, 588, 1734, 1883, 4672, 364, 7764, 16, 3768, 316, 356, 6315, 2493, 18, 3319, 13332, 612, 2218, 11, 309, 3859, 12, 947, 11189, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 12, 591, 16, 7664, 33, 8992, 16, 4519, 33, 9499, 18, 588, 1734, 1883, 4672, 364, 7764, 16, 3768, 316, 356, 6315, 2493, 18, 3319, 13332, 612, 2218, 11, 309, 3859, 12, 947, 11189, ...
if authToken[1] != oldPassword and authToken[0] == username:
if authToken[1] != oldPassword and authToken[0] == username and not admin:
def chPassCmd(self, authToken, fields): username = fields["username"].value if username != authToken[0]: if not self.repServer.repos.auth.check(authToken, admin=True): raise InsufficientPermission if fields.has_key("oldPassword"): oldPassword = fields["oldPassword"].value else: oldPassword = None p1 = fields["password1"].value p2 = fields["password2"].value
e92faa1269471af695a49937ff2a435f3c8cea15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/e92faa1269471af695a49937ff2a435f3c8cea15/http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 462, 6433, 5931, 12, 2890, 16, 24050, 16, 1466, 4672, 2718, 273, 1466, 9614, 5053, 6, 8009, 1132, 309, 2718, 480, 24050, 63, 20, 14542, 309, 486, 365, 18, 14462, 2081, 18, 15564, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 462, 6433, 5931, 12, 2890, 16, 24050, 16, 1466, 4672, 2718, 273, 1466, 9614, 5053, 6, 8009, 1132, 309, 2718, 480, 24050, 63, 20, 14542, 309, 486, 365, 18, 14462, 2081, 18, 15564, 18, 1...
text = sum.findtext("", None).strip()
text = sum.text.strip()
def IsRietveldSubmitted(ui, clname, hex): feed = XMLGet(ui, "/rss/issue/" + clname) if feed is None: return False for sum in feed.findall("{http://www.w3.org/2005/Atom}entry/{http://www.w3.org/2005/Atom}summary"): text = sum.findtext("", None).strip() m = re.match('\*\*\* Submitted as [^*]*?([0-9a-f]+) \*\*\*', text) if m is not None and len(m.group(1)) >= 8 and hex.startswith(m.group(1)): return True return False
b32676e838b52ed942c10bb375325260e074c69b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5761/b32676e838b52ed942c10bb375325260e074c69b/codereview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2585, 54, 6213, 90, 488, 28882, 12, 4881, 16, 927, 529, 16, 3827, 4672, 4746, 273, 3167, 967, 12, 4881, 16, 2206, 25151, 19, 13882, 4898, 397, 927, 529, 13, 309, 4746, 353, 599, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2585, 54, 6213, 90, 488, 28882, 12, 4881, 16, 927, 529, 16, 3827, 4672, 4746, 273, 3167, 967, 12, 4881, 16, 2206, 25151, 19, 13882, 4898, 397, 927, 529, 13, 309, 4746, 353, 599, 30, ...
def _upload(self, host, xml_file): resp = self._post_multipart(host, xml_file) return self._validate_success(resp)
def upload(self, file_path, host): if host.startswith('http://'): host = host[len('http://'):] xml_file = open(file_path, 'rb') conn = HTTPConnection(host) try: return self._upload(conn, xml_file) finally: xml_file.close() conn.close()
8bb6da62811da17103eba10dd3d582480996c875 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6988/8bb6da62811da17103eba10dd3d582480996c875/libdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 12, 2890, 16, 585, 67, 803, 16, 1479, 4672, 309, 1479, 18, 17514, 1918, 2668, 2505, 8931, 4672, 1479, 273, 1479, 63, 1897, 2668, 2505, 8931, 4672, 65, 2025, 67, 768, 273, 1696, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 12, 2890, 16, 585, 67, 803, 16, 1479, 4672, 309, 1479, 18, 17514, 1918, 2668, 2505, 8931, 4672, 1479, 273, 1479, 63, 1897, 2668, 2505, 8931, 4672, 65, 2025, 67, 768, 273, 1696, 1...
prefixes = self.tag_prefixes.keys() prefixes.sort()
prefixes = sorted(self.tag_prefixes.keys())
def prepare_tag(self, tag): if not tag: raise EmitterError("tag must not be empty") if tag == '!': return tag handle = None suffix = tag prefixes = self.tag_prefixes.keys() prefixes.sort() for prefix in prefixes: if tag.startswith(prefix) \ and (prefix == '!' or len(prefix) < len(tag)): handle = self.tag_prefixes[prefix] suffix = tag[len(prefix):] chunks = [] start = end = 0 while end < len(suffix): ch = suffix[end] if '0' <= ch <= '9' or 'A' <= ch <= 'Z' or 'a' <= ch <= 'z' \ or ch in '-;/?:@&=+$,_.~*\'()[]' \ or (ch == '!' and handle != '!'): end += 1 else: if start < end: chunks.append(suffix[start:end]) start = end = end+1 data = ch.encode('utf-8') for ch in data: chunks.append('%%%02X' % ord(ch)) if start < end: chunks.append(suffix[start:end]) suffix_text = ''.join(chunks) if handle: return '%s%s' % (handle, suffix_text) else: return '!<%s>' % suffix_text
4836d6edf5146e6f38e2e279358d64641868ba97 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/94/4836d6edf5146e6f38e2e279358d64641868ba97/emitter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 2692, 12, 2890, 16, 1047, 4672, 309, 486, 1047, 30, 1002, 16008, 387, 668, 2932, 2692, 1297, 486, 506, 1008, 7923, 309, 1047, 422, 11817, 4278, 327, 1047, 1640, 273, 599, 3758,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 2692, 12, 2890, 16, 1047, 4672, 309, 486, 1047, 30, 1002, 16008, 387, 668, 2932, 2692, 1297, 486, 506, 1008, 7923, 309, 1047, 422, 11817, 4278, 327, 1047, 1640, 273, 599, 3758,...
def processInternalMethodRefs(classId, methodName):
def processRefsToInternalMethods(classId, methodName):
def processInternalMethodRefs(classId, methodName): deps = [] localRefs = findLocalMethodRefs(classId, methodName) for funcref in localRefs: deps += getMethodDeps(classId, funcref) # recurse to top-level method
bd8e3550c911122ee826d26db6a0ccad69967c82 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/bd8e3550c911122ee826d26db6a0ccad69967c82/DependencyLoader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 9837, 774, 3061, 4712, 12, 1106, 548, 16, 4918, 4672, 8740, 273, 5378, 1191, 9837, 273, 1104, 2042, 1305, 9837, 12, 1106, 548, 16, 4918, 13, 364, 1326, 1734, 316, 1191, 9837, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 9837, 774, 3061, 4712, 12, 1106, 548, 16, 4918, 4672, 8740, 273, 5378, 1191, 9837, 273, 1104, 2042, 1305, 9837, 12, 1106, 548, 16, 4918, 13, 364, 1326, 1734, 316, 1191, 9837, 30, ...
if term == None: return (None, data)
def _UnpackTermSeq(numTerms, data): seq = [] remainingData = data for i in range(numTerms): (term, newRemainingData) = _UnpackOneTerm(remainingData) if term == None: return (None, data) seq.append(term) remainingData = newRemainingData return (seq, remainingData)
cadc8319939cd691f548c4b841a357df13bff542 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7565/cadc8319939cd691f548c4b841a357df13bff542/erl_term.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 23649, 4065, 6926, 12, 2107, 11673, 16, 501, 4672, 3833, 273, 5378, 4463, 751, 273, 501, 364, 277, 316, 1048, 12, 2107, 11673, 4672, 261, 6408, 16, 394, 11429, 751, 13, 273, 389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23649, 4065, 6926, 12, 2107, 11673, 16, 501, 4672, 3833, 273, 5378, 4463, 751, 273, 501, 364, 277, 316, 1048, 12, 2107, 11673, 4672, 261, 6408, 16, 394, 11429, 751, 13, 273, 389, ...
def write_index_pointers(self, out, indices):
def write_indexpage_header(self, out, indices, title, url):
def write_index_pointers(self, out, indices): """ A helper for the index page generation functions, which generates a header that can be used to navigate between the different indices. """ if len(indices) > 1: out('<center><b>[\n') out(' <a href="identifier-index.html">Identifier Index</a>\n') if indices['term']: out('| <a href="term-index.html">Term Definition Index</a>\n') if indices['bug']: out('| <a href="bug-index.html">Bug List</a>\n') if indices['todo']: out('| <a href="todo-index.html">To Do List</a>\n') out(']</b></center>\n')
ead96d86090e18fdeec64a06319b925d20efd2b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/ead96d86090e18fdeec64a06319b925d20efd2b2/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1615, 2433, 67, 3374, 12, 2890, 16, 596, 16, 4295, 16, 2077, 16, 880, 4672, 3536, 432, 4222, 364, 326, 770, 1363, 9377, 4186, 16, 1492, 6026, 279, 1446, 716, 848, 506, 1399, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1615, 2433, 67, 3374, 12, 2890, 16, 596, 16, 4295, 16, 2077, 16, 880, 4672, 3536, 432, 4222, 364, 326, 770, 1363, 9377, 4186, 16, 1492, 6026, 279, 1446, 716, 848, 506, 1399, ...
for i in xrange(1, self._rowCount):
for i in xrange(1, self._rowCount+1):
def drawRect_(self, rect): backgroundColor.set() NSRectFill(self.frame())
86c49c41b3eee2e8a47bd3e6b2a88adc5ec37014 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8848/86c49c41b3eee2e8a47bd3e6b2a88adc5ec37014/glyphCellView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 6120, 67, 12, 2890, 16, 4917, 4672, 22508, 18, 542, 1435, 11472, 6120, 8026, 12, 2890, 18, 3789, 10756, 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, 3724, 6120, 67, 12, 2890, 16, 4917, 4672, 22508, 18, 542, 1435, 11472, 6120, 8026, 12, 2890, 18, 3789, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
result = SourceIndex(sourceFileStream, stream_output_path)
result = SourceIndex(sourceFileStream, stream_output_path, cvs_root)
def SourceServerIndexing(self, debug_file, guid, sourceFileStream): # Creates a .pdb.stream file in the mozilla\objdir to be used for source indexing cwd = os.getcwd() streamFilename = debug_file + ".stream" stream_output_path = os.path.join(cwd, streamFilename) # Call SourceIndex to create the .stream file result = SourceIndex(sourceFileStream, stream_output_path) if self.copy_debug: pdbstr_path = os.environ.get("PDBSTR_PATH") pdbstr = os.path.normpath(pdbstr_path) pdb_rel_path = os.path.join(debug_file, guid, debug_file) pdb_filename = os.path.normpath(os.path.join(self.symbol_path, pdb_rel_path)) # move to the dir with the stream files to call pdbstr os.chdir(os.path.dirname(stream_output_path)) os.spawnv(os.P_WAIT, pdbstr, [pdbstr, "-w", "-p:" + pdb_filename, "-i:" + streamFilename, "-s:srcsrv"]) # clean up all the .stream files when done os.remove(stream_output_path) return result
329d49b565722e8465f2b32981390b24b9cf4634 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/329d49b565722e8465f2b32981390b24b9cf4634/symbolstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4998, 2081, 24465, 12, 2890, 16, 1198, 67, 768, 16, 9875, 16, 16338, 1228, 4672, 468, 10210, 279, 263, 17414, 18, 3256, 585, 316, 326, 27513, 64, 2603, 1214, 358, 506, 1399, 364, 1084, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4998, 2081, 24465, 12, 2890, 16, 1198, 67, 768, 16, 9875, 16, 16338, 1228, 4672, 468, 10210, 279, 263, 17414, 18, 3256, 585, 316, 326, 27513, 64, 2603, 1214, 358, 506, 1399, 364, 1084, ...
if resp[0] != '3':
if not resp.startswith(b'3'):
def post(self, f): """Process a POST command. Arguments: - f: file containing the article Returns: - resp: server response if successful"""
9bd2973908ef080e31fd8a2b44c929188a135cb0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/9bd2973908ef080e31fd8a2b44c929188a135cb0/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 16, 284, 4672, 3536, 2227, 279, 5485, 1296, 18, 225, 13599, 30, 300, 284, 30, 585, 4191, 326, 7559, 2860, 30, 300, 1718, 30, 1438, 766, 309, 6873, 8395, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 16, 284, 4672, 3536, 2227, 279, 5485, 1296, 18, 225, 13599, 30, 300, 284, 30, 585, 4191, 326, 7559, 2860, 30, 300, 1718, 30, 1438, 766, 309, 6873, 8395, 2, -100, -100, ...
parser = self.parser.parse() parser.next()
def parse_line(self,line): parser = self.parser.parse() parser.next() try: tokens = self.parser.tokenize(line) if tokens: # no need to consume non-code lines input_ast = parser.send(tokens) # parse this line if type(input_ast) == tuple: # parsing completed on this line; execute result interpreter.ExecGlobalStmt(input_ast,self)
3731974725dbe8adff31e7c789f5439769a39c6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11578/3731974725dbe8adff31e7c789f5439769a39c6d/repl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1369, 12, 2890, 16, 1369, 4672, 775, 30, 2430, 273, 365, 18, 4288, 18, 2316, 554, 12, 1369, 13, 309, 2430, 30, 17311, 468, 1158, 1608, 358, 7865, 1661, 17, 710, 2362, 810, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1369, 12, 2890, 16, 1369, 4672, 775, 30, 2430, 273, 365, 18, 4288, 18, 2316, 554, 12, 1369, 13, 309, 2430, 30, 17311, 468, 1158, 1608, 358, 7865, 1661, 17, 710, 2362, 810, ...
for account_id, sum in cr.fetchall(): res2[account_id] = round(sum,2)
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: acc_set = ",".join(map(str, ids2)) cr.execute("""select account_analytic_line.account_id,sum(amount) \ from account_analytic_line \ join account_analytic_journal \ on account_analytic_line.journal_id = account_analytic_journal.id \ where account_analytic_line.account_id IN (%s) \ and account_analytic_journal.type = 'purchase' \ GROUP BY account_analytic_line.account_id"""%acc_set) for account_id, sum in cr.fetchall(): res[account_id] = round(sum,2) acc_set = ",".join(map(str, ids2)) cr.execute("""select account_analytic_line.account_id as account_id, \ sum((account_analytic_line.unit_amount * pt.list_price) \ - (account_analytic_line.unit_amount * pt.list_price \ * hr.factor)) as somme from account_analytic_line \ join account_analytic_journal \ on account_analytic_line.journal_id = account_analytic_journal.id \ join product_product pp \ on (account_analytic_line.product_id = pp.id) \ join product_template pt \ on (pp.product_tmpl_id = pt.id) \ join account_analytic_account a \ on (a.id=account_analytic_line.account_id) \ join hr_timesheet_invoice_factor hr \ on (hr.id=a.to_invoice) \ where account_analytic_line.account_id IN (%s) \ and account_analytic_journal.type = 'general' \ and a.to_invoice IS NOT NULL \ GROUP BY account_analytic_line.account_id"""%acc_set) for account_id, sum in cr.fetchall(): res2[account_id] = round(sum,2)
def _ca_theorical_calc(self, cr, uid, ids, name, arg, context={}): ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) acc_set = ",".join(map(str, ids2)) # First part with expense and purchase cr.execute("""select account_analytic_line.account_id,sum(amount) from account_analytic_line join account_analytic_journal on account_analytic_line.journal_id = account_analytic_journal.id where account_analytic_line.account_id IN (%s) and account_analytic_journal.type = 'purchase' GROUP BY account_analytic_line.account_id"""%acc_set) res = {} for account_id, sum in cr.fetchall(): res[account_id] = round(sum,2) # Second part with timesheet (with invoice factor) acc_set = ",".join(map(str, ids2)) cr.execute(""" select account_analytic_line.account_id as account_id,sum((account_analytic_line.unit_amount * pt.list_price)-(account_analytic_line.unit_amount * pt.list_price*hr.factor)) as somme from account_analytic_line join account_analytic_journal on account_analytic_line.journal_id = account_analytic_journal.id join product_product pp on (account_analytic_line.product_id = pp.id) join product_template pt on (pp.product_tmpl_id = pt.id) join account_analytic_account a on (a.id=account_analytic_line.account_id) join hr_timesheet_invoice_factor hr on (hr.id=a.to_invoice) where account_analytic_line.account_id IN (%s) and account_analytic_journal.type='general' and a.to_invoice IS NOT NULL GROUP BY account_analytic_line.account_id"""%acc_set) res2 = {} for account_id, sum in cr.fetchall(): res2[account_id] = round(sum,2) # sum both result on account_id for id in ids: res[id] = round(res.get(id, 0.0),2) + round(res2.get(id, 0.0),2) return res
0a4296a2b12138902a63e4ecbee7ba061c84ccb0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/0a4296a2b12138902a63e4ecbee7ba061c84ccb0/account_analytic_analysis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5353, 67, 5787, 10129, 67, 12448, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 3258, 22, 273, 365, 18, 3072, 12, 3353, 16, 4555, 16, 306, 266...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5353, 67, 5787, 10129, 67, 12448, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 3258, 22, 273, 365, 18, 3072, 12, 3353, 16, 4555, 16, 306, 266...
limit_str = limit and ' limit %d' % limit or '' offset_str = offset and ' offset %d' % offset or ''
limit_str = limit and ' LIMIT %d' % limit or '' offset_str = offset and ' OFFSET %d' % offset or ''
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): """ Get the list of records in list view grouped by the given ``groupby`` fields
b4aa3caa7083f398e64c303d94ce7d5992804ba8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/b4aa3caa7083f398e64c303d94ce7d5992804ba8/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 1655, 12, 2890, 16, 4422, 16, 4555, 16, 2461, 16, 1466, 16, 13126, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 819, 33, 7036, 4672, 3536, 968, 326, 666, 434, 3853, 316, 666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 67, 1655, 12, 2890, 16, 4422, 16, 4555, 16, 2461, 16, 1466, 16, 13126, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 819, 33, 7036, 4672, 3536, 968, 326, 666, 434, 3853, 316, 666, ...
'Theta'
'Theta',
def _sys_init_(self, system): return self._name
4461fcc61cd0658ea798d459aeca66ac29505a8d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/4461fcc61cd0658ea798d459aeca66ac29505a8d/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9499, 67, 2738, 67, 12, 2890, 16, 2619, 4672, 327, 365, 6315, 529, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9499, 67, 2738, 67, 12, 2890, 16, 2619, 4672, 327, 365, 6315, 529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
in the optional argument deletechars are removed, and the
in the optional argument deletions are removed, and the
def translate(s, table, deletions=""): """translate(s,table [,deletechars]) -> string Return a copy of the string s, where all characters occurring in the optional argument deletechars are removed, and the remaining characters have been mapped through the given translation table, which must be a string of length 256. """ return s.translate(table, deletions)
f4fc7107b41f7cb767c743e1dccd958d4591caaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f4fc7107b41f7cb767c743e1dccd958d4591caaf/string.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 12, 87, 16, 1014, 16, 26334, 1546, 6, 4672, 3536, 13929, 12, 87, 16, 2121, 306, 16, 3733, 7549, 5717, 317, 533, 225, 2000, 279, 1610, 434, 326, 533, 272, 16, 1625, 777, 3949, 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, 4204, 12, 87, 16, 1014, 16, 26334, 1546, 6, 4672, 3536, 13929, 12, 87, 16, 2121, 306, 16, 3733, 7549, 5717, 317, 533, 225, 2000, 279, 1610, 434, 326, 533, 272, 16, 1625, 777, 3949, 3...
return tree
return
def stringOptimizeHelper(tree, variants): global verbose global quiet # Do not optimize strings for non-mshtml clients clientValue = getVariantValue(variants, "qx.client") if clientValue != None and clientValue != "mshtml": return tree # TODO: Customize option for __SS__ stringMap = stringoptimizer.search(tree) stringList = stringoptimizer.sort(stringMap) stringoptimizer.replace(tree, stringList, "__SS__") # Build JS string fragments stringStart = "function(){" stringReplacement = "var " + stringoptimizer.replacement(stringList, "__SS__") stringStop = "}();" # Compile wrapper node wrapperNode = treeutil.compileString(stringStart+stringReplacement+stringStop) # Append 'old' tree to wrapper wrapperNode.getChild("operand").getChild("function").getChild("body").addChild(tree) return wrapperNode
e5490009f0355d69f3a9b008c528e0170ce913cb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/e5490009f0355d69f3a9b008c528e0170ce913cb/generator2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 533, 6179, 10153, 2276, 12, 3413, 16, 12935, 4672, 2552, 3988, 2552, 10902, 225, 468, 2256, 486, 10979, 2064, 364, 1661, 17, 959, 2620, 7712, 1004, 620, 273, 336, 9356, 620, 12, 15886, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 533, 6179, 10153, 2276, 12, 3413, 16, 12935, 4672, 2552, 3988, 2552, 10902, 225, 468, 2256, 486, 10979, 2064, 364, 1661, 17, 959, 2620, 7712, 1004, 620, 273, 336, 9356, 620, 12, 15886, 1...
valueDict[tag[i]] = 1
valueDict[tags[i]] = 1
def setData(self, points=None, fname=None, format=None, radii=None, colors=None, tags=None): """ Set data to the plot @param points: the array to use for the points of the sphere locations in space @type points: float array
4d29d8381683038315bee5d25f89fe3270a16088 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/4d29d8381683038315bee5d25f89fe3270a16088/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 3143, 33, 7036, 16, 5299, 33, 7036, 16, 740, 33, 7036, 16, 28125, 33, 7036, 16, 5740, 33, 7036, 16, 2342, 33, 7036, 4672, 3536, 1000, 501, 358, 326, 3207, 632, 89...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 3143, 33, 7036, 16, 5299, 33, 7036, 16, 740, 33, 7036, 16, 28125, 33, 7036, 16, 5740, 33, 7036, 16, 2342, 33, 7036, 4672, 3536, 1000, 501, 358, 326, 3207, 632, 89...
self.assert_(self._box.get_string(key0) ==
self.assertEqual(self._box.get_string(key0),
def test_update(self): # Modify multiple messages using update() key0 = self._box.add(self._template % 'original 0') key1 = self._box.add(self._template % 'original 1') key2 = self._box.add(self._template % 'original 2') self._box.update({key0: self._template % 'changed 0', key2: _sample_message}) self.assertEqual(len(self._box), 3) self.assert_(self._box.get_string(key0) == self._template % 'changed 0') self.assert_(self._box.get_string(key1) == self._template % 'original 1') self._check_sample(self._box[key2]) self._box.update([(key2, self._template % 'changed 2'), (key1, self._template % 'changed 1'), (key0, self._template % 'original 0')]) self.assertEqual(len(self._box), 3) self.assert_(self._box.get_string(key0) == self._template % 'original 0') self.assert_(self._box.get_string(key1) == self._template % 'changed 1') self.assert_(self._box.get_string(key2) == self._template % 'changed 2') self.assertRaises(KeyError, lambda: self._box.update({'foo': 'bar', key0: self._template % "changed 0"})) self.assertEqual(len(self._box), 3) self.assert_(self._box.get_string(key0) == self._template % "changed 0") self.assert_(self._box.get_string(key1) == self._template % "changed 1") self.assert_(self._box.get_string(key2) == self._template % "changed 2")
7731c36bc6f787ca91b8429603fe004822f1f2d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/7731c36bc6f787ca91b8429603fe004822f1f2d8/test_mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2725, 12, 2890, 4672, 468, 9518, 3229, 2743, 1450, 1089, 1435, 498, 20, 273, 365, 6315, 2147, 18, 1289, 12, 2890, 6315, 3202, 738, 296, 8830, 374, 6134, 498, 21, 273, 365, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2725, 12, 2890, 4672, 468, 9518, 3229, 2743, 1450, 1089, 1435, 498, 20, 273, 365, 6315, 2147, 18, 1289, 12, 2890, 6315, 3202, 738, 296, 8830, 374, 6134, 498, 21, 273, 365, 63...
self.player = None
def __init__(self): plugin.MainMenuPlugin.__init__(self) config.EVENTS['audio']['DISPLAY'] = Event(FUNCTION_CALL, arg=self.detach) self.player = None self.show_item = menu.MenuItem(_('Show player'), action=self.show)
9fccded0dc51a3e574d38a6a227bb68b2f60ca15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/9fccded0dc51a3e574d38a6a227bb68b2f60ca15/detach.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 1909, 18, 6376, 4599, 3773, 16186, 2738, 972, 12, 2890, 13, 642, 18, 29221, 3292, 11509, 21712, 17463, 3546, 273, 2587, 12, 7788, 67, 13730, 16, 1501, 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, 2738, 972, 12, 2890, 4672, 1909, 18, 6376, 4599, 3773, 16186, 2738, 972, 12, 2890, 13, 642, 18, 29221, 3292, 11509, 21712, 17463, 3546, 273, 2587, 12, 7788, 67, 13730, 16, 1501, 33...
self.item_type = reference_class
self.item_type = model
def __init__(self, model, prop, name, reference_class): self.__model = model self.__property = prop self.name = name self.item_type = reference_class
093ff494105e6ae2066e10bd1359b2f2876ede44 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/093ff494105e6ae2066e10bd1359b2f2876ede44/property.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 938, 16, 2270, 16, 508, 16, 2114, 67, 1106, 4672, 365, 16186, 2284, 273, 938, 365, 16186, 4468, 273, 2270, 365, 18, 529, 273, 508, 365, 18, 1726, 67, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 938, 16, 2270, 16, 508, 16, 2114, 67, 1106, 4672, 365, 16186, 2284, 273, 938, 365, 16186, 4468, 273, 2270, 365, 18, 529, 273, 508, 365, 18, 1726, 67, 7...
userInput = ( ) userOutput = ( )
userInput = [ ] userOutput = [ ]
def say(str): pass
84e33ad094de9e387c86955fcc866ff30ba9d9b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/84e33ad094de9e387c86955fcc866ff30ba9d9b0/runtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12532, 12, 701, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12532, 12, 701, 4672, 1342, 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, -...
child.expect("3W")
child.expect("3")
def test_interactive(self): child = self.spawn() child.expect("->") child.sendline("(+ 1 2)") child.expect("3W")
d4d06c93f901853c37f1aa73848febf0d7ba58ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/d4d06c93f901853c37f1aa73848febf0d7ba58ce/test_interactive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 24761, 12, 2890, 4672, 1151, 273, 365, 18, 1752, 9533, 1435, 1151, 18, 12339, 2932, 2122, 7923, 1151, 18, 4661, 1369, 2932, 12, 15, 404, 576, 2225, 13, 1151, 18, 12339, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 24761, 12, 2890, 4672, 1151, 273, 365, 18, 1752, 9533, 1435, 1151, 18, 12339, 2932, 2122, 7923, 1151, 18, 4661, 1369, 2932, 12, 15, 404, 576, 2225, 13, 1151, 18, 12339, 2932, ...
vals['password'] = base64.b64encode(vals.get('password'))
for pass_char in vals.get('password'): if pass_char != '*': flag= True break if flag: vals['password'] = base64.b64encode(vals.get('password')) else: del vals['password']
def write(self, cr, user, ids, vals, context=None): if vals.get('password', False) != False: vals['password'] = base64.b64encode(vals.get('password')) res = super(SmtpClient, self).write(cr, user, ids, vals, context) return res
fe7974780913668c34b8cfa6134109c39afa6064 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/fe7974780913668c34b8cfa6134109c39afa6064/smtpclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 309, 5773, 18, 588, 2668, 3664, 2187, 1083, 13, 480, 1083, 30, 364, 1342, 67, 3001, 316, 5773, 18, 588...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 309, 5773, 18, 588, 2668, 3664, 2187, 1083, 13, 480, 1083, 30, 364, 1342, 67, 3001, 316, 5773, 18, 588...
str += ' <DT><DD>'+epytext.to_html(fdescr)+'</DD></DT>\n' str += ' <P></P>\n' str += ' <DT><DD>\n'
str += ' <dd>'+epytext.to_html(fdescr, para=1)+'</dd>\n' str += ' <dt></dt><dd>\n'
def _func_details(self, functions, cls, heading='Function Details'): """## Return a detailed description of the functions in a class or module.""" functions = self._sort(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</TABLE>'
89bd16eaf8c7e556babe42c6a92621dbc9b8a7e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/89bd16eaf8c7e556babe42c6a92621dbc9b8a7e9/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 1189, 2000, 279, 6864, 2477, 434, 326, 4186, 316, 279, 667, 578, 1605, 12123, 4186, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 1189, 2000, 279, 6864, 2477, 434, 326, 4186, 316, 279, 667, 578, 1605, 12123, 4186, 273, ...
self.readHeader() lines = [] secType = None self.readHeader()
self.readHeader()
def points(self): """A numpy array with the fields ('x', 'y', 'z', 'conf', 'type', 'herid', 'tileSize') for each point in the horizon (regardless of whehter it's a manual pick (line) or surface)""" self.readHeader() # Initalize an empty recarray to store things in lines = [] # To store line objects in secType = None self.readHeader() # Jump to start of file, past header
12b694e913b9b7fa035609605ead508b5355d270 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10472/12b694e913b9b7fa035609605ead508b5355d270/horizon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3143, 12, 2890, 4672, 3536, 37, 3972, 526, 598, 326, 1466, 7707, 92, 2187, 296, 93, 2187, 296, 94, 2187, 296, 3923, 2187, 296, 723, 2187, 296, 1614, 350, 2187, 296, 15368, 1225, 6134, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3143, 12, 2890, 4672, 3536, 37, 3972, 526, 598, 326, 1466, 7707, 92, 2187, 296, 93, 2187, 296, 94, 2187, 296, 3923, 2187, 296, 723, 2187, 296, 1614, 350, 2187, 296, 15368, 1225, 6134, ...
return "<%s tests=%s>" % (self.__class__, self._tests)
return "<%s tests=%s>" % (_strclass(self.__class__), self._tests)
def __repr__(self): return "<%s tests=%s>" % (self.__class__, self._tests)
f1389f9b53e039ce4256956c358a75f0e88ba016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1389f9b53e039ce4256956c358a75f0e88ba016/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 3532, 9, 87, 7434, 5095, 87, 2984, 738, 261, 2890, 16186, 1106, 972, 16, 365, 6315, 16341, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 3532, 9, 87, 7434, 5095, 87, 2984, 738, 261, 2890, 16186, 1106, 972, 16, 365, 6315, 16341, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
. Multilink values are printed as lists of node designators joined by commas. When given as an argument, node designators and key strings are both accepted; an empty string, a single node, or a list of nodes joined by commas is accepted.
. Multilink values are printed as lists of node designators joined by commas. When given as an argument, node designators and key strings are both accepted; an empty string, a single node, or a list of nodes joined by commas is accepted.
def help_all(self): print _('''
eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2809, 67, 454, 12, 2890, 4672, 1172, 389, 2668, 6309, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2809, 67, 454, 12, 2890, 4672, 1172, 389, 2668, 6309, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
""" SMTP 'verify' command. Checks for address validity. """
"""SMTP 'verify' command. Checks for address validity."""
def verify(self, address): """ SMTP 'verify' command. Checks for address validity. """ self.putcmd("vrfy", quoteaddr(address)) return self.getreply()
17ab64fb09a6a22668f123a2a6d034f0f3245e19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/17ab64fb09a6a22668f123a2a6d034f0f3245e19/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 12, 2890, 16, 1758, 4672, 3536, 55, 14636, 296, 8705, 11, 1296, 18, 13074, 364, 1758, 13800, 12123, 365, 18, 458, 4172, 2932, 16825, 93, 3113, 4914, 684, 3069, 12, 2867, 3719, 327,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 12, 2890, 16, 1758, 4672, 3536, 55, 14636, 296, 8705, 11, 1296, 18, 13074, 364, 1758, 13800, 12123, 365, 18, 458, 4172, 2932, 16825, 93, 3113, 4914, 684, 3069, 12, 2867, 3719, 327,...
if os.name == 'mac': def writable(self): return not self.accepting else: def writable(self): return True
def writable(self): return True
def readable(self): return True
419af88b34fb84062baed5c0be7f6c9e72fcb77d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/419af88b34fb84062baed5c0be7f6c9e72fcb77d/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7471, 12, 2890, 4672, 327, 1053, 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, 7471, 12, 2890, 4672, 327, 1053, 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, -1...
res = xcap_client.put('pres-rules', prules.toxml(pretty_print=True), etag=prules_etag)
res = xcap_client.put('pres-rules', prules.toxml(pretty_print=True), etag=prules_etag, headers={'Content-Type': 'application/auth-policy+xml'})
def polite_block_watcher(watcher): global prules, prules_etag, polite_block_rule, polite_block_rule_identities for i in xrange(3): if prules is None: get_prules() if prules is not None: if polite_block_rule is None: polite_block_rule_identities = Identity() polite_block_rule = Rule('pres_polite_blacklist', conditions=Conditions([polite_block_rule_identities]), actions=Actions([SubHandling('polite-block')]), transformations=Transformations()) prules.append(polite_block_rule) if str(watcher) not in polite_block_rule_identities: polite_block_rule_identities.append(IdentityOne(str(watcher))) try: res = xcap_client.put('pres-rules', prules.toxml(pretty_print=True), etag=prules_etag) except HTTPError, e: print "Cannot PUT 'pres-rules' document: %s" % str(e) prules = None else: prules_etag = res.etag if show_xml: print "Presence rules document:" print prules.toxml(pretty_print=True) print "Watcher %s is now politely blocked" % watcher break sleep(0.1) else: print "Could not politely block authorization of watcher %s" % watcher
ceb111f682d1a9b03ff397fe244ca517760afbb2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/ceb111f682d1a9b03ff397fe244ca517760afbb2/xcap_pres_rules.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2952, 1137, 67, 2629, 67, 23894, 12, 23894, 4672, 2552, 846, 1513, 16, 846, 1513, 67, 20788, 16, 2952, 1137, 67, 2629, 67, 5345, 16, 2952, 1137, 67, 2629, 67, 5345, 67, 6392, 1961, 364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2952, 1137, 67, 2629, 67, 23894, 12, 23894, 4672, 2552, 846, 1513, 16, 846, 1513, 67, 20788, 16, 2952, 1137, 67, 2629, 67, 5345, 16, 2952, 1137, 67, 2629, 67, 5345, 67, 6392, 1961, 364...
a part from body and title, if you don't specify anything, the DEFAULT style is applied. If style is specified it overwrite the DEFAULT one. If any other parameter is specified it will overwrite the specific parameter of the chosen style.
You can further tune the desired style by setting various optional parameters: @param horiz_sep a string that is repeated in order to produce a separator row between the title and the body (if needed) @param max_col the maximum number of coulmns used by the box (including indentation) @param tab_str a string to represent indentation @param tab_num the number of leveles of indentations @param border a tuple of 8 element in the form (tl, t, tr, l, r, bl, b, br) of strings that represent the different corners and sides of the box @param prefix a prefix string added before the box @param suffix a suffix string added after the box @param force_horiz True in order to print the horizontal line even when there is no title
def wrap_text_in_a_box(body='', title='', **args): """Return a nicely formatted text box: e.g. ****************** ** title ** **--------------** ** body ** ****************** Indentation and newline are respected. @param body the main text @param title an optional title @param horiz_sep a string that is repeated in order to produce a separator row between the title and the body (if needed) @param max_col the maximum number of coulmns used by the box (including indentation) @param tab_str a string to represent indentation @param tab_num the number of leveles of indentations @param border a tuple of 8 element in the form (tl, t, tr, l, r, bl, b, br) of strings that represent the different corners and sides of the box @param prefix a prefix string added before the box @param suffix a suffix string added after the box @param force_horiz True in order to print the horizontal line even when there is no title @param style the name of one of the style in CFG_WRAP_STYLES. By default is set to DEFAULT. a part from body and title, if you don't specify anything, the DEFAULT style is applied. If style is specified it overwrite the DEFAULT one. If any other parameter is specified it will overwrite the specific parameter of the chosen style. e.g.: print wrap_text_in_a_box(title='prova', body=' 123 prova.\n Vediamo come si indenta', horiz_sep='-', style='no_border', max_col=20, tab_num=1) prova ---------------- 123 prova. Vediamo come si indenta """ def wrap_row(row, max_col): """Wrap a single row""" spaces = _beginning_space_re.match(row).group() row = row[len(spaces):] return wrap(row, initial_indent=spaces, subsequent_indent=spaces, width=max_col) style = CFG_WRAP_STYLES['DEFAULT'] if args.has_key('style'): style.update(CFG_WRAP_STYLES[args['style']]) style.update(args) horiz_sep = style['horiz_sep'] border = style['border'] tab_str = style['tab_str'] * style['tab_num'] max_col = style['max_col'] - len(border[3]) - len(border[4]) - len(tab_str) prefix = style['prefix'] suffix = style['suffix'] force_horiz = style['force_horiz'] tmp_rows = [wrap_row(row, max_col) for row in body.split('\n')] body_rows = [] for rows in tmp_rows: body_rows += rows tmp_rows = [wrap_row(row, max_col) for row in title.split('\n')] title_rows = [] for rows in tmp_rows: title_rows += rows max_col = max([len(row) for row in body_rows + title_rows]) mid_top_border_len = max_col + len(border[3]) + len(border[4]) - len(border[0]) - len(border[2]) mid_bottom_border_len = max_col + len(border[3]) + len(border[4]) - len(border[5]) - len(border[7]) top_border = border[0] + (border[1] * mid_top_border_len)[:mid_top_border_len] + border[2] bottom_border = border[5] + (border[6] * mid_bottom_border_len)[:mid_bottom_border_len] + border[7] horiz_line = border[3] + (horiz_sep * max_col)[:max_col] + border[4] title_rows = [tab_str + border[3] + row + ' ' * (max_col - len(row)) + border[4] for row in title_rows] body_rows = [tab_str + border[3] + row + ' ' * (max_col - len(row)) + border[4] for row in body_rows] ret = '' if top_border: ret += [tab_str + top_border] ret += title_rows if title_rows or force_horiz: ret += [tab_str + horiz_line] ret += body_rows if bottom_border: ret += [tab_str + bottom_border] return prefix + '\n'.join(ret) + suffix
e1b9f10e6303507873c2ddab5bfad28d8760042a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1780/e1b9f10e6303507873c2ddab5bfad28d8760042a/textutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 955, 67, 267, 67, 69, 67, 2147, 12, 3432, 2218, 2187, 2077, 2218, 2187, 2826, 1968, 4672, 3536, 990, 279, 11562, 2357, 4955, 977, 3919, 30, 425, 18, 75, 18, 380, 2751, 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, 2193, 67, 955, 67, 267, 67, 69, 67, 2147, 12, 3432, 2218, 2187, 2077, 2218, 2187, 2826, 1968, 4672, 3536, 990, 279, 11562, 2357, 4955, 977, 3919, 30, 425, 18, 75, 18, 380, 2751, 14, ...
logger.level = WARNING
logger.level = logging.WARNING
def handle_noargs(self, **options): v = int(options.get('verbosity', 0)) if v == 0: logger.level = ERROR elif v == 1: logger.level = WARNING elif v == 2: logger.level = DEBUG
fe5e460d0607cb0989a92441afe2bdd52640f214 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11256/fe5e460d0607cb0989a92441afe2bdd52640f214/mirrorcheck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2135, 1968, 12, 2890, 16, 2826, 2116, 4672, 331, 273, 509, 12, 2116, 18, 588, 2668, 16629, 8807, 2187, 374, 3719, 309, 331, 422, 374, 30, 1194, 18, 2815, 273, 5475, 1327, 331...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2135, 1968, 12, 2890, 16, 2826, 2116, 4672, 331, 273, 509, 12, 2116, 18, 588, 2668, 16629, 8807, 2187, 374, 3719, 309, 331, 422, 374, 30, 1194, 18, 2815, 273, 5475, 1327, 331...
zflip = dot(csys.z, right) < 0
xflip = dot(csys.z, right) < 0
def drawLinearDimension(color, right, up, bpos, p0, p1, text, highlighted=False): outOfScreen = cross(right, up) bdiff = bpos - 0.5 * (p0 + p1) csys = CylindricalCoordinates(p0, p1 - p0, bdiff, right) # This works OK until we want to keep the text right side up, then the # criterion for right-side-up-ness changes because we've changed 'up'. br, bt, bz = csys.rtz(bpos) e0 = csys.xyz((br + 0.5, 0, 0)) e1 = csys.xyz((br + 0.5, 0, 1)) drawline(color, p0, e0) drawline(color, p1, e1) v0 = csys.xyz((br, 0, 0)) v1 = csys.xyz((br, 0, 1)) if highlighted: drawline(color, v0, v1, width=THICKLINEWIDTH) else: drawline(color, v0, v1) # draw arrowheads at the ends a1, a2 = 0.25, 1.0 * csys.zinv arrow00 = csys.xyz((br + a1, 0, a2)) arrow01 = csys.xyz((br - a1, 0, a2)) drawline(color, v0, arrow00) drawline(color, v0, arrow01) arrow10 = csys.xyz((br + a1, 0, 1-a2)) arrow11 = csys.xyz((br - a1, 0, 1-a2)) drawline(color, v1, arrow10) drawline(color, v1, arrow11) # draw the text for the numerical measurement, make # sure it goes from left to right zflip = dot(csys.z, right) < 0 # then make sure it's right side up theoreticalRight = (zflip and -csys.z) or csys.z theoreticalOutOfScreen = cross(theoreticalRight, bdiff) xflip = dot(theoreticalOutOfScreen, outOfScreen) < 0 def fx(y, xflip=xflip): if xflip: return br + 1.5 - y / (1. * HEIGHT) else: return br + 0.5 + y / (1. * HEIGHT) def fz(x, zflip=zflip): if zflip: return 0.9 - csys.zinv * x / (1. * WIDTH) else: return 0.1 + csys.zinv * x / (1. * WIDTH) def tfm(x, y, fx=fx, fz=fz): return csys.xyz((fx(y), 0, fz(x))) f3d = Font3D() f3d.drawString(text, tfm=tfm, color=color)
0f4124501d1808580d0ead8723eb24a61421d46f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/0f4124501d1808580d0ead8723eb24a61421d46f/dimensions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 15982, 8611, 12, 3266, 16, 2145, 16, 731, 16, 324, 917, 16, 293, 20, 16, 293, 21, 16, 977, 16, 24375, 33, 8381, 4672, 596, 951, 7956, 273, 6828, 12, 4083, 16, 731, 13, 324, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 15982, 8611, 12, 3266, 16, 2145, 16, 731, 16, 324, 917, 16, 293, 20, 16, 293, 21, 16, 977, 16, 24375, 33, 8381, 4672, 596, 951, 7956, 273, 6828, 12, 4083, 16, 731, 13, 324, 5...
def XXXtest_strip_bytearray(self):
def test_strip_bytearray(self):
def XXXtest_strip_bytearray(self): # XXX memoryview not available self.assertEqual(self.type2test(b'abc').strip(memoryview(b'ac')), b'b') self.assertEqual(self.type2test(b'abc').lstrip(memoryview(b'ac')), b'bc') self.assertEqual(self.type2test(b'abc').rstrip(memoryview(b'ac')), b'ab')
5f31c7d9de42c3e61ab40db94e55abfa958075d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/5f31c7d9de42c3e61ab40db94e55abfa958075d1/test_bytes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11329, 3813, 67, 6406, 67, 7229, 1126, 12, 2890, 4672, 468, 11329, 3778, 1945, 486, 2319, 365, 18, 11231, 5812, 12, 2890, 18, 723, 22, 3813, 12, 70, 11, 18947, 16063, 6406, 12, 7858, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11329, 3813, 67, 6406, 67, 7229, 1126, 12, 2890, 4672, 468, 11329, 3778, 1945, 486, 2319, 365, 18, 11231, 5812, 12, 2890, 18, 723, 22, 3813, 12, 70, 11, 18947, 16063, 6406, 12, 7858, 1...
cursor.execute("""CREATE TABLE IF NOT EXISTS retweets (status_id VARCHAR(100) PRIMARY KEY, timestamp VARCHAR(255))""") connection.commit()
def retweet(initial_status_id=None): for USER, PASS in ACCOUNTS: DB_PATH = DB_DIR + "%s.sqlite" connection = sqlite3.connect(DB_PATH % USER) cursor = connection.cursor() # Create the table that will hold the tweets we've retweeted. cursor.execute("""CREATE TABLE IF NOT EXISTS retweets (status_id VARCHAR(100) PRIMARY KEY, timestamp VARCHAR(255))""") connection.commit() if initial_status_id is not None: try: cursor.execute("""INSERT INTO retweets (status_id, timestamp) VALUES ('%s', '%s')""" % (initial_status_id, datetime.datetime.now())) connection.commit() except Exception, e: # Already inserted pass # Find the last tweet we retweeted cursor.execute("""SELECT MAX(status_id) FROM retweets""") rows = cursor max_status_id = None for row in rows: max_status_id = row[0] break # Create privileged twitter API api = twitter.Api(username=USER, password=PASS) api.SetSource("retweetpy") # Get replies to our account replies = api.GetReplies(since_id=max_status_id) if len(replies) > 0: # Strip off the leading @username cut_reply = re.compile(r"^@%s:?\s*" % USER, re.IGNORECASE) clean_reply = re.compile(r'^[^a-z0-9\s]*@', re.IGNORECASE) for reply in replies: reply_text = clean_reply.sub("@", reply.text) if not reply_text.lower().startswith("@%s" % USER.lower()): continue clean_tweet = cut_reply.sub("", reply_text).strip() # Build the new tweet new_tweet = "RT @%s %s" % (reply.user.GetScreenName(), clean_tweet) # If it's over 140 chars, cut it down, adding ellipses # The "in reply to" will link to the original if len(new_tweet) > 140: new_tweet = new_tweet[:140] i = 137 while i > 0: # Add the ellipses in a word break if new_tweet[i] == " ": new_tweet = "%s..." % new_tweet[:i] break else: new_tweet = new_tweet[:i] i -= 1 # Send it. try: api.PostUpdate(new_tweet)#, reply.id) # Commenting out the reply.id now that Twitter will hide it from users that don't follow # the user that is being replied to. cursor.execute("""INSERT INTO retweets (status_id, timestamp) VALUES ('%s', '%s')""" % (reply.id, datetime.datetime.now())) connection.commit() except Exception, e: print e
631fc1bfa1ad77aba782929773f7942f5309633d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14028/631fc1bfa1ad77aba782929773f7942f5309633d/retweet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 325, 18028, 12, 6769, 67, 2327, 67, 350, 33, 7036, 4672, 364, 7443, 16, 17882, 316, 29437, 55, 30, 2383, 67, 4211, 273, 2383, 67, 4537, 397, 2213, 87, 18, 19460, 6, 225, 1459, 273, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 325, 18028, 12, 6769, 67, 2327, 67, 350, 33, 7036, 4672, 364, 7443, 16, 17882, 316, 29437, 55, 30, 2383, 67, 4211, 273, 2383, 67, 4537, 397, 2213, 87, 18, 19460, 6, 225, 1459, 273, 1...
db = sqlite.connect(filename)
db = sqlite3.connect(filename)
def create(self, filename): """Create an initial database"""
1bd6adee371af6defb14a869c8d6fece65e51000 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/1bd6adee371af6defb14a869c8d6fece65e51000/sqliterepodb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 1544, 4672, 3536, 1684, 392, 2172, 2063, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 1544, 4672, 3536, 1684, 392, 2172, 2063, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
while (not frameFinished):
while not frameFinished:
def func(self): frameFinished = 0 taskDoneStatus = -1 while (not frameFinished): task = self.taskList[self.index] # If this is a new task, set its start time and frame if (self.index > self.prevIndex): task.setStartTimeFrame(self.time, self.frame) self.prevIndex = self.index # Calculate this task's time since it started task.setCurrentTimeFrame(self.time, self.frame) # Execute the current task ret = task(task) # Check the return value from the task # If this current task wants to continue, # come back to it next frame if (ret == cont): taskDoneStatus = cont frameFinished = 1 # If this task is done, increment the index so that next frame # we will start executing the next task on the list elif (ret == done): self.index = self.index + 1 taskDoneStatus = cont frameFinished = 0 # If this task wants to exit, the sequence exits elif (ret == exit): taskDoneStatus = exit frameFinished = 1
1b2218da5bceb1c2d5383a72137ae2bb41972dbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/1b2218da5bceb1c2d5383a72137ae2bb41972dbd/Task.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 12, 2890, 4672, 2623, 10577, 273, 374, 1562, 7387, 1482, 273, 300, 21, 1323, 486, 2623, 10577, 30, 1562, 273, 365, 18, 4146, 682, 63, 2890, 18, 1615, 65, 468, 971, 333, 353, 279,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 12, 2890, 4672, 2623, 10577, 273, 374, 1562, 7387, 1482, 273, 300, 21, 1323, 486, 2623, 10577, 30, 1562, 273, 365, 18, 4146, 682, 63, 2890, 18, 1615, 65, 468, 971, 333, 353, 279,...
except Error:
except:
def templatesWithParams(self, thistxt=None): """Return a list of templates used on this Page.
2b58b8a6427f24f7214ffd5d849db6fb1c8ba6d2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/2b58b8a6427f24f7214ffd5d849db6fb1c8ba6d2/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5539, 19591, 12, 2890, 16, 333, 5830, 33, 7036, 4672, 3536, 990, 279, 666, 434, 5539, 1399, 603, 333, 3460, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5539, 19591, 12, 2890, 16, 333, 5830, 33, 7036, 4672, 3536, 990, 279, 666, 434, 5539, 1399, 603, 333, 3460, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def runGeneratorForAll(self, job, cwd=False):
def runGeneratorForAll(self, job, macro=False):
def runGeneratorForAll(self, job, cwd=False): console.indent() for libraryName, library in self.children.iteritems(): for versionName, libraryVersion in library.children.iteritems(): console.info("Running job %s on %s %s..." %(job, libraryName, versionName)) ret, out, err = runGenerator(libraryVersion.path, job, cwd) console.debug(out) if ret > 0: libraryVersion.issues.append( {job : errout} ) console.error(err) console.outdent()
074d6ff63573eb00617de5f63c6708be5563b7c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/074d6ff63573eb00617de5f63c6708be5563b7c6/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3908, 1290, 1595, 12, 2890, 16, 1719, 16, 11522, 33, 8381, 4672, 2983, 18, 9355, 1435, 364, 5313, 461, 16, 5313, 316, 365, 18, 5906, 18, 2165, 3319, 13332, 364, 1177, 461, 16, 53...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3908, 1290, 1595, 12, 2890, 16, 1719, 16, 11522, 33, 8381, 4672, 2983, 18, 9355, 1435, 364, 5313, 461, 16, 5313, 316, 365, 18, 5906, 18, 2165, 3319, 13332, 364, 1177, 461, 16, 53...
if type(l) == str and '|' in l:
if type(l) == str and u'|' in l:
def ListToParam( list ): """Convert a list of unicode strings into a UTF8 string separated by the '|' symbols """ list = ConvToList( list ) if len(list) == 0: return '' encList = '' # items may not have one symbol - '|' for l in list: if type(l) == str and '|' in l: raise wikipedia.Error("item '%s' contains '|' symbol" % l ) encList += ToUtf8(l) + '|' return encList[:-1]
e46ed7d27867ad8611526fc5a8d03908736354cf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/e46ed7d27867ad8611526fc5a8d03908736354cf/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 987, 774, 786, 12, 666, 262, 30, 3536, 2723, 279, 666, 434, 5252, 2064, 1368, 279, 6380, 28, 533, 8936, 635, 326, 8030, 7963, 3536, 666, 273, 18263, 25772, 12, 666, 262, 309, 562, 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, 987, 774, 786, 12, 666, 262, 30, 3536, 2723, 279, 666, 434, 5252, 2064, 1368, 279, 6380, 28, 533, 8936, 635, 326, 8030, 7963, 3536, 666, 273, 18263, 25772, 12, 666, 262, 309, 562, 12, ...
return self def __call__(self, *args): return self.impl(*args)
return self.impl.__get__(obj, owner)
def __get__(self, obj, owner): record.append(1) return self
61a80968ca37fd9c2373de58d36d803f31b54f70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/61a80968ca37fd9c2373de58d36d803f31b54f70/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 972, 12, 2890, 16, 1081, 16, 3410, 4672, 1409, 18, 6923, 12, 21, 13, 327, 365, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 972, 12, 2890, 16, 1081, 16, 3410, 4672, 1409, 18, 6923, 12, 21, 13, 327, 365, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
i += 1
def mark_all_groups(request, course_slug, activity_slug): course = get_object_or_404(CourseOffering, slug=course_slug) activity = get_object_or_404(NumericActivity, offering=course, slug=activity_slug) error_info = None rows=[] warning_info=[] groups = set() all_members = GroupMember.objects.select_related('group').filter(activity = activity, confirmed = True) for member in all_members: if not member.group in groups: groups.add(member.group) if request.method == 'POST': current_act_marks = [] for group in groups: entry_form = MarkEntryForm(data = request.POST, prefix = group.name) if entry_form.is_valid() == False: error_info = "Error found" act_mark = get_group_mark(activity, group) if act_mark == None: current_mark = 'no grade' else: current_mark = act_mark.mark current_act_marks.append(act_mark) rows.append({'group': group, 'current_mark' : current_mark, 'form' : entry_form}) if error_info == None: updated = 0 i = 0 for group in groups: new_value = rows[i]['form'].cleaned_data['value'] if new_value== None : continue if current_act_marks[i] != None and current_act_marks[i].mark == new_value: # if any of the group members originally has a grade status other than 'GRAD' # so do not override the status continue act_mark = GroupActivityMark(group=group, numeric_activity=activity) _save_marking_results(activity, act_mark, new_value, request.user.username,\ ("group %s" % group.name)) updated += 1 if new_value < 0: warning_info.append("Negative mark given to group %s" % group.name) elif new_value > activity.max_grade: warning_info.append("Bonus mark given to group %s" % group.name) i += 1 if updated > 0: messages.add_message(request, messages.SUCCESS, "Marks for all groups on %s saved (%s groups' grades updated)!" % (activity.name, updated)) for warning in warning_info: messages.add_message(request, messages.WARNING, warning) return _redirct_response(request, course_slug, activity_slug) else: # for GET request for group in groups: act_mark = get_group_mark(activity, group) if act_mark == None: current_mark = 'no grade' else: current_mark = act_mark.mark entry_form = MarkEntryForm(prefix = group.name) rows.append({'group': group, 'current_mark' : current_mark, 'form' : entry_form}) if error_info: messages.add_message(request, messages.ERROR, error_info) return render_to_response("marking/mark_all_group.html", {'course': course, 'activity': activity,'mark_all_rows': rows }, context_instance = RequestContext(request))
7d0955339db3ab6be5d74c5e5a51d3daad44ebfc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6634/7d0955339db3ab6be5d74c5e5a51d3daad44ebfc/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2267, 67, 454, 67, 4650, 12, 2293, 16, 4362, 67, 6436, 16, 5728, 67, 6436, 4672, 4362, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 39, 3117, 17800, 16, 4959, 33, 5566, 67, 6436, 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, 2267, 67, 454, 67, 4650, 12, 2293, 16, 4362, 67, 6436, 16, 5728, 67, 6436, 4672, 4362, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 39, 3117, 17800, 16, 4959, 33, 5566, 67, 6436, 13, ...
if is_output: outputs.add(name) else: if not self._builder.ignore.search(name):
if not self.ignore(name): if is_output: outputs.add(name) else:
def _do_strace(self, args, outfile, outname): """ Run strace on given command args, sending output to file. Return (status code, list of dependencies, list of outputs). """ shell('strace', '-fo', outname, '-e', 'trace=open,stat64,execve,exit_group,chdir,mkdir,rename', args, silent=False)
7bf10d72a36d4c70af8a56ecb853762b52b9fc65 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7381/7bf10d72a36d4c70af8a56ecb853762b52b9fc65/fabricate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 701, 623, 12, 2890, 16, 833, 16, 8756, 16, 596, 529, 4672, 3536, 1939, 609, 623, 603, 864, 1296, 833, 16, 5431, 876, 358, 585, 18, 2000, 261, 2327, 981, 16, 666, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 701, 623, 12, 2890, 16, 833, 16, 8756, 16, 596, 529, 4672, 3536, 1939, 609, 623, 603, 864, 1296, 833, 16, 5431, 876, 358, 585, 18, 2000, 261, 2327, 981, 16, 666, 434, ...
self.timer = time.time
self.timer = self.get_time = time.time
def __init__(self, timer=None): self.timings = {} self.cur = None self.cmd = ""
e5b78a4bafbe2eee27f64fd9f04f745a2a189bd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e5b78a4bafbe2eee27f64fd9f04f745a2a189bd3/profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5441, 33, 7036, 4672, 365, 18, 8584, 899, 273, 2618, 365, 18, 1397, 273, 599, 365, 18, 4172, 273, 1408, 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, 1001, 2738, 972, 12, 2890, 16, 5441, 33, 7036, 4672, 365, 18, 8584, 899, 273, 2618, 365, 18, 1397, 273, 599, 365, 18, 4172, 273, 1408, 2, -100, -100, -100, -100, -100, -100, -100, -100...
self.hboxlayout60.addWidget(self.qutemol_lbl) self.gridlayout36.addLayout(self.hboxlayout60,0,0,1,1)
self.hboxlayout58.addWidget(self.qutemol_lbl) self.gridlayout32.addLayout(self.hboxlayout58,0,0,1,1)
def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,917,661).size()).expandedTo(UserPrefsDialog.minimumSizeHint()))
752b48c67dcf97437d2cb83fa267b09487665da0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/752b48c67dcf97437d2cb83fa267b09487665da0/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 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, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
return render_response(request, 'packages/details.html', {'pkg':pkg})
origin_repo = None if pkg.repo.name == 'Testing': try: origin_repo = Package.objects.filter( pkgname__exact = pkg.pkgname).exclude( repo__name__exact = pkg.repo.name).get().repo.name except ObjectDoesNotExist: origin_repo = None return render_response( request, 'packages/details.html', {'pkg': pkg, 'origin_repo': origin_repo})
def details(request, pkgid=0, name='', repo=''): if pkgid == 0: p = Package.objects.filter(pkgname=name) if repo: p = p.filter(repo__name__exact=repo) # if more then one result, send to the search view if len(p) > 1: return search(request, name) if len(p) < 1: return render_response(request, 'error_page.html', {'errmsg': 'No matching packages.'}) pkgid = p[0].id pkg = get_object_or_404(Package, id=pkgid) return render_response(request, 'packages/details.html', {'pkg':pkg})
7e2d0f2f0cd8f176cf82c02d704ad4fe25a07b3b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11256/7e2d0f2f0cd8f176cf82c02d704ad4fe25a07b3b/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3189, 12, 2293, 16, 3475, 350, 33, 20, 16, 508, 2218, 2187, 3538, 2218, 11, 4672, 309, 3475, 350, 422, 374, 30, 293, 273, 7508, 18, 6911, 18, 2188, 12, 10657, 529, 33, 529, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3189, 12, 2293, 16, 3475, 350, 33, 20, 16, 508, 2218, 2187, 3538, 2218, 11, 4672, 309, 3475, 350, 422, 374, 30, 293, 273, 7508, 18, 6911, 18, 2188, 12, 10657, 529, 33, 529, 13, 309, ...
headers = {'Range': 'bytes=%d:%d' % (self.offset, self.offset + size - 1)}
headers = {'Range': 'bytes=%d-%d' % (self.offset, self.offset + size - 1)}
def read(self, size): protocol, host, port, path = self.urlsplit(self.url) conn = httplib.HTTPConnection(host, port) headers = {'Range': 'bytes=%d:%d' % (self.offset, self.offset + size - 1)} conn.request('GET', path, None, headers) response = conn.getresponse() data = response.read() self.offset += len(data) return data
2ef125d0767b73f9ae880c733ea6528d49b5914a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3913/2ef125d0767b73f9ae880c733ea6528d49b5914a/warc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 4672, 1771, 16, 1479, 16, 1756, 16, 589, 273, 365, 18, 718, 4939, 12, 2890, 18, 718, 13, 1487, 273, 15851, 6673, 18, 3693, 1952, 12, 2564, 16, 1756, 13, 1607,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 4672, 1771, 16, 1479, 16, 1756, 16, 589, 273, 365, 18, 718, 4939, 12, 2890, 18, 718, 13, 1487, 273, 15851, 6673, 18, 3693, 1952, 12, 2564, 16, 1756, 13, 1607,...
if not exists(b.prefix): b.checkForUpdates('buildbot', BUILDBOT_SOURCE) b.installBuildbot()
def usage(): print """
2e75f5261d8fdf3749028729e350606f023aeb3f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/2e75f5261d8fdf3749028729e350606f023aeb3f/botrunner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.conn = mysqldb.connect(host=host, user=user, passwd=passwd,
self.conn = MySQLdb.connect(host=host, user=user, passwd=passwd,
def __init__(self, ui): self.ui = ui host = self.ui.config('bugzilla', 'host', 'localhost') user = self.ui.config('bugzilla', 'user', 'bugs') passwd = self.ui.config('bugzilla', 'password') db = self.ui.config('bugzilla', 'db', 'bugs') timeout = int(self.ui.config('bugzilla', 'timeout', 5)) usermap = self.ui.config('bugzilla', 'usermap') if usermap: self.ui.readconfig(usermap, sections=['usermap']) self.ui.note(_('connecting to %s:%s as %s, password %s\n') % (host, db, user, '*' * len(passwd))) self.conn = mysqldb.connect(host=host, user=user, passwd=passwd, db=db, connect_timeout=timeout) self.cursor = self.conn.cursor() self.longdesc_id = self.get_longdesc_id() self.user_ids = {} self.default_notify = "cd %(bzdir)s && ./processmail %(id)s %(user)s"
020b5bed3900432872e10036be2331eb225e2838 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/020b5bed3900432872e10036be2331eb225e2838/bugzilla.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5915, 4672, 365, 18, 4881, 273, 5915, 1479, 273, 365, 18, 4881, 18, 1425, 2668, 925, 15990, 2187, 296, 2564, 2187, 296, 13014, 6134, 729, 273, 365, 18, 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, 1001, 2738, 972, 12, 2890, 16, 5915, 4672, 365, 18, 4881, 273, 5915, 1479, 273, 365, 18, 4881, 18, 1425, 2668, 925, 15990, 2187, 296, 2564, 2187, 296, 13014, 6134, 729, 273, 365, 18, 4...
Returns roots of \code{self} that can be found exactly, with multiplicities. Not all root are guaranteed to be found.
Returns roots of \code{self} that can be found exactly, possibly with multiplicities. Not all roots are guaranteed to be found.
def roots(self, x=None, explicit_solutions=True): r""" Returns roots of \code{self} that can be found exactly, with multiplicities. Not all root are guaranteed to be found.
d471d8ec9f13193e3daf6f31409fcd9fa17d1fcb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d471d8ec9f13193e3daf6f31409fcd9fa17d1fcb/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12876, 12, 2890, 16, 619, 33, 7036, 16, 5515, 67, 18281, 6170, 33, 5510, 4672, 436, 8395, 2860, 12876, 434, 521, 710, 95, 2890, 97, 716, 848, 506, 1392, 8950, 16, 598, 3309, 1780, 1961...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12876, 12, 2890, 16, 619, 33, 7036, 16, 5515, 67, 18281, 6170, 33, 5510, 4672, 436, 8395, 2860, 12876, 434, 521, 710, 95, 2890, 97, 716, 848, 506, 1392, 8950, 16, 598, 3309, 1780, 1961...
retval = False
def parse(self, context, operands): retval = False if self.operandType == OperandType.NONE: if operands != None: context.error("instruction takes no operand") else: if operands == None: if not self.operandOptional: context.error("missing operand") try: retval = self.__getattribute__("parse_" + self.methodName)(context, operands) except: pass context.currentRecord.type = self.type context.incrLoc(self.numwords) if self.numwords == 0: if self.methodName != "EQUALS": context.currentRecord.complete = True return retval
0c60b51cc3a2e291ba9533bb9ab17f2ef2a0018f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/0c60b51cc3a2e291ba9533bb9ab17f2ef2a0018f/directive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 819, 16, 14883, 4672, 309, 365, 18, 4063, 464, 559, 422, 7692, 464, 559, 18, 9826, 30, 309, 14883, 480, 599, 30, 819, 18, 1636, 2932, 19116, 5530, 1158, 9886, 7923,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2890, 16, 819, 16, 14883, 4672, 309, 365, 18, 4063, 464, 559, 422, 7692, 464, 559, 18, 9826, 30, 309, 14883, 480, 599, 30, 819, 18, 1636, 2932, 19116, 5530, 1158, 9886, 7923,...
'name': period_start_date.strftime('%Y-%m') + ' - ' + \ period_end_date.strftime('%Y-%m'),
'name': name,
def create_period(self, cursor, user, ids, context=None, interval=1): ''' Create periods for the fiscal years with month interval ''' period_obj = self.pool.get('account.period') for fiscalyear in self.browse(cursor, user, ids, context=context): end_date = mx.DateTime.strptime(str(fiscalyear.end_date), '%Y-%m-%d') period_start_date = mx.DateTime.strptime(str(fiscalyear.start_date), '%Y-%m-%d') while period_start_date < end_date: period_end_date = period_start_date + \ mx.DateTime.RelativeDateTime(months=interval) period_end_date = mx.DateTime.DateTime(period_end_date.year, period_end_date.month, 1) - \ mx.DateTime.RelativeDateTime(days=1) if period_end_date > end_date: period_end_date = end_date period_obj.create(cursor, user, { 'name': period_start_date.strftime('%Y-%m') + ' - ' + \ period_end_date.strftime('%Y-%m'), 'start_date': period_start_date.strftime('%Y-%m-%d'), 'end_date': period_end_date.strftime('%Y-%m-%d'), 'fiscalyear': fiscalyear.id, 'post_move_sequence': fiscalyear.post_move_sequence.id, 'type': 'standard', }, context=context) period_start_date = period_end_date + \ mx.DateTime.RelativeDateTime(days=1) return True
b845799d2120d734146098d956937483de62df38 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9290/b845799d2120d734146098d956937483de62df38/fiscalyear.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 6908, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 16, 3673, 33, 21, 4672, 9163, 1788, 12777, 364, 326, 15324, 771, 11387, 598, 3138, 3673, 9163, 3879, 67, 2603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6908, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 16, 3673, 33, 21, 4672, 9163, 1788, 12777, 364, 326, 15324, 771, 11387, 598, 3138, 3673, 9163, 3879, 67, 2603, ...
if tmp._exp % 2 == 1:
if tmp._exp & 1:
def sqrt(self, context=None): """Return the square root of self.
2d622652a434f33852fa6a10d2707ef06bed2c46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2d622652a434f33852fa6a10d2707ef06bed2c46/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5700, 12, 2890, 16, 819, 33, 7036, 4672, 3536, 990, 326, 8576, 1365, 434, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5700, 12, 2890, 16, 819, 33, 7036, 4672, 3536, 990, 326, 8576, 1365, 434, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.poll(_deadstate=sys.maxint)
self._internal_poll(_deadstate=sys.maxint)
def __del__(self, sys=sys): if not self._child_created: # We didn't get to successfully create a child process. return # In case the child hasn't been waited on, check if it's done. self.poll(_deadstate=sys.maxint) if self.returncode is None and _active is not None: # Child is still running, keep us alive until we can wait on it. _active.append(self)
b4bc9b9192916ecb98bcb7a25acb579db04dac0d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/b4bc9b9192916ecb98bcb7a25acb579db04dac0d/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 16, 2589, 33, 9499, 4672, 309, 486, 365, 6315, 3624, 67, 4824, 30, 468, 1660, 10242, 1404, 336, 358, 4985, 752, 279, 1151, 1207, 18, 327, 468, 657, 648, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 16, 2589, 33, 9499, 4672, 309, 486, 365, 6315, 3624, 67, 4824, 30, 468, 1660, 10242, 1404, 336, 358, 4985, 752, 279, 1151, 1207, 18, 327, 468, 657, 648, 326,...
EXAMPLES:
EXAMPLES::
def share(self, v): r""" Mark a sage_input value as shared, if we are in pedantic mode.
a4aad1557cdf06ed8562711534ca467dff85c855 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/a4aad1557cdf06ed8562711534ca467dff85c855/explain_pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7433, 12, 2890, 16, 331, 4672, 436, 8395, 6622, 279, 272, 410, 67, 2630, 460, 487, 5116, 16, 309, 732, 854, 316, 31840, 9941, 1965, 18, 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, 7433, 12, 2890, 16, 331, 4672, 436, 8395, 6622, 279, 272, 410, 67, 2630, 460, 487, 5116, 16, 309, 732, 854, 316, 31840, 9941, 1965, 18, 2, -100, -100, -100, -100, -100, -100, -100, -10...
ROMAN = ['0', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X']
coding = zip( [1000,900,500,400,100,90,50,40,10,9,5,4,1], ["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"] ) @classmethod def roman(cls, num): if num <= 0 or num >= 4000 or int(num) != num: return str(num) result = [] for d, r in cls.coding: while num >= d: result.append(r) num -= d return ''.join(result)
def createEditor(self, parent, option, index): sb = QItemDelegate.createEditor(self, parent, option, index) sb.setMinimum(0) sb.setMaximum(5) return sb
3cd9d872d84fb7f55fab5d8c9888c98bdf33b8bd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/3cd9d872d84fb7f55fab5d8c9888c98bdf33b8bd/library.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 6946, 12, 2890, 16, 982, 16, 1456, 16, 770, 4672, 2393, 273, 2238, 1180, 9586, 18, 2640, 6946, 12, 2890, 16, 982, 16, 1456, 16, 770, 13, 2393, 18, 542, 13042, 12, 20, 13, 2393, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 6946, 12, 2890, 16, 982, 16, 1456, 16, 770, 4672, 2393, 273, 2238, 1180, 9586, 18, 2640, 6946, 12, 2890, 16, 982, 16, 1456, 16, 770, 13, 2393, 18, 542, 13042, 12, 20, 13, 2393, ...
'test_amino_acids_arg_l_aminoacid',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
3f4a171b835422313ecc0171dd0ab652a7f6a1bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/3f4a171b835422313ecc0171dd0ab652a7f6a1bc/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1930, 3142, 328, 1077, 273, 11311, 8467, 16059, 12, 2890, 18, 1969, 397, 3552, 81, 1291, 7923, 272, 273, 3142, 18, 2930, 10153, 12, 2890, 18, 1969, 397, 3552, 81, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1930, 3142, 328, 1077, 273, 11311, 8467, 16059, 12, 2890, 18, 1969, 397, 3552, 81, 1291, 7923, 272, 273, 3142, 18, 2930, 10153, 12, 2890, 18, 1969, 397, 3552, 81, ...
fdi = open('/usr/share/hal/fdi/policy/20thirdparty/10-libprs500.fdi', 'w')
fdi = open_file('/usr/share/hal/fdi/policy/20thirdparty/10-libprs500.fdi')
def setup_udev_rules(): print 'Trying to setup udev rules...' sys.stdout.flush() groups = open('/etc/group', 'rb').read() group = 'plugdev' if 'plugdev' in groups else 'usb' udev = open('/etc/udev/rules.d/95-libprs500.rules', 'w') udev.write('''# Sony Reader PRS-500\n''' '''BUS=="usb", SYSFS{idProduct}=="029b", SYSFS{idVendor}=="054c", MODE="660", GROUP="%s"\n'''%(group,) ) udev.close() fdi = open('/usr/share/hal/fdi/policy/20thirdparty/10-libprs500.fdi', 'w') fdi.write('<?xml version="1.0" encoding="UTF-8"?>\n\n<deviceinfo version="0.2">\n') for cls in DEVICES: fdi.write(\
45abfd50d363c2402f8a1c54ab39710c64d8866e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/45abfd50d363c2402f8a1c54ab39710c64d8866e/linux.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 1317, 90, 67, 7482, 13332, 1172, 296, 18038, 358, 3875, 582, 5206, 2931, 7821, 2589, 18, 10283, 18, 11330, 1435, 3252, 273, 1696, 2668, 19, 14175, 19, 1655, 2187, 296, 6731, 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, 3875, 67, 1317, 90, 67, 7482, 13332, 1172, 296, 18038, 358, 3875, 582, 5206, 2931, 7821, 2589, 18, 10283, 18, 11330, 1435, 3252, 273, 1696, 2668, 19, 14175, 19, 1655, 2187, 296, 6731, 16...
f.write('\t\t"'+imgName+"_%.2d_%.2d_" % (2*i,2*j) +levels[curLevel+1]+'.json",\n')
f.write('\t\t"'+tmpDirName+"_%.2d_%.2d_" % (2*i,2*j) +levels[curLevel+1]+'.json",\n')
def writeTile(imgName, polys, curLevel, i,j, f): """Write the tile info in the file f""" baseFileName = imgName+"_%.2d_%.2d_" % (i,j) +levels[curLevel] wcs=astWCS.WCS(levels[curLevel]+"/"+baseFileName+".hhh") f.write('{\n') if curLevel==0: f.write('\t"credits" : "Copyright (C) 2008 Brian McLean, STScI Digitized Sky Survey",\n') f.write('\t"infoUrl" : "http://stdatu.stsci.edu/cgi-bin/dss_form",\n') naxis1 = wcs.header.get('NAXIS1') naxis2 = wcs.header.get('NAXIS2') f.write('\t"imageUrl" : "'+levels[curLevel]+"/"+baseFileName+".jpg"+'",\n') writePolys(polys, wcs, f) pos10 = wcs.pix2wcs(1,0) pos01 = wcs.pix2wcs(0,1) pos0 = wcs.pix2wcs(0,0) f.write('\t"minResolution" : %f' % max(abs(pos10[0]-pos0[0]), abs(pos01[1]-pos0[1]))) if curLevel<len(levels)-1: f.write(',\n') f.write('\t"subTiles" :\n\t[\n') if curLevel%2==0: if getIntersectPoly(baseFileName, curLevel+1, 2*i, 2*j)!=None: f.write('\t\t"'+imgName+"_%.2d_%.2d_" % (2*i,2*j) +levels[curLevel+1]+'.json",\n') if getIntersectPoly(baseFileName, curLevel+1, 2*i+1, 2*j)!=None: f.write('\t\t"'+imgName+"_%.2d_%.2d_" % (2*i+1,2*j) +levels[curLevel+1]+'.json",\n') if getIntersectPoly(baseFileName, curLevel+1, 2*i+1, 2*j+1)!=None: f.write('\t\t"'+imgName+"_%.2d_%.2d_" % (2*i+1,2*j+1) +levels[curLevel+1]+'.json",\n') if getIntersectPoly(baseFileName, curLevel+1, 2*i, 2*j+1)!=None: f.write('\t\t"'+imgName+"_%.2d_%.2d_" % (2*i,2*j+1) +levels[curLevel+1]+'.json",\n') else: polys2 = getIntersectPoly(baseFileName, curLevel+1, 2*i, 2*j) if polys2!=None: writeTile(imgName, polys2, curLevel+1, 2*i,2*j, f) f.write(",\n") polys2 = getIntersectPoly(baseFileName, curLevel+1, 2*i+1, 2*j) if polys2!=None: writeTile(imgName, polys2, curLevel+1, 2*i+1,2*j, f) f.write(",\n") polys2 = getIntersectPoly(baseFileName, curLevel+1, 2*i+1, 2*j+1) if polys2!=None: writeTile(imgName, polys2, curLevel+1, 2*i+1,2*j+1, f) f.write(",\n") polys2 = getIntersectPoly(baseFileName, curLevel+1, 2*i, 2*j+1) if polys2!=None: writeTile(imgName, polys2, curLevel+1, 2*i,2*j+1, f) f.write(",\n") f.seek(-2, os.SEEK_CUR) f.write('\n\t]\n') else: f.write('\n') f.write('}')
24efca606fc152cb442e933ed3ac644aee5a1ba4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7604/24efca606fc152cb442e933ed3ac644aee5a1ba4/dssheaderToJSON.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 9337, 12, 6081, 461, 16, 2952, 1900, 16, 662, 2355, 16, 277, 16, 78, 16, 284, 4672, 3536, 3067, 326, 4769, 1123, 316, 326, 585, 284, 8395, 1026, 4771, 273, 3774, 461, 9078, 10185...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 9337, 12, 6081, 461, 16, 2952, 1900, 16, 662, 2355, 16, 277, 16, 78, 16, 284, 4672, 3536, 3067, 326, 4769, 1123, 316, 326, 585, 284, 8395, 1026, 4771, 273, 3774, 461, 9078, 10185...
response = [] for t in tags: response.append((t.id, t.name))
response = [(t.id, t.name) for t in ts]
def get_payee_suggestions(request): if not request.GET['q']: return HttpResponseBadRequest() tags = Payee.objects.filter(name__icontains=request.GET['q']).order_by('name') response = [] for t in tags: response.append((t.id, t.name)) return HttpResponse(json.dumps(response), content_type='application/javascript; charset=utf-8')
8890f8fd82edbd6192bd8eab332b4830893ada94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9105/8890f8fd82edbd6192bd8eab332b4830893ada94/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10239, 1340, 67, 87, 12500, 12, 2293, 4672, 309, 486, 590, 18, 3264, 3292, 85, 3546, 30, 327, 9476, 13403, 1435, 225, 2342, 273, 13838, 1340, 18, 6911, 18, 2188, 12, 529, 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, 336, 67, 10239, 1340, 67, 87, 12500, 12, 2293, 4672, 309, 486, 590, 18, 3264, 3292, 85, 3546, 30, 327, 9476, 13403, 1435, 225, 2342, 273, 13838, 1340, 18, 6911, 18, 2188, 12, 529, 972,...
fc = self.r2ToRGBColor(r2)
fc = cls.r2ToRGBColor(r2)
def drawLDLegend(self, ax, which_LD_statistic): """ 2008-09-29 left half is 10 color patchs, right half is r2 from 0 to 1 """ sys.stderr.write("\t Drawing LD legend ...") xs = [0,0,0.5,0.5] #X-axis value for the 4 points of the rectangle starting from upper left corner. ys = numpy.array([0.1,0,0,0.1]) for i in range(10): r2 = ys[0] #upper bound of ys correspond to r2 fc = self.r2ToRGBColor(r2) poly = Polygon(zip(xs, ys), facecolor=fc, linewidth=0) ax.add_patch(poly) if i%2==0: #every other band ax.text(0.6, ys[0], '%.1f'%r2, horizontalalignment ='left', verticalalignment='top', size=4) ys += 0.1 #increase y-axis ax.text(0.6, 1.1, r"$%s=1.0$"%LD_statistic.get_label(which_LD_statistic), horizontalalignment ='left', verticalalignment='top', size=4) sys.stderr.write("Done.\n")
bdc3752350001c791e90fb2760fcc0578318b113 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9645/bdc3752350001c791e90fb2760fcc0578318b113/DrawSNPRegion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12069, 16812, 12, 2890, 16, 1740, 16, 1492, 67, 12069, 67, 5642, 5846, 4672, 3536, 4044, 28, 17, 5908, 17, 5540, 2002, 8816, 353, 1728, 2036, 4729, 87, 16, 2145, 8816, 353, 436, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12069, 16812, 12, 2890, 16, 1740, 16, 1492, 67, 12069, 67, 5642, 5846, 4672, 3536, 4044, 28, 17, 5908, 17, 5540, 2002, 8816, 353, 1728, 2036, 4729, 87, 16, 2145, 8816, 353, 436, ...
item.cost = i['cost'] item.qty = i['qty']
item.cost = i['cost'] item.qty = i['qty']
def _new(self): results = self.form_result['invoice'] del(results['item_count'])
053b7dde8c1538edcf913367a059962d81c6d969 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12856/053b7dde8c1538edcf913367a059962d81c6d969/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2704, 12, 2890, 4672, 1686, 273, 365, 18, 687, 67, 2088, 3292, 16119, 3546, 1464, 12, 4717, 3292, 1726, 67, 1883, 19486, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2704, 12, 2890, 4672, 1686, 273, 365, 18, 687, 67, 2088, 3292, 16119, 3546, 1464, 12, 4717, 3292, 1726, 67, 1883, 19486, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
s.br_x = 300. s.br_y = 300.
def run(self): s = sane.open(self.selectedScanner)
24ee5ee6380662d3305dfd441bf99e42ad126e7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2085/24ee5ee6380662d3305dfd441bf99e42ad126e7e/scannerthread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 272, 273, 30426, 18, 3190, 12, 2890, 18, 8109, 11338, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 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, 1086, 12, 2890, 4672, 272, 273, 30426, 18, 3190, 12, 2890, 18, 8109, 11338, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
good_version = indentation + good_version + ','
good_version = indentation + "version='%s'," % version
def _update_version(self, version): """Find out where to change the version and change it.
7ecfc67b73daf77f98113ab6a9e867628dc4e779 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12067/7ecfc67b73daf77f98113ab6a9e867628dc4e779/vcs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 1589, 12, 2890, 16, 1177, 4672, 3536, 3125, 596, 1625, 358, 2549, 326, 1177, 471, 2549, 518, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 1589, 12, 2890, 16, 1177, 4672, 3536, 3125, 596, 1625, 358, 2549, 326, 1177, 471, 2549, 518, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if until_date and event_date > until_date:
if until_date and (event_date > until_date):
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if isinstance(select, (str, int, long)): ids = [select] else: ids = select result = [] if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, m.date, m.exdate \ from " + self._table + " m where m.id in ("\ + ','.join(map(lambda x: str(x), ids))+")")
d351065fb195ed7d20a5087a0f650fc37672f39e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d351065fb195ed7d20a5087a0f650fc37672f39e/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 266, 2972, 67, 2232, 12, 2890, 16, 4422, 16, 4555, 16, 2027, 16, 1026, 67, 1937, 67, 712, 16, 1026, 67, 12198, 67, 712, 16, 1800, 33, 6625, 4672, 309, 486, 1800, 30, 1800, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 266, 2972, 67, 2232, 12, 2890, 16, 4422, 16, 4555, 16, 2027, 16, 1026, 67, 1937, 67, 712, 16, 1026, 67, 12198, 67, 712, 16, 1800, 33, 6625, 4672, 309, 486, 1800, 30, 1800, ...
oldChange['oldvalue'] += " " + ticketChange['oldvalue']
oldChange['oldvalue'] += " " + ticketChange['oldvalue']
def convert(_db, _host, _user, _password, _env, _force): activityFields = FieldTranslator() # account for older versions of bugzilla print "Using Bugzilla v%s schema." % BZ_VERSION if BZ_VERSION == 2110: activityFields['removed'] = "oldvalue" activityFields['added'] = "newvalue" # init Bugzilla environment print "Bugzilla MySQL('%s':'%s':'%s':'%s'): connecting..." % \ (_db, _host, _user, ("*" * len(_password))) mysql_con = MySQLdb.connect(host=_host, user=_user, passwd=_password, db=_db, compress=1, cursorclass=MySQLdb.cursors.DictCursor) mysql_cur = mysql_con.cursor() # init Trac environment print "Trac SQLite('%s'): connecting..." % (_env) trac = TracDatabase(_env) # force mode... if _force == 1: print "\nCleaning all tickets..." c = trac.db().cursor() c.execute("DELETE FROM ticket_change") trac.db().commit() c.execute("DELETE FROM ticket") trac.db().commit() c.execute("DELETE FROM attachment") attachments_dir = os.path.join(os.path.normpath(trac.env.path), "attachments") # Straight from the Python documentation. for root, dirs, files in os.walk(attachments_dir, topdown=False): for name in files: os.remove(os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name)) if not os.stat(attachments_dir): os.mkdir(attachments_dir) trac.db().commit() print "All tickets cleaned..." print "\n0. Filtering products..." mysql_cur.execute("SELECT name FROM products") products = [] for line in mysql_cur.fetchall(): product = line['name'] if PRODUCTS and product not in PRODUCTS: continue if product in IGNORE_PRODUCTS: continue products.append(product) PRODUCTS[:] = products print " Using products", " ".join(PRODUCTS) print "\n1. Import severities..." trac.setSeverityList(SEVERITIES) print "\n2. Import components..." if not COMPONENTS_FROM_PRODUCTS: if BZ_VERSION >= 2180: sql = """SELECT DISTINCT c.name AS name, c.initialowner AS owner FROM components AS c, products AS p WHERE c.product_id = p.id AND""" sql += makeWhereClause('p.name', PRODUCTS) else: sql = "SELECT value AS name, initialowner AS owner FROM components" sql += " WHERE" + makeWhereClause('program', PRODUCTS) mysql_cur.execute(sql) components = mysql_cur.fetchall() for component in components: component['owner'] = trac.getLoginName(mysql_cur, component['owner']) trac.setComponentList(components, 'name') else: sql = """SELECT program AS product, value AS comp, initialowner AS owner FROM components""" sql += " WHERE" + makeWhereClause('program', PRODUCTS) mysql_cur.execute(sql) lines = mysql_cur.fetchall() all_components = {} # product -> components all_owners = {} # product, component -> owner for line in lines: product = line['product'] comp = line['comp'] owner = line['owner'] all_components.setdefault(product, []).append(comp) all_owners[(product, comp)] = owner component_list = [] for product, components in all_components.items(): # find best default owner default = None for comp in DEFAULT_COMPONENTS: if comp in components: default = comp break if default is None: default = components[0] owner = all_owners[(product, default)] owner_name = trac.getLoginName(mysql_cur, owner) component_list.append({'product': product, 'owner': owner_name}) trac.setComponentList(component_list, 'product') print "\n3. Import priorities..." trac.setPriorityList(PRIORITIES) print "\n4. Import versions..." if BZ_VERSION >= 2180: sql = """SELECT DISTINCTROW versions.value AS value FROM products, versions""" sql += " WHERE" + makeWhereClause('products.name', PRODUCTS) else: sql = "SELECT DISTINCTROW value FROM versions" sql += " WHERE" + makeWhereClause('program', PRODUCTS) mysql_cur.execute(sql) versions = mysql_cur.fetchall() trac.setVersionList(versions, 'value') print "\n5. Import milestones..." sql = "SELECT DISTINCT value FROM milestones" sql += " WHERE" + makeWhereClause('value', IGNORE_MILESTONES, negative=True) mysql_cur.execute(sql) milestones = mysql_cur.fetchall() trac.setMilestoneList(milestones, 'value') print "\n6. Retrieving bugs..." sql = """SELECT DISTINCT b.*, c.name AS component, p.name AS product FROM bugs AS b, components AS c, products AS p """ sql += " WHERE (" + makeWhereClause('p.name', PRODUCTS) sql += ") AND b.product_id = p.id" sql += " AND b.component_id = c.id" sql += " ORDER BY b.bug_id" mysql_cur.execute(sql) bugs = mysql_cur.fetchall() print "\n7. Import bugs and bug activity..." for bug in bugs: bugid = bug['bug_id'] ticket = {} keywords = [] ticket['id'] = bugid ticket['time'] = bug['creation_ts'] ticket['changetime'] = bug['delta_ts'] if COMPONENTS_FROM_PRODUCTS: ticket['component'] = bug['product'] else: ticket['component'] = bug['component'] ticket['severity'] = bug['bug_severity'] ticket['priority'] = bug['priority'].lower() ticket['owner'] = trac.getLoginName(mysql_cur, bug['assigned_to']) ticket['reporter'] = trac.getLoginName(mysql_cur, bug['reporter']) mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s", bugid) cc_records = mysql_cur.fetchall() cc_list = [] for cc in cc_records: cc_list.append(trac.getLoginName(mysql_cur, cc['who'])) cc_list = [cc for cc in cc_list if '@' in cc and cc not in IGNORE_CC] ticket['cc'] = string.join(cc_list, ', ') ticket['version'] = bug['version'] target_milestone = bug['target_milestone'] if target_milestone in IGNORE_MILESTONES: target_milestone = '' ticket['milestone'] = target_milestone bug_status = bug['bug_status'].lower() ticket['status'] = statusXlator[bug_status] ticket['resolution'] = bug['resolution'].lower() # a bit of extra work to do open tickets if bug_status == 'open': if owner != '': ticket['status'] = 'assigned' else: ticket['status'] = 'new' ticket['summary'] = bug['short_desc'] mysql_cur.execute("SELECT * FROM longdescs WHERE bug_id = %s" % bugid) longdescs = list(mysql_cur.fetchall()) # check for empty 'longdescs[0]' field... if len(longdescs) == 0: ticket['description'] = '' else: ticket['description'] = longdescs[0]['thetext'] del longdescs[0] for desc in longdescs: ignore = False for comment in IGNORE_COMMENTS: if re.match(comment, desc['thetext']): ignore = True if ignore: continue trac.addTicketComment(ticket=bugid, time = desc['bug_when'], author=trac.getLoginName(mysql_cur, desc['who']), value = desc['thetext']) mysql_cur.execute("""SELECT * FROM bugs_activity WHERE bug_id = %s ORDER BY bug_when""" % bugid) bugs_activity = mysql_cur.fetchall() resolution = '' ticketChanges = [] keywords = [] for activity in bugs_activity: field_name = trac.getFieldName(mysql_cur, activity['fieldid']).lower() removed = activity[activityFields['removed']] added = activity[activityFields['added']] # statuses and resolutions are in lowercase in trac if field_name == "resolution" or field_name == "bug_status": removed = removed.lower() added = added.lower() # remember most recent resolution, we need this later if field_name == "resolution": resolution = added.lower() add_keywords = [] remove_keywords = [] # convert bugzilla field names... if field_name == "bug_severity": field_name = "severity" elif field_name == "assigned_to": field_name = "owner" elif field_name == "bug_status": field_name = "status" if removed in STATUS_KEYWORDS: remove_keywords.append(STATUS_KEYWORDS[removed]) if added in STATUS_KEYWORDS: add_keywords.append(STATUS_KEYWORDS[added]) added = statusXlator[added] removed = statusXlator[removed] elif field_name == "short_desc": field_name = "summary" elif field_name == "product" and COMPONENTS_FROM_PRODUCTS: field_name = "component" elif ((field_name == "product" and not COMPONENTS_FROM_PRODUCTS) or (field_name == "component" and COMPONENTS_FROM_PRODUCTS)): if MAP_ALL_KEYWORDS or removed in KEYWORDS_MAPPING: kw = KEYWORDS_MAPPING.get(removed, removed) if kw: remove_keywords.append(kw) if MAP_ALL_KEYWORDS or added in KEYWORDS_MAPPING: kw = KEYWORDS_MAPPING.get(added, added) if kw: add_keywords.append(kw) if field_name == "component": # just keep the keyword change added = removed = "" elif field_name == "target_milestone": field_name = "milestone" if added in IGNORE_MILESTONES: added = "" if removed in IGNORE_MILESTONES: removed = "" ticketChange = {} ticketChange['ticket'] = bugid ticketChange['time'] = activity['bug_when'] ticketChange['author'] = trac.getLoginName(mysql_cur, activity['who']) ticketChange['field'] = field_name ticketChange['oldvalue'] = removed ticketChange['newvalue'] = added if add_keywords or remove_keywords: # ensure removed ones are in old old_keywords = keywords + [kw for kw in remove_keywords if kw not in keywords] # remove from new keywords = [kw for kw in keywords if kw not in remove_keywords] # add to new keywords += [kw for kw in add_keywords if kw not in keywords] if old_keywords != keywords: ticketChangeKw = ticketChange.copy() ticketChangeKw['field'] = "keywords" ticketChangeKw['oldvalue'] = ' '.join(old_keywords) ticketChangeKw['newvalue'] = ' '.join(keywords) ticketChanges.append(ticketChangeKw) if field_name in IGNORED_ACTIVITY_FIELDS: continue # Skip changes that have no effect (think translation!). if added == removed: continue # Bugzilla splits large summary changes into two records. for oldChange in ticketChanges: if (field_name == "summary" and oldChange['field'] == ticketChange['field'] and oldChange['time'] == ticketChange['time'] and oldChange['author'] == ticketChange['author']): oldChange['oldvalue'] += " " + ticketChange['oldvalue'] oldChange['newvalue'] += " " + ticketChange['newvalue'] break # cc sometime appear in different activities with same time if (field_name == "cc" \ and oldChange['time'] == ticketChange['time']): oldChange['newvalue'] += ", " + ticketChange['newvalue'] break else: ticketChanges.append (ticketChange) for ticketChange in ticketChanges: trac.addTicketChange (**ticketChange) # For some reason, bugzilla v2.11 seems to clear the resolution # when you mark a bug as closed. Let's remember it and restore # it if the ticket is closed but there's no resolution. if not ticket['resolution'] and ticket['status'] == "closed": ticket['resolution'] = resolution bug_status = bug['bug_status'] if bug_status in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[bug_status] if kw not in keywords: keywords.append(kw) product = bug['product'] if product in KEYWORDS_MAPPING and not COMPONENTS_FROM_PRODUCTS: kw = KEYWORDS_MAPPING.get(product, product) if kw and kw not in keywords: keywords.append(kw) component = bug['component'] if (COMPONENTS_FROM_PRODUCTS and \ (MAP_ALL_KEYWORDS or component in KEYWORDS_MAPPING)): kw = KEYWORDS_MAPPING.get(component, component) if kw and kw not in keywords: keywords.append(kw) ticket['keywords'] = string.join(keywords) ticketid = trac.addTicket(**ticket) mysql_cur.execute("SELECT * FROM attachments WHERE bug_id = %s" % bugid) attachments = mysql_cur.fetchall() for a in attachments: author = trac.getLoginName(mysql_cur, a['submitter_id']) trac.addAttachment(author, a) print "\n8. Importing users and passwords..." if BZ_VERSION >= 2180: mysql_cur.execute("SELECT login_name, cryptpassword FROM profiles") users = mysql_cur.fetchall() htpasswd = file("htpasswd", 'w') for user in users: if LOGIN_MAP.has_key(user['login_name']): login = LOGIN_MAP[user['login_name']] else: login = user['login_name'] htpasswd.write(login + ":" + user['cryptpassword'] + "\n") htpasswd.close() print " Bugzilla users converted to htpasswd format, see 'htpasswd'." print "\nAll tickets converted."
96cc24322ea11500094f96e7b8dc5b0c7e85d253 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/96cc24322ea11500094f96e7b8dc5b0c7e85d253/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 24899, 1966, 16, 389, 2564, 16, 389, 1355, 16, 389, 3664, 16, 389, 3074, 16, 389, 5734, 4672, 5728, 2314, 273, 2286, 12233, 1435, 225, 468, 2236, 364, 12156, 5244, 434, 7934, 15990...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 24899, 1966, 16, 389, 2564, 16, 389, 1355, 16, 389, 3664, 16, 389, 3074, 16, 389, 5734, 4672, 5728, 2314, 273, 2286, 12233, 1435, 225, 468, 2236, 364, 12156, 5244, 434, 7934, 15990...
vwriter.addData3f( 1+offsetx, 0, -1-offsety) vwriter.addData3f( 1+offsetx, 0, 1+offsety) vwriter.addData3f(-1-offsetx, 0, 1+offsety)
vwriter.addData3f(1+offsetx, 0, -1-offsety) vwriter.addData3f(1+offsetx, 0, 1+offsety) vwriter.addData3f(-1-offsetx, 0, 1+offsety)
def makeFrame(self, sizex, sizey): """Access: private. Each texture card is displayed with a two-pixel wide frame (a ring of black and a ring of white). This routine builds the frame geometry. It is necessary to be precise so that the frame exactly aligns to pixel boundaries, and so that it doesn't overlap the card at all."""
bb22ee7bc01ec7e5f945f8fcc01f9b11bca8b8f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/bb22ee7bc01ec7e5f945f8fcc01f9b11bca8b8f6/BufferViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 3219, 12, 2890, 16, 272, 452, 338, 16, 272, 452, 402, 4672, 3536, 1862, 30, 3238, 18, 225, 8315, 11428, 5270, 353, 10453, 598, 279, 2795, 17, 11743, 14812, 2623, 261, 69, 9221, 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, 1221, 3219, 12, 2890, 16, 272, 452, 338, 16, 272, 452, 402, 4672, 3536, 1862, 30, 3238, 18, 225, 8315, 11428, 5270, 353, 10453, 598, 279, 2795, 17, 11743, 14812, 2623, 261, 69, 9221, 4...
tarcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (tarcmd)
zipcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (zipcmd)
def listZipVaadinJarFiles(zipfile, vaadinversion): jarfile = "vaadin-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion) extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid()) tarcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (tarcmd) files = listJarFiles(extractedjar) command ("rm %s" % (extractedjar)) return files
bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 9141, 31520, 10813, 2697, 12, 4450, 768, 16, 14162, 25422, 1589, 4672, 7334, 768, 273, 315, 15304, 25422, 6456, 87, 19, 4079, 1350, 19, 15304, 25422, 6456, 87, 18, 11930, 6, 738, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 9141, 31520, 10813, 2697, 12, 4450, 768, 16, 14162, 25422, 1589, 4672, 7334, 768, 273, 315, 15304, 25422, 6456, 87, 19, 4079, 1350, 19, 15304, 25422, 6456, 87, 18, 11930, 6, 738, 26...
if self.config['premium'] == "True":
if bool(self.config['premium']):
def get_wait_time(self):
51dfdc552fd474f20f0768818584e8b3c78a5e30 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/51dfdc552fd474f20f0768818584e8b3c78a5e30/RapidshareCom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7048, 67, 957, 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...
[ 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, 336, 67, 7048, 67, 957, 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, ...
IPATH=['pandaapp/src/indexify'] OPTS=['NSPR', 'FREETYPE'] CompileC(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='font-samples_default_font.obj') CompileC(ipath=IPATH, opts=OPTS, src='fontSamples.cxx', obj='font-samples_fontSamples.obj') CompileLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='font-samples.exe', obj=[ 'font-samples_default_font.obj', 'font-samples_fontSamples.obj', 'libpanda.dll', 'libpandaexpress.dll', 'libdtool.dll', 'libdtoolconfig.dll', 'libprogbase.lib', 'libpandatoolbase.lib', 'libpystub.dll', ]) CompileC(ipath=IPATH, opts=OPTS, src='default_index_icons.cxx', obj='indexify_default_index_icons.obj') CompileC(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='indexify_default_font.obj') CompileC(ipath=IPATH, opts=OPTS, src='indexImage.cxx', obj='indexify_indexImage.obj') CompileC(ipath=IPATH, opts=OPTS, src='indexParameters.cxx', obj='indexify_indexParameters.obj') CompileC(ipath=IPATH, opts=OPTS, src='indexify.cxx', obj='indexify_indexify.obj') CompileC(ipath=IPATH, opts=OPTS, src='photo.cxx', obj='indexify_photo.obj') CompileC(ipath=IPATH, opts=OPTS, src='rollDirectory.cxx', obj='indexify_rollDirectory.obj') CompileLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='indexify.exe', obj=[ 'indexify_default_index_icons.obj', 'indexify_default_font.obj', 'indexify_indexImage.obj', 'indexify_indexParameters.obj', 'indexify_indexify.obj', 'indexify_photo.obj', 'indexify_rollDirectory.obj', 'libpanda.dll', 'libpandaexpress.dll', 'libdtool.dll', 'libdtoolconfig.dll', 'libprogbase.lib', 'libpandatoolbase.lib', 'libpystub.dll', ])
if OMIT.count("FREETYPE")==0: IPATH=['pandaapp/src/indexify'] OPTS=['NSPR', 'FREETYPE'] CompileC(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='font-samples_default_font.obj') CompileC(ipath=IPATH, opts=OPTS, src='fontSamples.cxx', obj='font-samples_fontSamples.obj') CompileLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='font-samples.exe', obj=[ 'font-samples_default_font.obj', 'font-samples_fontSamples.obj', 'libpanda.dll', 'libpandaexpress.dll', 'libdtool.dll', 'libdtoolconfig.dll', 'libprogbase.lib', 'libpandatoolbase.lib', 'libpystub.dll', ]) CompileC(ipath=IPATH, opts=OPTS, src='default_index_icons.cxx', obj='indexify_default_index_icons.obj') CompileC(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='indexify_default_font.obj') CompileC(ipath=IPATH, opts=OPTS, src='indexImage.cxx', obj='indexify_indexImage.obj') CompileC(ipath=IPATH, opts=OPTS, src='indexParameters.cxx', obj='indexify_indexParameters.obj') CompileC(ipath=IPATH, opts=OPTS, src='indexify.cxx', obj='indexify_indexify.obj') CompileC(ipath=IPATH, opts=OPTS, src='photo.cxx', obj='indexify_photo.obj') CompileC(ipath=IPATH, opts=OPTS, src='rollDirectory.cxx', obj='indexify_rollDirectory.obj') CompileLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='indexify.exe', obj=[ 'indexify_default_index_icons.obj', 'indexify_default_font.obj', 'indexify_indexImage.obj', 'indexify_indexParameters.obj', 'indexify_indexify.obj', 'indexify_photo.obj', 'indexify_rollDirectory.obj', 'libpanda.dll', 'libpandaexpress.dll', 'libdtool.dll', 'libdtoolconfig.dll', 'libprogbase.lib', 'libpandatoolbase.lib', 'libpystub.dll', ])
if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
a63f47271ab4a19ab9069ffdbc7d8d989027f9f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/a63f47271ab4a19ab9069ffdbc7d8d989027f9f8/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 261, 1125, 422, 296, 2124, 12904, 11, 4672, 2195, 273, 2195, 397, 6619, 318, 536, 315, 397, 498, 397, 1548, 82, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 261, 1125, 422, 296, 2124, 12904, 11, 4672, 2195, 273, 2195, 397, 6619, 318, 536, 315, 397, 498, 397, 1548, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
pass
self.plugin.pida.mainwindow.set_title(title)
def set_title(self, title): pass
229c8da1246a778accf8ce9ef46ed77fa63b42c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/229c8da1246a778accf8ce9ef46ed77fa63b42c8/edit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2649, 12, 2890, 16, 2077, 4672, 1342, 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, 444, 67, 2649, 12, 2890, 16, 2077, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.languages_by_size = ['en', 'de', 'nl', 'sv']
self.languages_by_size = ['en', 'de', 'es', 'nl', 'sv', 'fr', 'eo', 'pl'] alphabetic = ['de', 'en', 'es', 'eo', 'fr', 'nl', 'pl', 'sv']
def __init__(self): family.Family.__init__(self) self.name = 'memoryalpha' self.langs = { 'de': None, 'en': None, 'nl': None, 'sv': None, } # Most namespaces are inherited from family.Family. self.namespaces[4] = { '_default': [u'Memory Alpha', self.namespaces[4]['_default']], } self.namespaces[5] = { '_default': [u'Memory Alpha talk', self.namespaces[5]['_default']], 'de': u'Memory Alpha Diskussion', 'nl': u'Overleg Memory Alpha', 'sv': u'Memory Alphadiskussion', } # A few selected big languages for things that we do not want to loop over # all languages. This is only needed by the titletranslate.py module, so # if you carefully avoid the options, you could get away without these # for another wiki family. self.languages_by_size = ['en', 'de', 'nl', 'sv']
f16f258cba4554c2a00291799ca165a2daeaaa40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/f16f258cba4554c2a00291799ca165a2daeaaa40/memoryalpha_family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 7858, 5429, 11, 225, 365, 18, 4936, 87, 273, 288, 296, 323, 4278, 599, 16, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 7858, 5429, 11, 225, 365, 18, 4936, 87, 273, 288, 296, 323, 4278, 599, 16, 29...
def fl_set_choice_align(ob, align): """ fl_set_choice_align(ob, align) """ _fl_set_choice_align(ob, align) _fl_get_choice_item_mode = cfuncproto(so_libforms, "fl_get_choice_item_mode", cty.c_int, [cty.POINTER(FL_OBJECT), cty.c_int],
def fl_set_choice_align(pObject, align): """ fl_set_choice_align(pObject, align) """ _fl_set_choice_align(pObject, align) _fl_get_choice_item_mode = cfuncproto(so_libforms, "fl_get_choice_item_mode", cty.c_int, [cty.POINTER(FL_OBJECT), cty.c_int],
def fl_set_choice_align(ob, align): """ fl_set_choice_align(ob, align) """ _fl_set_choice_align(ob, align)
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, 11569, 67, 7989, 12, 947, 16, 5689, 4672, 3536, 1183, 67, 542, 67, 11569, 67, 7989, 12, 947, 16, 5689, 13, 3536, 225, 389, 2242, 67, 542, 67, 11569, 67, 7989, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 11569, 67, 7989, 12, 947, 16, 5689, 4672, 3536, 1183, 67, 542, 67, 11569, 67, 7989, 12, 947, 16, 5689, 13, 3536, 225, 389, 2242, 67, 542, 67, 11569, 67, 7989, 12, ...
res = self.__removeCatalogReplica(replicaTuples)
res = self.__removeCatalogReplica( replicaTuples )
def __removeReplica(self,storageElementName,fileTuple): pfnDict = {} for lfn,pfn in fileTuple: pfnDict[pfn] = lfn failed = {} res = self.__removePhysicalReplica(storageElementName,pfnDict.keys()) if not res['OK']: errStr = "ReplicaManager.__removeReplica: Failed to remove catalog replicas." gLogger.error(errStr,res['Message']) return S_ERROR(errStr) for pfn,error in res['Value']['Failed'].items(): failed[pfnDict[pfn]] = error replicaTuples = [] for pfn in res['Value']['Successful'].keys(): replicaTuple = (pfnDict[pfn],pfn,storageElementName) replicaTuples.append(replicaTuple) successful = {} res = self.__removeCatalogReplica(replicaTuples) if not res['OK']: errStr = "ReplicaManager.__removeReplica: Completely failed to remove physical files." gLogger.error(errStr,res['Message']) for lfn in pfnDict.values(): if not failed.has_key(lfn): failed[lfn] = errStr else: failed.update(res['Value']['Failed']) successful = res['Value']['Successful'] resDict = {'Successful':successful,'Failed':failed} return S_OK(resDict)
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4479, 14222, 12, 2890, 16, 5697, 30584, 16, 768, 9038, 4672, 293, 4293, 5014, 273, 2618, 364, 328, 4293, 16, 84, 4293, 316, 585, 9038, 30, 293, 4293, 5014, 63, 84, 4293, 65, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4479, 14222, 12, 2890, 16, 5697, 30584, 16, 768, 9038, 4672, 293, 4293, 5014, 273, 2618, 364, 328, 4293, 16, 84, 4293, 316, 585, 9038, 30, 293, 4293, 5014, 63, 84, 4293, 65, 273,...
include_dirs = db_incs, libraries = ['db'] ) ) else: db_incs = find_file('db.h', inc_dirs, []) if db_incs is not None: exts.append( Extension('bsddb', ['bsddbmodule.c'], include_dirs = db_incs) )
include_dirs = db185_incs, define_macros=[('HAVE_DB_185_H',1)], libraries = dblib ) ) elif db_inc is not None: exts.append( Extension('bsddb', ['bsddbmodule.c'], include_dirs = db_inc, libraries = dblib) )
def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.append('/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.append( '/usr/local/include' )
e44d999cb953a61acdcb7d9d7bd2ad590c3a7017 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e44d999cb953a61acdcb7d9d7bd2ad590c3a7017/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 30, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 30, 365, ...
def CopyWithInsertion(input, commentPrefix, retainDefs, *lists):
def CopyWithInsertion(input, commentPrefix, retainDefs, eolType, *lists):
def CopyWithInsertion(input, commentPrefix, retainDefs, *lists): copying = 1 listid = 0 output = [] for line in input.split("\n"): isStartGenerated = line.startswith(commentPrefix + "++Autogenerated") if copying and not isStartGenerated: output.append(line) if isStartGenerated: if retainDefs: output.append(line) copying = 0 definition = "" elif not copying and line.startswith(commentPrefix + "**"): if retainDefs: output.append(line) definition = line[len(commentPrefix + "**"):] listid = 0 if definition[0] in string.digits: listid = int(definition[:1]) definition = definition[2:] # Hide double slashes as a control character definition = definition.replace("\\\\", "\001") # Do some normal C style transforms definition = definition.replace("\\n", "\n") definition = definition.replace("\\t", "\t") # Get the doubled backslashes back as single backslashes definition = definition.replace("\001", "\\") startRepeat = definition.find("\\(") endRepeat = definition.find("\\)") intro = definition[:startRepeat] out = "" if intro.endswith("\n"): pos = 0 else: pos = len(intro) out += intro middle = definition[startRepeat+2:endRepeat] for i in lists[listid]: item = middle.replace("\\*", i) if pos and (pos + len(item) >= 80): out += "\\\n" pos = 0 out += item pos += len(item) if item.endswith("\n"): pos = 0 outro = definition[endRepeat+2:] out += outro output.append(out) elif line.startswith(commentPrefix + "--Autogenerated"): copying = 1 if retainDefs: output.append(line) ret = "\n".join(output) ret = ret.replace(" \n", "\n") return ret
2e64c228af0a6aace1ad3f50ebde97c7fdfa34f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6874/2e64c228af0a6aace1ad3f50ebde97c7fdfa34f3/LexGen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5631, 1190, 29739, 12, 2630, 16, 2879, 2244, 16, 15096, 14554, 16, 14775, 559, 16, 380, 9772, 4672, 8933, 273, 404, 666, 350, 273, 374, 876, 273, 5378, 364, 980, 316, 810, 18, 4939, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5631, 1190, 29739, 12, 2630, 16, 2879, 2244, 16, 15096, 14554, 16, 14775, 559, 16, 380, 9772, 4672, 8933, 273, 404, 666, 350, 273, 374, 876, 273, 5378, 364, 980, 316, 810, 18, 4939, 31...
if opt is not "type":
if opt[:4] != "type":
def __init__(self,cache_dir,log_dir,config_file,dax=0): """ @param cache_dir: the directory to write the output lal cache files to. @param log_dir: the directory to write the stderr file to. @param config_file: ConfigParser object containing the path to the LSCdataFind executable in the [condor] section and a [datafind] section from which the LSCdataFind options are read. """ self.__executable = config_file.get('condor','datafind') self.__universe = 'local' CondorDAGJob.__init__(self,self.__universe,self.__executable) AnalysisJob.__init__(self,config_file) self.__cache_dir = cache_dir self.__dax = dax self.__config_file = config_file
1aebc1e6de83988652cfe4fd17ee18f2502b7381 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/1aebc1e6de83988652cfe4fd17ee18f2502b7381/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2493, 67, 1214, 16, 1330, 67, 1214, 16, 1425, 67, 768, 16, 72, 651, 33, 20, 4672, 3536, 632, 891, 1247, 67, 1214, 30, 326, 1867, 358, 1045, 326, 876, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2493, 67, 1214, 16, 1330, 67, 1214, 16, 1425, 67, 768, 16, 72, 651, 33, 20, 4672, 3536, 632, 891, 1247, 67, 1214, 30, 326, 1867, 358, 1045, 326, 876, ...
self.logger.debug(parts) self.etenergy.append(convertor(self.float(parts[0]),"eV","cm-1")) self.etwavelen.append(self.float(parts[2])) self.etosc.append(self.float(parts[4].split("=")[1])) self.etsym.append(line[21:36].split())
self.etenergies.append(convertor(self.float(parts[0]),"eV","cm-1")) self.etoscs.append(self.float(parts[4].split("=")[1])) self.etsyms.append(line[21:36].split())
def parse(self): """Extract information from the logfile.""" inputfile = open(self.filename,"r") for line in inputfile: if line[1:8]=="NAtoms=":
47c8821cc88c71efe3af04aace14c00a4fd2b2e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/47c8821cc88c71efe3af04aace14c00a4fd2b2e5/g03parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 4672, 3536, 4976, 1779, 628, 326, 15204, 12123, 810, 768, 273, 1696, 12, 2890, 18, 3459, 10837, 86, 7923, 364, 980, 316, 810, 768, 30, 225, 309, 980, 63, 21, 30, 28, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 4672, 3536, 4976, 1779, 628, 326, 15204, 12123, 810, 768, 273, 1696, 12, 2890, 18, 3459, 10837, 86, 7923, 364, 980, 316, 810, 768, 30, 225, 309, 980, 63, 21, 30, 28, ...
self.display(model, modelfield)
for field in model.mgroup.fields: values[field] = model[field].get(model, check_load=False) self.display(model, values)
def reset(self, model): modelfield = None if model: modelfield = model.mgroup.mfields.get(self.widget_name, None) if modelfield and 'valid' in modelfield.get_state_attrs(model): modelfield.get_state_attrs(model)['valid'] = True self.display(model, modelfield)
4ee866dfce5acc6576bdb0ff1f3176688b9d4844 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/4ee866dfce5acc6576bdb0ff1f3176688b9d4844/form.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 16, 938, 4672, 938, 1518, 273, 599, 309, 938, 30, 938, 1518, 273, 938, 18, 81, 1655, 18, 81, 2821, 18, 588, 12, 2890, 18, 6587, 67, 529, 16, 599, 13, 309, 938, 1518...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 16, 938, 4672, 938, 1518, 273, 599, 309, 938, 30, 938, 1518, 273, 938, 18, 81, 1655, 18, 81, 2821, 18, 588, 12, 2890, 18, 6587, 67, 529, 16, 599, 13, 309, 938, 1518...
querySource = trovesource.stack(changeSetSource, client.getRepos())
if recurseRepos: querySource = trovesource.stack(changeSetSource, client.getRepos()) else: querySource = changeSetSource
def displayChangeSet(db, cs, troveSpecs, cfg, # trove options info = False, digSigs = False, deps = False, showBuildReqs = False, all = False, # file options ls = False, lsl = False, ids = False, sha1s = False, tags = False, fileDeps = False, fileVersions = False, # collection options showTroves = False, recurse = None, showAllTroves = False, weakRefs = False, showTroveFlags = False, alwaysDisplayHeaders = False, # job options showChanges = False, asJob = False): if all: deps = tags = recurse = showTroveFlags = showAllTroves = True if ls: fileDeps = lsl = True if showChanges: lsl = True client = conaryclient.ConaryClient(cfg) repos = client.getRepos() if not asJob and not showChanges and cs.isAbsolute(): changeSetSource = trovesource.ChangesetFilesTroveSource(None) changeSetSource.addChangeSet(cs) if not troveSpecs: troveTups = cs.getPrimaryTroveList() primary = True if not troveTups: log.warning('No primary troves in changeset, listing all troves') troveTups = [(x.getName(), x.getNewVersion(), x.getNewFlavor())\ for x in cs.iterNewTroveList()] else: troveTups, primary = query.getTrovesToDisplay(changeSetSource, troveSpecs) querySource = trovesource.stack(changeSetSource, client.getRepos()) dcfg = display.DisplayConfig(querySource, client.db) dcfg.setTroveDisplay(deps=deps, info=info, fullFlavors=cfg.fullFlavors, showLabels=cfg.showLabels, baseFlavors=cfg.flavor) dcfg.setFileDisplay(ls=ls, lsl=lsl, ids=ids, sha1s=sha1s, tags=tags, fileDeps=fileDeps, fileVersions=fileVersions) recurseOne = showTroves or showAllTroves or weakRefs if recurse is None and not recurseOne: # if we didn't explicitly set recurse and we're not recursing one # level explicitly recurse = True in (ls, lsl, ids, sha1s, tags, deps, fileDeps, fileVersions) dcfg.setChildDisplay(recurseAll = recurse, recurseOne = recurseOne, showNotByDefault = showAllTroves, showWeakRefs = weakRefs, showTroveFlags = showTroveFlags, displayHeaders = alwaysDisplayHeaders or showTroveFlags) if primary: dcfg.setPrimaryTroves(set(troveTups)) formatter = display.TroveFormatter(dcfg) display.displayTroves(dcfg, formatter, troveTups) else: changeSetSource = trovesource.ChangeSetJobSource(repos, trovesource.stack(db, repos)) changeSetSource.addChangeSet(cs) jobs = getJobsToDisplay(changeSetSource, troveSpecs) dcfg = display.JobDisplayConfig(changeSetSource, client.db) dcfg.setJobDisplay(showChanges=showChanges, compressJobs=not cfg.showComponents) dcfg.setTroveDisplay(deps=deps, info=info, fullFlavors=cfg.fullFlavors, showLabels=cfg.showLabels, baseFlavors=cfg.flavor) dcfg.setFileDisplay(ls=ls, lsl=lsl, ids=ids, sha1s=sha1s, tags=tags, fileDeps=fileDeps, fileVersions=fileVersions) recurseOne = showTroves or showAllTroves or weakRefs if recurse is None and not recurseOne: # if we didn't explicitly set recurse and we're not recursing one # level explicitly and we specified troves (so everything won't # show up at the top level anyway), guess at whether to recurse recurse = True in (ls, lsl, ids, sha1s, tags, deps, fileDeps, fileVersions) dcfg.setChildDisplay(recurseAll = recurse, recurseOne = recurseOne, showNotByDefault = showAllTroves, showWeakRefs = weakRefs, showTroveFlags = showTroveFlags) formatter = display.JobFormatter(dcfg) display.displayJobs(dcfg, formatter, jobs)
0bc435f0ac3ac18fa0c6982931c2e3c4b857b049 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/0bc435f0ac3ac18fa0c6982931c2e3c4b857b049/showchangeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 21565, 12, 1966, 16, 2873, 16, 23432, 537, 15999, 16, 2776, 16, 468, 23432, 537, 702, 1123, 273, 1083, 16, 3097, 8267, 87, 273, 1083, 16, 8740, 273, 1083, 16, 2405, 3116, 6113, 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, 2562, 21565, 12, 1966, 16, 2873, 16, 23432, 537, 15999, 16, 2776, 16, 468, 23432, 537, 702, 1123, 273, 1083, 16, 3097, 8267, 87, 273, 1083, 16, 8740, 273, 1083, 16, 2405, 3116, 6113, 8...
@unittest.skipIf(Value is None, "requires ctypes.Value")
def test_sharedctypes(self, lock=False): x = Value('i', 7, lock=lock) y = Value(c_double, 1.0/3.0, lock=lock) foo = Value(_Foo, 3, 2, lock=lock) arr = self.Array('d', list(range(10)), lock=lock) string = self.Array('c', 20, lock=lock) string.value = 'hello'
fd8326704a001f539cb22d3f1c0abda08bf99805 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/fd8326704a001f539cb22d3f1c0abda08bf99805/test_multiprocessing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11574, 299, 989, 12, 2890, 16, 2176, 33, 8381, 4672, 619, 273, 1445, 2668, 77, 2187, 2371, 16, 2176, 33, 739, 13, 677, 273, 1445, 12, 71, 67, 9056, 16, 404, 18, 20, 19, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11574, 299, 989, 12, 2890, 16, 2176, 33, 8381, 4672, 619, 273, 1445, 2668, 77, 2187, 2371, 16, 2176, 33, 739, 13, 677, 273, 1445, 12, 71, 67, 9056, 16, 404, 18, 20, 19, 2...
print ">> `%s'" % line
def parse_change_desc(changedesc, result_dict): summary = "" description = "" files = [] changedesc_keys = { 'QA Notes': "", 'Testing Done': "", 'Documentation Notes': "", 'Bug Number': "", 'Reviewed by': "", 'Approved by': "", 'Breaks vmcore compatibility': "", 'Breaks vmkernel compatibility': "", 'Breaks vmkdrivers compatibility': "", 'Mailto': "", } process_summary = False process_description = False process_files = False cur_key = None print "change desc: ``%s''" % changedesc for line in changedesc.split("\n"): print ">> `%s'" % line if line == "Description:": process_summary = True continue elif line == "Files:": process_files = True continue elif line == "" or line == "\t": if process_summary: process_summary = False process_description = True continue line = "" elif line.startswith("\t"): line = line[1:] if process_files: files.append(line) elif line.find(':') != -1: key, value = line.split(':', 2) if changedesc_keys.has_key(key): process_description = False cur_key = key changedesc_keys[key] = value.lstrip() + "\n" continue line += "\n" if process_summary: summary += line elif process_description: description += line elif cur_key != None: changedesc_keys[cur_key] += line result_dict['summary'] = summary result_dict['description'] = description result_dict['testing_done'] = changedesc_keys['Testing Done'] # TODO: Normalize bug number result_dict['bugs_closed'] = changedesc_keys['Bug Number'] # This is gross. if len(files) > 0: parts = files[0].split('/') if parts[2] == "depot": result_dict['branch'] = parts[4]
945dddff971630c6744b0d920a4e4b0e4d8061ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1600/945dddff971630c6744b0d920a4e4b0e4d8061ab/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 3427, 67, 5569, 12, 6703, 742, 16, 563, 67, 1576, 4672, 4916, 273, 1408, 2477, 273, 1408, 1390, 273, 5378, 225, 3550, 742, 67, 2452, 273, 288, 296, 27962, 29584, 4278, 23453, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3427, 67, 5569, 12, 6703, 742, 16, 563, 67, 1576, 4672, 4916, 273, 1408, 2477, 273, 1408, 1390, 273, 5378, 225, 3550, 742, 67, 2452, 273, 288, 296, 27962, 29584, 4278, 23453, ...
env.change_input('output', i, deep_copy_op(env.outputs[i]))
env.change_input('output', out_i, deep_copy_op(env.outputs[out_i]))
def __init__(self, inputs, outputs, optimizer, mode, accept_inplace = False, function_builder = Function): """ :type inputs: a list of SymbolicInput instances
673ee5f8d4bf0e167bd3e802f04d13c31237a690 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/673ee5f8d4bf0e167bd3e802f04d13c31237a690/debugmode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4540, 16, 6729, 16, 13066, 16, 1965, 16, 2791, 67, 267, 964, 273, 1083, 16, 445, 67, 9574, 273, 4284, 4672, 3536, 294, 723, 4540, 30, 279, 666, 434, 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, 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, 4540, 16, 6729, 16, 13066, 16, 1965, 16, 2791, 67, 267, 964, 273, 1083, 16, 445, 67, 9574, 273, 4284, 4672, 3536, 294, 723, 4540, 30, 279, 666, 434, 16...
password = forms.CharField(label=_(u'Password'),
password = forms.CharField(label=ugettext_lazy(u'Password'),
def clean_email_address(self): if User.objects.filter( email__exact = self.cleaned_data['email_address'] ).count() != 0: raise forms.ValidationError(_(u'Another user is already registered with the email address %(email)s.') % {'email':self.cleaned_data['email_address']} ) return self.cleaned_data['email_address']
4928be0229899927d1ff0f031f89b71d54fb646c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11563/4928be0229899927d1ff0f031f89b71d54fb646c/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 3652, 67, 2867, 12, 2890, 4672, 309, 2177, 18, 6911, 18, 2188, 12, 2699, 972, 17165, 273, 365, 18, 6200, 329, 67, 892, 3292, 3652, 67, 2867, 3546, 262, 18, 1883, 1435, 480, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 3652, 67, 2867, 12, 2890, 4672, 309, 2177, 18, 6911, 18, 2188, 12, 2699, 972, 17165, 273, 365, 18, 6200, 329, 67, 892, 3292, 3652, 67, 2867, 3546, 262, 18, 1883, 1435, 480, ...
s.append('\tArchitecture = %s' % self.getArchitecture())
s.append('\tArchitecture = %s' % self.getArch())
def __str__(self): s = [] s.append('Product {') s.append('\tName = %s' % self.getName()) s.append('\tDescription = %s' % self.getDescription()) s.append('\tArchitecture = %s' % self.getArchitecture()) s.append('\tVersion = %s' % self.getVersion()) s.append('\tQuantity = %s' % self.getQuantity()) s.append('\tSubtype = %s' % self.getSubtype()) s.append('\tVirtualization Limit = %s' % self.getVirtualizationLimit()) s.append('\tSocket Limit = %s' % self.getSocketLimit()) s.append('\tProduct Code = %s' % self.getProductOptionCode()) s.append('}') return '\n'.join(s)
c5cf837995229941dd8011f18864ac708c13fd95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/c5cf837995229941dd8011f18864ac708c13fd95/certificate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 272, 273, 5378, 272, 18, 6923, 2668, 4133, 288, 6134, 272, 18, 6923, 2668, 64, 88, 461, 273, 738, 87, 11, 738, 365, 18, 17994, 10756, 272, 18, 6923, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 272, 273, 5378, 272, 18, 6923, 2668, 4133, 288, 6134, 272, 18, 6923, 2668, 64, 88, 461, 273, 738, 87, 11, 738, 365, 18, 17994, 10756, 272, 18, 6923, 2...
vars = [] f,g = funcs if hasattr(f, 'variables'): vars += list(f.variables()) if hasattr(g, 'variables'): vars += list(g.variables()) vars = [str(v) for v in vars] from sage.misc.misc import uniq if len(uniq(vars)) > 1: raise ValueError, "there cannot be more than one free variable in funcs" kwargs['parametric'] = True return plot(funcs, *args, **kwargs)
raise ValueError, "the number of functions and the number of free variables is not a possible combination for 2d or 3d parametric plots"
def parametric_plot(funcs, *args, **kwargs): r""" \code{parametric_plot} takes two or three functions as a list or a tuple and makes a plot with the first function giving the $x$ coordinates, the second function giving the $y$ coordinates, and the third function (if present) giving the $z$ coordinates. INPUT: funcs -- 2 or 3-tuple of functions other options -- passed to plot. EXAMPLES: We draw some 2d parametric plots: sage: t = var('t') sage: parametric_plot( (sin(t), sin(2*t)), (t, 0, 2*pi), rgbcolor=hue(0.6) ) sage: parametric_plot((1, t), (t, 0, 4)) sage: parametric_plot((t, t^2), (t, -4, 4)) We draw a 3d parametric plot: sage: parametric_plot3d( (5*cos(x), 5*sin(x), x), (-12, 12), plot_points=150, color="red") TESTS: sage: parametric_plot((x, t^2), -4, 4) Traceback (most recent call last): ... ValueError: there cannot be more than one free variable in funcs sage: parametric_plot((1, x+t), -4, 4) Traceback (most recent call last): ... ValueError: there cannot be more than one free variable in funcs """ if len(funcs) == 3: raise ValueError, "use parametric_plot3d for parametric plots in 3d dimensions." elif len(funcs) != 2: raise ValueError, "parametric plots only implemented in 2 and 3 dimensions." else: vars = [] f,g = funcs if hasattr(f, 'variables'): vars += list(f.variables()) if hasattr(g, 'variables'): vars += list(g.variables()) vars = [str(v) for v in vars] from sage.misc.misc import uniq if len(uniq(vars)) > 1: raise ValueError, "there cannot be more than one free variable in funcs" kwargs['parametric'] = True return plot(funcs, *args, **kwargs)
152a48b826e0f10ca6dd5e7a2fde63ccaa7e4562 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/152a48b826e0f10ca6dd5e7a2fde63ccaa7e4562/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 579, 1591, 67, 4032, 12, 17728, 16, 380, 1968, 16, 2826, 4333, 4672, 436, 8395, 521, 710, 95, 891, 1591, 67, 4032, 97, 5530, 2795, 578, 8925, 4186, 487, 279, 666, 578, 279, 3193, 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, 579, 1591, 67, 4032, 12, 17728, 16, 380, 1968, 16, 2826, 4333, 4672, 436, 8395, 521, 710, 95, 891, 1591, 67, 4032, 97, 5530, 2795, 578, 8925, 4186, 487, 279, 666, 578, 279, 3193, 471, ...
self.add(self.build_video_details()) def build_video_details(self): h = HBox()
self.item_info = None self.rebuild_video_details() self._delete_link = None def rebuild_video_details(self): self.remove() if not self.item_info: self.add(HBox()) return info = self.item_info outer_hbox = HBox(5)
def __init__(self): Background.__init__(self) self.add(self.build_video_details())
5ed3be55d0dbdfaaa87e8b22a22480179901a001 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/5ed3be55d0dbdfaaa87e8b22a22480179901a001/video.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 8977, 16186, 2738, 972, 12, 2890, 13, 365, 18, 1289, 12, 2890, 18, 3510, 67, 9115, 67, 6395, 10756, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 8977, 16186, 2738, 972, 12, 2890, 13, 365, 18, 1289, 12, 2890, 18, 3510, 67, 9115, 67, 6395, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
entryR = re.compile(ur'<li>\(<a href=".+?" title=".+?">hist</a>\) <a href=".+?" title="(?P<title>.+?)">.+?</a> \[(?P<length>\d+)(.+?)\]</li>')
entryR = re.compile(ur'<li>\(<a href=".+?" title=".+?">hist</a>\) ‎<a href=".+?" title="(?P<title>.+?)">.+?</a> ‎\[(?P<length>\d+)(.+?)\]</li>')
def shortpages(self, number = 10, repeat = False): throttle = True seen = set() while True: path = self.shortpages_address(n = number) get_throttle() html = self.getUrl(path) entryR = re.compile(ur'<li>\(<a href=".+?" title=".+?">hist</a>\) <a href=".+?" title="(?P<title>.+?)">.+?</a> \[(?P<length>\d+)(.+?)\]</li>') for m in entryR.finditer(html): title = m.group('title') length = int(m.group('length'))
141604c0b9fee622de3ce3e43658d1e2a1dc8d72 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/141604c0b9fee622de3ce3e43658d1e2a1dc8d72/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3025, 7267, 12, 2890, 16, 1300, 273, 1728, 16, 7666, 273, 1083, 4672, 18304, 273, 1053, 5881, 273, 444, 1435, 1323, 1053, 30, 589, 273, 365, 18, 6620, 7267, 67, 2867, 12, 82, 273, 1300...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3025, 7267, 12, 2890, 16, 1300, 273, 1728, 16, 7666, 273, 1083, 4672, 18304, 273, 1053, 5881, 273, 444, 1435, 1323, 1053, 30, 589, 273, 365, 18, 6620, 7267, 67, 2867, 12, 82, 273, 1300...