rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
regexp = "^(.*[-_.])?%s$" % language_code
regexp = "^(.{4,}[-_.])?%s$" % language_code
def direct_language_match_filename(language_code, path_name): name, ext = os.path.splitext(os.path.basename(path_name)) regexp = "^(.*[-_.])?%s$" % language_code return bool(re.match(regexp, name, re.IGNORECASE))
f451415324f17d02173b7faba901498aca9adb4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11388/f451415324f17d02173b7faba901498aca9adb4c/project_tree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2657, 67, 4923, 67, 1916, 67, 3459, 12, 4923, 67, 710, 16, 589, 67, 529, 4672, 508, 16, 1110, 273, 1140, 18, 803, 18, 4939, 408, 12, 538, 18, 803, 18, 13909, 12, 803, 67, 529, 3719...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2657, 67, 4923, 67, 1916, 67, 3459, 12, 4923, 67, 710, 16, 589, 67, 529, 4672, 508, 16, 1110, 273, 1140, 18, 803, 18, 4939, 408, 12, 538, 18, 803, 18, 13909, 12, 803, 67, 529, 3719...
Simple testing code for the [[User:Example]] on the English Wikipedia.
Simple testing code for the [[User:Example]] on the English pywikibot.
def getData(self): users = {} params = { 'action': 'query', 'list': 'users', 'usprop': ['blockinfo', 'groups', 'editcount', 'registration', 'emailable', 'gender'], 'ususers': u'|'.join([n.name() for n in self.users]), } data = query.GetData(params, self.site) for user in data['query']['users']: if u'invalid' in user: raise InvalidUser("User name '%s' is invalid. IP addresses are not supported." % user['name']) users[user['name']] = user return users
0553617ec4a3c10f8ce44d225a0ca714f640d691 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/0553617ec4a3c10f8ce44d225a0ca714f640d691/userlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4303, 12, 2890, 4672, 3677, 273, 2618, 859, 273, 288, 296, 1128, 4278, 296, 2271, 2187, 296, 1098, 4278, 296, 5577, 2187, 296, 407, 5986, 4278, 10228, 2629, 1376, 2187, 296, 4650, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4303, 12, 2890, 4672, 3677, 273, 2618, 859, 273, 288, 296, 1128, 4278, 296, 2271, 2187, 296, 1098, 4278, 296, 5577, 2187, 296, 407, 5986, 4278, 10228, 2629, 1376, 2187, 296, 4650, 2187, ...
self.regex = "^foldoc .+"
self.regex = "^explain .+" self.rDescr = re.compile("<P>(.*?)<font ", re.I | re.S)
def __init__(self): self.regex = "^foldoc .+"
55bba273dc9de3db5010f5bb11b758aeca2b91e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10749/55bba273dc9de3db5010f5bb11b758aeca2b91e4/weblookup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 7584, 273, 15017, 16007, 504, 263, 9078, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 365, 18, 7584, 273, 15017, 16007, 504, 263, 9078, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def pdflatex(self, t = None): """
def pdflatex(self, t = None): """ This is deprecated. Use engine("pdflatex") instead.
def pdflatex(self, t = None): """ Controls whether Sage uses PDFLaTeX or LaTeX when typesetting with :func:`view`, in ``%latex`` cells, etc. INPUT: - ``t`` -- boolean or None
f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8169, 26264, 12, 2890, 16, 268, 273, 599, 4672, 3536, 1220, 353, 6849, 18, 2672, 4073, 2932, 7699, 26264, 7923, 3560, 18, 225, 8888, 87, 2856, 348, 410, 4692, 12667, 30745, 21575, 60, 57...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8169, 26264, 12, 2890, 16, 268, 273, 599, 4672, 3536, 1220, 353, 6849, 18, 2672, 4073, 2932, 7699, 26264, 7923, 3560, 18, 225, 8888, 87, 2856, 348, 410, 4692, 12667, 30745, 21575, 60, 57...
rawList = utils.safe_popen('df -text2', 'r')
rawList = utils.safe_popen('df -text2 -text3', 'r')
def _refresh(self):
1989a84a26f8e863fb992219712b3bf1c0cb4986 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/1989a84a26f8e863fb992219712b3bf1c0cb4986/df.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9144, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 389, 9144, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
'SAGE Library Source Code',
'Sage Library Source Code',
def bundle(self, filename, options='', url=None, base=None, to=None): r""" Create an hg changeset bundle with the given filename against the repository at the given url (which is by default the 'official' SAGE repository, unless push_url() is changed in a setup file).
37386d9f53c090487206985e1767c5addf7482e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/37386d9f53c090487206985e1767c5addf7482e7/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3440, 12, 2890, 16, 1544, 16, 702, 2218, 2187, 880, 33, 7036, 16, 1026, 33, 7036, 16, 358, 33, 7036, 4672, 436, 8395, 1788, 392, 22576, 22463, 3440, 598, 326, 864, 1544, 5314, 326, 335...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3440, 12, 2890, 16, 1544, 16, 702, 2218, 2187, 880, 33, 7036, 16, 1026, 33, 7036, 16, 358, 33, 7036, 4672, 436, 8395, 1788, 392, 22576, 22463, 3440, 598, 326, 864, 1544, 5314, 326, 335...
data = "Suppose there isn't a 16-ton weight?"*100
data = "Suppose there isn't a 16-ton weight?"*5
def test_send(self): s = capture_server() s.start() time.sleep(1) # Give server time to initialize
78e19616f3f30adfe8845aa80f03c4b822626f13 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/78e19616f3f30adfe8845aa80f03c4b822626f13/test_asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4661, 12, 2890, 4672, 272, 273, 7477, 67, 3567, 1435, 272, 18, 1937, 1435, 813, 18, 19607, 12, 21, 13, 468, 22374, 1438, 813, 358, 4046, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4661, 12, 2890, 4672, 272, 273, 7477, 67, 3567, 1435, 272, 18, 1937, 1435, 813, 18, 19607, 12, 21, 13, 468, 22374, 1438, 813, 358, 4046, 2, -100, -100, -100, -100, -100, -100...
s = s[:j] + ' j += len(kwd) + 1
last_hash = s[:j].rfind(' last_newline = s[:j].rfind('\n') if last_hash > last_newline: j += len(kwd) else: s = s[:j] + ' j += len(kwd) + 1
def parse_keywords(kwd, s): j = 0 v = [] while True: i = s[j:].find(kwd) if i == -1: break j = i + j s = s[:j] + '#' + s[j:] j += len(kwd) + 1 k = s[j:].find('\n') if k == -1: k = len(s) for X in s[j:j+k].split(): if X[0] == '#': # skip rest of line break v.append(X) return v, s
2781b18e15484ad4900a2aa0f4a7a52de84e9b56 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/2781b18e15484ad4900a2aa0f4a7a52de84e9b56/cython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 11771, 12, 79, 3623, 16, 272, 4672, 525, 273, 374, 331, 273, 5378, 1323, 1053, 30, 277, 273, 272, 63, 78, 30, 8009, 4720, 12, 79, 3623, 13, 309, 277, 422, 300, 21, 30, 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, 1109, 67, 11771, 12, 79, 3623, 16, 272, 4672, 525, 273, 374, 331, 273, 5378, 1323, 1053, 30, 277, 273, 272, 63, 78, 30, 8009, 4720, 12, 79, 3623, 13, 309, 277, 422, 300, 21, 30, 89...
set = hitlist_bibwrd
set = hitset_bibwrd
def search_in_bibwords(word, f, decompress=zlib.decompress): """Searches for 'word' inside bibwordsX table for field 'f' and returns hitlist of recIDs.""" set = HitList() # will hold output result set set_used = 0 # not-yet-used flag, to be able to circumvent set operations # deduce into which bibwordsX table we will search: bibwordsX = "bibwords%d" % get_wordsindex_id("anyfield") if f: wordsindex_id = get_wordsindex_id(f) if wordsindex_id: bibwordsX = "bibwords%d" % wordsindex_id # wash 'word' argument and construct query: word = string.replace(word, '*', '%') # we now use '*' as the truncation character words = string.split(word, "->", 1) # check for span query if len(words) == 2: word0 = re_word.sub('', words[0]) word1 = re_word.sub('', words[1]) query = "SELECT word,hitlist FROM %s WHERE word BETWEEN '%s' AND '%s'" % (bibwordsX, escape_string(word0[:50]), escape_string(word1[:50])) else: word = re_word.sub('', word) if string.find(word, '%') >= 0: # do we have wildcard in the word? query = "SELECT word,hitlist FROM %s WHERE word LIKE '%s'" % (bibwordsX, escape_string(word[:50])) else: query = "SELECT word,hitlist FROM %s WHERE word='%s'" % (bibwordsX, escape_string(word[:50])) # launch the query: res = run_sql(query) # fill the result set: for word,hitlist in res: hitlist_bibwrd = HitList(Numeric.loads(decompress(hitlist))) # add the results: if set_used: set.union(hitlist_bibwrd) else: set = hitlist_bibwrd set_used = 1 # okay, return result set: return set
f89feb7ea51a59100f9e1291d3f34cbf65a4ba8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/f89feb7ea51a59100f9e1291d3f34cbf65a4ba8b/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 267, 67, 70, 495, 3753, 12, 1095, 16, 284, 16, 16824, 33, 94, 2941, 18, 323, 14706, 4672, 3536, 16294, 364, 296, 1095, 11, 4832, 25581, 3753, 60, 1014, 364, 652, 296, 74, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 267, 67, 70, 495, 3753, 12, 1095, 16, 284, 16, 16824, 33, 94, 2941, 18, 323, 14706, 4672, 3536, 16294, 364, 296, 1095, 11, 4832, 25581, 3753, 60, 1014, 364, 652, 296, 74, 1...
if len(windows) == 1:
if len(windows.manager) == 1:
def onClose(window): if isinstance(window, windows.ChannelWindow): cwindows = list(windows.get_with( network=window.network, wclass=windows.ChannelWindow )) if len(cwindows) == 1: window.network.quit() elif chaninfo.ischan(window.network, window.id): window.network.part(window.id) elif isinstance(window, windows.StatusWindow): window.network.quit() if len(windows) == 1: windows.new(windows.StatusWindow, irc.Network(), "status")
51d4f78fdabcdc5780b87bd717f96703db261f4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/51d4f78fdabcdc5780b87bd717f96703db261f4a/ui_script.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25738, 12, 5668, 4672, 309, 1549, 12, 5668, 16, 9965, 18, 2909, 3829, 4672, 276, 13226, 273, 666, 12, 13226, 18, 588, 67, 1918, 12, 2483, 33, 5668, 18, 5185, 16, 341, 1106, 33, 13226, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25738, 12, 5668, 4672, 309, 1549, 12, 5668, 16, 9965, 18, 2909, 3829, 4672, 276, 13226, 273, 666, 12, 13226, 18, 588, 67, 1918, 12, 2483, 33, 5668, 18, 5185, 16, 341, 1106, 33, 13226, ...
return tile in range( 25904, 25132 )
return tile in range( 25904, 25133 ) def istree( tile ): trees = [ 3221, 3222, 3230, 3242, 3274, 3275, 3276, 3277, 3230, 3242, 3274, 3280, 3283, 3286, 3288, 3290, 3293, 3296, 3299, 3302, 3320, 3323, 3326, 3329, 3393, 3415, 3416, 3417, 3418, 3419, 3438, 3439, 3440, 3441, 3442, 3460, 3461, 3462, 3476, 3480, 3484, 3486, 3488, 3492, 3496, 4789, 4790, 4791, 4792, 4793, 4794, 4795, 4796, 4797 ] return tile in trees
def iscrystal( tile ): return tile in range( 25904, 25132 )
46162ac4ca4f067a802fb24fb143fed6600f590a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/46162ac4ca4f067a802fb24fb143fed6600f590a/utilities.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 3353, 31365, 12, 4769, 262, 30, 327, 4769, 316, 1048, 12, 576, 6162, 3028, 16, 6969, 28615, 262, 225, 1652, 19165, 992, 12, 4769, 262, 30, 11491, 273, 306, 890, 3787, 21, 16, 890,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 3353, 31365, 12, 4769, 262, 30, 327, 4769, 316, 1048, 12, 576, 6162, 3028, 16, 6969, 28615, 262, 225, 1652, 19165, 992, 12, 4769, 262, 30, 11491, 273, 306, 890, 3787, 21, 16, 890,...
self.order+1)
self.order)
def __init__(self, xs_a, xs_b, max_delta=2.0, out=None, relative_length_tolerance=0.05, absolute_angle_tolerance=10.0, order=1):
2ae36792e3cea9566c3de2e9c46a889101b913ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/2ae36792e3cea9566c3de2e9c46a889101b913ae/sub_lattice_tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9280, 67, 69, 16, 9280, 67, 70, 16, 943, 67, 9878, 33, 22, 18, 20, 16, 596, 33, 7036, 16, 3632, 67, 2469, 67, 25456, 33, 20, 18, 6260, 16, 4967, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9280, 67, 69, 16, 9280, 67, 70, 16, 943, 67, 9878, 33, 22, 18, 20, 16, 596, 33, 7036, 16, 3632, 67, 2469, 67, 25456, 33, 20, 18, 6260, 16, 4967, 67...
if self.freq == 'U':
if self.freq == _c.FR_UND:
def get_steps(self): """Returns the time steps between consecutive dates.
cb980bd865c69af6068dd2a9a64435b638ad0d81 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/cb980bd865c69af6068dd2a9a64435b638ad0d81/tdates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8986, 12, 2890, 4672, 3536, 1356, 326, 813, 6075, 3086, 18221, 7811, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 8986, 12, 2890, 4672, 3536, 1356, 326, 813, 6075, 3086, 18221, 7811, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
startup_pipe.write(struct.pack('@H', listen_port))
startup_pipe.write(struct.pack('=L', server_data_len)) startup_pipe.write(server_data_json)
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): print 'specified server cert file not found: ' + options.cert + \ ' exiting...' return for ca_cert in options.ssl_client_ca: if not os.path.isfile(ca_cert): print 'specified trusted client CA file not found: ' + ca_cert + \ ' exiting...' return server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert, options.ssl_client_auth, options.ssl_client_ca, options.ssl_bulk_cipher) print 'HTTPS server started on port %d...' % server.server_port else: server = StoppableHTTPServer(('127.0.0.1', port), TestPageHandler) print 'HTTP server started on port %d...' % server.server_port server.data_dir = MakeDataDir() server.file_root_url = options.file_root_url listen_port = server.server_port server._device_management_handler = None elif options.server_type == SERVER_SYNC: server = SyncHTTPServer(('127.0.0.1', port), SyncPageHandler) print 'Sync HTTP server started on port %d...' % server.server_port listen_port = server.server_port # means FTP Server else: my_data_dir = MakeDataDir() # Instantiate a dummy authorizer for managing 'virtual' users authorizer = pyftpdlib.ftpserver.DummyAuthorizer() # Define a new user having full r/w permissions and a read-only # anonymous user authorizer.add_user('chrome', 'chrome', my_data_dir, perm='elradfmw') authorizer.add_anonymous(my_data_dir) # Instantiate FTP handler class ftp_handler = pyftpdlib.ftpserver.FTPHandler ftp_handler.authorizer = authorizer # Define a customized banner (string returned when client connects) ftp_handler.banner = ("pyftpdlib %s based ftpd ready." % pyftpdlib.ftpserver.__ver__) # Instantiate FTP server class and listen to 127.0.0.1:port address = ('127.0.0.1', port) server = pyftpdlib.ftpserver.FTPServer(address, ftp_handler) listen_port = server.socket.getsockname()[1] print 'FTP server started on port %d...' % listen_port # Notify the parent that we've started. (BaseServer subclasses # bind their sockets on construction.) if options.startup_pipe is not None: if sys.platform == 'win32': fd = msvcrt.open_osfhandle(options.startup_pipe, 0) else: fd = options.startup_pipe startup_pipe = os.fdopen(fd, "w") # Write the listening port as a 2 byte value. This is _not_ using # network byte ordering since the other end of the pipe is on the same # machine. startup_pipe.write(struct.pack('@H', listen_port)) startup_pipe.close() try: server.serve_forever() except KeyboardInterrupt: print 'shutting down server' server.stop = True
d5dc41eebc137ac693a6ee1e527e927edd02ed28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/d5dc41eebc137ac693a6ee1e527e927edd02ed28/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
now = time.mktime(datetime.datetime.now().timetuple()) if time.mktime(last_seen.timetuple()) > now -ACTIVITY_TIMEOUT: entity={} entity['username']=u.name entity['userlink']="%s?action=userInfo&id=%s" % ( self.config['general.cgi_url'], u.id ) entity['seen_on']=u.LastSeen() users.append(entity)
if last_seen!=None: now = time.mktime(datetime.datetime.now().timetuple()) if time.mktime(last_seen.timetuple()) > now -ACTIVITY_TIMEOUT: entity={} entity['username']=u.name entity['userlink']="%s?action=userInfo&id=%s" % ( self.config['general.cgi_url'], u.id ) entity['seen_on']=u.LastSeen() users.append(entity)
def handler(self, context): import HaloRadio.Util as Util
d36e4af0f991da741d11eaeaa7b4fd827f82f7b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11694/d36e4af0f991da741d11eaeaa7b4fd827f82f7b8/statActivity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 12, 2890, 16, 819, 4672, 1930, 670, 287, 83, 19984, 18, 1304, 487, 3564, 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, 1838, 12, 2890, 16, 819, 4672, 1930, 670, 287, 83, 19984, 18, 1304, 487, 3564, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
class TemplatingUtil: def __init__(self, utils, callable): self.utils = utils self.callable = callable def __call__(self, *args, **kw): args = (self.utils,)+args return self.callable(*args, **kw)
def next(self): try: self._sequence[self.end] except IndexError: return None return Batch(self.client, self._sequence, self._size, self.end - self.overlap, 0, self.orphan, self.overlap)
63066f635c3aa76c17def4baf319ee16d063616d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/63066f635c3aa76c17def4baf319ee16d063616d/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 775, 30, 365, 6315, 6178, 63, 2890, 18, 409, 65, 1335, 10195, 30, 327, 599, 327, 5982, 12, 2890, 18, 2625, 16, 365, 6315, 6178, 16, 365, 6315, 1467, 16, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 775, 30, 365, 6315, 6178, 63, 2890, 18, 409, 65, 1335, 10195, 30, 327, 599, 327, 5982, 12, 2890, 18, 2625, 16, 365, 6315, 6178, 16, 365, 6315, 1467, 16, 365, 18...
number $B$ such that if $P$ is a point on the curve, then the naive logarithmic height $h(P)$ is less than $B+\hat{h}(P)$, where $\hat{h}(P)$ is the canonical height of $P$.
number `B` such that if `P` is a point on the curve, then the naive logarithmic height `h(P)` is less than `B+\hat{h}(P)`, where `\hat{h}(P)` is the canonical height of `P`.
def silverman_bound(self): r""" Return the Silverman height bound. This is a floating point number $B$ such that if $P$ is a point on the curve, then the naive logarithmic height $h(P)$ is less than $B+\hat{h}(P)$, where $\hat{h}(P)$ is the canonical height of $P$.
8b53e056cc765e689493ec9632c441ee03a3206a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8b53e056cc765e689493ec9632c441ee03a3206a/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17714, 502, 4728, 67, 3653, 12, 2890, 4672, 436, 8395, 2000, 326, 348, 330, 502, 4728, 2072, 2489, 18, 225, 1220, 353, 279, 13861, 1634, 1300, 271, 38, 8, 4123, 716, 309, 271, 52, 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, 17714, 502, 4728, 67, 3653, 12, 2890, 4672, 436, 8395, 2000, 326, 348, 330, 502, 4728, 2072, 2489, 18, 225, 1220, 353, 279, 13861, 1634, 1300, 271, 38, 8, 4123, 716, 309, 271, 52, 8, ...
self.client.play()
self.give5tries(self.client.play)
def play(self,id=None): if id==None: self.client.play() else: self.client.play(id) if self.client.status()['state']!="play": self.error(1)
5ff265d98bee10d670b78139e7fc4c73d64683b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14596/5ff265d98bee10d670b78139e7fc4c73d64683b7/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 12, 2890, 16, 350, 33, 7036, 4672, 309, 612, 631, 7036, 30, 365, 18, 75, 688, 25, 2007, 12, 2890, 18, 2625, 18, 1601, 13, 469, 30, 365, 18, 2625, 18, 1601, 12, 350, 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, 6599, 12, 2890, 16, 350, 33, 7036, 4672, 309, 612, 631, 7036, 30, 365, 18, 75, 688, 25, 2007, 12, 2890, 18, 2625, 18, 1601, 13, 469, 30, 365, 18, 2625, 18, 1601, 12, 350, 13, 309, ...
if (pow(type(1),1)!=type(1)):
if pow(type(1), 1) != type(1):
def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+str(i)+') != 0' if (pow(type(1),1)!=type(1)): raise ValueError, 'pow(1,'+str(i)+') != 1' for i in range(-100, 100): if (pow(type(i),3)!=i*i*i): raise ValueError, 'pow('+str(i)+',3) != '+str(i*i*i) pow2=1 for i in range(0,31): if (pow(2,i)!=pow2): raise ValueError, 'pow(2,'+str(i)+') != '+str(pow2) if (i!=30): pow2=pow2*2 print " Testing 3-argument pow() function..." il, ih = -20, 20 jl, jh = -5, 5 kl, kh = -10, 10 compare = cmp if (type==float): il=1 compare = test_support.fcmp elif (type==int): jl=0 elif (type==long): jl,jh = 0, 15 for i in range(il, ih+1): for j in range(jl,jh+1): for k in range(kl, kh+1): if (k!=0): if compare(pow(type(i),j,k), pow(type(i),j)% type(k)): raise ValueError, "pow(" +str(i)+ "," +str(j)+ \ "," +str(k)+ ") != pow(" +str(i)+ "," + \ str(j)+ ") % " +str(k)
c54d19043a595679f253a55e46fda2910f513c52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c54d19043a595679f253a55e46fda2910f513c52/test_pow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7602, 3813, 12, 723, 4672, 309, 261, 723, 5, 33, 5659, 4672, 1172, 315, 565, 7766, 310, 576, 17, 3446, 7602, 1435, 445, 7070, 364, 277, 316, 1048, 19236, 18088, 16, 4336, 4672, 309, 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, 7602, 3813, 12, 723, 4672, 309, 261, 723, 5, 33, 5659, 4672, 1172, 315, 565, 7766, 310, 576, 17, 3446, 7602, 1435, 445, 7070, 364, 277, 316, 1048, 19236, 18088, 16, 4336, 4672, 309, 26...
if co_filename in ('rpc.py', '<string>'):
if co_filename in (r'.\rpc.py', 'rpc.py','<string>'):
def user_line(self, frame): # get the currently executing function ##print>>sys.__stderr__, "*function: ", frame.f_code.co_name ##print>>sys.__stderr__, "*file: ", frame.f_code.co_filename ##print>>sys.__stderr__, "*line number: ", frame.f_code.co_firstlineno co_filename = frame.f_code.co_filename co_name = frame.f_code.co_name try: func = frame.f_locals[co_name] if getattr(func, "DebuggerStepThrough", 0): print "XXXX DEBUGGER STEPPING THROUGH" self.set_step() return except: pass if co_filename in ('rpc.py', '<string>'): self.set_step() return if co_filename.endswith('threading.py'): self.set_step() return message = self.__frame2message(frame) self.gui.interaction(message, frame)
5da7e431bc05216e5364bde17a39e5d00c77bece /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5da7e431bc05216e5364bde17a39e5d00c77bece/Debugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 67, 1369, 12, 2890, 16, 2623, 4672, 468, 336, 326, 4551, 11274, 445, 7541, 1188, 9778, 9499, 16186, 11241, 972, 16, 15902, 915, 30, 3104, 2623, 18, 74, 67, 710, 18, 2894, 67, 529,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 67, 1369, 12, 2890, 16, 2623, 4672, 468, 336, 326, 4551, 11274, 445, 7541, 1188, 9778, 9499, 16186, 11241, 972, 16, 15902, 915, 30, 3104, 2623, 18, 74, 67, 710, 18, 2894, 67, 529,...
search_subtitle=True, search_description=True):
search_subtitle=True, search_description=True, exact_match=False):
def search(self, searchstr, by_chan=None, search_title=True, search_subtitle=True, search_description=True): """ Return a list of programs with a title similar to the given parameter. If by_chan is given, it has to be a valid channel id and only programs from this channel will be returned. Result is a list of Programs. This function will only return programs with a stop time greater the current time. """ if not (search_title or search_subtitle or search_description): return []
4de8c80486a5c6d0ad8e61e5774661b67f5d5e0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/4de8c80486a5c6d0ad8e61e5774661b67f5d5e0f/guide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 1623, 701, 16, 635, 67, 7472, 33, 7036, 16, 1623, 67, 2649, 33, 5510, 16, 1623, 67, 1717, 2649, 33, 5510, 16, 1623, 67, 3384, 33, 5510, 16, 5565, 67, 1916, 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, 1623, 12, 2890, 16, 1623, 701, 16, 635, 67, 7472, 33, 7036, 16, 1623, 67, 2649, 33, 5510, 16, 1623, 67, 1717, 2649, 33, 5510, 16, 1623, 67, 3384, 33, 5510, 16, 5565, 67, 1916, 33, ...
s += space(False,result=s)
r += cls.space(False,result=r)
def closing(self, node): s = u'' if node.parent.type == "loop": s += write(")")
01a99d0db0499777506f7fbf9ecf7a7e70c7a9e2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/01a99d0db0499777506f7fbf9ecf7a7e70c7a9e2/Packer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7647, 12, 2890, 16, 756, 4672, 272, 273, 582, 6309, 309, 756, 18, 2938, 18, 723, 422, 315, 6498, 6877, 272, 1011, 1045, 2932, 2225, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7647, 12, 2890, 16, 756, 4672, 272, 273, 582, 6309, 309, 756, 18, 2938, 18, 723, 422, 315, 6498, 6877, 272, 1011, 1045, 2932, 2225, 13, 2, -100, -100, -100, -100, -100, -100, -100, -10...
if self.advanced_dialog:
if hasattr(self, 'advanced_dialog'):
def change_profile(self, widget): """ Called when a new profile is chosen from the list. """ # Make sure the name doesn't change everytime someone types something if self.combo_profile_names.get_active() > -1: if not self.is_full_gui: return profile_name = self.combo_profile_names.get_active_text() wired.ReadWiredNetworkProfile(profile_name)
45e228d6e42bbf65c858b44217e384643520410f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12280/45e228d6e42bbf65c858b44217e384643520410f/netentry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 5040, 12, 2890, 16, 3604, 4672, 3536, 11782, 1347, 279, 394, 3042, 353, 10447, 628, 326, 666, 18, 3536, 468, 4344, 3071, 326, 508, 3302, 1404, 2549, 3614, 957, 18626, 1953, 594...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 5040, 12, 2890, 16, 3604, 4672, 3536, 11782, 1347, 279, 394, 3042, 353, 10447, 628, 326, 666, 18, 3536, 468, 4344, 3071, 326, 508, 3302, 1404, 2549, 3614, 957, 18626, 1953, 594...
else:
elif len(master):
def makePackets(self, devs, timingOrder, page, reps, sync=249, multiBlockBoards=[]): """Make packets to run a sequence on this board group.
dd9b5c71352027a4ce16fbae97632b01069831e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7016/dd9b5c71352027a4ce16fbae97632b01069831e6/ghz_dacs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 27328, 12, 2890, 16, 4461, 87, 16, 15538, 2448, 16, 1363, 16, 283, 1121, 16, 3792, 33, 3247, 29, 16, 3309, 1768, 13809, 14727, 33, 8526, 4672, 3536, 6464, 12640, 358, 1086, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 27328, 12, 2890, 16, 4461, 87, 16, 15538, 2448, 16, 1363, 16, 283, 1121, 16, 3792, 33, 3247, 29, 16, 3309, 1768, 13809, 14727, 33, 8526, 4672, 3536, 6464, 12640, 358, 1086, 279, ...
if milestones[0] == '---': trac.setMilestoneList(milestones, 'value') else: trac.setMilestoneList([], '') print print '6. retrieving bugs...' sql = "SELECT * FROM bugs " if PRODUCTS: sql += " WHERE %s" % productFilter('product', PRODUCTS) sql += " ORDER BY bug_id"
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"
def convert(_db, _host, _user, _password, _env, _force): activityFields = FieldTranslator() # account for older versions of bugzilla if BZ_VERSION == '2.11': print 'Using Buzvilla v%s schema.' % BZ_VERSION activityFields['removed'] = 'oldvalue' activityFields['added'] = 'newvalue' # init Bugzilla environment print "Bugzilla MySQL('%s':'%s':'%s':'%s'): connecting..." % (_db, _host, _user, _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 "cleaning 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""") os.system('rm -rf %s' % trac.env.get_attachments_dir()) os.mkdir(trac.env.get_attachments_dir()) trac.db().commit() print print "1. import severities..." severities = (('blocker', '1'), ('critical', '2'), ('major', '3'), ('normal', '4'), ('minor', '5'), ('trivial', '6'), ('enhancement', '7')) trac.setSeverityList(severities) print print "2. import components..." sql = "SELECT value, initialowner AS owner FROM components" if PRODUCTS: sql += " WHERE %s" % productFilter('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, 'value') print print "3. import priorities..." priorities = (('P1', '1'), ('P2', '2'), ('P3', '3'), ('P4', '4'), ('P5', '5')) trac.setPriorityList(priorities) print print "4. import versions..." sql = "SELECT DISTINCTROW value FROM versions" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) versions = mysql_cur.fetchall() trac.setVersionList(versions, 'value') print print "5. import milestones..." mysql_cur.execute("SELECT value FROM milestones") milestones = mysql_cur.fetchall() if milestones[0] == '---': trac.setMilestoneList(milestones, 'value') else: trac.setMilestoneList([], '') print print '6. retrieving bugs...' sql = "SELECT * FROM bugs " if PRODUCTS: sql += " WHERE %s" % productFilter('product', PRODUCTS) sql += " ORDER BY bug_id" mysql_cur.execute(sql) bugs = mysql_cur.fetchall() print print "7. 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'] ticket['component'] = bug['component'] ticket['severity'] = bug['bug_severity'] ticket['priority'] = bug['priority'] 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'])) ticket['cc'] = string.join(cc_list, ', ') ticket['version'] = bug['version'] if bug['target_milestone'] == '---': ticket['milestone'] = '' else: ticket['milestone'] = bug['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'] keywords = string.split(bug['keywords'], ' ') 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 = [] 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() keywordChange = False oldKeywords = string.join(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: kw = STATUS_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[added] keywords.append(kw) keywordChange = True added = statusXlator[added] removed = statusXlator[removed] elif field_name == 'short_desc': field_name = 'summary' elif field_name == 'product': if removed in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[added] keywords.append(kw) keywordChange = True 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 keywordChange: newKeywords = string.join(keywords, " ") ticketChangeKw = ticketChange ticketChangeKw['field'] = 'keywords' ticketChangeKw['oldvalue'] = oldKeywords ticketChangeKw['newvalue'] = newKeywords #trac.addTicketChange(ticket=bugid, time=activity['bug_when'], # author=trac.getLoginName(mysql_cur, activity['who']), # field='keywords', oldvalue=oldKeywords, newvalue=newKeywords) 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 else: #trac.addTicketChange(ticket=bugid, time=activity['bug_when'], # author=trac.getLoginName(mysql_cur, activity['who']), # field=field_name, oldvalue=removed, newvalue=added) 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 if bug['bug_status'] in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[bug['bug_status']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) if bug['product'] in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[bug['product']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) 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']) tracAttachment = Attachment(a['filename'], a['thedata']) trac.addAttachment(bugid, tracAttachment, a['description'], author) ticket['keywords'] = string.join(keywords) ticketid = trac.addTicket(**ticket) print "Success!"
63f7bce156a2ed5a10227f95c07a9ae105efaf62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/63f7bce156a2ed5a10227f95c07a9ae105efaf62/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...
forbidden_break = False
forbidden_break_level = 0
def _split_message(message, srx_handler=None): # Concatenation! concat_text = [] for type, value, line in message: if type == TEXT: concat_text.append(value[0]) concat_text = u''.join(concat_text) # Get the rules if srx_handler is None: srx_handler = default_srx_handler # XXX we must handle the language here! rules = srx_handler.get_compiled_rules('en') # Get the breaks breaks = set() no_breaks = set() for break_value, regexp in rules: for match in regexp.finditer(concat_text): pos = match.end() if break_value and pos not in no_breaks: breaks.add(pos) if not break_value and pos not in breaks: no_breaks.add(pos) breaks = list(breaks) breaks.sort() # And now cut the message forbidden_break = False current_message = Message() current_length = 0 for type, value, line in message: if type == TEXT: text, context = value if forbidden_break: current_message.append_text(text, line, context) current_length += len(text) else: line_offset = 0 for absolute_pos in breaks: pos = absolute_pos - current_length if 0 <= pos and pos < len(text): before = text[:pos] text = text[pos:] # Add before to the current message if before: current_message.append_text(before, line + line_offset, context) current_length += len(before) line_offset += before.count('\n') # Send the message if it is not empty if current_message: yield current_message current_message = Message() if text: current_length += len(text) current_message.append_text(text, line + line_offset, context) elif type == START_FORMAT: forbidden_break = True current_message.append_start_format(value[0], value[1], line) elif type == END_FORMAT: forbidden_break = False current_message.append_end_format(value[0], value[1], line) # Send the last message if current_message: yield current_message
cb68c1e5ad99dc6b3b926311a1e126827d77df30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12681/cb68c1e5ad99dc6b3b926311a1e126827d77df30/segment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4939, 67, 2150, 12, 2150, 16, 9133, 92, 67, 4176, 33, 7036, 4672, 468, 23873, 275, 367, 5, 3835, 67, 955, 273, 5378, 364, 618, 16, 460, 16, 980, 316, 883, 30, 309, 618, 422, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4939, 67, 2150, 12, 2150, 16, 9133, 92, 67, 4176, 33, 7036, 4672, 468, 23873, 275, 367, 5, 3835, 67, 955, 273, 5378, 364, 618, 16, 460, 16, 980, 316, 883, 30, 309, 618, 422, 9...
for event in NamespaceFlattener()(self.tree):
for event in NamespaceFlattener(prefixes={ 'http://www.w3.org/1999/xhtml': '' })(self.tree):
def __iter__(self): depth = 0 ignore_until = None previous = None for event in NamespaceFlattener()(self.tree): if previous is not None: if previous[0] == START: depth += 1 if ignore_until <= depth: ignore_until = None if ignore_until is None: for token in self.tokens(previous, event): yield token if token["type"] == "EmptyTag": ignore_until = depth if previous[0] == END: depth -= 1 previous = event if previous is not None: if ignore_until is None or ignore_until <= depth: for token in self.tokens(previous, None): yield token elif ignore_until is not None: raise ValueError("Illformed DOM event stream: void element without END_ELEMENT")
2a2f3ec1952fc07623211ce06510f3ccb9b663a4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10463/2a2f3ec1952fc07623211ce06510f3ccb9b663a4/genshistream.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 3598, 273, 374, 2305, 67, 12198, 273, 599, 2416, 273, 599, 364, 871, 316, 6005, 2340, 4558, 708, 12, 17777, 5899, 296, 2505, 2207, 5591, 18, 91, 23, 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, 2165, 972, 12, 2890, 4672, 3598, 273, 374, 2305, 67, 12198, 273, 599, 2416, 273, 599, 364, 871, 316, 6005, 2340, 4558, 708, 12, 17777, 5899, 296, 2505, 2207, 5591, 18, 91, 23, 18...
ID_MENU_ADD_FILE = 102 ID_MENU_ADD_URL = 103 ID_MENU_GO = 104
def DamnLoadCurrentLocale(): if DV.languages.has_key(DV.lang): DV.locale = DV.languages[DV.lang] else: DV.locale = None
7a486514c4f2b2eb8c7e2a316b3d60c539f2c4cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/7a486514c4f2b2eb8c7e2a316b3d60c539f2c4cb/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 301, 82, 2563, 3935, 3916, 13332, 309, 463, 58, 18, 14045, 18, 5332, 67, 856, 12, 30199, 18, 4936, 4672, 463, 58, 18, 6339, 273, 463, 58, 18, 14045, 63, 30199, 18, 4936, 65, 469...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 301, 82, 2563, 3935, 3916, 13332, 309, 463, 58, 18, 14045, 18, 5332, 67, 856, 12, 30199, 18, 4936, 4672, 463, 58, 18, 6339, 273, 463, 58, 18, 14045, 63, 30199, 18, 4936, 65, 469...
if fp2 == fp1: fp2 = nullid
def commit(self, files = None, text = "", user = None, date = None, match = util.always, force=False): commit = [] remove = [] changed = []
2bb0dc3677d0d739c8f23807954066231562526d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/2bb0dc3677d0d739c8f23807954066231562526d/localrepo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 2890, 16, 1390, 273, 599, 16, 977, 273, 23453, 729, 273, 599, 16, 1509, 273, 599, 16, 845, 273, 1709, 18, 17737, 16, 2944, 33, 8381, 4672, 3294, 273, 5378, 1206, 273, 5378, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 2890, 16, 1390, 273, 599, 16, 977, 273, 23453, 729, 273, 599, 16, 1509, 273, 599, 16, 845, 273, 1709, 18, 17737, 16, 2944, 33, 8381, 4672, 3294, 273, 5378, 1206, 273, 5378, ...
if o == '-l': leakdebug = 1
if o == '-l': findleaks = 1
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, leakdebug=0, use_large_resources=0): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdir -- the directory in which to look for tests (optional) Users other than the Python test suite will certainly want to specify testdir; if it's omitted, the directory containing the Python test suite is searched for. If the tests argument is omitted, the tests listed on the command-line will be used. If that's empty, too, then all *.py files beginning with test_ will be used. The other seven default arguments (verbose, quiet, generate, exclude, single, randomize, and leakdebug) allow programmers calling main() directly to set the values that would normally be set by flags on the command line. """ try: opts, args = getopt.getopt(sys.argv[1:], 'vgqxsrl', ['have-resources']) except getopt.error, msg: print msg print __doc__ return 2 for o, a in opts: if o == '-v': verbose = verbose+1 if o == '-q': quiet = 1; verbose = 0 if o == '-g': generate = 1 if o == '-x': exclude = 1 if o == '-s': single = 1 if o == '-r': randomize = 1 if o == '-l': leakdebug = 1 if o == '--have-resources': use_large_resources = 1 if generate and verbose: print "-g and -v don't go together!" return 2 good = [] bad = [] skipped = [] if leakdebug: try: import gc except ImportError: print 'cycle garbage collection not available' else: gc.set_debug(gc.DEBUG_LEAK) if single: from tempfile import gettempdir filename = os.path.join(gettempdir(), 'pynexttest') try: fp = open(filename, 'r') next = string.strip(fp.read()) tests = [next] fp.close() except IOError: pass for i in range(len(args)): # Strip trailing ".py" from arguments if args[i][-3:] == '.py': args[i] = args[i][:-3] stdtests = STDTESTS[:] nottests = NOTTESTS[:] if exclude: for arg in args: if arg in stdtests: stdtests.remove(arg) nottests[:0] = args args = [] tests = tests or args or findtests(testdir, stdtests, nottests) if single: tests = tests[:1] if randomize: random.shuffle(tests) test_support.verbose = verbose # Tell tests to be moderately quiet test_support.use_large_resources = use_large_resources save_modules = sys.modules.keys() for test in tests: if not quiet: print test ok = runtest(test, generate, verbose, quiet, testdir) if ok > 0: good.append(test) elif ok == 0: bad.append(test) else: skipped.append(test) # Unload the newly imported modules (best effort finalization) for module in sys.modules.keys(): if module not in save_modules and module.startswith("test."): test_support.unload(module) if good and not quiet: if not bad and not skipped and len(good) > 1: print "All", print count(len(good), "test"), "OK." if bad: print count(len(bad), "test"), "failed:", print string.join(bad) if skipped and not quiet: print count(len(skipped), "test"), "skipped:", print string.join(skipped) if single: alltests = findtests(testdir, stdtests, nottests) for i in range(len(alltests)): if tests[0] == alltests[i]: if i == len(alltests) - 1: os.unlink(filename) else: fp = open(filename, 'w') fp.write(alltests[i+1] + '\n') fp.close() break else: os.unlink(filename) return len(bad) > 0
d569f23da94babd616751cd46eea38963e4edfa1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d569f23da94babd616751cd46eea38963e4edfa1/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 16341, 33, 7036, 16, 1842, 1214, 33, 7036, 16, 3988, 33, 20, 16, 10902, 33, 20, 16, 2103, 33, 20, 16, 4433, 33, 20, 16, 2202, 33, 20, 16, 2744, 554, 33, 20, 16, 20891, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 16341, 33, 7036, 16, 1842, 1214, 33, 7036, 16, 3988, 33, 20, 16, 10902, 33, 20, 16, 2103, 33, 20, 16, 4433, 33, 20, 16, 2202, 33, 20, 16, 2744, 554, 33, 20, 16, 20891, ...
bucketTableName = self.__getTableName( "bucket", name )
bucketTableName = _getTableName( "bucket", name )
def registerType( self, name, definitionKeyFields, definitionAccountingFields, bucketsLength ): """ Register a new type """ gMonitor.registerActivity( "registeradded:%s" % name, "Register added for %s" % " ".join( name.split( "_" ) ), "Accounting", "entries", gMonitor.OP_ACUM )
5644734dd5f9b2176cf1b7afc4f6ab55941c88f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/5644734dd5f9b2176cf1b7afc4f6ab55941c88f0/AccountingDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 559, 12, 365, 16, 508, 16, 2379, 653, 2314, 16, 2379, 3032, 310, 2314, 16, 9169, 1782, 262, 30, 3536, 5433, 279, 394, 618, 3536, 314, 7187, 18, 4861, 6193, 12, 315, 4861, 9665, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 559, 12, 365, 16, 508, 16, 2379, 653, 2314, 16, 2379, 3032, 310, 2314, 16, 9169, 1782, 262, 30, 3536, 5433, 279, 394, 618, 3536, 314, 7187, 18, 4861, 6193, 12, 315, 4861, 9665, ...
return
return True
def send_mail(self, cr, uid, automatic=False, use_new_cursor=False, context=None): # send mail to user regarding them CTG points of month by cron job if not context: context = {} date = context.get('date',False) or datetime.date.today() report_ctg_line_obj = self.pool.get('report.ctg.line') report_ctg_line_ids = report_ctg_line_obj.search(cr, uid, [('name','=',date.strftime('%Y:%m'))]) if len(report_ctg_line_ids): mail_body = {} for report_ctg_line in report_ctg_line_obj.browse(cr, uid, report_ctg_line_ids): user_address = report_ctg_line.rewarded_user_id.address_id if user_address and user_address.email: values = mail_body.get(report_ctg_line.rewarded_user_id.id,[]) values.append([ user_address.name, user_address.email, report_ctg_line.ctg_type_id.name, report_ctg_line.points ]) mail_body[report_ctg_line.rewarded_user_id.id] = values user_history_obj = self.pool.get('user.history') for usr_id,values in mail_body.items(): usr = True total = 0.0 action = "ctg_line" cr.execute("select max(date) as max_date from user_history where user_id = %s and action = '%s'"%(usr_id,action)) history_ctg_lines = cr.dictfetchone() if history_ctg_lines['max_date']: last_date = history_ctg_lines['max_date'] cr.execute("""select sum(points) as old_points from ctg_line where date_ctg <= '%s' and rewarded_user_id =%s """%(last_date,str(usr_id))) old_total = cr.fetchone()[0] else: old_total = 0.0 last_date = date.strftime('%Y-%m-%d') for user, mail_to, ctg_type, points in values: if not user: user = '' if usr: body ="<html><body>Hello <b>" + user + "</b>!<br>" body = body +"<p style=\"margin-left:35px\"> Thanks to Contribute on OpenERP/OpenObject during <b>"+ last_date + "</b> and <b>" + date.strftime('%Y-%m-%d') +"</b><br>"\ + "Your CTG points are decribe in following table."\ + "Your CTG Ponits table:</p>"\ + "<p style=\"margin-left:70px\"><table><tr><th align=left>CTG Type</th><th align=center>|</th><th align=right>Points</th></tr>"\ + "<tr><td colspan=3><hr></td></tr>" usr = False body = body + "<tr><td align=left>" + ctg_type + "</td><td align=center>|</td><td align=right>" + str(points) + "</td></tr>" total = total + points cr.execute("select sum(points) as total1 from ctg_line where rewarded_user_id=%s " %str(usr_id)) total1 = cr.fetchone()[0] if total1 == old_total: body = '' body ="<html><body>Hello <b>" + user + "</b>!<br>"\ +"<p style=\"margin-left:35px\"> Thanks to Contribute on OpenERP/OpenObject during <b>"+ last_date + "</b> and <b>" + date.strftime('%Y-%m-%d') +"</b><br>"\ + "Your CTG points are decribe in following table."\ + "Your CTG Ponits table:</p>"\ + "<p style=\"margin-left:70px\"><table><tr><th align=left>CTG Type</th><th align=center>|</th><th align=right>Points</th></tr>"\ + "<tr><td colspan=3><hr></td></tr>"\ + "<tr><td align=left>" + ctg_type + "</td><td align=center>|</td><td align=right>" + str(0.00) + "</td></tr>"\ + "<tr><td></td><td align=center>|</td><td></td></tr>"\ + "<tr><td colspan=3><hr></td></tr>"\ + "<tr><td align=left>Total</td><td align=center>|</td><td align=right>" + str(0.00) + "</td></tr></table></p>"\ + "<p style=\"margin-left:35px\">And Total CTG points upto <b>" + date.strftime('%Y-%m-%d') +"</b> : <b>" + str(0.00) + "</b></p>"\ + "Thanks<br>OpenERP Quality Team</body></html>" else: body = body + "<tr><td></td><td align=center>|</td><td></td></tr>"\ + "<tr><td colspan=3><hr></td></tr>"\ + "<tr><td align=left>Total</td><td align=center>|</td><td align=right>" + str(total) + "</td></tr></table></p>"\ + "<p style=\"margin-left:35px\">And Total CTG points upto <b>" + date.strftime('%Y-%m-%d') +"</b> : <b>" + str(total1) + "</b></p>"\ + "Thanks<br>OpenERP Quality Team</body></html>" user = tools.config['email_from'] if not user: raise osv.except_osv(_('Error'), _("Please specify server option --smtp-from !")) subject = 'Your CTG points of %s month in OpenERP' %(date.strftime('%Y:%m')) logger = netsvc.Logger() if tools.email_send(user, [mail_to], subject, body, debug=False, subtype='html') == True: logger.notifyChannel('email', netsvc.LOG_INFO, 'Email successfully send to : %s' % (mail_to)) user_history_obj.create(cr,uid,{'action':action,'description':subject,'date':date,'user_id':usr_id}) else: logger.notifyChannel('email', netsvc.LOG_ERROR, 'Failed to send email to : %s' % (mail_to)) return
26c4b0782490355b93d65f86521608008340ed94 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/26c4b0782490355b93d65f86521608008340ed94/user_ctg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 4408, 12, 2890, 16, 4422, 16, 4555, 16, 5859, 33, 8381, 16, 999, 67, 2704, 67, 9216, 33, 8381, 16, 819, 33, 7036, 4672, 468, 1366, 4791, 358, 729, 29012, 2182, 21088, 43, 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, 1366, 67, 4408, 12, 2890, 16, 4422, 16, 4555, 16, 5859, 33, 8381, 16, 999, 67, 2704, 67, 9216, 33, 8381, 16, 819, 33, 7036, 4672, 468, 1366, 4791, 358, 729, 29012, 2182, 21088, 43, 3...
self._update_3d_plane2(self._ortho_pipes[ortho_idx][0], pw)
ps = self._ortho_pipes[ortho_idx][0]['vtkPlaneSource3'] self._sync_3d_plane_with_reslice(ps, ir)
def _pw_cb(self, pw, ortho_idx): origin = 3 * [0] point1 = 3 * [0] point2 = 3 * [0] normal = 3 * [0] pw.GetOrigin(origin) pw.GetPoint1(point1) pw.GetPoint2(point2) pw.GetNormal(normal)
c8cfdb5499ef2e1f1738905c50bb3534438e194c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/c8cfdb5499ef2e1f1738905c50bb3534438e194c/vtk_slice_vwr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14921, 67, 7358, 12, 2890, 16, 8772, 16, 16208, 83, 67, 3465, 4672, 4026, 273, 890, 380, 306, 20, 65, 1634, 21, 273, 890, 380, 306, 20, 65, 1634, 22, 273, 890, 380, 306, 20, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14921, 67, 7358, 12, 2890, 16, 8772, 16, 16208, 83, 67, 3465, 4672, 4026, 273, 890, 380, 306, 20, 65, 1634, 21, 273, 890, 380, 306, 20, 65, 1634, 22, 273, 890, 380, 306, 20, 6...
</td></tr></table><br /></div>
</td></tr></table></div>
def write_details_entry(self, out, var_doc): if isinstance(var_doc.value, RoutineDoc): self.write_function_details_entry(out, var_doc) else: self.write_variable_details_entry(out, var_doc)
2e826daab46d77983d35e6a38ceacf1289828f6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/2e826daab46d77983d35e6a38ceacf1289828f6b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 6395, 67, 4099, 12, 2890, 16, 596, 16, 569, 67, 2434, 4672, 309, 1549, 12, 1401, 67, 2434, 18, 1132, 16, 7271, 558, 1759, 4672, 365, 18, 2626, 67, 915, 67, 6395, 67, 4099, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6395, 67, 4099, 12, 2890, 16, 596, 16, 569, 67, 2434, 4672, 309, 1549, 12, 1401, 67, 2434, 18, 1132, 16, 7271, 558, 1759, 4672, 365, 18, 2626, 67, 915, 67, 6395, 67, 4099, ...
print flatnonzero(self.A).size, 0.25*nA, not isspmatrix(self.A), flatnonzero(self.A).size < 0.25*nA print flatnonzero(self.Aeq).size, 0.25*nAeq, not isspmatrix(self.Aeq), flatnonzero(self.Aeq).size < 0.25*nA
def _prepare(self): if self._baseProblemIsPrepared: return if self._isFDmodel(): self.isFDmodel = True if self.fixedVars is None or (self.optVars is not None and len(self.optVars)<len(self.fixedVars)): D_kwargs = {'Vars':self.optVars} else: D_kwargs = {'fixedVars':self.fixedVars} self._D_kwargs = D_kwargs setStartVectorAndTranslators(self) lb, ub = array([-inf] * self.n), array([inf] * self.n)
197a6b8370d6fc42ba25339c862ca78fbb2265dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6196/197a6b8370d6fc42ba25339c862ca78fbb2265dd/baseProblem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9366, 12, 2890, 4672, 309, 365, 6315, 1969, 13719, 2520, 15464, 30, 327, 309, 365, 6315, 291, 16894, 2284, 13332, 365, 18, 291, 16894, 2284, 273, 1053, 225, 309, 365, 18, 12429, 555...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9366, 12, 2890, 4672, 309, 365, 6315, 1969, 13719, 2520, 15464, 30, 327, 309, 365, 6315, 291, 16894, 2284, 13332, 365, 18, 291, 16894, 2284, 273, 1053, 225, 309, 365, 18, 12429, 555...
containers = [] for wanted in searchFor: for brain in \ instance.portal_catalog(portal_type=wanted): obj = brain.getObject() if obj != None and \ hasattr(obj.aq_explicit,'isPrincipiaFolderish'): containers.append(purl.getRelativeUrl(obj)) return containers
catalog = getToolByName(purl, 'portal_catalog') containers = [] print searchFor for wanted in searchFor: for brain in catalog(portal_type=wanted): containers.append(brain.relative_url) return containers security.declarePublic('addableTypes') def addableTypes(self, instance, field): """ Returns a list of dictionaries which maps portal_type to a human readable form. """
def lookupDestinationsFor(typeinfo, tool, purl): """ search where the user can add a typeid instance """ # first, discover who can contain the type searchFor = [] for regType in tool.listTypeInfo(): if typeinfo.globalAllow(): searchFor.append(regType.getId()) elif regType.filter_content_types and \ typeinfo.getId() in regType.allowed_content_types: searchFor.append(regType.getId()) # after, gimme the path/s containers = [] for wanted in searchFor: for brain in \ instance.portal_catalog(portal_type=wanted): obj = brain.getObject() if obj != None and \ hasattr(obj.aq_explicit,'isPrincipiaFolderish'): containers.append(purl.getRelativeUrl(obj)) # ok, go on... return containers
b8218e6ab5b17cabfbb6f2f9b33b853fcd8112d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/b8218e6ab5b17cabfbb6f2f9b33b853fcd8112d4/Widget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3689, 27992, 1290, 12, 723, 1376, 16, 5226, 16, 293, 718, 4672, 3536, 1623, 1625, 326, 729, 848, 527, 279, 618, 350, 791, 3536, 468, 1122, 16, 10372, 10354, 848, 912, 326, 618, 1623, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3689, 27992, 1290, 12, 723, 1376, 16, 5226, 16, 293, 718, 4672, 3536, 1623, 1625, 326, 729, 848, 527, 279, 618, 350, 791, 3536, 468, 1122, 16, 10372, 10354, 848, 912, 326, 618, 1623, 1...
logger.info(repr(pt_class))
logger.debug(repr(pt_class))
def get_and_bind(template, view=None, cls=None): inst = get(template, view, cls) if inst._v_last_read is False: inst.registry.purge() inst.read() return five_bind(inst, view, cls)
bd794156655d5be5be24d2b9c8f95cb89cb057e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9585/bd794156655d5be5be24d2b9c8f95cb89cb057e5/patches.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 464, 67, 4376, 12, 3202, 16, 1476, 33, 7036, 16, 2028, 33, 7036, 4672, 1804, 273, 336, 12, 3202, 16, 1476, 16, 2028, 13, 309, 1804, 6315, 90, 67, 2722, 67, 896, 353, 1083, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 464, 67, 4376, 12, 3202, 16, 1476, 33, 7036, 16, 2028, 33, 7036, 4672, 1804, 273, 336, 12, 3202, 16, 1476, 16, 2028, 13, 309, 1804, 6315, 90, 67, 2722, 67, 896, 353, 1083, ...
headers = self.retry_sf_download(url, filename) if 'html' in headers['content-type'].lower(): return self._download_html(url, headers, filename, tmpdir) else: return filename
return self._retry_sf_download(url, filename)
def _download_url(self, scheme, url, tmpdir): # Determine download filename # name = filter(None,urlparse.urlparse(url)[2].split('/')) if name: name = name[-1] while '..' in name: name = name.replace('..','.').replace('\\','_') else: name = "__downloaded__" # default if URL has no path contents
13f1364d11d4dccd61eb4c377a9717d3e34dee96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8186/13f1364d11d4dccd61eb4c377a9717d3e34dee96/package_index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7813, 67, 718, 12, 2890, 16, 4355, 16, 880, 16, 20213, 4672, 468, 10229, 4224, 1544, 468, 508, 273, 1034, 12, 7036, 16, 718, 2670, 18, 718, 2670, 12, 718, 25146, 22, 8009, 4939, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7813, 67, 718, 12, 2890, 16, 4355, 16, 880, 16, 20213, 4672, 468, 10229, 4224, 1544, 468, 508, 273, 1034, 12, 7036, 16, 718, 2670, 18, 718, 2670, 12, 718, 25146, 22, 8009, 4939, ...
response = urllib2.urlopen(self.nagios_instance, urllib.urlencode(opts))
response = urllib2.urlopen(self.nagios_instance, urllib.urlencode(opts))
def _call_nagios_alerts(self, host, command): """ build up the POST call for an enable or disable. Example of what nagios expects to get: cmd_typ=29&cmd_mod=2&host=xmlserver1.app.stage.redhat.com&btnSubmit=Commit XXX: need to combine with other call methods """ opts = {} opts['host'] = host opts['cmd_typ'] = command opts['cmd_mod'] = '2' opts['btnSubmit']='Commit' try: response = urllib2.urlopen(self.nagios_instance, urllib.urlencode(opts)) except: print "Failed call to Nagios for " + host raise
bb29eec751694579f6d2612e2ac277d88fc6328f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12876/bb29eec751694579f6d2612e2ac277d88fc6328f/nagios.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1991, 67, 27132, 7441, 67, 11798, 87, 12, 2890, 16, 1479, 16, 1296, 4672, 3536, 1361, 731, 326, 5485, 745, 364, 392, 4237, 578, 4056, 18, 5090, 434, 4121, 290, 346, 7441, 10999, 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, 389, 1991, 67, 27132, 7441, 67, 11798, 87, 12, 2890, 16, 1479, 16, 1296, 4672, 3536, 1361, 731, 326, 5485, 745, 364, 392, 4237, 578, 4056, 18, 5090, 434, 4121, 290, 346, 7441, 10999, 3...
if namespace.isAbsentNamespace() or (namespace.modulePath() is not None): return
if namespace.modulePath() is not None: return namespace if namespace.isAbsentNamespace(): namespace.setModulePath(module_path) return namespace
def __assignNamespaceModulePath (self, namespace, module_path=None): assert isinstance(namespace, pyxb.namespace.Namespace) if namespace.isAbsentNamespace() or (namespace.modulePath() is not None): return if (module_path is None) and not (namespace.prefix() is None): module_path = namespace.prefix() module_path = self.namespaceModuleMap().get(namespace.uri(), module_path) if module_path is None: if self.allowAbsentModule(): return namespace raise pyxb.BindingGenerationError('No prefix or module name available for %s' % (namespace,)) if self.modulePrefix(): # non-empty value module_path = '.'.join([self.modulePrefix(), module_path]) namespace.setModulePath(module_path) return namespace
b97734350a857a061f66cf4e642fdc806e9ba48b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/b97734350a857a061f66cf4e642fdc806e9ba48b/generate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6145, 3402, 3120, 743, 261, 2890, 16, 1981, 16, 1605, 67, 803, 33, 7036, 4672, 1815, 1549, 12, 4937, 16, 2395, 6114, 18, 4937, 18, 3402, 13, 309, 1981, 18, 2978, 743, 1435, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6145, 3402, 3120, 743, 261, 2890, 16, 1981, 16, 1605, 67, 803, 33, 7036, 4672, 1815, 1549, 12, 4937, 16, 2395, 6114, 18, 4937, 18, 3402, 13, 309, 1981, 18, 2978, 743, 1435, 353, ...
if sys.platform == 'linux2':
if sys.platform != 'win32':
def __init_menus(self, pubsub_evt=None): # MENU RELATED TO RAYCASTING TYPES menu = wx.Menu() for name in const.RAYCASTING_TYPES: id = wx.NewId() item = wx.MenuItem(menu, id, name, kind=wx.ITEM_RADIO) menu.AppendItem(item) if name == const.RAYCASTING_OFF_LABEL: item.Check(1) ID_TO_NAME[id] = name
f0ac71e49f3c853b631a45f74df65be5ba21359a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/f0ac71e49f3c853b631a45f74df65be5ba21359a/default_viewers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 67, 26065, 12, 2890, 16, 23288, 67, 73, 11734, 33, 7036, 4672, 468, 490, 1157, 57, 15375, 6344, 8493, 534, 5255, 21871, 1360, 3463, 55, 3824, 273, 7075, 18, 4599, 1435, 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, 1001, 2738, 67, 26065, 12, 2890, 16, 23288, 67, 73, 11734, 33, 7036, 4672, 468, 490, 1157, 57, 15375, 6344, 8493, 534, 5255, 21871, 1360, 3463, 55, 3824, 273, 7075, 18, 4599, 1435, 364, ...
for x in cr.fetchall():
for x in result:
def build_form(self, cr, uid, data, context): query = """ select name, id from crm_profiling_question where id in ( select question from profile_questionnaire_quest_rel where questionnaire = %s)"""% data['form']['questionnaire_name'] cr.execute(query) quest_fields={} quest_form='''<?xml version="1.0"?> <form string="%s">''' % _('Questionnaire') for x in cr.fetchall(): quest_form = quest_form + '''<field name="quest_form'''+str(x[1])+'''"/><newline/>''' quest_fields['quest_form'+str(x[1])] = {'string': str(x[0]), 'type': 'many2one', 'relation': 'crm_profiling.answer', 'domain': [('question_id','=',x[1])] } quest_form = quest_form + '''</form>''' return quest_form,quest_fields
3e3f364abfe84c3c09a44d9a141f8b47794252b6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/3e3f364abfe84c3c09a44d9a141f8b47794252b6/crm_profiling.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 687, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 843, 273, 3536, 2027, 508, 16, 612, 628, 4422, 81, 67, 16121, 4973, 67, 4173, 1625, 612, 316, 261, 2027, 5073, 62...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 687, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 843, 273, 3536, 2027, 508, 16, 612, 628, 4422, 81, 67, 16121, 4973, 67, 4173, 1625, 612, 316, 261, 2027, 5073, 62...
if self.distribution.tests_require:
ei_cmd = self.get_finalized_command("egg_info") old_path = sys.path[:] old_modules = sys.modules.copy() try: sys.path.insert(0, normalize_path(ei_cmd.egg_base)) working_set.__init__() require('%s==%s' % (ei_cmd.egg_name, ei_cmd.egg_version)) func() finally: sys.path[:] = old_path sys.modules.clear() sys.modules.update(old_modules) working_set.__init__() def run(self): if self.distribution.tests_require:
def run(self): # Ensure metadata is up-to-date self.run_command('egg_info')
b662ae02faab8b53f40c6d81cf478b537ec808f7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8186/b662ae02faab8b53f40c6d81cf478b537ec808f7/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 7693, 1982, 353, 731, 17, 869, 17, 712, 365, 18, 2681, 67, 3076, 2668, 23171, 67, 1376, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 7693, 1982, 353, 731, 17, 869, 17, 712, 365, 18, 2681, 67, 3076, 2668, 23171, 67, 1376, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def jsonify(tree, verbose=False):
def jsonify(tree, verbose=False, depth=0):
def jsonify(tree, verbose=False): """
d147a1255fb1d2b175458986bf7090299f258d99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9355/d147a1255fb1d2b175458986bf7090299f258d99/wmlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26354, 12, 3413, 16, 3988, 33, 8381, 16, 3598, 33, 20, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26354, 12, 3413, 16, 3988, 33, 8381, 16, 3598, 33, 20, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
libName = find_library('openctm') if not libName: Blender.Draw.PupMenu('Could not find the OpenCTM shared library') return
def file_callback(filename): if not filename.lower().endswith('.ctm'): filename += '.ctm' scn = bpy.data.scenes.active ob = scn.objects.active if not ob: Blender.Draw.PupMenu('Error%t|Select 1 active object') return EXPORT_APPLY_MODIFIERS = Draw.Create(1) EXPORT_NORMALS = Draw.Create(1) EXPORT_UV = Draw.Create(1) EXPORT_COLORS = Draw.Create(1) pup_block = [\ ('Apply Modifiers', EXPORT_APPLY_MODIFIERS, 'Use transformed mesh data.'),\ ('Normals', EXPORT_NORMALS, 'Export vertex normal data.'),\ ('UVs', EXPORT_UV, 'Export texface UV coords.'),\ ('Colors', EXPORT_COLORS, 'Export vertex Colors.'),\ ] if not Draw.PupBlock('Export...', pup_block): return is_editmode = Blender.Window.EditMode() if is_editmode: Blender.Window.EditMode(0, '', 0) Window.WaitCursor(1) try: EXPORT_APPLY_MODIFIERS = EXPORT_APPLY_MODIFIERS.val EXPORT_NORMALS = EXPORT_NORMALS.val EXPORT_UV = EXPORT_UV.val EXPORT_COLORS = EXPORT_COLORS.val mesh = BPyMesh.getMeshFromObject(ob, None, EXPORT_APPLY_MODIFIERS, False, scn) if not mesh: Blender.Draw.PupMenu('Error%t|Could not get mesh data from active object') return mesh.transform(ob.matrixWorld) vertexUV = mesh.vertexUV vertexColors = mesh.vertexColors if not vertexUV: EXPORT_UV = False if not vertexColors: EXPORT_COLORS = False if not EXPORT_UV: vertexUV = False if not EXPORT_COLORS: vertexColors = False # Extract indices from the Blender mesh triangleCount = len(mesh.faces) pindices = cast((c_int * 3 * triangleCount)(), POINTER(c_int)) i = 0 for face in mesh.faces: pindices[i * 3] = c_int(face.verts[0].index) pindices[i * 3 + 1] = c_int(face.verts[1].index) pindices[i * 3 + 2] = c_int(face.verts[2].index) i = i + 1 # Extract vertex array from the Blender mesh vertexCount = len(mesh.verts) pvertices = cast((c_float * 3 * vertexCount)(), POINTER(c_float)) i = 0 for vert in mesh.verts: pvertices[i * 3] = c_float(vert.co.x) pvertices[i * 3 + 1] = c_float(vert.co.y) pvertices[i * 3 + 2] = c_float(vert.co.z) i = i + 1 # Extract normals if EXPORT_NORMALS: pnormals = cast((c_float * 3 * vertexCount)(), POINTER(c_float)) i = 0 for i, vert in mesh.verts: pnormals[i * 3] = c_float(vert.no.x) pnormals[i * 3 + 1] = c_float(vert.no.y) pnormals[i * 3 + 2] = c_float(vert.no.z) i = i + 1 else: pnormals = POINTER(c_float)() # Extract UVs if EXPORT_UV: ptexCoords = cast((c_float * 2 * vertexCount)(), POINTER(c_float)) i = 0 for i, vert in mesh.verts: ptexCoords[i * 2] = c_float(vert.uvco[0]) ptexCoords[i * 2 + 1] = c_float(vert.uvco[1]) i = i + 1 else: ptexCoords = POINTER(c_float)() # Load the OpenCTM shared library libName = find_library('openctm') if not libName: Blender.Draw.PupMenu('Could not find the OpenCTM shared library') return if os.name == 'nt': libHDL = WinDLL(libName) else: libHDL = CDLL(libName) if not libHDL: Blender.Draw.PupMenu('Could not open the OpenCTM shared library') return # Get all the functions from the shared library that we need ctmNewContext = libHDL.ctmNewContext ctmNewContext.argtypes = [c_int] ctmNewContext.restype = c_void_p ctmFreeContext = libHDL.ctmFreeContext ctmFreeContext.argtypes = [c_void_p] ctmDefineMesh = libHDL.ctmDefineMesh ctmDefineMesh.argtypes = [c_void_p, POINTER(c_float), c_int, POINTER(c_int), c_int, POINTER(c_float)] ctmSave = libHDL.ctmSave ctmSave.argtypes = [c_void_p, c_char_p] # Create an OpenCTM context ctm = ctmNewContext(0x0102) try: # Define the mesh ctmDefineMesh(ctm, pvertices, c_int(vertexCount), pindices, c_int(triangleCount), pnormals) # Save the file ctmSave(ctm, c_char_p(filename)) finally: # Free the OpenCTM context ctmFreeContext(ctm) finally: Window.WaitCursor(0) if is_editmode: Blender.Window.EditMode(1, '', 0)
eea010a11d009f99c685f4fb7604a9191aca0caf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11511/eea010a11d009f99c685f4fb7604a9191aca0caf/openctm_export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 67, 3394, 12, 3459, 4672, 225, 309, 486, 1544, 18, 8167, 7675, 5839, 1918, 2668, 18, 299, 81, 11, 4672, 1544, 1011, 2418, 299, 81, 11, 225, 888, 82, 273, 324, 2074, 18, 892, 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, 585, 67, 3394, 12, 3459, 4672, 225, 309, 486, 1544, 18, 8167, 7675, 5839, 1918, 2668, 18, 299, 81, 11, 4672, 1544, 1011, 2418, 299, 81, 11, 225, 888, 82, 273, 324, 2074, 18, 892, 18,...
for trip in trip_list["trip"]:
for trip in trip_list:
def prettify_trips(trip_list): # parse dates to datetime objects now = datetime.now() for trip in trip_list["trip"]: trip["startdate"] = datetime.strptime(trip["start"], "%Y-%m-%d") trip["finishdate"] = datetime.strptime(trip["finish"], "%Y-%m-%d") # find status of trip: ongoing/past/future if trip["startdate"] < now: if trip["finishdate"] > now: trip["status"] = "Ongoing" else: trip["status"] = "Past" else: trip["status"] = "Future" return trip_list
4f921a37e11dc9bb7f5dcb611059c0f902bd3f31 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11110/4f921a37e11dc9bb7f5dcb611059c0f902bd3f31/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 748, 1164, 67, 313, 7146, 12, 25125, 67, 1098, 4672, 468, 1109, 7811, 358, 3314, 2184, 2037, 273, 3314, 18, 3338, 1435, 225, 364, 20654, 316, 20654, 67, 1098, 30, 20654, 9614, 1937,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 748, 1164, 67, 313, 7146, 12, 25125, 67, 1098, 4672, 468, 1109, 7811, 358, 3314, 2184, 2037, 273, 3314, 18, 3338, 1435, 225, 364, 20654, 316, 20654, 67, 1098, 30, 20654, 9614, 1937,...
y = ((R[:-1] - R[-1])**2).sum(1).min()**0.5
y = ((R[:-nads] - R[-nads])**2).sum(1).min()**0.5
def build(): p = OptionParser(usage='%prog [options] [ads@]surf [output file]', version='%prog 0.1', description='Example ads/surf: CO@2x2Ru0001') p.add_option('-l', '--layers', type='int', default=4, help='Number of layers.') p.add_option('-v', '--vacuum', type='float', default=5.0, help='Vacuum.') p.add_option('-x', '--crystal-structure', help='Crystal structure.', choices=['sc', 'fcc', 'bcc', 'hcp']) p.add_option('-a', '--lattice-constant', type='float', help='Lattice constant in Angstrom.') p.add_option('--c_over_a', type='float', help='c/a ratio.') p.add_option('--height', type='float', help='Height of adsorbate over surface.') p.add_option('--distance', type='float', help='Distance between adsorbate and nearest surface atoms.') p.add_option('--site', help='Adsorption site.', choices=['fcc', 'hcc', 'hollow', 'bridge']) p.add_option('-M', '--magnetic-moment', type='float', default=0.0, help='Magnetic moment.') p.add_option('-G', '--gui', action='store_true', help="Pop up ASE's GUI.") opt, args = p.parse_args() if not 1 <= len(args) <= 2: p.error("incorrect number of arguments") if '@' in args[0]: ads, surf = args[0].split('@') else: ads = None surf = args[0] if surf[0].isdigit(): i1 = surf.index('x') n = int(surf[:i1]) i2 = i1 + 1 while surf[i2].isdigit(): i2 += 1 m = int(surf[i1 + 1:i2]) surf = surf[i2:] else: n = 1 m = 1 if surf[-1].isdigit(): if surf[1].isdigit(): face = surf[1:] surf = surf[0] else: face = surf[2:] surf = surf[:2] else: face = None Z = atomic_numbers[surf] state = reference_states[Z] if opt.crystal_structure: x = opt.crystal_structure else: x = state['symmetry'].lower() if opt.lattice_constant: a = opt.lattice_constant else: a = estimate_lattice_constant(surf, x, opt.c_over_a) if x == 'fcc': if face is None: face = '111' slab = fcc111(surf, (n, m, opt.layers), a, opt.vacuum) r = a / np.sqrt(2) / 2 elif x == 'bcc': if face is None: face = '110' slab = bcc110(surf, (n, m, opt.layers), a, opt.vacuum) r = a * np.sqrt(3) / 4 elif x == 'hcp': if face is None: face = '0001' slab = hcp0001(surf, (n, m, opt.layers), a, opt.c_over_a, opt.vacuum) r = a / 2 else: raise NotImplementedError magmom = opt.magnetic_moment if magmom is None: magmom = {'Ni': 0.6, 'Co': 1.2, 'Fe': 2.3}.get(surf, 0.0) slab.set_initial_magnetic_moments([magmom] * len(slab)) slab.pbc = 1 name = '%dx%d%s%s' % (n, m, surf, face) if ads: site = 'ontop' if '-' in ads: site, ads = ads.split('-') name = site + '-' + ads + '@' + name symbols = string2symbols(ads) if len(symbols) == 1: ads = Atoms(ads) else: ads = molecules(ads) add_adsorbate(slab, ads, 0.0, site) d = opt.distance if d is None: d = r + covalent_radii[ads[0].number] / 2 h = opt.height if h is None: R = slab.positions y = ((R[:-1] - R[-1])**2).sum(1).min()**0.5 print y h = (d**2 - y**2)**0.5 print h else: assert opt.distance is None slab[-1].z += h if len(args) == 2: write(args[1], slab) elif not opt.gui: write(name + '.traj', slab) if opt.gui: view(slab)
66d4b74d8de8e5f5b25ffc54528d9caa662c7940 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/66d4b74d8de8e5f5b25ffc54528d9caa662c7940/adsorb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 13332, 293, 273, 18862, 12, 9167, 28713, 14654, 225, 306, 2116, 65, 306, 17318, 36, 65, 10050, 74, 306, 2844, 585, 65, 2187, 1177, 28713, 14654, 374, 18, 21, 2187, 2477, 2218, 1090...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 13332, 293, 273, 18862, 12, 9167, 28713, 14654, 225, 306, 2116, 65, 306, 17318, 36, 65, 10050, 74, 306, 2844, 585, 65, 2187, 1177, 28713, 14654, 374, 18, 21, 2187, 2477, 2218, 1090...
dest_filename = osp.join(r'c:\data\temp', 'empty_book.xlsx')
dest_filename = osp.join(TMPDIR, 'empty_book.xlsx')
def test_write_empty_workbook(self):
a3b78592e8de2b8b708b574f630c2a3edc9df506 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1351/a3b78592e8de2b8b708b574f630c2a3edc9df506/test_write.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2626, 67, 5531, 67, 1252, 3618, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2626, 67, 5531, 67, 1252, 3618, 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, ...
if self.mipmap_level > 0: for x in xrange(2): for y in xrange(2): src = self.parent.get_tile_memory(tx*2 + x, ty*2 + y, True) mypaintlib.tile_downscale_rgba16(src, t.rgba, x*N/2, y*N/2) t.mipmap_dirty = False
t = Tile() self.tiledict[(tx, ty)] = t empty = True for x in xrange(2): for y in xrange(2): src = self.parent.get_tile_memory(tx*2 + x, ty*2 + y, True) mypaintlib.tile_downscale_rgba16(src, t.rgba, x*N/2, y*N/2) if src is not transparent_tile.rgba: empty = False if empty: del self.tiledict[(tx, ty)] t = transparent_tile
def get_tile_memory(self, tx, ty, readonly): # copy-on-write for readonly tiles # OPTIMIZE: do some profiling to check if this function is a bottleneck # yes it is # Note: we must return memory that stays valid for writing until the # last end_atomic(), because of the caching in tiledsurface.hpp. t = self.tiledict.get((tx, ty)) if t is None: if readonly: t = transparent_tile else: t = Tile() self.tiledict[(tx, ty)] = t if t.mipmap_dirty: # regenerate mipmap if self.mipmap_level > 0: for x in xrange(2): for y in xrange(2): src = self.parent.get_tile_memory(tx*2 + x, ty*2 + y, True) mypaintlib.tile_downscale_rgba16(src, t.rgba, x*N/2, y*N/2) t.mipmap_dirty = False if t.readonly and not readonly: # OPTIMIZE: we could do the copying in save_snapshot() instead, this might reduce the latency while drawing # (eg. tile.valid_copy = some_other_tile_instance; and valid_copy = None here) # before doing this, measure the worst-case time of the call below; same thing with new tiles t = t.copy() self.tiledict[(tx, ty)] = t if not readonly: self.mark_mipmap_dirty(tx, ty, t) return t.rgba
ff4732cd4946b295d6a939c9984ef1ab05967962 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7129/ff4732cd4946b295d6a939c9984ef1ab05967962/tiledsurface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 15368, 67, 7858, 12, 2890, 16, 2229, 16, 13806, 16, 17102, 4672, 468, 1610, 17, 265, 17, 2626, 364, 17102, 12568, 468, 16456, 3445, 15641, 30, 741, 2690, 25658, 358, 866, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 15368, 67, 7858, 12, 2890, 16, 2229, 16, 13806, 16, 17102, 4672, 468, 1610, 17, 265, 17, 2626, 364, 17102, 12568, 468, 16456, 3445, 15641, 30, 741, 2690, 25658, 358, 866, 309, ...
'function : fnname LPAREN args RPAREN OPEN CLOSE' t[0] = 'void %s(%s) {}'%(t[1], ','.join(t[3])) def p_function_full(t): 'function : fnname LPAREN args RPAREN POINTS LPAREN args RPAREN OPEN CLOSE' t[0] = 'struct %s_ret {%s};\n%s_ret %s(%s) {}'%(t[1], ';'.join(t[7]), t[1], t[1], ','.join(t[3])) def p_function_return(t): 'function : fnname POINTS LPAREN args RPAREN OPEN CLOSE' t[0] = 'struct %s_ret {%s};\n%s_ret %s() {}'%(t[1], ';'.join(t[4]), t[1], t[1])
'function : fnname argret OPEN block CLOSE' t[0] = 'void %s(%s) {%s}'%(t[1], t[2], t[4]) def p_function_extern(t): 'function : fnname argret EQUALS EXTERN STRING argret EXTERNCODE SEMICOLON' t[0] = 'extern function == %s'%t[7]
def p_function_args(t): 'function : fnname LPAREN args RPAREN OPEN CLOSE' t[0] = 'void %s(%s) {}'%(t[1], ','.join(t[3]))
224c613e9642a20fde857bc59f946d4b81478677 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13661/224c613e9642a20fde857bc59f946d4b81478677/blt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 915, 67, 1968, 12, 88, 4672, 296, 915, 294, 2295, 529, 511, 15111, 833, 534, 15111, 11919, 14435, 11, 268, 63, 20, 65, 273, 296, 6459, 738, 87, 9275, 87, 13, 6022, 17105, 88...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 915, 67, 1968, 12, 88, 4672, 296, 915, 294, 2295, 529, 511, 15111, 833, 534, 15111, 11919, 14435, 11, 268, 63, 20, 65, 273, 296, 6459, 738, 87, 9275, 87, 13, 6022, 17105, 88...
pid, sts = os.waitpid(self.pid, flag)
try: pid, sts = os.waitpid(self.pid, flag) except os.error: return None
def poll(self, flag=os.WNOHANG): if self.returncode is None: pid, sts = os.waitpid(self.pid, flag) if pid == self.pid: if os.WIFSIGNALED(sts): self.returncode = -os.WTERMSIG(sts) else: assert os.WIFEXITED(sts) self.returncode = os.WEXITSTATUS(sts) return self.returncode
16cd888dd9fa4dc2da642a8edb45e708e296a086 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/16cd888dd9fa4dc2da642a8edb45e708e296a086/forking.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 12, 2890, 16, 2982, 33, 538, 18, 59, 3417, 44, 3388, 4672, 309, 365, 18, 2463, 710, 353, 599, 30, 775, 30, 4231, 16, 27099, 273, 1140, 18, 7048, 6610, 12, 2890, 18, 6610, 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, 7672, 12, 2890, 16, 2982, 33, 538, 18, 59, 3417, 44, 3388, 4672, 309, 365, 18, 2463, 710, 353, 599, 30, 775, 30, 4231, 16, 27099, 273, 1140, 18, 7048, 6610, 12, 2890, 18, 6610, 16, ...
* slower over R when the degree of both of polynomials is less than 250 (roughly) * Over R, results may not be as accurate as the Karatsuba case. This is because we represent coefficients of polynomials over R as fractions, then convert them back to floating-point numbers.
\begin{itemize} \item Slower over R when the degree of both of polynomials is less than 250 (roughly). \item Over R, results may not be as accurate as the Karatsuba case. This is because we represent coefficients of polynomials over R as fractions, then convert them back to floating-point numbers. \end{itemize} AUTHOR: -- Didier Deshommes (2006-05-25)
def _mul_fateman(self,right): """ Returns the product of two polynomials using Kronecker's trick to do the multiplication. This could be used used over a generic base ring.
0068206bd9f7d3f7c28dbd30ce8d707c8b6a1d2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/0068206bd9f7d3f7c28dbd30ce8d707c8b6a1d2b/polynomial_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16411, 67, 74, 340, 4728, 12, 2890, 16, 4083, 4672, 3536, 2860, 326, 3017, 434, 2795, 16991, 87, 1450, 1475, 86, 476, 363, 264, 1807, 28837, 358, 741, 326, 23066, 18, 225, 1220, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16411, 67, 74, 340, 4728, 12, 2890, 16, 4083, 4672, 3536, 2860, 326, 3017, 434, 2795, 16991, 87, 1450, 1475, 86, 476, 363, 264, 1807, 28837, 358, 741, 326, 23066, 18, 225, 1220, 3...
logger.warning('Maximum dataset size reached - creating more subjobs.')
logger.warning('Maximum data size per subjob (%d MB) reached - creating more subjobs.'%maxsize) if subjobsize > maxsize: logger.warning('Failed to split job on filesize constraint. Subjob size %d MB > requested size %d MB'%(subjobsize,maxsize))
def split(self,job):
c7c47fda6ad3ab60b77c6e4ffd3e559abe440622 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/c7c47fda6ad3ab60b77c6e4ffd3e559abe440622/DQ2JobSplitter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 12, 2890, 16, 4688, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 12, 2890, 16, 4688, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
except (SystemExit, KeyboardInterrupt): raise except: return FilenameType("")
return FilenameType("")
def get_filename(self): """Returns the filename of the first downloaded video or the empty string.
a28536b6501d5fda71e4176d25a5e36e9bb1ea11 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/a28536b6501d5fda71e4176d25a5e36e9bb1ea11/item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3459, 12, 2890, 4672, 3536, 1356, 326, 1544, 434, 326, 1122, 13549, 6191, 578, 326, 1008, 533, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3459, 12, 2890, 4672, 3536, 1356, 326, 1544, 434, 326, 1122, 13549, 6191, 578, 326, 1008, 533, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
status.create_and_add_event("discovered-inactive-proxy", [peer_permid, new_peer_data, buddycast_data])
status.create_and_add_event("discovered-inactive-proxy", [show_permid_short(peer_permid), new_peer_data, buddycast_data])
def handleBuddyCastMessage(self, sender_permid, buddycast_data, selversion): """ Handle received buddycast message Add peers, torrents and preferences into database and update last seen Add fresh peers to candidate list All database updates caused by buddycast msg should be handled here """ _now = now() cache_db_data = {'peer':{},'infohash':Set(),'pref':[], 'coll':[]} # peer, updates / pref, pairs, Rahim: coll for colleected torrents cache_peer_data = {} tbs = buddycast_data.pop('taste buddies') rps = buddycast_data.pop('random peers') buddycast_data['oversion'] = selversion
c1eee061f3ec7fef74851eba4dbed76b7d5f9763 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9686/c1eee061f3ec7fef74851eba4dbed76b7d5f9763/buddycast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 38, 29017, 9735, 1079, 12, 2890, 16, 5793, 67, 12160, 350, 16, 324, 29017, 4155, 67, 892, 16, 357, 1589, 4672, 3536, 5004, 5079, 324, 29017, 4155, 883, 1436, 10082, 16, 17351, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 38, 29017, 9735, 1079, 12, 2890, 16, 5793, 67, 12160, 350, 16, 324, 29017, 4155, 67, 892, 16, 357, 1589, 4672, 3536, 5004, 5079, 324, 29017, 4155, 883, 1436, 10082, 16, 17351, 87, ...
article_id = self.idFromURL(article.url)
article_id = self.buildArticleID(article.wikiurl, article.caption)
def getArticleIDs(self, parseTree): for article in parseTree.getChildNodesByClass(advtree.Article): article_id = self.idFromURL(article.url) self.articleids.append(article_id)
f279a319369b546bddd25250c071f074fc1de09e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12390/f279a319369b546bddd25250c071f074fc1de09e/rlwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7880, 5103, 12, 2890, 16, 1109, 2471, 4672, 364, 7559, 316, 1109, 2471, 18, 588, 22460, 30032, 12, 28107, 3413, 18, 7880, 4672, 7559, 67, 350, 273, 365, 18, 3510, 7880, 734, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7880, 5103, 12, 2890, 16, 1109, 2471, 4672, 364, 7559, 316, 1109, 2471, 18, 588, 22460, 30032, 12, 28107, 3413, 18, 7880, 4672, 7559, 67, 350, 273, 365, 18, 3510, 7880, 734, 12, 1...
story = story_stream(stream, tag_uri, tag_name, attributes, ns_decls, pdf_stylesheet, pdf_table_style)
story = story_stream(stream, tag_uri,tag_name, attributes, ns_decls, pdf_stylesheet, pdf_table_style, alias_style)
def document_stream(stream, pdf_stream, is_test=False): """ stream : parser stream pdf_stream : reportlab write the pdf into pdf_stream """ document_attrs = {'showBoundary': 0, 'leftMargin': inch, 'rightMargin': inch, 'topMargin': inch, 'bottomMargin': inch, 'pageSize': pagesizes.A4, 'title': None, 'author': None, 'rotation': 0, 'showBoundary': 0, 'allowSplitting': 1 } pdf_stylesheet = getSampleStyleSheet() pdf_table_style = {} page_templates = [] stack = [] story = [] while True: try: event, value, line_number = stream.next() except StopIteration: break #### START ELEMENT #### if event == START_ELEMENT: tag_uri, tag_name, attributes, ns_decls = value if tag_name == 'document': pdf_filename = attributes.get((None, 'filename'), 'noname.pdf') stack.append((tag_name, attributes, None)) elif tag_name == 'template': page_templates = template_stream(stream, tag_uri, tag_name, attributes, ns_decls, document_attrs) elif tag_name == 'stylesheet': stylesheet_stream(stream, tag_uri, tag_name, attributes, ns_decls, pdf_stylesheet, pdf_table_style) elif tag_name == 'story': story = story_stream(stream, tag_uri, tag_name, attributes, ns_decls, pdf_stylesheet, pdf_table_style) else: # unknown tag stack.append((tag_name, attributes, None)) #### END ELEMENT #### elif event == END_ELEMENT: tag_uri, tag_name = value if tag_name == 'document': break else: # unknown tag stack.pop() #### BUILD PDF #### doc = SimpleDocTemplate(pdf_stream, **document_attrs) doc.addPageTemplates(page_templates) if is_test == True: _story = list(story) doc.build(story, onFirstPage=rmlFirstPage, onLaterPages=rmlLaterPages) if is_test == True: return (_story, pdf_stylesheet)
51b02e012792ad1fcdef1300580c1d6a58548c1f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/51b02e012792ad1fcdef1300580c1d6a58548c1f/rml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 67, 3256, 12, 3256, 16, 8169, 67, 3256, 16, 353, 67, 3813, 33, 8381, 4672, 3536, 1407, 294, 2082, 1407, 8169, 67, 3256, 294, 2605, 7411, 1045, 326, 8169, 1368, 8169, 67, 3256, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 67, 3256, 12, 3256, 16, 8169, 67, 3256, 16, 353, 67, 3813, 33, 8381, 4672, 3536, 1407, 294, 2082, 1407, 8169, 67, 3256, 294, 2605, 7411, 1045, 326, 8169, 1368, 8169, 67, 3256, 35...
entry, _, subentry = string.partition('!') add_entry(entry, subentry)
entry, _, subentry = string.partition(';') add_entry(entry.strip(), subentry.strip())
def add_entry(word, subword, dic=new): entry = dic.get(word) if not entry: dic[word] = entry = [[], {}] if subword: add_entry(subword, '', dic=entry[1]) else: entry[0].append(builder.get_relative_uri('genindex.rst', fn) + '#' + tid)
aec27418b839dde5f01457f667a86871cf7abdde /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7032/aec27418b839dde5f01457f667a86871cf7abdde/environment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4099, 12, 1095, 16, 720, 1095, 16, 11681, 33, 2704, 4672, 1241, 273, 11681, 18, 588, 12, 1095, 13, 309, 486, 1241, 30, 11681, 63, 1095, 65, 273, 1241, 273, 12167, 6487, 2618, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4099, 12, 1095, 16, 720, 1095, 16, 11681, 33, 2704, 4672, 1241, 273, 11681, 18, 588, 12, 1095, 13, 309, 486, 1241, 30, 11681, 63, 1095, 65, 273, 1241, 273, 12167, 6487, 2618, ...
return '[%s] File transfer %r from %s@%s: ' % (self.index, name, self.other.user, self.other.host) else: return '[%s] Inactive file transfer: ' % self.index
return 'File transfer %r from %s@%s: ' % (name, self.other.user, self.other.host) else: return 'Inactive file transfer: '
def format_ps(self): if self.other: name = self.fileselector.name return '[%s] File transfer %r from %s@%s: ' % (self.index, name, self.other.user, self.other.host) else: return '[%s] Inactive file transfer: ' % self.index
51579bc611dc683c1ea8cc0e9af01fccd4bf1852 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5703/51579bc611dc683c1ea8cc0e9af01fccd4bf1852/sip_im_session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 1121, 12, 2890, 4672, 309, 365, 18, 3011, 30, 508, 273, 365, 18, 2354, 292, 1229, 18, 529, 327, 21848, 87, 65, 1387, 7412, 738, 86, 628, 738, 87, 36, 9, 87, 30, 296, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 1121, 12, 2890, 4672, 309, 365, 18, 3011, 30, 508, 273, 365, 18, 2354, 292, 1229, 18, 529, 327, 21848, 87, 65, 1387, 7412, 738, 86, 628, 738, 87, 36, 9, 87, 30, 296, 738, ...
if not ymax:
if ymax is None:
def __init__(self, v, xmin=None, xmax=None, ymin=None, ymax=None, **kwds): w = [] for x in v: if not isinstance(x, plot.Graphics): x = plot.plot(x, xmin=xmin, xmax=xmax) w.append(x) if len(w) == 0: w = [plot.Graphics()] self.__frames = w G = w[0] if not xmin: xmin = G.xmin() if not xmax: xmax = G.xmax() if not ymin: ymin = G.ymin() if not ymax: ymax = G.ymax() self.__xmin = xmin self.__xmax = xmax self.__ymin = ymin self.__ymax = ymax self.__kwds = kwds
19460269dfcd07f506370e6e0e306f3d8cf06dce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/19460269dfcd07f506370e6e0e306f3d8cf06dce/animate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 331, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 2826, 25577, 4672, 341, 273, 5378, 364, 619, 316, 331, 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, 1001, 2738, 972, 12, 2890, 16, 331, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 2826, 25577, 4672, 341, 273, 5378, 364, 619, 316, 331, 30, ...
self.ExpectInvalidValue('invalid_route_agency', 'agency_id')
self.Load('invalid_route_agency') self.problems.PopInvalidValue("agency_id", "routes.txt") self.problems.PopInvalidValue("route_id", "trips.txt") self.problems.AssertNoMoreExceptions()
def runTest(self): self.ExpectInvalidValue('invalid_route_agency', 'agency_id')
c0875c71366a096d1af9711a40b2bd0594054fa5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6302/c0875c71366a096d1af9711a40b2bd0594054fa5/testtransitfeed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 4709, 12, 2890, 4672, 365, 18, 11988, 1941, 620, 2668, 5387, 67, 5547, 67, 346, 2075, 2187, 296, 346, 2075, 67, 350, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 4709, 12, 2890, 4672, 365, 18, 11988, 1941, 620, 2668, 5387, 67, 5547, 67, 346, 2075, 2187, 296, 346, 2075, 67, 350, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
sites : array
sites: array
def equivalent_sites(self, scaled_positions, ondublicates='error', symprec=1e-3): """Returns the scaled positions and all their equivalent sites.
bb0412a30d9dcb76622c8d52f63cd40321a5c028 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/bb0412a30d9dcb76622c8d52f63cd40321a5c028/spacegroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7680, 67, 12180, 12, 2890, 16, 12304, 67, 12388, 16, 603, 72, 447, 815, 2218, 1636, 2187, 27978, 3927, 33, 21, 73, 17, 23, 4672, 3536, 1356, 326, 12304, 6865, 471, 777, 3675, 7680, 918...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7680, 67, 12180, 12, 2890, 16, 12304, 67, 12388, 16, 603, 72, 447, 815, 2218, 1636, 2187, 27978, 3927, 33, 21, 73, 17, 23, 4672, 3536, 1356, 326, 12304, 6865, 471, 777, 3675, 7680, 918...
self.layout.modify_bg(gtk.STATE_NORMAL, self.bgcolor) self.slideshow_window.modify_bg(gtk.STATE_NORMAL, self.bgcolor) self.slideshow_window2.modify_bg(gtk.STATE_NORMAL, self.bgcolor) def show_about(self, action):
self.layout.modify_bg(gtk.STATE_NORMAL, self.bgcolor) self.slideshow_window.modify_bg(gtk.STATE_NORMAL, self.bgcolor) self.slideshow_window2.modify_bg(gtk.STATE_NORMAL, self.bgcolor) def show_about(self, action):
def bgcolor_selected(self, widget): # When the user selects a color, store this color in self.bgcolor (which will
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31509, 67, 8109, 12, 2890, 16, 3604, 4672, 468, 5203, 326, 729, 19770, 279, 2036, 16, 1707, 333, 2036, 316, 365, 18, 12370, 3266, 261, 12784, 903, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31509, 67, 8109, 12, 2890, 16, 3604, 4672, 468, 5203, 326, 729, 19770, 279, 2036, 16, 1707, 333, 2036, 316, 365, 18, 12370, 3266, 261, 12784, 903, 2, -100, -100, -100, -100, -100, -100, ...
except: log( 'Error while moving %s to %s.', self.config.download_dir, new_downloaddir)
except NameError: log( 'Fixing a bug in shutil. See http://bugs.python.org/issue2549') errno = subprocess.call(["rm", "-rf", self.config.download_dir]) if errno <> 0: log( 'Error while deleting %s: rm returned error %i', self.config.download_dir, errno) return except Exception, exc: log( 'Error while moving %s to %s: %s',self.config.download_dir, new_downloaddir, exc)
def set_download_dir( self, new_downloaddir): if self.config.download_dir != new_downloaddir: log( 'Moving downloads from %s to %s', self.config.download_dir, new_downloaddir) try: # Fix error when moving over disk boundaries if os.path.isdir( new_downloaddir) and not os.listdir( new_downloaddir): os.rmdir( new_downloaddir)
e9553287dc0dde6a37151dc98bafa8c06f314081 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/e9553287dc0dde6a37151dc98bafa8c06f314081/libgpodder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 7813, 67, 1214, 12, 365, 16, 394, 67, 7813, 1214, 4672, 309, 365, 18, 1425, 18, 7813, 67, 1214, 480, 394, 67, 7813, 1214, 30, 613, 12, 296, 49, 13767, 23011, 628, 738, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 7813, 67, 1214, 12, 365, 16, 394, 67, 7813, 1214, 4672, 309, 365, 18, 1425, 18, 7813, 67, 1214, 480, 394, 67, 7813, 1214, 30, 613, 12, 296, 49, 13767, 23011, 628, 738, 87, ...
ErrorCode, ErrorInfo = PathClassObj.Validate()
ErrorCode, ErrorInfo = PathClassObj.Validate(".inf")
def GetCurrentArch(self) :
b741f6b1501e5425aa5839c90e577c7f41f9b303 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/914/b741f6b1501e5425aa5839c90e577c7f41f9b303/FfsInfStatement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 3935, 12269, 12, 2890, 13, 294, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 3935, 12269, 12, 2890, 13, 294, 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...
raise _('This method does not exist anymore')
raise NotImplementedError(_('This method does not exist anymore'))
def perm_write(self, cr, user, ids, fields, context=None): raise _('This method does not exist anymore')
3f71dc76c6ecde0acad529b68c21ad9f1df0aff8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f71dc76c6ecde0acad529b68c21ad9f1df0aff8/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4641, 67, 2626, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 1466, 16, 819, 33, 7036, 4672, 1002, 389, 2668, 2503, 707, 1552, 486, 1005, 16828, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4641, 67, 2626, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 1466, 16, 819, 33, 7036, 4672, 1002, 389, 2668, 2503, 707, 1552, 486, 1005, 16828, 6134, 2, -100, -100, -100, -100, -100, -10...
except DataError, err:
except DataError:
def replace_variables(self, variables): item = self._item.copy() try: self.value = variables.replace_list(item.value) except DataError, err: raise DataError("Replacing variables from setting '%s' failed: %s" % (self.name, utils.unic(err))) if len(self.value) == 0: raise DataError("Setting '%s' requires a value" % self.name) if self.name == 'Resource' and len(self.value) > 1: raise DataError('Invalid resource import parameters: %s' % utils.seq2str2(self.value)) basedir = utils.get_directory(item._parent._source) self.value[0] = self._get_path(self.name, self.value[0], basedir)
2b14832e4bdc686ca1adb9ea1e7fdb842cc4f3a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6988/2b14832e4bdc686ca1adb9ea1e7fdb842cc4f3a8/metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 67, 7528, 12, 2890, 16, 3152, 4672, 761, 273, 365, 6315, 1726, 18, 3530, 1435, 775, 30, 365, 18, 1132, 273, 3152, 18, 2079, 67, 1098, 12, 1726, 18, 1132, 13, 1335, 1910, 668, 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, 1453, 67, 7528, 12, 2890, 16, 3152, 4672, 761, 273, 365, 6315, 1726, 18, 3530, 1435, 775, 30, 365, 18, 1132, 273, 3152, 18, 2079, 67, 1098, 12, 1726, 18, 1132, 13, 1335, 1910, 668, 3...
prout(" ")
if not silent: prout(" ")
def lrscan(silent): "Long-range sensor scan." if damaged(DLRSENS): # Now allow base's sensors if docked if game.condition != "docked": if not silent: prout(_("LONG-RANGE SENSORS DAMAGED.")) return if not silent: prout(_("Starbase's long-range scan")) elif not silent: prout(_("Long-range scan")) for x in range(game.quadrant.i-1, game.quadrant.i+2): if not silent: proutn(" ") for y in range(game.quadrant.j-1, game.quadrant.j+2): if not coord(x, y).valid_quadrant(): if not silent: proutn(" -1") else: if not damaged(DRADIO): game.state.galaxy[x][y].charted = True game.state.chart[x][y].klingons = game.state.galaxy[x][y].klingons game.state.chart[x][y].starbase = game.state.galaxy[x][y].starbase game.state.chart[x][y].stars = game.state.galaxy[x][y].stars if not silent and game.state.galaxy[x][y].supernova: proutn(" ***") elif not silent: proutn(" %3d" % (game.state.chart[x][y].klingons*100 + game.state.chart[x][y].starbase * 10 + game.state.chart[x][y].stars)) prout(" ")
a5d674eeaa338b2585222a9f405c7cb5d2f7fbe0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3176/a5d674eeaa338b2585222a9f405c7cb5d2f7fbe0/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12226, 9871, 12, 21862, 4672, 315, 3708, 17, 3676, 10583, 4135, 1199, 309, 302, 301, 11349, 12, 8914, 54, 26753, 4672, 468, 4494, 1699, 1026, 1807, 31349, 309, 5822, 329, 309, 7920, 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, 12226, 9871, 12, 21862, 4672, 315, 3708, 17, 3676, 10583, 4135, 1199, 309, 302, 301, 11349, 12, 8914, 54, 26753, 4672, 468, 4494, 1699, 1026, 1807, 31349, 309, 5822, 329, 309, 7920, 18, ...
tmpXML = '<rect fillopacity="1" fillcolor="' + self.l.backgroundColour.strip("
tmpXML = '<rect fillopacity="1" fillcolor="%s" color="%s" size="(%d,%d)" id="bgColor%s" />' % (self.l.backgroundColour.strip("
def run(self): self.isPlaying = True log.log(2,"info",_("XiboLayoutManager instance running."))
a97eeb56e7490babc4ddaafb6ffd9d645d2dd981 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5464/a97eeb56e7490babc4ddaafb6ffd9d645d2dd981/XiboClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 365, 18, 291, 11765, 310, 273, 1053, 613, 18, 1330, 12, 22, 10837, 1376, 3113, 67, 2932, 60, 495, 83, 3744, 1318, 791, 3549, 1199, 3719, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 365, 18, 291, 11765, 310, 273, 1053, 613, 18, 1330, 12, 22, 10837, 1376, 3113, 67, 2932, 60, 495, 83, 3744, 1318, 791, 3549, 1199, 3719, 2, -100, -100, -100, -100...
p = document.body[i + 2].find("islongtable") if p > -1: q = document.body[i + 2].find("tabularvalignment") if q > -1: document.body[i + 2] = document.body[i + 2][:q - 1] document.body[i + 2] = document.body[i + 2] + '>' i = i + 1
fline = find_token(document.body, "<features", i, end) if fline == -1: document.warning("Can't find features for inset at line " + str(i)) i = end continue p = document.body[fline].find("islongtable") if p != -1: q = document.body[fline].find("tabularvalignment") if q != -1: document.body[fline] = document.body[fline][:q - 1] + '>' i = end
def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i += 1 continue # don't set a box for longtables, only delete tabularvalignment # the alignment is 2 lines below \\begin_inset Tabular p = document.body[i + 2].find("islongtable") if p > -1: q = document.body[i + 2].find("tabularvalignment") if q > -1: document.body[i + 2] = document.body[i + 2][:q - 1] document.body[i + 2] = document.body[i + 2] + '>' i = i + 1 continue # no longtable tabularvalignment = 'c' # which valignment is specified? m = document.body[i + 2].find('tabularvalignment="top"') if m > -1: tabularvalignment = 't' m = document.body[i + 2].find('tabularvalignment="bottom"') if m > -1: tabularvalignment = 'b' # delete tabularvalignment q = document.body[i + 2].find("tabularvalignment") if q > -1: document.body[i + 2] = document.body[i + 2][:q - 1] document.body[i + 2] = document.body[i + 2] + '>' # don't add a box when centered if tabularvalignment == 'c': i = j continue subst = ['\\end_layout', '\\end_inset'] document.body[j:j] = subst # just inserts those lines subst = ['\\begin_inset Box Frameless', 'position "' + tabularvalignment +'"', 'hor_pos "c"', 'has_inner_box 1', 'inner_pos "c"', 'use_parbox 0', # we don't know the width, assume 50% 'width "50col%"', 'special "none"', 'height "1in"', 'height_special "totalheight"', 'status open', '', '\\begin_layout Plain Layout'] document.body[i:i] = subst # this just inserts the array at i i += len(subst) + 2 # adjust i to save a few cycles
838adc69aa367bef9c652dece25f82ca4e2bd989 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/838adc69aa367bef9c652dece25f82ca4e2bd989/lyx_2_0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 7032, 2490, 1125, 724, 12, 5457, 4672, 315, 868, 1097, 326, 28342, 1244, 724, 1456, 315, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, 12, 5457, 18, 3432, 16, 842...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 7032, 2490, 1125, 724, 12, 5457, 4672, 315, 868, 1097, 326, 28342, 1244, 724, 1456, 315, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, 12, 5457, 18, 3432, 16, 842...
lineages_map "child: parent lineage", a map of each child lineage to its parent lineage
childtoparent_map "child: parent lineage", a map of each child lineage to its parent lineage
def Prune(lineages_map, nodes, all_alive): """ Input ------ lineages_map "child: parent lineage", a map of each child lineage to its parent lineage nodes a map of lineages and all the info that goes with them, see other functions for description all_alive the lineages that are leaf nodes i.e. still alive Output ------ final_map "parent:set(children)" map, pruned so that the map traces back only the lineages of the alive leaf nodes """ final_map={}; all_alive_copy=all_alive.copy(); while(len(all_alive_copy)>0): lineage=all_alive_copy.pop(); child=lineage; parent=lineages_map[child] reached_beginning='False'; while(reached_beginning=='False'): if(final_map.has_key(parent)): children=final_map[parent]; children.add(child); final_map.update({parent:children}); else: final_map.update({parent:set([child])}) if(parent==-1): reached_beginning='True'; else: child=parent; parent=lineages_map[child]; intermediate_map= Make_copy(final_map); final_map_copy= Make_copy(final_map);
c872827e6167f1bc33108444aa076f7378184a7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7945/c872827e6167f1bc33108444aa076f7378184a7e/bd_simple.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2301, 7556, 12, 1369, 1023, 67, 1458, 16, 2199, 16, 777, 67, 11462, 4672, 3536, 2741, 31913, 225, 1151, 3669, 817, 67, 1458, 3639, 315, 3624, 30, 982, 31766, 3113, 279, 852, 434, 1517, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2301, 7556, 12, 1369, 1023, 67, 1458, 16, 2199, 16, 777, 67, 11462, 4672, 3536, 2741, 31913, 225, 1151, 3669, 817, 67, 1458, 3639, 315, 3624, 30, 982, 31766, 3113, 279, 852, 434, 1517, ...
if '__WXMAC__' in wx.PlatformInfo: def Destroy(self): if (self.blockItem.mainFrameToolbar): self.blockItem.getFrame().SetToolBar (None) super (wxToolbar, self).Destroy()
def __init__(self, *arguments, **keywords): super (wxToolbar, self).__init__ (*arguments, **keywords) # keep track of ToolbarItems so we can tell when/how they change in synchronize self.toolItemList = [] # non-persistent list self.toolItems = 0
172f36f1b1310ef58f5d815c379f4ea37fc500f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/172f36f1b1310ef58f5d815c379f4ea37fc500f1/MenusAndToolbars.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 7099, 16, 2826, 11771, 4672, 2240, 261, 27226, 17907, 16, 365, 2934, 972, 2738, 972, 261, 14, 7099, 16, 2826, 11771, 13, 468, 3455, 3298, 434, 13288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 7099, 16, 2826, 11771, 4672, 2240, 261, 27226, 17907, 16, 365, 2934, 972, 2738, 972, 261, 14, 7099, 16, 2826, 11771, 13, 468, 3455, 3298, 434, 13288, ...
if len(shape) != 0: n = Numeric.multiply.reduce(shape) s = apply(fun, args + (n,)) s.shape = shape return s else: n = 1 s = apply(fun, args + (n,)) return s[0]
n = Numeric.multiply.reduce(shape) s = apply(fun, args + (n,)) print s.shape return s.reshape(shape)
def _build_random_array(fun, args, shape=[]):
306fc5d6e715f51a3a568a34dccd39c44af757fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/306fc5d6e715f51a3a568a34dccd39c44af757fe/random_lite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 9188, 67, 1126, 12, 12125, 16, 833, 16, 2179, 33, 8526, 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, ...
[ 1, 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, 389, 3510, 67, 9188, 67, 1126, 12, 12125, 16, 833, 16, 2179, 33, 8526, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if self.a1() != 0 or self.a2() != 0 or self.a3() != 0: raise NotImplementedError, \ "Elliptic curve must be given in the form y^2 = x^3 + ax + b" if self.discriminant().valuation(p) != 0: raise NotImplementedError, \ "Elliptic curve equation must be in minimal form at p"
X = self.weierstrass_model() assert X.discriminant().valuation(p) == 0, "Something's gone wrong. " \ "The discriminant of the weierstrass model should be a unit " \ " at p."
def padic_E2(self, p, prec=20, check=False): r""" Returns the value of the $p$-adic modular form $E2$ for $(E, \omega)$ where $\omega$ is the usual invariant differential $dx/(2y + a_1 x + a_3)$.
0c37ef5556331eaa4e038ffac7b4c6c057b249e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/0c37ef5556331eaa4e038ffac7b4c6c057b249e3/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 41, 22, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 866, 33, 8381, 4672, 436, 8395, 2860, 326, 460, 434, 326, 271, 84, 8, 17, 20333, 681, 2490, 646, 271, 41, 22, 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, 4627, 335, 67, 41, 22, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 866, 33, 8381, 4672, 436, 8395, 2860, 326, 460, 434, 326, 271, 84, 8, 17, 20333, 681, 2490, 646, 271, 41, 22, 8, ...
self.n = ZZ(max(S)+1).exact_log(2)
self.n = ZZ(max(S)).nbits()
def __init__(self, *args, **kwargs): """ Construct a substitution box (S-box) for a given lookup table `S`.
c7ac2194ff34d04b01de8c9e2cdfcb651d73434d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/c7ac2194ff34d04b01de8c9e2cdfcb651d73434d/sbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 225, 2826, 4333, 4672, 3536, 14291, 279, 12785, 3919, 261, 55, 17, 2147, 13, 364, 279, 864, 3689, 1014, 1375, 55, 8338, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 225, 2826, 4333, 4672, 3536, 14291, 279, 12785, 3919, 261, 55, 17, 2147, 13, 364, 279, 864, 3689, 1014, 1375, 55, 8338, 2, -100, -100, -10...
self.assertEqual(1, self.GetBrowserWindowCount(), 'Extensions in failing group: %s' % extensions[curr_extension:group_end])
self.assertTrue(self.GetBrowserWindowCount(), 'Extensions in failing group: %s' % extensions[curr_extension:group_end])
def testExtensionCrashes(self): """Add top extensions; confirm browser stays up when visiting top urls""" self.assertTrue(os.path.exists(self.extensions_dir_), 'The dir "%s" must exist' % os.path.abspath(self.extensions_dir_)) self.assertTrue(os.path.exists(self.urls_file_), 'The file "%s" must exist' % os.path.abspath(self.urls_file_))
1ebe3cefbab03f450586895feea998f994ff13f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/1ebe3cefbab03f450586895feea998f994ff13f8/extensions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3625, 12893, 7690, 12, 2890, 4672, 3536, 986, 1760, 4418, 31, 6932, 4748, 384, 8271, 731, 1347, 3757, 310, 1760, 6903, 8395, 365, 18, 11231, 5510, 12, 538, 18, 803, 18, 1808, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3625, 12893, 7690, 12, 2890, 4672, 3536, 986, 1760, 4418, 31, 6932, 4748, 384, 8271, 731, 1347, 3757, 310, 1760, 6903, 8395, 365, 18, 11231, 5510, 12, 538, 18, 803, 18, 1808, 12, ...
self.data = None self.send("Examples", data)
def setData(self,data): self.closeContext()
9f7a855935e1394a2f074abf1dc0071117fc38ad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/9f7a855935e1394a2f074abf1dc0071117fc38ad/OWImpute.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 892, 4672, 365, 18, 4412, 1042, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 892, 4672, 365, 18, 4412, 1042, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
res2 = run_sql("DELETE FROM user WHERE id=%s" % userID)
res2 = run_sql("DELETE FROM user WHERE id=%s", (userID, ))
def perform_deleteaccount(req, userID, callback='yes', confirm=0): """delete account""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="5"></a>5. Delete account.&nbsp;&nbsp;&nbsp;<small>[<a title="See guide" href="%s/help/admin/webaccess-admin-guide#4">?</a>]</small>""" % weburl res = run_sql("SELECT id, email FROM user WHERE id=%s", (userID, )) output = "" if res: if confirm in [0, "0"]: text = '<b><span class="important">Are you sure you want to delete the account with email: "%s"?</span></b>' % res[0][1] output += createhiddenform(action="deleteaccount", text=text, userID=userID, confirm=1, button="Delete") elif confirm in [1, "1"]: res2 = run_sql("DELETE FROM user WHERE id=%s" % userID) output += '<b><span class="info">Account deleted.</span></b>' if CFG_ACCESS_CONTROL_NOTIFY_USER_ABOUT_DELETION == 1: emailsent = sendAccountDeletedMessage(res[0][1], res[0][1]) else: output += '<b><span class="info">The account id given does not exist.</span></b>' body = [output] if callback: return perform_editaccount(req, userID, mtype='perform_deleteaccount', content=addadminbox(subtitle, body), callback='yes') else: return addadminbox(subtitle, body)
6ea5d72a403945bb48459d4ea7eed6856c3451fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1931/6ea5d72a403945bb48459d4ea7eed6856c3451fb/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 3733, 4631, 12, 3658, 16, 16299, 16, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 3536, 3733, 2236, 8395, 225, 261, 1944, 67, 710, 16, 1357, 67, 2150, 13, 273, 353, 67, 3666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 3733, 4631, 12, 3658, 16, 16299, 16, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 3536, 3733, 2236, 8395, 225, 261, 1944, 67, 710, 16, 1357, 67, 2150, 13, 273, 353, 67, 3666, ...
'-kernel', 'error_logger', '{file, "%s"}' % self.log_file,
def args(self): settings = self.disco_settings return settings['ERLANG'].split() + \ ['+K', 'true', '-heart', '-detached', '-rsh', 'ssh', '-connect_all', 'false', '-kernel', 'error_logger', '{file, "%s"}' % self.log_file, '-pa', os.path.join(settings['DISCO_MASTER_HOME'], 'ebin'), '-sname', '%s_master' % settings['DISCO_NAME'], '-disco', 'disco_name', '"%s"' % settings['DISCO_NAME'], '-disco', 'disco_root', '"%s"' % settings['DISCO_MASTER_ROOT'], '-disco', 'scgi_port', '%s' % settings['DISCO_SCGI_PORT'], '-disco', 'disco_localdir', '"%s"' % settings['DISCO_LOCAL_DIR'], '-eval', '[handle_job, handle_ctrl]', '-eval', 'application:start(disco)']
ad8c242af148154828b966902f5ab8e49963a98c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/373/ad8c242af148154828b966902f5ab8e49963a98c/disco.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 833, 12, 2890, 4672, 1947, 273, 365, 18, 2251, 2894, 67, 4272, 327, 1947, 3292, 654, 10571, 29489, 4939, 1435, 397, 521, 10228, 15, 47, 2187, 296, 3767, 2187, 2400, 580, 485, 2187, 2400,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 833, 12, 2890, 4672, 1947, 273, 365, 18, 2251, 2894, 67, 4272, 327, 1947, 3292, 654, 10571, 29489, 4939, 1435, 397, 521, 10228, 15, 47, 2187, 296, 3767, 2187, 2400, 580, 485, 2187, 2400,...
continue
continue
def add_sources(srclist): elst = [] for ent in srclist: if not ent.has_key('source'): elst.append([ "", "missing source" ]) continue source=ent['source'] if source.startswith("ppa:"): try: util.subp(["add-apt-repository",source]) except: elst.append([source, "add-apt-repository failed"]) continue if not ent.has_key('filename'): ent['filename']='cloud_config_sources.list' if not ent['filename'].startswith("/"): ent['filename'] = "%s/%s" % \ ("/etc/apt/sources.list.d/", ent['filename']) if ( ent.has_key('keyid') and not ent.has_key('key') ): ks = "keyserver.ubuntu.com" if ent.has_key('keyserver'): ks = ent['keyserver'] try: ent['key'] = util.getkeybyid(ent['keyid'], ks) except: elst.append([source,"failed to get key from %s" % ks]) continue if ent.has_key('key'): try: util.subp(('apt-key', 'add', '-'), ent['key']) except: elst.append([source, "failed add key"]) try: util.write_file(ent['filename'], source + "\n") except: elst.append([source, "failed write to file %s" % ent['filename']]) return(elst)
01a9cdeae8cde753df33ab998bd9e47dd22dd3dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7197/01a9cdeae8cde753df33ab998bd9e47dd22dd3dd/CloudConfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 10141, 12, 11254, 830, 376, 4672, 415, 334, 273, 5378, 225, 364, 3281, 316, 9133, 830, 376, 30, 309, 486, 3281, 18, 5332, 67, 856, 2668, 3168, 11, 4672, 415, 334, 18, 6923, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 10141, 12, 11254, 830, 376, 4672, 415, 334, 273, 5378, 225, 364, 3281, 316, 9133, 830, 376, 30, 309, 486, 3281, 18, 5332, 67, 856, 2668, 3168, 11, 4672, 415, 334, 18, 6923, ...
_MAXCACHE = 500 def _shrink_cache(cache_dict, max_length, divisor=5): """Make room in the given cache. Args: cache_dict: The cache dictionary to modify. max_length: Maximum divisor: Cache will shrink to max_length - 1/divisor*max_length items. """ cache_keys = tuple(cache_dict.keys()) overage = len(cache_keys) - max_length if overage < 0: return number_to_toss = max_length // divisor + overage import random if not hasattr(random, 'sample'): return for doomed_key in random.sample(cache_keys, number_to_toss): try: del cache_dict[doomed_key] except KeyError: pass def _compile(*args): return _compile_typed(type(args[0]), *args) @functools.lru_cache(maxsize=_MAXCACHE) def _compile_typed(type, *key):
def _compile(pattern, flags): return _compile_typed(type(pattern), pattern, flags) @functools.lru_cache(maxsize=500) def _compile_typed(text_bytes_type, pattern, flags):
def escape(pattern): "Escape all non-alphanumeric characters in pattern." if isinstance(pattern, str): alphanum = _alphanum_str s = list(pattern) for i in range(len(pattern)): c = pattern[i] if c not in alphanum: if c == "\000": s[i] = "\\000" else: s[i] = "\\" + c return "".join(s) else: alphanum = _alphanum_bytes s = [] esc = ord(b"\\") for c in pattern: if c in alphanum: s.append(c) else: if c == 0: s.extend(b"\\000") else: s.append(esc) s.append(c) return bytes(s)
fe479f4d1bd2f50724d0db612bcc9ae01fa36ad3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/fe479f4d1bd2f50724d0db612bcc9ae01fa36ad3/re.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4114, 12, 4951, 4672, 315, 8448, 777, 1661, 17, 287, 21183, 3949, 316, 1936, 1199, 309, 1549, 12, 4951, 16, 609, 4672, 524, 17560, 273, 389, 287, 17560, 67, 701, 272, 273, 666, 12, 495...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4114, 12, 4951, 4672, 315, 8448, 777, 1661, 17, 287, 21183, 3949, 316, 1936, 1199, 309, 1549, 12, 4951, 16, 609, 4672, 524, 17560, 273, 389, 287, 17560, 67, 701, 272, 273, 666, 12, 495...
self.aln_info.go() self.aln_info.write_identities()
self.aln_info.go() self.aln_info.write_identities()
def prepare( self ): """ Executed before modeller run. """ self.prepareFolders()
d05e2b3d4eebea842e53f240a510c273d32d58eb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/d05e2b3d4eebea842e53f240a510c273d32d58eb/Modeller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 12, 365, 262, 30, 3536, 3889, 4817, 1865, 938, 749, 1086, 18, 3536, 365, 18, 9366, 14885, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 12, 365, 262, 30, 3536, 3889, 4817, 1865, 938, 749, 1086, 18, 3536, 365, 18, 9366, 14885, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
odict['nodeclass'] = None odict['module_cache'] = None
odict['nodeclass'] = None odict['module_cache'] = None
def __getstate__(self): """ Pickle function """ odict = self.__dict__.copy() odict['nodemodule_path'] = None odict['nodemodule'] = None odict['nodeclass'] = None odict['module_cache'] = None return odict
0ceea93f880b610f6ec05e7f6f0d32b2a4dd7e66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11338/0ceea93f880b610f6ec05e7f6f0d32b2a4dd7e66/node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 2019, 972, 12, 2890, 4672, 3536, 23038, 298, 445, 3536, 320, 1576, 273, 365, 16186, 1576, 25648, 3530, 1435, 320, 1576, 3292, 2159, 2978, 67, 803, 3546, 273, 599, 320, 1576, 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, 1001, 588, 2019, 972, 12, 2890, 4672, 3536, 23038, 298, 445, 3536, 320, 1576, 273, 365, 16186, 1576, 25648, 3530, 1435, 320, 1576, 3292, 2159, 2978, 67, 803, 3546, 273, 599, 320, 1576, 3...
self.root_name, self.files = read_new_catalogue(0xc8800)
self.root_name, self.files = self.read_new_catalogue(0xc8800)
def __init__(self, adf): # Check the properties using the length of the file adf.seek(0,2) length = adf.tell() adf.seek(0,0) if length == 163840: self.ntracks = 40 self.nsectors = 16 self.sector_size = 256 interleave = 0 self.disc_type = 'adf' #if string.lower(adf_file[-4:])==(suffix+"adf"): elif length == 327680: self.ntracks = 80 self.nsectors = 16 self.sector_size = 256 interleave = 0 self.disc_type = 'adf' #elif string.lower(adf_file[-4:])==(suffix+"adl"): elif length == 655360: self.ntracks = 160 self.nsectors = 16 # per track self.sector_size = 256 # in bytes interleave = 1 self.disc_type = 'adl' elif length == 819200: if identify_format(adf) == 'D': self.ntracks = 80 self.nsectors = 10 self.sector_size = 1024 interleave = 0 self.disc_type = 'adD' elif identify_format(adf) == 'E': self.ntracks = 80 self.nsectors = 10 self.sector_size = 1024 interleave = 0 self.disc_type = 'adE' else: raise ADFS_exception, \ 'Please supply a .adf, .adl or .adD file.' elif length == 1638400: self.ntracks = 80 self.nsectors = 20 self.sector_size = 1024 interleave = 0 self.disc_type = 'adEbig' else: raise ADFS_exception, 'Please supply a .adf, .adl or .adD file.' # Read tracks self.sectors = self.read_tracks(adf, interleave) # Close the ADF file adf.close() #open('dump', 'wb').write(self.sectors) #sys.exit() self.disc_name = 'Untitled' if self.disc_type == 'adD': # Find the root directory name and all the files and directories # contained within it self.root_name, self.files = read_old_catalogue(0x400) elif self.disc_type == 'adE': # Read the disc name and map self.disc_name, self.disc_map = read_disc_info() # Find the root directory name and all the files and directories # contained within it self.root_name, self.files = read_new_catalogue(0x800) elif self.disc_type == 'adEbig': # Read the disc name and map self.disc_name, self.disc_map = read_disc_info() # Find the root directory name and all the files and directories # contained within it self.root_name, self.files = read_new_catalogue(0xc8800) else: # Find the root directory name and all the files and directories # contained within it self.root_name, self.files = read_old_catalogue(2*self.sector_size)
25f0ef7dc7411ab5a651cc7127ed79f5bcd54fc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3059/25f0ef7dc7411ab5a651cc7127ed79f5bcd54fc3/ADF2INF.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1261, 74, 4672, 225, 468, 2073, 326, 1790, 1450, 326, 769, 434, 326, 585, 1261, 74, 18, 16508, 12, 20, 16, 22, 13, 769, 273, 1261, 74, 18, 88, 1165, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1261, 74, 4672, 225, 468, 2073, 326, 1790, 1450, 326, 769, 434, 326, 585, 1261, 74, 18, 16508, 12, 20, 16, 22, 13, 769, 273, 1261, 74, 18, 88, 1165, ...
sage: s.dct()
sage: s.dct()
def dct(self): """ Implements a discrete Cosine transform
047fd8249ded3346f1365ed658c51ec14038503c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/047fd8249ded3346f1365ed658c51ec14038503c/dft.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18253, 12, 2890, 4672, 3536, 29704, 279, 20035, 385, 538, 558, 2510, 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, 18253, 12, 2890, 4672, 3536, 29704, 279, 20035, 385, 538, 558, 2510, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.redraw()
self.offset=0 if self.pos>self.offset+self.w-2: self.scroll_right() else: self.redraw()
def key_up(self): if self.history_pos>=len(self.history): curses.beep() return if self.history_pos==0: self.saved_content=self.content self.history_pos+=1 self.content=self.history[-self.history_pos] self.pos=len(self.content) self.redraw()
fcb35744b203a9272daba52c3a98d8dfcc0ef646 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12768/fcb35744b203a9272daba52c3a98d8dfcc0ef646/edit_line.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 416, 12, 2890, 4672, 309, 365, 18, 8189, 67, 917, 34, 33, 1897, 12, 2890, 18, 8189, 4672, 30436, 18, 2196, 881, 1435, 327, 309, 365, 18, 8189, 67, 917, 631, 20, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 416, 12, 2890, 4672, 309, 365, 18, 8189, 67, 917, 34, 33, 1897, 12, 2890, 18, 8189, 4672, 30436, 18, 2196, 881, 1435, 327, 309, 365, 18, 8189, 67, 917, 631, 20, 30, 365, 1...
return args[key]
return uri_encode_var(args.get(key, ''))
def repl(m): key = m.group(1) return args[key]
0e1a5d6a946880934fdc6cdb2e9d57baa4d3a726 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11603/0e1a5d6a946880934fdc6cdb2e9d57baa4d3a726/uritemplate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6831, 12, 81, 4672, 498, 273, 312, 18, 1655, 12, 21, 13, 327, 833, 63, 856, 65, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 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, 6831, 12, 81, 4672, 498, 273, 312, 18, 1655, 12, 21, 13, 327, 833, 63, 856, 65, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if arch == 'i386'
if arch == 'i386':
def __init__(self, config, ksparser):
1357a05145b4a73b99ea406ad36b89907f24231e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8489/1357a05145b4a73b99ea406ad36b89907f24231e/gather.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 16, 11654, 4288, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 16, 11654, 4288, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'custom_vars', 'deps_hooks', '_file_list', 'processed', 'hooks_ran', 'deps_parsed', 'requirements', 'direct_reference'):
'custom_vars', 'deps_hooks', '_file_list', 'should_process', 'processed', 'hooks_ran', 'deps_parsed', 'requirements'):
def __str__(self): out = [] for i in ('name', 'url', 'parsed_url', 'safesync_url', 'custom_deps', 'custom_vars', 'deps_hooks', '_file_list', 'processed', 'hooks_ran', 'deps_parsed', 'requirements', 'direct_reference'): # 'deps_file' if self.__dict__[i]: out.append('%s: %s' % (i, self.__dict__[i]))
f1eaec8c2c4cf43e6361b8b3b932641edd407cda /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/f1eaec8c2c4cf43e6361b8b3b932641edd407cda/gclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 596, 273, 5378, 364, 277, 316, 7707, 529, 2187, 296, 718, 2187, 296, 10817, 67, 718, 2187, 296, 87, 1727, 281, 1209, 67, 718, 2187, 296, 3662, 67, 14877...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 596, 273, 5378, 364, 277, 316, 7707, 529, 2187, 296, 718, 2187, 296, 10817, 67, 718, 2187, 296, 87, 1727, 281, 1209, 67, 718, 2187, 296, 3662, 67, 14877...
write_array(f, subset, item_sep, nest_prefix, nest_suffix, nest_sep)
write_array(f, subset, item_sep, nest_prefix, nest_suffix, nest_sep)
def write_array(f, set, item_sep=' ', nest_prefix='', nest_suffix='\n', nest_sep=''): """Write an array of arbitrary dimension to a file. A general recursive array writer. The last four parameters allow a great deal of freedom in choosing the output format of the array. The defaults for those parameters give output that is gnuplot-readable. But using, for example, ( ',', '{', '}', ',\\n' ) would output an array in a format that Mathematica could read. item_sep should not contain '%' (or if it does, it should be escaped to '%%' ) since item_sep is put into a format string. """ if len(set.shape) == 1: (columns,) = set.shape assert columns > 0 fmt = string.join(['%s'] * columns, item_sep) f.write(nest_prefix) f.write(fmt % tuple(set.tolist())) f.write(nest_suffix) elif len(set.shape) == 2: # This case could be done with recursion, but `unroll' for # efficiency. (points, columns) = set.shape assert points > 0 assert columns > 0 fmt = string.join(['%s'] * columns, item_sep) f.write(nest_prefix + nest_prefix) f.write(fmt % tuple(set[0].tolist())) f.write(nest_suffix) for point in set[1:]: f.write(nest_sep + nest_prefix) f.write(fmt % tuple(point.tolist())) f.write(nest_suffix) f.write(nest_suffix) else: assert set.shape[0] > 0 f.write(nest_prefix) write_array(f, set[0], item_sep, nest_prefix, nest_suffix, nest_sep) for subset in set[1:]: f.write(nest_sep) write_array(f, subset, item_sep, nest_prefix, nest_suffix, nest_sep) f.write(nest_suffix)
0a4f7548fadcad2f9565bf390a8db9021c445c01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9569/0a4f7548fadcad2f9565bf390a8db9021c445c01/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1126, 12, 74, 16, 444, 16, 761, 67, 10814, 2218, 2265, 15095, 67, 3239, 2218, 2187, 15095, 67, 8477, 2218, 64, 82, 2187, 15095, 67, 10814, 2218, 11, 4672, 3536, 3067, 392, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1126, 12, 74, 16, 444, 16, 761, 67, 10814, 2218, 2265, 15095, 67, 3239, 2218, 2187, 15095, 67, 8477, 2218, 64, 82, 2187, 15095, 67, 10814, 2218, 11, 4672, 3536, 3067, 392, 52...
padcount = self._calculate_code_block_padding(line) line = line.lstrip(' \t') if padcount > 0: s3 = ODFTranslator.wrapper2 % (padcount, line, ) else: s3 = ODFTranslator.wrapper1 % line
line = self.fill_line(line) s3 = ODFTranslator.wrapper1 % (line, )
def visit_literal_block(self, node): #ipshell('At visit_literal_block') source = node.astext() if pygments and self.settings.add_syntax_highlighting and \ self.syntaxhighlighting: source = self._add_syntax_highlighting(source) else: source = escape_cdata(source) lines = source.split('\n') lines1 = ['<wrappertag1 xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0">'] for line in lines: padcount = self._calculate_code_block_padding(line) line = line.lstrip(' \t') if padcount > 0: s3 = ODFTranslator.wrapper2 % (padcount, line, ) else: s3 = ODFTranslator.wrapper1 % line s3 = s3.replace("&#10;", "\n") lines1.append(s3) lines1.append('</wrappertag1>') s1 = ''.join(lines1) el1 = etree.fromstring(s1) children = el1.getchildren() for child in children: self.current_element.append(child)
65d1136fcff51715f3720a8618f62a8ff173695f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5620/65d1136fcff51715f3720a8618f62a8ff173695f/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 13107, 67, 2629, 12, 2890, 16, 756, 4672, 468, 625, 10304, 2668, 861, 3757, 67, 13107, 67, 2629, 6134, 1084, 273, 756, 18, 689, 408, 1435, 309, 2395, 75, 1346, 471, 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, 3757, 67, 13107, 67, 2629, 12, 2890, 16, 756, 4672, 468, 625, 10304, 2668, 861, 3757, 67, 13107, 67, 2629, 6134, 1084, 273, 756, 18, 689, 408, 1435, 309, 2395, 75, 1346, 471, 365, 18, ...
if cfg.cookNewBranches or not repos.hasPackage(buildLabel.getHost(), fullName): buildBranch = versions.Version([buildLabel]) else: vers = repos.getTroveLeavesByLabel([fullName], buildLabel)[fullName] if not len(vers):
vers = repos.getTroveLeavesByLabel([fullName], buildLabel)[fullName] if not vers: srcName = fullName + ":source" vers = repos.getTroveLeavesByLabel([srcName], buildLabel)[srcName] if len(vers) > 1: raise CookError('Multiple branches labeled %s exist for ' 'trove %s' % (fullName, buildLabel.asString)) elif not len(vers): if cfg.cookNewBranches or \ not repos.hasPackage(buildLabel.getHost(), fullName): buildBranch = versions.Version([buildLabel]) else:
def cookObject(repos, cfg, recipeClass, buildLabel, changeSetFile = None, prep=True, macros={}, buildBranch = None): """ Turns a recipe object into a change set, and sometimes commits the result. @param repos: Repository to both look for source files and file id's in. @type repos: repository.Repository @param cfg: conary configuration @type cfg: conarycfg.ConaryConfiguration @param recipeClass: class which will be instantiated into a recipe @type recipeClass: class descended from recipe.Recipe @param buildLabel: label to use to to find the branch to build on @type buildBranch: versions.BranchName @param changeSetFile: if set, the changeset is stored in this file instead of committed to a repository @type changeSetFile: str @param prep: If true, the build stops after the package is unpacked and None is returned instead of a changeset. @type prep: boolean @param macros: set of macros for the build @type macros: dict @param buildBranch: branch to build on; if present buildLabel is ignored. this branch does not need to contain timestamps; they'll be looked up if they are missing. @type buildBranch: versions.Version @rtype: list of strings """ if not (hasattr(recipeClass, 'name') and hasattr(recipeClass, 'version')): raise CookError('recipe class must have name and version defined') log.info("Building %s", recipeClass.name) fullName = recipeClass.name if not buildBranch: if cfg.cookNewBranches or not repos.hasPackage(buildLabel.getHost(), fullName): # for the first build, we're willing to create the branch for # them buildBranch = versions.Version([buildLabel]) else: vers = repos.getTroveLeavesByLabel([fullName], buildLabel)[fullName] if not len(vers): raise CookError('No branches labeled %s exist for trove %s' % (buildLabel.asString(), fullName)) elif len(vers) > 1: raise CookError('Multiple branches labeled %s exist for ' 'trove %s' % (fullName, buildLabel.asString)) buildBranch = vers[0].branch() elif not buildBranch.timeStamps(): # trunk branch, go ahead and create if pass elif max(buildBranch.timeStamps()) == 0: # need to get the timestamps (and the branch has to exist) try: ver = repos.getTroveLatestVersion(fullName, buildBranch) except repository.TroveMissing: raise CookError('Branch %s does not exist for trove %s' % (buildBranch.asString(), fullName)) buildBranch = ver.branch() del ver if issubclass(recipeClass, recipe.PackageRecipe): ret = cookPackageObject(repos, cfg, recipeClass, buildBranch, prep = prep, macros = macros) elif issubclass(recipeClass, recipe.GroupRecipe): ret = cookGroupObject(repos, cfg, recipeClass, buildBranch, macros = macros) elif issubclass(recipeClass, recipe.FilesetRecipe): ret = cookFilesetObject(repos, cfg, recipeClass, buildBranch, macros = macros) else: raise AssertionError # cook*Object returns None if using prep if ret is None: return [] (cs, built, cleanup) = ret if changeSetFile: cs.writeToFile(changeSetFile) else: repos.commitChangeSet(cs) if cleanup: (fn, args) = cleanup fn(*args) return built
e7fd4ecb22c0a36ffa5998c600803756b2528f28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/e7fd4ecb22c0a36ffa5998c600803756b2528f28/cook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15860, 921, 12, 15564, 16, 2776, 16, 16100, 797, 16, 1361, 2224, 16, 26104, 812, 273, 599, 16, 13237, 33, 5510, 16, 24302, 28793, 1361, 7108, 273, 599, 4672, 3536, 22425, 87, 279, 16100,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15860, 921, 12, 15564, 16, 2776, 16, 16100, 797, 16, 1361, 2224, 16, 26104, 812, 273, 599, 16, 13237, 33, 5510, 16, 24302, 28793, 1361, 7108, 273, 599, 4672, 3536, 22425, 87, 279, 16100,...
cArgs,
cArguments,
def wrapperCall( *args ): """Wrapper with all save returnValues""" cArguments = args try: result = self.wrappedOperation( *cArguments ) except ctypes.ArgumentError, err: err.args = err.args + (cArguments,) raise err except error.GLError, err: err.cArgs = cArgs err.pyArgs = args raise err # handle storage of persistent argument values... storeValues( result, self, args, cArgs, ) return result
dc99517dfd5ee4f17c9b45224537fe3d66554539 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1545/dc99517dfd5ee4f17c9b45224537fe3d66554539/wrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4053, 1477, 12, 380, 1968, 262, 30, 3536, 3611, 598, 777, 1923, 327, 1972, 8395, 276, 4628, 273, 833, 775, 30, 563, 273, 365, 18, 18704, 2988, 12, 380, 71, 4628, 262, 1335, 6983, 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, 4053, 1477, 12, 380, 1968, 262, 30, 3536, 3611, 598, 777, 1923, 327, 1972, 8395, 276, 4628, 273, 833, 775, 30, 563, 273, 365, 18, 18704, 2988, 12, 380, 71, 4628, 262, 1335, 6983, 18, ...
return not self.cursor.execute("SELECT COUNT(time_slide_id) FROM time_slide WHERE time_slide_id == ? AND offset != 0 LIMIT 1", (id,)).fetchone()[0]
return not self.cursor.execute("SELECT COUNT(time_slide_id) FROM time_slide WHERE time_slide_id == ? AND offset != 0 LIMIT 1", (lsctables.ILWDID(id),)).fetchone()[0]
def is_null(self, id): return not self.cursor.execute("SELECT COUNT(time_slide_id) FROM time_slide WHERE time_slide_id == ? AND offset != 0 LIMIT 1", (id,)).fetchone()[0]
c885fe584f38bc7dc722ca6981bb825cfd72aeea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/c885fe584f38bc7dc722ca6981bb825cfd72aeea/SnglBurstUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2011, 12, 2890, 16, 612, 4672, 327, 486, 365, 18, 9216, 18, 8837, 2932, 4803, 12666, 12, 957, 67, 26371, 67, 350, 13, 4571, 813, 67, 26371, 4852, 813, 67, 26371, 67, 350, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2011, 12, 2890, 16, 612, 4672, 327, 486, 365, 18, 9216, 18, 8837, 2932, 4803, 12666, 12, 957, 67, 26371, 67, 350, 13, 4571, 813, 67, 26371, 4852, 813, 67, 26371, 67, 350, 42...
print SelectTlb()
print SelectTlb().__dict__
def SelectTlb(title="Select Library", excludeFlags = 0): """Display a list of all the type libraries, and select one. Returns None if cancelled """ import pywin.dialogs.list items = EnumTlbs(excludeFlags) items.sort() rc = pywin.dialogs.list.SelectFromLists(title, items, ["Type Library"]) if rc is None: return None return items[rc]
d3717d41ffed57834ff5955278064358b9927b36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/d3717d41ffed57834ff5955278064358b9927b36/selecttlb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6766, 56, 20404, 12, 2649, 1546, 3391, 18694, 3113, 4433, 5094, 273, 374, 4672, 3536, 4236, 279, 666, 434, 777, 326, 618, 14732, 16, 471, 2027, 1245, 18, 282, 2860, 599, 309, 13927, 3536...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6766, 56, 20404, 12, 2649, 1546, 3391, 18694, 3113, 4433, 5094, 273, 374, 4672, 3536, 4236, 279, 666, 434, 777, 326, 618, 14732, 16, 471, 2027, 1245, 18, 282, 2860, 599, 309, 13927, 3536...
command = 'mplayer -nomouseinput -xy 400 \
command = 'mplayer -nomouseinput \
def exit_mplayer(): # send bogus edl command so mplayer sends last edl_mark send_command('edl_mark') # send quit and destroy frame send_command('quit') container.frame.destroy() # need a sleep to make sure mplayer gives up its data time.sleep(1) f = open(editlist) c = f.read() f.close() # convert text from opened file to HH:MM:SS times = [ float(t) for t in shlex.split(c) if not t == '0' ] # remove bogus edl_mark times.pop(-1) # insert mandatory 1st chapter times.insert(0, 0.0) chapters = [] for t in times: chapters.append(time.strftime('%H:%M:%S', time.gmtime(t))) time_codes = "'%s'" %','.join(chapters) print '-chapters %s' %time_codes
c5f7e6b8a9a7745fd9188485d42c7137ae9ae749 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4675/c5f7e6b8a9a7745fd9188485d42c7137ae9ae749/appcontainer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 67, 81, 14872, 13332, 468, 1366, 324, 28774, 1675, 80, 1296, 1427, 312, 14872, 9573, 1142, 1675, 80, 67, 3355, 1366, 67, 3076, 2668, 329, 80, 67, 3355, 6134, 468, 1366, 9706, 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, 2427, 67, 81, 14872, 13332, 468, 1366, 324, 28774, 1675, 80, 1296, 1427, 312, 14872, 9573, 1142, 1675, 80, 67, 3355, 1366, 67, 3076, 2668, 329, 80, 67, 3355, 6134, 468, 1366, 9706, 471, ...
missing = ", ".join( [ str(e) for e in tmpReqd ] )
missing = ", ".join( [ _ustr(e) for e in tmpReqd ] )
def parseImpl( self, instring, loc, doActions=True ): tmpLoc = loc tmpReqd = self.required[:] tmpOpt = self.optionals[:] matchOrder = []
f785be5d2ca075a1c7bb01b51854db8384acb590 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3693/f785be5d2ca075a1c7bb01b51854db8384acb590/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 2828, 12, 365, 16, 316, 1080, 16, 1515, 16, 741, 6100, 33, 5510, 262, 30, 1853, 1333, 273, 1515, 1853, 6113, 72, 273, 365, 18, 4718, 10531, 65, 1853, 6179, 225, 273, 365, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 2828, 12, 365, 16, 316, 1080, 16, 1515, 16, 741, 6100, 33, 5510, 262, 30, 1853, 1333, 273, 1515, 1853, 6113, 72, 273, 365, 18, 4718, 10531, 65, 1853, 6179, 225, 273, 365, 18, 3...
print "renamed", file, "to", bak
print("renamed", file, "to", bak)
def check(file): if os.path.isdir(file) and not os.path.islink(file): if verbose: print "listing directory", file names = os.listdir(file) for name in names: fullname = os.path.join(file, name) if ((recurse and os.path.isdir(fullname) and not os.path.islink(fullname)) or name.lower().endswith(".py")): check(fullname) return if verbose: print "checking", file, "...", try: f = open(file) except IOError as msg: errprint("%s: I/O Error: %s" % (file, str(msg))) return r = Reindenter(f) f.close() if r.run(): if verbose: print "changed." if dryrun: print "But this is a dry run, so leaving it alone." if not dryrun: bak = file + ".bak" if os.path.exists(bak): os.remove(bak) os.rename(file, bak) if verbose: print "renamed", file, "to", bak f = open(file, "w") r.write(f) f.close() if verbose: print "wrote new", file else: if verbose: print "unchanged."
2f30fac56992ed396f664b446bcb83b1b3e1add5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/2f30fac56992ed396f664b446bcb83b1b3e1add5/reindent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 768, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 768, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 768, 4672, 309, 3988, 30, 1172, 315, 21228, 1867, 3113, 585, 1257, 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, 866, 12, 768, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 768, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 768, 4672, 309, 3988, 30, 1172, 315, 21228, 1867, 3113, 585, 1257, 273...
self.fill(1)
self._path = [self._position] self._filling = 1
def begin_fill(self): """ Called just before drawing a shape to be filled.
06c68b800ca3e31d2551923083ce8294ab94cb24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/06c68b800ca3e31d2551923083ce8294ab94cb24/turtle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2376, 67, 5935, 12, 2890, 4672, 3536, 11782, 2537, 1865, 16327, 279, 2179, 358, 506, 6300, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2376, 67, 5935, 12, 2890, 4672, 3536, 11782, 2537, 1865, 16327, 279, 2179, 358, 506, 6300, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if 0 : buildPackage( "zlib",
if 1 : buildPackage( "zlib",
def buildPackage(name, uri, checkVersion, downloadUri, tarballName, buildCommand, srcdir=None, deps="", pinnedVersion = None, ) : print "Module:", name subst = dict( sandbox = sandbox, prefix = prefix, target = target, sfmirror = sfmirror, apachemirror = apachemirror, name = name, pinned = pinnedVersion if pinnedVersion else "None", ) availableVersion = output(checkVersion).strip() availableVersion or die("No online version found for the package\n Command used:\n%s" % checkVersion) print "Found version: '%s'" % availableVersion if (pinnedVersion and pinnedVersion != availableVersion) : warning("Package: Pinning to version %s, although version %s is available" % (pinnedVersion, availableVersion)) version = pinnedVersion if pinnedVersion else availableVersion subst.update ( version = version, majorversion = ".".join(version.split(".")[:1]), minorversion = ".".join(version.split(".")[:2]), ) subst.update( tarball = tarballName % subst, srcdir = ("%(sandbox)s/src/" + (srcdir or "%(name)s-%(version)s/")) % subst, ) print "srcdir:", subst['srcdir'] download(downloadUri % subst) extractSource(subst['tarball']) patches = glob.glob(scriptRelative("mingw-"+name+"*")) patches.sort() print patches for patch in patches : applyPatch(subst['srcdir'], patch, level=1) run(buildCommand % subst)
9516624bdaf457fb48cb287da6115af5d509bbca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1456/9516624bdaf457fb48cb287da6115af5d509bbca/setup_mingw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 2261, 12, 529, 16, 2003, 16, 866, 1444, 16, 4224, 3006, 16, 29441, 461, 16, 1361, 2189, 16, 1705, 1214, 33, 7036, 16, 8740, 1546, 3113, 26193, 1444, 273, 599, 16, 262, 294, 1172,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 2261, 12, 529, 16, 2003, 16, 866, 1444, 16, 4224, 3006, 16, 29441, 461, 16, 1361, 2189, 16, 1705, 1214, 33, 7036, 16, 8740, 1546, 3113, 26193, 1444, 273, 599, 16, 262, 294, 1172,...