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
response = self.response_class(self.sock, self.debuglevel) else: response = self.response_class(self.sock)
response = self.response_class(self.sock, self.debuglevel, strict=self.strict) else: response = self.response_class(self.sock, strict=self.strict)
def getresponse(self): "Get the response from the server."
02cb24e9179066f7e11c810f45981beb3c445379 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/02cb24e9179066f7e11c810f45981beb3c445379/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2740, 12, 2890, 4672, 315, 967, 326, 766, 628, 326, 1438, 1199, 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, 336, 2740, 12, 2890, 4672, 315, 967, 326, 766, 628, 326, 1438, 1199, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def bessel_Y(nu,z):
def bessel_Y(nu,z,alg="maxima"):
def bessel_Y(nu,z): r""" Implements the "Y-Bessel function", or "Bessel function of the 2nd kind", with index (or "order") nu and argument z. Defn:
0fb37ff99a113a9a0b53b260456b3ff8fa211fee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0fb37ff99a113a9a0b53b260456b3ff8fa211fee/special.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 403, 292, 67, 61, 12, 13053, 16, 94, 16, 18413, 1546, 1896, 13888, 6, 4672, 436, 8395, 29704, 326, 315, 61, 17, 38, 403, 292, 445, 3113, 578, 315, 38, 403, 292, 445, 434, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 403, 292, 67, 61, 12, 13053, 16, 94, 16, 18413, 1546, 1896, 13888, 6, 4672, 436, 8395, 29704, 326, 315, 61, 17, 38, 403, 292, 445, 3113, 578, 315, 38, 403, 292, 445, 434, 326, ...
(string_aton, (socket.error, UnicodeEncodeError)),
(string_aton, (socket.error, UnicodeEncodeError, TypeError)),
def string_aton(value): value = value.lstrip('[').rstrip(']').strip('"') # 00 is stylistic to avoid this: # >>> sorted(['a', socket.inet_aton('100.2.3.4'), # socket.inet_aton('1.2.3.4')]) # ['\x01\x02\x03\x04', 'a', 'd\x02\x03\x04'] return u'00' + unicode(socket.inet_aton(value), "unicode_escape")
499933e730bc1a7fb97f32bae2d01423f412c39d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/499933e730bc1a7fb97f32bae2d01423f412c39d/editing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 533, 67, 16799, 12, 1132, 4672, 460, 273, 460, 18, 80, 6406, 2668, 3292, 2934, 86, 6406, 2668, 3864, 2934, 6406, 2668, 5187, 13, 225, 468, 9631, 353, 16253, 1098, 335, 358, 4543, 333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 533, 67, 16799, 12, 1132, 4672, 460, 273, 460, 18, 80, 6406, 2668, 3292, 2934, 86, 6406, 2668, 3864, 2934, 6406, 2668, 5187, 13, 225, 468, 9631, 353, 16253, 1098, 335, 358, 4543, 333, ...
self.CreateItems()
def __SetData(self): if DEBUG: print >> sys.stderr, "ListBody: set data", time() data = self.raw_data #apply quickfilter if self.filter != '': data = filter(self.MatchFilter, data) self.parent_list.SetFilteredResults(len(data)) self.vSizer.Clear() if data: if len(self.items) == 0: #new data if len(data) > LIST_ITEM_BATCH_SIZE: self.ShowMessage('Loading, please wait.') #Try to yield, allows us to show loading text try: wx.Yield() except: pass self.highlightSet = set() else: #updated data, takes roughly 0.007s for 650+ results cur_keys = set([key for key,_,_ in self.data]) self.highlightSet = set([key for key,_,_ in data if key not in cur_keys])
bec7425998522b9098966054b0ef584a859d3835 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9686/bec7425998522b9098966054b0ef584a859d3835/list_body.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 694, 751, 12, 2890, 4672, 309, 6369, 30, 1172, 1671, 2589, 18, 11241, 16, 315, 682, 2250, 30, 444, 501, 3113, 813, 1435, 501, 273, 365, 18, 1899, 67, 892, 225, 468, 9010, 9549, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 694, 751, 12, 2890, 4672, 309, 6369, 30, 1172, 1671, 2589, 18, 11241, 16, 315, 682, 2250, 30, 444, 501, 3113, 813, 1435, 501, 273, 365, 18, 1899, 67, 892, 225, 468, 9010, 9549, ...
if len(new) + len(c) >= MAXLINESIZE: output.write(new + ESCAPE + '\n') new = '' new = new + c prev = c if prev in (' ', '\t'): output.write(new + ESCAPE + '\n\n') else: output.write(new + '\n')
if linelen + len(c) >= MAXLINESIZE: if prevline is not None: write(prevline) prevline = EMPTYSTRING.join(outline) linelen = 0 outline = [] outline.append(c) linelen += len(c) if prevline is not None: write(prevline) prevline = EMPTYSTRING.join(outline) linelen = 0 outline = [] if prevline is not None: write(prevline, lineEnd=stripped) def encodestring(s, quotetabs=0): from cStringIO import StringIO infp = StringIO(s) outfp = StringIO() encode(infp, outfp, quotetabs) return outfp.getvalue()
def encode(input, output, quotetabs): """Read 'input', apply quoted-printable encoding, and write to 'output'. 'input' and 'output' are files with readline() and write() methods. The 'quotetabs' flag indicates whether tabs should be quoted. """ while 1: line = input.readline() if not line: break new = '' last = line[-1:] if last == '\n': line = line[:-1] else: last = '' prev = '' for c in line: if needsquoting(c, quotetabs): c = quote(c) if len(new) + len(c) >= MAXLINESIZE: output.write(new + ESCAPE + '\n') new = '' new = new + c prev = c if prev in (' ', '\t'): output.write(new + ESCAPE + '\n\n') else: output.write(new + '\n')
53a09da638705a8ff2ab16da881324da670a0b96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/53a09da638705a8ff2ab16da881324da670a0b96/quopri.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2630, 16, 876, 16, 4914, 278, 5113, 4672, 3536, 1994, 296, 2630, 2187, 2230, 9298, 17, 1188, 429, 2688, 16, 471, 1045, 358, 296, 2844, 10332, 225, 296, 2630, 11, 471, 296, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2630, 16, 876, 16, 4914, 278, 5113, 4672, 3536, 1994, 296, 2630, 2187, 2230, 9298, 17, 1188, 429, 2688, 16, 471, 1045, 358, 296, 2844, 10332, 225, 296, 2630, 11, 471, 296, 28...
model.update_times_played(object_id)
def learn(object_id, right=True): for question in asked_questions: current_weight = model.get_value(object_id, question) if not(current_weight): current_weight = 0 if right: new_weight = current_weight + asked_questions[question] model.update_times_played(object_id) else: new_weight = current_weight - asked_questions[question] ######## SCALE? model.update_data(object_id, question, new_weight) if config.RECORD_USER: model.record_playlog(object_id, asked_questions, right)
d81de151ccd01aac45c79470fde5946b90221c0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12603/d81de151ccd01aac45c79470fde5946b90221c0c/twentyquestions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16094, 12, 1612, 67, 350, 16, 2145, 33, 5510, 4672, 364, 5073, 316, 19279, 67, 9758, 30, 783, 67, 4865, 273, 938, 18, 588, 67, 1132, 12, 1612, 67, 350, 16, 5073, 13, 309, 486, 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, 16094, 12, 1612, 67, 350, 16, 2145, 33, 5510, 4672, 364, 5073, 316, 19279, 67, 9758, 30, 783, 67, 4865, 273, 938, 18, 588, 67, 1132, 12, 1612, 67, 350, 16, 5073, 13, 309, 486, 12, ...
second_colon_index = line.rfind(':')
line_after_first_colon_space = line[first_colonspace_index + 2:] second_colon_index = line_after_first_colon_space.find(':') if second_colon_index >= 0: second_colon_index += first_colonspace_index + 2 assert line[second_colon_index] == ':'
def _parse_comment(self, cmt): # We're looking for gtk-doc comments here, they look like this: # /** # * symbol: # # Or, alternatively, with options: # /** # * symbol: (name value) ... # # symbol is currently one of: # - function: gtk_widget_show # - signal: GtkWidget::destroy # - property: GtkWidget:visible # comment, filename, lineno = cmt comment = comment.lstrip() if not comment.startswith(_COMMENT_HEADER): return comment = comment[len(_COMMENT_HEADER):] comment = comment.strip() if not comment.startswith('* '): return comment = comment[2:]
e70a36aa6b44a48ebcdc9a71c3d0eda4a17c119e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2770/e70a36aa6b44a48ebcdc9a71c3d0eda4a17c119e/annotationparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 3469, 12, 2890, 16, 276, 1010, 4672, 468, 1660, 4565, 7849, 364, 22718, 17, 2434, 5678, 2674, 16, 2898, 2324, 3007, 333, 30, 468, 1783, 468, 282, 380, 3273, 30, 468, 468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 3469, 12, 2890, 16, 276, 1010, 4672, 468, 1660, 4565, 7849, 364, 22718, 17, 2434, 5678, 2674, 16, 2898, 2324, 3007, 333, 30, 468, 1783, 468, 282, 380, 3273, 30, 468, 468...
occurrences[k] = _ParseResultsWithOffset(value, position + (position > j))
occurrences[k] = _ParseResultsWithOffset(value, position + (position > index))
def insert( self, index, insStr ): self.__toklist.insert(index, insStr) # fixup indices in token dictionary for name in self.__tokdict: occurrences = self.__tokdict[name] for k, (value, position) in enumerate(occurrences): occurrences[k] = _ParseResultsWithOffset(value, position + (position > j))
e0ca9c3ec38d75e110aa3bc15e2e5ca4c5cae61d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3693/e0ca9c3ec38d75e110aa3bc15e2e5ca4c5cae61d/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 12, 365, 16, 770, 16, 2763, 1585, 262, 30, 365, 16186, 17692, 1098, 18, 6387, 12, 1615, 16, 2763, 1585, 13, 468, 2917, 416, 4295, 316, 1147, 3880, 364, 508, 316, 365, 16186, 1769...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 12, 365, 16, 770, 16, 2763, 1585, 262, 30, 365, 16186, 17692, 1098, 18, 6387, 12, 1615, 16, 2763, 1585, 13, 468, 2917, 416, 4295, 316, 1147, 3880, 364, 508, 316, 365, 16186, 1769...
invvar = invar[i][0][k].clip(0,1e-5) if len(invvar.shape) == 1:
invvar = 1./invar[i][0][k].clip(1e-5,np.inf) if len(invvar.shape) > 1:
def estimate_mllr_variance(stats, inmean, invar, W): """ Estimate an MLLR transformation of the variances based on observed statistics. This function calculates an MLLR transformation H (an n by n matrix) which maximizes the likelihood of the data as represented by C{stats}, when applied to the inverse Cholesky factor of the covariance matrix B as B^T H B. For diagonal covariances this reduces to a scaling of the variance by the diagonals of H, since the diagonal b = (sqrt(var^{-1}))^{-1} = var^{0.5}. Note that this function will raise an exception if -2passvar yes was enabled when collecting the observation counts, since it requires them to consist of the sum of the outer products of the observation vectors scaled by their posterior probabilities, (L_m_r(t)o(t)o(t)^T in Cambridge papers). Currently this does only one class and one stream, but it will promptly be extended once the "learning exercise" is over. @param stats: Observation counts, as returned by C{sphinx.s3gaucnt.accumdirs} or C{sphinx.s3gaucnt.accumdirs_full}. @type stats: sphinx.s3gaucnt.S3GauCnt @param inmean: Input mean parameters @type inmean: sphinx.s3gau.S3Gau @param invar: Input covariance parameters @type inmvar: sphinx.s3gau.S3Gau @param W: Previously computed MLLR transformation of means @ptype W: numpy.ndarray @return: MLLR transformation of variances @rtype: numpy.ndarray """ if stats.pass2var: raise RuntimeException, "Statistics using -2passvar yes are not allowed" ndim = inmean.veclen[0] # Output matrix H H = np.zeros((ndim, ndim)) # One-class MLLR: just sum over all densities norm = 0 for i in range(0, inmean.n_mgau): for k in range(0, inmean.density): # Extended mean vector xmean = extend(inmean[i][0][k]) # Transform it mean = np.dot(W, xmean) # Calcluate C (Cholesky factor of inverse variance) invvar = invar[i][0][k].clip(0,1e-5) if len(invvar.shape) == 1: invvar = np.diag(invvar) C = np.linalg.cholesky(invvar) # sum(L_m_r o o^T) (obs squared) nom = stats.var[i][0][k] # \hat mu_m_r \bar o_m_r^T (cross term 1) nom -= np.outer(mean, stats.mean[i][0][k]) # \bar o_m_r^T \hat mu_m_r^T (cross term 2) nom -= np.outer(stats.mean[i][0][k], mean) # \mu_m_r \mu_m_r^T sum(L_m_r) (mean squared) nom += np.outer(mean, mean) * stats.dnom[i][0][k] # Multiply in Cholesky factors and accumulate H += np.dot(np.dot(C, nom), C.T) # Accumulate normalizer norm += stats.dnom[i][0][k] return H / norm
5b682667bf4d8ad78dae07f7e148ef509630c315 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6303/5b682667bf4d8ad78dae07f7e148ef509630c315/mllr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11108, 67, 781, 10826, 67, 11721, 12, 5296, 16, 316, 7079, 16, 316, 1401, 16, 678, 4672, 3536, 17787, 4988, 392, 490, 4503, 54, 8620, 434, 326, 1394, 6872, 2511, 603, 12117, 7691, 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, 11108, 67, 781, 10826, 67, 11721, 12, 5296, 16, 316, 7079, 16, 316, 1401, 16, 678, 4672, 3536, 17787, 4988, 392, 490, 4503, 54, 8620, 434, 326, 1394, 6872, 2511, 603, 12117, 7691, 18, ...
result.append(p)
c = p.chain() result.append(c)
def try_read_n_chains(self, n): """Try to read at most n packet chains from the underlying I/O layer. If n is None or 0, try to read exactly one packet. Connectors with their own buffering semantics should override this method (e.g. PcapConnector). Used by expect().""" result = [] if n is None or n == 0: n = 1 for i in xrange(n): p = self.read_packet() if p is not None: result.append(p) else: break return result
b6a8cf48ec93af35cd798dd7447c4de8ba46bad1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5910/b6a8cf48ec93af35cd798dd7447c4de8ba46bad1/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 67, 896, 67, 82, 67, 23060, 12, 2890, 16, 290, 4672, 3536, 7833, 358, 855, 622, 4486, 290, 4414, 13070, 628, 326, 6808, 467, 19, 51, 3018, 18, 971, 290, 353, 599, 578, 374, 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, 775, 67, 896, 67, 82, 67, 23060, 12, 2890, 16, 290, 4672, 3536, 7833, 358, 855, 622, 4486, 290, 4414, 13070, 628, 326, 6808, 467, 19, 51, 3018, 18, 971, 290, 353, 599, 578, 374, 16, ...
print "Ok for predictive parsing" print "Literal terminals:", literalTerminals.keys() print "Token regular expressions:" for r in tokenRegexps: print "\t%s matches %s" %(r, tokenRegexps[r].pattern)
progress( "Ok for predictive parsing") if chatty_flag: progress( "Literal terminals: %s" % literalTerminals.keys()) progress("Token regular expressions:") for r in tokenRegexps: progress( "\t%s matches %s" %(r, tokenRegexps[r].pattern) )
def _test(): import doctest, predictiveParser doctest.testmod(uripath)
a069dbeddd5ec63ef002105ed0c2481a29043eff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/a069dbeddd5ec63ef002105ed0c2481a29043eff/predictiveParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 31263, 395, 16, 7810, 688, 2678, 31263, 395, 18, 3813, 1711, 12, 295, 625, 421, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 31263, 395, 16, 7810, 688, 2678, 31263, 395, 18, 3813, 1711, 12, 295, 625, 421, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
raise ValueError, "mode must be 'r' or 'w'"
raise ValueError("mode must be 'r' or 'w'")
def open(cls, name=None, mode="r", fileobj=None, bufsize=20*512): """Open a tar archive for reading, writing or appending. Return an appropriate TarFile class.
e4751e3cdc8c271f24e46a6155f255b6e33da158 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e4751e3cdc8c271f24e46a6155f255b6e33da158/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 6429, 16, 508, 33, 7036, 16, 1965, 1546, 86, 3113, 17041, 33, 7036, 16, 1681, 1467, 33, 3462, 14, 13757, 4672, 3536, 3678, 279, 8232, 5052, 364, 6453, 16, 7410, 578, 19997, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 6429, 16, 508, 33, 7036, 16, 1965, 1546, 86, 3113, 17041, 33, 7036, 16, 1681, 1467, 33, 3462, 14, 13757, 4672, 3536, 3678, 279, 8232, 5052, 364, 6453, 16, 7410, 578, 19997, 1...
self._cache[key] = True
self._cache[key] = True
def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} ids = osv.orm.orm.search(self, cr, uid, args, offset, limit, order, context=context, count=(count and uid==1)) if uid==1: return ids
d0a898c5c52681074df7751d862b7acc0aa42282 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d0a898c5c52681074df7751d862b7acc0aa42282/ir_ui_menu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 4555, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 17172, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 4672, 309, 819, 353, 599, 30, 819, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 4555, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 17172, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 4672, 309, 819, 353, 599, 30, 819, 27...
return "/".join(string.split(file, '/')[0:3])
pathlist = string.split(file, '/') if len(pathlist) == 3: return "/".join(pathlist[0:2]) return "/".join(pathlist[0:3])
def get_prefix(file): return "/".join(string.split(file, '/')[0:3])
0080ff0b4d9ed3290d2eb0a24b80aedd438800fd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10341/0080ff0b4d9ed3290d2eb0a24b80aedd438800fd/DuplicatesCheck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3239, 12, 768, 4672, 589, 1098, 273, 533, 18, 4939, 12, 768, 16, 2023, 13, 309, 562, 12, 803, 1098, 13, 422, 890, 30, 327, 4016, 18, 5701, 12, 803, 1098, 63, 20, 30, 22, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3239, 12, 768, 4672, 589, 1098, 273, 533, 18, 4939, 12, 768, 16, 2023, 13, 309, 562, 12, 803, 1098, 13, 422, 890, 30, 327, 4016, 18, 5701, 12, 803, 1098, 63, 20, 30, 22, ...
'%(key)s</a>' % {'key': user_key})
'%(key)s</a>' % {'key': cgi.escape(user_key)})
def show_user(email, arg=None, autoescape=None): """Render a link to the user's dashboard, with text being the nickname.""" if isinstance(email, users.User): email = email.email() if not arg: user = users.get_current_user() if user is not None and email == user.email(): return 'me' try: ret = memcache.get('show_user:%s' % email) except KeyError: ret = None if ret is None: logging.debug('memcache miss for %r', email) nick = nickname(email, True) account = models.Account.get_account_for_email(email) if account: if len(models.Account.get_accounts_for_nickname(account.nickname)) > 1: # The nickname is not unique, fallback to email as key. user_key = email else: user_key = nick # Cache for a longer time, this is likely to remain valid. cache_timeout = 300 else: user_key = nick # Cache likely to become invalid due to user sign up. cache_timeout = 30 memcache.add('show_user:%s' % email, ret, cache_timeout) ret = ('<a href="/user/%(key)s" onMouseOver="M_showUserInfoPopup(this)">' '%(key)s</a>' % {'key': user_key}) return django.utils.safestring.mark_safe(ret)
9c8d1ddcd69caa1b06e54c997fb5f1f5d8bf4c8f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/476/9c8d1ddcd69caa1b06e54c997fb5f1f5d8bf4c8f/library.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 1355, 12, 3652, 16, 1501, 33, 7036, 16, 3656, 6939, 33, 7036, 4672, 3536, 3420, 279, 1692, 358, 326, 729, 1807, 11825, 16, 598, 977, 3832, 326, 19570, 12123, 309, 1549, 12, 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, 2405, 67, 1355, 12, 3652, 16, 1501, 33, 7036, 16, 3656, 6939, 33, 7036, 4672, 3536, 3420, 279, 1692, 358, 326, 729, 1807, 11825, 16, 598, 977, 3832, 326, 19570, 12123, 309, 1549, 12, 3...
main()
main()
def main(): if len(sys.argv) < 2: print "usage: python update_software.py trunk/location/ [-d]" else: if sys.argv[2] == "-d": DEBUG = True update(sys.argv[1])
ea9dac3531a093802c77f9afd39ecf47da662497 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7995/ea9dac3531a093802c77f9afd39ecf47da662497/update_software.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 562, 12, 9499, 18, 19485, 13, 411, 576, 30, 1172, 315, 9167, 30, 5790, 1089, 67, 9269, 2726, 18, 2074, 25917, 19, 3562, 19, 23059, 72, 4279, 469, 30, 309, 2589, 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, 2774, 13332, 309, 562, 12, 9499, 18, 19485, 13, 411, 576, 30, 1172, 315, 9167, 30, 5790, 1089, 67, 9269, 2726, 18, 2074, 25917, 19, 3562, 19, 23059, 72, 4279, 469, 30, 309, 2589, 18, ...
online_str = downloadFile(client_version).strip()
online_str = getData(client_version).strip()
def newVersion(client_version): """ Check existance of a new version to download. :Parameters: client_version : str the url of file that contains the version of client downloadable. """ try: online_str = downloadFile(client_version).strip() online_version = map(int, online_str.split('.')) except UpdaterError: print 'Unknown online version, download new version' return True version = map(int, local_version.split('.')) print 'online version:', online_str, 'local version:', local_version return online_version > version
411d98a6cf8e1986ce231a94aa7e66689255a0bf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8560/411d98a6cf8e1986ce231a94aa7e66689255a0bf/updater.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28906, 12, 2625, 67, 1589, 4672, 3536, 2073, 1005, 1359, 434, 279, 394, 1177, 358, 4224, 18, 225, 294, 2402, 30, 1004, 67, 1589, 294, 609, 326, 880, 434, 585, 716, 1914, 326, 1177, 434...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28906, 12, 2625, 67, 1589, 4672, 3536, 2073, 1005, 1359, 434, 279, 394, 1177, 358, 4224, 18, 225, 294, 2402, 30, 1004, 67, 1589, 294, 609, 326, 880, 434, 585, 716, 1914, 326, 1177, 434...
"-p", "GMX", "%d" % pid,
"-p", "GMX", "%s" % pid,
def run_using_old_movie_obj_to_hold_sim_params(self, movie): #bruce 051115 removed unused 'options' arg self._movie = movie # general kluge for old-code compat (lots of our methods still use this and modify it) # note, this movie object (really should be a simsetup object?) does not yet know a proper alist (or any alist, I hope) [bruce 050404] self.errcode = self.set_options_errQ( ) # set movie alist, output filenames, sim executable pathname (verify it exists) #obs comment [about the options arg i removed?? or smth else?] # options include everything that affects the run except the set of atoms and the part if self.errcode: # used to be a local var 'r' # bruce 051115 comment: more than one reason this can happen, one is sim executable missing return self.sim_input_file = self.sim_input_filename() # might get name from options or make up a temporary filename if (self.mflag == 1 and self.useGromacs): if (not self.verifyGromacsPlugin()): self.errcode = _FAILURE_ALREADY_DOCUMENTED return self.set_waitcursor(True) progressBar = self.win.statusBar().progressBar
b9d2fa49a56a3f17f657b5c15963e211e87c1c00 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/b9d2fa49a56a3f17f657b5c15963e211e87c1c00/runSim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 9940, 67, 1673, 67, 8683, 13120, 67, 2603, 67, 869, 67, 21056, 67, 9812, 67, 2010, 12, 2890, 16, 21360, 4672, 468, 2848, 3965, 15331, 2499, 3600, 3723, 10197, 296, 2116, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 9940, 67, 1673, 67, 8683, 13120, 67, 2603, 67, 869, 67, 21056, 67, 9812, 67, 2010, 12, 2890, 16, 21360, 4672, 468, 2848, 3965, 15331, 2499, 3600, 3723, 10197, 296, 2116, 11, ...
'close_playlist')]
'close_playlist')]
def actions(self, item): self.item = item return [ ( self.queue_file, _( 'Enqueue this Music in Playlist' ), 'queue_a_track'), ( self.new_playlist, _( 'Make a new Audio Playlist' ), 'close_playlist')]
dcd75b507930bd64198d034932604631e32e5234 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/dcd75b507930bd64198d034932604631e32e5234/playlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4209, 12, 2890, 16, 761, 4672, 365, 18, 1726, 273, 761, 327, 306, 261, 365, 18, 4000, 67, 768, 16, 389, 12, 296, 25327, 333, 490, 14894, 316, 19592, 1098, 11, 262, 16, 296, 4000, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4209, 12, 2890, 16, 761, 4672, 365, 18, 1726, 273, 761, 327, 306, 261, 365, 18, 4000, 67, 768, 16, 389, 12, 296, 25327, 333, 490, 14894, 316, 19592, 1098, 11, 262, 16, 296, 4000, 67,...
maskimagefilename = expandItemText(infoDOM,node.attributes["mask"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist)
maskimagefilename = getThemeFile(themeName, node.attributes["mask"].value)
def drawThemeItem(page, itemsonthispage, itemnum, menuitem, bgimage, draw, bgimagemask, drawmask, highlightcolor, spumuxdom, spunode, numberofitems, chapternumber, chapterlist): """Draws text and graphics onto a dvd menu, called by createMenu and createChapterMenu""" #Get the XML containing information about this item infoDOM = xml.dom.minidom.parse( os.path.join(getItemTempPath(itemnum),"info.xml") ) #Error out if its the wrong XML if infoDOM.documentElement.tagName != "fileinfo": fatalError("The info.xml file (%s) doesn't look right" % os.path.join(getItemTempPath(itemnum),"info.xml")) #boundarybox holds the max and min dimensions for this item so we can auto build a menu highlight box boundarybox=9999,9999,0,0 wantHighlightBox = True #Loop through all the nodes inside this menu item for node in menuitem.childNodes: #Process each type of item to add it onto the background image if node.nodeName=="graphic": #Overlay graphic image onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage, chapternumber, chapterlist) if doesFileExist(imagefilename): picture = Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture = picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added image %s" % imagefilename) boundarybox=checkBoundaryBox(boundarybox, node) else: write( "Image file does not exist '%s'" % imagefilename) elif node.nodeName=="text": #Apply some text to the background, including wordwrap if required. text=expandItemText(infoDOM,node.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if text>"": paintText( draw, getScaledAttribute(node, "x"), getScaledAttribute(node, "y"), getScaledAttribute(node, "w"), getScaledAttribute(node, "h"), text, themeFonts[int(node.attributes["font"].value)], node.attributes["colour"].value, node.attributes["align"].value ) boundarybox=checkBoundaryBox(boundarybox, node) del text elif node.nodeName=="previous": if page>1: #Overlay previous graphic button onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(imagefilename): fatalError("Cannot find image for previous button (%s)." % imagefilename) maskimagefilename = expandItemText(infoDOM,node.attributes["mask"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for previous button (%s)." % maskimagefilename) picture=Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added previous button image %s" % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added previous button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","previous") button.setAttribute("x0","%s" % getScaledAttribute(node, "x")) button.setAttribute("y0","%s" % getScaledAttribute(node, "y")) button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + getScaledAttribute(node, "w"))) button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") + getScaledAttribute(node, "h"))) spunode.appendChild(button) elif node.nodeName=="next": if itemnum < numberofitems: #Overlay next graphic button onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(imagefilename): fatalError("Cannot find image for next button (%s)." % imagefilename) maskimagefilename = expandItemText(infoDOM,node.attributes["mask"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for next button (%s)." % maskimagefilename) picture = Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture = picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added next button image %s " % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added next button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","next") button.setAttribute("x0","%s" % getScaledAttribute(node, "x")) button.setAttribute("y0","%s" % getScaledAttribute(node, "y")) button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + getScaledAttribute(node, "w"))) button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") + getScaledAttribute(node, "h"))) spunode.appendChild(button) elif node.nodeName=="button": wantHighlightBox = False #Overlay item graphic/text button onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(imagefilename): fatalError("Cannot find image for menu button (%s)." % imagefilename) maskimagefilename = expandItemText(infoDOM,node.attributes["mask"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for menu button (%s)." % maskimagefilename) picture=Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture # if we have some text paint that over the image textnode = node.getElementsByTagName("textnormal") if textnode.length > 0: textnode = textnode[0] text=expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if text>"": paintText( draw, getScaledAttribute(textnode, "x"), getScaledAttribute(textnode, "y"), getScaledAttribute(textnode, "w"), getScaledAttribute(textnode, "h"), text, themeFonts[int(textnode.attributes["font"].value)], textnode.attributes["colour"].value, textnode.attributes["align"].value ) boundarybox=checkBoundaryBox(boundarybox, node) del text write( "Added button image %s" % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")),picture) #del picture # if we have some text paint that over the image textnode = node.getElementsByTagName("textselected") if textnode.length > 0: textnode = textnode[0] text=expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) textImage=Image.new("1",picture.size) textDraw=ImageDraw.Draw(textImage) if text>"": paintText(textDraw, getScaledAttribute(node, "x") - getScaledAttribute(textnode, "x"), getScaledAttribute(node, "y") - getScaledAttribute(textnode, "y"), getScaledAttribute(textnode, "w"), getScaledAttribute(textnode, "h"), text, themeFonts[int(textnode.attributes["font"].value)], "white", textnode.attributes["align"].value ) bgimagemask.paste(textnode.attributes["colour"].value, (getScaledAttribute(textnode, "x"), getScaledAttribute(textnode, "y")), textImage) boundarybox=checkBoundaryBox(boundarybox, node) textImage.save(os.path.join(getTempPath(),"textimage-%s.png" % itemnum),"PNG",quality=99,optimize=0) del text, textImage, textDraw del picture elif node.nodeName=="#text": #Do nothing assert True else: write( "Dont know how to process %s" % node.nodeName) if drawmask == None: return #Draw the mask for this item if wantHighlightBox == True: #Make the boundary box bigger than the content to avoid over write(ing (2 pixels) boundarybox=boundarybox[0]-1,boundarybox[1]-1,boundarybox[2]+1,boundarybox[3]+1 #draw.rectangle(boundarybox,outline="white") drawmask.rectangle(boundarybox,outline=highlightcolor) #Draw another line to make the box thicker - PIL does not support linewidth boundarybox=boundarybox[0]-1,boundarybox[1]-1,boundarybox[2]+1,boundarybox[3]+1 #draw.rectangle(boundarybox,outline="white") drawmask.rectangle(boundarybox,outline=highlightcolor) node = spumuxdom.createElement("button") #Fiddle this for chapter marks.... if chapternumber>0: node.setAttribute("name","%s" % chapternumber) else: node.setAttribute("name","%s" % itemnum) node.setAttribute("x0","%d" % int(boundarybox[0])) node.setAttribute("y0","%d" % int(boundarybox[1])) node.setAttribute("x1","%d" % int(boundarybox[2] + 1)) node.setAttribute("y1","%d" % int(boundarybox[3] + 1)) spunode.appendChild(node)
9e121f6bafeabacd733cabc0d27599be47ae1900 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13713/9e121f6bafeabacd733cabc0d27599be47ae1900/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 8335, 1180, 12, 2433, 16, 761, 816, 2211, 2433, 16, 761, 2107, 16, 3824, 1726, 16, 7611, 2730, 16, 3724, 16, 7611, 15374, 351, 835, 16, 3724, 4455, 16, 8839, 3266, 16, 1694, 379,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 8335, 1180, 12, 2433, 16, 761, 816, 2211, 2433, 16, 761, 2107, 16, 3824, 1726, 16, 7611, 2730, 16, 3724, 16, 7611, 15374, 351, 835, 16, 3724, 4455, 16, 8839, 3266, 16, 1694, 379,...
bspline.__init__(self, knots, order=order, coef=coef, M=M)
BSpline.__init__(self, knots, order=order, coef=coef, M=M)
def __init__(self, knots, order=4, coef=None, M=None, target_df=None): if target_df is not None: self.target_df = target_df bspline.__init__(self, knots, order=order, coef=coef, M=M) self.target_reached = False
19ecabb56a333336dd1140809c76db85d7aa3ea1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12658/19ecabb56a333336dd1140809c76db85d7aa3ea1/smoothers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 22278, 87, 16, 1353, 33, 24, 16, 17332, 33, 7036, 16, 490, 33, 7036, 16, 1018, 67, 2180, 33, 7036, 4672, 309, 1018, 67, 2180, 353, 486, 599, 30, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 22278, 87, 16, 1353, 33, 24, 16, 17332, 33, 7036, 16, 490, 33, 7036, 16, 1018, 67, 2180, 33, 7036, 4672, 309, 1018, 67, 2180, 353, 486, 599, 30, 365, ...
ORDER BY timestamp DESC
ORDER BY reviews_review.timestamp DESC
def _query(self, user=None, status='P', with_counts=False, extra_query=None): query = Q(public=True)
83f63b446841d687e18b8d3bbc2666351417d2f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/83f63b446841d687e18b8d3bbc2666351417d2f7/managers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2271, 12, 2890, 16, 729, 33, 7036, 16, 1267, 2218, 52, 2187, 598, 67, 8008, 33, 8381, 16, 2870, 67, 2271, 33, 7036, 4672, 843, 273, 2238, 12, 482, 33, 5510, 13, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2271, 12, 2890, 16, 729, 33, 7036, 16, 1267, 2218, 52, 2187, 598, 67, 8008, 33, 8381, 16, 2870, 67, 2271, 33, 7036, 4672, 843, 273, 2238, 12, 482, 33, 5510, 13, 2, -100, -100, ...
var.metadata.append(tag) pkg.cls.variables[var.name] = var
package.classes[class_name].variables[var.name].metadata.append(tag)
def parseASVariable(s,l,t): var = ASVariable(t.name,t.type) var.kind = t.kind var.visibility = t.visibility if t.static == "static": var.isStatic = True while metatags: tag= metatags.pop() var.metadata.append(tag) pkg.cls.variables[var.name] = var
90dd245904e09dad3e6bba6831ba45e02c3d3c7d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/886/90dd245904e09dad3e6bba6831ba45e02c3d3c7d/asGrammar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 3033, 3092, 12, 87, 16, 80, 16, 88, 4672, 569, 273, 5355, 3092, 12, 88, 18, 529, 16, 88, 18, 723, 13, 569, 18, 9224, 273, 268, 18, 9224, 569, 18, 14422, 273, 268, 18, 14422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3033, 3092, 12, 87, 16, 80, 16, 88, 4672, 569, 273, 5355, 3092, 12, 88, 18, 529, 16, 88, 18, 723, 13, 569, 18, 9224, 273, 268, 18, 9224, 569, 18, 14422, 273, 268, 18, 14422, ...
else: return super(IAccessible,self)._get_parent() def _get_next(self): res=IAccessibleHandler.accParent(self.IAccessibleObject,self.IAccessibleChildID) if res: parentObject=IAccessible(IAccessibleObject=res[0],IAccessibleChildID=res[1]) parentRole=parentObject.IAccessibleRole else: parentObject=None parentRole=None if parentObject and (parentRole==IAccessibleHandler.ROLE_SYSTEM_WINDOW): obj=parentObject else: obj=self res=IAccessibleHandler.accNavigate(obj.IAccessibleObject,obj.IAccessibleChildID,IAccessibleHandler.NAVDIR_NEXT) if res: nextObject=IAccessible(IAccessibleObject=res[0],IAccessibleChildID=res[1]) if nextObject and (nextObject.IAccessibleRole==IAccessibleHandler.ROLE_SYSTEM_WINDOW): nextObject=getNVDAObjectFromEvent(nextObject.windowHandle,-4,0) return nextObject if nextObject and nextObject.IAccessibleRole!=0 else None def _get_previous(self): res=IAccessibleHandler.accParent(self.IAccessibleObject,self.IAccessibleChildID) if res: parentObject=IAccessible(IAccessibleObject=res[0],IAccessibleChildID=res[1]) parentRole=parentObject.IAccessibleRole else: parentObject=None parentRole=None if parentObject and (parentRole==IAccessibleHandler.ROLE_SYSTEM_WINDOW): obj=parentObject else: obj=self res=IAccessibleHandler.accNavigate(obj.IAccessibleObject,obj.IAccessibleChildID,IAccessibleHandler.NAVDIR_PREVIOUS) if res: previousObject=IAccessible(IAccessibleObject=res[0],IAccessibleChildID=res[1]) if previousObject and (previousObject.IAccessibleRole==IAccessibleHandler.ROLE_SYSTEM_WINDOW): previousObject=getNVDAObjectFromEvent(previousObject.windowHandle,-4,0) return previousObject def _get_firstChild(self): res=IAccessibleHandler.accNavigate(self.IAccessibleObject,self.IAccessibleChildID,IAccessibleHandler.NAVDIR_FIRSTCHILD) if res: obj=IAccessible(IAccessibleObject=res[0],IAccessibleChildID=res[1]) else: return None if obj and (obj.IAccessibleRole==IAccessibleHandler.ROLE_SYSTEM_WINDOW): obj=getNVDAObjectFromEvent(obj.windowHandle,IAccessibleHandler.OBJID_CLIENT,0) if winUser.isDescendantWindow(self.windowHandle,obj.windowHandle) or self.windowHandle==winUser.getDesktopWindow(): return obj else: return None
def _get_parent(self): res=IAccessibleHandler.accParent(self.IAccessibleObject,self.IAccessibleChildID) if res: (ia,child)=res obj=IAccessible(IAccessibleObject=ia,IAccessibleChildID=child) if obj and (obj.IAccessibleRole==IAccessibleHandler.ROLE_SYSTEM_WINDOW): return obj.parent else: return obj else: return super(IAccessible,self)._get_parent()
3b90c12ba5adca1c4c45d78d2cedb96c00cd37cd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/3b90c12ba5adca1c4c45d78d2cedb96c00cd37cd/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 2938, 12, 2890, 4672, 400, 33, 45, 10451, 1503, 18, 8981, 3054, 12, 2890, 18, 45, 10451, 921, 16, 2890, 18, 45, 10451, 1763, 734, 13, 309, 400, 30, 261, 1155, 16, 3624,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 2938, 12, 2890, 4672, 400, 33, 45, 10451, 1503, 18, 8981, 3054, 12, 2890, 18, 45, 10451, 921, 16, 2890, 18, 45, 10451, 1763, 734, 13, 309, 400, 30, 261, 1155, 16, 3624,...
return 'lib%s.so'
if cmp(Options.platform, 'darwin') == 0: return 'lib%s.dylib' if cmp(Options.platform, 'linux') == 0: return 'lib%s.so'
def get_name(): if 'fprogram' in self.features: return '%s' elif 'fshlib' in self.features: return 'lib%s.so' else: return 'lib%s.a'
31c0de058246472a61b04c15428104c0c4ce6918 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11790/31c0de058246472a61b04c15428104c0c4ce6918/fortran.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 529, 13332, 309, 296, 74, 12890, 11, 316, 365, 18, 7139, 30, 327, 1995, 87, 11, 1327, 296, 74, 674, 2941, 11, 316, 365, 18, 7139, 30, 309, 9411, 12, 1320, 18, 9898, 16, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 529, 13332, 309, 296, 74, 12890, 11, 316, 365, 18, 7139, 30, 327, 1995, 87, 11, 1327, 296, 74, 674, 2941, 11, 316, 365, 18, 7139, 30, 309, 9411, 12, 1320, 18, 9898, 16, 29...
if s:
findTemplate2=re.compile(ur'\{\{[Ss]isterlinks') s2 = findTemplate2.search(text) if s or s2:
def categories(self): for page in self.generator: try: wikipedia.output(u'\n>>>> %s <<<<' % page.title()) getCommons = wikipedia.getSite('commons', 'commons') commonsCategory = catlib.Category(getCommons,'Category:%s'%page.title()) try: getcommonscat = commonsCategory.get(get_redirect=True) commonsCategoryTitle = commonsCategory.title() categoryname = commonsCategoryTitle.split('Category:',1)[1] if page.title() == categoryname: oldText = page.get() text = oldText
f4f09a5929a3628ec3201242dfc00746c7493262 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/f4f09a5929a3628ec3201242dfc00746c7493262/commons_link.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6477, 12, 2890, 4672, 364, 1363, 316, 365, 18, 8812, 30, 775, 30, 21137, 18, 2844, 12, 89, 8314, 82, 9778, 9778, 738, 87, 14360, 32, 11, 738, 1363, 18, 2649, 10756, 30863, 87, 273, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6477, 12, 2890, 4672, 364, 1363, 316, 365, 18, 8812, 30, 775, 30, 21137, 18, 2844, 12, 89, 8314, 82, 9778, 9778, 738, 87, 14360, 32, 11, 738, 1363, 18, 2649, 10756, 30863, 87, 273, 2...
readbuf = items[-1]
readbuf = item[-1]
def xmpp_presence(self, conn, presence_node): #print presence_node if presence_node.getFrom().bareMatch(self.remotejid): if presence_node.getType() == 'subscribe': replypres=xmpp.Presence(typ='subscribed',to=presence_node.getFrom()) conn.send(replypres) replypres.setType('subscribe') conn.send(replypres) elif presence_node.getType() == 'probe': replypres = xmpp.Presence(to=presence_node.getFrom(), show='chat', status=self.presencestr) conn.send(replypres) elif ((not presence_node.getShow() is None) and \ presence_node.getShow != '') : pass #sys.stdout.write("*** Status: " + presence_node.getShow() + "\n")
9da593c68bd28e2d087a66ed313d7326f87be3c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14053/9da593c68bd28e2d087a66ed313d7326f87be3c7/ax25xmpp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 24109, 67, 21731, 12, 2890, 16, 1487, 16, 9805, 67, 2159, 4672, 468, 1188, 9805, 67, 2159, 309, 9805, 67, 2159, 18, 588, 1265, 7675, 70, 834, 2060, 12, 2890, 18, 7222, 18252, 4672...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 24109, 67, 21731, 12, 2890, 16, 1487, 16, 9805, 67, 2159, 4672, 468, 1188, 9805, 67, 2159, 309, 9805, 67, 2159, 18, 588, 1265, 7675, 70, 834, 2060, 12, 2890, 18, 7222, 18252, 4672...
raise ValueError("truncated header")
raise HeaderError("truncated header")
def frombuf(cls, buf): """Construct a TarInfo object from a 512 byte string buffer. """ if len(buf) != BLOCKSIZE: raise ValueError("truncated header") if buf.count(NUL) == BLOCKSIZE: raise ValueError("empty header")
ebbeed781d923494f782f0750e76ad4aac8e29f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ebbeed781d923494f782f0750e76ad4aac8e29f5/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 4385, 12, 6429, 16, 1681, 4672, 3536, 7249, 279, 20334, 966, 733, 628, 279, 13908, 1160, 533, 1613, 18, 3536, 309, 562, 12, 4385, 13, 480, 14073, 4574, 30, 1002, 4304, 668, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 4385, 12, 6429, 16, 1681, 4672, 3536, 7249, 279, 20334, 966, 733, 628, 279, 13908, 1160, 533, 1613, 18, 3536, 309, 562, 12, 4385, 13, 480, 14073, 4574, 30, 1002, 4304, 668, 2932, ...
self.seqdict is a dictionary of sequences. If a sequence name is
self.seqdict is a dictionary of sequences. If a sequence sid is
def __len__(self): return len(self.qstring)
5d826cf87eabaab894d9b81b3f335fbe09d92619 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3083/5d826cf87eabaab894d9b81b3f335fbe09d92619/vfolder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1897, 972, 12, 2890, 4672, 327, 562, 12, 2890, 18, 85, 1080, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1897, 972, 12, 2890, 4672, 327, 562, 12, 2890, 18, 85, 1080, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
("fl.c = (%s) >> %d; (%s) <<= 1; %s") % (r.codegen(), msbShift, r.codegen(), self._resultFlags(r)))
("reg.sresult=0; %s = reg.uresult = ((uint32_t)%s) << 1;") % (r.codegen(), r.codegen())) + self._resultShift(r)
def codegen_shl(self, r, cnt): msbShift = r.width * 8 - 1 return self._repeat(cnt, ("fl.c = (%s) >> %d; (%s) <<= 1; %s") % (r.codegen(), msbShift, r.codegen(), self._resultFlags(r)))
8cf0c3c7a8428c608bbe912500420c8a19bc9730 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6757/8cf0c3c7a8428c608bbe912500420c8a19bc9730/sbt86.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23198, 67, 674, 80, 12, 2890, 16, 436, 16, 7599, 4672, 4086, 70, 10544, 273, 436, 18, 2819, 380, 1725, 300, 404, 327, 365, 6315, 9374, 12, 13085, 16, 7566, 2242, 18, 71, 273, 6142, 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, 23198, 67, 674, 80, 12, 2890, 16, 436, 16, 7599, 4672, 4086, 70, 10544, 273, 436, 18, 2819, 380, 1725, 300, 404, 327, 365, 6315, 9374, 12, 13085, 16, 7566, 2242, 18, 71, 273, 6142, 8...
cur_list = skel_to_col_attr_list(self.__skeleton__[table])
cur_list = skel_to_col_attr_list(self.__skeleton__[table_name])
def drop_column(self, table, col_name): """ Takes a while, thanks to SQLite... """ # Check input: if not self.__skeleton__.has_key(table): raise ValueError("Database has no table %s."%table) if not self.__skeleton__[table].has_key(col_name): raise ValueError("Table %s has no column %s."%(table,col_name))
5ddf79d83938a9c0191ec3af2f60e264a74ecef9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5ddf79d83938a9c0191ec3af2f60e264a74ecef9/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 67, 2827, 12, 2890, 16, 1014, 16, 645, 67, 529, 4672, 3536, 23004, 279, 1323, 16, 286, 19965, 358, 16192, 2777, 225, 3536, 468, 2073, 810, 30, 309, 486, 365, 16186, 7771, 12143, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 67, 2827, 12, 2890, 16, 1014, 16, 645, 67, 529, 4672, 3536, 23004, 279, 1323, 16, 286, 19965, 358, 16192, 2777, 225, 3536, 468, 2073, 810, 30, 309, 486, 365, 16186, 7771, 12143, ...
new.setGef_project_id(old.getGef_project_id )
new.setGef_project_id(old.getGef_project_id() )
def migrate_project(old, old_parent, new_parent, f): new = None if callable(old.id): obj_id = old.id() else: obj_id = old.id portal_types = parent.portal_types portal_types.constructContent('Project', new_parent, obj_id) print old.Title() new = new_parent[obj_id] # set fields new.update(title=old.title) new.setBasin(old.getBasin() ) new.SetCountry(update_countries(old.getCountry())) new.setEnd_date(old.getEnd_date() ) new.setFocal_area(old.getFocal_area() ) new.setGef_project_allocation(old.getGef_project_allocation() ) new.setGef_project_id(old.getGef_project_id ) new.setGlobalproject('Global' in old.getRegion()) new.setLatitude(old.getLeadagency() ) new.setLongitude(old.getLongitude() ) new.setOperational_programme(old.getOperational_programme() ) new.setProject_status(old.getProject_status() ) new.setProject_summary( '<div class="migration-tbd">' + ', '.join(old.getExecuting_agency()) + '</div> <hr/> <br/>' + old.getSummary_project_description() + '<p><hr/></p>' + old.getProject_results()) new.setProject_type(old.getProject_type() ) new.setRemote_url(old.getProject_website_address() ) new.setStart_date(old.getStart_date() ) new.setStrategic_priority(old.getStrategic_priority() ) new.setTotal_cost(old.getTotal_cost() )
a7515b372064702005964c649711105373e02dc7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6024/a7515b372064702005964c649711105373e02dc7/migrate_projects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13187, 67, 4406, 12, 1673, 16, 1592, 67, 2938, 16, 394, 67, 2938, 16, 284, 4672, 394, 273, 599, 309, 4140, 12, 1673, 18, 350, 4672, 1081, 67, 350, 273, 1592, 18, 350, 1435, 469, 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, 13187, 67, 4406, 12, 1673, 16, 1592, 67, 2938, 16, 394, 67, 2938, 16, 284, 4672, 394, 273, 599, 309, 4140, 12, 1673, 18, 350, 4672, 1081, 67, 350, 273, 1592, 18, 350, 1435, 469, 30, ...
self.target = None self.refresh()
self.newTarget(Receipt(date=today())) self.trans.track(self.target)
def discard(self, *ignore): self.trans.discard() self.target = None self.refresh()
7b24938b627ac118628111f4a044781160ac6138 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2219/7b24938b627ac118628111f4a044781160ac6138/receipt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10388, 12, 2890, 16, 380, 6185, 4672, 365, 18, 2338, 18, 31992, 1435, 365, 18, 3299, 273, 599, 365, 18, 9144, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10388, 12, 2890, 16, 380, 6185, 4672, 365, 18, 2338, 18, 31992, 1435, 365, 18, 3299, 273, 599, 365, 18, 9144, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
maptbx.get_cartesian_crystallographic_interpolator(map,frac_mtx)]
maptbx.get_cartesian_crystallographic_interpolator(map,frac_mtx), maptbx.get_fractional_asu_interpolator(map,asu_mappings), maptbx.get_cartesian_asu_interpolator(map,asu_mappings)]
def exercise_abstract_interpolators(): unit_cell=130.45,130.245,288.405,90,90,120 unit_cell_gridding_n=144,144,360 grid_cell=uctbx.unit_cell((130.45/144,130.245/144,388.405/360,90,90,120)) grid_mat = grid_cell.fractionalization_matrix() map = test_map.deep_copy() map.resize(flex.grid((-1,-2,-1),(3,3,5))) interpolator = maptbx.get_non_crystallographic_interpolator(map,grid_mat) for site_cart,expected_result in ([(0.468661,-1.549268,3.352108),-0.333095], [(0.624992,1.553980,1.205578),-0.187556], [(0.278175,0.968454,2.578265),-0.375068], [(0.265198,-1.476055,0.704381),-0.147061], [(1.296042,0.002101,3.459270),-0.304401], [(0.296189,-1.346603,2.935777),-0.296395], [(0.551586,-1.284371,3.202145),-0.363263], [(0.856542,-0.782700,-0.985020),-0.106925], [(0.154407,1.078936,-0.917551),-0.151128]): assert approx_equal(interpolator.interpolate(site_cart), expected_result) orthos = flex.vec3_double() vals = flex.double() for x in range(0,2): for y in range(-1,2): for z in range(0,4): ortho = grid_cell.orthogonalize((x,y,z)) orthos.append( ortho ) val = interpolator.interpolate(ortho) vals.append(val) assert approx_equal(val, map[x,y,z]) for val,exp in zip(vals,interpolator.interpolate(orthos)): assert approx_equal( val, exp ) try: val = interpolator.interpolate( (5,5,5) ) except RuntimeError, e: assert str(e) == \ "cctbx Error: non_crystallographic_eight_point_interpolation:" \ " point required for interpolation is out of bounds." else: raise RuntimeError("Exception expected.") interpolator = maptbx.get_non_crystallographic_interpolator(map,grid_mat,True,-123) assert approx_equal(interpolator.interpolate( (5,5,5) ), -123) ## test fractional crystallographic symmetry frac_mtx = uctbx.unit_cell((1,1,1,90,90,90)).fractionalization_matrix() map = flex.double(flex.grid(2,3,5), 10) interpolators = [maptbx.get_fractional_crystallographic_interpolator(map), maptbx.get_cartesian_crystallographic_interpolator(map,frac_mtx)] for intp in interpolators: for shift in [0,1,-1]: for index in flex.nested_loop(map.focus()): x_frac = [float(i)/n+shift for i,n in zip(index, map.focus())] assert approx_equal(intp.interpolate(x_frac), 10) for i in xrange(100): x_frac = [3*random.random()-1 for i in xrange(3)] assert approx_equal(intp.interpolate(x_frac), 10)
37d39db635f21e796dcd58f7355ff97676a1c230 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/37d39db635f21e796dcd58f7355ff97676a1c230/tst_maptbx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 17801, 67, 18676, 3062, 13332, 2836, 67, 3855, 33, 24417, 18, 7950, 16, 24417, 18, 3247, 25, 16, 22, 5482, 18, 24, 6260, 16, 9349, 16, 9349, 16, 22343, 2836, 67, 3855, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 17801, 67, 18676, 3062, 13332, 2836, 67, 3855, 33, 24417, 18, 7950, 16, 24417, 18, 3247, 25, 16, 22, 5482, 18, 24, 6260, 16, 9349, 16, 9349, 16, 22343, 2836, 67, 3855, 67, ...
print "Adding changes"
def run(self): self.prepare() random.seed() url = self.url db = getDatabase()
f8cdd044a6dff2b1c2d5aa6bee01a8dfe0255bb7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10888/f8cdd044a6dff2b1c2d5aa6bee01a8dfe0255bb7/sf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 365, 18, 9366, 1435, 2744, 18, 12407, 1435, 880, 273, 365, 18, 718, 1319, 273, 11263, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 365, 18, 9366, 1435, 2744, 18, 12407, 1435, 880, 273, 365, 18, 718, 1319, 273, 11263, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
sortingMultiIndexView, unsortingMultiIndexView] allSortingViews = [sortingFiltView, sortingIndexView, sortingMultiIndexView] allUnSortingViews = [unsortingFiltView, unsortingIndexView, unsortingMultiIndexView]
sortingMultiIndexView, unsortingMultiIndexView, subSort, unSubSort] allSortingViews = [subSort, sortingFiltView] allUnSortingViews = [unsortingFiltView, unSubSort, unsortingIndexView, unsortingMultiIndexView]
def multiIndexFunc2(x): return [True]
08877d13954587ba7c266e49df70bb3eeb5242ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/08877d13954587ba7c266e49df70bb3eeb5242ce/databasetest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3309, 1016, 2622, 22, 12, 92, 4672, 327, 306, 5510, 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, 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, 3309, 1016, 2622, 22, 12, 92, 4672, 327, 306, 5510, 65, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def onchange_tax_id(self, cr, uid, ids, amount, tax_id, context={}):
def onchange_price(self, cr, uid, ids, payment_ids, tax_amount, tax_id, context={}):
def onchange_tax_id(self, cr, uid, ids, amount, tax_id, context={}): res = { 'tax_amount':False } tax_pool = self.pool.get('account.tax') if tax_id: tax = tax_pool.browse(cr, uid, tax_id) if tax.type == 'percent': res.update({ 'tax_amount':amount * tax.amount }) if tax.type == 'fixed': res.update({ 'tax_amount':amount + tax.amount }) return { 'value':res }
c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 8694, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5184, 67, 2232, 16, 5320, 67, 8949, 16, 5320, 67, 350, 16, 819, 12938, 4672, 400, 273, 288, 296, 8066, 67, 8949, 4278...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 8694, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5184, 67, 2232, 16, 5320, 67, 8949, 16, 5320, 67, 350, 16, 819, 12938, 4672, 400, 273, 288, 296, 8066, 67, 8949, 4278...
An optional instance of [sqlalchemy.orm provides SQL expression generation functions for this composite type.
An optional instance of [sqlalchemy.orm SQL expression generation functions for this composite type.
def __composite_values__(self): return (self.x, self.y)
8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 27676, 67, 2372, 972, 12, 2890, 4672, 327, 261, 2890, 18, 92, 16, 365, 18, 93, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 27676, 67, 2372, 972, 12, 2890, 4672, 327, 261, 2890, 18, 92, 16, 365, 18, 93, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
logger.info('NOT forcing login: suffix of %s is in white list.',
logger.debug('NOT forcing login: suffix of %s is in white list.',
def force_login(request, props): force_login_header = props.getProperty('force_login_header', None) if not force_login_header: return False # Note: to truly test what happens when forcing login via a header # on your local machine without any Apache setup, you should # comment out this condition: if not request.get_header(force_login_header, None): logger.debug("Login will NOT be forced.") return False # Okay, login should be forced, except when this url is in a white # list. actual_url = request.get('ACTUAL_URL', '') logger.debug("ACTUAL_URL: %s", actual_url) end_part = actual_url.split('/')[-1] logger.debug("End part: %s", end_part) if end_part in PAGE_WHITE_LIST: # We are at a login page so we will not force a login here as # that would be double and pretty much broken. logger.info('NOT forcing login: %s is in page white list.', end_part) return False end_suffix = end_part.split('.')[-1] if end_suffix in SUFFIX_WHITE_LIST: logger.info('NOT forcing login: suffix of %s is in white list.', end_part) return False logger.debug("Login will be forced.") return True
18aa241638e2d7d8d97916769311c2166cc29777 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10439/18aa241638e2d7d8d97916769311c2166cc29777/traversal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2944, 67, 5819, 12, 2293, 16, 3458, 4672, 2944, 67, 5819, 67, 3374, 273, 3458, 18, 588, 1396, 2668, 5734, 67, 5819, 67, 3374, 2187, 599, 13, 309, 486, 2944, 67, 5819, 67, 3374, 30, 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, 2944, 67, 5819, 12, 2293, 16, 3458, 4672, 2944, 67, 5819, 67, 3374, 273, 3458, 18, 588, 1396, 2668, 5734, 67, 5819, 67, 3374, 2187, 599, 13, 309, 486, 2944, 67, 5819, 67, 3374, 30, 3...
try: Util().check_prerequisite_command('tar') except NotFoundError: sys.exit(1)
Util().check_prerequisite_command('tar')
def tarzip_image(self, prefix, file, path): try: Util().check_prerequisite_command('tar') except NotFoundError: sys.exit(1)
be99daf4b6f697762bb053d60594aa73fb866280 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12707/be99daf4b6f697762bb053d60594aa73fb866280/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8232, 4450, 67, 2730, 12, 2890, 16, 1633, 16, 585, 16, 589, 4672, 775, 30, 3564, 7675, 1893, 67, 683, 822, 16608, 1137, 67, 3076, 2668, 11718, 6134, 1335, 25576, 30, 2589, 18, 8593, 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, 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, 8232, 4450, 67, 2730, 12, 2890, 16, 1633, 16, 585, 16, 589, 4672, 775, 30, 3564, 7675, 1893, 67, 683, 822, 16608, 1137, 67, 3076, 2668, 11718, 6134, 1335, 25576, 30, 2589, 18, 8593, 12...
print RemoveTestCounts(self.RemoveUnsupportedTests(golden))
def testOutput(self): output = GetOutputOfAllCommands() golden_file = open(GOLDEN_PATH, 'rb') golden = golden_file.read() golden_file.close()
d04311299eb56c9b63cd65da8c274de4af59096c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1989/d04311299eb56c9b63cd65da8c274de4af59096c/gtest_output_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1447, 12, 2890, 4672, 876, 273, 968, 1447, 951, 1595, 9127, 1435, 20465, 275, 67, 768, 273, 1696, 12, 43, 11846, 1157, 67, 4211, 16, 296, 6731, 6134, 20465, 275, 273, 20465, 275, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1447, 12, 2890, 4672, 876, 273, 968, 1447, 951, 1595, 9127, 1435, 20465, 275, 67, 768, 273, 1696, 12, 43, 11846, 1157, 67, 4211, 16, 296, 6731, 6134, 20465, 275, 273, 20465, 275, ...
(testname, self.revision)) logging.info('.coverage file for test %s: %s' % (test, coverage_file))
(test_name, self.revision)) logging.info('.coverage file for test %s: %s' % (test_name, coverage_file))
def RunTest(self, test): """Run tests and collect the .coverage file
3d0ca8f3f0fbe82e403f5809885597a6cf1cd381 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5060/3d0ca8f3f0fbe82e403f5809885597a6cf1cd381/coverage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 4709, 12, 2890, 16, 1842, 4672, 3536, 1997, 7434, 471, 3274, 326, 263, 16356, 585, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 4709, 12, 2890, 16, 1842, 4672, 3536, 1997, 7434, 471, 3274, 326, 263, 16356, 585, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if string.find(arg, 'egg') == -1:
if string.find(arg, 'egg') != -1:
def howto_install_setuptools(): print """Error: You need setuptools Python package!
8b80ccf8b77104b5b1ced7b50886c01b68fd81d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4168/8b80ccf8b77104b5b1ced7b50886c01b68fd81d5/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3661, 869, 67, 5425, 67, 542, 30693, 13332, 1172, 3536, 668, 30, 4554, 1608, 444, 30693, 6600, 2181, 5, 225, 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, 3661, 869, 67, 5425, 67, 542, 30693, 13332, 1172, 3536, 668, 30, 4554, 1608, 444, 30693, 6600, 2181, 5, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if self.tree.openElements[-1].name != name: self.parser.parseError("end-tag-too-early-ignored", {"name": "form"}) else: self.tree.openElements.pop() self.tree.formPointer = None
if self.tree.openElements[-1].name != name: self.parser.parseError("end-tag-too-early-ignored", {"name": "form"}) node = self.tree.openElements.pop() while node.name != name: node = self.tree.openElements.pop()
def endTagForm(self, name): if self.tree.elementInScope(name): self.tree.generateImpliedEndTags() if self.tree.openElements[-1].name != name: self.parser.parseError("end-tag-too-early-ignored", {"name": "form"}) else: self.tree.openElements.pop() self.tree.formPointer = None
77ee77de060d9bb1ff07c6278e8f81df7df4a554 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9368/77ee77de060d9bb1ff07c6278e8f81df7df4a554/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 1204, 12, 2890, 16, 508, 4672, 309, 365, 18, 3413, 18, 2956, 382, 3876, 12, 529, 4672, 365, 18, 3413, 18, 7163, 2828, 2092, 1638, 3453, 1435, 309, 365, 18, 3413, 18, 3190, 3471,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 1204, 12, 2890, 16, 508, 4672, 309, 365, 18, 3413, 18, 2956, 382, 3876, 12, 529, 4672, 365, 18, 3413, 18, 7163, 2828, 2092, 1638, 3453, 1435, 309, 365, 18, 3413, 18, 3190, 3471,...
self["ButtonRedtext"] = Label(_("Close")) self["ButtonRed"] = Pixmap() self["ButtonGreentext"] = Label(_("Start test")) self["ButtonGreen_Check"] = MultiPixmap() self["ButtonYellowtext"] = Label(_("Stop test")) self["ButtonYellow_Check"] = MultiPixmap()
self["key_red"] = StaticText(_("Close")) self["key_green"] = StaticText(_("Start test")) self["key_yellow"] = StaticText(_("Stop test"))
def setLabels(self): self["Adaptertext"] = MultiColorLabel(_("LAN Adapter")) self["Adapter"] = MultiColorLabel() self["AdapterInfo"] = MultiPixmap() self["AdapterInfo_Text"] = MultiColorLabel(_("Show Info")) self["AdapterInfo_OK"] = Pixmap() if self.iface == 'wlan0' or self.iface == 'ath0': self["Networktext"] = MultiColorLabel(_("Wireless Network")) else: self["Networktext"] = MultiColorLabel(_("Local Network")) self["Network"] = MultiColorLabel() self["NetworkInfo"] = MultiPixmap() self["NetworkInfo_Text"] = MultiColorLabel(_("Show Info")) self["NetworkInfo_Check"] = MultiPixmap() self["Dhcptext"] = MultiColorLabel(_("DHCP")) self["Dhcp"] = MultiColorLabel() self["DhcpInfo"] = MultiPixmap() self["DhcpInfo_Text"] = MultiColorLabel(_("Show Info")) self["DhcpInfo_Check"] = MultiPixmap() self["IPtext"] = MultiColorLabel(_("IP Address")) self["IP"] = MultiColorLabel() self["IPInfo"] = MultiPixmap() self["IPInfo_Text"] = MultiColorLabel(_("Show Info")) self["IPInfo_Check"] = MultiPixmap() self["DNStext"] = MultiColorLabel(_("Nameserver")) self["DNS"] = MultiColorLabel() self["DNSInfo"] = MultiPixmap() self["DNSInfo_Text"] = MultiColorLabel(_("Show Info")) self["DNSInfo_Check"] = MultiPixmap() self["EditSettings_Text"] = MultiColorLabel(_("Edit settings")) self["EditSettingsButton"] = MultiPixmap() self["ButtonRedtext"] = Label(_("Close")) self["ButtonRed"] = Pixmap()
18dcac668d46858377cc8c1ac55fc72fa62ecc0e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/18dcac668d46858377cc8c1ac55fc72fa62ecc0e/NetworkSetup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 5888, 12, 2890, 4672, 365, 9614, 4216, 955, 11929, 273, 5991, 2957, 2224, 24899, 2932, 11074, 14238, 6, 3719, 365, 9614, 4216, 11929, 273, 5991, 2957, 2224, 1435, 365, 9614, 4216, 966...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5888, 12, 2890, 4672, 365, 9614, 4216, 955, 11929, 273, 5991, 2957, 2224, 24899, 2932, 11074, 14238, 6, 3719, 365, 9614, 4216, 11929, 273, 5991, 2957, 2224, 1435, 365, 9614, 4216, 966...
str += ' <TD BGCOLOR=" '<B><FONT SIZE="+1">Class' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n'
str += I+'<TH BGCOLOR=" '&nbsp;&nbsp;Class&nbsp;&nbsp;&nbsp;</TH>\n'
def _navbar(self, where, uid=None): """ @param where: What page the navbar is being displayed on.. """ str = self._start_of('Navbar') + \ '<TABLE BORDER="0" WIDTH="100%" '+\ 'CELLPADDING="0" BGCOLOR="WHITE" CELLSPACING="0">\n'+\ '<TR>\n<TD COLSPAN=2 BGCOLOR="#a0c0ff">\n'+\ '<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1">\n'+\ ' <TR ALIGN="center" VALIGN="top">\n' # Go to Package if self._package is None: pass elif where in ('class', 'module'): pkg = uid.package() if pkg is not None: str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`pkg`+'.html">'+\ 'Package</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' else: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif where=='package': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif isinstance(self._package, UID): str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`self._package`+'.html">'+\ 'Package</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif 'multiple' == self._package: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD></B>\n' # Go to Module if self._module is None: pass elif where=='class': str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`uid.module()`+'.html">'+\ 'Module</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif where=='module': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Module' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif isinstance(self._module, UID): str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`self._module`+'.html">'+\ 'Module</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif 'multiple' == self._module: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Module' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD></B>\n' # Go to Class if where == 'class': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Class' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' else: str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">Class' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n'
208b57b68fee425e4ef284675975df62fecdb5ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/208b57b68fee425e4ef284675975df62fecdb5ea/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 891, 1625, 30, 18734, 1363, 326, 8775, 3215, 353, 3832, 10453, 603, 838, 3536, 609, 273, 365, 6315, 1937, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 891, 1625, 30, 18734, 1363, 326, 8775, 3215, 353, 3832, 10453, 603, 838, 3536, 609, 273, 365, 6315, 1937, 67, ...
if scale < 1 or scale > 100:
if scale < 1:
def generate_figure(self, node, source, destination): caption = None for node1 in node.parent.children: if node1.tagname == 'caption': caption = node1.astext() self.image_style_count += 1 style_name = 'rstframestyle%d' % self.image_style_count if 'scale' in node.attributes: try: scale = int(node.attributes['scale']) if scale < 1 or scale > 100: raise ValueError scale = scale * 0.01 except ValueError, e: print 'Error: Invalid scale for image: "%s"' % ( node.attributes['scale'], ) else: scale = 1.0 width = None if 'width' in node.attributes: try: width = int(node.attributes['width']) width = width * (35.278 / 1000.0) width *= scale #attrib['svg:width'] = '%.2fcm' % (width, ) except ValueError, e: print 'Error: Invalid width for image: "%s"' % ( node.attributes['width'], ) height = None if 'height' in node.attributes: try: height = int(node.attributes['height']) height = height * (35.278 / 1000.0) height *= scale #attrib['svg:height'] = '%.2fcm' % (height, ) except ValueError, e: print 'Error: Invalid height for image: "%s"' % ( node.attributes['height'], ) # Add the styles attrib = { 'style:name': style_name, 'style:family': 'graphic', 'style:parent-style-name': 'Frame', } el1 = SubElement(self.automatic_styles, 'style:style', attrib=attrib, nsdict=SNSD) halign = 'center' valign = 'top' if 'align' in node.attributes: align = node.attributes['align'].split() for val in align: if val in ('left', 'center', 'right'): halign = val elif val in ('top', 'middle', 'bottom'): valign = val attrib = { 'fo:margin-left': '0cm', 'fo:margin-right': '0cm', 'fo:margin-top': '0cm', 'fo:margin-bottom': '0cm', 'style:wrap': 'dynamic', 'style:number-wrapped-paragraphs': 'no-limit', 'style:vertical-pos': valign, 'style:vertical-rel': 'paragraph', 'style:horizontal-pos': halign, 'style:horizontal-rel': 'paragraph', 'fo:padding': '0cm', 'fo:border': 'none', } #ipshell('At generate_figure') el2 = SubElement(el1, 'style:graphic-properties', attrib=attrib, nsdict=SNSD) # Add the content attrib = {'text:style-name': 'rststyle-textbody'} el1 = SubElement(self.current_element, 'text:p', attrib=attrib) attrib = { 'draw:style-name': style_name, 'draw:name': 'Frame1', 'text:anchor-type': 'paragraph', 'draw:z-index': '1', } if width is not None: attrib['svg:width'] = '%.2fcm' % (width, ) el1 = SubElement(el1, 'draw:frame', attrib=attrib) attrib = {} if height is not None: attrib['fo:min-height'] = '%.2fcm' % (height, ) el1 = SubElement(el1, 'draw:text-box', attrib=attrib) attrib = {'text:style-name': 'rststyle-caption', } el1 = SubElement(el1, 'text:p', attrib=attrib) # Add the image (frame) inside the figure/caption frame. #ipshell('At visit_image #1') el2 = self.generate_image(node, source, destination, el1) if caption: el2.tail = caption
086c03a394bb4fe54c588e814ac2435862cc205a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1278/086c03a394bb4fe54c588e814ac2435862cc205a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 19675, 12, 2890, 16, 756, 16, 1084, 16, 2929, 4672, 11006, 273, 599, 364, 756, 21, 316, 756, 18, 2938, 18, 5906, 30, 309, 756, 21, 18, 2692, 529, 422, 296, 15386, 4278, 110...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 19675, 12, 2890, 16, 756, 16, 1084, 16, 2929, 4672, 11006, 273, 599, 364, 756, 21, 316, 756, 18, 2938, 18, 5906, 30, 309, 756, 21, 18, 2692, 529, 422, 296, 15386, 4278, 110...
if remove_contraints.has_key(field):
if remove_constraints.has_key(field):
def _get_constraints(self, req): constraints = {} ticket_fields = [f['name'] for f in TicketSystem(self.env).get_ticket_fields()]
f4b0083b797b14efdf7e136f37daf9d3ef2d6391 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/f4b0083b797b14efdf7e136f37daf9d3ef2d6391/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 11967, 12, 2890, 16, 1111, 4672, 6237, 273, 2618, 9322, 67, 2821, 273, 306, 74, 3292, 529, 3546, 364, 284, 316, 22023, 3163, 12, 2890, 18, 3074, 2934, 588, 67, 16282, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 11967, 12, 2890, 16, 1111, 4672, 6237, 273, 2618, 9322, 67, 2821, 273, 306, 74, 3292, 529, 3546, 364, 284, 316, 22023, 3163, 12, 2890, 18, 3074, 2934, 588, 67, 16282, 67,...
WinExt_win32com('adsi', libraries="ACTIVEDS ADSIID",
WinExt_win32com('adsi', libraries="ACTIVEDS ADSIID user32 advapi32",
def finalize_options(self): if self.install_dir is None: installobj = self.distribution.get_command_obj('install') self.install_dir = installobj.install_lib print 'Installing data files to %s' % self.install_dir install_data.finalize_options(self)
773142b3cdc6203c68434ee5265855f3e4527b9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/773142b3cdc6203c68434ee5265855f3e4527b9e/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 12, 2890, 4672, 309, 365, 18, 5425, 67, 1214, 353, 599, 30, 1804, 287, 383, 441, 273, 365, 18, 16279, 18, 588, 67, 3076, 67, 2603, 2668, 5425, 6134, 365, 18, 5425, 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, 12409, 67, 2116, 12, 2890, 4672, 309, 365, 18, 5425, 67, 1214, 353, 599, 30, 1804, 287, 383, 441, 273, 365, 18, 16279, 18, 588, 67, 3076, 67, 2603, 2668, 5425, 6134, 365, 18, 5425, 6...
self.applied_dirty = 1; start = self.series_end()
self.applied_dirty = 1
def push(self, repo, patch=None, force=False, list=False, mergeq=None): wlock = repo.wlock() if repo.dirstate.parents()[0] != repo.changelog.tip(): self.ui.status(_("(working directory not at tip)\n"))
843bddc481c0f2c8dfe1b3e8d27af1f7e32b0b05 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/843bddc481c0f2c8dfe1b3e8d27af1f7e32b0b05/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1817, 12, 2890, 16, 3538, 16, 4729, 33, 7036, 16, 2944, 33, 8381, 16, 666, 33, 8381, 16, 2691, 85, 33, 7036, 4672, 341, 739, 273, 3538, 18, 91, 739, 1435, 309, 3538, 18, 72, 920, 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, 1817, 12, 2890, 16, 3538, 16, 4729, 33, 7036, 16, 2944, 33, 8381, 16, 666, 33, 8381, 16, 2691, 85, 33, 7036, 4672, 341, 739, 273, 3538, 18, 91, 739, 1435, 309, 3538, 18, 72, 920, 3...
for p in filter(lambda x: x[3] == arch, affected):
for p in filter(lambda x: x[1] == arch, affected):
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst()
6abbd90bfcb33ae5f570c924e7387a2633b9d0de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/6abbd90bfcb33ae5f570c924e7387a2633b9d0de/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 2, -100, -100, -100, -100, -100, -100, -100, ...
texts["name"] = FormatName(entry_infos["name"])
texts["name"] = UnDigitName(FormatName(entry_infos["name"]))
def GenerateFileContent(Node, headerfilepath, pointers_dict = {}): """ pointers_dict = {(Idx,Sidx):"VariableName",...} """ global type global internal_types global default_string_size texts = {} texts["maxPDOtransmit"] = 0 texts["NodeName"] = Node.GetNodeName() texts["NodeID"] = Node.GetNodeID() texts["NodeType"] = Node.GetNodeType() texts["Description"] = Node.GetNodeDescription() texts["iam_a_slave"] = 0 if (texts["NodeType"] == "slave"): texts["iam_a_slave"] = 1 default_string_size = Node.GetDefaultStringSize() # Compiling lists of indexes rangelist = [idx for idx in Node.GetIndexes() if 0 <= idx <= 0x260] listIndex = [idx for idx in Node.GetIndexes() if 0x1000 <= idx <= 0xFFFF] communicationlist = [idx for idx in Node.GetIndexes() if 0x1000 <= idx <= 0x11FF] sdolist = [idx for idx in Node.GetIndexes() if 0x1200 <= idx <= 0x12FF] pdolist = [idx for idx in Node.GetIndexes() if 0x1400 <= idx <= 0x1BFF] variablelist = [idx for idx in Node.GetIndexes() if 0x2000 <= idx <= 0xBFFF]
1c4bd6cb0bddfe85e274f3b52908c78e2a12df9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/116/1c4bd6cb0bddfe85e274f3b52908c78e2a12df9a/gen_cfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 25391, 12, 907, 16, 1446, 10561, 16, 13857, 67, 1576, 273, 2618, 4672, 3536, 13857, 67, 1576, 273, 288, 12, 4223, 16, 55, 3465, 13, 2773, 21519, 3113, 2777, 97, 3536, 2552, 618, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 25391, 12, 907, 16, 1446, 10561, 16, 13857, 67, 1576, 273, 2618, 4672, 3536, 13857, 67, 1576, 273, 288, 12, 4223, 16, 55, 3465, 13, 2773, 21519, 3113, 2777, 97, 3536, 2552, 618, ...
'default_user_ids': fields.many2many('res.users', 'ir_act_window_user_rel', 'act_id', 'uid', 'Users'),
def process_child(node, new_node, doc): for child in node.childNodes: if child.localName=='field' and child.hasAttribute('select') and child.getAttribute('select')=='1': if child.childNodes: fld = doc.createElement('field') for attr in child.attributes.keys(): fld.setAttribute(attr, child.getAttribute(attr)) new_node.appendChild(fld) else: new_node.appendChild(child) elif child.localName in ('page','group','notebook'): process_child(child, new_node, doc)
49c1cc97f420652a8b5c0e95793fc3b7113fb9e0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/49c1cc97f420652a8b5c0e95793fc3b7113fb9e0/ir_actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 3624, 12, 2159, 16, 394, 67, 2159, 16, 997, 4672, 364, 1151, 316, 756, 18, 3624, 3205, 30, 309, 1151, 18, 3729, 461, 18920, 1518, 11, 471, 1151, 18, 5332, 1499, 2668, 4025, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 3624, 12, 2159, 16, 394, 67, 2159, 16, 997, 4672, 364, 1151, 316, 756, 18, 3624, 3205, 30, 309, 1151, 18, 3729, 461, 18920, 1518, 11, 471, 1151, 18, 5332, 1499, 2668, 4025, ...
pdeclname, mgsname, mgsdecl.type.typename())
pname, mgsname, mgsdecl.type.typename())
def visitManagesStmt(self, mgs): mgsdecl = self.symtab.lookup(mgs.name) pdecl = mgs.manager.decl assert pdecl
33d551846c9002b844133d6a4da1de69a8ca44f4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/33d551846c9002b844133d6a4da1de69a8ca44f4/type.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 49, 940, 281, 8952, 12, 2890, 16, 312, 564, 4672, 312, 564, 8840, 273, 365, 18, 9009, 1010, 378, 18, 8664, 12, 81, 564, 18, 529, 13, 293, 8840, 273, 312, 564, 18, 4181, 18, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 49, 940, 281, 8952, 12, 2890, 16, 312, 564, 4672, 312, 564, 8840, 273, 365, 18, 9009, 1010, 378, 18, 8664, 12, 81, 564, 18, 529, 13, 293, 8840, 273, 312, 564, 18, 4181, 18, 8...
sage: sr = mq.SR(1,2,2,4)
sage: sr = mq.SR(1, 2, 2, 4)
def mix_columns_matrix(self): """ Return the MixColumns matrix.
62424369e932ac59629cb4d40b7e47ae2a712293 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62424369e932ac59629cb4d40b7e47ae2a712293/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6843, 67, 5112, 67, 5667, 12, 2890, 4672, 3536, 2000, 326, 31043, 3380, 3148, 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, 6843, 67, 5112, 67, 5667, 12, 2890, 4672, 3536, 2000, 326, 31043, 3380, 3148, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"""This macro is assigned to a class attr to declare that its value should be a lazily-instantiated Instance of expr (by default).
""" This macro is assigned to a class attr to declare that its value should be a lazily-instantiated Instance of expr (by default).
def Instance(expr, _index_expr = _E_ATTR, _lvalue_flag = False, _noinstance = False, doc = None): """This macro is assigned to a class attr to declare that its value should be a lazily-instantiated Instance of expr (by default). Assuming the arg is an expr (not yet checked?), turn into the expr _self._i_instance(hold_Expr(expr), _E_ATTR), which is free in the symbols _self and _E_ATTR. [#e _E_ATTR might be changed to _E_INDEX, or otherwise revised.] This function is also used internally to help implement the Arg and Option macros; for their use only, it has a private _index_expr option, giving an index expr other than _E_ATTR for the new Instance (which is used to suggest an ipath for the new instance, relative to that of self). Similarly, it helps implement ArgExpr etc, for whose sake it has a private option _noinstance. Devel scratch comment: Note that the Arg and Option macros may have handy, not expr itself, but a "grabarg" expr which needs to be evaluated (with _self bound) to produce the expr to be instantiated. What should they pass?? eval_Expr of the expr they have. [#doc - reword this] Other private options: _lvalue_flag, _noinstance (_noinstance is only supported when EVAL_REFORM is true) """ if doc: printnim("Instance doc is not saved anywhere; should turn into a note to formulascanner to save it as metainfo, maybe")#e printnim("review: same index is used for a public Option and a private Instance on an attr; maybe ok if no overlap possible???")##e global _self # not needed, just fyi if EVAL_REFORM: if _lvalue_flag: assert not _noinstance # since it makes no sense to ask for this then, AFAIK (if ok for one, ok for all -- see below) #070119 bugfix to make Set(var,val) work again (eg when clicking a checkbox_pref) # rather than evalling var to its current value. This means _lvalue_flag never gets passed to _i_instance. res = call_Expr( getattr_Expr(_self, '_i_instance'), eval_to_lval_Expr(expr), _index_expr ) ####e if this works, then try simplifying it to remove the _i_instance call! (assuming the lval is never needing make) # (or given this macro's name, maybe it makes more sense for LvalueArg to manage to not call it...) elif _noinstance:#070122 # we ignore _index_expr, but callers can't help but pass one, so don't complain when they do return expr # i.e. Instance(expr) == expr -- not useful directly, but useful as a passthru option from Arg etc. else: res = call_Expr( getattr_Expr(_self, '_i_instance'), expr, _index_expr ) else: assert not _noinstance, "bug: _noinstance is only supported when EVAL_REFORM is true" res = call_Expr( getattr_Expr(_self, '_i_instance'), hold_Expr(expr), _index_expr, _lvalue_flag = _lvalue_flag ) return res
d0ffa4ebc7f1e32fb807fce132593cfedae374b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/d0ffa4ebc7f1e32fb807fce132593cfedae374b0/attr_decl_macros.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5180, 12, 8638, 16, 389, 1615, 67, 8638, 273, 389, 41, 67, 12043, 16, 389, 80, 1132, 67, 6420, 273, 1083, 16, 389, 82, 885, 593, 273, 1083, 16, 997, 273, 599, 4672, 3536, 1220, 11522...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5180, 12, 8638, 16, 389, 1615, 67, 8638, 273, 389, 41, 67, 12043, 16, 389, 80, 1132, 67, 6420, 273, 1083, 16, 389, 82, 885, 593, 273, 1083, 16, 997, 273, 599, 4672, 3536, 1220, 11522...
tzoffsets=self.tzoffsets),
tzinfos=self.tzinfos),
def testDateCommandFormat(self): self.assertEqual(parse("Thu Sep 25 10:36:28 BRST 2003", tzoffsets=self.tzoffsets), datetime(2003, 9, 25, 10, 36, 28, tzinfo=self.brsttz))
335fc54b1b5ce35258e84c7fae46fd121e618f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8441/335fc54b1b5ce35258e84c7fae46fd121e618f68/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1626, 2189, 1630, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2670, 2932, 1315, 89, 18032, 6969, 1728, 30, 5718, 30, 6030, 605, 10637, 4044, 23, 3113, 6016, 18227, 33, 2890, 18, 1299...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1626, 2189, 1630, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2670, 2932, 1315, 89, 18032, 6969, 1728, 30, 5718, 30, 6030, 605, 10637, 4044, 23, 3113, 6016, 18227, 33, 2890, 18, 1299...
if colls and interactive != "yes":
if colls and (interactive != "yes" or short_coll):
def format(bfo, limit, separator='; ', extension='[...]', print_links = "yes", print_affiliations='no', affiliation_prefix = ' (', affiliation_suffix = ')', print_affiliation_first='no', interactive="no", highlight="no", affiliations_separator=" ; ", name_last_first = "yes", collaboration = "yes", id_links = "no", markup = "html", link_extension = "no", ): """ Prints the list of authors of a record. @param limit the maximum number of authors to display @param separator the separator between authors. @param extension a text printed if more authors than 'limit' exist @param print_links if yes, prints the authors as HTML link to their publications @param print_affiliations if yes, make each author name followed by its affiliation @param affiliation_prefix prefix printed before each affiliation @param affiliation_suffix suffix printed after each affiliation @param print_affiliation_first if 'yes', affiliation is printed before the author @param interactive if yes, enable user to show/hide authors when there are too many (html + javascript) @param highlight highlights authors corresponding to search query if set to 'yes' @param affiliations_separator separates affiliation groups @param name_last_first if yes (default) print last, first otherwise first last @param collaboration if yes (default) uses collaboration name in place of long author list, if available @param id_links if yes (default = no) prints link based on INSPIRE IDs if available - only used if print_links = yes @param markup html (default) or latex controls small markup differences @param link_extension if 'yes' link the extension to the detailed record page """ from urllib import quote from cgi import escape import re from invenio.config import CFG_SITE_URL from invenio.bibformat_elements.bfe_server_info import format as bfe_server #regex for parsing last and first names and initials re_last_first = re.compile('^(?P<last>[^,]+)\s*,\s*(?P<first_names>[^\,]*)(?P<extension>\,?.*)$') re_initials = re.compile(r'(?P<initial>\w)(\w+|\.)\s*') re_coll = re.compile(r'\s*collaborations?', re.IGNORECASE) from invenio.bibformat_config_inspire import CFG_BIBFORMAT_INSPIRE_INST_LINK from invenio.messages import gettext_set_language _ = gettext_set_language(bfo.lang) # load the right message language authors = [] authors = bfo.fields('100__', repeatable_subfields_p=True) authors.extend(bfo.fields('700__', repeatable_subfields_p=True)) # Keep real num of authorsfix + affiliations_separator.join(author['u']) + \ nb_authors = len(authors) # Limit num of authors, so that we do not process # the authors that will not be shown. This can only # be done in non-interactive mode, as interactive mode # allows to show all of them. if limit.isdigit() and nb_authors > int(limit) \ and interactive != "yes": if bfo.field('710g'): #check for colln note authors = authors[:1] else: authors = authors[:int(limit)] # Process authors to add link, affiliation and highlight for author in authors: if author.has_key('a'): author['a'] = author['a'][0] # There should not be # repeatable subfields here. if highlight == 'yes': from invenio import bibformat_utils author['a'] = bibformat_utils.highlight(author['a'], bfo.search_pattern) #check if we need to reverse last, first #we don't try to reverse it if it isn't stored with a comma. first_last_match = re_last_first.search(author['a']) author['display'] = author['a'] if name_last_first.lower() == "no": if first_last_match: author['display'] = first_last_match.group('first_names') + \ ' ' + \ first_last_match.group('last') + \ first_last_match.group('extension') #for latex we do initials only (asn assume first last) if markup == 'latex': if first_last_match: first = re_initials.sub('\g<initial>.~', \ first_last_match.group('first_names')) author['display'] = first + \ first_last_match.group('last') + \ first_last_match.group('extension') if print_links.lower() == "yes": # if there is an ID, search using that. id_link = '' if id_links == "yes" and author.has_key('i'): author['i'] = author['i'][0] #possible to have more IDs? id_link = '<a class="authoridlink" href="' + \ CFG_SITE_URL + \ '/search?' + \ 'ln='+ bfo.lang + \ '&amp;p=100__i' + escape(':' + author['i']) + \ '+or+700__i' + escape(':' + author['i']) +\ '">'+escape("(ID Search)") + '</a> ' author['display'] = '<a class="authorlink" href="' + \ CFG_SITE_URL + \ '/author/'+ quote(author['a']) + \ '?ln='+ bfo.lang + \ '">'+escape(author['display'])+'</a>' + \ id_link if print_affiliations == "yes": if author.has_key('e'): author['e'] = affiliation_prefix + \ affiliations_separator.join(author['e']) + \ affiliation_suffix if author.has_key('u'): author['ilink'] = ['<a class="afflink" href="' + \ CFG_BIBFORMAT_INSPIRE_INST_LINK + \ escape(string) + \ '">' + \ string.lstrip() + \ '</a>' for string in author['u']] author['u'] = affiliation_prefix + \ affiliations_separator.join(author['ilink']) + \ affiliation_suffix
c8c2cf5be797b1d4116fae289e47ed54a8b5996d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14116/c8c2cf5be797b1d4116fae289e47ed54a8b5996d/bfe_INSPIRE_authors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 70, 617, 16, 1800, 16, 4182, 2218, 31, 2265, 2710, 2218, 63, 2777, 65, 2187, 1172, 67, 7135, 273, 315, 9707, 3113, 1172, 67, 7329, 15700, 1012, 2218, 2135, 2187, 7103, 16278, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 70, 617, 16, 1800, 16, 4182, 2218, 31, 2265, 2710, 2218, 63, 2777, 65, 2187, 1172, 67, 7135, 273, 315, 9707, 3113, 1172, 67, 7329, 15700, 1012, 2218, 2135, 2187, 7103, 16278, ...
if m and not os.path.exists(filename + ".jpg"):
if os.path.exists(filename + ".jpg"): image = filename + ".jpg" elif m:
def str2XML(line): return unicode(string.replace(line, "&", "&amp;"), 'latin-1')
ed5381047bdc00d9339f2c81fb40da3eb8fe698a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/ed5381047bdc00d9339f2c81fb40da3eb8fe698a/imdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 22, 4201, 12, 1369, 4672, 327, 5252, 12, 1080, 18, 2079, 12, 1369, 16, 7830, 3113, 7830, 931, 4868, 3631, 296, 26578, 17, 21, 6134, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 22, 4201, 12, 1369, 4672, 327, 5252, 12, 1080, 18, 2079, 12, 1369, 16, 7830, 3113, 7830, 931, 4868, 3631, 296, 26578, 17, 21, 6134, 282, 2, -100, -100, -100, -100, -100, -100, -10...
if self.force or output_file is None or newer(source, output_file)):
if self.force or output_file is None or newer(source, output_file):
def preprocess (self, source, output_file=None, macros=None, include_dirs=None, extra_preargs=None, extra_postargs=None):
63a47402b354e76255d4a629ee3e1950d843af25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63a47402b354e76255d4a629ee3e1950d843af25/unixccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17942, 261, 2890, 16, 1084, 16, 876, 67, 768, 33, 7036, 16, 24302, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 2870, 67, 1484, 1968, 33, 7036, 16, 2870, 67, 2767, 1968, 33, 7036, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17942, 261, 2890, 16, 1084, 16, 876, 67, 768, 33, 7036, 16, 24302, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 2870, 67, 1484, 1968, 33, 7036, 16, 2870, 67, 2767, 1968, 33, 7036, 467...
for pat in patterns:
for pat in string.split(patterns):
def get_files(patterns): patterns = string.replace(patterns, '{platform}', get_platform()) patterns = string.split(string.strip(patterns)) files = [ ] for pat in patterns: files.extend(glob.glob(pat)) return files
125666d12bf070a1454f737b429ae5b2aca0f0d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7752/125666d12bf070a1454f737b429ae5b2aca0f0d3/gen-build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2354, 12, 13317, 4672, 6884, 273, 533, 18, 2079, 12, 13317, 16, 2292, 9898, 24259, 336, 67, 9898, 10756, 6884, 273, 533, 18, 4939, 12, 1080, 18, 6406, 12, 13317, 3719, 1390, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2354, 12, 13317, 4672, 6884, 273, 533, 18, 2079, 12, 13317, 16, 2292, 9898, 24259, 336, 67, 9898, 10756, 6884, 273, 533, 18, 4939, 12, 1080, 18, 6406, 12, 13317, 3719, 1390, 2...
m = re.search(r'raw/v(\d+)-f(\w)/E00(\d)/R(\d)(\d)/S(\d)(\d)/' +
m = re.search(r'v(\d+)-f(\w)/E00(\d)/R(\d)(\d)/S(\d)(\d)/' +
def processRaft(raftDir, conn, done, qsp): nProcessed = 0 nSkipped = 0 nUnrecognized = 0 for fits in glob.glob(os.path.join(raftDir, "S[0-2][0-2]", "imsim_*_R[0-4][0-4]_S[0-2][0-2]_C[01][0-7]_E00[01].fits*")): m = re.search(r'raw/v(\d+)-f(\w)/E00(\d)/R(\d)(\d)/S(\d)(\d)/' + r'imsim_\1_R\4\5_S\6\7_C(\d)(\d)_E00\3\.fits', fits) if not m: print >>sys.stderr, "Warning: Unrecognized file:", fits nUnrecognized += 1 continue (visit, filter, snap, raft1, raft2, sensor1, sensor2, channel1, channel2) = m.groups() key = "%s_F%s_E%s_R%s,%s_S%s,%s_C%s,%s" % (visit, filter, snap, raft1, raft2, sensor1, sensor2, channel1, channel2) if done.has_key(key): nSkipped += 1 continue md = afwImage.readMetadata(fits) expTime = md.get("EXPTIME") mjdObs = md.get("MJD-OBS") taiObs = dafBase.DateTime(mjdObs, dafBase.DateTime.MJD, dafBase.DateTime.TAI).toString()[:-1] conn.execute("""INSERT INTO raw VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?)""", (visit, filter, snap, "%s,%s" % (raft1, raft2), "%s,%s" % (sensor1, sensor2), "%s,%s" % (channel1, channel2), taiObs, expTime)) for row in conn.execute("SELECT last_insert_rowid()"): id = row[0] break wcs = afwImage.makeWcs(md) poly = skypix.imageToPolygon(wcs, md.get("NAXIS1"), md.get("NAXIS2"), padRad=0.000075) # about 15 arcsec pix = qsp.intersect(poly) for skyTileId in pix: conn.execute("INSERT INTO raw_skyTile VALUES(?, ?)", (id, skyTileId)) conn.commit() nProcessed += 1 print >>sys.stderr, raftDir, \ "... %d processed, %d skipped, %d unrecognized" % \ (nProcessed, nSkipped, nUnrecognized)
34fa1ea168ea9804ea043ec2fabf331b8bc024da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6517/34fa1ea168ea9804ea043ec2fabf331b8bc024da/genInputRegistry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12649, 1222, 12, 5015, 1621, 16, 1487, 16, 2731, 16, 1043, 1752, 4672, 290, 13533, 273, 374, 290, 16425, 273, 374, 290, 19648, 273, 374, 364, 13351, 316, 4715, 18, 10581, 12, 538, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12649, 1222, 12, 5015, 1621, 16, 1487, 16, 2731, 16, 1043, 1752, 4672, 290, 13533, 273, 374, 290, 16425, 273, 374, 290, 19648, 273, 374, 364, 13351, 316, 4715, 18, 10581, 12, 538, ...
self.close_request(request)
self.close_request()
def handle_request(self): """ Handle one request - serve current process to one connection.
4d90521ab68a3828d0e01c6227b6157894f085f9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6224/4d90521ab68a3828d0e01c6227b6157894f085f9/telnetserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2293, 12, 2890, 4672, 3536, 5004, 1245, 590, 300, 12175, 783, 1207, 358, 1245, 1459, 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,...
[ 1, 1, 1, 1, 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, 1640, 67, 2293, 12, 2890, 4672, 3536, 5004, 1245, 590, 300, 12175, 783, 1207, 358, 1245, 1459, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Delivered as file "%s.%s" """ % (self._file_name, ext), before=0)
Delivered as file "%s.%s" """ % (__sfi, ext), before=0)
def __print_header(self, ext, pfi=None): """Print boiler plate.""" if pfi: __pfi = pfi else: __pfi = self._get_pfi(ext) if __pfi: self.comment_block(u""" Refer to this file by the following public identifier or an appropriate system identifier
c035bc5c4eac221a41a6650a381a3fe8b7d5e2be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12411/c035bc5c4eac221a41a6650a381a3fe8b7d5e2be/generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1188, 67, 3374, 12, 2890, 16, 1110, 16, 10811, 77, 33, 7036, 4672, 3536, 5108, 800, 2895, 21972, 12123, 309, 10811, 77, 30, 1001, 14241, 77, 273, 10811, 77, 469, 30, 1001, 14241, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1188, 67, 3374, 12, 2890, 16, 1110, 16, 10811, 77, 33, 7036, 4672, 3536, 5108, 800, 2895, 21972, 12123, 309, 10811, 77, 30, 1001, 14241, 77, 273, 10811, 77, 469, 30, 1001, 14241, ...
('file://nonsensename/etc/passwd', None, (OSError, socket.error))
('file://nonsensename/etc/passwd', None, (EnvironmentError, socket.error))
def test_file(self): TESTFN = test_support.TESTFN f = open(TESTFN, 'w') try: f.write('hi there\n') f.close() urls = [ 'file:'+sanepathname2url(os.path.abspath(TESTFN)),
36d07076522668da30a178d44c59e0d07aed6ed5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/36d07076522668da30a178d44c59e0d07aed6ed5/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 768, 12, 2890, 4672, 22130, 19793, 273, 1842, 67, 13261, 18, 16961, 19793, 284, 273, 1696, 12, 16961, 19793, 16, 296, 91, 6134, 775, 30, 284, 18, 2626, 2668, 12266, 1915, 64, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 768, 12, 2890, 4672, 22130, 19793, 273, 1842, 67, 13261, 18, 16961, 19793, 284, 273, 1696, 12, 16961, 19793, 16, 296, 91, 6134, 775, 30, 284, 18, 2626, 2668, 12266, 1915, 64, ...
return self.quat.unrot(V(0,0,1))
return self.quat.unrot(V(0, 0, 1))
def __getattr__(self, name): # in class ThumbView if name == 'lineOfSight': return self.quat.unrot(V(0,0,-1)) elif name == 'right': return self.quat.unrot(V(1,0,0)) elif name == 'left': return self.quat.unrot(V(-1,0,0)) elif name == 'up': return self.quat.unrot(V(0,1,0)) elif name == 'down': return self.quat.unrot(V(0,-1,0)) elif name == 'out': return self.quat.unrot(V(0,0,1)) else: raise AttributeError, 'ThumbView has no "%s"' % name #bruce 060209 revised text
7828cbef13f84d50298938f6ae339289db2ec006 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/7828cbef13f84d50298938f6ae339289db2ec006/ThumbView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 468, 316, 667, 935, 3592, 1767, 309, 508, 422, 296, 1369, 951, 55, 750, 4278, 327, 365, 18, 372, 270, 18, 318, 8342, 12, 58, 12, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 468, 316, 667, 935, 3592, 1767, 309, 508, 422, 296, 1369, 951, 55, 750, 4278, 327, 365, 18, 372, 270, 18, 318, 8342, 12, 58, 12, 20, ...
config.set_hd_protection(self.protect.get_active())
config.set_floppy_protection(self.protect.get_active())
def run(self, config): "run(config), show disk image dialog" if not self.dialog: self._create_dialog(config) response = self.dialog.run() self.dialog.hide() if response == gtk.RESPONSE_APPLY: config.lock_updates() for drive in range(2): config.set_floppy(drive, self.floppy[drive].get_filename()) config.set_hd_protection(self.protect.get_active()) config.set_slowfdc(self.slowfdc.get_active()) config.flush_updates()
7128f69d3d6090a587ac2c8b63867cdc44d52d63 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2811/7128f69d3d6090a587ac2c8b63867cdc44d52d63/dialogs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 642, 4672, 315, 2681, 12, 1425, 3631, 2405, 4234, 1316, 6176, 6, 309, 486, 365, 18, 12730, 30, 365, 6315, 2640, 67, 12730, 12, 1425, 13, 766, 273, 365, 18, 12730, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 642, 4672, 315, 2681, 12, 1425, 3631, 2405, 4234, 1316, 6176, 6, 309, 486, 365, 18, 12730, 30, 365, 6315, 2640, 67, 12730, 12, 1425, 13, 766, 273, 365, 18, 12730, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 406) else quickfix.DoubleField.__init__(self, 406, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1059, 7677, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1059, 7677, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
r""" Computes the action of Frobenius on dx/y and on x dx/y, using a series expansion. (This function computes the same thing as frobenius_expansion_by_newton(), using a different method. Theoretically the Newton method should be asymptotically faster, when the precision gets large. However, in practice, this functions seems to be marginally faster for moderate precision, so I'm keeping it here until I figure out exactly why it's faster.) (This function does *not* yet use the cohomology relations -- that happens afterwards in the "reduction" step.) More specifically, it finds F0 and F1 in the quotient ring $R[x, T]/(T - Q(x))$, such that $F( dx/y) = T^{-r} F0 dx/y$, and $F(x dx/y) = T^{-r} F1 dx/y$ where $r = ( (2M-3)p - 1 )/2$. (Here T is $y^2 = z^{-2}$, and R is the coefficient ring of Q.) $F_0$ and $F_1$ are computed in the SpecialCubicQuotientRing associated to $Q$, so all powers of $x^j$ for $j \geq 3$ are reduced to powers of $T$. It uses the sum $$ F0 = \sum_{k=0}^{M-2} {-1/2 \choose k} p x^{p-1} E^k T^{(M-2-k)p}$$ and $$ F1 = x^p F0,$$ where $E = Q(x^p) - Q(x)^p$. INPUT: Q -- cubic polynomial of the form $Q(x) = x^3 + ax + b$, whose coefficient ring is a $\Z/(p^M)\Z$-algebra p -- residue characteristic of the p-adic field M -- p-adic precision of the coefficient ring (this will be used to determine the number of terms in the series) OUTPUT: F0, F1 -- elements of SpecialCubicQuotientRing(Q), as described above r -- non-negative integer, as described above """ S = SpecialCubicQuotientRing(Q) x, _ = S.gens() base_ring = S.base_ring() x_to_p_less_1 = x**(p-1) x_to_p = x_to_p_less_1 * x x_to_p_squared = x_to_p * x_to_p x_to_p_cubed = x_to_p_squared * x_to_p frobQ = x_to_p_cubed + Q[1]*x_to_p + Q[0]*S(1)
r""" Computes the action of Frobenius on dx/y and on x dx/y, using a series expansion. (This function computes the same thing as frobenius_expansion_by_newton(), using a different method. Theoretically the Newton method should be asymptotically faster, when the precision gets large. However, in practice, this functions seems to be marginally faster for moderate precision, so I'm keeping it here until I figure out exactly why it's faster.) (This function does *not* yet use the cohomology relations -- that happens afterwards in the "reduction" step.) More specifically, it finds F0 and F1 in the quotient ring $R[x, T]/(T - Q(x))$, such that $F( dx/y) = T^{-r} F0 dx/y$, and $F(x dx/y) = T^{-r} F1 dx/y$ where $r = ( (2M-3)p - 1 )/2$. (Here T is $y^2 = z^{-2}$, and R is the coefficient ring of Q.) $F_0$ and $F_1$ are computed in the SpecialCubicQuotientRing associated to $Q$, so all powers of $x^j$ for $j \geq 3$ are reduced to powers of $T$. It uses the sum $$ F0 = \sum_{k=0}^{M-2} {-1/2 \choose k} p x^{p-1} E^k T^{(M-2-k)p}$$ and $$ F1 = x^p F0,$$ where $E = Q(x^p) - Q(x)^p$. INPUT: Q -- cubic polynomial of the form $Q(x) = x^3 + ax + b$, whose coefficient ring is a $\Z/(p^M)\Z$-algebra p -- residue characteristic of the p-adic field M -- p-adic precision of the coefficient ring (this will be used to determine the number of terms in the series) OUTPUT: F0, F1 -- elements of SpecialCubicQuotientRing(Q), as described above r -- non-negative integer, as described above """ S = SpecialCubicQuotientRing(Q) x, _ = S.gens() base_ring = S.base_ring() x_to_p_less_1 = x**(p-1) x_to_p = x_to_p_less_1 * x x_to_p_squared = x_to_p * x_to_p x_to_p_cubed = x_to_p_squared * x_to_p frobQ = x_to_p_cubed + Q[1]*x_to_p + Q[0]*S(1)
def frobenius_expansion_by_series(Q, p, M): r""" Computes the action of Frobenius on dx/y and on x dx/y, using a series expansion. (This function computes the same thing as frobenius_expansion_by_newton(), using a different method. Theoretically the Newton method should be asymptotically faster, when the precision gets large. However, in practice, this functions seems to be marginally faster for moderate precision, so I'm keeping it here until I figure out exactly why it's faster.) (This function does *not* yet use the cohomology relations -- that happens afterwards in the "reduction" step.) More specifically, it finds F0 and F1 in the quotient ring $R[x, T]/(T - Q(x))$, such that $F( dx/y) = T^{-r} F0 dx/y$, and $F(x dx/y) = T^{-r} F1 dx/y$ where $r = ( (2M-3)p - 1 )/2$. (Here T is $y^2 = z^{-2}$, and R is the coefficient ring of Q.) $F_0$ and $F_1$ are computed in the SpecialCubicQuotientRing associated to $Q$, so all powers of $x^j$ for $j \geq 3$ are reduced to powers of $T$. It uses the sum $$ F0 = \sum_{k=0}^{M-2} {-1/2 \choose k} p x^{p-1} E^k T^{(M-2-k)p}$$ and $$ F1 = x^p F0,$$ where $E = Q(x^p) - Q(x)^p$. INPUT: Q -- cubic polynomial of the form $Q(x) = x^3 + ax + b$, whose coefficient ring is a $\Z/(p^M)\Z$-algebra p -- residue characteristic of the p-adic field M -- p-adic precision of the coefficient ring (this will be used to determine the number of terms in the series) OUTPUT: F0, F1 -- elements of SpecialCubicQuotientRing(Q), as described above r -- non-negative integer, as described above """ S = SpecialCubicQuotientRing(Q) x, _ = S.gens() base_ring = S.base_ring() x_to_p_less_1 = x**(p-1) x_to_p = x_to_p_less_1 * x # compute frobQ = Q(x^p) x_to_p_squared = x_to_p * x_to_p x_to_p_cubed = x_to_p_squared * x_to_p frobQ = x_to_p_cubed + Q[1]*x_to_p + Q[0]*S(1) # anticipating the day when p = 3 is supported: # frobQ = x_to_p_cubed + Q[2]*x_to_p_squared + Q[1]*x_to_p + Q[0]*S(1) E = frobQ - S(1).shift(p) # E = Q(x^p) - Q(x)^p offset = int( ((2*M-3)*p-1)/2 ) term = p * x_to_p_less_1 F0 = term.shift((M-2)*p) # todo: Possible speedup idea, perhaps by a factor of 2, but # it requires a lot of work: # Note that p divides E, so p^k divides E^k. So when we are # working with high powers of E, we're doing a lot more work # in the multiplications than we need to. To take advantage of # this we would need some protocol for "lowering the precision" # of a SpecialCubicQuotientRing. This would be quite messy to # do properly over an arbitrary base ring. Perhaps it is # feasible to do for the most common case (i.e. Z/p^nZ). # (but it probably won't save much time unless p^n is very # large, because the machine word size is probably pretty # big anyway.) for k in range(int(1), int(M-1)): term = term * E c = base_ring(binomial(-Integer(1)/2, k)) F0 += (term * c).shift((M-k-2)*p) return F0, F0 * x_to_p, offset
e8c5dfe629aabf0303b396e56733ea0c7032d92a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e8c5dfe629aabf0303b396e56733ea0c7032d92a/monsky_washnitzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 303, 19425, 8384, 67, 2749, 12162, 67, 1637, 67, 10222, 12, 53, 16, 293, 16, 490, 4672, 436, 8395, 14169, 281, 326, 1301, 434, 478, 303, 19425, 8384, 603, 6633, 19, 93, 471, 603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 303, 19425, 8384, 67, 2749, 12162, 67, 1637, 67, 10222, 12, 53, 16, 293, 16, 490, 4672, 436, 8395, 14169, 281, 326, 1301, 434, 478, 303, 19425, 8384, 603, 6633, 19, 93, 471, 603, ...
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field) kw['dbName'] = field
kw['name'] = str(soClass.sqlmeta.style.dbColumnToPythonAttr(field)) kw['dbName'] = str(field)
def columnsFromSchema(self, tableName, soClass): colData = self.queryAll(self.SHOW_COLUMNS % tableName) results = [] for field, size, t, precision, scale, nullAllowed, default, defaultText, is_identity in colData: # Seems strange to skip the pk column? What if it's not 'id'? if field == 'id': continue # precision is needed for decimal columns colClass, kw = self.guessClass(t, size, precision, scale) kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field) kw['dbName'] = field kw['notNone'] = not nullAllowed if (defaultText): # Strip ( and ) defaultText = defaultText[1:-1] if defaultText[0] == "'": defaultText = defaultText[1:-1] else: if t == "int" : defaultText = int(defaultText) if t == "float" : defaultText = float(defaultText) if t == "numeric": defaultText = float(defaultText) # TODO need to access the "column" to_python method here--but the object doesn't exists yet
15733b3852b656063968bc41f4d786b1c95605f1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8798/15733b3852b656063968bc41f4d786b1c95605f1/mssqlconnection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2168, 1265, 3078, 12, 2890, 16, 4775, 16, 1427, 797, 4672, 645, 751, 273, 365, 18, 2271, 1595, 12, 2890, 18, 16677, 67, 25936, 738, 4775, 13, 1686, 273, 5378, 364, 652, 16, 963, 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, 2168, 1265, 3078, 12, 2890, 16, 4775, 16, 1427, 797, 4672, 645, 751, 273, 365, 18, 2271, 1595, 12, 2890, 18, 16677, 67, 25936, 738, 4775, 13, 1686, 273, 5378, 364, 652, 16, 963, 16, ...
exec("""\ def test(x): class Foo: global x def __call__(self, y): return x + y return Foo() x = 0 self.assertEqual(test(6)(2), 8) x = -1 self.assertEqual(test(3)(2), 5) looked_up_by_load_name = False class X: locals()['looked_up_by_load_name'] = True passed = looked_up_by_load_name self.assertTrue(X.passed) """)
exec("""if 1: def test(x): class Foo: global x def __call__(self, y): return x + y return Foo() x = 0 self.assertEqual(test(6)(2), 8) x = -1 self.assertEqual(test(3)(2), 5) looked_up_by_load_name = False class X: locals()['looked_up_by_load_name'] = True passed = looked_up_by_load_name self.assertTrue(X.passed) """)
def testClassAndGlobal(self):
dfa9b294fac33934547b5f7b7542466c469e6599 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/dfa9b294fac33934547b5f7b7542466c469e6599/test_scope.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 797, 1876, 5160, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 797, 1876, 5160, 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, -1...
if putlock is not None: try: putlock.release() except ValueError: pass
def on_state_change(task): state, args = task try: state_handlers[state](*args) except KeyError: debug("Unknown job state: %s (args=%s)" % (state, args))
e379e13b898bb19aad7b3c56e051b9308c751c1d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/e379e13b898bb19aad7b3c56e051b9308c751c1d/pool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 2019, 67, 3427, 12, 4146, 4672, 919, 16, 833, 273, 1562, 775, 30, 919, 67, 11046, 63, 2019, 29955, 14, 1968, 13, 1335, 4999, 30, 1198, 2932, 4874, 1719, 919, 30, 738, 87, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 2019, 67, 3427, 12, 4146, 4672, 919, 16, 833, 273, 1562, 775, 30, 919, 67, 11046, 63, 2019, 29955, 14, 1968, 13, 1335, 4999, 30, 1198, 2932, 4874, 1719, 919, 30, 738, 87, 26...
r""" Triangle of coefficients of Chebyshev's $S(n,x)$: $U(n, \frac x 2)$ polynomials (exponents in increasing order). INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A049310;a Triangle of coefficients of Chebyshev's S(n,x) := U(n,x/2) polynomials (exponents in increasing order). sage: a(0) 1 sage: a(1) 0 sage: a(13) 0 sage: a.list(15) [1, 0, 1, -1, 0, 1, 0, -2, 0, 1, 1, 0, -3, 0, 1] sage: a(200) 0 sage: a.keyword ['sign', 'tabl', 'nice', 'easy', 'core', 'triangle'] AUTHOR: -- Jaap Spies (2007-01-31) """ def __init__(self):
def __init__(self): r""" Triangle of coefficients of Chebyshev's $S(n,x)$: $U(n, \frac x 2)$ polynomials (exponents in increasing order). INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A049310;a Triangle of coefficients of Chebyshev's S(n,x) := U(n,x/2) polynomials (exponents in increasing order). sage: a(0) 1 sage: a(1) 0 sage: a(13) 0 sage: a.list(15) [1, 0, 1, -1, 0, 1, 0, -2, 0, 1, 1, 0, -3, 0, 1] sage: a(200) 0 sage: a.keyword ['sign', 'tabl', 'nice', 'easy', 'core', 'triangle'] AUTHOR: -- Jaap Spies (2007-01-31) """
def _eval(self, n): m = 0 while m*(m+1)//2 < n: m += 1 k = n - m*(m-1)//2 return self.s2(m, k) # combinat.stirling_number2(m,k)
d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 312, 273, 374, 1323, 312, 21556, 81, 15, 21, 13, 759, 22, 411, 290, 30, 312, 1011, 404, 417, 273, 290, 300, 312, 21556, 81, 17, 21, 13, 759, 22,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 312, 273, 374, 1323, 312, 21556, 81, 15, 21, 13, 759, 22, 411, 290, 30, 312, 1011, 404, 417, 273, 290, 300, 312, 21556, 81, 17, 21, 13, 759, 22,...
import sys sys.stderr.write(repr(fosterParent))
def insertMisnestedNodeFromTable(self, element): #The foster parent element is the one which comes before the most #recently opened table element #XXX - this is really inelegant lastTable=None for elm in self.openElements[::-1]: if elm.name == u"table": lastTable = elm break if lastTable: #XXX - we should really check that this parent is actually a #node here if lastTable.parent: fosterParent = lastTable.parent fosterParent.insertBefore(element, lastTable) else: fosterParent = self.openElements[ self.openElements.index(lastTable) - 1] fosterParent.appendChild(element) else: assert self.innerHTML fosterParent = self.openElements[0] fosterParent.appendChild(element) import sys sys.stderr.write(repr(fosterParent))
aacc12b00f954427258e22b84b7307967c6af137 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10463/aacc12b00f954427258e22b84b7307967c6af137/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 11729, 12985, 907, 1265, 1388, 12, 2890, 16, 930, 4672, 468, 1986, 284, 29811, 982, 930, 353, 326, 1245, 1492, 14535, 1865, 326, 4486, 468, 20872, 715, 10191, 1014, 930, 468, 15639, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 11729, 12985, 907, 1265, 1388, 12, 2890, 16, 930, 4672, 468, 1986, 284, 29811, 982, 930, 353, 326, 1245, 1492, 14535, 1865, 326, 4486, 468, 20872, 715, 10191, 1014, 930, 468, 15639, ...
def testSimpleParse(self): ptree = loman.LocalManifest() ptree.Parse()
class LocalManifest: """Class which provides an abstraction for manipulating the local manifest."""
def testSimpleParse(self): ptree = loman.LocalManifest() ptree.Parse()
865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5784, 3201, 12, 2890, 4672, 293, 3413, 273, 328, 362, 304, 18, 2042, 9121, 1435, 293, 3413, 18, 3201, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5784, 3201, 12, 2890, 4672, 293, 3413, 273, 328, 362, 304, 18, 2042, 9121, 1435, 293, 3413, 18, 3201, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
grid_method = 1,
grid_method = 2,
def exercize_1(sg, atoms, molvol): params = mmtbx.masks.mask_master_params.extract() params.ignore_hydrogens = False params.ignore_zero_occupancy_atoms = False # params.shrink_truncation_radius = 0.0 # params.solvent_radius = 0.0 group = space_group_info(sg) group.show_summary() struc = random_structure.xray_structure( space_group_info = group, # unit_cell = (14.6, 26.1, 29.2, 90, 90, 90), volume_per_atom = molvol, general_positions_only = True, elements = atoms ) struc.show_summary() fc = struc.structure_factors(d_min = 2.10145471291).f_calc() struc_p1 = struc.expand_to_p1() fc_p1 = struc_p1.structure_factors(d_min = 2.10145471291).f_calc() asu_mask = masks.atom_mask( unit_cell = struc.unit_cell(), group = struc.space_group(), resolution = fc.d_min(), grid_method = 1, grid_step_factor = params.grid_step_factor, solvent_radius = params.solvent_radius, shrink_truncation_radius = params.shrink_truncation_radius ) grid = asu_mask.data.focus() print "asu mask grid = ", grid blk_p1 = masks.bulk_solvent( xray_structure = struc_p1, gridding_n_real = grid, ignore_zero_occupancy_atoms = params.ignore_zero_occupancy_atoms, ignore_hydrogen_atoms = params.ignore_hydrogens, solvent_radius = params.solvent_radius, shrink_truncation_radius = params.shrink_truncation_radius) blk_p1.show_summary() fm_p1 = blk_p1.structure_factors( miller_set = fc_p1 ) radii = get_radii(struc) assert len(radii) == len(struc.sites_frac()) asu_mask.compute( struc.sites_frac(), radii ) fm_asu = asu_mask.structure_factors( fc.indices() ) fm_asu = fc.set().array( data = fm_asu ) print " solvent content = ", asu_mask.contact_surface_fraction*100.0 k_asu = scale_factor( fm_asu, fm_p1 ) print "Asu-P1 Scale-factor = ", k_asu r1_asu = r1_factor( fm_asu, fm_p1 ) print "Asu-P1 R-factor = ", r1_asu r1_asu_k = r1_factor(fm_asu, fm_p1, scale=k_asu) print "Asu-P1 Scaled R-factor = ", r1_asu_k print len(asu_mask.data) print asu_mask.data.size() # assert r1_asu_k < 1.0E-6
9116caa5764d22a7165c5e94234898ffe6b8d647 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/9116caa5764d22a7165c5e94234898ffe6b8d647/tst_asu_mask.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 431, 12610, 554, 67, 21, 12, 1055, 16, 9006, 16, 12629, 15416, 4672, 859, 273, 312, 1010, 70, 92, 18, 29102, 18, 4455, 67, 7525, 67, 2010, 18, 8004, 1435, 859, 18, 6185, 67, 18112, 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, 431, 12610, 554, 67, 21, 12, 1055, 16, 9006, 16, 12629, 15416, 4672, 859, 273, 312, 1010, 70, 92, 18, 29102, 18, 4455, 67, 7525, 67, 2010, 18, 8004, 1435, 859, 18, 6185, 67, 18112, 9...
if key not in res: res[key] = 0
res.setdefault(key, 0.0)
def products_by_location(self, cursor, user, location_ids, product_ids=None, context=None):
1468149cd708351af5d58969c89575dcca27f337 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9298/1468149cd708351af5d58969c89575dcca27f337/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10406, 67, 1637, 67, 3562, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 2232, 16, 3017, 67, 2232, 33, 7036, 16, 819, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10406, 67, 1637, 67, 3562, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 2232, 16, 3017, 67, 2232, 33, 7036, 16, 819, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
class barrier: def __init__(self, n): self.n = n
def setUp(self): self.done_mutex = thread.allocate_lock() self.done_mutex.acquire() self.running_mutex = thread.allocate_lock() self.random_mutex = thread.allocate_lock() self.running = 0 self.next_ident = 0 class ThreadRunningTests(BasicThreadTest): def newtask(self): with self.running_mutex: self.next_ident += 1 verbose_print("creating task %s" % self.next_ident) thread.start_new_thread(self.task, (self.next_ident,)) self.running += 1 def task(self, ident): with self.random_mutex: delay = random.random() * NUMTASKS verbose_print("task %s will run for %s" % (ident, round(delay, 1))) time.sleep(delay) verbose_print("task %s done" % ident) with self.running_mutex: self.running -= 1 if self.running == 0: self.done_mutex.release() def test_starting_threads(self): for i in range(NUMTASKS): self.newtask() verbose_print("waiting for tasks to complete...") self.done_mutex.acquire() verbose_print("all tasks done") def test_stack_size(self): self.assertEquals(thread.stack_size(), 0, "intial stack size is not 0") thread.stack_size(0) self.assertEquals(thread.stack_size(), 0, "stack_size not reset to default") if os.name not in ("nt", "os2", "posix"): return tss_supported = True try: thread.stack_size(4096) except ValueError: verbose_print("caught expected ValueError setting " "stack_size(4096)") except thread.error: tss_supported = False verbose_print("platform does not support changing thread stack " "size") if tss_supported: fail_msg = "stack_size(%d) failed - should succeed" for tss in (262144, 0x100000, 0): thread.stack_size(tss) self.assertEquals(thread.stack_size(), tss, fail_msg % tss) verbose_print("successfully set stack_size(%d)" % tss) for tss in (262144, 0x100000): verbose_print("trying stack_size = (%d)" % tss) self.next_ident = 0 for i in range(NUMTASKS): self.newtask() verbose_print("waiting for all tasks to complete") self.done_mutex.acquire() verbose_print("all tasks done") thread.stack_size(0) class Barrier: def __init__(self, num_threads): self.num_threads = num_threads
def newtask(): global next_ident, running mutex.acquire() next_ident = next_ident + 1 if verbose: print 'creating task', next_ident thread.start_new_thread(task, (next_ident,)) running = running + 1 mutex.release()
12c238c50046dc378380207f15830cf4af619e32 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/12c238c50046dc378380207f15830cf4af619e32/test_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 4146, 13332, 2552, 1024, 67, 6392, 16, 3549, 9020, 18, 1077, 1039, 1435, 1024, 67, 6392, 273, 1024, 67, 6392, 397, 404, 309, 3988, 30, 1172, 296, 23799, 1562, 2187, 1024, 67, 6392, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 4146, 13332, 2552, 1024, 67, 6392, 16, 3549, 9020, 18, 1077, 1039, 1435, 1024, 67, 6392, 273, 1024, 67, 6392, 397, 404, 309, 3988, 30, 1172, 296, 23799, 1562, 2187, 1024, 67, 6392, ...
push(name) need_blank_after_doc = 0 doc = getdoc(value) or '' if doc: push(self.indent(doc)) need_blank_after_doc = 1 for attr, tag in [('fget', '<get>'), ('fset', '<set>'), ('fdel', '<delete>')]: func = getattr(value, attr) if func is not None: if need_blank_after_doc: push('') need_blank_after_doc = 0 base = self.document(func, tag, mod) push(self.indent(base))
push(self._docproperty(name, value, mod))
def spillproperties(msg, attrs, predicate): ok, attrs = _split_list(attrs, predicate) if ok: hr.maybe() push(msg) for name, kind, homecls, value in ok: push(name) need_blank_after_doc = 0 doc = getdoc(value) or '' if doc: push(self.indent(doc)) need_blank_after_doc = 1 for attr, tag in [('fget', '<get>'), ('fset', '<set>'), ('fdel', '<delete>')]: func = getattr(value, attr) if func is not None: if need_blank_after_doc: push('') need_blank_after_doc = 0 base = self.document(func, tag, mod) push(self.indent(base)) return attrs
8de645a1760b953118eebbd9869f696509c74920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8de645a1760b953118eebbd9869f696509c74920/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1694, 737, 4738, 12, 3576, 16, 3422, 16, 5641, 4672, 1529, 16, 3422, 273, 389, 4939, 67, 1098, 12, 7039, 16, 5641, 13, 309, 1529, 30, 15407, 18, 19133, 1435, 1817, 12, 3576, 13, 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, 1694, 737, 4738, 12, 3576, 16, 3422, 16, 5641, 4672, 1529, 16, 3422, 273, 389, 4939, 67, 1098, 12, 7039, 16, 5641, 13, 309, 1529, 30, 15407, 18, 19133, 1435, 1817, 12, 3576, 13, 364, ...
def __init__(self):
def __init__(self, verbose=0): self.verbose = verbose
def __init__(self): self.reset()
7730dc247c544d285d1928376852c14388e8b7c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7730dc247c544d285d1928376852c14388e8b7c9/sgmllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3988, 33, 20, 4672, 365, 18, 11369, 273, 3988, 365, 18, 6208, 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, 1001, 2738, 972, 12, 2890, 16, 3988, 33, 20, 4672, 365, 18, 11369, 273, 3988, 365, 18, 6208, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
s = Stuck() s.start()
def stop(self): print "I was asked to stop..."
18aae62da6fb3c80084ef6ad89470399e62fcb8e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/18aae62da6fb3c80084ef6ad89470399e62fcb8e/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 1172, 315, 45, 1703, 19279, 358, 2132, 7070, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 1172, 315, 45, 1703, 19279, 358, 2132, 7070, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
print nexus_id
if debug: print nexus_id
def __calc_azi(xi, yi): return math.atan2(yi, xi)
5dda94f6f020457616aeb9c18c84293aeaff5080 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/762/5dda94f6f020457616aeb9c18c84293aeaff5080/calc_dgs_params.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12448, 67, 1561, 77, 12, 27005, 16, 16805, 4672, 327, 4233, 18, 270, 304, 22, 12, 93, 77, 16, 14087, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12448, 67, 1561, 77, 12, 27005, 16, 16805, 4672, 327, 4233, 18, 270, 304, 22, 12, 93, 77, 16, 14087, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if _chk_repomd(repomd):
if self._checkRepoXMLMetalink(repoXML, repomd):
def _chk_repomd(repomd): verbose_logger.log(logginglevels.DEBUG_4, "checking repomd %d> %d", repoXML.timestamp, repomd.timestamp) if repoXML.timestamp != repomd.timestamp: return False if repoXML.length != repomd.size: return False
d0f1a05256fe16a5caae2b4f3fa9ca09fa28cb60 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/d0f1a05256fe16a5caae2b4f3fa9ca09fa28cb60/yumRepo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 27038, 67, 14462, 362, 72, 12, 14462, 362, 72, 4672, 3988, 67, 4901, 18, 1330, 12, 1330, 75, 1714, 941, 87, 18, 9394, 67, 24, 16, 315, 24609, 2071, 362, 72, 738, 72, 34, 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, 389, 27038, 67, 14462, 362, 72, 12, 14462, 362, 72, 4672, 3988, 67, 4901, 18, 1330, 12, 1330, 75, 1714, 941, 87, 18, 9394, 67, 24, 16, 315, 24609, 2071, 362, 72, 738, 72, 34, 738, ...
glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader)
glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader, CGC)
def main(cg_shader): matrixloadorder = get_matrixloadorder(cg_shader) glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader) print log print fix_glsl(glsl_vertex) print print '// #o3d SplitMarker' print get_matrixloadorder(cg_shader).strip() print print fix_glsl(glsl_fragment)
4c987da0e89b88a1487fc22cae1a294f604e8d10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4c987da0e89b88a1487fc22cae1a294f604e8d10/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 26275, 67, 674, 1143, 4672, 3148, 945, 1019, 273, 336, 67, 5667, 945, 1019, 12, 26275, 67, 674, 1143, 13, 5118, 2069, 67, 15281, 16, 5118, 2069, 67, 11956, 16, 613, 273, 1494...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26275, 67, 674, 1143, 4672, 3148, 945, 1019, 273, 336, 67, 5667, 945, 1019, 12, 26275, 67, 674, 1143, 13, 5118, 2069, 67, 15281, 16, 5118, 2069, 67, 11956, 16, 613, 273, 1494...
self.selenium.click('//input[@value="Go"]')
self.selenium.click('//input[@value="Search"]')
def check_result(user): "Check if the user is alone in the result list" #Also check if the the results are right assert self.selenium.get_text(\ '//div[@class="datatable"]/table/tbody/tr[last()]/td[2]') ==\ user
061149c0cfaeafc563ea7bb09c9adbf701d497b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/061149c0cfaeafc563ea7bb09c9adbf701d497b2/test_user_management.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2088, 12, 1355, 4672, 315, 1564, 309, 326, 729, 353, 24068, 316, 326, 563, 666, 6, 468, 1067, 2048, 866, 309, 326, 326, 1686, 854, 2145, 1815, 365, 18, 1786, 17327, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2088, 12, 1355, 4672, 315, 1564, 309, 326, 729, 353, 24068, 316, 326, 563, 666, 6, 468, 1067, 2048, 866, 309, 326, 326, 1686, 854, 2145, 1815, 365, 18, 1786, 17327, 18, 588, ...
if error_checker: f.errcheck = error_checker(func_name)
f._lcpy_rettype = rettype f._lcpy_protos = protos f.__name__ = func_name if isinstance(rettype, _ret): checker = rettype.checker() if checker: f.errcheck = checker(func_name) if debug: f = _DebugWrapper(f) f.__name__ = func_name
def _create_func( func_name, error_checker, *args
252469d959d952d07c6c2b796be96c97a8628abc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3138/252469d959d952d07c6c2b796be96c97a8628abc/libconcord.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 644, 12, 1326, 67, 529, 16, 555, 67, 19243, 16, 380, 1968, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2640, 67, 644, 12, 1326, 67, 529, 16, 555, 67, 19243, 16, 380, 1968, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'state' : fields.selection(method=True, selection=[
'state' : fields.function(_state_get, method=True, type='selection', selection=[
def get_campaign_purchase_line_ids(self , cr, uid, ids, context): result = {}
ecda65319f06924bc5fc56d01a0416eb376069f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/ecda65319f06924bc5fc56d01a0416eb376069f2/dm_purchase_advanced.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14608, 67, 12688, 12104, 67, 1369, 67, 2232, 12, 2890, 269, 4422, 16, 4555, 16, 3258, 16, 819, 4672, 563, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14608, 67, 12688, 12104, 67, 1369, 67, 2232, 12, 2890, 269, 4422, 16, 4555, 16, 3258, 16, 819, 4672, 563, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
ftc = os.path.join(mssdk, self.sanity_check_file)
ftc = os.path.join(install_dir, self.sanity_check_file)
def find_install_dir(self): """Try to find the MS SDK from the registry.
651342c0d69a06f19d7db9560ff8c8219611257f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12817/651342c0d69a06f19d7db9560ff8c8219611257f/sdk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 5425, 67, 1214, 12, 2890, 4672, 3536, 7833, 358, 1104, 326, 9238, 3881, 628, 326, 4023, 18, 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, 1104, 67, 5425, 67, 1214, 12, 2890, 4672, 3536, 7833, 358, 1104, 326, 9238, 3881, 628, 326, 4023, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
parent = readmodule_ex(package, path, inpackage)
parent = _readmodule(package, path, inpackage)
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in which we are searching for a submodule, and then PATH must be the package search path; otherwise, we are searching for a top-level module, and PATH is combined with sys.path. ''' # Compute the full module name (prepending inpackage if set) if inpackage: fullmodule = "%s.%s" % (inpackage, module) else: fullmodule = module # Check in the cache if fullmodule in _modules: return _modules[fullmodule] # Initialize the dict for this module's contents dict = {} # Check if it is a built-in module; we don't do much for these if module in sys.builtin_module_names and not inpackage: _modules[module] = dict return dict # Check for a dotted module name i = module.rfind('.') if i >= 0: package = module[:i] submodule = module[i+1:] parent = readmodule_ex(package, path, inpackage) if inpackage: package = "%s.%s" % (inpackage, package) return readmodule_ex(submodule, parent['__path__'], package) # Search the path for the module f = None if inpackage: f, file, (suff, mode, type) = imp.find_module(module, path) else: f, file, (suff, mode, type) = imp.find_module(module, path + sys.path) if type == imp.PKG_DIRECTORY: dict['__path__'] = [file] path = [file] + path f, file, (suff, mode, type) = imp.find_module('__init__', [file]) _modules[fullmodule] = dict if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() return dict classstack = [] # stack of (class, indent) pairs g = tokenize.generate_tokens(f.readline) try: for tokentype, token, start, end, line in g: if token == 'def': lineno, thisindent = start tokentype, meth_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] if classstack: # it's a class method cur_class = classstack[-1][0] cur_class._addmethod(meth_name, lineno) else: # it's a function dict[meth_name] = Function(module, meth_name, file, lineno) elif token == 'class': lineno, thisindent = start tokentype, class_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] # parse what follows the class name tokentype, token, start, end, line = g.next() inherit = None if token == '(': names = [] # List of superclasses # there's a list of superclasses level = 1 super = [] # Tokens making up current superclass while True: tokentype, token, start, end, line = g.next() if token in (')', ',') and level == 1: n = "".join(super) if n in dict: # we know this super class n = dict[n] else: c = n.split('.') if len(c) > 1: # super class is of the form # module.class: look in module for # class m = c[-2] c = c[-1] if m in _modules: d = _modules[m] if c in d: n = d[c] names.append(n) if token == '(': level += 1 elif token == ')': level -= 1 if level == 0: break elif token == ',' and level == 1: pass else: super.append(token) inherit = names cur_class = Class(module, class_name, inherit, file, lineno) dict[class_name] = cur_class classstack.append((cur_class, thisindent)) elif token == 'import' and start[1] == 0: modules = _getnamelist(g) for mod, mod2 in modules: try: # Recursively read the imported module if not inpackage: readmodule_ex(mod, path) else: try: readmodule_ex(mod, path, inpackage) except ImportError: readmodule_ex(mod) except: # If we can't find or parse the imported module, # too bad -- don't die here. pass elif token == 'from' and start[1] == 0: mod, token = _getname(g) if not mod or token != "import": continue names = _getnamelist(g) try: # Recursively read the imported module d = readmodule_ex(mod, path, inpackage) except: # If we can't find or parse the imported module, # too bad -- don't die here. continue # add any classes that were defined in the imported module # to our name space if they were mentioned in the list for n, n2 in names: if n in d: dict[n2 or n] = d[n] elif n == '*': # only add a name if not already there (to mimic # what Python does internally) also don't add # names that start with _ for n in d: if n[0] != '_' and not n in dict: dict[n] = d[n] except StopIteration: pass f.close() return dict
3c6f7106c003622e0bdcd67efc4fb02cbf09adc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3c6f7106c003622e0bdcd67efc4fb02cbf09adc8/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 67, 338, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 7036, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 67, 338, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 7036, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 25...
def _get_dict(self):
def __init__(self):
def _get_dict(self): self.figure = gcf() self.figure_dict = {} self.figure_dict["alpha"] = self.figure.get_alpha() self.figure_dict["animated"] = self.figure.get_animated() self.figure_dict["clip_on"] = self.figure.get_clip_on() self.figure_dict["dpi"] = self.figure.get_dpi() self.figure_dict["edgecolor"] = self.figure.get_edgecolor() self.figure_dict["facecolor"] = self.figure.get_facecolor() self.figure_dict["figheight"] = self.figure.get_figheight() self.figure_dict["figwidth"] = self.figure.get_figwidth() self.figure_dict["frameon"] = self.figure.get_frameon() self.figure_dict["label"] = self.figure.get_label() self.figure_dict["visible"] = self.figure.get_visible()
357313555cff3c846345f2c7219afb6ab5b21594 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13793/357313555cff3c846345f2c7219afb6ab5b21594/graphconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 19675, 273, 314, 8522, 1435, 225, 365, 18, 19675, 67, 1576, 273, 2618, 225, 365, 18, 19675, 67, 1576, 9614, 5429, 11929, 273, 365, 18, 19675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 19675, 273, 314, 8522, 1435, 225, 365, 18, 19675, 67, 1576, 273, 2618, 225, 365, 18, 19675, 67, 1576, 9614, 5429, 11929, 273, 365, 18, 19675, ...
''' Linearly expand population size from intiSize to endSize after burnin, split the population at generation split. ''' inc = (endSize-initSize)/float(end-burnin) def func(gen, oldSize=[]): if gen == bottleneckGen: if gen < split: return [bottleneckSize] else: return [bottleneckSize/numSubPop]*numSubPop if gen <= burnin: tot = initSize else: tot = initSize + inc*(gen-burnin) if gen < split: return [int(tot)] elif gen > end: return [int(endSize/numSubPop)]*numSubPop else: return [int(tot/numSubPop)]*numSubPop return func
''' Linearly expand population size from intiSize to endSize after burnin, split the population at generation split. ''' inc = (endSize-initSize)/float(end-burnin) def func(gen, oldSize=[]): if gen == bottleneckGen: if gen < split: return [bottleneckSize] else: return [bottleneckSize/numSubPop]*numSubPop if gen <= burnin: tot = initSize else: tot = initSize + inc*(gen-burnin) if gen < split: return [int(tot)] elif gen > end: return [int(endSize/numSubPop)]*numSubPop else: return [int(tot/numSubPop)]*numSubPop return func
def LinearExpansion(initSize, endSize, end, burnin=0, split=0, numSubPop=1, bottleneckGen=-1, bottleneckSize=0): ''' Linearly expand population size from intiSize to endSize after burnin, split the population at generation split. ''' inc = (endSize-initSize)/float(end-burnin) def func(gen, oldSize=[]): if gen == bottleneckGen: if gen < split: return [bottleneckSize] else: return [bottleneckSize/numSubPop]*numSubPop # not bottleneck if gen <= burnin: tot = initSize else: tot = initSize + inc*(gen-burnin) # if gen < split: return [int(tot)] elif gen > end: return [int(endSize/numSubPop)]*numSubPop else: return [int(tot/numSubPop)]*numSubPop return func
221d6e46bb102816794d97211e9ea83f19d74d6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/221d6e46bb102816794d97211e9ea83f19d74d6c/simuUtil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13921, 2966, 12162, 12, 2738, 1225, 16, 679, 1225, 16, 679, 16, 18305, 267, 33, 20, 16, 1416, 33, 20, 16, 818, 1676, 7049, 33, 21, 16, 2512, 28445, 7642, 29711, 21, 16, 2512, 28445, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13921, 2966, 12162, 12, 2738, 1225, 16, 679, 1225, 16, 679, 16, 18305, 267, 33, 20, 16, 1416, 33, 20, 16, 818, 1676, 7049, 33, 21, 16, 2512, 28445, 7642, 29711, 21, 16, 2512, 28445, ...
params = None
params = [] pfield = None
def handle_doc_fields(node, env): # don't traverse, only handle field lists that are immediate children for child in node.children: if not isinstance(child, nodes.field_list): continue params = None param_nodes = {} param_types = {} new_list = nodes.field_list() for field in child: fname, fbody = field try: typ, obj = fname.astext().split(None, 1) typdesc = _(doc_fields_with_arg[typ]) if _is_only_paragraph(fbody): children = fbody.children[0].children else: children = fbody.children if typdesc == '%param': if not params: pfield = nodes.field() pfield += nodes.field_name('', _('Parameters')) pfield += nodes.field_body() params = nodes.bullet_list() pfield[1] += params new_list += pfield dlitem = nodes.list_item() dlpar = nodes.paragraph() dlpar += nodes.emphasis(obj, obj) dlpar += nodes.Text(' -- ', ' -- ') dlpar += children param_nodes[obj] = dlpar dlitem += dlpar params += dlitem elif typdesc == '%type': typenodes = fbody.children if _is_only_paragraph(fbody): typenodes = [nodes.Text(' (')] + \ typenodes[0].children + [nodes.Text(')')] param_types[obj] = typenodes else: fieldname = typdesc + ' ' nfield = nodes.field() nfieldname = nodes.field_name(fieldname, fieldname) nfield += nfieldname node = nfieldname if typ in doc_fields_with_linked_arg: node = addnodes.pending_xref(obj, reftype='obj', refcaption=False, reftarget=obj, modname=env.currmodule, classname=env.currclass) nfieldname += node node += nodes.Text(obj, obj) nfield += nodes.field_body() nfield[1] += fbody.children new_list += nfield except (KeyError, ValueError): fnametext = fname.astext() try: typ = _(doc_fields_without_arg[fnametext]) except KeyError: # at least capitalize the field name typ = fnametext.capitalize() fname[0] = nodes.Text(typ) new_list += field for param, type in param_types.iteritems(): if param in param_nodes: param_nodes[param][1:1] = type child.replace_self(new_list)
e7862884c830df19db937b057ebdba1c4ab98a1f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7032/e7862884c830df19db937b057ebdba1c4ab98a1f/desc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2434, 67, 2821, 12, 2159, 16, 1550, 4672, 468, 2727, 1404, 10080, 16, 1338, 1640, 652, 6035, 716, 854, 14483, 2325, 364, 1151, 316, 756, 18, 5906, 30, 309, 486, 1549, 12, 362...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2434, 67, 2821, 12, 2159, 16, 1550, 4672, 468, 2727, 1404, 10080, 16, 1338, 1640, 652, 6035, 716, 854, 14483, 2325, 364, 1151, 316, 756, 18, 5906, 30, 309, 486, 1549, 12, 362...
print
# def clean(self):
e6ba971cc583fed890bee86e369f5ffdf369dc46 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12559/e6ba971cc583fed890bee86e369f5ffdf369dc46/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 3196, 202, 536, 2721, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 3196, 202, 536, 2721, 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...
if (os.path.normcase(name).endswith(os.path.normcase(mate_suffix))):
if (op.normcase(name).endswith(op.normcase(mate_suffix))):
def __init__(self, env, name, dist_path=None, mate_suffix="adaptbx"): self.env = env self.mate_suffix = mate_suffix mate_suffix = "_" + mate_suffix if (os.path.normcase(name).endswith(os.path.normcase(mate_suffix))): self.name = name[:-len(mate_suffix)] self.names = [self.name, name] if (dist_path is not None): self.dist_paths = [None, dist_path] else: self.name = name self.names = [name, name + mate_suffix] if (dist_path is not None): self.dist_paths = [dist_path, None]
621ff93ea6f104ac4c6d943d7e9d6c18b1468502 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/621ff93ea6f104ac4c6d943d7e9d6c18b1468502/env_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1550, 16, 508, 16, 2411, 67, 803, 33, 7036, 16, 312, 340, 67, 8477, 1546, 19195, 70, 92, 6, 4672, 365, 18, 3074, 273, 1550, 365, 18, 81, 340, 67, 847...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1550, 16, 508, 16, 2411, 67, 803, 33, 7036, 16, 312, 340, 67, 8477, 1546, 19195, 70, 92, 6, 4672, 365, 18, 3074, 273, 1550, 365, 18, 81, 340, 67, 847...
shutil.copy2('client-pygame/lib/osci/version.py', 'server/lib/ige/ospace/ClientVersion.py') shutil.copy2('client-pygame/lib/osci/versiondata.py', 'server/lib/ige/ospace/versiondata.py')
def compress(base, directory): filelist = os.listdir(directory) filelist.sort() for file in filelist: if file in ('checksum.files', 'checksum.global', 'var', 'files.html'): continue if base: filename = base + '/' + file else: filename = file absfilename = os.path.join(directory, file) if os.path.isfile(absfilename): print 'BZIP2', os.path.normcase(absfilename) os.system('updater\\bzip2.exe %s' % os.path.normcase(absfilename)) elif os.path.isdir(absfilename): compress(filename, os.path.join(directory, file)) else: raise 'Unknow file type %s' % file
81d61fd1ada84a2def37ff2438e9d32023e6c7f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10927/81d61fd1ada84a2def37ff2438e9d32023e6c7f8/deploy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8099, 12, 1969, 16, 1867, 4672, 26204, 273, 1140, 18, 1098, 1214, 12, 5149, 13, 26204, 18, 3804, 1435, 364, 585, 316, 26204, 30, 309, 585, 316, 7707, 15149, 18, 2354, 2187, 296, 15149, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8099, 12, 1969, 16, 1867, 4672, 26204, 273, 1140, 18, 1098, 1214, 12, 5149, 13, 26204, 18, 3804, 1435, 364, 585, 316, 26204, 30, 309, 585, 316, 7707, 15149, 18, 2354, 2187, 296, 15149, ...
if not (size / 2 < expected < size * 2):
if not (size / 2 < expected < size * 2) and size > 2**16:
def __try(self, fileobj, offset, real_size, check_second=True): # This is going to be one really long function; bear with it, # because there's not really a sane point to cut it up. fileobj.seek(offset, 0)
3273bbc40fe07fbefff5f4cdc7ccc952ee3a5187 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4764/3273bbc40fe07fbefff5f4cdc7ccc952ee3a5187/mp3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 698, 12, 2890, 16, 17041, 16, 1384, 16, 2863, 67, 1467, 16, 866, 67, 8538, 33, 5510, 4672, 468, 1220, 353, 8554, 358, 506, 1245, 8654, 1525, 445, 31, 506, 297, 598, 518, 16, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 698, 12, 2890, 16, 17041, 16, 1384, 16, 2863, 67, 1467, 16, 866, 67, 8538, 33, 5510, 4672, 468, 1220, 353, 8554, 358, 506, 1245, 8654, 1525, 445, 31, 506, 297, 598, 518, 16, 46...
return TestMethodDescription(test_name(), assertions(), setup())
return TestMethodDescription(test_name(), list(assertions()), setup())
def setup(): if init_call and init_call.raised_exception(): return "" else: setup = "%s = %s\n" % (local_name, constructor) # Comment out the constructor if it isn't complete. if stub_all: setup = "# %s" % setup return setup
0c747a4133f3da81388ce3847e7616d4d7e5230d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11544/0c747a4133f3da81388ce3847e7616d4d7e5230d/generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13332, 309, 1208, 67, 1991, 471, 1208, 67, 1991, 18, 354, 5918, 67, 4064, 13332, 327, 1408, 469, 30, 3875, 273, 2213, 87, 273, 738, 87, 64, 82, 6, 738, 261, 3729, 67, 529, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13332, 309, 1208, 67, 1991, 471, 1208, 67, 1991, 18, 354, 5918, 67, 4064, 13332, 327, 1408, 469, 30, 3875, 273, 2213, 87, 273, 738, 87, 64, 82, 6, 738, 261, 3729, 67, 529, 16, ...
self.assertEqual(-017777777777, -2147483647)
if platform_long_is_32_bits: self.assertEqual(-017777777777, -2147483647) else: self.assertEqual(-0777777777777777777777, -9223372036854775807)
def test_oct_baseline(self): # Baseline tests self.assertEqual(00, 0) self.assertEqual(020, 16) self.assertEqual(017777777777, 2147483647) # Ditto with a minus sign and parentheses self.assertEqual(-(00), 0) self.assertEqual(-(020), -16) self.assertEqual(-(017777777777), -2147483647) # Ditto with a minus sign and NO parentheses self.assertEqual(-00, 0) self.assertEqual(-020, -16) self.assertEqual(-017777777777, -2147483647)
9f9d6e6c1d506067db8a1309e91d568018bef591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9f9d6e6c1d506067db8a1309e91d568018bef591/test_hexoct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13410, 67, 27818, 12, 2890, 4672, 468, 605, 345, 3027, 7434, 365, 18, 11231, 5812, 12, 713, 16, 374, 13, 365, 18, 11231, 5812, 12, 3103, 20, 16, 2872, 13, 365, 18, 11231, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13410, 67, 27818, 12, 2890, 4672, 468, 605, 345, 3027, 7434, 365, 18, 11231, 5812, 12, 713, 16, 374, 13, 365, 18, 11231, 5812, 12, 3103, 20, 16, 2872, 13, 365, 18, 11231, 5...
EXAMPLES:
EXAMPLES::
def unpickle_QuaternionAlgebra_v0(*key): """ The 0th version of pickling for quaternion algebras. EXAMPLES: sage: Q = QuaternionAlgebra(-5,-19) sage: f, t = Q.__reduce__() sage: sage.algebras.quaternion_algebra.unpickle_QuaternionAlgebra_v0(*t) Quaternion Algebra (-5, -19) with base ring Rational Field sage: loads(dumps(Q)) == Q True sage: loads(dumps(Q)) is Q True """ return QuaternionAlgebra(*key)
8fd9c3e7c0b05d68830f5fa94e01a4ad85c9e2bc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/8fd9c3e7c0b05d68830f5fa94e01a4ad85c9e2bc/quaternion_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 20847, 67, 928, 17848, 1067, 29087, 67, 90, 20, 30857, 856, 4672, 3536, 1021, 374, 451, 1177, 434, 6002, 2456, 364, 26774, 524, 908, 2848, 345, 18, 225, 5675, 8900, 11386, 2866, 225...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 20847, 67, 928, 17848, 1067, 29087, 67, 90, 20, 30857, 856, 4672, 3536, 1021, 374, 451, 1177, 434, 6002, 2456, 364, 26774, 524, 908, 2848, 345, 18, 225, 5675, 8900, 11386, 2866, 225...
self.config.set_backup_enabled(widget.get_active())
self.config.backup_enabled = widget.get_active()
def on_backup_enable(self, widget, data=None): self.global_sections.set_sensitive(widget.get_active()) self.config.set_backup_enabled(widget.get_active())
b8eb09d77c6c5b344494faa001ce2dc4706eac45 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/736/b8eb09d77c6c5b344494faa001ce2dc4706eac45/cozy-configdialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 9572, 67, 7589, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 365, 18, 6347, 67, 11657, 18, 542, 67, 23481, 12, 6587, 18, 588, 67, 3535, 10756, 365, 18, 1425, 18, 542, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 9572, 67, 7589, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 365, 18, 6347, 67, 11657, 18, 542, 67, 23481, 12, 6587, 18, 588, 67, 3535, 10756, 365, 18, 1425, 18, 542, 67, ...