rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
duration = zi.Attribute("a float representing how long, in seconds, the framework should wait before timing out") excClass = zi.Attribute("the exception to raise if the timeout duration is exceeded") excArg = zi.Attribute("the argument to excClass that the timeout will raise")
duration = zi.Attribute("a float representing how long, in seconds, the " "framework should wait before timing out") excClass = zi.Attribute("the exception to raise if the timeout duration " "is exceeded") excArg = zi.Attribute( "the argument to excClass that the timeout will raise")
def __add__(other): """returns .msg + other, for string concatenation"""
0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 972, 12, 3011, 4672, 3536, 6154, 263, 3576, 397, 1308, 16, 364, 533, 26833, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 972, 12, 3011, 4672, 3536, 6154, 263, 3576, 397, 1308, 16, 364, 533, 26833, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
delay = 500
delay = 10
def start_server(listen_port, delay=500): global errors, send_cnt, recv_cnt lsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) lsock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) lsock.bind(('', listen_port)) lsock.listen(100) while True: try: csock = None print 'listening on port %s' % listen_port csock, address = lsock.accept() print 'Got client connection from %s' % address[0] handshake(csock) send_cnt = 0 recv_cnt = 0 responder(csock, delay=delay) except Exception: print "accumulated errors:", errors errors = 0 print "Ignoring exception:" print traceback.format_exc() if csock: csock.close()
1e633bc8eeef5e92f134ec0cf705a1f7644b9f93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13207/1e633bc8eeef5e92f134ec0cf705a1f7644b9f93/wstest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 3567, 12, 18085, 67, 655, 16, 4624, 33, 12483, 4672, 2552, 1334, 16, 1366, 67, 13085, 16, 10665, 67, 13085, 7180, 975, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 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, 787, 67, 3567, 12, 18085, 67, 655, 16, 4624, 33, 12483, 4672, 2552, 1334, 16, 1366, 67, 13085, 16, 10665, 67, 13085, 7180, 975, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, ...
gtk.Entry.do_expose_event(self, event) x, y = self._calc_image_position()
gtk.EventBox.do_expose_event(self, event) self.entry.style.paint_shadow(event.window, gtk.STATE_NORMAL, gtk.SHADOW_IN, event.area, self.entry, "entry", 0, 0, self.allocation.width, self.allocation.height) x, y = self._icon_position()
def do_expose_event(self, event): gtk.Entry.do_expose_event(self, event) x, y = self._calc_image_position() exposed = event.area.intersect(gtk.gdk.Rectangle(x, y, 16, 16)) event.window.draw_pixbuf(None, self.pixbuf, exposed.x-x, exposed.y-y, exposed.x, exposed.y, exposed.width, exposed.height)
006b0b1783dee80eaa3b03dcd298253d0de14390 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/006b0b1783dee80eaa3b03dcd298253d0de14390/searchentry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 338, 4150, 67, 2575, 12, 2890, 16, 871, 4672, 22718, 18, 1133, 3514, 18, 2896, 67, 338, 4150, 67, 2575, 12, 2890, 16, 871, 13, 365, 18, 4099, 18, 4060, 18, 84, 1598, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 338, 4150, 67, 2575, 12, 2890, 16, 871, 4672, 22718, 18, 1133, 3514, 18, 2896, 67, 338, 4150, 67, 2575, 12, 2890, 16, 871, 13, 365, 18, 4099, 18, 4060, 18, 84, 1598, 67, 1...
console.debug_stdoutln(">Entering: gnuplots.py->CA_TLS_Differance_Plot()::make_script()...")
console.debug_stdoutln(">Entering: gnuplots.py->CA_TLS_Differance_Plot()::make_script()...")
def make_script(self): console.debug_stdoutln(">Entering: gnuplots.py->CA_TLS_Differance_Plot()::make_script()...") ## DEBUG basename = "%s_CHAIN%s_NTLS%s_CADIFF" % ( self.chain.struct.structure_id, self.chain.chain_id, self.cpartition.num_tls_segments())
f921e2ace6e58d6ef561ac8457beb9b577456e33 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10674/f921e2ace6e58d6ef561ac8457beb9b577456e33/gnuplots.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 4263, 12, 2890, 4672, 2983, 18, 4148, 67, 10283, 2370, 2932, 34, 10237, 310, 30, 314, 13053, 13214, 18, 2074, 2122, 3587, 67, 9905, 67, 10428, 586, 1359, 67, 11532, 1435, 2866,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 4263, 12, 2890, 4672, 2983, 18, 4148, 67, 10283, 2370, 2932, 34, 10237, 310, 30, 314, 13053, 13214, 18, 2074, 2122, 3587, 67, 9905, 67, 10428, 586, 1359, 67, 11532, 1435, 2866,...
l = self._convert_to_basis(self.hecke_operator(self._basis_cache[j], self.prime()))
l = self._convert_to_basis(self.hecke_operator(self._basis_cache[j], m))
def hecke_matrix(self, m, n, use_recurrence = False, exact_arith = False): r""" Calculate the matrix of the `T_m` operator in the basis of this space, truncated to an `n \times n` matrix. Conventions are that operators act on the left on column vectors (this is the opposite of the conventions of the sage.modules.matrix_morphism class!) Uses naive q-expansion arguments if use_recurrence=False and uses the Kolberg style recurrences if use_recurrence=True.
3585551616e64b7ecefd90f53b929dc9de8efd18 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3585551616e64b7ecefd90f53b929dc9de8efd18/genus0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 762, 73, 67, 5667, 12, 2890, 16, 312, 16, 290, 16, 999, 67, 266, 17131, 273, 1083, 16, 5565, 67, 297, 483, 273, 1083, 4672, 436, 8395, 9029, 326, 3148, 434, 326, 1375, 56, 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, 366, 762, 73, 67, 5667, 12, 2890, 16, 312, 16, 290, 16, 999, 67, 266, 17131, 273, 1083, 16, 5565, 67, 297, 483, 273, 1083, 4672, 436, 8395, 9029, 326, 3148, 434, 326, 1375, 56, 67, ...
return ChangeSet.addFileContents(hash, repostitory.FileContentsFromChangeSet(cs, hash))
return ChangeSet.addFileContents(self, hash, repository.FileContentsFromChangeSet(self.absCS, hash))
def addFileContents(self, hash):
fea08405e6d1d5b251edea8e2edc34ab5ebeb785 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/fea08405e6d1d5b251edea8e2edc34ab5ebeb785/changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18671, 6323, 12, 2890, 16, 1651, 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, 18671, 6323, 12, 2890, 16, 1651, 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...
print 'user theme'
def LoadThemeCfg(self): ##current theme type radiobutton self.themeIsBuiltin.set(idleConf.GetOption('main','Theme','default', type='bool',default=1)) ##currently set theme currentOption=idleConf.CurrentTheme() print 'current option',currentOption ##load available theme option menus if self.themeIsBuiltin.get(): #default theme selected print 'builtin theme' itemList=idleConf.GetSectionList('default','highlight') itemList.sort() print 'builtin items:',itemList self.optMenuThemeBuiltin.SetMenu(itemList,currentOption) itemList=idleConf.GetSectionList('user','highlight') itemList.sort() print 'user items:',itemList if not itemList: self.radioThemeCustom.config(state=DISABLED) self.customTheme.set('- no custom themes -') else: self.optMenuThemeCustom.SetMenu(itemList,itemList[0]) else: #user theme selected print 'user theme' itemList=idleConf.GetSectionList('user','highlight') itemList.sort() print 'user items:',itemList self.optMenuThemeCustom.SetMenu(itemList,currentOption) itemList=idleConf.GetSectionList('default','highlight') itemList.sort() print 'builtin items:',itemList self.optMenuThemeBuiltin.SetMenu(itemList,itemList[0]) self.SetThemeType() ##load theme element option menu themeNames=self.themeElements.keys() themeNames.sort(self.__ThemeNameIndexCompare) self.optMenuHighlightTarget.SetMenu(themeNames,themeNames[0]) self.PaintThemeSample() self.SetHighlightTarget()
9b1724cdfb0920fcdd61ccee7684a62a64c2609a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9b1724cdfb0920fcdd61ccee7684a62a64c2609a/configDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 8335, 8198, 12, 2890, 4672, 7541, 2972, 5006, 618, 12094, 947, 2644, 365, 18, 7997, 2520, 28032, 18, 542, 12, 20390, 3976, 18, 967, 1895, 2668, 5254, 17023, 8335, 17023, 1886, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 8335, 8198, 12, 2890, 4672, 7541, 2972, 5006, 618, 12094, 947, 2644, 365, 18, 7997, 2520, 28032, 18, 542, 12, 20390, 3976, 18, 967, 1895, 2668, 5254, 17023, 8335, 17023, 1886, 2187, ...
"""
"""Return a detailed description of the functions in a
def _func_details(self, functions, cls, heading='Function Details'): """## Return a detailed description of the functions in a class or module.""" functions = self._sort(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</TABLE>'
89bd16eaf8c7e556babe42c6a92621dbc9b8a7e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/89bd16eaf8c7e556babe42c6a92621dbc9b8a7e9/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 1189, 2000, 279, 6864, 2477, 434, 326, 4186, 316, 279, 667, 578, 1605, 12123, 990, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 1189, 2000, 279, 6864, 2477, 434, 326, 4186, 316, 279, 667, 578, 1605, 12123, 990, 279, ...
sec.setLNBTunerMask(tunermask)
def addLNBSimple(self, sec, slotid, diseqcmode, toneburstmode = 0, diseqcpos = 0, orbpos = 0, longitude = 0, latitude = 0, loDirection = 0, laDirection = 0): #simple defaults sec.addLNB() tunermask = 1 << slotid if self.equal.has_key(slotid): tunermask |= (1 << self.equal[slotid]) elif self.linked.has_key(slotid): tunermask |= (1 << self.linked[slotid]) sec.setLNBTunerMask(tunermask) sec.setLNBLOFL(9750000) sec.setLNBLOFH(10600000) sec.setLNBThreshold(11700000) sec.setLNBIncreasedVoltage(lnbParam.OFF) sec.setRepeats(0) sec.setFastDiSEqC(0) sec.setSeqRepeat(0) sec.setVoltageMode(switchParam.HV) sec.setToneMode(switchParam.HILO) sec.setCommandOrder(0)
29595f9e351b8d7b4f77b0a9885209d45929d2b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/29595f9e351b8d7b4f77b0a9885209d45929d2b1/NimManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 48, 20626, 5784, 12, 2890, 16, 1428, 16, 4694, 350, 16, 302, 784, 30675, 3188, 16, 30600, 70, 18593, 3188, 273, 374, 16, 302, 784, 30675, 917, 273, 374, 16, 16823, 917, 273, 374, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 48, 20626, 5784, 12, 2890, 16, 1428, 16, 4694, 350, 16, 302, 784, 30675, 3188, 16, 30600, 70, 18593, 3188, 273, 374, 16, 302, 784, 30675, 917, 273, 374, 16, 16823, 917, 273, 374, ...
cache_salt = searchpath self.searchpath = searchpath
cache_salt = self.searchpath
def __init__(self, searchpath, use_memcache=False, memcache_size=40, cache_folder=None, auto_reload=True, cache_salt=None): if cache_salt is None: cache_salt = searchpath self.searchpath = searchpath CachedLoaderMixin.__init__(self, use_memcache, memcache_size, cache_folder, auto_reload, cache_salt)
fbcd38c463caf7ad040c34ef0327037399cfe1a2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14446/fbcd38c463caf7ad040c34ef0327037399cfe1a2/loaders.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1623, 803, 16, 999, 67, 3917, 2493, 33, 8381, 16, 20549, 67, 1467, 33, 7132, 16, 1247, 67, 5609, 33, 7036, 16, 3656, 67, 17517, 33, 5510, 16, 1247, 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, 1001, 2738, 972, 12, 2890, 16, 1623, 803, 16, 999, 67, 3917, 2493, 33, 8381, 16, 20549, 67, 1467, 33, 7132, 16, 1247, 67, 5609, 33, 7036, 16, 3656, 67, 17517, 33, 5510, 16, 1247, 67,...
EXAMPLES:
EXAMPLES::
def victor_miller_basis(k, prec=10, cusp_only=False, var='q'): r""" Compute and return the Victor-Miller basis for modular forms of weight k and level 1 to precision $O(q^prec)$. if \code{cusp\_only} is True, return only a basis for the cuspidal subspace. INPUT: k -- an integer prec -- (default: 10) a positive integer cusp_only -- bool (default: False) var -- string (default: 'q' OUTPUT: A sequence whose entries are power series in ZZ[[var]]. EXAMPLES: sage: victor_miller_basis(1, 6) [] sage: victor_miller_basis(0, 6) [ 1 + O(q^6) ] sage: victor_miller_basis(2, 6) [] sage: victor_miller_basis(4, 6) [ 1 + 240*q + 2160*q^2 + 6720*q^3 + 17520*q^4 + 30240*q^5 + O(q^6) ] sage: victor_miller_basis(6, 6, var='w') [ 1 - 504*w - 16632*w^2 - 122976*w^3 - 532728*w^4 - 1575504*w^5 + O(w^6) ] sage: victor_miller_basis(6, 6) [ 1 - 504*q - 16632*q^2 - 122976*q^3 - 532728*q^4 - 1575504*q^5 + O(q^6) ] sage: victor_miller_basis(12, 6) [ 1 + 196560*q^2 + 16773120*q^3 + 398034000*q^4 + 4629381120*q^5 + O(q^6), q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6) ] sage: victor_miller_basis(12, 6, cusp_only=True) [ q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6) ] sage: victor_miller_basis(24, 6, cusp_only=True) [ q + 195660*q^3 + 12080128*q^4 + 44656110*q^5 + O(q^6), q^2 - 48*q^3 + 1080*q^4 - 15040*q^5 + O(q^6) ] sage: victor_miller_basis(24, 6) [ 1 + 52416000*q^3 + 39007332000*q^4 + 6609020221440*q^5 + O(q^6), q + 195660*q^3 + 12080128*q^4 + 44656110*q^5 + O(q^6), q^2 - 48*q^3 + 1080*q^4 - 15040*q^5 + O(q^6) ] sage: victor_miller_basis(32, 6) [ 1 + 2611200*q^3 + 19524758400*q^4 + 19715347537920*q^5 + O(q^6), q + 50220*q^3 + 87866368*q^4 + 18647219790*q^5 + O(q^6), q^2 + 432*q^3 + 39960*q^4 - 1418560*q^5 + O(q^6) ] sage: victor_miller_basis(40,200)[1:] == victor_miller_basis(40,200,cusp_only=True) True sage: victor_miller_basis(200,40)[1:] == victor_miller_basis(200,40,cusp_only=True) True """ k = Integer(k) if k%2 == 1 or k==2: return Sequence([]) elif k < 0: raise ValueError, "k must be non-negative" elif k == 0: return Sequence([PowerSeriesRing(ZZ,var)(1).add_bigoh(prec)], cr=True) e = k.mod(12) if e == 2: e += 12 n = (k-e) // 12 if n == 0 and cusp_only: return Sequence([]) # If prec is less than or equal to the dimension of the space of # cusp forms, which is just n, then we know the answer, and we # simply return it. if prec <= n: q = PowerSeriesRing(ZZ,var).gen(0) err = bigO(q**prec) ls = [0] * (n+1) if not cusp_only: ls[0] = 1 + err for i in range(1,prec): ls[i] = q**i + err for i in range(prec,n+1): ls[i] = err return Sequence(ls, cr=True) F6 = ((-504)*eisenstein_series_qexp(6,prec,var=var)).change_ring(ZZ) if e == 0: A = F6.parent()(1) elif e == 4: A = (240*eisenstein_series_qexp(4,prec,var=var)).change_ring(ZZ) elif e == 6: A = F6 elif e == 8: A = (480*eisenstein_series_qexp(8,prec,var=var)).change_ring(ZZ) elif e == 10: A = (-264*eisenstein_series_qexp(10,prec,var=var)).change_ring(ZZ) else: # e == 14 A = (-24*eisenstein_series_qexp(14,prec,var=var)).change_ring(ZZ) if n == 0: return Sequence([A], cr=True) F6_squared = F6**2 D = delta_qexp(prec,var=var) Fprod = F6_squared Dprod = D R = A.parent() if cusp_only: ls = [R(0)] + [A] * n start = 1 else: ls = [A] * (n+1) start = 0 for i in range(1,n+1): ls[n-i] *= Fprod ls[i] *= Dprod Fprod *= F6_squared Dprod *= D Dprod = Dprod.add_bigoh(prec) if cusp_only: M = Matrix(ZZ, n, prec, [x.list() for x in ls[1:]]) for i in range(n): for j in range(i): M.add_multiple_of_row(j,i,-M[j][i+1]) else: M = Matrix(ZZ, n+1, prec, [x.list() for x in ls]) for i in range(1,n+1): for j in range(i): M.add_multiple_of_row(j,i,-M[j][i]) return Sequence([ R(x.list()).add_bigoh(prec) for x in M.rows() ], cr=True)
ee4ef2ed2571d7a5d47eb83402ce0da607fbc323 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/ee4ef2ed2571d7a5d47eb83402ce0da607fbc323/vm_basis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28873, 280, 67, 81, 24462, 67, 23774, 12, 79, 16, 13382, 33, 2163, 16, 27964, 84, 67, 3700, 33, 8381, 16, 569, 2218, 85, 11, 4672, 436, 8395, 8155, 471, 327, 326, 776, 933, 280, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28873, 280, 67, 81, 24462, 67, 23774, 12, 79, 16, 13382, 33, 2163, 16, 27964, 84, 67, 3700, 33, 8381, 16, 569, 2218, 85, 11, 4672, 436, 8395, 8155, 471, 327, 326, 776, 933, 280, 17, ...
def showState(self,stateID):
def showState(self, stateID):
def showState(self,stateID): """Show the state matching stateID""" state = self.cn.getState(stateID) state.showNodes()
8e1235056f34134b4407cd34d81f66b1b71e2c24 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13131/8e1235056f34134b4407cd34d81f66b1b71e2c24/Ector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 1119, 12, 2890, 16, 919, 734, 4672, 3536, 5706, 326, 919, 3607, 919, 734, 8395, 919, 3639, 273, 365, 18, 10305, 18, 588, 1119, 12, 2019, 734, 13, 919, 18, 4500, 3205, 1435, 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, 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, 2405, 1119, 12, 2890, 16, 919, 734, 4672, 3536, 5706, 326, 919, 3607, 919, 734, 8395, 919, 3639, 273, 365, 18, 10305, 18, 588, 1119, 12, 2019, 734, 13, 919, 18, 4500, 3205, 1435, 2, ...
print >> sys.stdout, "Should output the version."
try: from invenio.config import CFG_VERSION print >> sys.stdout, ("CDS Invenio/%s bibclassify/%s" % (CFG_VERSION, CFG_VERSION)) except ImportError: print >> sys.stdout, "CDS Invenio bibclassify/standalone"
def read_options(options_string): """Reads the options, test if the specified values are consistent and populates the options dictionary.""" global _OPTIONS _OPTIONS = {} _OPTIONS["spires"] = False _OPTIONS["output_limit"] = 20 _OPTIONS["text_files"] = [] _OPTIONS["ontology_file"] = "" _OPTIONS["output_mode"] = "text" _OPTIONS["verbose"] = 0 _OPTIONS["match_mode"] = "full" _OPTIONS["output_prefix"] = None _OPTIONS["rebuild_cache"] = False _OPTIONS["no_cache"] = False _OPTIONS["check_ontology"] = False _OPTIONS["with_explicit"] = False output_modes = ("html", "text", "marcxml") modes = ("full", "partial") try: long_flags = ["ontology=", "output-mode=", "verbose=", "spires", "keywords-number=", "matching-mode=", "help", "version", "file", "rebuild-cache", "no-limit", "no-cache", "check-ontology", "with-explicit"] short_flags = "f:k:o:n:m:v:sqhV" opts, args = getopt.gnu_getopt(options_string, short_flags, long_flags) except getopt.GetoptError, err1: print >> sys.stderr, "Options problem: %s" % err1 usage() for opt, arg in opts: if opt in ("-h", "--help"): display_help() elif opt in ("-V", "--version"): # TODO Fix version print >> sys.stdout, "Should output the version." sys.exit(1) elif opt in ("-v", "--verbose"): _OPTIONS["verbose"] = arg elif opt in ("-k", "--ontology"): _OPTIONS["ontology_file"] = arg elif opt in ("-o", "--output-mode"): _OPTIONS["output_mode"] = arg.lower() elif opt in ("-m", "--matching-mode"): _OPTIONS["match_mode"] = arg.lower() # -q for backward compatibility elif opt in ("-s", "--spires", "-q"): _OPTIONS["spires"] = True elif opt in ("-n", "--nkeywords"): _OPTIONS["output_limit"] = arg elif opt == "--rebuild-cache": _OPTIONS["rebuild_cache"] = True elif opt == "--no-cache": _OPTIONS["no_cache"] = True elif opt == "--write-to-file": _OPTIONS["output_prefix"] = arg # -f for compatibility reasons elif opt in ("-f", "--file"): _OPTIONS["text_files"].append(arg) elif opt == "--check-ontology": _OPTIONS["check_ontology"] = True elif opt == "--with-explicit": _OPTIONS["with_explicit"] = True if not opts and not args: display_help() _OPTIONS["text_files"] += args # Test if the options are consistent. if not args: if not _OPTIONS["check_ontology"] and not _OPTIONS["text_files"]: print >> sys.stderr, "ERROR: please specify a file or directory." usage() if not _OPTIONS["ontology_file"]: print >> sys.stderr, "ERROR: please specify an ontology file (-k)." usage() if _OPTIONS["output_mode"] not in output_modes: print >> sys.stderr, ("ERROR: output (-o) should be TEXT, MARCXML or " "HTML.") usage() if _OPTIONS["match_mode"] not in modes: print >> sys.stderr, "ERROR: mode (-m) should be FULL or PARTIAL." usage() try: _OPTIONS["output_limit"] = int(_OPTIONS["output_limit"]) if _OPTIONS["output_limit"] < 0: print >> sys.stderr, ("ERROR: output limit must be a positive " "integer.") except ValueError: print >> sys.stderr, ("ERROR: output limit must be a positive " "integer.") usage()
b7a42590308deb38aca52c76bec6ae7be3ae88f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2594/b7a42590308deb38aca52c76bec6ae7be3ae88f5/bibclassify_cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2116, 12, 2116, 67, 1080, 4672, 3536, 7483, 326, 702, 16, 1842, 309, 326, 1269, 924, 854, 11071, 471, 22065, 326, 702, 3880, 12123, 2552, 389, 12422, 389, 12422, 273, 2618, 389,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2116, 12, 2116, 67, 1080, 4672, 3536, 7483, 326, 702, 16, 1842, 309, 326, 1269, 924, 854, 11071, 471, 22065, 326, 702, 3880, 12123, 2552, 389, 12422, 389, 12422, 273, 2618, 389,...
"Please confirm you want to abort.\n", "Confirm", "Cancel", "", 1, 1)
"Please confirm you want to abort.\n", "Confirm", "Cancel", "", 1, 1)
def simAbort(self): '''Original slot for Abort button. ''' if platform.atom_debug and self.sim_abort_button_pressed: #bruce 060106 print "atom_debug: self.sim_abort_button_pressed is already True before we even put up our dialog" # Added confirmation before aborting as part of fix to bug 915. Mark 050824. # Bug 915 had to do with a problem if the user accidently hit the space bar or espace key, # which would call this slot and abort the simulation. This should no longer be an issue here # since we aren't using a dialog. I still like having this confirmation anyway. # IMHO, it should be kept. Mark 060106. ret = QMessageBox.warning( self, "Confirm", "Please confirm you want to abort.\n", "Confirm", "Cancel", "", 1, # The "default" button, when user presses Enter or Return (1 = Cancel) 1) # Escape (1= Cancel) if ret==0: # Confirmed self.sim_abort_button_pressed = True
c25263540add024396d4bcf7631292f1fd2d50bb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/c25263540add024396d4bcf7631292f1fd2d50bb/MWsemantics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 13572, 12, 2890, 4672, 9163, 8176, 4694, 364, 14263, 3568, 18, 9163, 309, 4072, 18, 7466, 67, 4148, 471, 365, 18, 9812, 67, 18623, 67, 5391, 67, 10906, 30, 468, 2848, 3965, 13026, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 13572, 12, 2890, 4672, 9163, 8176, 4694, 364, 14263, 3568, 18, 9163, 309, 4072, 18, 7466, 67, 4148, 471, 365, 18, 9812, 67, 18623, 67, 5391, 67, 10906, 30, 468, 2848, 3965, 13026, ...
return totalSize;
return totalSize
def GetSourceSize(path): if os.path.isfile( path ): return os.path.getsize( path ); totalSize = 0; for ( dirPath, dirNames, fileNames ) in os.walk( path ): for file in fileNames: filePath = os.path.join( dirPath, file ); totalSize += os.path.getsize( filePath );
ca0495ab78c84deca1a018d0b12fe9182749f03c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4785/ca0495ab78c84deca1a018d0b12fe9182749f03c/MakeTorrent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1830, 1225, 12, 803, 4672, 309, 1140, 18, 803, 18, 291, 768, 12, 589, 262, 30, 327, 1140, 18, 803, 18, 588, 1467, 12, 589, 11272, 225, 24611, 273, 374, 31, 364, 261, 15891, 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, 968, 1830, 1225, 12, 803, 4672, 309, 1140, 18, 803, 18, 291, 768, 12, 589, 262, 30, 327, 1140, 18, 803, 18, 588, 1467, 12, 589, 11272, 225, 24611, 273, 374, 31, 364, 261, 15891, 16, ...
reactor.spawnProcess(p, '/bin/false', ['false'])
reactor.spawnProcess(p, cmd, ['false'])
def testAbnormalTermination(self): p = TrivialProcessProtocol() reactor.spawnProcess(p, '/bin/false', ['false']) while not p.finished: reactor.iterate(0.01) p.reason.trap(error.ProcessTerminated) self.assertEquals(p.reason.value.exitCode, 1)
9e5c20b4869ecbb1215928c6b9210a85cca1e974 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9e5c20b4869ecbb1215928c6b9210a85cca1e974/test_process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5895, 6130, 16516, 12, 2890, 4672, 293, 273, 840, 20109, 2227, 5752, 1435, 19178, 18, 1752, 9533, 2227, 12, 84, 16, 1797, 16, 10228, 5743, 19486, 225, 1323, 486, 293, 18, 13527, 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, 1842, 5895, 6130, 16516, 12, 2890, 4672, 293, 273, 840, 20109, 2227, 5752, 1435, 19178, 18, 1752, 9533, 2227, 12, 84, 16, 1797, 16, 10228, 5743, 19486, 225, 1323, 486, 293, 18, 13527, 30...
_fl_popup_get_title_font = cfuncproto(so_libforms, "fl_popup_get_title_font",
_fl_popup_get_title_font = cfuncproto(so_libforms, "fl_popup_get_title_font",
def fl_popup_set_callback(p1, py_cb): """ fl_popup_set_callback(p1, py_cb) -> popup callback """ c_cb = FL_POPUP_CB(py_cb) _cfunc_refs[get_rand_dictkey()] = c_cb retval = _fl_popup_set_callback(p1, c_cb) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 16086, 67, 542, 67, 3394, 12, 84, 21, 16, 2395, 67, 7358, 4672, 3536, 1183, 67, 16086, 67, 542, 67, 3394, 12, 84, 21, 16, 2395, 67, 7358, 13, 317, 10431, 1348, 3536, 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, 1183, 67, 16086, 67, 542, 67, 3394, 12, 84, 21, 16, 2395, 67, 7358, 4672, 3536, 1183, 67, 16086, 67, 542, 67, 3394, 12, 84, 21, 16, 2395, 67, 7358, 13, 317, 10431, 1348, 3536, 225, ...
ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"]
def Interrogate(ipath=0, opts=0, outd=0, outc=0, src=0, module=0, library=0, files=0): if ((ipath==0)|(opts==0)|(outd==0)|(outc==0)|(src==0)|(module==0)|(library==0)|(files==0)): sys.exit("syntax error in Interrogate directive") ALLIN.append(outd) ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"] outd = PREFIX+"/pandac/input/"+outd outc = PREFIX+"/tmp/"+outc paths = xpaths(src+"/",files,"") dep = CxxCalcDependenciesAll(paths, ipath) dotdots = "" for i in range(0,src.count("/")+1): dotdots = dotdots + "../" building = 0 for x in opts: if (x[:9]=="BUILDING_"): building = x[9:] if (older(outc, dep) or older(outd, dep)): if (COMPILER=="MSVC7"): cmd = dotdots + PREFIX + "/bin/interrogate.exe" cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32' cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall' if (OPTIMIZE==1): cmd = cmd + ' ' if (OPTIMIZE==2): cmd = cmd + ' ' if (OPTIMIZE==3): cmd = cmd + ' -DFORCE_INLINING' if (OPTIMIZE==4): cmd = cmd + ' -DFORCE_INLINING' cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc' cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include' for pkg in PACKAGES: if (PkgSelected(opts,pkg)): cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/win-libs-vc7/" + pkg.lower() + "/include" if (COMPILER=="LINUXA"): cmd = dotdots + PREFIX + '/bin/interrogate' cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const' if (OPTIMIZE==1): cmd = cmd + ' ' if (OPTIMIZE==2): cmd = cmd + ' ' if (OPTIMIZE==3): cmd = cmd + ' ' if (OPTIMIZE==4): cmd = cmd + ' ' cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc -S/usr/include' cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include' for pkg in PACKAGES: if (PkgSelected(opts,pkg)): cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/linux-libs-a/" + pkg.lower() + "/include" cmd = cmd + ' -oc ' + dotdots + outc + ' -od ' + dotdots + outd cmd = cmd + ' -fnames -string -refcount -assert -python' for x in ipath: cmd = cmd + ' -I' + dotdots + x if (building): cmd = cmd + " -DBUILDING_"+building if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA" cmd = cmd + ' -module ' + module + ' -library ' + library if ((COMPILER=="MSVC7") and opts.count("DXSDK")): cmd = cmd + ' -I"' + DIRECTXSDK + '/include"' for ver in ["MAYA5","MAYA6","MAYA65"]: if ((COMPILER=="MSVC7") and opts.count(ver)): cmd = cmd + ' -I"' + MAYASDK[ver] + '/include"' for x in files: cmd = cmd + ' ' + x oslocalcmd(src, cmd) updatefiledate(outd) updatefiledate(outc)
8fd5a5147d54776cde7f8879cd333f478ebf3714 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/8fd5a5147d54776cde7f8879cd333f478ebf3714/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5294, 15283, 12, 625, 421, 33, 20, 16, 1500, 33, 20, 16, 596, 72, 33, 20, 16, 596, 71, 33, 20, 16, 1705, 33, 20, 16, 1605, 33, 20, 16, 5313, 33, 20, 16, 1390, 33, 20, 4672, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5294, 15283, 12, 625, 421, 33, 20, 16, 1500, 33, 20, 16, 596, 72, 33, 20, 16, 596, 71, 33, 20, 16, 1705, 33, 20, 16, 1605, 33, 20, 16, 5313, 33, 20, 16, 1390, 33, 20, 4672, 309...
PriorityEvaluation.eval(self, vtx_id, context)
PriorityEvaluation.eval(self, vtx_id, context, self.lambda_value)
def eval (self, vtx_id=None, context=None) : """ Eval the dataflow from vtx_id with a particular context @param vtx_id : vertex id to start the evaluation @param context : list a value to assign to lambda variables """ self.lambda_value.clear() if(context) : context.reverse() PriorityEvaluation.eval(self, vtx_id, context) self.lambda_value.clear() # do not keep context in memory
49c93827c3ec75c45b8f515faf86a10d4274cac3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11338/49c93827c3ec75c45b8f515faf86a10d4274cac3/dataflow_evaluation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 261, 2890, 16, 331, 978, 67, 350, 33, 7036, 16, 819, 33, 7036, 13, 294, 3536, 13163, 326, 501, 2426, 628, 331, 978, 67, 350, 598, 279, 6826, 819, 632, 891, 331, 978, 67, 350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 261, 2890, 16, 331, 978, 67, 350, 33, 7036, 16, 819, 33, 7036, 13, 294, 3536, 13163, 326, 501, 2426, 628, 331, 978, 67, 350, 598, 279, 6826, 819, 632, 891, 331, 978, 67, 350, ...
self.CheckMenuBlock("EditTransparency", "status", dict[field])
self.CheckMenuBlock("EditTransparency", "status", value)
def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() # call the check methods for field in dict.keys(): if field == "displayName": # display name checking self.CheckEditableBlock("HeadlineBlock", "display name", dict[field]) elif field == "startDate": # start date checking self.CheckEditableBlock("EditCalendarStartDate", "start date", self.formatDate(dict[field])) elif field == "startTime": # start time checking self.CheckEditableBlock("EditCalendarStartTime", "start time", dict[field]) elif field == "endDate": # end date checking self.CheckEditableBlock("EditCalendarEndDate", "end date", self.formatDate(dict[field])) elif field == "endTime": # end time checking self.CheckEditableBlock("EditCalendarEndTime", "end time", dict[field]) elif field == "location": # location checking self.CheckEditableBlock("CalendarLocation", "location", dict[field]) elif field == "body": # body checking self.CheckEditableBlock("NotesBlock", "body", dict[field]) elif field == "fromAddress": # from address checking self.CheckEditableBlock("EditMailFrom", "from address", dict[field]) elif field == "toAddress": # to address checking self.CheckEditableBlock("EditMailTo", "to address", dict[field]) elif field == "ccAddress": # cc address checking self.CheckEditableBlock("EditMailCc", "cc address", dict[field]) elif field == "bccAddress": # bcc address checking self.CheckEditableBlock("EditMailBcc", "bcc address", dict[field]) elif field == "status": # status checking self.CheckMenuBlock("EditTransparency", "status", dict[field]) elif field == "timeZone": # time zone checking self.CheckMenuBlock("EditTimeZone", "time-zone", dict[field]) elif field == "recurrence": # recurrence checking self.CheckMenuBlock("EditRecurrence", "recurrence", dict[field]) elif field == "recurrenceEnd": # recurrence end date checking self.CheckEditableBlock("EditRecurrenceEnd", "recurrence end", self.formatDate(dict[field])) elif field == "alarm": # status checking self.CheckMenuBlock("EditReminder", "alarm", dict[field]) elif field == "allDay": # status checking self.CheckEditableBlock("EditAllDay", "all-day", dict[field]) elif field == "stampMail": # Mail stamp checking self.CheckButton("MailMessageButton", "mail stamp", dict[field]) elif field == "stampTask": # Task stamp checking self.CheckButton("TaskStamp", "task stamp", dict[field]) elif field == "stampEvent": # Event stamp checking self.CheckButton("CalendarStamp", "calendar stamp", dict[field]) else: # Wrong check => set the report state to unchecked if self.logger: self.logger.SetChecked(False) #report the checkings if self.logger: self.logger.Report("Detail View")
5c6ba404b99947f3210082287c79a9b81a402c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5c6ba404b99947f3210082287c79a9b81a402c26/QAUITestAppLib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 67, 6109, 1767, 12, 2890, 16, 2065, 4672, 3536, 2073, 2665, 924, 635, 532, 20961, 358, 326, 501, 4314, 1601, 329, 316, 326, 7664, 1476, 632, 723, 2065, 294, 3880, 632, 891, 2065, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 67, 6109, 1767, 12, 2890, 16, 2065, 4672, 3536, 2073, 2665, 924, 635, 532, 20961, 358, 326, 501, 4314, 1601, 329, 316, 326, 7664, 1476, 632, 723, 2065, 294, 3880, 632, 891, 2065, ...
new_flags.sort()
def test_flags_irrelevant(self): # check that the result (numeric result + flags raised) of an # arithmetic operation doesn't depend on the current flags
f6fcf1773375414de2096c5062c3bbd03540e518 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/f6fcf1773375414de2096c5062c3bbd03540e518/test_decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7133, 67, 481, 27719, 12, 2890, 4672, 468, 866, 716, 326, 563, 261, 5246, 563, 397, 2943, 11531, 13, 434, 392, 468, 30828, 1674, 3302, 1404, 2447, 603, 326, 783, 2943, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7133, 67, 481, 27719, 12, 2890, 4672, 468, 866, 716, 326, 563, 261, 5246, 563, 397, 2943, 11531, 13, 434, 392, 468, 30828, 1674, 3302, 1404, 2447, 603, 326, 783, 2943, 2, -10...
items = name2target.items() items.sort()
items = name2target.items() items.sort()
def addlink(linkname, linktarget): assert linkname and linkname != '/' if linktarget in name2target: if linkname in name2target[linktarget]: return name2target.setdefault(linktarget, []).append(linkname)
725b75eded22275b6be92a7549983e27d0340b0b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6934/725b75eded22275b6be92a7549983e27d0340b0b/makeref.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1232, 12, 1232, 529, 16, 1692, 3299, 4672, 1815, 1692, 529, 471, 1692, 529, 480, 2023, 309, 1692, 3299, 316, 508, 22, 3299, 30, 309, 1692, 529, 316, 508, 22, 3299, 63, 1232, 3299,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1232, 12, 1232, 529, 16, 1692, 3299, 4672, 1815, 1692, 529, 471, 1692, 529, 480, 2023, 309, 1692, 3299, 316, 508, 22, 3299, 30, 309, 1692, 529, 316, 508, 22, 3299, 63, 1232, 3299,...
frameworkdir = sysconfig.get_config_var('PYTHONFRAMEWORKDIR') exts.append( Extension('gestalt', ['gestaltmodule.c'], extra_link_args=['-framework', 'Carbon']) ) exts.append( Extension('MacOS', ['macosmodule.c'], extra_link_args=['-framework', 'Carbon']) ) exts.append( Extension('icglue', ['icgluemodule.c'], extra_link_args=['-framework', 'Carbon']) ) exts.append( Extension('macfs', ['macfsmodule.c', '../Python/getapplbycreator.c'], extra_link_args=['-framework', 'Carbon']) )
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
9e04a91f3e776f2d142773778d67748407a5acc4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9e04a91f3e776f2d142773778d67748407a5acc4/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
try: nextChar = line[i + 1] except: nextChar = None
def rainbow(self, text=None, offset=None, style='rainbow', bg=None, colorWhitespace=False): if text is None: return if offset is None: try: offset = self.rainbowOffset[style] except KeyError: offset = 0
85484e21963c19bb73e83b65fa0d2a7a00f1684b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10942/85484e21963c19bb73e83b65fa0d2a7a00f1684b/colorlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 767, 267, 70, 543, 12, 2890, 16, 977, 33, 7036, 16, 1384, 33, 7036, 16, 2154, 2218, 7596, 70, 543, 2187, 7611, 33, 7036, 16, 2036, 9431, 33, 8381, 4672, 309, 977, 353, 599, 30, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 767, 267, 70, 543, 12, 2890, 16, 977, 33, 7036, 16, 1384, 33, 7036, 16, 2154, 2218, 7596, 70, 543, 2187, 7611, 33, 7036, 16, 2036, 9431, 33, 8381, 4672, 309, 977, 353, 599, 30, 327, ...
"""Append latex href and pdfbookmarks for titles. """
"""Append latex href and pdfbookmarks for titles."""
def bookmark(self, node): """Append latex href and pdfbookmarks for titles. """ if node.parent['ids']: self.body += ['\\hypertarget{%s}{}\n' % id for id in node.parent['ids']] if not self.use_latex_toc: # BUG level depends on style. pdflatex allows level 0 to 3. # ToC would be the only on level 0 so i choose to decrement # the rest. "Table of contents" bookmark to see the ToC. To # avoid this we set all zeroes to one. l = self.section_level if l>0: l = l-1 # pdftex does not like '_' subscripts in titles text = self.encode(node.astext()) self.body += ['\\pdfbookmark[%d]{%s}{%s}\n' % (l, text, id) for id in node.parent['ids']]
46a0c8dd14843f2383711724a77c799cd55db324 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1278/46a0c8dd14843f2383711724a77c799cd55db324/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13696, 12, 2890, 16, 756, 4672, 3536, 5736, 25079, 3897, 471, 8169, 3618, 17439, 364, 14693, 12123, 309, 756, 18, 2938, 3292, 2232, 3546, 30, 365, 18, 3432, 1011, 10228, 1695, 18112, 672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13696, 12, 2890, 16, 756, 4672, 3536, 5736, 25079, 3897, 471, 8169, 3618, 17439, 364, 14693, 12123, 309, 756, 18, 2938, 3292, 2232, 3546, 30, 365, 18, 3432, 1011, 10228, 1695, 18112, 672, ...
self.set_irq_columns(row, irq, irq_info, nics)
try: self.set_irq_columns(row, irq, irq_info, nics) except: self.list_store.remove(row)
def show(self): new_irqs = [] for sirq in self.irqs.keys(): try: new_irqs.append(int(sirq)) except: continue
f2bc41569d3f9834e574cd9c9147d977e018d277 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3406/f2bc41569d3f9834e574cd9c9147d977e018d277/irqview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 4672, 394, 67, 481, 12926, 273, 5378, 364, 272, 481, 85, 316, 365, 18, 481, 12926, 18, 2452, 13332, 775, 30, 394, 67, 481, 12926, 18, 6923, 12, 474, 12, 87, 481, 85, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2405, 12, 2890, 4672, 394, 67, 481, 12926, 273, 5378, 364, 272, 481, 85, 316, 365, 18, 481, 12926, 18, 2452, 13332, 775, 30, 394, 67, 481, 12926, 18, 6923, 12, 474, 12, 87, 481, 85, ...
requires('urlfetch')
def open_urlresource(url): import urllib, urlparse filename = urlparse.urlparse(url)[2].split('/')[-1] # '/': it's URL! for path in [os.path.curdir, os.path.pardir]: fn = os.path.join(path, filename) if os.path.exists(fn): return open(fn) requires('urlfetch') print >> get_original_stdout(), '\tfetching %s ...' % url fn, _ = urllib.urlretrieve(url, filename) return open(fn)
a36cbabc2f666c3d7fd3e2375fce68690f291c61 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/a36cbabc2f666c3d7fd3e2375fce68690f291c61/test_support.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 718, 3146, 12, 718, 4672, 1930, 11527, 16, 15185, 225, 1544, 273, 15185, 18, 718, 2670, 12, 718, 25146, 22, 8009, 4939, 2668, 2473, 13, 18919, 21, 65, 468, 2023, 30, 518, 180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 718, 3146, 12, 718, 4672, 1930, 11527, 16, 15185, 225, 1544, 273, 15185, 18, 718, 2670, 12, 718, 25146, 22, 8009, 4939, 2668, 2473, 13, 18919, 21, 65, 468, 2023, 30, 518, 180...
print 'Unknown 3 CHAR ID: %s' % (sid,)
print 'Unknown 3 CHAR ID: %s %s' % (sid, tp.get_product_id())
def process_site(tp, sid, ts, data): """ I process a dictionary of data for a particular site """ isCOOP = 0 if len(sid) == 3: if CHAR3LOOKUP.has_key(sid): state = CHAR3LOOKUP[sid] else: print 'Unknown 3 CHAR ID: %s' % (sid,) return elif len(sid) == 5: if mesonet.nwsli2state.has_key( sid[-2:]): state = mesonet.nwsli2state[ sid[-2:]] else: print 'Unknown 5 CHAR State ID: %s' % (sid,) return else: print 'Unknown ID: %s' % (sid,) return #print sid, ts, mydata[sid][ts].keys() # Loop thru vars to see if we have a COOP site? for var in data.keys(): if var in COOPVARS and tp.afos[:3] not in ['RR5',]: isCOOP = 1 if (not MAPPING.has_key(var)): print "Couldn't map var: %s for SID: %s" % (var, sid) MAPPING[var] = "" if (not MULTIPLIER.has_key(var[:2])): MULTIPLIER[var[:2]] = 1.0 HADSDB.runOperation("""INSERT into raw%s (station, valid, key, value) VALUES('%s','%s+00', '%s', '%s')""" % (ts.strftime("%Y_%m"), sid, ts.strftime("%Y-%m-%d %H:%M"), var, data[var])).addErrback(email_error, data, tp) #print sid, state, isCOOP # Deterime if we want to waste the DB's time # If COOP in MW, process it if (isCOOP): print "COOP? %s %s %s" % (sid, tp.get_product_id(), data.keys()) network = "%s_COOP" % (state,) # We are left with DCP else: network = "%s_DCP" % (state,) # Lets do this, finally. #print "ACTUALLY PROCESSED", sid, network iemob = MyIEMOB(sid, network) iemob.setObTimeGMT(ts) iemob.data['year'] = ts.year if not iemob.load_and_compare(IEMACCESS) and ts.strftime("%Y%m%d") == mx.DateTime.now().strftime("%Y%m%d"): #print 'Unknown StationID %s %s' % (sid, tp.get_product_id() ) HADSDB.runOperation(""" INSERT into unknown(nwsli, product, network) values ('%s', '%s', '%s') """ % (sid, tp.get_product_id() , network)) for var in data.keys(): myval = data[var] * MULTIPLIER[var[:2]] iemob.data[ MAPPING[var] ] = myval iemob.updateDatabaseSummaryTemps(None, ACCESSDB) iemob.updateDatabase(None, ACCESSDB) del iemob
8fca5dde9ec568dc01ac5d770f509a772c3dedc5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11186/8fca5dde9ec568dc01ac5d770f509a772c3dedc5/shef_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 4256, 12, 6834, 16, 7348, 16, 3742, 16, 501, 4672, 3536, 467, 1207, 279, 3880, 434, 501, 364, 279, 6826, 2834, 3536, 353, 3865, 3665, 273, 374, 309, 562, 12, 7453, 13, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4256, 12, 6834, 16, 7348, 16, 3742, 16, 501, 4672, 3536, 467, 1207, 279, 3880, 434, 501, 364, 279, 6826, 2834, 3536, 353, 3865, 3665, 273, 374, 309, 562, 12, 7453, 13, 422, ...
sys.stderr.write("ERROR: couldn't create the logfile directory\n") handler = logging.StreamHandler(sys.stdout)
sys.stderr.write("ERROR: couldn't create the logfile directory. Logging to the standard output.\n") handler = logging.StreamHandler(sys.stdout) logging_to_stdout = True
def init_logger(): import os logger = logging.getLogger() # create a format for log messages and dates formatter = logging.Formatter('[%(asctime)s] %(levelname)s:%(name)s:%(message)s', '%a %b %d %Y %H:%M:%S') if tools.config['syslog']: # SysLog Handler if os.name == 'nt': handler = logging.handlers.NTEventLogHandler("%s %s" % (release.description, release.version)) else: handler = logging.handlers.SysLogHandler('/dev/log') formatter = logging.Formatter("%s %s" % (release.description, release.version) + ':%(levelname)s:%(name)s:%(message)s') elif tools.config['logfile']: # LogFile Handler logf = tools.config['logfile'] try: dirname = os.path.dirname(logf) if dirname and not os.path.isdir(dirname): os.makedirs(dirname) handler = logging.handlers.TimedRotatingFileHandler(logf,'D',1,30) except Exception, ex: sys.stderr.write("ERROR: couldn't create the logfile directory\n") handler = logging.StreamHandler(sys.stdout) else: # Normal Handler on standard output handler = logging.StreamHandler(sys.stdout) # tell the handler to use this format handler.setFormatter(formatter) # add the handler to the root logger logger.addHandler(handler) logger.setLevel(tools.config['log_level'] or '0') if handler is logging.StreamHandler and os.name != 'nt': # change color of level names # uses of ANSI color codes # see http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html # maybe use http://code.activestate.com/recipes/574451/ colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', None, 'default'] foreground = lambda f: 30 + colors.index(f) background = lambda f: 40 + colors.index(f) mapping = { 'DEBUG_RPC': ('blue', 'white'), 'DEBUG': ('blue', 'default'), 'INFO': ('green', 'default'), 'WARNING': ('yellow', 'default'), 'ERROR': ('red', 'default'), 'CRITICAL': ('white', 'red'), } for level, (fg, bg) in mapping.items(): msg = "\x1b[%dm\x1b[%dm%s\x1b[0m" % (foreground(fg), background(bg), level) logging.addLevelName(getattr(logging, level), msg)
27240361ca5ead2597ae8f0c63043bab0e969001 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/27240361ca5ead2597ae8f0c63043bab0e969001/netsvc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 4901, 13332, 1930, 1140, 225, 1194, 273, 2907, 18, 588, 3328, 1435, 468, 752, 279, 740, 364, 613, 2743, 471, 7811, 4453, 273, 2907, 18, 5074, 2668, 14451, 12, 345, 21261, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 4901, 13332, 1930, 1140, 225, 1194, 273, 2907, 18, 588, 3328, 1435, 468, 752, 279, 740, 364, 613, 2743, 471, 7811, 4453, 273, 2907, 18, 5074, 2668, 14451, 12, 345, 21261, 13, ...
result.append( str(response.find(k.replace('/', '')[1:]+' On') > 0))
regex = re.compile('O(n|ff)\s{1,2}OK', re.I | re.M) match = regex.search(response) if match: result.append(match.group()[:-4]) else: result.append('Communication error')
def get(self, keys=[]): result = [] if keys == []: result = self.__kwds[:] else: for k in keys: response = self.__conn.roundtrip( 'get %s\r\n' % (' '.join(k.split('/'))), 'iBootBar > ') #!!! Parse feedback and add to results result.append( str(response.find(k.replace('/', '')[1:]+' On') > 0)) return result
5c5d62c8ee0c046bb04be315992854284884cd3e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14654/5c5d62c8ee0c046bb04be315992854284884cd3e/powerstrip_agent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 1311, 33, 8526, 4672, 563, 273, 5378, 309, 1311, 422, 5378, 30, 563, 273, 365, 16186, 25577, 10531, 65, 469, 30, 364, 417, 316, 1311, 30, 766, 273, 365, 16186, 4646,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 1311, 33, 8526, 4672, 563, 273, 5378, 309, 1311, 422, 5378, 30, 563, 273, 365, 16186, 25577, 10531, 65, 469, 30, 364, 417, 316, 1311, 30, 766, 273, 365, 16186, 4646,...
def RevEBuild(self, commit_id="", redirect_file=None):
def RevEBuild(self, commit_id='', redirect_file=None):
def RevEBuild(self, commit_id="", redirect_file=None): """Revs an ebuild given the git commit id.
804ad7df2772bbb0df99bab523e0e6acca66ef39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/804ad7df2772bbb0df99bab523e0e6acca66ef39/cros_mark_as_stable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14477, 41, 3116, 12, 2890, 16, 3294, 67, 350, 2218, 2187, 3136, 67, 768, 33, 7036, 4672, 3536, 426, 6904, 392, 425, 3510, 864, 326, 5071, 3294, 612, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 14477, 41, 3116, 12, 2890, 16, 3294, 67, 350, 2218, 2187, 3136, 67, 768, 33, 7036, 4672, 3536, 426, 6904, 392, 425, 3510, 864, 326, 5071, 3294, 612, 18, 2, -100, -100, -100, -100, -100...
del self._pages[page.name]
del self._index[page.name]
def wiki_page_deleted(self, page): if self.has_page(page.name): self.log.debug('Removing page %s from index' % page.name) del self._pages[page.name]
6dc1e2ad50ff028cdb9f7af8c91260974857c895 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/6dc1e2ad50ff028cdb9f7af8c91260974857c895/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9050, 67, 2433, 67, 8600, 12, 2890, 16, 1363, 4672, 309, 365, 18, 5332, 67, 2433, 12, 2433, 18, 529, 4672, 365, 18, 1330, 18, 4148, 2668, 18939, 1363, 738, 87, 628, 770, 11, 738, 136...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9050, 67, 2433, 67, 8600, 12, 2890, 16, 1363, 4672, 309, 365, 18, 5332, 67, 2433, 12, 2433, 18, 529, 4672, 365, 18, 1330, 18, 4148, 2668, 18939, 1363, 738, 87, 628, 770, 11, 738, 136...
chentry.oldname= fname[1:-1]
chentry.old_name= fname[1:-1]
def convertDiff(self, chset): """ Fills a chset with the details data coming by a diff beetween chset lin_ancestor and revision (i.e. the linearized history) """ if not chset.lin_ancestor or not chset.revision or chset.lin_ancestor == chset.revision: raise GetUpstreamChangesetsFailure("internal error: MonotoneDiffParser.convertDiff called with invalid parameters: lin_ancestor %s, revision %s" % (chset.lin_ancestor, chset.revision)) # the order of revisions is very important. Monotone gives a diff from the first to the second cmd = self.repository.command("diff", "--db", self.repository.repository, "--revision", chset.lin_ancestor, "--revision", chset.revision)
5e96a5241ce99ae8e4ab742e13940953a5e18db2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/5e96a5241ce99ae8e4ab742e13940953a5e18db2/monotone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 5938, 12, 2890, 16, 462, 542, 4672, 3536, 14192, 87, 279, 462, 542, 598, 326, 3189, 501, 19283, 635, 279, 3122, 506, 8458, 462, 542, 4739, 67, 28798, 471, 6350, 261, 77, 18, 73, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 5938, 12, 2890, 16, 462, 542, 4672, 3536, 14192, 87, 279, 462, 542, 598, 326, 3189, 501, 19283, 635, 279, 3122, 506, 8458, 462, 542, 4739, 67, 28798, 471, 6350, 261, 77, 18, 73, ...
def populate_list_from_results (self, treeview_name):
def populate_list_from_results (self, treeview_name, thread):
def populate_list_from_results (self, treeview_name): """Check and acquire the lock""" if self.entry_lock.acquire (False) == False: if (self.last_pulse + 0.035) < time.time(): self.progress_bar.pulse () self.last_pulse = time.time() return True
46523ddcd022328735d34c97303e166c1ff3dd97 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11070/46523ddcd022328735d34c97303e166c1ff3dd97/youtube.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1652, 6490, 67, 1098, 67, 2080, 67, 4717, 261, 2890, 16, 2151, 1945, 67, 529, 16, 2650, 4672, 3536, 1564, 471, 10533, 326, 2176, 8395, 309, 365, 18, 4099, 67, 739, 18, 1077, 1039, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1652, 6490, 67, 1098, 67, 2080, 67, 4717, 261, 2890, 16, 2151, 1945, 67, 529, 16, 2650, 4672, 3536, 1564, 471, 10533, 326, 2176, 8395, 309, 365, 18, 4099, 67, 739, 18, 1077, 1039, 261, ...
('KEYM', bolt.csvFormat('ssfiss')+'\n',
('KEYM', bolt.csvFormat('ssfisss')+'\n',
def getSortedIds(stats): longids = stats.keys() longids.sort(key=lambda a: stats[a][0]) longids.sort(key=itemgetter(0)) return longids
aeca1db1240364fac710811ccc7f19b3a36b644a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/aeca1db1240364fac710811ccc7f19b3a36b644a/bosh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15175, 329, 2673, 12, 5296, 4672, 1525, 2232, 273, 3177, 18, 2452, 1435, 1525, 2232, 18, 3804, 12, 856, 33, 14661, 279, 30, 3177, 63, 69, 6362, 20, 5717, 1525, 2232, 18, 3804, 12, 856,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15175, 329, 2673, 12, 5296, 4672, 1525, 2232, 273, 3177, 18, 2452, 1435, 1525, 2232, 18, 3804, 12, 856, 33, 14661, 279, 30, 3177, 63, 69, 6362, 20, 5717, 1525, 2232, 18, 3804, 12, 856,...
if isinstance(other, spmatrix):
if isspmatrix(other):
def __mul__(self, other): if isinstance(other, spmatrix): return self.matmat(other) other = asarray(other) if rank(other) > 0: return self.matvec(other) res = dok_matrix() for key in self.keys(): res[key] = other * self[key] return res
bdabf856b614694a8ef20c73a7d82bda3a7cf386 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/bdabf856b614694a8ef20c73a7d82bda3a7cf386/sparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 16411, 972, 12, 2890, 16, 1308, 4672, 309, 353, 1752, 5667, 12, 3011, 4672, 327, 365, 18, 7373, 7373, 12, 3011, 13, 1308, 273, 10455, 12, 3011, 13, 309, 6171, 12, 3011, 13, 405, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16411, 972, 12, 2890, 16, 1308, 4672, 309, 353, 1752, 5667, 12, 3011, 4672, 327, 365, 18, 7373, 7373, 12, 3011, 13, 1308, 273, 10455, 12, 3011, 13, 309, 6171, 12, 3011, 13, 405, ...
'integer', """\ count(CASE WHEN NOT virus_%s_name is null AND virus_%s_name != '' THEN 1 ELSE null END)\ """ % (self.__vendor_name, self.__vendor_name)))
'integer', 'count(virus_%s_clean)' % self.__vendor_name))
def setup(self, start_date, end_date): self.__update_n_http_events(start_date, end_date) self.__update_n_mail_table('n_mail_msgs', start_date, end_date) self.__update_n_mail_table('n_mail_addrs', start_date, end_date)
e3bd9ff326663a60b6e32123547458ef772a5cdc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/87/e3bd9ff326663a60b6e32123547458ef772a5cdc/untangle_base_virus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 787, 67, 712, 16, 679, 67, 712, 4672, 365, 16186, 2725, 67, 82, 67, 2505, 67, 5989, 12, 1937, 67, 712, 16, 679, 67, 712, 13, 365, 16186, 2725, 67, 82, 67, 4408,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 787, 67, 712, 16, 679, 67, 712, 4672, 365, 16186, 2725, 67, 82, 67, 2505, 67, 5989, 12, 1937, 67, 712, 16, 679, 67, 712, 13, 365, 16186, 2725, 67, 82, 67, 4408,...
match = pattern.search(remaining)
match = pattern_search(remaining)
def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages.
018a79821ccb1056404d43dbe32e444d1a0e03c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/018a79821ccb1056404d43dbe32e444d1a0e03c1/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, -100, -100, -100, -100, -100,...
elif initial in numchars:
elif initial in numchars \ or (initial == '.' and token != '.'):
def tokenize(readline, tokeneater=printtoken): lnum = parenlev = continued = 0 namechars, numchars = string.letters + '_', string.digits contstr = '' indents = [0] while 1: # loop over lines in stream line = readline() lnum = lnum + 1 pos, max = 0, len(line) if contstr: # continued string if not line: raise TokenError, "EOF within multi-line string" if endprog.search(line) >= 0: pos = end = endprog.regs[0][1] tokeneater(STRING, contstr + line[:end], strstart, (lnum, end), line) contstr = '' else: contstr = contstr + line continue elif parenlev == 0 and not continued: # new statement if not line: break column = 0 while pos < max: # measure leading whitespace if line[pos] == ' ': column = column + 1 elif line[pos] == '\t': column = (column/tabsize + 1)*tabsize elif line[pos] == '\f': column = 0 else: break pos = pos + 1 if pos == max: break if line[pos] in '#\r\n': # skip comments or blank lines tokeneater((NEWLINE, COMMENT)[line[pos] == '#'], line[pos:], (lnum, pos), (lnum, len(line)), line) continue if column > indents[-1]: # count indents or dedents indents.append(column) tokeneater(INDENT, line[:pos], (lnum, 0), (lnum, pos), line) while column < indents[-1]: indents = indents[:-1] tokeneater(DEDENT, line[:pos], (lnum, 0), (lnum, pos), line) else: # continued statement if not line: raise TokenError, "EOF within multi-line statement" continued = 0 while pos < max: if pseudoprog.match(line, pos) > 0: # scan for tokens start, end = pseudoprog.regs[1] spos, epos = (lnum, start), (lnum, end) token, initial = line[start:end], line[start] pos = end if initial in namechars: # ordinary name tokeneater(NAME, token, spos, epos, line) elif initial in numchars: # ordinary number tokeneater(NUMBER, token, spos, epos, line) elif initial in '\r\n': tokeneater(NEWLINE, token, spos, epos, line) elif initial == '#': tokeneater(COMMENT, token, spos, epos, line) elif initial == '\\': # continued stmt continued = 1 elif token in ('\'\'\'', '"""'): # triple-quoted endprog = endprogs[token] if endprog.search(line, pos) >= 0: # all on one line pos = endprog.regs[0][1] token = line[start:pos] tokeneater(STRING, token, spos, (lnum, pos), line) else: strstart = (lnum, start) # multiple lines contstr = line[start:] break elif initial in '\'"': if token[-1] == '\n': # continued string strstart = (lnum, start) endprog, contstr = endprogs[initial], line[start:] break else: # ordinary string tokeneater(STRING, token, spos, epos, line) else: if initial in '([{': parenlev = parenlev + 1 elif initial in ')]}': parenlev = parenlev - 1 tokeneater(OP, token, spos, epos, line) else: tokeneater(ERRORTOKEN, line[pos], spos, (lnum, pos+1), line) pos = pos + 1 for indent in indents[1:]: # pop remaining indent levels tokeneater(DEDENT, '', (lnum, 0), (lnum, 0), '')
da67869f766cef01e3126399eb209553c39dc565 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/da67869f766cef01e3126399eb209553c39dc565/tokenize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13672, 12, 896, 1369, 16, 1147, 73, 2045, 33, 1188, 2316, 4672, 328, 2107, 273, 22146, 298, 90, 273, 17545, 5957, 273, 374, 508, 7549, 16, 818, 7549, 273, 533, 18, 26054, 397, 2070, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13672, 12, 896, 1369, 16, 1147, 73, 2045, 33, 1188, 2316, 4672, 328, 2107, 273, 22146, 298, 90, 273, 17545, 5957, 273, 374, 508, 7549, 16, 818, 7549, 273, 533, 18, 26054, 397, 2070, 21...
if self.isSimpleElementDeclaration(op):
simpleType = self.isSimpleElementDeclaration(op) if simpleType:
'\n%sdef %s(self, request):' % \
d9d3337d4084d54d35a9489cf9880e594989841c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/d9d3337d4084d54d35a9489cf9880e594989841c/wsdl2python.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2337, 82, 9, 87, 536, 738, 87, 12, 2890, 16, 590, 13, 2497, 738, 521, 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, 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, 2337, 82, 9, 87, 536, 738, 87, 12, 2890, 16, 590, 13, 2497, 738, 521, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def logmaker(wsite, welcomed_users): safety = list() rightime = time.localtime(time.time()) year = str(rightime[0]) month = str(rightime[1]) day = str(rightime[2]) if len(month) == 1: month = u'0' + month if wsite.lang == 'it': target = logg + '/' + day + '/' + month + '/' + year else: target = logg + '/' + year + '/' + month + '/' + day page = wikipedia.Page(wsite, target) try: safety.append(page.get()) except wikipedia.NoPage: if wsite.lang == 'it': safety.append(u'[[Categoria:Benvenuto log|{{subst:PAGENAME}}]]\n{|border="2" cellpadding="4" cellspacing="0" style="margin: 0.5em 0.5em 0.5em 1em; padding: 0.5em; background: elif wsite.lang == 'no': safety.append(u'[[Kategori:Velkomstlogg|{{PAGENAME}}]]\n{| class="wikitable"') else: safety.append(u'{|border="2" cellpadding="4" cellspacing="0" style="margin: 0.5em 0.5em 0.5em 1em; padding: 0.5em; background: safety.append('\n!' + usernam) safety.append(u'\n!' + contrib) for found_result in welcomed_users: luserpage = str(found_result[0]) luser = wikipedia.url2link(luserpage, wsite, wsite) edit_count = str(found_result[1]) logtext = u'\n{{WLE|user=%s|contribs=%s}}' % (luser, edit_count) safety.append(logtext) welcomed_users = list() try: page.put(''.join(safety), summ2) return True except wikipedia.EditConflict: wikipedia.output(u'An edit conflict has occured. Pausing for 10 seconds before continuing.') time.sleep(10) page = wikipedia.Page(wsite, target) try: page.put(u''.join(safety), summ2) return True except wikipedia.EditConflict: wikipedia.output(u'Another edit conflict... Skipping...') return False
def defineSign(wsite, signPageTitle): #A little function to load the random signatures. signPage = wikipedia.Page(wsite, signPageTitle) signText = signPage.get() reg = "\* ?(.*?)\n" listSign = re.findall(reg, signText) return listSign
7ec1f6271a4f088127d5a472e09cba4495a1851a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/7ec1f6271a4f088127d5a472e09cba4495a1851a/welcome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4426, 2766, 12, 91, 4256, 16, 1573, 1964, 4247, 4672, 468, 37, 12720, 445, 358, 1262, 326, 2744, 14862, 18, 1573, 1964, 273, 21137, 18, 1964, 12, 91, 4256, 16, 1573, 1964, 4247, 13, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4426, 2766, 12, 91, 4256, 16, 1573, 1964, 4247, 4672, 468, 37, 12720, 445, 358, 1262, 326, 2744, 14862, 18, 1573, 1964, 273, 21137, 18, 1964, 12, 91, 4256, 16, 1573, 1964, 4247, 13, 15...
elif 0: pass
def _lookup_point(self, x, y): """ Finds the point closest to a screen point if it is within self.threshold Parameters ========== x : float screen x-coordinate y : float screen y-coordinate
2857888daec82715ce2c031b01777818af3ae3ae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13167/2857888daec82715ce2c031b01777818af3ae3ae/edit_line.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8664, 67, 1153, 12, 2890, 16, 619, 16, 677, 4672, 3536, 4163, 87, 326, 1634, 9219, 358, 279, 5518, 1634, 309, 518, 353, 3470, 365, 18, 8699, 225, 7012, 422, 1432, 619, 294, 1431, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8664, 67, 1153, 12, 2890, 16, 619, 16, 677, 4672, 3536, 4163, 87, 326, 1634, 9219, 358, 279, 5518, 1634, 309, 518, 353, 3470, 365, 18, 8699, 225, 7012, 422, 1432, 619, 294, 1431, ...
def __init__(self, parent, x=None, check=True, is_gen=False, construct=False):
def __init__(self, parent, x=None, check=True, is_gen=False, construct=False):
def __init__(self, parent, x=None, check=True, is_gen=False, construct=False): Polynomial.__init__(self, parent, is_gen=is_gen)
95344256113633f3acd6280f89285a1bcf7387d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/95344256113633f3acd6280f89285a1bcf7387d9/polynomial_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 619, 33, 7036, 16, 866, 33, 5510, 16, 353, 67, 4507, 33, 8381, 16, 4872, 33, 8381, 4672, 6730, 13602, 16186, 2738, 972, 12, 2890, 16, 982, 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, 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, 982, 16, 619, 33, 7036, 16, 866, 33, 5510, 16, 353, 67, 4507, 33, 8381, 16, 4872, 33, 8381, 4672, 6730, 13602, 16186, 2738, 972, 12, 2890, 16, 982, 16,...
if reset or not nb.user_exists('admin'):
if reset or (not nb.user_exists('admin') and not nb.user_exists('root')):
def notebook_twisted(self, directory = 'sage_notebook', port = 8000, address = 'localhost', port_tries = 50, secure = False, reset = False, accounts = False, server_pool = None, ulimit = None, open_viewer = True): if not os.path.exists(directory): os.makedirs(directory) port = int(port) conf = '%s/twistedconf.tac'%directory nb = notebook.load_notebook(directory) if reset or not nb.user_exists('admin'): while True: print "Setting password for the admin user." passwd = getpass.getpass("Enter new password: ") passwd2 = getpass.getpass("Retype new password: ") if passwd != passwd2: print "Sorry, passwords do not match." else: break if reset: nb.user('admin').set_password(passwd) print "Password changed for user 'admin'." else: nb.create_default_users(passwd) print "User admin created with the password you specified." print "\n\n" print "*"*70 print "\n" if secure: print "Login to the SAGE notebook as admin with the password you specified above." if not server_pool is None: nb.set_server_pool(server_pool) if not ulimit is None: nb.set_ulimit(ulimit) nb.set_accounts(accounts) if os.path.exists('%s/nb-older-backup.sobj'%directory): nb._migrate_worksheets() os.unlink('%s/nb-older-backup.sobj'%directory) print "Updating to new format complete." nb.save() del nb def run(port): ## Create the config file if secure: if not os.path.exists(private_pem) or not os.path.exists(public_pem): print "In order to use an SECURE encrypted notebook, you must first run notebook.setup()." print "Now running notebook.setup()" notebook_setup() if not os.path.exists(private_pem) or not os.path.exists(public_pem): print "Failed to setup notebook. Please try notebook.setup() again manually." strport = 'tls:%s:privateKey=%s:certKey=%s'%(port, private_pem, public_pem) else: strport = 'tcp:%s'%port notebook_opts = '"%s",address="%s",port=%s,secure=%s' % (os.path.abspath(directory), address, port, secure) if open_viewer: open_page = "from sage.server.misc import open_page; open_page('%s', %s, %s)"%(address, port, secure) else: open_page = '' config = open(conf, 'w') config.write("""
78b0cce242229169d86f9635ac4420a4b379f498 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/78b0cce242229169d86f9635ac4420a4b379f498/run_notebook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 11246, 25444, 12, 2890, 16, 1867, 282, 273, 296, 87, 410, 67, 24422, 2187, 1756, 3639, 273, 1725, 3784, 16, 1758, 377, 273, 296, 13014, 2187, 1756, 67, 2007, 225, 273, 6437, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 11246, 25444, 12, 2890, 16, 1867, 282, 273, 296, 87, 410, 67, 24422, 2187, 1756, 3639, 273, 1725, 3784, 16, 1758, 377, 273, 296, 13014, 2187, 1756, 67, 2007, 225, 273, 6437, ...
occurrence of '$' followed by a name, or a name enclosed in braces, is considered a variable. Every variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' if it's not in 'local_vars'. 'os.environ' is first checked/ augmented to guarantee that it contains certain values: see '_check_environ()'. Raise ValueError for any variables not found in either 'local_vars' or 'os.environ'.
occurrence of '$' followed by a name is considered a variable, and variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' if it's not in 'local_vars'. 'os.environ' is first checked/augmented to guarantee that it contains certain values: see 'check_environ()'. Raise ValueError for any variables not found in either 'local_vars' or 'os.environ'.
def subst_vars (str, local_vars): """Perform shell/Perl-style variable substitution on 'string'. Every occurrence of '$' followed by a name, or a name enclosed in braces, is considered a variable. Every variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' if it's not in 'local_vars'. 'os.environ' is first checked/ augmented to guarantee that it contains certain values: see '_check_environ()'. Raise ValueError for any variables not found in either 'local_vars' or 'os.environ'. """ check_environ() def _subst (match, local_vars=local_vars): var_name = match.group(1) if local_vars.has_key(var_name): return str(local_vars[var_name]) else: return os.environ[var_name] return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, str)
940e6ca14112cd3890ce05e3a9374535dc165ea8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/940e6ca14112cd3890ce05e3a9374535dc165ea8/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27750, 67, 4699, 261, 701, 16, 1191, 67, 4699, 4672, 3536, 4990, 5972, 19, 2173, 80, 17, 4060, 2190, 12785, 603, 296, 1080, 10332, 225, 16420, 13083, 434, 11874, 10860, 635, 279, 508, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27750, 67, 4699, 261, 701, 16, 1191, 67, 4699, 4672, 3536, 4990, 5972, 19, 2173, 80, 17, 4060, 2190, 12785, 603, 296, 1080, 10332, 225, 16420, 13083, 434, 11874, 10860, 635, 279, 508, 35...
for uid in uids and (user not in users):
for uid in uids:
def get_moderatorUserObjects(self): """ Get the user objects corresponding to the moderator, assuming we can. """ member_groups = self.getProperty('moderator_groups', []) uids = [] for gid in member_groups: group = self.acl_users.getGroupById(gid) uids += group.getUsers() uids += self.getProperty('moderator_members', []) users = [] for uid in uids and (user not in users): user = self.acl_users.getUser(uid) if user: users.append(user) return users
6cd237344be4b0794ee3a67c1bcc57ea94657315 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6274/6cd237344be4b0794ee3a67c1bcc57ea94657315/XWFMailingList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1711, 7385, 1299, 4710, 12, 2890, 4672, 3536, 968, 326, 729, 2184, 4656, 358, 326, 681, 7385, 16, 15144, 732, 848, 18, 225, 3536, 3140, 67, 4650, 273, 365, 18, 588, 1396, 2668...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1711, 7385, 1299, 4710, 12, 2890, 4672, 3536, 968, 326, 729, 2184, 4656, 358, 326, 681, 7385, 16, 15144, 732, 848, 18, 225, 3536, 3140, 67, 4650, 273, 365, 18, 588, 1396, 2668...
form_tool.setValidators("base_edit", ["validate_base"])
form_tool.setValidators("base_metadata", ["validate_base"])
def install_validation(self, out, types): form_tool = getToolByName(self, 'portal_form') type_tool = getToolByName(self, 'portal_types') # No validation on references form_tool.setValidators('reference_edit', []) # Default validation for types form_tool.setValidators("base_edit", ["validate_base"]) form_tool.setValidators("base_edit", ["validate_base"]) form_tool.setValidators("base_translation", ["validate_base"]) form_tool.setValidators("manage_translations_form", ["validate_translations"])
dff4e5cfa787567631fcb94b61b972744571eeac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/dff4e5cfa787567631fcb94b61b972744571eeac/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 8685, 12, 2890, 16, 596, 16, 1953, 4672, 646, 67, 6738, 273, 336, 6364, 5911, 12, 2890, 16, 296, 24386, 67, 687, 6134, 618, 67, 6738, 273, 336, 6364, 5911, 12, 2890, 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, 3799, 67, 8685, 12, 2890, 16, 596, 16, 1953, 4672, 646, 67, 6738, 273, 336, 6364, 5911, 12, 2890, 16, 296, 24386, 67, 687, 6134, 618, 67, 6738, 273, 336, 6364, 5911, 12, 2890, 16, 29...
return self.open_https(newurl)
return self.open_https(newurl, data)
def retry_https_basic_auth(self, url, realm, data=None): host, selector = splithost(url) i = host.find('@') + 1 host = host[i:] user, passwd = self.get_user_passwd(host, realm, i) if not (user or passwd): return None host = user + ':' + passwd + '@' + host newurl = '//' + host + selector return self.open_https(newurl)
c49129f55e53fbee7e8e0a0ce7e9ed3e2f1e5776 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c49129f55e53fbee7e8e0a0ce7e9ed3e2f1e5776/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 4528, 67, 13240, 67, 1944, 12, 2890, 16, 880, 16, 11319, 16, 501, 33, 7036, 4672, 1479, 16, 3451, 273, 6121, 483, 669, 12, 718, 13, 277, 273, 1479, 18, 4720, 2668, 36, 6134...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 4528, 67, 13240, 67, 1944, 12, 2890, 16, 880, 16, 11319, 16, 501, 33, 7036, 4672, 1479, 16, 3451, 273, 6121, 483, 669, 12, 718, 13, 277, 273, 1479, 18, 4720, 2668, 36, 6134...
def by_twos( self, it ): iterator = iter( it ) try: while True: yield iterator.next(),iterator.next() except StopIteration, err: pass
def by_twos( self, it ): iterator = iter( it ) try: while True: yield iterator.next(),iterator.next() except StopIteration, err: pass
9416b3067be8e9ced457297dd4a3aef6d1612b0f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1545/9416b3067be8e9ced457297dd4a3aef6d1612b0f/spike.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 635, 67, 11246, 538, 12, 365, 16, 518, 262, 30, 2775, 273, 1400, 12, 518, 262, 775, 30, 1323, 1053, 30, 2824, 2775, 18, 4285, 9334, 9838, 18, 4285, 1435, 1335, 16179, 16, 393, 30, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 635, 67, 11246, 538, 12, 365, 16, 518, 262, 30, 2775, 273, 1400, 12, 518, 262, 775, 30, 1323, 1053, 30, 2824, 2775, 18, 4285, 9334, 9838, 18, 4285, 1435, 1335, 16179, 16, 393, 30, 13...
and self.verbose == other.verbose
and self.verbose == other.verbose \ and self.kshp == other.kshp
def __eq__(self, other): return type(self) == type(other) \ and self.border_mode == other.border_mode \ and self.subsample == other.subsample \ and self.logical_img_hw == other.logical_img_hw \ and self.logical_kern_hw == other.logical_kern_hw \ and self.logical_kern_align_top == other.logical_kern_align_top \ and self.version == other.version \ and self.verbose == other.verbose
25d6298fb7a41b613d7ad6fa9fe9f774bbabba71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/25d6298fb7a41b613d7ad6fa9fe9f774bbabba71/blas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 12, 2890, 16, 1308, 4672, 327, 618, 12, 2890, 13, 422, 618, 12, 3011, 13, 521, 471, 365, 18, 8815, 67, 3188, 422, 1308, 18, 8815, 67, 3188, 521, 471, 365, 18, 1717,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11253, 972, 12, 2890, 16, 1308, 4672, 327, 618, 12, 2890, 13, 422, 618, 12, 3011, 13, 521, 471, 365, 18, 8815, 67, 3188, 422, 1308, 18, 8815, 67, 3188, 521, 471, 365, 18, 1717,...
patt = re.compile("^\s+Table\s+C.[0-9a-z-]+\s*$")
patt = re.compile("^\s+Table\s+C.[0-9A-Za-z-]+\s*$")
def IsStartTable(self,s): #patt = re.compile("^\s+Table C[0-9a-z\.-]+.*\s+$") patt = re.compile("^\s+Table\s+C.[0-9a-z-]+\s*$") m = patt.match(s) assert self._IsInTable != True self._IsInTable = False if(m): print "Start", s self._IsInTable = True return True return False
1d98d58968a693abcf40bf18e15775b8ec3b67d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13995/1d98d58968a693abcf40bf18e15775b8ec3b67d8/ParseAttributes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2585, 1685, 1388, 12, 2890, 16, 87, 4672, 468, 84, 4558, 273, 283, 18, 11100, 2932, 17134, 87, 15, 1388, 385, 63, 20, 17, 29, 69, 17, 94, 5834, 23238, 4509, 64, 87, 26020, 7923, 2856...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2585, 1685, 1388, 12, 2890, 16, 87, 4672, 468, 84, 4558, 273, 283, 18, 11100, 2932, 17134, 87, 15, 1388, 385, 63, 20, 17, 29, 69, 17, 94, 5834, 23238, 4509, 64, 87, 26020, 7923, 2856...
packageIds = packages.keys()
def _optimizePackages(self, packages, parts, variants, minPackageSize, minPackageSizeForUnshared): # Support for merging small packages # The first common package before the selected package between two # or more parts is allowed to merge with. As the package which should be merged # may have requirements, these must be solved. The easiest way to be sure regarding # this issue, is to look out for another common package.
5071c7db0f61dffe1c1382f6368e86a563d2ceb3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/5071c7db0f61dffe1c1382f6368e86a563d2ceb3/PartBuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 29155, 11425, 12, 2890, 16, 5907, 16, 2140, 16, 12935, 16, 1131, 2261, 1225, 16, 1131, 2261, 1225, 1290, 984, 11574, 4672, 468, 13619, 364, 17256, 5264, 5907, 468, 1021, 1122, 2975, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29155, 11425, 12, 2890, 16, 5907, 16, 2140, 16, 12935, 16, 1131, 2261, 1225, 16, 1131, 2261, 1225, 1290, 984, 11574, 4672, 468, 13619, 364, 17256, 5264, 5907, 468, 1021, 1122, 2975, ...
if type(l.members) is type([]):
if type(l.members) is ListType:
def PreferStored(oldname, newname, newdefault=uniqueval, l=l, state=stored_state): """Use specified old value if new value does is not in stored state.
994228ca3f4154246e0b2cb8a8e4cb43e62bb866 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/994228ca3f4154246e0b2cb8a8e4cb43e62bb866/versions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2962, 586, 18005, 12, 1673, 529, 16, 26722, 16, 394, 1886, 33, 6270, 1125, 16, 328, 33, 80, 16, 919, 33, 22601, 67, 2019, 4672, 3536, 3727, 1269, 1592, 460, 309, 394, 460, 1552, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2962, 586, 18005, 12, 1673, 529, 16, 26722, 16, 394, 1886, 33, 6270, 1125, 16, 328, 33, 80, 16, 919, 33, 22601, 67, 2019, 4672, 3536, 3727, 1269, 1592, 460, 309, 394, 460, 1552, 353, ...
* If obj is a numpy.ndarray with compatible shape, a copy of obj with the given dtype, order and class vigra.%(name)s is created.
* If obj is another subtype of numpy.ndarray with compatible shape, a *transposed* copy of obj with the given dtype, order and class vigra.%(name)s is created. Transposition changes the order of the spatial dimensions from (x,y) or (z,y,x) to (x,y) and (x,y,z) respectively. The channel dimension is assumed to be the last dimension and remains in that position. (Use numpy.rollaxis() to adjust the input if necessary.) transform [y,x] indexing order into VIGRA's [x,y] convention.)
def _array_docstring_(name, shape, compat): return ''' Constructor: .. method:: %(name)s(obj, dtype=numpy.float32, order='V', init = True, value = None) :param obj: a data or shape object (see below) :param dtype: desired element type :param order: desired memory layout (see below) :param init: True: initialize the image with zeros; False: do not initialize the image :type init: boolean :param value: initialize the image with this value (overrides init) :type value: convertible to dtype **obj** may be one of the following * If obj is a vigra.%(name)s or a subclass, a copy of obj with the given dtype and order is created, and obj's class is transferred. * If obj is a numpy.ndarray with compatible shape, a copy of obj with the given dtype, order and class vigra.%(name)s is created. * If obj is a sequence, it is interpreted as a shape. When the shape is compatible, a new vigra.%(name)s with the given dtype and order is created. * Otherwise, or if the shape is not compatible, an exception is raised.
c8c5e8df5cd356966ecdb055ae2032453b9d17b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12582/c8c5e8df5cd356966ecdb055ae2032453b9d17b0/arraytypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1126, 67, 24675, 67, 12, 529, 16, 2179, 16, 4796, 4672, 327, 9163, 11417, 30, 225, 6116, 707, 2866, 8975, 529, 13, 87, 12, 2603, 16, 3182, 33, 15974, 18, 5659, 1578, 16, 1353, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1126, 67, 24675, 67, 12, 529, 16, 2179, 16, 4796, 4672, 327, 9163, 11417, 30, 225, 6116, 707, 2866, 8975, 529, 13, 87, 12, 2603, 16, 3182, 33, 15974, 18, 5659, 1578, 16, 1353, 2...
if (not sys.argv[i] in allowed_commandline_options) and (not i in self.processedArgs):
if (not sys.argv[i] in self.allowed_commandline_options) and \ (not i in self.processedArgs):
def getParam(self, noDialog=None, nCol = 1, checkArgs=True, useTkinter=None, verbose=False): ''' Get parameters from commandline option, configuration file, a parameter input dialog (if ``tkInter`` or ``wxPython`` is available and if *noDialog* is ``False``), and from interactive user input. ''' if noDialog in [True, False]: self.noDialog = noDialog elif '--noDialog' in sys.argv: self.noDialog = True else: self.noDialog = False # if useTkinter in [True, False]: self.useTkinter = useTkinter elif '--useTkinter' in sys.argv: self.useTkinter = True else: self.useTkinter = None # first try to use wxPython if not self.useTkinter: try: # wxPython might not exist imp.find_module('wx') except: self.useWxPython = False else: self.useWxPython = True # then tkInter if self.useTkinter or not self.useWxPython: # Tkinter should almost always exists, but ... try: imp.find_module('Tkinter') except: print "Tkinter can not be loaded. Please check your Python installation." self.useTkinter = False else: self.useTkinter = True # if self.noDialog or '-h' in sys.argv[1:] or '--help' in sys.argv[1:] \ or True not in map(lambda x:x.has_key('label'), self.options): return self.__termGetParam(False, True) else: # first assign values from non-GUI sources self.processedArgs = [] if self.configFile is not None: self.__getParamConfigFile() self.__getParamLongArg() self.__getParamShortArg() # for opt in self.options: if opt.has_key('separator'): continue if opt['value'] is None and opt.has_key('default'): opt['value'] = opt['default'] # look if any argument was not processed for i in range(1, len(sys.argv)): if (not sys.argv[i] in allowed_commandline_options) and (not i in self.processedArgs): raise exceptions.ValueError("Unprocessed command line argument: " + sys.argv[i]) # call dialog title = os.path.split(sys.argv[0])[-1] if self.useTkinter: return _tkParamDialog(self.options, title, self.doc, self.details, nCol).getParam() elif self.useWxPython: return _wxParamDialog(self.options, title, self.doc, self.details, nCol).getParam() else: return self.__termGetParam(self.options, False, True) return False
84f4cb18ad1ca1b3b2af57319388a364da1f8f6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/401/84f4cb18ad1ca1b3b2af57319388a364da1f8f6a/simuOpt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9027, 12, 2890, 16, 1158, 6353, 33, 7036, 16, 290, 914, 273, 404, 16, 866, 2615, 33, 5510, 16, 999, 56, 79, 2761, 33, 7036, 16, 3988, 33, 8381, 4672, 9163, 968, 1472, 628, 28305, 145...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9027, 12, 2890, 16, 1158, 6353, 33, 7036, 16, 290, 914, 273, 404, 16, 866, 2615, 33, 5510, 16, 999, 56, 79, 2761, 33, 7036, 16, 3988, 33, 8381, 4672, 9163, 968, 1472, 628, 28305, 145...
if self.input.get('details'):
if self.input.get('details', '').lower() == 'true':
def after_request(self): if self.output: d = simplejson.loads(self.output)
83bddfbaf490bbdf1b456ce5c277c4d80c21d9ca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3913/83bddfbaf490bbdf1b456ce5c277c4d80c21d9ca/adapter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1839, 67, 2293, 12, 2890, 4672, 309, 365, 18, 2844, 30, 302, 273, 4143, 1977, 18, 17135, 12, 2890, 18, 2844, 13, 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, 1839, 67, 2293, 12, 2890, 4672, 309, 365, 18, 2844, 30, 302, 273, 4143, 1977, 18, 17135, 12, 2890, 18, 2844, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
try: version.save(absolute_version_path, quality=VERSION_QUALITY, optimize=(os.path.splitext(version_path)[1].lower() != '.gif')) except IOError: version.save(absolute_version_path, quality=VERSION_QUALITY)
if version: try: version.save(absolute_version_path, quality=VERSION_QUALITY, optimize=(os.path.splitext(version_path)[1].lower() != '.gif')) except IOError: version.save(absolute_version_path, quality=VERSION_QUALITY) else: pass
def version_generator(value, version_prefix, force=None): """ Generate Version for an Image. value has to be a serverpath relative to MEDIA_ROOT. """ # PIL's Error "Suspension not allowed here" work around: # s. http://mail.python.org/pipermail/image-sig/1999-August/000816.html if STRICT_PIL: from PIL import ImageFile else: try: from PIL import ImageFile except ImportError: import ImageFile ImageFile.MAXBLOCK = IMAGE_MAXBLOCK # default is 64k try: im = Image.open(smart_str(os.path.join(MEDIA_ROOT, value))) version_path = get_version_path(value, version_prefix) absolute_version_path = smart_str(os.path.join(MEDIA_ROOT, version_path)) version_dir = os.path.split(absolute_version_path)[0] if not os.path.isdir(version_dir): os.makedirs(version_dir) os.chmod(version_dir, 0775) version = scale_and_crop(im, VERSIONS[version_prefix]['width'], VERSIONS[version_prefix]['height'], VERSIONS[version_prefix]['opts']) try: version.save(absolute_version_path, quality=VERSION_QUALITY, optimize=(os.path.splitext(version_path)[1].lower() != '.gif')) except IOError: version.save(absolute_version_path, quality=VERSION_QUALITY) return version_path except: return None
d1cb694a85d6f04c748c9ab0b9564be7f004377d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12975/d1cb694a85d6f04c748c9ab0b9564be7f004377d/functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1177, 67, 8812, 12, 1132, 16, 1177, 67, 3239, 16, 2944, 33, 7036, 4672, 3536, 6654, 4049, 364, 392, 3421, 18, 460, 711, 358, 506, 279, 1438, 803, 3632, 358, 26312, 67, 9185, 18, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1177, 67, 8812, 12, 1132, 16, 1177, 67, 3239, 16, 2944, 33, 7036, 4672, 3536, 6654, 4049, 364, 392, 3421, 18, 460, 711, 358, 506, 279, 1438, 803, 3632, 358, 26312, 67, 9185, 18, 3536, ...
if tarinfo.chksum not in calc_chksums(buf): self._dbg(1, "tarfile: Bad Checksum %r" % tarinfo.name)
def next(self): """Return the next member of the archive as a TarInfo object, when TarFile is opened for reading. Return None if there is no more available. """ self._check("ra") if self.firstmember is not None: m = self.firstmember self.firstmember = None return m
fd5733053dc6a088a58dd9de2321ef1c14fb7cf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd5733053dc6a088a58dd9de2321ef1c14fb7cf4/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 3536, 990, 326, 1024, 3140, 434, 326, 5052, 487, 279, 20334, 966, 733, 16, 1347, 20334, 812, 353, 10191, 364, 6453, 18, 2000, 599, 309, 1915, 353, 1158, 1898, 2319,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 3536, 990, 326, 1024, 3140, 434, 326, 5052, 487, 279, 20334, 966, 733, 16, 1347, 20334, 812, 353, 10191, 364, 6453, 18, 2000, 599, 309, 1915, 353, 1158, 1898, 2319,...
def _AssembleInstanceDisks(instance, cfg, ignore_secondaries=False):
def _AssembleInstanceDisks(lu, instance, ignore_secondaries=False):
def _AssembleInstanceDisks(instance, cfg, ignore_secondaries=False): """Prepare the block devices for an instance. This sets up the block devices on all nodes. Args: instance: a ganeti.objects.Instance object ignore_secondaries: if true, errors on secondary nodes won't result in an error return from the function Returns: false if the operation failed list of (host, instance_visible_name, node_visible_name) if the operation suceeded with the mapping from node devices to instance devices """ device_info = [] disks_ok = True iname = instance.name # With the two passes mechanism we try to reduce the window of # opportunity for the race condition of switching DRBD to primary # before handshaking occured, but we do not eliminate it # The proper fix would be to wait (with some limits) until the # connection has been made and drbd transitions from WFConnection # into any other network-connected state (Connected, SyncTarget, # SyncSource, etc.) # 1st pass, assemble on all nodes in secondary mode for inst_disk in instance.disks: for node, node_disk in inst_disk.ComputeNodeTree(instance.primary_node): cfg.SetDiskID(node_disk, node) result = rpc.call_blockdev_assemble(node, node_disk, iname, False) if not result: logger.Error("could not prepare block device %s on node %s" " (is_primary=False, pass=1)" % (inst_disk.iv_name, node)) if not ignore_secondaries: disks_ok = False # FIXME: race condition on drbd migration to primary # 2nd pass, do only the primary node for inst_disk in instance.disks: for node, node_disk in inst_disk.ComputeNodeTree(instance.primary_node): if node != instance.primary_node: continue cfg.SetDiskID(node_disk, node) result = rpc.call_blockdev_assemble(node, node_disk, iname, True) if not result: logger.Error("could not prepare block device %s on node %s" " (is_primary=True, pass=2)" % (inst_disk.iv_name, node)) disks_ok = False device_info.append((instance.primary_node, inst_disk.iv_name, result)) # leave the disks configured for the primary node # this is a workaround that would be fixed better by # improving the logical/physical id handling for disk in instance.disks: cfg.SetDiskID(disk, instance.primary_node) return disks_ok, device_info
b9bddb6bdf7ac5841c732845ce0122c64bb026b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/b9bddb6bdf7ac5841c732845ce0122c64bb026b1/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1463, 10045, 1442, 22021, 12, 28832, 16, 791, 16, 2305, 67, 8538, 5646, 33, 8381, 4672, 3536, 7543, 326, 1203, 7166, 364, 392, 791, 18, 225, 1220, 1678, 731, 326, 1203, 7166, 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, 389, 1463, 10045, 1442, 22021, 12, 28832, 16, 791, 16, 2305, 67, 8538, 5646, 33, 8381, 4672, 3536, 7543, 326, 1203, 7166, 364, 392, 791, 18, 225, 1220, 1678, 731, 326, 1203, 7166, 603, ...
if segments[i] == '..' and segments[i-1]:
if (segments[i] == '..' and segments[i-1] not in ('', '..')):
def urljoin(base, url, allow_fragments = 1): """Join a base URL and a possibly relative URL to form an absolute interpretation of the latter.""" if not base: return url bscheme, bnetloc, bpath, bparams, bquery, bfragment = \ urlparse(base, '', allow_fragments) scheme, netloc, path, params, query, fragment = \ urlparse(url, bscheme, allow_fragments) if scheme != bscheme or scheme not in uses_relative: return urlunparse((scheme, netloc, path, params, query, fragment)) if scheme in uses_netloc: if netloc: return urlunparse((scheme, netloc, path, params, query, fragment)) netloc = bnetloc if path[:1] == '/': return urlunparse((scheme, netloc, path, params, query, fragment)) if not path: return urlunparse((scheme, netloc, bpath, params, query or bquery, fragment)) segments = bpath.split('/')[:-1] + path.split('/') # XXX The stuff below is bogus in various ways... if segments[-1] == '.': segments[-1] = '' while '.' in segments: segments.remove('.') while 1: i = 1 n = len(segments) - 1 while i < n: if segments[i] == '..' and segments[i-1]: del segments[i-1:i+1] break i = i+1 else: break if len(segments) == 2 and segments[1] == '..' and segments[0] == '': segments[-1] = '' elif len(segments) >= 2 and segments[-1] == '..': segments[-2:] = [''] return urlunparse((scheme, netloc, '/'.join(segments), params, query, fragment))
62c68225b7fc812b6d680e83f854e31ec5dee9a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/62c68225b7fc812b6d680e83f854e31ec5dee9a5/urlparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25447, 12, 1969, 16, 880, 16, 1699, 67, 29528, 273, 404, 4672, 3536, 4572, 279, 1026, 1976, 471, 279, 10016, 3632, 1976, 358, 646, 392, 4967, 10634, 367, 434, 326, 23740, 12123, 309, 486...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25447, 12, 1969, 16, 880, 16, 1699, 67, 29528, 273, 404, 4672, 3536, 4572, 279, 1026, 1976, 471, 279, 10016, 3632, 1976, 358, 646, 392, 4967, 10634, 367, 434, 326, 23740, 12123, 309, 486...
r"(?P<ltgt>'[^']+'|\"[^\"]+\"|[^\] ]+)"
r"(?P<ltgt>'[^']+'|\"[^\"]+\"|[^\] ]*)"
def process(self, req, text, inline=False): if self.error: return system_message('Error: Failed to load processor <code>%s</code>' % self.name, self.error) text = self.processor(req, text) if inline: code_block_start = re.compile('^<div class="code-block">') code_block_end = re.compile('</div>$') text, nr = code_block_start.subn('<span class="code-block">', text, 1 ) if nr: text, nr = code_block_end.subn('</span>', text, 1 ) return text else: return text
64d6de0d5419586e616750f711a9e08eef3be2a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/64d6de0d5419586e616750f711a9e08eef3be2a2/formatter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 1111, 16, 977, 16, 6370, 33, 8381, 4672, 309, 365, 18, 1636, 30, 327, 2619, 67, 2150, 2668, 668, 30, 11175, 358, 1262, 6659, 411, 710, 9822, 87, 1757, 710, 1870, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 1111, 16, 977, 16, 6370, 33, 8381, 4672, 309, 365, 18, 1636, 30, 327, 2619, 67, 2150, 2668, 668, 30, 11175, 358, 1262, 6659, 411, 710, 9822, 87, 1757, 710, 1870, ...
if traceVerbosity>=7: print "
if traceVerbosity>=7: iface.debug("getNecessary(%s) -> %s" % (pkg, sorted(necdct.keys())))
def getNecessary(self, pkg, ignorepkgs={}): """ Return the set of packages for which pkg is necessary (i.e., a chain of requires with no alternatives). """
82a6041bbf39ce3c6dc9b0e073bf02eb34d8cc34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/82a6041bbf39ce3c6dc9b0e073bf02eb34d8cc34/transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11069, 4128, 12, 2890, 16, 3475, 16, 2305, 25376, 12938, 4672, 3536, 2000, 326, 444, 434, 5907, 364, 1492, 3475, 353, 4573, 261, 77, 18, 73, 12990, 279, 2687, 434, 4991, 598, 1158, 20699...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11069, 4128, 12, 2890, 16, 3475, 16, 2305, 25376, 12938, 4672, 3536, 2000, 326, 444, 434, 5907, 364, 1492, 3475, 353, 4573, 261, 77, 18, 73, 12990, 279, 2687, 434, 4991, 598, 1158, 20699...
manager.unregisterUtility(name, spec.iface)
manager.unregisterUtility(local_utility, spec.iface, name)
def setUpUtilities(site, specs): manager = site.getSiteManager() default = zapi.traverse(site, '++etc++site/default') for spec in specs: local_utility = getLocalUtility(default, spec) if local_utility is not None: if spec.override: # override existing utility name = local_utility.__name__ manager.unregisterUtility(name, spec.iface) del default[name] else: # do not register this utility; we already got it continue utility = spec.factory() default[spec.storage_name] = utility if spec.setUp is not None: spec.setUp(utility) manager.registerUtility(utility, spec.iface, spec.utility_name)
53c3c12aea080763a7af7b8f20ad2548aca8a8a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7127/53c3c12aea080763a7af7b8f20ad2548aca8a8a4/utility.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 11864, 12, 4256, 16, 10607, 4672, 3301, 273, 2834, 18, 588, 4956, 1318, 1435, 805, 273, 998, 2425, 18, 2033, 2476, 12, 4256, 16, 296, 9904, 14175, 9904, 4256, 19, 1886, 6134, 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, 24292, 11864, 12, 4256, 16, 10607, 4672, 3301, 273, 2834, 18, 588, 4956, 1318, 1435, 805, 273, 998, 2425, 18, 2033, 2476, 12, 4256, 16, 296, 9904, 14175, 9904, 4256, 19, 1886, 6134, 364,...
SHIFT=4
SHIFT=0
def processHistos(image, pos, p): out = [[] for t in range(0, image.get_header()['dim'][4])] #generate the histogram for measurements for t in range(0, image.get_header()['dim'][4]): upper = image.get_data()[pos[0],pos[1],pos[2],t,p, -2] lower = image.get_data()[pos[0],pos[1],pos[2],t,p, -3] count = image.get_header()['dim'][6] - 3 width = (upper-lower)/count # print lower, upper, count, width if isinf(lower) : print image.get_data()[pos[0],pos[1],pos[2],t, p, 0:-3] histinput = [[] for j in range(0, image.get_header()['dim'][6]-3)] for j in range(0, image.get_header()['dim'][6]-3): histinput[j] = [image.get_data()[pos[0],pos[1],pos[2],t, p, j], lower+width*j, \ lower+width*(j+1)] out[t] = histo(histinput) return out
f60d63a4afd00ce55bdba6e863061dff3401f117 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5491/f60d63a4afd00ce55bdba6e863061dff3401f117/makehist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 8648, 538, 12, 2730, 16, 949, 16, 293, 4672, 596, 273, 306, 8526, 364, 268, 316, 1048, 12, 20, 16, 1316, 18, 588, 67, 3374, 1435, 3292, 3509, 3546, 63, 24, 5717, 65, 468, 7163,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8648, 538, 12, 2730, 16, 949, 16, 293, 4672, 596, 273, 306, 8526, 364, 268, 316, 1048, 12, 20, 16, 1316, 18, 588, 67, 3374, 1435, 3292, 3509, 3546, 63, 24, 5717, 65, 468, 7163,...
wtd = wtd - len(decdata)
wtd = totalwtd - len(decdata)
def read(self, wtd):
e3c3ec9c4e7c9095d966bf4ecb7ace0824410412 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e3c3ec9c4e7c9095d966bf4ecb7ace0824410412/binhex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 341, 4465, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 341, 4465, 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,...
cr = pooler.get_db(db).cursor() if password: cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password))) else: cr.execute('select id from res_users where login=%s and password is null and active', (tools.ustr(login),))
if not password: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password)))
def login(db, login, password): cr = pooler.get_db(db).cursor() if password: cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password))) else: cr.execute('select id from res_users where login=%s and password is null and active', (tools.ustr(login),)) res = cr.fetchone() cr.close() if res: return res[0] else: return False
055e2de6ed4666ab9a52b4bd3f96d33acf374251 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/055e2de6ed4666ab9a52b4bd3f96d33acf374251/security.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 12, 1966, 16, 3925, 16, 2201, 4672, 309, 486, 2201, 30, 327, 1083, 4422, 273, 2845, 264, 18, 588, 67, 1966, 12, 1966, 2934, 9216, 1435, 4422, 18, 8837, 2668, 4025, 612, 628, 400,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 12, 1966, 16, 3925, 16, 2201, 4672, 309, 486, 2201, 30, 327, 1083, 4422, 273, 2845, 264, 18, 588, 67, 1966, 12, 1966, 2934, 9216, 1435, 4422, 18, 8837, 2668, 4025, 612, 628, 400,...
fill(mat, p-[1,dir], -dir)
fill(mat, p - [1, dir], -dir)
def fill(mat,p,dir): """ Fill a curve drawn in matrix mat, as 1's over a background of 0's, with 1's. p is V(i,j) of a point to fill from. dir is 1 or -1 for the standard recursive fill algorithm. Here is an explanation of how this is used and how it works then, by Huaicai: This function is used to fill the area between the rectangle bounding box and the boundary of the curve with 1's. The bounding box is extended by (lower left corner -2, right top corner + 2). The curve boundary is filled with 1's. So mat[1,:] = 0, mat[-1,:]=0, mat[:, 1]=0; mat[:, -1]=0, which means the area is connected. If we start from mat[1,1], dir =1, then we scan the first line from left to right. If it's 0, fill it as 1 until we touch 1. For each element in the line, we also check it's neighbor above and below. For the neighbor elements, if the neighbor touches 1 but previous neighbor is 0, then scan the neighbor line in the reverse order. I think this algorithm is better than the simple recursive flood filling algorithm. The seed mat[1,1] is always inside the area, and most probably this filling area is smaller than that inside the curve. I think it also reduces repeated checking/filling of the classical algorithm. """ if mat[p]: return up = dn = 0 o1 = array([1,0]) od = array([0, dir]) while not mat[p-od]: p -= od while not mat[p]: mat[p] = 1 if mat[p-o1]: if up: fill(mat, p-[1,dir], -dir) up = 0 else: up = 1 if mat[p+o1]: if dn: fill(mat, p+[1,-dir], -dir) dn = 0 else: dn = 1 p += od fill(mat, p-od+o1, -dir) fill(mat, p-od-o1, -dir) # note: we have (probably) seen recursion limit errors from this line. [bruce 070605 comment]
be7153ce421a674e97de640e3063c3bb1bccf4a9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/be7153ce421a674e97de640e3063c3bb1bccf4a9/shape.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 12, 7373, 16, 84, 16, 1214, 4672, 3536, 14192, 279, 8882, 19377, 316, 3148, 4834, 16, 487, 404, 1807, 1879, 279, 5412, 434, 374, 1807, 16, 598, 404, 1807, 18, 293, 353, 776, 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, 3636, 12, 7373, 16, 84, 16, 1214, 4672, 3536, 14192, 279, 8882, 19377, 316, 3148, 4834, 16, 487, 404, 1807, 1879, 279, 5412, 434, 374, 1807, 16, 598, 404, 1807, 18, 293, 353, 776, 12, ...
k = len(G.rows())
def assmus_mattson_designs(self,t,mode=None): r""" Assmus and Mattson Theorem (section 8.4, page 303 of [HP]): Let $A_0, A_1, ..., A_n$ be the weights of the codewords in a binary linear $[n , k, d]$ code $C$, and let $A_0^*, A_1^*, ..., A_n^*$ be the weights of the codewords in its dual $[n, n-k, d^*]$ code $C^*$. Fix a $t$, $0<t<d$, and let $$ s = |{ i | A_i^* \not= 0, 0<i\leq n-t}|. $$ Assume $s\leq d-t$. (1) If $Ai\not= 0$ and $d\leq i\leq n then Ci = { c in C | wt(c) = i}$ holds a simple t-design.
3a7625918ca06799454663aea3e731edc0d084bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/3a7625918ca06799454663aea3e731edc0d084bf/linear_code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1551, 81, 407, 67, 81, 4558, 816, 67, 16934, 87, 12, 2890, 16, 88, 16, 3188, 33, 7036, 4672, 436, 8395, 4725, 81, 407, 471, 490, 4558, 816, 1021, 479, 81, 261, 3464, 1725, 18, 24, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1551, 81, 407, 67, 81, 4558, 816, 67, 16934, 87, 12, 2890, 16, 88, 16, 3188, 33, 7036, 4672, 436, 8395, 4725, 81, 407, 471, 490, 4558, 816, 1021, 479, 81, 261, 3464, 1725, 18, 24, ...
an_integer = Integer() a_float = Float()
an_integer = Integer(required=False) a_float = Float(required=False)
def prepare_widget(self, spinbutton): Display_Number_As_Spinbutton.prepare_widget(self, spinbutton) spinbutton.set_digits(0)
5eb8599b421a4aaf3fec3e1a4ac12381b2b69d9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2510/5eb8599b421a4aaf3fec3e1a4ac12381b2b69d9d/checkwidgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 6587, 12, 2890, 16, 12490, 5391, 4672, 9311, 67, 1854, 67, 1463, 67, 3389, 267, 5391, 18, 9366, 67, 6587, 12, 2890, 16, 12490, 5391, 13, 12490, 5391, 18, 542, 67, 16649, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 6587, 12, 2890, 16, 12490, 5391, 4672, 9311, 67, 1854, 67, 1463, 67, 3389, 267, 5391, 18, 9366, 67, 6587, 12, 2890, 16, 12490, 5391, 13, 12490, 5391, 18, 542, 67, 16649, 12, ...
tempFile.setFormat(getFormat(session, format));
tempFile.setFormat(getFormat(queryService, CSV_FORMAT));
def createFileFromData(updateService, filename, data, format): """ Create a file from the data of type format, setting sha1, .. @param updateService The updateService to create the annotation link. @param filename The name of the file. @param data The data to save. @param format The Format of the file. @return The newly created OriginalFile. """ tempFile = omero.model.OriginalFileI(); tempFile.setName(omero.rtypes.rstring(filename)); tempFile.setPath(omero.rtypes.rstring(filename)); tempFile.setFormat(getFormat(session, format)); tempFile.setSize(omero.rtypes.rlong(len(data))); tempFile.setSha1(omero.rtypes.rstring(calcSha1FromData(data))); return updateService.saveAndReturnObject(tempFile);
08781ea68d3dd27bb2aeac94d373095edd6ca82c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/08781ea68d3dd27bb2aeac94d373095edd6ca82c/script_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21266, 1265, 751, 12, 2725, 1179, 16, 1544, 16, 501, 16, 740, 4672, 3536, 1788, 279, 585, 628, 326, 501, 434, 618, 740, 16, 3637, 6056, 21, 16, 6116, 632, 891, 1089, 1179, 1021, 1089, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21266, 1265, 751, 12, 2725, 1179, 16, 1544, 16, 501, 16, 740, 4672, 3536, 1788, 279, 585, 628, 326, 501, 434, 618, 740, 16, 3637, 6056, 21, 16, 6116, 632, 891, 1089, 1179, 1021, 1089, ...
instruc = instruc.replace(","," ") instruc = instruc.lower() instruc = instruc.split(" ") for element in instruc: if element.find(" ") != -1: print "element " + element + "had whitespace... sanitizing" element.replace(" ", "") print "sanitized: element" if element == "": instruc.remove(element)
instruc = sanitize(instruc)
def parse_alu(instruc = "", word_buf = ""): if instruc == "" or word_buf == "": print "ERROR: someone accidentally the code in parse_alu" return "-1" instruc = instruc.replace(","," ") instruc = instruc.lower() instruc = instruc.split(" ") #instruc is now a list for element in instruc: if element.find(" ") != -1: print "element " + element + "had whitespace... sanitizing" element.replace(" ", "") print "sanitized: element" if element == "": instruc.remove(element) ins = instruc[0] regD = instruc[1] regS = instruc[2] regT = instruc[3] regD = reg2bin(regD) regS = reg2bin(regS) word_buf += regD word_buf += regS if ins == "add": if isInt(regT): word_buf += "1" regT = int(regT) word_buf += int2bin(regT, 5) else: word_buf += "000" word_buf += reg2bin(regT) elif ins == "mul": word_buf += "001" word_buf += reg2bin(regT) elif ins == "sub": word_buf += "010" word_buf += reg2bin(regT) elif ins == "div": word_buf += "011" word_buf += reg2bin(regT) else: print "ERROR: someone accidentally'd the parse_alu method" return "-1" return word_buf
c9041b22a5fae24347e6995b51cec7b258f41bc2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4891/c9041b22a5fae24347e6995b51cec7b258f41bc2/assembler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 700, 12, 267, 701, 5286, 273, 23453, 2076, 67, 4385, 273, 1408, 4672, 309, 16170, 5286, 422, 1408, 578, 2076, 67, 4385, 422, 1408, 30, 1172, 315, 3589, 30, 18626, 25961, 1230, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 700, 12, 267, 701, 5286, 273, 23453, 2076, 67, 4385, 273, 1408, 4672, 309, 16170, 5286, 422, 1408, 578, 2076, 67, 4385, 422, 1408, 30, 1172, 315, 3589, 30, 18626, 25961, 1230, ...
""" underscores in literals shouldn't do unterlining """
""" underscores in literals shouldn't do underlining """
def testUnderlinesWithoutWithspaces(self): """ underscores in literals shouldn't do unterlining """
3f6e2ae459b5a30ba3ce41daba7d96cdd1fe0431 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3f6e2ae459b5a30ba3ce41daba7d96cdd1fe0431/testStructuredText.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 14655, 3548, 8073, 1190, 9554, 12, 2890, 4672, 3536, 24714, 316, 18228, 12044, 1404, 741, 640, 387, 7511, 310, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 14655, 3548, 8073, 1190, 9554, 12, 2890, 4672, 3536, 24714, 316, 18228, 12044, 1404, 741, 640, 387, 7511, 310, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
el1 = etree.SubElement(root, 'meta:editing-cycles')
el1 = SubElement(root, 'meta:editing-cycles')
def create_meta(self): root = etree.Element('office:document-meta', attrib=META_NAMESPACE_DICT) doc = etree.ElementTree(root) root = etree.SubElement(root, 'office:meta') el1 = etree.SubElement(root, 'meta:generator') el1.text = 'Docutils/rst2odf.py/%s' % (VERSION, ) s1 = os.environ.get('USER', '') el1 = etree.SubElement(root, 'meta:initial-creator') el1.text = s1 s2 = time.strftime('%Y-%m-%dT%H:%M:%S', time.localtime()) el1 = etree.SubElement(root, 'meta:creation-date') el1.text = s2 el1 = etree.SubElement(root, 'dc:creator') el1.text = s1 el1 = etree.SubElement(root, 'dc:date') el1.text = s2 el1 = etree.SubElement(root, 'dc:language') el1.text = 'en-US' el1 = etree.SubElement(root, 'meta:editing-cycles') el1.text = '1' el1 = etree.SubElement(root, 'meta:editing-duration') el1.text = 'PT00M01S' title = self.visitor.get_title() el1 = etree.SubElement(root, 'dc:title') if title: el1.text = title else: el1.text = '[no title]' s1 = etree.tostring(doc) #doc = minidom.parseString(s1) #s1 = doc.toprettyxml(' ') return s1
57ceb741b8ea9b94d9b9e314a03912d12bd3c5c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/57ceb741b8ea9b94d9b9e314a03912d12bd3c5c5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3901, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 19789, 30, 5457, 17, 3901, 2187, 5885, 33, 19294, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3901, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 19789, 30, 5457, 17, 3901, 2187, 5885, 33, 19294, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, ...
pushre = re.compile('^push .*$')
def sendCMD(self, cmdline, newline = True, sleep = 0): promptre = re.compile(self.prompt_regex + '$')
02223128cd056cb013609966605554a83eff291d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/02223128cd056cb013609966605554a83eff291d/devicemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 19473, 12, 2890, 16, 22877, 16, 9472, 273, 1053, 16, 5329, 273, 374, 4672, 6866, 266, 273, 283, 18, 11100, 12, 2890, 18, 13325, 67, 7584, 397, 3365, 6134, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 19473, 12, 2890, 16, 22877, 16, 9472, 273, 1053, 16, 5329, 273, 374, 4672, 6866, 266, 273, 283, 18, 11100, 12, 2890, 18, 13325, 67, 7584, 397, 3365, 6134, 2, -100, -100, -100, -1...
self.storage._log(msg, zLOG.ERROR)
log(msg, zLOG.ERROR)
def store(self, oid, serial, data, version): try: newserial = self.storage.store(oid, serial, data, version, self.txn) except TransactionError, err: # Storage errors are passed to the client newserial = err except Exception: # Unexpected storage errors are logged and passed to the client exc_info = sys.exc_info() self.storage._log("store error: %s, %s" % exc_info[:2], zLOG.ERROR, error=exc_info) newserial = exc_info[1] del exc_info else: if serial != "\0\0\0\0\0\0\0\0": self.invalidated.append((oid, version))
3366502b09a2c607316c80421c66d2ebc4026c22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/3366502b09a2c607316c80421c66d2ebc4026c22/StorageServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 12, 2890, 16, 7764, 16, 2734, 16, 501, 16, 1177, 4672, 775, 30, 394, 8818, 273, 365, 18, 5697, 18, 2233, 12, 839, 16, 2734, 16, 501, 16, 1177, 16, 365, 18, 24790, 13, 1335, 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, 1707, 12, 2890, 16, 7764, 16, 2734, 16, 501, 16, 1177, 4672, 775, 30, 394, 8818, 273, 365, 18, 5697, 18, 2233, 12, 839, 16, 2734, 16, 501, 16, 1177, 16, 365, 18, 24790, 13, 1335, 5...
'state': fields.function(_state, method=True, string='Membership State', type='selection', selection=STATE, store=True),
'state': fields.function( _state, method=True, string='Membership State', type='selection', selection=STATE, store = { 'account.invoice':(_get_membership_lines, ['state'], 10), }),
def _state(self, cr, uid, ids, name, args, context=None): """Compute the state lines @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Membership Line IDs @param name: Field Name @param context: A standard dictionary for contextual values @param return: Dictionary of state Value """ res = {} for line in self.browse(cr, uid, ids): cr.execute(''' SELECT i.state, i.id FROM account_invoice i WHERE i.id = ( SELECT l.invoice_id FROM account_invoice_line l WHERE l.id = ( SELECT ml.account_invoice_line FROM membership_membership_line ml WHERE ml.id = %s ) ) ''', (line.id,)) fetched = cr.fetchone() if not fetched : res[line.id] = 'canceled' continue istate = fetched[0] state = 'none' if (istate == 'draft') | (istate == 'proforma'): state = 'waiting' elif istate == 'open': state = 'invoiced' elif istate == 'paid': state = 'paid' inv = self.pool.get('account.invoice').browse(cr, uid, fetched[1]) for payment in inv.payment_ids: if payment.invoice and payment.invoice.type == 'out_refund': state = 'canceled' elif istate == 'cancel': state = 'canceled' res[line.id] = state return res
2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 3536, 7018, 326, 919, 2362, 632, 891, 365, 30, 1021, 733, 4407, 632, 891, 4422, 30, 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, 389, 2019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 3536, 7018, 326, 919, 2362, 632, 891, 365, 30, 1021, 733, 4407, 632, 891, 4422, 30, 326,...
TestModule)
TestModule] if random._urandom is not None: testclasses.append(HardwareRandom_TestBasicOps)
def test_main(verbose=None): testclasses = (WichmannHill_TestBasicOps, MersenneTwister_TestBasicOps, HardwareRandom_TestBasicOps, TestDistributions, TestModule) test_support.run_unittest(*testclasses) # verify reference counting import sys if verbose and hasattr(sys, "gettotalrefcount"): counts = [None] * 5 for i in xrange(len(counts)): test_support.run_unittest(*testclasses) counts[i] = sys.gettotalrefcount() print counts
b8717631561fec74cb1ab1963d918e53ead29a97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8717631561fec74cb1ab1963d918e53ead29a97/test_random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 12, 11369, 33, 7036, 4672, 1842, 4701, 273, 565, 261, 59, 1354, 81, 1072, 44, 737, 67, 4709, 8252, 8132, 16, 490, 414, 275, 4644, 23539, 1249, 67, 4709, 8252, 8132, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 12, 11369, 33, 7036, 4672, 1842, 4701, 273, 565, 261, 59, 1354, 81, 1072, 44, 737, 67, 4709, 8252, 8132, 16, 490, 414, 275, 4644, 23539, 1249, 67, 4709, 8252, 8132, 16,...
paramval = getattr(operation, parameter.name)
paramval = str(getattr(operation, parameter.name)) if paramval.find("%")>0: paramval = paramval.split("%")[0]+"%%"+paramval.split("%")[1]
def logop(self, operation): """ Writes name and parameters of operations, in the same format as the config file. The intention is to record the provenance of analyses and facilitate reproduction of results. """ self._format_doc(operation.__class__.__doc__) print >> self.ostream, "#[%s]"%operation.__class__.__name__ for parameter in operation.params: self._format_doc(parameter.description) paramval = getattr(operation, parameter.name) print >> self.ostream, "#%s = %s"%(parameter.name, paramval) print >> self.ostream
ef114d566269f178313878b91ddf8981111212be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7241/ef114d566269f178313878b91ddf8981111212be/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 556, 12, 2890, 16, 1674, 4672, 3536, 30053, 508, 471, 1472, 434, 5295, 16, 316, 326, 1967, 740, 487, 326, 642, 585, 18, 225, 1021, 509, 5054, 353, 358, 1409, 326, 24185, 434, 2281...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 556, 12, 2890, 16, 1674, 4672, 3536, 30053, 508, 471, 1472, 434, 5295, 16, 316, 326, 1967, 740, 487, 326, 642, 585, 18, 225, 1021, 509, 5054, 353, 358, 1409, 326, 24185, 434, 2281...
users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE '%s' ORDER BY email """ % (email_user_pattern, ))
users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE %s ORDER BY email """, (email_user_pattern, ))
def perform_delegate_adduserrole(req, id_role=0, email_user_pattern='', id_user=0, confirm=0): """let a lower level web admin add users to a limited set of roles. id_role - the role to connect to a user id_user - the user to connect to a role confirm - make the connection happen """ # finding the allowed roles for this user id_admin = getUid(req) id_action = acca.acc_get_action_id(name_action=DELEGATEADDUSERROLE) actions = acca.acc_find_possible_actions_user(id_user=id_admin, id_action=id_action) allowed_roles = [] allowed_id_roles = [] for (id, arglistid, name_role_help) in actions[1:]: id_role_help = acca.acc_get_role_id(name_role=name_role_help) if id_role_help and [id_role_help, name_role_help, ''] not in allowed_roles: allowed_roles.append([id_role_help, name_role_help, '']) allowed_id_roles.append(str(id_role_help)) output = '' if not allowed_roles: subtitle = 'no delegation rights' output += """ <p> You do not have the delegation rights over any roles.<br> If you think you should have such rights, contact a WebAccess Administrator. </p>""" extra = '' else: subtitle = 'step 1 - select role' output += """ <p> Lower level delegation of access rights to roles.<br> An administrator with all rights have to give you these rights. </p>""" email_out = acca.acc_get_user_email(id_user=id_user) name_role = acca.acc_get_role_name(id_role=id_role) output += createroleselect(id_role=id_role, step=1, name='id_role', action='delegate_adduserrole', roles=allowed_roles) if str(id_role) != '0' and str(id_role) in allowed_id_roles: subtitle = 'step 2 - search for users' # remove letters not allowed in an email email_user_pattern = cleanstring_email(email_user_pattern) text = ' <span class="adminlabel">2. search for user </span>\n' text += ' <input class="admin_wvar" type="text" name="email_user_pattern" value="%s" />\n' % (email_user_pattern, ) output += createhiddenform(action="delegate_adduserrole", text=text, button="search for users", id_role=id_role) # pattern is entered if email_user_pattern: # users with matching email-address users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE '%s' ORDER BY email """ % (email_user_pattern, )) # users that are connected users2 = run_sql("""SELECT DISTINCT u.id, u.email FROM user u LEFT JOIN user_accROLE ur ON u.id = ur.id_user WHERE ur.id_accROLE = '%s' AND u.email RLIKE '%s' ORDER BY u.email """ % (id_role, email_user_pattern)) # no users that match the pattern if not (users1 or users2): output += '<p>no qualified users, try new search.</p>' # too many matching users elif len(users1) > MAXSELECTUSERS: output += '<p><strong>%s hits</strong>, too many qualified users, specify more narrow search. (limit %s)</p>' % (len(users1), MAXSELECTUSERS) # show matching users else: subtitle = 'step 3 - select a user' users = [] extrausers = [] for (id, email) in users1: if (id, email) not in users2: users.append([id,email,'']) for (id, email) in users2: extrausers.append([-id, email,'']) output += createuserselect(id_user=id_user, action="delegate_adduserrole", step=3, users=users, extrausers=extrausers, button="add this user", id_role=id_role, email_user_pattern=email_user_pattern) try: id_user = int(id_user) except ValueError: pass # user selected already connected to role if id_user < 0: output += '<p>users in brackets are already attached to the role, try another one...</p>' # a user is selected elif email_out: subtitle = "step 4 - confirm to add user" output += createhiddenform(action="delegate_adduserrole", text='add user <strong>%s</strong> to role <strong>%s</strong>?' % (email_out, name_role), id_role=id_role, email_user_pattern=email_user_pattern, id_user=id_user, confirm=1) # it is confirmed that this user should be added if confirm: # add user result = acca.acc_add_user_role(id_user=id_user, id_role=id_role) if result and result[2]: subtitle = 'step 5 - confirm user added' output += '<p>confirm: user <strong>%s</strong> added to role <strong>%s</strong>.</p>' % (email_out, name_role) else: subtitle = 'step 5 - user could not be added' output += '<p>sorry, but user could not be added.</p>' extra = """ <dl> <dt><a href="delegate_deleteuserrole?id_role=%s">Remove users from role</a></dt> <dd>remove users from the roles you have delegating rights to.</dd> </dl> """ % (id_role, ) return index(req=req, title='Connect users to roles', subtitle=subtitle, body=[output, extra], adminarea=1, authorized=1)
6ea5d72a403945bb48459d4ea7eed6856c3451fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1931/6ea5d72a403945bb48459d4ea7eed6856c3451fb/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 22216, 67, 1289, 1355, 4615, 12, 3658, 16, 612, 67, 4615, 33, 20, 16, 2699, 67, 1355, 67, 4951, 2218, 2187, 612, 67, 1355, 33, 20, 16, 6932, 33, 20, 4672, 3536, 1810, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 22216, 67, 1289, 1355, 4615, 12, 3658, 16, 612, 67, 4615, 33, 20, 16, 2699, 67, 1355, 67, 4951, 2218, 2187, 612, 67, 1355, 33, 20, 16, 6932, 33, 20, 4672, 3536, 1810, 279, ...
def visit_term(self, node): pass
def visit_term(self, node): pass
139779d7bc12cf5badb7b0aaa20c58544d65af8e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/541/139779d7bc12cf5badb7b0aaa20c58544d65af8e/rst_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6408, 12, 2890, 16, 756, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6408, 12, 2890, 16, 756, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'certificate': terp.get('certificate', ''),
'certificate': terp.get('certificate'),
def download(self, cr, uid, ids, download=True, context=None): res = [] for mod in self.browse(cr, uid, ids, context=context): if not mod.url: continue match = re.search('-([a-zA-Z0-9\._-]+)(\.zip)', mod.url, re.I) version = '0' if match: version = match.group(1) if parse_version(mod.installed_version or '0') >= parse_version(version): continue res.append(mod.url) if not download: continue zipfile = urllib.urlopen(mod.url).read() fname = addons.get_module_path(mod.name+'.zip') try: fp = file(fname, 'wb') fp.write(zipfile) fp.close() except IOError, e: raise orm.except_orm(_('Error'), _('Can not create the module file:\n %s') % (fname,)) terp = self.get_module_info(mod.name) self.write(cr, uid, mod.id, { 'description': terp.get('description', ''), 'shortdesc': terp.get('name', ''), 'author': terp.get('author', 'Unknown'), 'website': terp.get('website', ''), 'license': terp.get('license', 'GPL-2'), 'certificate': terp.get('certificate', ''), }) cr.execute('DELETE FROM ir_module_module_dependency ' \ 'WHERE module_id = %s', (mod.id,)) self._update_dependencies(cr, uid, mod.id, terp.get('depends', [])) self._update_category(cr, uid, mod.id, terp.get('category', 'Uncategorized')) # Import module zimp = zipimport.zipimporter(fname) zimp.load_module(mod.name) return res
36d897d37168599861152e8c3f0ed42ee0a6ada8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/36d897d37168599861152e8c3f0ed42ee0a6ada8/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 4224, 33, 5510, 16, 819, 33, 7036, 4672, 400, 273, 5378, 364, 681, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 4224, 33, 5510, 16, 819, 33, 7036, 4672, 400, 273, 5378, 364, 681, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 33, ...
g = G(self.gens()[0])
g = G(self.gens()[0])
def B(self): G = self.group()
6d07ee6e4f019e37154d5cc748c7e39d7e7d7588 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/6d07ee6e4f019e37154d5cc748c7e39d7e7d7588/cubegroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 605, 12, 2890, 4672, 611, 273, 365, 18, 1655, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 605, 12, 2890, 4672, 611, 273, 365, 18, 1655, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
SpecializedSetup<%(name)s, 0>();
SpecializedSetup<%(name)s, 0>(true);
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
c09b66fa6c9b1cbe85cad7ac28eacb107f5b988d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c09b66fa6c9b1cbe85cad7ac28eacb107f5b988d/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 8368, 326, 1156, 2836, 1842, 364, 279, 1296, 12123, 923, 67, 3813, 273, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 2598, 22651, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 8368, 326, 1156, 2836, 1842, 364, 279, 1296, 12123, 923, 67, 3813, 273, 3536, 2, -100, -100, -100, -100, -100, -10...
return S_ERROR('LFCClient.removeDirectory: Must supply a path or list of paths') if len(lfns) > 2:
return S_ERROR('LFCClient.listDirectory: Must supply a path or list of paths') if len(paths) > 2:
def listDirectory(self, path): if type(path) == types.StringType: paths = [path] elif type(paths) == types.ListType: paths = path else: return S_ERROR('LFCClient.removeDirectory: Must supply a path or list of paths') # If we have less than three lfns to query a session doesn't make sense if len(lfns) > 2: self.__openSession() failed = {} successful = {} for path in paths: res = self.__getDirectoryContents(path) if res['OK']: successful[path] = res['Value']['Files'].keys() else: failed[path] = res['Message'] if self.session: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict)
24878006a97fc6c0a40ff01095f00d930f79b1e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/24878006a97fc6c0a40ff01095f00d930f79b1e6/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 2853, 12, 2890, 16, 589, 4672, 309, 618, 12, 803, 13, 422, 1953, 18, 780, 559, 30, 2953, 273, 306, 803, 65, 1327, 618, 12, 4481, 13, 422, 1953, 18, 19366, 30, 2953, 273, 589, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 2853, 12, 2890, 16, 589, 4672, 309, 618, 12, 803, 13, 422, 1953, 18, 780, 559, 30, 2953, 273, 306, 803, 65, 1327, 618, 12, 4481, 13, 422, 1953, 18, 19366, 30, 2953, 273, 589, ...
write( "Total size of video files, before multiplexing, is %s Mbytes, audio is %s MBytes, menus are %s MBytes." % (totalvideosize,totalaudiosize,totalmenusize)) dvdrsize-=totalaudiosize dvdrsize-=totalmenusize totalvideosize=totalvideosize*1.08 if dvdrsize<0: fatalError("Audio and menu files are greater than the size of a recordable DVD disk. Giving up!") if totalvideosize>dvdrsize: write( "Need to shrink MPEG2 video files to fit onto recordable DVD, video is %s MBytes too big." % (totalvideosize - dvdrsize)) scalepercentage=totalvideosize/dvdrsize write( "Need to scale by %s" % scalepercentage) if scalepercentage>3: write( "Large scale to shrink, may not work!") if path_tcrequant[0] == "": fatalError("tcrequant is not available to resize the files. Giving up!")
write( "Total video %.2f Mb, audio %.2f Mb, menus %.2f Mb." % (totalvideosize/mega,totalaudiosize/mega,totalmenusize/mega)) mv2space=((dvdrsize*mega-totalmenusize)/fudge_pack)-totalaudiosize if mv2space<0: fatalError("Audio and menu files are too big. No room for video. Giving up!") if totalvideosize>mv2space: write( "Video files are %.1f Mb too big. Need to shrink." % ((totalvideosize - mv2space)/mega) ) if path_M2VRequantiser[0] == "": fatalError("M2VRequantiser is not available to resize the files. Giving up!") vsize=0 duration=0
def performMPEG2Shrink(files,dvdrsize): checkCancelFlag() totalvideosize,totalaudiosize,totalmenusize=calculateFileSizes(files) #Report findings write( "Total size of video files, before multiplexing, is %s Mbytes, audio is %s MBytes, menus are %s MBytes." % (totalvideosize,totalaudiosize,totalmenusize)) #Subtract the audio and menus from the size of the disk (we cannot shrink this further) dvdrsize-=totalaudiosize dvdrsize-=totalmenusize #Add a little bit for the multiplexing stream data totalvideosize=totalvideosize*1.08 if dvdrsize<0: fatalError("Audio and menu files are greater than the size of a recordable DVD disk. Giving up!") if totalvideosize>dvdrsize: write( "Need to shrink MPEG2 video files to fit onto recordable DVD, video is %s MBytes too big." % (totalvideosize - dvdrsize)) scalepercentage=totalvideosize/dvdrsize write( "Need to scale by %s" % scalepercentage) if scalepercentage>3: write( "Large scale to shrink, may not work!") #tcrequant (transcode) is an optional install so may not be available if path_tcrequant[0] == "": fatalError("tcrequant is not available to resize the files. Giving up!") filecount=0 for node in files: filecount+=1 runTcrequant(os.path.join(getItemTempPath(filecount),"stream.mv2"),os.path.join(getItemTempPath(filecount),"video.small.m2v"),scalepercentage) os.remove(os.path.join(getItemTempPath(filecount),"stream.mv2")) os.rename(os.path.join(getItemTempPath(filecount),"video.small.m2v"),os.path.join(getItemTempPath(filecount),"stream.mv2")) totalvideosize,totalaudiosize,totalmenusize=calculateFileSizes(files) write( "Total DVD size AFTER TCREQUANT is %s MBytes" % (totalaudiosize + totalmenusize + (totalvideosize*1.05))) else: dvdrsize-=totalvideosize write( "Video will fit onto DVD. %s MBytes of space remaining on recordable DVD." % dvdrsize)
fe2a3bbe33f9454e9fa98bae37d53582fd2d4bb8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/fe2a3bbe33f9454e9fa98bae37d53582fd2d4bb8/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 49, 16533, 22, 28747, 12, 2354, 16, 15679, 3069, 1467, 4672, 866, 6691, 4678, 1435, 225, 2078, 6768, 538, 554, 16, 4963, 24901, 7441, 554, 16, 4963, 26065, 554, 33, 11162, 812, 119...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 49, 16533, 22, 28747, 12, 2354, 16, 15679, 3069, 1467, 4672, 866, 6691, 4678, 1435, 225, 2078, 6768, 538, 554, 16, 4963, 24901, 7441, 554, 16, 4963, 26065, 554, 33, 11162, 812, 119...
if e.errno == errno.EFTYPE and not self.isdir():
if e.errno == 79 and not self.isdir():
def chmod(self, permissions): """Wrapper around os.chmod""" try: self.conn.os.chmod(self.path, permissions & Globals.permission_mask) except OSError, e: if e.errno == errno.EFTYPE and not self.isdir(): # Some systems throw this error if try to set sticky bit # on a non-directory. Remove sticky bit and try again. log.Log("Unable to set permissions of %s to %o - trying again" "without sticky bit (%o)" % (self.path, permissions, permissions & 06777), 2) self.conn.os.chmod(self.path, permissions & 06777 & Globals.permission_mask) else: raise self.data['perms'] = permissions
6fb50ebeec4062a87be3e5bd527e5f2683c0662c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/783/6fb50ebeec4062a87be3e5bd527e5f2683c0662c/rpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13413, 12, 2890, 16, 4371, 4672, 3536, 3611, 6740, 1140, 18, 343, 1711, 8395, 775, 30, 365, 18, 4646, 18, 538, 18, 343, 1711, 12, 2890, 18, 803, 16, 4371, 473, 18901, 1031, 18, 9827, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13413, 12, 2890, 16, 4371, 4672, 3536, 3611, 6740, 1140, 18, 343, 1711, 8395, 775, 30, 365, 18, 4646, 18, 538, 18, 343, 1711, 12, 2890, 18, 803, 16, 4371, 473, 18901, 1031, 18, 9827, ...
SyntaxError: assignment to None (<doctest test.test_syntax[18]>, line 1)
SyntaxError: cannot assign to None (<doctest test.test_syntax[18]>, line 1)
>>> def f(**None):
0328490bdfbeb742609ad5b4ede915138f15ac8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/0328490bdfbeb742609ad5b4ede915138f15ac8a/test_syntax.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 636, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 636, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
name = self.stripColors(match.group('name')) if int(match.group('cid')) == 0 and client.name != name: self.debug('UrT bug spotted: cid does not match name on a Sayteam line') client2 = self.clients.getClientsByName(name) if not client2: self.warning('Could not get client with name %s' % name) return None self.debug('cid should be %s' % client2.cid) return b3.events.Event(b3.events.EVT_CLIENT_TEAM_SAY, data, client2, client2.team) else: return b3.events.Event(b3.events.EVT_CLIENT_TEAM_SAY, data, client, client.team)
return b3.events.Event(b3.events.EVT_CLIENT_TEAM_SAY, data, client, client.team)
def OnSayteam(self, action, data, match=None): #2:28 sayteam: 12 New_UrT_Player_v4.1: wokele client = self.getByCidOrJoinPlayer(match.group('cid'))
8be17802b60bcda2d50efa553c1d9b18fe9e769d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12909/8be17802b60bcda2d50efa553c1d9b18fe9e769d/iourt41.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 55, 528, 10035, 12, 2890, 16, 1301, 16, 501, 16, 845, 33, 7036, 4672, 468, 22, 30, 6030, 12532, 10035, 30, 2593, 1166, 67, 57, 86, 56, 67, 12148, 67, 90, 24, 18, 21, 30, 341,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 55, 528, 10035, 12, 2890, 16, 1301, 16, 501, 16, 845, 33, 7036, 4672, 468, 22, 30, 6030, 12532, 10035, 30, 2593, 1166, 67, 57, 86, 56, 67, 12148, 67, 90, 24, 18, 21, 30, 341,...
self.check_sizeof(abs, h + 3*p)
self.check_sizeof(abs, size(h + '3P'))
def get_gen(): yield 1
300a10ceb1febf233333c4843a55c526b4019feb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/300a10ceb1febf233333c4843a55c526b4019feb/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4507, 13332, 2824, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4507, 13332, 2824, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return self._profileDt
return self._profileInfo.dt
def _getTaskProfileDt(self): return self._profileDt
9b36b7b487327db0ba0615acb1d91d79e2fce589 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8543/9b36b7b487327db0ba0615acb1d91d79e2fce589/Task.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 2174, 4029, 19739, 12, 2890, 4672, 327, 365, 6315, 5040, 19739, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 588, 2174, 4029, 19739, 12, 2890, 4672, 327, 365, 6315, 5040, 19739, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Abelian variety factor of dimension 2 of J0(125), Abelian variety factor of dimension 2 of J0(125), Abelian variety factor of dimension 4 of J0(125)
Simple abelian subvariety 125a(1,125) of dimension 2 of J0(125), Simple abelian subvariety 125b(1,125) of dimension 2 of J0(125), Simple abelian subvariety 125c(1,125) of dimension 4 of J0(125)
def __getslice__(self, i, j): """ The slice i:j of decompositions of self.
83d03c9b2d797a52ad4e3f2fe47728d1f93f64bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/83d03c9b2d797a52ad4e3f2fe47728d1f93f64bc/abvar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 6665, 972, 12, 2890, 16, 277, 16, 525, 4672, 3536, 1021, 2788, 277, 30, 78, 434, 9862, 12388, 434, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 6665, 972, 12, 2890, 16, 277, 16, 525, 4672, 3536, 1021, 2788, 277, 30, 78, 434, 9862, 12388, 434, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
""" TODO unit tests """
def __setitem__(self, index, value): """
0479d0e6e0fff5104b463a62dcd9d0f78ec3e2cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5397/0479d0e6e0fff5104b463a62dcd9d0f78ec3e2cb/collections_.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 770, 16, 460, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1001, 542, 1726, 972, 12, 2890, 16, 770, 16, 460, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
sep + "vppen size=r vpstyle=n gridnum=%d,2 $SOURCES" % (n/2),
vppen + " size=r vpstyle=n gridnum=%d,2 $SOURCES" % (n/2),
def retrieve(target=None,source=None,env=None): "Fetch data from the web" top = env.get('top') folder = top + os.sep +env['dir'] private = env.get('private') if private: login = private['login'] password = private['password'] server = private['server'] try: session = ftplib.FTP(server,login,password) session.cwd(folder) except: print 'Could not establish connection with "%s/%s" ' % (server, folder) return 3 for file in map(str,target): remote = os.path.basename(file) try: download = open(file,'wb') session.retrbinary('RETR '+remote, lambda x: download.write(x)) download.close() except: print 'Could not download file "%s" ' % file return 1 if not os.stat(file)[6]: print 'Could not download file "%s" ' % file os.unlink(file) return 4 session.quit() else: server = env.get('server') for file in map(str,target): remote = os.path.basename(file) rdir = string.join([server,folder,remote],'/') try: urllib.urlretrieve(rdir,file) if not os.stat(file)[6]: print 'Could not download file "%s" ' % file os.unlink(file) return 2 except: print 'Could not download "%s" from "%s" ' % (file,rdir) return 5 return 0
9826f7cd9d8f2da6836e7df78950cf03bbee4dc5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3143/9826f7cd9d8f2da6836e7df78950cf03bbee4dc5/rsfproj.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4614, 12, 3299, 33, 7036, 16, 3168, 33, 7036, 16, 3074, 33, 7036, 4672, 315, 5005, 501, 628, 326, 3311, 6, 1760, 273, 1550, 18, 588, 2668, 3669, 6134, 3009, 273, 1760, 397, 1140, 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, 4614, 12, 3299, 33, 7036, 16, 3168, 33, 7036, 16, 3074, 33, 7036, 4672, 315, 5005, 501, 628, 326, 3311, 6, 1760, 273, 1550, 18, 588, 2668, 3669, 6134, 3009, 273, 1760, 397, 1140, 18, ...
import datetime typ = self._makeOne() date = datetime.date.today()
typ = self._makeOne() date = self._today()
def test_serialize_with_date(self): import datetime typ = self._makeOne() date = datetime.date.today() node = DummySchemaNode(None) result = typ.serialize(node, date) expected = date.isoformat() self.assertEqual(result, expected)
605f1489d7515c2d4261831fe6b5a17f338fb86e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13089/605f1489d7515c2d4261831fe6b5a17f338fb86e/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6288, 67, 1918, 67, 712, 12, 2890, 4672, 3815, 273, 365, 6315, 6540, 3335, 1435, 1509, 273, 365, 6315, 30064, 1435, 756, 273, 28622, 3078, 907, 12, 7036, 13, 563, 273, 3815, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6288, 67, 1918, 67, 712, 12, 2890, 4672, 3815, 273, 365, 6315, 6540, 3335, 1435, 1509, 273, 365, 6315, 30064, 1435, 756, 273, 28622, 3078, 907, 12, 7036, 13, 563, 273, 3815, ...
return s.replace(SAGE_BEGIN,'').replace(SAGE_END,'').replace(SC)
return s.replace(SAGE_BEGIN,'').replace(SAGE_END,'').replace(SC,'')
def _process_output(self, s): s = re.sub('\x08.','',s) s = self._strip_synchro_from_start_of_output(s) if SAGE_ERROR in s: i = s.rfind('>>>') if i >= 0: return s[:i-1] # Remove any control codes that might have not got stripped out. return s.replace(SAGE_BEGIN,'').replace(SAGE_END,'').replace(SC)
6898d1ceffb6d8593f18cf0f0bd79d4bef3d484f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/6898d1ceffb6d8593f18cf0f0bd79d4bef3d484f/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 2844, 12, 2890, 16, 272, 4672, 272, 273, 283, 18, 1717, 2668, 64, 92, 6840, 1093, 11189, 2187, 87, 13, 272, 273, 365, 6315, 6406, 67, 87, 2515, 303, 67, 2080, 67, 1937...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 2844, 12, 2890, 16, 272, 4672, 272, 273, 283, 18, 1717, 2668, 64, 92, 6840, 1093, 11189, 2187, 87, 13, 272, 273, 365, 6315, 6406, 67, 87, 2515, 303, 67, 2080, 67, 1937...
self.setDaemon(False)
self.daemon = True
def __init__(self, certificate, ssl_version=None, certreqs=None, cacerts=None, expect_bad_connects=False, chatty=True, connectionchatty=False, starttls_server=False, wrap_accepting_socket=False):
c048eba81671002b900e506217b944305a2b1042 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/c048eba81671002b900e506217b944305a2b1042/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4944, 16, 5832, 67, 1589, 33, 7036, 16, 3320, 25782, 33, 7036, 16, 276, 1077, 1051, 87, 33, 7036, 16, 4489, 67, 8759, 67, 3612, 87, 33, 8381, 16, 7916,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4944, 16, 5832, 67, 1589, 33, 7036, 16, 3320, 25782, 33, 7036, 16, 276, 1077, 1051, 87, 33, 7036, 16, 4489, 67, 8759, 67, 3612, 87, 33, 8381, 16, 7916,...
if key in self.setkeys and hasattr(self, key):
if key in self.setkeys or hasattr(self, key):
def getAttribute(self, key): if key in self.setkeys and hasattr(self, key): return getattr(self, key) return None
40ac440efcf9686e7f1c5dd4c1d91575db10ef95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/40ac440efcf9686e7f1c5dd4c1d91575db10ef95/repos.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4061, 12, 2890, 16, 498, 4672, 309, 498, 316, 365, 18, 542, 2452, 578, 3859, 12, 2890, 16, 498, 4672, 327, 3869, 12, 2890, 16, 498, 13, 327, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4061, 12, 2890, 16, 498, 4672, 309, 498, 316, 365, 18, 542, 2452, 578, 3859, 12, 2890, 16, 498, 4672, 327, 3869, 12, 2890, 16, 498, 13, 327, 599, 2, -100, -100, -100, -100, -100, -10...
os.makedirs(d)
os.rmdir(d)
def _teardown(self, files): # sort and reverse so that we're tearing down directories in the # reverse order that we built them. files.sort() files.reverse()
9fd3262d71d4dbc130d848e33cb36e58b369ea89 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11836/9fd3262d71d4dbc130d848e33cb36e58b369ea89/test_pathinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 736, 20684, 12, 2890, 16, 1390, 4672, 468, 1524, 471, 4219, 1427, 716, 732, 4565, 268, 2091, 310, 2588, 6402, 316, 326, 468, 4219, 1353, 716, 732, 6650, 2182, 18, 1390, 18, 3804, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 736, 20684, 12, 2890, 16, 1390, 4672, 468, 1524, 471, 4219, 1427, 716, 732, 4565, 268, 2091, 310, 2588, 6402, 316, 326, 468, 4219, 1353, 716, 732, 6650, 2182, 18, 1390, 18, 3804, ...
PangoCoverageLevel = enum_anon_1
PangoCoverageLevel = enum_anon_2
def load_lib(name): libname = ctypes.util.find_library(name) if not libname: raise OSError("Could not find library '%s'" % name) else: return CDLL(libname)
92bb4862df49194567fad21ea00d921ffc62dd6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10761/92bb4862df49194567fad21ea00d921ffc62dd6a/pango.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2941, 12, 529, 4672, 2561, 529, 273, 6983, 18, 1367, 18, 4720, 67, 12083, 12, 529, 13, 309, 486, 2561, 529, 30, 1002, 10002, 2932, 4445, 486, 1104, 5313, 1995, 87, 4970, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2941, 12, 529, 4672, 2561, 529, 273, 6983, 18, 1367, 18, 4720, 67, 12083, 12, 529, 13, 309, 486, 2561, 529, 30, 1002, 10002, 2932, 4445, 486, 1104, 5313, 1995, 87, 4970, 738,...
self.label_conntype = wx.StaticText(self, -1, _("label_conntype"))
self.label_conntype = wx.StaticText(self, -1, "")
def __init__(self, config_data, *args, **kwds): self.config_data = config_data
5531c7562a3f66db83d67b6f0c20ad3f8f40010f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2522/5531c7562a3f66db83d67b6f0c20ad3f8f40010f/ConnectDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 67, 892, 16, 380, 1968, 16, 2826, 25577, 4672, 365, 18, 1425, 67, 892, 273, 642, 67, 892, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 67, 892, 16, 380, 1968, 16, 2826, 25577, 4672, 365, 18, 1425, 67, 892, 273, 642, 67, 892, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...