rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
"virConnectListDomains"
"virConnectListDomains", "virDomainMemoryStats"
def enum(type, name, value): if not enums.has_key(type): enums[type] = {} enums[type][name] = value
3a70131312d62d02d0fb2d55c6fc51dcc5c06a5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11279/3a70131312d62d02d0fb2d55c6fc51dcc5c06a5d/generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2792, 12, 723, 16, 508, 16, 460, 4672, 309, 486, 17922, 18, 5332, 67, 856, 12, 723, 4672, 17922, 63, 723, 65, 273, 2618, 17922, 63, 723, 6362, 529, 65, 273, 460, 225, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2792, 12, 723, 16, 508, 16, 460, 4672, 309, 486, 17922, 18, 5332, 67, 856, 12, 723, 4672, 17922, 63, 723, 65, 273, 2618, 17922, 63, 723, 6362, 529, 65, 273, 460, 225, 2, -100, -100, ...
add_target_and_index = PythonDesc.__dict__['add_target_and_index']
def add_target_and_index(self, name, sig, signode): if name not in self.state.document.ids: signode['names'].append(name) signode['ids'].append(name) signode['first'] = (not self.names) self.state.document.note_explicit_target(signode) self.env.note_descref(name, self.desctype, self.lineno) indextext = self.get_index_text(name) if indextext: self.indexnode['entries'].append(('single', indextext, name, name))
def get_index_text(self, modname, name): if self.desctype == 'cfunction': return _('%s (C function)') % name elif self.desctype == 'cmember': return _('%s (C member)') % name elif self.desctype == 'cmacro': return _('%s (C macro)') % name elif self.desctype == 'ctype': return _('%s (C type)') % name elif self.desctype == 'cvar': return _('%s (C variable)') % name else: return ''
6e1d180d5747e0994c0477ba6c1a8137c1158f34 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5532/6e1d180d5747e0994c0477ba6c1a8137c1158f34/desc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1615, 67, 955, 12, 2890, 16, 16037, 16, 508, 4672, 309, 365, 18, 5489, 12387, 422, 296, 71, 915, 4278, 327, 389, 29909, 87, 261, 39, 445, 2506, 13, 738, 508, 1327, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1615, 67, 955, 12, 2890, 16, 16037, 16, 508, 4672, 309, 365, 18, 5489, 12387, 422, 296, 71, 915, 4278, 327, 389, 29909, 87, 261, 39, 445, 2506, 13, 738, 508, 1327, 365, 18, ...
return gtk.input_add(source, condition, callback)
return gtk._gobject.io_add_watch(source, condition, callback)
def wrapper(source, condition, real_s=source, real_cb=callback): return real_cb(real_s, condition)
08310f9467cdc9f0e5cbeaf8080652c4dd1ff45c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/08310f9467cdc9f0e5cbeaf8080652c4dd1ff45c/gtk2reactor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4053, 12, 3168, 16, 2269, 16, 2863, 67, 87, 33, 3168, 16, 2863, 67, 7358, 33, 3394, 4672, 327, 2863, 67, 7358, 12, 7688, 67, 87, 16, 2269, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 4053, 12, 3168, 16, 2269, 16, 2863, 67, 87, 33, 3168, 16, 2863, 67, 7358, 33, 3394, 4672, 327, 2863, 67, 7358, 12, 7688, 67, 87, 16, 2269, 13, 2, -100, -100, -100, -100, -100, -100, ...
"""The method for element drawing """
""" The method for element drawing. """
def drawModel(self): """The method for element drawing """ if self.mol: self.mol.draw(self, None)
7828cbef13f84d50298938f6ae339289db2ec006 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/7828cbef13f84d50298938f6ae339289db2ec006/ThumbView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1488, 12, 2890, 4672, 3536, 1021, 707, 364, 930, 16327, 18, 3536, 309, 365, 18, 21260, 30, 365, 18, 21260, 18, 9446, 12, 2890, 16, 599, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1488, 12, 2890, 4672, 3536, 1021, 707, 364, 930, 16327, 18, 3536, 309, 365, 18, 21260, 30, 365, 18, 21260, 18, 9446, 12, 2890, 16, 599, 13, 2, -100, -100, -100, -100, -100, -100,...
def polarToRect(self, r, theta): "Convert to rectangular based on current size" return (self._centerx + r * sin(theta),self._centery + r * cos(theta))
def polarToRect(self, r, theta): "Convert to rectangular based on current size" return (self._centerx + r * sin(theta),self._centery + r * cos(theta))
e1d3574d2c5deb01767958798eba9ba4dc47552f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/e1d3574d2c5deb01767958798eba9ba4dc47552f/spider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24244, 774, 6120, 12, 2890, 16, 436, 16, 7338, 4672, 315, 2723, 358, 4917, 13077, 2511, 603, 783, 963, 6, 327, 261, 2890, 6315, 5693, 92, 397, 436, 380, 5367, 12, 14482, 3631, 2890, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24244, 774, 6120, 12, 2890, 16, 436, 16, 7338, 4672, 315, 2723, 358, 4917, 13077, 2511, 603, 783, 963, 6, 327, 261, 2890, 6315, 5693, 92, 397, 436, 380, 5367, 12, 14482, 3631, 2890, 63...
return '%s.%s' % (self.id, self.thread_id)
return '%s.%s' % (self.thread_id, self.id)
def get_full_id(self): return '%s.%s' % (self.id, self.thread_id)
d59da7c030387c41b378a19d8bc93a10900170e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/d59da7c030387c41b378a19d8bc93a10900170e1/messages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2854, 67, 350, 12, 2890, 4672, 327, 1995, 87, 7866, 87, 11, 738, 261, 2890, 18, 350, 16, 365, 18, 5930, 67, 350, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2854, 67, 350, 12, 2890, 4672, 327, 1995, 87, 7866, 87, 11, 738, 261, 2890, 18, 350, 16, 365, 18, 5930, 67, 350, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
try: return do() except u2.URLError, e: if "SSL23_GET_SERVER_HELLO" in str(e): log.info("Activating SSL workaround") CheckingHTTPSConnection.FORCE_SSL_VERSION = ssl.PROTOCOL_SSLv3
for i in range(3): try:
def do(): if self.urlopener is None: return u2.urlopen(u2request) else: return self.urlopener.open(u2request)
b059f0117349280b9b66374ea5a15d3da237258c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10685/b059f0117349280b9b66374ea5a15d3da237258c/http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 13332, 309, 365, 18, 295, 16884, 708, 353, 599, 30, 327, 582, 22, 18, 295, 18589, 12, 89, 22, 2293, 13, 469, 30, 327, 365, 18, 295, 16884, 708, 18, 3190, 12, 89, 22, 2293, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 13332, 309, 365, 18, 295, 16884, 708, 353, 599, 30, 327, 582, 22, 18, 295, 18589, 12, 89, 22, 2293, 13, 469, 30, 327, 365, 18, 295, 16884, 708, 18, 3190, 12, 89, 22, 2293, 13,...
def container(self, value):
def opencontainer(self, value):
def container(self, value): if value: i = id(value) if self.memo.has_key(i): raise TypeError, "cannot marshal recursive data structures" self.memo[i] = None
cd906440fbd0694e165a09262268a608df82deeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/cd906440fbd0694e165a09262268a608df82deeb/xmlrpclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 3782, 12, 2890, 16, 460, 4672, 309, 460, 30, 277, 273, 612, 12, 1132, 13, 309, 365, 18, 19521, 18, 5332, 67, 856, 12, 77, 4672, 1002, 3580, 16, 315, 12892, 10893, 5904, 501, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 3782, 12, 2890, 16, 460, 4672, 309, 460, 30, 277, 273, 612, 12, 1132, 13, 309, 365, 18, 19521, 18, 5332, 67, 856, 12, 77, 4672, 1002, 3580, 16, 315, 12892, 10893, 5904, 501, 12...
'cn': socket.gethostname(),
'cn': socket.getfqdn(),
def setup_server(template=None): check_dsage_dir() template_dict = {'organization': 'SAGE (at %s)'%(socket.gethostname()), 'unit': '389', 'locality': None, 'state': 'Washington', 'country': 'US', 'cn': socket.gethostname(), 'uid': 'sage_user', 'dn_oid': None, 'serial': str(random.randint(1,2**31)), 'dns_name': None, 'crl_dist_points': None, 'ip_address': None, 'expiration_days': 10000, 'email': 'sage@sagemath.org', 'ca': None, 'tls_www_client': None, 'tls_www_server': True, 'signing_key': True, 'encryption_key': True, } if isinstance(template, dict): template_dict.update(template) s = "" for key, val in template_dict.iteritems(): if val is None: continue if val == True: w = '' elif isinstance(val, list): w = ' '.join(['"%s"'%x for x in val]) else: w = '"%s"'%val s += '%s = %s \n'%(key, w) template_file = os.path.join(DSAGE_DIR, 'cert.cfg') f = open(template_file, 'w') f.write(s) f.close() # Disable certificate generation -- not used right now anyways privkey_file = os.path.join(DSAGE_DIR, 'cacert.pem') pubkey_file = os.path.join(DSAGE_DIR, 'pubcert.pem') print DELIMITER print "Generating SSL certificate for server..." if os.uname()[0] != 'Darwin' and cmd_exists('openssl'): # We use openssl by default if it exists, since it is *vastly* # faster on Linux. cmd = ['openssl genrsa > %s' % privkey_file] print "Using openssl to generate key" print cmd[0] subprocess.call(cmd, shell=True) else: cmd = ['certtool --generate-privkey --outfile %s' % privkey_file] print "Using certtool to generate key" print cmd[0] # cmd = ['openssl genrsa > %s' % privkey_file] subprocess.call(cmd, shell=True) # cmd = ['openssl req -config %s -new -x509 -key %s -out %s -days \ # 1000' % (os.path.join(SAGE_ROOT,'local/openssl/openssl.cnf'), # privkey_file, pubkey_file)] cmd = ['certtool --generate-self-signed --template %s --load-privkey %s \ --outfile %s' % (template_file, privkey_file, pubkey_file)] subprocess.call(cmd, shell=True) print DELIMITER os.chmod(os.path.join(DSAGE_DIR, 'cacert.pem'), 0600) # conf_file = os.path.join(DSAGE_DIR, 'server.conf') # config.write(open(conf_file, 'w')) # add default user from twisted.conch.ssh import keys import base64 # c = ConfigParser.ConfigParser() # c.read(os.path.join(DSAGE_DIR, 'client.conf')) from getpass import getuser username = getuser() pubkey_file = os.path.join(DSAGE_DIR, 'dsage_key.pub') clientdb = ClientDatabase() pubkey = base64.encodestring( keys.getPublicKeyString(filename=pubkey_file).strip()) if clientdb.get_user(username) is None: clientdb.add_user(username, pubkey) print 'Added user %s.\n' % (username) else: user, key = clientdb.get_user_and_key(username) if key != pubkey: clientdb.del_user(username) clientdb.add_user(username, pubkey) print "User %s's pubkey changed, setting to new one." % (username) else: print 'User %s already exists.' % (username) print "Server configuration finished.\n\n"
67ee92c9709217ddf33dd6b05bc87b3e295ca52c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/67ee92c9709217ddf33dd6b05bc87b3e295ca52c/dsage_setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 3567, 12, 3202, 33, 7036, 4672, 866, 67, 2377, 410, 67, 1214, 1435, 1542, 67, 1576, 273, 13666, 15336, 4278, 296, 55, 2833, 261, 270, 738, 87, 2506, 17105, 7814, 18, 75, 546,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 3567, 12, 3202, 33, 7036, 4672, 866, 67, 2377, 410, 67, 1214, 1435, 1542, 67, 1576, 273, 13666, 15336, 4278, 296, 55, 2833, 261, 270, 738, 87, 2506, 17105, 7814, 18, 75, 546,...
measures = N.zeros(number_volumes, dtype=metric_test)
measures = NP.zeros(number_volumes, dtype=metric_test)
def demo_MRI_coregistration(optimizer_method='powell', histo_method=1, smooth_histo=0, smooth_image=0, ftype=1): """ demo with (must have file ANAT1_V0001.img and fMRI directory fMRIData) measures, imageF_anat, fmri_series = reg.demo_MRI_coregistration() show results with In [59]: measures[25]['cost'] Out[59]: -0.48607185 In [60]: measures[25]['align_cost'] Out[60]: -0.99514639 In [61]: measures[25]['align_rotate'] Out[61]: array([ 1.94480181, 5.64703989, 5.35002136, -5.00544405, -2.2712214, -1.42249691], dtype=float32) In [62]: measures[25]['rotate'] Out[62]: array([ 1.36566341, 4.70644331, 4.68198586, -4.32256889, -2.47607017, -2.39173937], dtype=float32) """ # demo of alignment of fMRI series with anatomical MRI # in this demo, each fMRI volume is first perturbed (rotated, translated) # by a random value. The initial registration is measured, then the optimal # alignment is computed and the registration measure made following the volume remap. # The fMRI registration is done with the first fMRI volume using normalized cross-correlation. # Each fMRI volume is rotated to the fMRI-0 volume and the series is ensemble averaged. # The ensemble averaged is then registered with the anatomical MRI volume using normalized mutual information. # The fMRI series is then rotated with this parameter. The alignments are done with 3D cubic splines. # read the anatomical MRI volume anat_desc = load_anatMRI_desc() imageF_anat = load_volume(anat_desc, imagename='ANAT1_V0001.img') # the sampling structure imdata = build_structs() # the volume filter imageF_anat['fwhm'] = build_fwhm(imageF_anat['mat'], imdata['step']) # read in the file list of the fMRI data metric_test = N.dtype([('cost', 'f'), ('align_cost', 'f'), ('rotate', 'f', 6), ('align_rotate', 'f', 6)]) fMRIdata = read_fMRI_directory('fMRIData\*.img') fmri_desc = load_fMRI_desc() fmri_series = {} ave_fMRI_volume = N.zeros(fmri_desc['layers']*fmri_desc['rows']*fmri_desc['cols'], dtype=N.float64).reshape(fmri_desc['layers'], fmri_desc['rows'], fmri_desc['cols']) count = 0 number_volumes = len(fMRIdata) measures = N.zeros(number_volumes, dtype=metric_test) # load and perturb (rotation, translation) the fMRI volumes for i in fMRIdata: image = load_volume(fmri_desc, i) # random perturbation of angle, translation for each volume beyond the first if count == 0: image['fwhm'] = build_fwhm(image['mat'], imdata['step']) fmri_series[count] = image count = count + 1 else: x = N.random.random(6) - 0.5 x = 10.0 * x fmri_series[count] = demo_rotate_fMRI_volume(image, x) measures[count]['rotate'][0:6] = x[0:6] count = count + 1 # load and register the fMRI volumes with volume_0 using normalized cross correlation metric imageF = fmri_series[0] if smooth_image: image_F_xyz = filter_image_3D(imageF['data'], imageF['fwhm'], ftype) imageF['data'] = image_F_xyz for i in range(1, number_volumes): imageG = fmri_series[i] # the measure prior to alignment measures[i]['cost'] = check_alignment(imageF, imageG, imdata, method='ncc', lite=histo_method, smhist=smooth_histo) x = python_coreg(imageF, imageG, imdata, lite=histo_method, method='ncc', opt_method=optimizer_method, smhist=smooth_histo, smimage=smooth_image) measures[i]['align_rotate'][0:6] = x[0:6] measures[i]['align_cost'] = check_alignment(imageF, imageG, imdata, method='ncc', lite=histo_method, smhist=smooth_histo, alpha=x[0], beta=x[1], gamma=x[2], Tx=x[3], Ty=x[4], Tz=x[5]) # align the volumes and average them for co-registration with the anatomical MRI ave_fMRI_volume = fmri_series[0]['data'].astype(N.float64) for i in range(1, number_volumes): image = fmri_series[i] x[0:6] = measures[i]['align_rotate'][0:6] # overwrite the fMRI volume with the aligned volume fmri_series[i] = remap_image(image, x, resample='cubic') ave_fMRI_volume = ave_fMRI_volume + fmri_series[i]['data'].astype(N.float64) ave_fMRI_volume = (ave_fMRI_volume / float(number_volumes)).astype(N.uint8) ave_fMRI_volume = {'data' : ave_fMRI_volume, 'mat' : imageF['mat'], 'dim' : imageF['dim'], 'fwhm' : imageF['fwhm']} # register (using normalized mutual information) with the anatomical MRI if smooth_image: image_F_anat_xyz = filter_image_3D(imageF_anat['data'], imageF_anat['fwhm'], ftype) imageF_anat['data'] = image_F_anat_xyz x = python_coreg(imageF_anat, ave_fMRI_volume, imdata, lite=histo_method, method='nmi', opt_method=optimizer_method, smhist=smooth_histo, smimage=smooth_image) print 'functional-anatomical align parameters ' print x for i in range(number_volumes): image = fmri_series[i] # overwrite the fMRI volume with the anatomical-aligned volume fmri_series[i] = remap_image(image, x, resample='cubic') return measures, imageF_anat, fmri_series
de681f926e982b0212f2f58bf637917926737f89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/de681f926e982b0212f2f58bf637917926737f89/_registration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21477, 67, 49, 2259, 67, 3644, 75, 4218, 12, 29594, 67, 2039, 2218, 23509, 1165, 2187, 5356, 83, 67, 2039, 33, 21, 16, 11957, 67, 11488, 83, 33, 20, 16, 11957, 67, 2730, 33, 20, 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, 21477, 67, 49, 2259, 67, 3644, 75, 4218, 12, 29594, 67, 2039, 2218, 23509, 1165, 2187, 5356, 83, 67, 2039, 33, 21, 16, 11957, 67, 11488, 83, 33, 20, 16, 11957, 67, 2730, 33, 20, 16, ...
form = Form("%s/%s" % (mlist.GetRelativeScriptURL('admin'), category))
form = Form("%s/%s" % (mlist.GetScriptURL('admin'), category))
def FormatOptionHelp(doc, varref, mlist): item = None reflist = string.split(varref, '/') if len(reflist) == 2: category, varname = reflist options = GetConfigOptions(mlist, category) for i in options: if i and i[0] == varname: item = i break if not item: bad = ("Option %s/%s not found. %s" % (category, varname, os.environ['PATH_INFO'])) AddErrorMessage(doc, bad) return got = GetItemCharacteristics(item) try: varname, kind, params, dependancies, descr, elaboration = got if elaboration is None: elaboration = '' except ValueError, msg: varname, kind, params, dependancies, descr = got elaboration = descr header = Table(width="100%") legend = ('%s Mailing list Configuration Help<br><em>%s</em> Option' % (mlist.real_name, varname)) header.AddRow([Center(Header(3, legend))]) header.AddCellInfo(max(header.GetCurrentRowIndex(), 0), 0, colspan=2, bgcolor="#99ccff") doc.SetTitle("Mailman %s List Option Help" % varname) doc.AddItem(header) doc.AddItem("<b>%s</b> (%s): %s<p>" % (varname, category, descr)) doc.AddItem("%s<p>" % elaboration) form = Form("%s/%s" % (mlist.GetRelativeScriptURL('admin'), category)) valtab = Table(cellspacing=3, cellpadding=4) AddOptionsTableItem(valtab, item, category, mlist, detailsp=0) form.AddItem(valtab) # XXX I don't think we want to be able to set options from two places, # since they'll go out of sync. #form.AddItem(Center(FormatPasswordStuff())) doc.AddItem(Center(form)) doc.AddItem("(<em><strong>Don't change the option here.</strong> " 'Use the ') doc.AddItem(Link('%s/%s' % (mlist.GetRelativeScriptURL('admin'), category), category + ' options page')) doc.AddItem(' instead.</em>)')
d772bed94c30a1a03262a0ff02987a6c5643a380 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/d772bed94c30a1a03262a0ff02987a6c5643a380/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4077, 1895, 6696, 12, 2434, 16, 569, 1734, 16, 312, 1098, 4672, 761, 273, 599, 1278, 1098, 273, 533, 18, 4939, 12, 1401, 1734, 16, 2023, 13, 309, 562, 12, 1734, 1098, 13, 422, 576, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4077, 1895, 6696, 12, 2434, 16, 569, 1734, 16, 312, 1098, 4672, 761, 273, 599, 1278, 1098, 273, 533, 18, 4939, 12, 1401, 1734, 16, 2023, 13, 309, 562, 12, 1734, 1098, 13, 422, 576, 3...
('SaveScrap', None, 'Save as Scrap', 'F2', None, self.save_scrap_cb),
('SaveScrap', None, 'Save Next Scrap', 'F2', None, self.save_scrap_cb),
def create_ui(self): ag = gtk.ActionGroup('WindowActions') # FIXME: this xml menu only creates unneeded information duplication, I think.
d8a10caaf8d1755b73dea3096f743ba1bf0cac5e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7129/d8a10caaf8d1755b73dea3096f743ba1bf0cac5e/drawwindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4881, 12, 2890, 4672, 1737, 273, 22718, 18, 1803, 1114, 2668, 3829, 6100, 6134, 468, 9852, 30, 333, 2025, 3824, 1338, 3414, 16209, 8033, 1779, 31201, 16, 467, 15507, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4881, 12, 2890, 4672, 1737, 273, 22718, 18, 1803, 1114, 2668, 3829, 6100, 6134, 468, 9852, 30, 333, 2025, 3824, 1338, 3414, 16209, 8033, 1779, 31201, 16, 467, 15507, 18, 2, -100...
""" Dillhole and foo and piss and shit where Tom is blah and blah.
r""" A SQL Database object corresponding to a database file.
def show(self, table_name, max_field_size=20): """ show and entire table from the database TODO ROBERT: - same as the show function in query: throw in if clause and decomment - also, do you know of any quick fix for the truncated output issue in notebook? EXAMPLES: sage: DB = SQLDatabase() sage: DB.create_table('simon',{'a1':{'sql':'bool','primary_key':False}, 'b2':{'sql':'int', 'primary_key':False}}) sage: DB.add_data('simon',[(0,0),(1,1),(1,2)]) sage: DB.show('simon') a1 b2 ---------------------------------------- 0 0 1 1 1 2 """ try: cur = self.__connection__.cursor() cur.execute('SELECT * FROM ' + table_name) except: raise RuntimeError('Failure to fetch data.') # Command Prompt Version for des in cur.description: print des[0].ljust(max_field_size), print # new line print '-' * max_field_size * len(cur.description) field_indices = range(len(cur.description)) for row in cur: for index in field_indices: field_val = str(row[index]) print field_val.ljust(max_field_size) , print # new line # Notebook Version (Decomment below) - also, we # could put in arguments for html keywords so the user # has some control over the display """ print '<html><table bgcolor=lightgrey cellpadding=0><tr>' for des in cur.description: print '<td bgcolor=white align=center> ' + des[0] + ' </td>' print '</tr>' field_indices = range(len(cur.description)) for row in cur: print '<tr>' for index in field_indices: print '<td bgcolor=white align=center> ' + str(row[index]) + ' </td>' print '</tr>' print '</table></html>' """
ccd462ba82c8e638768d9aaffb11ed63f3c9a76d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/ccd462ba82c8e638768d9aaffb11ed63f3c9a76d/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 1014, 67, 529, 16, 943, 67, 1518, 67, 1467, 33, 3462, 4672, 3536, 2405, 471, 7278, 1014, 628, 326, 2063, 225, 2660, 534, 5704, 11539, 30, 300, 1967, 487, 326, 2405,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 1014, 67, 529, 16, 943, 67, 1518, 67, 1467, 33, 3462, 4672, 3536, 2405, 471, 7278, 1014, 628, 326, 2063, 225, 2660, 534, 5704, 11539, 30, 300, 1967, 487, 326, 2405,...
return configFromMap(performQuery(host, QUERYTAG_URL, dict(name=name, tag_name=tagName))[0], lazy=True)
return configFromMap(performQuery(host, QUERYTAG_URL, dict(name=name, tag_name=tagName))[tagName], lazy=True)
def queryTag(host, name, tagName): ## # A tag may contain some keys that shouldn't be evaluated return configFromMap(performQuery(host, QUERYTAG_URL, dict(name=name, tag_name=tagName))[0], lazy=True)
6c74b8ccc6dd82ecca6856e5f640de0ba7156bfe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5741/6c74b8ccc6dd82ecca6856e5f640de0ba7156bfe/tag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 1805, 12, 2564, 16, 508, 16, 7196, 4672, 7541, 468, 432, 1047, 2026, 912, 2690, 1311, 716, 12044, 1404, 506, 12697, 327, 642, 27731, 12, 16092, 1138, 12, 2564, 16, 17089, 7927, 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, 843, 1805, 12, 2564, 16, 508, 16, 7196, 4672, 7541, 468, 432, 1047, 2026, 912, 2690, 1311, 716, 12044, 1404, 506, 12697, 327, 642, 27731, 12, 16092, 1138, 12, 2564, 16, 17089, 7927, 67, ...
sout += b"\\U%08x" % sys.maxunicode
sout += bytes("\\U%08x" % sys.maxunicode)
def test_backslashescape(self): # Does the same as the "unicode-escape" encoding, but with different # base encodings. sin = "a\xac\u1234\u20ac\u8000" if sys.maxunicode > 0xffff: sin += chr(sys.maxunicode) sout = b"a\\xac\\u1234\\u20ac\\u8000" if sys.maxunicode > 0xffff: sout += b"\\U%08x" % sys.maxunicode self.assertEqual(sin.encode("ascii", "backslashreplace"), sout)
fa0e27e9b902e0b7f73c64edf9e99e7f6abbf809 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/fa0e27e9b902e0b7f73c64edf9e99e7f6abbf809/test_codeccallbacks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 823, 12877, 6939, 12, 2890, 4672, 468, 9637, 326, 1967, 487, 326, 315, 9124, 17, 6939, 6, 2688, 16, 1496, 598, 3775, 468, 1026, 24118, 18, 5367, 273, 315, 69, 64, 92, 1077, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 823, 12877, 6939, 12, 2890, 4672, 468, 9637, 326, 1967, 487, 326, 315, 9124, 17, 6939, 6, 2688, 16, 1496, 598, 3775, 468, 1026, 24118, 18, 5367, 273, 315, 69, 64, 92, 1077, ...
__builtin__.__import__ = types.MethodType(Y(), None, (pseudoclass, str)) import spam
orig_import = __import__ try: __builtin__.__import__ = types.MethodType(Y(), None, (pseudoclass, str)) import spam finally: __builtin__.__import__ = orig_import
def __call__(self, *args): # 'self' was freed already return (self, args)
19aab9e072f29bc35d6530b0794f178d0dde44a1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/19aab9e072f29bc35d6530b0794f178d0dde44a1/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 468, 296, 2890, 11, 1703, 28004, 1818, 327, 261, 2890, 16, 833, 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, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 468, 296, 2890, 11, 1703, 28004, 1818, 327, 261, 2890, 16, 833, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
@lock
def restartPackage(self, id): """restart package""" for pyfile in self.cache.itervalues(): if pyfile.packageid == id: self.restartFile(pyfile.id) self.db.restartPackage(id) e = UpdateEvent("pack", id, "collector" if not self.getPackage(id).queue else "queue") self.core.pullManager.addEvent(e)
95fe4671c27b09e56a8eaa4558f5933f41787801 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/95fe4671c27b09e56a8eaa4558f5933f41787801/FileDatabase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7870, 2261, 12, 2890, 16, 612, 4672, 3536, 19164, 2181, 8395, 364, 2395, 768, 316, 365, 18, 2493, 18, 2165, 2372, 13332, 309, 2395, 768, 18, 5610, 350, 422, 612, 30, 365, 18, 19164, 81...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7870, 2261, 12, 2890, 16, 612, 4672, 3536, 19164, 2181, 8395, 364, 2395, 768, 316, 365, 18, 2493, 18, 2165, 2372, 13332, 309, 2395, 768, 18, 5610, 350, 422, 612, 30, 365, 18, 19164, 81...
keyval = 'member' recID = self.xmlU.generateRecID(keyval) member = ET.SubElement(members, "member") member.attrib["record_id"] = recID member.attrib["date_added"] = datetime.now().isoformat() member.attrib["date_updated"] = datetime.now().isoformat() member.attrib["system_id"] = self.xmlU.generateSysID2('service', self.sysID) return member
keyval = 'member' recID = self.xmlU.generateRecID(keyval) member = ET.SubElement(members, "member") member.attrib["record_id"] = recID member.attrib["date_added"] = datetime.now().isoformat() member.attrib["date_updated"] = datetime.now().isoformat() member.attrib["system_id"] = self.xmlU.generateSysID2('service', self.sysID) return member
def createMember(self, members):
47d2884a8b5be4efadf798bbb2e71a3d5e993c3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9116/47d2884a8b5be4efadf798bbb2e71a3d5e993c3e/svcpointxml_406_writer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4419, 12, 2890, 16, 4833, 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, 752, 4419, 12, 2890, 16, 4833, 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...
return EvalEnvironment(self.parent.parent)
return EvalEnvironment(self.parent.parent, self.check_load)
def __getitem__(self, item): if item == '_parent_' + self.parent.parent_name and self.parent.parent: return EvalEnvironment(self.parent.parent) return self.parent.get_eval(check_load=self.check_load)[item]
1afa08a0114ebeb0d0c64754171b564e0fad033e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9151/1afa08a0114ebeb0d0c64754171b564e0fad033e/record.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 761, 4672, 309, 761, 422, 2070, 2938, 4623, 397, 365, 18, 2938, 18, 2938, 67, 529, 471, 365, 18, 2938, 18, 2938, 30, 327, 13163, 5494, 12, 2890, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 761, 4672, 309, 761, 422, 2070, 2938, 4623, 397, 365, 18, 2938, 18, 2938, 67, 529, 471, 365, 18, 2938, 18, 2938, 30, 327, 13163, 5494, 12, 2890, 18, 2...
keys = self._list_keys(path)
return list(self.ilistdir(path,wildcard,full,absolute,dirs_only,files_only)) def listdirinfo(self,path="./",wildcard=None,full=False,absolute=False,dirs_only=False,files_only=False): return list(self.ilistdirinfo(path,wildcard,full,absolute,dirs_only,files_only)) def ilistdir(self,path="./",wildcard=None,full=False,absolute=False,dirs_only=False,files_only=False): """List contents of a directory.""" keys = self._iter_keys(path)
def listdir(self,path="./",wildcard=None,full=False,absolute=False,dirs_only=False,files_only=False): """List contents of a directory.""" keys = self._list_keys(path) entries = self._filter_keys(path,keys,wildcard,full,absolute,dirs_only,files_only) return [nm for (nm,k) in entries]
08fcb5eb9943873d0265d2d6261d936a7e404984 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5578/08fcb5eb9943873d0265d2d6261d936a7e404984/s3fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13529, 12, 2890, 16, 803, 1546, 18, 19, 3113, 22887, 33, 7036, 16, 2854, 33, 8381, 16, 12547, 33, 8381, 16, 8291, 67, 3700, 33, 8381, 16, 2354, 67, 3700, 33, 8381, 4672, 3536, 682, 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, 13529, 12, 2890, 16, 803, 1546, 18, 19, 3113, 22887, 33, 7036, 16, 2854, 33, 8381, 16, 12547, 33, 8381, 16, 8291, 67, 3700, 33, 8381, 16, 2354, 67, 3700, 33, 8381, 4672, 3536, 682, 2...
str = self._start_of('Navbar') + \ '<TABLE BORDER="0" WIDTH="100%" '+\ 'CELLPADDING="0" BGCOLOR="WHITE" CELLSPACING="0">\n'+\ '<TR>\n<TD COLSPAN=2 BGCOLOR=" '<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1">\n'+\ ' <TR ALIGN="center" VALIGN="top">\n'
str = self._start_of('Navbar') str += '<TABLE CLASS="navbar" BORDER="0" WIDTH="100%"' str += ' CELLPADDING="0" BGCOLOR=" str += ' <TR>\n' str += ' <TD WIDTH="100%">\n' str += ' <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">\n' str += ' <TR VALIGN="top">\n' I = ' '
def _navbar(self, where, uid=None): """ @param where: What page the navbar is being displayed on.. """ str = self._start_of('Navbar') + \ '<TABLE BORDER="0" WIDTH="100%" '+\ 'CELLPADDING="0" BGCOLOR="WHITE" CELLSPACING="0">\n'+\ '<TR>\n<TD COLSPAN=2 BGCOLOR="#a0c0ff">\n'+\ '<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1">\n'+\ ' <TR ALIGN="center" VALIGN="top">\n' # Go to Package if self._package is None: pass elif where in ('class', 'module'): pkg = uid.package() if pkg is not None: str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`pkg`+'.html">'+\ 'Package</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' else: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif where=='package': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif isinstance(self._package, UID): str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`self._package`+'.html">'+\ 'Package</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif 'multiple' == self._package: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD></B>\n' # Go to Module if self._module is None: pass elif where=='class': str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`uid.module()`+'.html">'+\ 'Module</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif where=='module': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Module' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif isinstance(self._module, UID): str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`self._module`+'.html">'+\ 'Module</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif 'multiple' == self._module: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Module' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD></B>\n' # Go to Class if where == 'class': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Class' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' else: str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">Class' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n'
07991a6224980123acb6be68dd2d39634e5ac591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/07991a6224980123acb6be68dd2d39634e5ac591/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 891, 1625, 30, 18734, 1363, 326, 8775, 3215, 353, 3832, 10453, 603, 838, 3536, 609, 273, 365, 6315, 1937, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 891, 1625, 30, 18734, 1363, 326, 8775, 3215, 353, 3832, 10453, 603, 838, 3536, 609, 273, 365, 6315, 1937, 67, ...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 913) else quickfix.StringField.__init__(self, 913, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 3437, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 3437, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
scriptsCollection = KindCollection.update(parcel, 'scripts') scriptsCollection.kind = scripting.Script.getKind(parcel.itsView)
scriptsCollection = KindCollection.update( parcel, 'scripts', kind = scripting.Script.getKind(parcel.itsView))
def GetColorForHue (hue): rgb = wx.Image.HSVtoRGB (wx.Image_HSVValue (hue / 360.0, 0.5, 1.0)) return ColorType (rgb.red, rgb.green, rgb.blue, 255)
b08eb6642354633e4de341cadb8747c0ebfabaa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b08eb6642354633e4de341cadb8747c0ebfabaa4/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2957, 1290, 44, 344, 261, 76, 344, 4672, 6917, 273, 7075, 18, 2040, 18, 13173, 58, 869, 11343, 261, 27226, 18, 2040, 67, 13173, 58, 620, 261, 76, 344, 342, 12360, 18, 20, 16, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2957, 1290, 44, 344, 261, 76, 344, 4672, 6917, 273, 7075, 18, 2040, 18, 13173, 58, 869, 11343, 261, 27226, 18, 2040, 67, 13173, 58, 620, 261, 76, 344, 342, 12360, 18, 20, 16, 37...
gateway = session.createGateway()
def getThumbnail(self, session, imageId): gateway = session.createGateway() thumbnailStore = session.createThumbnailStore() image = gateway.getImage(imageId) if image is None: return None pId = image.getPrimaryPixels().getId().getValue() pixelsIds = [pId] s = thumbnailStore.getThumbnailByLongestSideSet(rint(16), pixelsIds) self.assertEqual(1, len(s)) s = thumbnailStore.getThumbnailSet(rint(16), rint(16), pixelsIds) self.assertEqual(1, len(s)) thumbnailStore.setPixelsId(pId) t = thumbnailStore.getThumbnail(rint(16),rint(16)) self.assertNotEqual(None, t) t = thumbnailStore.getThumbnailByLongestSide(rint(16)) self.assertNotEqual(None, t) thumbnailStore.close() gateway.close() return t
b3ce1ee164e24a1085ed5fdf81799db72cfbd9fa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/b3ce1ee164e24a1085ed5fdf81799db72cfbd9fa/thumbnailPerms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 16270, 12, 2890, 16, 1339, 16, 30225, 4672, 282, 9134, 2257, 273, 1339, 18, 2640, 16270, 2257, 1435, 225, 1316, 273, 6878, 18, 588, 2040, 12, 2730, 548, 13, 309, 1316, 353, 599, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16270, 12, 2890, 16, 1339, 16, 30225, 4672, 282, 9134, 2257, 273, 1339, 18, 2640, 16270, 2257, 1435, 225, 1316, 273, 6878, 18, 588, 2040, 12, 2730, 548, 13, 309, 1316, 353, 599, 3...
PR_HASATTACH,
def _GetMessageText(self): # This is finally reliable. The only messages this now fails for # are for "forwarded" messages, where the forwards are actually # in an attachment. Later. # Note we *dont* look in plain text attachments, which we arguably # should. from spambayes import mboxutils
83a3c701ad4457e072c9e91c01d9707fc110f52b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/83a3c701ad4457e072c9e91c01d9707fc110f52b/msgstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 967, 1079, 1528, 12, 2890, 4672, 468, 1220, 353, 3095, 31024, 18, 225, 1021, 1338, 2743, 333, 2037, 6684, 364, 468, 854, 364, 315, 1884, 11804, 6, 2743, 16, 1625, 326, 24578, 854, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 967, 1079, 1528, 12, 2890, 4672, 468, 1220, 353, 3095, 31024, 18, 225, 1021, 1338, 2743, 333, 2037, 6684, 364, 468, 854, 364, 315, 1884, 11804, 6, 2743, 16, 1625, 326, 24578, 854, ...
time.sleep(0.050)
self.waitForFirstProbe("-b " + ipaddr + " -n foo")
def test_AnswerOneProbe(self): ret = uut.start("-b " + ipaddr + " -n foo") self.failIf(ret != 0, "Failed to launch mdns") q = dns.message.make_query("foo.local", dns.rdatatype.A, dns.rdataclass.IN) r = dns.message.make_response(q) r.question = [] r.find_rrset(r.answer, dns.name.Name(["foo", "local", ""]), dns.rdataclass.FLUSH, dns.rdatatype.A, create=True, force_unique=True) time.sleep(0.050) # wait for first probe to go out mdns_tool.inject(r, '224.0.0.251') time.sleep(2) # device should rename itself foo-2 q = dns.message.make_query("foo-2.local", dns.rdatatype.A, dns.rdataclass.FLUSH) self.queryAndVerify(q)
334ce3051a0ec6e9b5cf6738edee73aa767dac13 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9489/334ce3051a0ec6e9b5cf6738edee73aa767dac13/test_mdns.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13203, 3335, 21042, 12, 2890, 4672, 325, 273, 582, 322, 18, 1937, 2932, 17, 70, 315, 397, 2359, 4793, 397, 315, 300, 82, 8431, 7923, 365, 18, 6870, 2047, 12, 1349, 480, 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, 1842, 67, 13203, 3335, 21042, 12, 2890, 4672, 325, 273, 582, 322, 18, 1937, 2932, 17, 70, 315, 397, 2359, 4793, 397, 315, 300, 82, 8431, 7923, 365, 18, 6870, 2047, 12, 1349, 480, 374, ...
if WSAGetLastError () != WSAEINPROGRESS:
if WSAGetLastError() != WSAEINPROGRESS and\ WSAGetLastError() != WSAEWOULDBLOCK:
def land_net_connect(LandNet *self, char const *address): struct sockaddr_in sock_address char *host int port # Resolve hostname. struct hostent *hostinfo if self->state != LAND_NET_INVALID: return self->remote_address = strdup (address) split_address (address, &host, &port) if not (hostinfo = gethostbyname (host)): free (host) perror ("gethostbyname") return # Address to connect to. sock_address.sin_family = AF_INET # Fill in IP (returned in network byte order by gethostbyname). sock_address.sin_addr = *(struct in_addr *) hostinfo->h_addr # Fill in port (and convert to network byte order). sock_address.sin_port = htons (port) # Connect to the server. if connect(self->sock, (struct sockaddr *) &sock_address, sizeof sock_address): #if defined WINDOWS if WSAGetLastError () != WSAEINPROGRESS: #else if errno != EINPROGRESS: #endif perror ("connect") closesocket (self->sock) free (host) return self->state = LAND_NET_CONNECTING D(land_log_message("Connecting to host %s port %d (from %s).\n", host, port, land_net_get_address(self, 0))) free (host)
592872e308788b926d7358eb0ec411e83ee451d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/930/592872e308788b926d7358eb0ec411e83ee451d0/net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19193, 67, 2758, 67, 3612, 12, 29398, 7308, 380, 2890, 16, 1149, 1866, 380, 2867, 4672, 1958, 7313, 4793, 67, 267, 7313, 67, 2867, 1149, 380, 2564, 509, 1756, 225, 468, 9910, 5199, 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, 19193, 67, 2758, 67, 3612, 12, 29398, 7308, 380, 2890, 16, 1149, 1866, 380, 2867, 4672, 1958, 7313, 4793, 67, 267, 7313, 67, 2867, 1149, 380, 2564, 509, 1756, 225, 468, 9910, 5199, 18, ...
ret = self.folder_hooks[folder.id]
ret = self.folder_hooks.get(folder.id) if ret is None: return None
def _GetHookForFolder(self, folder): ret = self.folder_hooks[folder.id] assert ret.target == folder return ret
24ecc9ce4e982b4926466d630dbed9381d0fdc4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/24ecc9ce4e982b4926466d630dbed9381d0fdc4b/addin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 967, 5394, 1290, 3899, 12, 2890, 16, 3009, 4672, 325, 273, 365, 18, 5609, 67, 10468, 18, 588, 12, 5609, 18, 350, 13, 309, 325, 353, 599, 30, 327, 599, 1815, 325, 18, 3299, 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, 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, 967, 5394, 1290, 3899, 12, 2890, 16, 3009, 4672, 325, 273, 365, 18, 5609, 67, 10468, 18, 588, 12, 5609, 18, 350, 13, 309, 325, 353, 599, 30, 327, 599, 1815, 325, 18, 3299, 422, ...
"Called when an exception is raised and not otherwise handled."
"""Called when an exception is raised and not otherwise handled."""
def handle_error(self): "Called when an exception is raised and not otherwise handled." debug("DTPHandler.handle_error()") try: raise # if error is connection related we provide a detailed # information about it except socket.error, err: if err[0] in errno.errorcode: error = err[1] else: error = "Unknown connection error" # an error could occur in case we fail reading / writing # from / to file (e.g. file system gets full) except EnvironmentError, err: error = os.strerror(err.errno) except: # some other exception occurred; we don't want to provide # confidential error messages to user so we return a generic # "unknown error" response. error = "Unknown error" f = StringIO.StringIO() traceback.print_exc(file=f) debug(f.getvalue()) self.cmd_channel.respond("426 %s; transfer aborted." %error) self.close()
367a95e4363ae8b7515230480fff6ef354b95226 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/367a95e4363ae8b7515230480fff6ef354b95226/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 4672, 3536, 8185, 1347, 392, 1520, 353, 11531, 471, 486, 3541, 7681, 12123, 225, 1198, 2932, 9081, 52, 1503, 18, 4110, 67, 1636, 1435, 7923, 775, 30, 1002, 468,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 4672, 3536, 8185, 1347, 392, 1520, 353, 11531, 471, 486, 3541, 7681, 12123, 225, 1198, 2932, 9081, 52, 1503, 18, 4110, 67, 1636, 1435, 7923, 775, 30, 1002, 468,...
struct.fields.append(self._parse_function(callback, Callback))
struct.fields.append( self._parse_function_common(callback, Callback))
def _parse_struct(self, node): if _glibns('type-name') in node.attrib: struct = GLibBoxedStruct(node.attrib['name'], node.attrib[_glibns('type-name')], node.attrib[_glibns('get-type')], node.attrib.get(_cns('type'))) else: struct = Struct(node.attrib['name'], node.attrib.get(_cns('type'))) for field in node.findall(_corens('field')): struct.fields.append(self._parse_field(field)) for callback in node.findall(_corens('callback')): struct.fields.append(self._parse_function(callback, Callback)) for method in node.findall(_corens('method')): struct.fields.append(self._parse_function(method, Function)) for ctor in node.findall(_corens('constructor')): struct.constructors.append(self._parse_function(ctor, Function)) self._add_node(struct)
34db824e4656506e5dfa8df3d0446950b5a48e65 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2770/34db824e4656506e5dfa8df3d0446950b5a48e65/girparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 1697, 12, 2890, 16, 756, 4672, 309, 389, 75, 2941, 2387, 2668, 723, 17, 529, 6134, 316, 756, 18, 14588, 30, 1958, 273, 611, 5664, 3514, 329, 3823, 12, 2159, 18, 14588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 1697, 12, 2890, 16, 756, 4672, 309, 389, 75, 2941, 2387, 2668, 723, 17, 529, 6134, 316, 756, 18, 14588, 30, 1958, 273, 611, 5664, 3514, 329, 3823, 12, 2159, 18, 14588, ...
sage: print magma.load(SAGE_TMP + 'a.m')
sage: print magma.load(SAGE_TMP + 'a.m')
def load(self, filename): """ Load the file with given filename using the 'load' command in the MAGMA shell.
06891bc866b47f420feaea6eefc08baf44cc4cb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/06891bc866b47f420feaea6eefc08baf44cc4cb9/magma.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 1544, 4672, 3536, 4444, 326, 585, 598, 864, 1544, 1450, 326, 296, 945, 11, 1296, 316, 326, 490, 1781, 5535, 5972, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 1544, 4672, 3536, 4444, 326, 585, 598, 864, 1544, 1450, 326, 296, 945, 11, 1296, 316, 326, 490, 1781, 5535, 5972, 18, 2, -100, -100, -100, -100, -100, -100, -100, -...
if False and type.size:
if type.size:
def encode_struct(self, type, s): if False and type.size: enc = StringIO() codec = Codec(enc, self.spec) codec.encode_struct_body(type, s) codec.flush() body = enc.getvalue() self.enc_num(type.size, len(body)) self.write(body) else: self.encode_struct_body(type, s)
fd396f30409d3c321c358de7f2d14651c0cfd971 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/197/fd396f30409d3c321c358de7f2d14651c0cfd971/codec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 67, 1697, 12, 2890, 16, 618, 16, 272, 4672, 309, 618, 18, 1467, 30, 2446, 273, 15777, 1435, 9196, 273, 17321, 12, 1331, 16, 365, 18, 2793, 13, 9196, 18, 3015, 67, 1697, 67, 343...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 67, 1697, 12, 2890, 16, 618, 16, 272, 4672, 309, 618, 18, 1467, 30, 2446, 273, 15777, 1435, 9196, 273, 17321, 12, 1331, 16, 365, 18, 2793, 13, 9196, 18, 3015, 67, 1697, 67, 343...
if len(browsed_words_in_colls) == 1:
if len(browsed_phrases_in_colls) == 1:
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=%s" % urllib.quote(coll) ## okay, "real browse" follows: browsed_words = browse_in_bibxxx(p, f, rg) while not browsed_words: # try again and again with shorter and shorter pattern: try: p = p[:-1] browsed_words = browse_in_bibxxx(p, f, rg) except: # probably there are no hits at all: req.write("<p>No values found.") return ## try to check hits in these particular collection selection: browsed_words_in_colls = [] for word,nbhits in browsed_words: word_hitlist = HitList() word_hitlists = search_pattern("", word, f, colls, 'e') for coll in colls: word_hitlist.union(word_hitlists[coll]) word_hitlist.calculate_nbhits() if word_hitlist._nbhits > 0: # okay, this word has some hits in colls, so add it: browsed_words_in_colls.append([word, word_hitlist._nbhits]) ## were there hits in collections? if browsed_words_in_colls == []: if browsed_words != []: print_warning(req, """<p>No match close to <em>%s</em> found in given collections. Please try different term.<p>Displaying matches in any collection...""" % p_orig, "") browsed_words_in_colls = browsed_words ## display results now: out = """<table class="searchresultsbox"> <thead> <tr> <th class="searchresultsboxheader" align="left"> hits </th> <th class="searchresultsboxheader" width="15"> &nbsp; </th> <th class="searchresultsboxheader" align="left"> %s </th> </tr> </thead> <tbody>""" % f if len(browsed_words_in_colls) == 1: # one hit only found: word, nbhits = browsed_words_in_colls[0][0], browsed_words_in_colls[0][1] out += """<tr> <td class="searchresultsboxbody" align="right"> %s </td> <td class="searchresultsboxbody" width="15"> &nbsp; </td> <td class="searchresultsboxbody" align="left"> <a href="%s/search.py?p=%%22%s%%22&f=%s%s">%s</a> </td> </tr>""" % (nbhits, weburl, urllib.quote(word), urllib.quote(f), urlarg_colls, word) elif len(browsed_words_in_colls) > 1: # first display what was found but the last one: for word, nbhits in browsed_words_in_colls[:-1]: out += """<tr> <td class="searchresultsboxbody" align="right"> %s </td> <td class="searchresultsboxbody" width="15"> &nbsp; </td> <td class="searchresultsboxbody" align="left"> <a href="%s/search.py?p=%%22%s%%22&f=%s%s">%s</a> </td> </tr>""" % (nbhits, weburl, urllib.quote(word), urllib.quote(f), urlarg_colls, word) # now display last hit as "next term": word, nbhits = browsed_words_in_colls[-1] out += """<tr><td colspan="2" class="normal"> &nbsp; </td> <td class="normal"> <img src="%s/img/sn.gif" alt="" border="0"> next %s: <a href="%s/search.py?search=Browse&p=%s&f=%s%s">%s</a> </td> </tr>""" % (weburl, f, weburl, urllib.quote(word), urllib.quote(f), urlarg_colls, word) out += """</tbody> </table>""" req.write(out) return
535ed6a8d836745c0ddd7f1016fbe145d7c7bebd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/535ed6a8d836745c0ddd7f1016fbe145d7c7bebd/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 67, 4951, 12, 3658, 16, 645, 3251, 16, 293, 16, 284, 16, 14524, 4672, 3536, 27304, 3344, 324, 15700, 16983, 31413, 578, 4511, 5596, 16, 471, 2562, 518, 12123, 7541, 741, 732, 1623...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 67, 4951, 12, 3658, 16, 645, 3251, 16, 293, 16, 284, 16, 14524, 4672, 3536, 27304, 3344, 324, 15700, 16983, 31413, 578, 4511, 5596, 16, 471, 2562, 518, 12123, 7541, 741, 732, 1623...
def generateModelDocs(options, outputDir=None): urlRoot = '/docs/current/model' chandlerDir = Utility.locateChandlerDirectory() repositoryDir = Utility.locateRepositoryDirectory(chandlerDir, options)
def generateModelDocs(options, chandlerDir, view, outputDir=None): urlRoot = '/docs/current/model'
def generateModelDocs(options, outputDir=None): urlRoot = '/docs/current/model' chandlerDir = Utility.locateChandlerDirectory() repositoryDir = Utility.locateRepositoryDirectory(chandlerDir, options) if not outputDir: modelDir = os.path.join(chandlerDir, 'docs', 'model') else: modelDir = os.path.join(outputDir, 'model') options.ramdb = True # force ramdb options.create = True # force a repository wipe parcelPath = Utility.initParcelEnv(options, chandlerDir) pluginEnv, pluginEggs = Utility.initPluginEnv(Globals.options, Globals.options.pluginPath) view = Utility.initRepository(repositoryDir, options) Utility.initParcels(options, view, parcelPath) Utility.initPlugins(Globals.options, view, pluginEnv, pluginEggs) if not os.path.isdir(modelDir): _mkdirs(modelDir) conf = { 'directory': modelDir, 'urlRoot': urlRoot, 'css': '%s/schema.css' % urlRoot, } for root in view.iterRoots(): processItem(root, generateSchemaDocument, conf) generateIndex(view, conf) shutil.copy(os.path.join(chandlerDir, 'tools', 'schema.css'), os.path.join(modelDir, 'schema.css')) Utility.stopRepository(view)
0ac9b659361825b14b17130480cba4fa87a2569a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/0ac9b659361825b14b17130480cba4fa87a2569a/gen_docs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 1488, 12656, 12, 2116, 16, 462, 464, 749, 1621, 16, 1476, 16, 21412, 33, 7036, 4672, 880, 2375, 273, 1173, 8532, 19, 2972, 19, 2284, 11, 225, 309, 486, 21412, 30, 938, 1621, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 1488, 12656, 12, 2116, 16, 462, 464, 749, 1621, 16, 1476, 16, 21412, 33, 7036, 4672, 880, 2375, 273, 1173, 8532, 19, 2972, 19, 2284, 11, 225, 309, 486, 21412, 30, 938, 1621, 273,...
bot = MovePagesBot(None, prefix, delete, always)
bot = MovePagesBot(None, prefix, delete, always, skipredirects)
def main(): gen = None prefix = None oldName = None newName = None delete = False always = False # This factory is responsible for processing command line arguments # that are also used by other scripts and that determine on which pages # to work on. genFactory = pagegenerators.GeneratorFactory() for arg in wikipedia.handleArgs(): if arg == '-del': delete = True elif arg == '-always': always = True elif arg.startswith('-from:'): oldName = arg[len('-from:'):] elif arg.startswith('-to:'): newName = arg[len('-to:'):] elif arg.startswith('-prefix'): if len(arg) == len('-prefix'): prefix = wikipedia.input(u'Enter the prefix:') else: prefix = arg[8:] else: generator = genFactory.handleArg(arg) if generator: gen = generator if oldName and newName: page = wikipedia.Page(wikipedia.getSite(), oldName) bot = MovePagesBot(None, prefix, delete, always) bot.moveOne(page, newName, delete) elif gen: preloadingGen = pagegenerators.PreloadingGenerator(gen) bot = MovePagesBot(preloadingGen, prefix, delete, always) bot.run() else: wikipedia.showHelp('movepages')
83fef0c211ea4a75470d44351e559e5caf102ced /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/83fef0c211ea4a75470d44351e559e5caf102ced/movepages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3157, 273, 599, 1633, 273, 599, 22916, 273, 599, 13253, 273, 599, 1430, 273, 1083, 3712, 273, 1083, 225, 468, 1220, 3272, 353, 14549, 364, 4929, 1296, 980, 1775, 468, 716, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3157, 273, 599, 1633, 273, 599, 22916, 273, 599, 13253, 273, 599, 1430, 273, 1083, 3712, 273, 1083, 225, 468, 1220, 3272, 353, 14549, 364, 4929, 1296, 980, 1775, 468, 716, 8...
props, changed = parsePropsFromForm(self.db, cl, self.form, self.nodeid)
props = parsePropsFromForm(self.db, cl, self.form, self.nodeid)
def shownode(self, message=None): ''' display an item ''' cn = self.classname cl = self.db.classes[cn]
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12188, 390, 12, 2890, 16, 883, 33, 7036, 4672, 9163, 2562, 392, 761, 9163, 6227, 273, 365, 18, 18340, 927, 273, 365, 18, 1966, 18, 4701, 63, 10305, 65, 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, 12188, 390, 12, 2890, 16, 883, 33, 7036, 4672, 9163, 2562, 392, 761, 9163, 6227, 273, 365, 18, 18340, 927, 273, 365, 18, 1966, 18, 4701, 63, 10305, 65, 2, -100, -100, -100, -100, -100,...
try: return self._order except AttributeError: pass self._order = rings.Integer(1)
ord = rings.Integer(1)
def order(self): """ Return the number of elements of self. This is the same as len(self). EXAMPLES:: sage: DirichletGroup(20).order() 8 sage: DirichletGroup(37).order() 36 """ try: return self._order except AttributeError: pass self._order = rings.Integer(1) for g in self.gens(): self._order *= int(g.order()) return self._order
59b9d951da50fd609601a8510ce35029ae856971 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/59b9d951da50fd609601a8510ce35029ae856971/dirichlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1353, 12, 2890, 4672, 3536, 2000, 326, 1300, 434, 2186, 434, 365, 18, 1220, 353, 326, 1967, 487, 562, 12, 2890, 2934, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 8446, 1354, 1810, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1353, 12, 2890, 4672, 3536, 2000, 326, 1300, 434, 2186, 434, 365, 18, 1220, 353, 326, 1967, 487, 562, 12, 2890, 2934, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 8446, 1354, 1810, ...
class LINETO(MOVETOEX):
class _LINETO(_MOVETOEX):
def __init__(self): EMR_UNKNOWN.__init__(self)
688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 7141, 54, 67, 14737, 16186, 2738, 972, 12, 2890, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 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, 2738, 972, 12, 2890, 4672, 7141, 54, 67, 14737, 16186, 2738, 972, 12, 2890, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
<autoHide><n:h1>Modified Files</n:h1><files/></autoHide>
<n:h1>Modified Files</n:h1><files/>
def component_log(self, element, args): """Convert the log message to HTML. If the message seems to be preformatted (it has some lines with indentation) it is stuck into a <pre>. Otherwise it is converted to HTML by replacing newlines with <br> tags and converting bulletted lists. """ log = XML.dig(args.message.xml, "message", "body", "commit", "log") if not log: return [] content = [] lines = Util.getNormalizedLog(log) nonListItemLines = [] listItems = []
adb6b07a8c446030667eccd5b3fa6e87fd31be5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/adb6b07a8c446030667eccd5b3fa6e87fd31be5c/Commit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1794, 67, 1330, 12, 2890, 16, 930, 16, 833, 4672, 3536, 2723, 326, 613, 883, 358, 3982, 18, 971, 326, 883, 12001, 358, 506, 675, 14897, 261, 305, 711, 2690, 2362, 598, 12018, 13, 518, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1794, 67, 1330, 12, 2890, 16, 930, 16, 833, 4672, 3536, 2723, 326, 613, 883, 358, 3982, 18, 971, 326, 883, 12001, 358, 506, 675, 14897, 261, 305, 711, 2690, 2362, 598, 12018, 13, 518, ...
this = apply(_quickfix.new_UnderlyingTradingSessionSubID, args)
this = _quickfix.new_UnderlyingTradingSessionSubID(*args)
def __init__(self, *args): this = apply(_quickfix.new_UnderlyingTradingSessionSubID, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 14655, 6291, 1609, 7459, 2157, 1676, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 14655, 6291, 1609, 7459, 2157, 1676, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12...
def tidy(x): return string.replace(str(x), '.0', '')
def tidy(x): s = str(x) if s[-2:] == '.0': s=s[:-2] return s
def tidy(x): return string.replace(str(x), '.0', '')
46fda01b4bcdd106ea01c5960631f6dbcbbe7ce7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/46fda01b4bcdd106ea01c5960631f6dbcbbe7ce7/cwm_math.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28792, 12, 92, 4672, 225, 272, 273, 609, 12, 92, 13, 309, 272, 18919, 22, 26894, 422, 2418, 20, 4278, 272, 33, 87, 10531, 17, 22, 65, 327, 272, 282, 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, 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, 28792, 12, 92, 4672, 225, 272, 273, 609, 12, 92, 13, 309, 272, 18919, 22, 26894, 422, 2418, 20, 4278, 272, 33, 87, 10531, 17, 22, 65, 327, 272, 282, 2, -100, -100, -100, -100, -100, ...
self.data = [1]
self.data = [1,1]
def __init__(self): self.x = 0 self.y = 0 self.width = 100 self.height = 100 self.data = [1] self.labels = None # or list of strings self.startAngle = 90 self.direction = "clockwise"
2d57ef3fa5f6f2cc84d02f85f0b434b83c665873 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/2d57ef3fa5f6f2cc84d02f85f0b434b83c665873/doughnut.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 92, 273, 374, 365, 18, 93, 273, 374, 365, 18, 2819, 273, 2130, 365, 18, 4210, 273, 2130, 365, 18, 892, 273, 306, 21, 16, 21, 65, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 92, 273, 374, 365, 18, 93, 273, 374, 365, 18, 2819, 273, 2130, 365, 18, 4210, 273, 2130, 365, 18, 892, 273, 306, 21, 16, 21, 65, 365, 18, ...
result.append(PA(self.upper_right))
result.append(PA(self.xyabsolute + self.upper_right))
def _subcommands_corner_dots(self): result = [PU( )] result.append(PA(self.upper_left)) result += [PD( ), PU( )] result.append(PA(self.upper_right)) result += [PD( ), PU( )] result.append(PA(self.lower_left)) result += [PD( ), PU( )] result.append(PA(self.lower_right)) result += [PD( ), PU( )] return result
cd5cfeb256d607b0398a54ca138dbdcc9058e232 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3716/cd5cfeb256d607b0398a54ca138dbdcc9058e232/businesscard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1717, 7847, 67, 30519, 67, 72, 6968, 12, 2890, 4672, 563, 273, 306, 18061, 12, 262, 65, 563, 18, 6923, 12, 4066, 12, 2890, 18, 5797, 67, 4482, 3719, 563, 1011, 306, 21527, 12, 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, 1717, 7847, 67, 30519, 67, 72, 6968, 12, 2890, 4672, 563, 273, 306, 18061, 12, 262, 65, 563, 18, 6923, 12, 4066, 12, 2890, 18, 5797, 67, 4482, 3719, 563, 1011, 306, 21527, 12, 2...
'title': 'All %s near%s%s' % capfirst(context['entity_types'][0].verbose_name_plural),
'title': 'All %s' % context['entity_types'][0].verbose_name_plural,
def get_metadata(self, request, ptypes): context = CategoryDetailView.initial_context(self, request, ptypes)
f12e75085f17a6e9e191c9a45555d9a6aaf1d274 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14173/f12e75085f17a6e9e191c9a45555d9a6aaf1d274/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4165, 12, 2890, 16, 590, 16, 293, 2352, 4672, 819, 273, 9856, 6109, 1767, 18, 6769, 67, 2472, 12, 2890, 16, 590, 16, 293, 2352, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 4165, 12, 2890, 16, 590, 16, 293, 2352, 4672, 819, 273, 9856, 6109, 1767, 18, 6769, 67, 2472, 12, 2890, 16, 590, 16, 293, 2352, 13, 2, -100, -100, -100, -100, -100, -100, -1...
size = (size // 2)
size //= 2
def test_format(self, size): s = '-' * size sf = '%s' % (s,) self.failUnless(s == sf) del sf sf = '..%s..' % (s,) self.assertEquals(len(sf), len(s) + 4) self.failUnless(sf.startswith('..-')) self.failUnless(sf.endswith('-..')) del s, sf
0d0b2b4c8d86bb633173f2cdce1f7fef8107d496 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0d0b2b4c8d86bb633173f2cdce1f7fef8107d496/test_bigmem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2139, 12, 2890, 16, 963, 4672, 272, 273, 4014, 380, 963, 9033, 273, 1995, 87, 11, 738, 261, 87, 16, 13, 365, 18, 6870, 984, 2656, 12, 87, 422, 9033, 13, 1464, 9033, 9033, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2139, 12, 2890, 16, 963, 4672, 272, 273, 4014, 380, 963, 9033, 273, 1995, 87, 11, 738, 261, 87, 16, 13, 365, 18, 6870, 984, 2656, 12, 87, 422, 9033, 13, 1464, 9033, 9033, ...
their contained methods and nested classes. Private names reached from M's globals are skipped, but all names reached from M.__test__ are searched. By default, a name is considered to be private if it begins with an underscore (like "_my_func") but doesn't both begin and end with (at least) two underscores (like "__init__"). You can change the default by passing your own "isprivate" function to testmod.
their contained methods and nested classes. All names reached from M.__test__ are searched. Optionally, functions with private names can be skipped (unless listed in M.__test__) by supplying a function to the "isprivate" argument that will identify private functions. For convenience, one such function is supplied. docttest.is_private considers a name to be private if it begins with an underscore (like "_my_func") but doesn't both begin and end with (at least) two underscores (like "__init__"). By supplying this function or your own "isprivate" function to testmod, the behavior can be customized.
def _test(): import doctest, M # replace M with your module's name return doctest.testmod(M) # ditto
d5be5ad4f89b7e2cb87e93ca13241a39b08f8d53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d5be5ad4f89b7e2cb87e93ca13241a39b08f8d53/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 31263, 395, 16, 490, 6647, 468, 1453, 490, 598, 3433, 1605, 1807, 508, 327, 31263, 395, 18, 3813, 1711, 12, 49, 13, 282, 468, 302, 305, 869, 225, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 31263, 395, 16, 490, 6647, 468, 1453, 490, 598, 3433, 1605, 1807, 508, 327, 31263, 395, 18, 3813, 1711, 12, 49, 13, 282, 468, 302, 305, 869, 225, 2, -100, -100,...
stats['years'][year] += (year_end-trip['startdate']).days
stats['years'][year]['duration'] += (year_end-trip['startdate']).days stats['years'][year]['trips'] += 1
def build_stats(trip_list, traveller_info): # TODO break this apart and/or do similar things in subroutines # TODO build more year metadata stats = {'countries': {}, 'cities': {}, 'years': {}, 'home': { 'trips': 0, 'duration':0, }, 'away': { 'trips': 0, 'duration':0, }, 'future': 0, 'types': {}, 'ordered': {}, } home_country = traveller_info['home_city']['country'] for trip in trip_list: # skip if not a past trip if trip['status'] != "Past": if trip['status'] == "Ongoing": stats['current'] = trip['city']['name'] else: stats['future'] += 1 continue # how long (simple version...) # TODO never double count date duration = trip['finishdate'] - trip['startdate'] # build country data country = trip['city']['country'] display = country inline = country # special casing! if not country.find("United"): # TODO there's something wrong here... inline = "the "+country # TODO and this should be a hash anyway if not country.find("Hong Kong"): display = "Hong Kong" inline = "Hong Kong" # stuff info into the data structure if not country in stats['countries']: stats['countries'][country] = { 'duration': 0, 'trips': 0, 'display':display, 'inline':inline, 'code':trip['city']['country_code'], 'rgb':md5.new(country).hexdigest()[0:6]} stats['countries'][country]['duration'] += duration.days stats['countries'][country]['trips'] += 1 if not trip['return_transport_type'] in stats['types']: stats['types'][trip['return_transport_type']] = {'trips':0} stats['types'][trip['return_transport_type']]['trips'] += 0.5 if not trip['outgoing_transport_type'] in stats['types']: stats['types'][trip['outgoing_transport_type']] = {'trips':0} stats['types'][trip['outgoing_transport_type']]['trips'] += 0.5 if (country == home_country): stats['home']['trips'] += 1; stats['home']['duration'] += duration.days else: stats['away']['trips'] += 1; stats['away']['duration'] += duration.days # build city data city = trip['city']['name'] rgb = trip['city']['rgb'] if not city in stats['cities']: stats['cities'][city] = { 'duration': 0, 'trips': 0, 'rgb':rgb, 'country':country} stats['cities'][city]['duration'] += duration.days stats['cities'][city]['trips'] += 1 # build year data year = trip['startdate'].year if not year in stats['years']: stats['years'][year] = 0 if year == trip['finishdate'].year: stats['years'][year] += duration.days else: if trip['finishdate'].year - year == 1: # spans a single year boundary, and is therefore Sane # if there's *anyone* who has a trip spanning two, they can bloody # well write this themselves. Otherwise, assume they mean they're # living there now. Onwards... year_end = datetime(year, 12, 31) stats['years'][year] += (year_end-trip['startdate']).days year = trip['finishdate'].year year_start = datetime(year, 1, 1) if not year in stats['years']: stats['years'][year] = 0 stats['years'][year] += (trip['finishdate']-year_start).days # do we want to supply full-blown cross-cut stats? maybe later... # reorder final stats stats['ordered']['years'] = sorted(stats['years']) stats['ordered']['years'].reverse() stats['ordered']['types'] = sorted(stats['types'], lambda x, y: (int(stats['types'][y]['trips']))-(int(stats['types'][x]['trips']))) stats['ordered']['years_by_trip'] = sorted(stats['years'], lambda x, y: (stats['years'][y])-(stats['years'][x])) stats['ordered']['countries'] = sorted(stats['countries'], lambda x, y: (stats['countries'][y]['duration'])-(stats['countries'][x]['duration'])) stats['ordered']['cities'] = sorted(stats['cities'], lambda x, y: (stats['cities'][y]['duration'])-(stats['cities'][x]['duration'])) start = 160 stats['rgb'] = stats['countries'][stats['ordered']['countries'][0]]['rgb'] stats['rgb_start'] = "%x%x%x" % (start, start, start) # scale country stats for map (including colours) topcountry = stats['ordered']['countries'][0] topduration = stats['countries'][topcountry]['duration'] r = stats['rgb'][0:2]; g = stats['rgb'][2:4]; b = stats['rgb'][4:6] for country in stats['countries'].keys(): scaled = 100*stats['countries'][country]['duration']/topduration sr = (scaled*(int(r, 16)-start)/100)+start sg = (scaled*(int(g, 16)-start)/100)+start sb = (scaled*(int(b, 16)-start)/100)+start stats['countries'][country]['scaled'] = scaled stats['countries'][country]['rgb_scaled'] = "%x%x%x" % (sr, sg, sb) # scale transport types toptype = stats['ordered']['types'][0] toptrip = int(stats['types'][toptype]['trips']) for type in stats['types'].keys(): stats['types'][type]['scaled'] = 100*int(stats['types'][type]['trips'])/toptrip # scale days on trips stats['topyear'] = stats['ordered']['years_by_trip'][0] stats['away']['days'] = (stats['years'][stats['topyear']])/3.66 stats['home']['days'] = (366-stats['years'][stats['topyear']])/3.66 return stats
1c67bb5808334c681c6ba34ea3f5485a4f220770 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11110/1c67bb5808334c681c6ba34ea3f5485a4f220770/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5296, 12, 25125, 67, 1098, 16, 29090, 749, 67, 1376, 4672, 468, 2660, 898, 333, 513, 485, 471, 19, 280, 741, 7281, 9198, 316, 720, 7028, 1465, 468, 2660, 1361, 1898, 3286, 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, 1361, 67, 5296, 12, 25125, 67, 1098, 16, 29090, 749, 67, 1376, 4672, 468, 2660, 898, 333, 513, 485, 471, 19, 280, 741, 7281, 9198, 316, 720, 7028, 1465, 468, 2660, 1361, 1898, 3286, 19...
self.assertEqual('http://foo/?q=foobar', self.GetActiveTabURL().spec())
self.assertEqual('http://localhost/?q=foobar', self.GetActiveTabURL().spec())
def testAddSearchEngine(self): """Test searching using keyword of user-added search engine.""" self.AddSearchEngine(title='foo', keyword='foo.com', url='http://foo/?q=%s') self.SetOmniboxText('foo.com foobar') self.OmniboxAcceptInput() self.assertEqual('http://foo/?q=foobar', self.GetActiveTabURL().spec())
40f5b584d9cf573c0f6d6bd40834978291f1a640 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/40f5b584d9cf573c0f6d6bd40834978291f1a640/search_engines.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 986, 2979, 4410, 12, 2890, 4672, 3536, 4709, 15300, 1450, 4932, 434, 729, 17, 9665, 1623, 4073, 12123, 365, 18, 986, 2979, 4410, 12, 2649, 2218, 11351, 2187, 4932, 2218, 11351, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 986, 2979, 4410, 12, 2890, 4672, 3536, 4709, 15300, 1450, 4932, 434, 729, 17, 9665, 1623, 4073, 12123, 365, 18, 986, 2979, 4410, 12, 2649, 2218, 11351, 2187, 4932, 2218, 11351, 18, ...
data = cPickle.dumps(value, self.binary)
data = _dumps(value, self.protocol)
def get_both(self, key, value, flags=0): data = cPickle.dumps(value, self.binary) rec = self.dbc.get_both(key, flags) return self._extract(rec)
8e4d05ecedcfaf8dd3a4aa3df31cc807547cf74b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/8e4d05ecedcfaf8dd3a4aa3df31cc807547cf74b/dbshelve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 18237, 12, 2890, 16, 498, 16, 460, 16, 2943, 33, 20, 4672, 501, 273, 389, 13302, 1121, 12, 1132, 16, 365, 18, 8373, 13, 1950, 273, 365, 18, 9137, 18, 588, 67, 18237, 12, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 18237, 12, 2890, 16, 498, 16, 460, 16, 2943, 33, 20, 4672, 501, 273, 389, 13302, 1121, 12, 1132, 16, 365, 18, 8373, 13, 1950, 273, 365, 18, 9137, 18, 588, 67, 18237, 12, 8...
fontdir = os.path.join(os.environ['WINDIR'], "Fonts")
fontdir = os.path.join(windir, "Fonts")
def initsysfonts_win32(): try: import _winreg except ImportError: import winreg as _winreg fonts = {} mods = 'demibold', 'narrow', 'light', 'unicode', 'bt', 'mt' fontdir = os.path.join(os.environ['WINDIR'], "Fonts") #this is a list of registry keys containing information #about fonts installed on the system. keys = [] #add recognized fonts from the fonts directory because the default #fonts may not be entered in the registry. win_font_files_mapping = dict( [(font.lower(), (_simplename(name), face)) for font, name, face in XP_default_font_files]) font_dir_path = os.path.join(os.environ['windir'], 'fonts') try: font_file_paths = glob.glob(os.path.join(font_dir_path, '*.tt?')) except Exception: pass else: for font in font_file_paths: file_name = os.path.basename(font) try: name, face = win_font_file_mapping[file_name] except KeyError: pass else: try: faces = fonts[name] except KeyError: _addfont(name, face[0], face[1], font, fonts) else: if face not in faces: _addfont(name, face[0], face[1], font, fonts) #add additional fonts entered in the registry. #find valid registry keys containing font information. possible_keys = [ r"SOFTWARE\Microsoft\Windows\CurrentVersion\Fonts", r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts", r"SOFTWARE\Microsoft\Windows[NT]\CurrentVersion\Fonts", ] for key_name in possible_keys: try: key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key_name) keys.append(key) except WindowsError: pass for key in keys: fontdict = {} for i in range(_winreg.QueryInfoKey(key)[1]): try: name, font, t = _winreg.EnumValue(key,i) except EnvironmentError: break # try and handle windows unicode strings for some file names. # here are two documents with some information about it: # http://www.python.org/peps/pep-0277.html # https://www.microsoft.com/technet/archive/interopmigration/linux/mvc/lintowin.mspx#ECAA try: font = str(font) except UnicodeEncodeError: # MBCS is the windows encoding for unicode file names. try: font = font.encode('MBCS') except: # no goodness with str or MBCS encoding... skip this font. continue if font[-4:].lower() not in [".ttf", ".ttc"]: continue if os.sep not in font: font = os.path.join(fontdir, font) if name[-10:] == '(TrueType)': name = name[:-11] name = name.lower().split() bold = italic = 0 for m in mods: if m in name: name.remove(m) if 'bold' in name: name.remove('bold') bold = 1 if 'italic' in name: name.remove('italic') italic = 1 name = ''.join(name) name=_simplename(name) _addfont(name, bold, italic, font, fonts) return fonts
e9a92ee724290355f4b1d637f994ae0814b0ffbf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1298/e9a92ee724290355f4b1d637f994ae0814b0ffbf/sysfont.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 9499, 22052, 67, 8082, 1578, 13332, 775, 30, 1930, 389, 8082, 1574, 1335, 11308, 30, 1930, 5657, 1574, 487, 389, 8082, 1574, 16450, 273, 2618, 15546, 273, 296, 19117, 495, 1673, 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, 1208, 9499, 22052, 67, 8082, 1578, 13332, 775, 30, 1930, 389, 8082, 1574, 1335, 11308, 30, 1930, 5657, 1574, 487, 389, 8082, 1574, 16450, 273, 2618, 15546, 273, 296, 19117, 495, 1673, 2187...
self._ask = ['zero or nonzero?', 'an integer?', 'positive, negative, or zero?', 'positive or negative?']
self._ask = ['zero or nonzero?', 'an integer?', 'positive, negative, or zero?', 'positive or negative?', 'positive or zero?']
def __init__(self, script_subdirectory=None, logfile=None, server=None, init_code = None): """ Create an instance of the Maxima interpreter. """ # TODO: Input and output prompts in maxima can be changed by # setting inchar and outchar.. eval_using_file_cutoff = 256 self.__eval_using_file_cutoff = eval_using_file_cutoff STARTUP = '%s/local/bin/sage-maxima.lisp'%SAGE_ROOT if not os.path.exists(STARTUP): raise RuntimeError, 'You must get the file local/bin/sage-maxima.lisp' if init_code is None: # display2d -- no ascii art output # keepfloat -- don't automatically convert floats to rationals init_code = ['display2d : false', 'keepfloat : true'] Expect.__init__(self, name = 'maxima', prompt = '\(\%i[0-9]+\)', command = 'maxima -p "%s"'%STARTUP, maxread = 10000, script_subdirectory = script_subdirectory, restart_on_ctrlc = False, verbose_start = False, init_code = init_code, logfile = logfile, eval_using_file_cutoff=eval_using_file_cutoff) self._display_prompt = '<sage-display>' # must match what is in the file local/ibn/sage-maxima.lisp!! self._output_prompt_re = re.compile('\(\%o[0-9]+\)') self._ask = ['zero or nonzero?', 'an integer?', 'positive, negative, or zero?', 'positive or negative?'] self._prompt_wait = [self._prompt] + [re.compile(x) for x in self._ask] + \ ['Break [0-9]+'] #note that you might need to change _expect_expr if you #change this self._error_re = re.compile('(Principal Value|debugmode|Incorrect syntax|Maxima encountered a Lisp error)') self._display2d = False
227b4ce87345b2b6c0f365374d6e882ce13ecb78 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/227b4ce87345b2b6c0f365374d6e882ce13ecb78/maxima.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2728, 67, 1717, 5149, 33, 7036, 16, 15204, 33, 7036, 16, 1438, 33, 7036, 16, 1208, 67, 710, 273, 599, 4672, 3536, 1788, 392, 791, 434, 326, 4238, 13888, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2728, 67, 1717, 5149, 33, 7036, 16, 15204, 33, 7036, 16, 1438, 33, 7036, 16, 1208, 67, 710, 273, 599, 4672, 3536, 1788, 392, 791, 434, 326, 4238, 13888, ...
if arith.gcd(self.norm(), other.norm()) == 1: return True
if self.is_integral() and other.is_integral(): if arith.gcd(self.norm(), other.norm()) == 1: return True else: return self+other == one
def is_coprime(self, other): """ Returns True if this ideal is coprime to the other, else False.
13731c862b92fe91b2614793bb1eaae86135b467 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/13731c862b92fe91b2614793bb1eaae86135b467/number_field_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 22295, 86, 494, 12, 2890, 16, 1308, 4672, 3536, 2860, 1053, 309, 333, 23349, 353, 6529, 86, 494, 358, 326, 1308, 16, 469, 1083, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 22295, 86, 494, 12, 2890, 16, 1308, 4672, 3536, 2860, 1053, 309, 333, 23349, 353, 6529, 86, 494, 358, 326, 1308, 16, 469, 1083, 18, 2, -100, -100, -100, -100, -100, -100, -100...
srs.SetFromUserInput('EPSG:4326')
srs.SetFromUserInput("""GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]""")
def ogr_sqlite_17(): if gdaltest.sl_ds is None: return 'skip' ###################################################### # Create dataset with SPATIALITE geometry ds = ogr.GetDriverByName( 'SQLite' ).CreateDataSource( 'tmp/spatialite_test.db', options = ['SPATIALITE=YES'] ) srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:4326') lyr = ds.CreateLayer( 'geomspatialite', srs = srs ) geom = ogr.CreateGeometryFromWkt( 'POINT(0 1)' ) dst_feat = ogr.Feature( feature_def = lyr.GetLayerDefn() ) dst_feat.SetGeometry( geom ) lyr.CreateFeature( dst_feat ) dst_feat.Destroy() ###################################################### # Reopen DB ds.Destroy() ds = ogr.Open( 'tmp/spatialite_test.db' ) lyr =ds.GetLayerByName('geomspatialite') feat_read = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat_read,geom,max_error = 0.001 ) != 0: return 'fail' feat_read.Destroy() sql_lyr = ds.ExecuteSQL( "select proj4text from spatial_ref_sys" ) feat = sql_lyr.GetNextFeature() if feat.GetFieldAsString('proj4text').find('+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs') == -1: return 'fail' ds.ReleaseResultSet( sql_lyr ) ds.Destroy() return 'success'
6bc5de742d925cd22b0a58488f118deef6a9c6f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/6bc5de742d925cd22b0a58488f118deef6a9c6f4/ogr_sqlite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 320, 3197, 67, 19460, 67, 4033, 13332, 225, 309, 15551, 2390, 395, 18, 2069, 67, 2377, 353, 599, 30, 327, 296, 7457, 11, 225, 19709, 5516, 1970, 7, 468, 1788, 3709, 598, 348, 8592, 636...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 320, 3197, 67, 19460, 67, 4033, 13332, 225, 309, 15551, 2390, 395, 18, 2069, 67, 2377, 353, 599, 30, 327, 296, 7457, 11, 225, 19709, 5516, 1970, 7, 468, 1788, 3709, 598, 348, 8592, 636...
'GOOGLE' for regular Google accounts or 'HOSTED' for Google Apps accounts, or 'HOSTED_OR_GOOGLE' to try finding a HOSTED account first and, if it doesn't exist, try finding a regular GOOGLE account. Default value: 'HOSTED_OR_GOOGLE'.
'GOOGLE' for regular Google accounts or 'HOSTED' for Google Apps accounts, or 'HOSTED_OR_GOOGLE' to try finding a HOSTED account first and, if it doesn't exist, try finding a regular GOOGLE account. Default value: 'HOSTED_OR_GOOGLE'.
def __init__(self, email=None, password=None, account_type='HOSTED_OR_GOOGLE', service=None, source=None, server=None, additional_headers=None): """Creates an object of type GDataService.
f4e4fa7b0eaaccc3212e3dc01e8717614dbe64ac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10620/f4e4fa7b0eaaccc3212e3dc01e8717614dbe64ac/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2699, 33, 7036, 16, 2201, 33, 7036, 16, 2236, 67, 723, 2218, 8908, 2056, 67, 916, 67, 16387, 13369, 900, 2187, 1156, 33, 7036, 16, 1084, 33, 7036, 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, 1001, 2738, 972, 12, 2890, 16, 2699, 33, 7036, 16, 2201, 33, 7036, 16, 2236, 67, 723, 2218, 8908, 2056, 67, 916, 67, 16387, 13369, 900, 2187, 1156, 33, 7036, 16, 1084, 33, 7036, 16, ...
PersonPackageListing.userid),
PersonPackageListing.userid, PersonPackageListingAcl.statuscode),
def notify(self, name=None, version=None, eol=False): '''List of usernames that should be notified of changes to a package.
23a17e1b10886c51ee9b26eeeb66ca54b1a98217 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/23a17e1b10886c51ee9b26eeeb66ca54b1a98217/listqueries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 12, 2890, 16, 508, 33, 7036, 16, 1177, 33, 7036, 16, 14775, 33, 8381, 4672, 9163, 682, 434, 27675, 716, 1410, 506, 18791, 434, 3478, 358, 279, 2181, 18, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 12, 2890, 16, 508, 33, 7036, 16, 1177, 33, 7036, 16, 14775, 33, 8381, 4672, 9163, 682, 434, 27675, 716, 1410, 506, 18791, 434, 3478, 358, 279, 2181, 18, 2, -100, -100, -100, -100...
return (invalid[index], "kNoError", self.gl_error) return ("---ERROR1---", "kNoError", self.gl_error)
return (invalid[index], "kNoError", "GL_INVALID_ENUM") return ("---ERROR1---", "kNoError", "GL_INVALID_ENUM")
def GetInvalidArg(self, offset, index): """returns an invalid value by index.""" if 'invalid' in self.enum_info: invalid = self.enum_info['invalid'] num_invalid = len(invalid) if index >= num_invalid: index = num_invalid - 1 return (invalid[index], "kNoError", self.gl_error) return ("---ERROR1---", "kNoError", self.gl_error)
56cf771f243d94985cd4e18f5f61bf6bab39d12c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/56cf771f243d94985cd4e18f5f61bf6bab39d12c/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1941, 4117, 12, 2890, 16, 1384, 16, 770, 4672, 3536, 6154, 392, 2057, 460, 635, 770, 12123, 309, 296, 5387, 11, 316, 365, 18, 7924, 67, 1376, 30, 2057, 273, 365, 18, 7924, 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, 968, 1941, 4117, 12, 2890, 16, 1384, 16, 770, 4672, 3536, 6154, 392, 2057, 460, 635, 770, 12123, 309, 296, 5387, 11, 316, 365, 18, 7924, 67, 1376, 30, 2057, 273, 365, 18, 7924, 67, 1...
proutn("%d |" % (i))
proutn("%d |" % (i+1))
def chart(): # display the star chart chew() if not damaged(DRADIO): rechart() if game.lastchart < game.state.date and game.condition == "docked": prout(_("Spock- \"I revised the Star Chart from the starbase's records.\"")) rechart() prout(_(" STAR CHART FOR THE KNOWN GALAXY")) if game.state.date > game.lastchart: prout(_("(Last surveillance update %d stardates ago).") % ((int)(game.state.date-game.lastchart))) prout(" 1 2 3 4 5 6 7 8") for i in range(GALSIZE): proutn("%d |" % (i)) for j in range(GALSIZE): if (game.options & OPTION_SHOWME) and i == game.quadrant.x and j == game.quadrant.y: proutn("<") else: proutn(" ") if game.state.galaxy[i][j].supernova: show = "***" elif not game.state.galaxy[i][j].charted and game.state.galaxy[i][j].starbase: show = ".1." elif game.state.galaxy[i][j].charted: show = "%3d" % (game.state.chart[i][j].klingons*100 + game.state.chart[i][j].starbase * 10 + game.state.chart[i][j].stars) else: show = "..." proutn(show) if (game.options & OPTION_SHOWME) and i == game.quadrant.x and j == game.quadrant.y: proutn(">") else: proutn(" ") proutn(" |") if i<GALSIZE: skip(1)
b1c9c5334f08ac7846e441ce750b7e9ad119b37d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/b1c9c5334f08ac7846e441ce750b7e9ad119b37d/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4980, 13332, 468, 2562, 326, 10443, 4980, 462, 359, 1435, 309, 486, 302, 301, 11349, 12, 6331, 1880, 4294, 4672, 283, 11563, 1435, 309, 7920, 18, 2722, 11563, 411, 7920, 18, 2019, 18, 71...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4980, 13332, 468, 2562, 326, 10443, 4980, 462, 359, 1435, 309, 486, 302, 301, 11349, 12, 6331, 1880, 4294, 4672, 283, 11563, 1435, 309, 7920, 18, 2722, 11563, 411, 7920, 18, 2019, 18, 71...
def fixTwistedNames(): import twisted.names.dns import socket f1 = twisted.names.dns.DNSDatagramProtocol.writeMessage def writeMessage(*args): try: f1(*args) except socket.error: pass twisted.names.dns.DNSDatagramProtocol.writeMessage = writeMessage from twisted.internet.error import CannotListenError f2 = twisted.names.dns.DNSDatagramProtocol.startListening def startListening(*args): for i in range(10): try: return f2(*args) except CannotListenError: pass raise AssertionError("DNS isn't happy :-(") twisted.names.dns.DNSDatagramProtocol.startListening = startListening try: import twisted.names except ImportError: pass else: if twisted.names.__version__ == '0.4.0': fixTwistedNames()
def noop(): reactor.callLater(55.0, noop)
87a25c0cdecf4667329757d6905e0a1c95a80e43 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8524/87a25c0cdecf4667329757d6905e0a1c95a80e43/fix_twisted.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17065, 13332, 19178, 18, 1991, 20607, 12, 2539, 18, 20, 16, 17065, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17065, 13332, 19178, 18, 1991, 20607, 12, 2539, 18, 20, 16, 17065, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
streamId = _STREAM_LONGLONG
def twm(self, diff, base):
a67de324b6550ed8a3b892f25e8458e04b9f4282 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/a67de324b6550ed8a3b892f25e8458e04b9f4282/files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2339, 81, 12, 2890, 16, 3122, 16, 1026, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2339, 81, 12, 2890, 16, 3122, 16, 1026, 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, ...
self.currimg_pixbuf = self.image_flip(self.currimg_pixbuf_original, True)
self.currimg_pixbuf = self.image_flip(self.currimg_pixbuf_original, True)
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 14932, 67, 2730, 67, 869, 67, 5668, 12, 2890, 16, 4306, 6081, 67, 1484, 4230, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 14932, 67, 2730, 67, 869, 67, 5668, 12, 2890, 16, 4306, 6081, 67, 1484, 4230, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.execs = shellparsecache[h].execs
self.execs = shellparsecache[h]["execs"]
def parse_shell(self, value): """Parse the supplied shell code in a string, returning the external commands it executes. """
d85dc37b736f789780e9ceefc00ed16e0db7d90a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/d85dc37b736f789780e9ceefc00ed16e0db7d90a/codeparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 10304, 12, 2890, 16, 460, 4672, 3536, 3201, 326, 4580, 5972, 981, 316, 279, 533, 16, 5785, 326, 3903, 4364, 518, 11997, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 67, 10304, 12, 2890, 16, 460, 4672, 3536, 3201, 326, 4580, 5972, 981, 316, 279, 533, 16, 5785, 326, 3903, 4364, 518, 11997, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, ...
np = os.path.join(nd, f)
np = util.pconvert(os.path.join(nd, f))
def findfiles(s): work = [s] while work: top = work.pop() names = os.listdir(top) names.sort() # nd is the top of the repository dir tree nd = util.normpath(top[len(self.root) + 1:]) if nd == '.': nd = '' for f in names: np = os.path.join(nd, f) if seen(np): continue p = os.path.join(top, f) # don't trip over symlinks st = os.lstat(p) if stat.S_ISDIR(st.st_mode): ds = os.path.join(nd, f +'/') if statmatch(ds, st): work.append(p) if statmatch(np, st) and np in dc: yield 'm', util.pconvert(np), st elif statmatch(np, st): if self.supported_type(np, st): yield 'f', util.pconvert(np), st elif np in dc: yield 'm', util.pconvert(np), st
3e2626d917ff987b8712bce81b2ed9c2966d1fc4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/3e2626d917ff987b8712bce81b2ed9c2966d1fc4/dirstate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 2354, 12, 87, 4672, 1440, 273, 306, 87, 65, 1323, 1440, 30, 1760, 273, 1440, 18, 5120, 1435, 1257, 273, 1140, 18, 1098, 1214, 12, 3669, 13, 1257, 18, 3804, 1435, 468, 5346, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 2354, 12, 87, 4672, 1440, 273, 306, 87, 65, 1323, 1440, 30, 1760, 273, 1440, 18, 5120, 1435, 1257, 273, 1140, 18, 1098, 1214, 12, 3669, 13, 1257, 18, 3804, 1435, 468, 5346, 353, ...
"experiment_summ_id": "ilwd:char", "coinc_event_id": "ilwd:char",
"experiment_summ_id": "lstring", "coinc_event_id": "lstring",
def add_nevents(self, experiment_summ_id, num_events, add_to_current = True): """ Add num_events to the nevents column in a specific entry in the table. If add_to_current is set to False, will overwrite the current nevents entry in the row with num_events. Otherwise, default is to add num_events to the current value.
d89c4e959803f63ba10399a0cf4e51d1d4587860 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/d89c4e959803f63ba10399a0cf4e51d1d4587860/lsctables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 82, 5989, 12, 2890, 16, 8724, 67, 1364, 81, 67, 350, 16, 818, 67, 5989, 16, 527, 67, 869, 67, 2972, 273, 1053, 4672, 3536, 1436, 818, 67, 5989, 358, 326, 1073, 616, 87, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 82, 5989, 12, 2890, 16, 8724, 67, 1364, 81, 67, 350, 16, 818, 67, 5989, 16, 527, 67, 869, 67, 2972, 273, 1053, 4672, 3536, 1436, 818, 67, 5989, 358, 326, 1073, 616, 87, 10...
install.select_scheme ('nt') for key in ('purelib', 'platlib', 'headers', 'scripts', 'data'): attrname = 'install_' + key attr = getattr (install, attrname) if attr: attr = string.replace (attr, '\\', os.sep) setattr (install, attrname, attr)
install.prefix = "Python" install.select_scheme('nt')
def run (self): if (sys.platform != "win32" and (self.distribution.has_ext_modules() or self.distribution.has_c_libraries())): raise DistutilsPlatformError \ ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform")
7ec50d7359d5dc0c3c3be4ec9a2cc08090b7aa1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7ec50d7359d5dc0c3c3be4ec9a2cc08090b7aa1c/bdist_wininst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 261, 2890, 4672, 309, 261, 9499, 18, 9898, 480, 315, 8082, 1578, 6, 471, 261, 2890, 18, 16279, 18, 5332, 67, 408, 67, 6400, 1435, 578, 365, 18, 16279, 18, 5332, 67, 71, 67, 314...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 261, 2890, 4672, 309, 261, 9499, 18, 9898, 480, 315, 8082, 1578, 6, 471, 261, 2890, 18, 16279, 18, 5332, 67, 408, 67, 6400, 1435, 578, 365, 18, 16279, 18, 5332, 67, 71, 67, 314...
print (('<br><a href="?unmodified=%s">' % name) +
print (('<br><a href="%s?unmodified=%s">' % (base, name)) +
def send_footer(self, versioned, mod_string=None, page_path=None, unmodified=False):
f8595ddfe1a99f0daf81474c72c391eda99fcb64 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4007/f8595ddfe1a99f0daf81474c72c391eda99fcb64/piki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 14723, 12, 2890, 16, 17083, 16, 681, 67, 1080, 33, 7036, 16, 1363, 67, 803, 33, 7036, 16, 30481, 33, 8381, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 14723, 12, 2890, 16, 17083, 16, 681, 67, 1080, 33, 7036, 16, 1363, 67, 803, 33, 7036, 16, 30481, 33, 8381, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
db.setup()
db.setup(create_tables=False)
def plone_run(self): """ 2008-07-02 fix a bug which causes the program to continue read data even while call_info_id2fname is empty and input_dir is null. 2008-07-01 adjust to the newest functions in QC_250k.py 2008-04-25 return None if QC_method_id==0 2008-04-20 for plone to call it just to get row_id2NA_mismatch_rate """ import MySQLdb conn = MySQLdb.connect(db=self.dbname, host=self.hostname, user = self.user, passwd = self.passwd) curs = conn.cursor() self.curs = curs #database connection and etc db = Stock_250kDB.Stock_250kDB(username=self.user, password=self.passwd, hostname=self.hostname, database=self.dbname) db.setup() session = db.session session.begin() #transaction = session.create_transaction() # if cmp_data_filename not specified, try to find in the data_description column in table QC_method. if not self.cmp_data_filename and self.QC_method_id!=0: qm = QCMethod.query.get(self.QC_method_id) if qm.data_description: data_description_ls = qm.data_description.split('=') if len(data_description_ls)>1: self.cmp_data_filename = qm.data_description.split('=')[1].strip() #after db query, cmp_data_filename is still nothing, exit program. if not self.cmp_data_filename and self.QC_method_id!=0: sys.stderr.write("cmp_data_filename is still nothing even after db query. please specify it on the commandline.\n") sys.exit(3) if self.debug: import pdb pdb.set_trace() from variation.src.FilterStrainSNPMatrix import FilterStrainSNPMatrix header, strain_acc_list, category_list, data_matrix = FilterStrainSNPMatrix.read_data(self.cmp_data_filename) strain_acc_list = map(int, strain_acc_list) #it's ecotypeid, cast it to integer to be compatible to the later ecotype_id_ls from db snpData2 = SNPData(header=header, strain_acc_list=strain_acc_list, \ data_matrix=data_matrix, snps_table=self.QC_method_id2snps_table.get(self.QC_method_id)) #category_list is not used. if self.input_dir: #04/22/08 Watch: call_info_id2fname here is fake, it's actually keyed by (array_id, ecotypeid) #no submission to db call_info_id2fname = self.get_array_id2fname(curs, self.input_dir) else: #call_info_id2fname = self.get_call_info_id2fname(curs, self.call_info_table, self.call_QC_table, self.QC_method_id) call_data = self.get_call_info_id2fname(db, self.QC_method_id, self.call_method_id, \ filter_calls_QCed=0, max_call_info_mismatch_rate=1, debug=self.debug) call_info_id2fname = call_data.call_info_id2fname call_info_ls_to_return = call_data.call_info_ls_to_return #2008-07-01 pick the call_info_ids to be handled new_call_info_id2fname = {} for call_info_id_wanted in self.call_info_id_ls: if call_info_id_wanted in call_info_id2fname: new_call_info_id2fname[call_info_id_wanted] = call_info_id2fname[call_info_id_wanted] else: sys.stderr.write("%s not in call_info_id2fname.\n"%(call_info_id_wanted)) call_info_id2fname = new_call_info_id2fname if call_info_id2fname: pdata = self.read_call_matrix(call_info_id2fname, self.min_probability) header = pdata.header call_info_id_ls = pdata.call_info_id_ls array_id_ls = pdata.array_id_ls ecotype_id_ls = pdata.ecotype_id_ls data_matrix = pdata.data_matrix elif self.input_dir: #2008-07-02 #input file is SNP by strain format. double header (1st two lines) header, snps_name_ls, category_list, data_matrix = FilterStrainSNPMatrix.read_data(self.input_dir, double_header=1) ecotype_id_ls = header[0][2:] call_info_id_ls = header[1][2:] data_matrix = numpy.array(data_matrix) data_matrix = data_matrix.transpose() header = ['', ''] + snps_name_ls #fake a header for SNPData else: #2008-07-02 sys.stderr.write("No good arrays.\n") return None snps_name2snps_id = None #swap the ecotype_id_ls and call_info_id_ls when passing them to SNPData. now strain_acc_list=ecotype_id_ls snpData1 = SNPData(header=header, strain_acc_list=ecotype_id_ls, category_list= call_info_id_ls, data_matrix=data_matrix, \ min_probability=self.min_probability, call_method_id=self.call_method_id, col_id2id=snps_name2snps_id,\ max_call_info_mismatch_rate=self.max_call_info_mismatch_rate, snps_table='stock_250k.snps') #snps_table is set to the stock_250k snps_table twoSNPData = TwoSNPData(SNPData1=snpData1, SNPData2=snpData2, curs=curs, \ QC_method_id=self.QC_method_id, user=self.user, row_matching_by_which_value=0, debug=self.debug) row_id2NA_mismatch_rate = None #2008-05-01 create a cross match table temporarily twoSNPData.qc_cross_match_table = 'qc_cross_match' twoSNPData.new_QC_cross_match_table = self.new_QC_cross_match_table twoSNPData.cal_row_id2pairwise_dist() return row_id2NA_mismatch_rate
9c207575297ad3a4b31061448840243ae5884390 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9645/9c207575297ad3a4b31061448840243ae5884390/QC_250k_cross_match.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 886, 476, 67, 2681, 12, 2890, 4672, 3536, 4044, 28, 17, 8642, 17, 3103, 2917, 279, 7934, 1492, 14119, 326, 5402, 358, 1324, 855, 501, 5456, 1323, 745, 67, 1376, 67, 350, 22, 12749, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 886, 476, 67, 2681, 12, 2890, 4672, 3536, 4044, 28, 17, 8642, 17, 3103, 2917, 279, 7934, 1492, 14119, 326, 5402, 358, 1324, 855, 501, 5456, 1323, 745, 67, 1376, 67, 350, 22, 12749, 353...
def test_ec_curves_ECDSA(self):
def test_ec_curves_ECDSA(self):
def test_ec_curves_ECDSA(self): # XXX leaks 5200 bytes for curveName, curveLen in curves: self.sign_verify_ecdsa(curveName, curveLen)
79235d7bcdc9595e971243ed41cc4e38cb7ec1c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10522/79235d7bcdc9595e971243ed41cc4e38cb7ec1c9/test_ec_curves.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 557, 67, 1397, 3324, 67, 7228, 19748, 12, 2890, 4672, 468, 11329, 20891, 87, 1381, 6976, 1731, 364, 8882, 461, 16, 8882, 2891, 316, 24106, 30, 365, 18, 2977, 67, 8705, 67, 55...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 557, 67, 1397, 3324, 67, 7228, 19748, 12, 2890, 4672, 468, 11329, 20891, 87, 1381, 6976, 1731, 364, 8882, 461, 16, 8882, 2891, 316, 24106, 30, 365, 18, 2977, 67, 8705, 67, 55...
except StandardError: raise StandardError
except StandardError, err: raise err
def processRow ( row ): """ Utility fuction Process jdl line, smart comment handling """ row = row.strip() if len( row ) == 0 : raise StandardError if row[0] == '#' : try: row = row[ row.find('\n') : ].strip() return processRow ( row ) except StandardError: raise StandardError index = row.find('=') key = row[0:index].strip().lower() val = row[index+1:].strip() if len(key) == 0 : raise StandardError return key, val
845873988e9b57c666d3934de60cad1267137849 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/845873988e9b57c666d3934de60cad1267137849/SchedulerGLiteAPI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 1999, 261, 1027, 262, 30, 3536, 13134, 284, 4062, 225, 4389, 525, 5761, 980, 16, 13706, 2879, 5057, 3536, 1027, 273, 1027, 18, 6406, 1435, 309, 562, 12, 1027, 262, 422, 374, 294, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1999, 261, 1027, 262, 30, 3536, 13134, 284, 4062, 225, 4389, 525, 5761, 980, 16, 13706, 2879, 5057, 3536, 1027, 273, 1027, 18, 6406, 1435, 309, 562, 12, 1027, 262, 422, 374, 294, ...
video_format = options.format,
video_format=options.format or 'mp4',
def _run_get(client, options, args): if not args: LOG.error('Must provide destination of album(s)!') return base_path = args[0] client.DownloadAlbum(base_path, user=options.owner or options.user, video_format = options.format, title=options.title)
39fb2f38f9a071db28b0620143df264cba5fc3be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/39fb2f38f9a071db28b0620143df264cba5fc3be/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 588, 12, 2625, 16, 702, 16, 833, 4672, 309, 486, 833, 30, 2018, 18, 1636, 2668, 10136, 5615, 2929, 434, 14844, 12, 87, 13, 5124, 13, 327, 1026, 67, 803, 273, 833, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 588, 12, 2625, 16, 702, 16, 833, 4672, 309, 486, 833, 30, 2018, 18, 1636, 2668, 10136, 5615, 2929, 434, 14844, 12, 87, 13, 5124, 13, 327, 1026, 67, 803, 273, 833, 63, ...
while child_n is not None: child = 16 + child_n * 16 c = IO.decode_character(tree_rsrc[child:child+4]) tree = Tree(self, child_n) self.children[c] = tree tree._load() child_n = IO.decode_link(tree_rsrc[child+12:child+16])
if child_n is not None: stack.append((self, child_n)) while stack: parent, tree_slot_n = stack.pop() tree = Tree(self, tree_slot_n) tree_slot = 16 + tree_slot_n * 16 c = IO.decode_character(tree_rsrc[tree_slot:tree_slot+4]) parent.children[c] = tree doc_slot_n = IO.decode_link(tree_rsrc[tree_slot+4:tree_slot+8]) while doc_slot_n is not None: doc_slot = 12 + doc_slot_n * 12 doc_number = IO.decode_uint32(doc_rsrc[doc_slot:doc_slot+4]) tree.documents[doc_number] = documents = [] frequency = IO.decode_uint32(doc_rsrc[doc_slot+4:doc_slot+8]) for i in range(frequency): documents.append(None) doc_slot_n = IO.decode_link(doc_rsrc[doc_slot+8:doc_slot+12]) sibling_n = IO.decode_link(tree_rsrc[tree_slot+12:tree_slot+16]) if sibling_n is not None: stack.append((parent, sibling_n)) child_n = IO.decode_link(tree_rsrc[tree_slot+8:tree_slot+12]) if child_n is not None: stack.append((tree, child_n))
def _load(self, resource): Folder._load(self, resource)
3ae2fd80f5927ce11658de6a6d97680773682602 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/3ae2fd80f5927ce11658de6a6d97680773682602/IIndex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 12, 2890, 16, 1058, 4672, 12623, 6315, 945, 12, 2890, 16, 1058, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 12, 2890, 16, 1058, 4672, 12623, 6315, 945, 12, 2890, 16, 1058, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def wrap_open(contents): def open_wrapper(path, mode, encoding): return NewStringIO(contents) return open_wrapper
def build_directory(self, configuration): """Returns the path to the build directory for the configuration.""" if configuration: flags = ["--configuration", self._FLAGS_FROM_CONFIGURATIONS[configuration]] configuration = "" else: configuration = "" flags = ["--top-level"]
def wrap_open(contents): def open_wrapper(path, mode, encoding): return NewStringIO(contents) return open_wrapper
25feeb24a1118a6fb28d036358303ac956f0d038 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/25feeb24a1118a6fb28d036358303ac956f0d038/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 3190, 12, 3980, 4672, 1652, 1696, 67, 8376, 12, 803, 16, 1965, 16, 2688, 4672, 327, 26074, 4294, 12, 3980, 13, 327, 1696, 67, 8376, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 3190, 12, 3980, 4672, 1652, 1696, 67, 8376, 12, 803, 16, 1965, 16, 2688, 4672, 327, 26074, 4294, 12, 3980, 13, 327, 1696, 67, 8376, 2, -100, -100, -100, -100, -100, -100, -10...
os.unlink(tfn)
os.unlink(tf.name)
def commit(self, entry): file = entry.file # Normalize line endings in body if '\r' in self.ui.body: self.ui.body = re.sub('\r\n?', '\n', self.ui.body) # Normalize whitespace in title self.ui.title = ' '.join(self.ui.title.split()) # Check that there were any changes if self.ui.body == entry.body and self.ui.title == entry.title: self.error("You didn't make any changes!") return
e6e77e5fe74289af8afe653ea426bcf966afff89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e6e77e5fe74289af8afe653ea426bcf966afff89/faqwiz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 2890, 16, 1241, 4672, 585, 273, 1241, 18, 768, 468, 14282, 980, 679, 899, 316, 1417, 309, 2337, 86, 11, 316, 365, 18, 4881, 18, 3432, 30, 365, 18, 4881, 18, 3432, 273, 283,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 2890, 16, 1241, 4672, 585, 273, 1241, 18, 768, 468, 14282, 980, 679, 899, 316, 1417, 309, 2337, 86, 11, 316, 365, 18, 4881, 18, 3432, 30, 365, 18, 4881, 18, 3432, 273, 283,...
ok = type == SyntaxError
ok = type is SyntaxError
def unpackerror(self): type, value, tb = sys.exc_info() ok = type == SyntaxError if ok: try: msg, (dummy_filename, lineno, offset, line) = value except: ok = 0 if ok: return msg, lineno, offset, line else: return None
eeb88076e7f4a89ce76d271379ca0aced0c2d6c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb88076e7f4a89ce76d271379ca0aced0c2d6c7/PyShell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 1636, 12, 2890, 4672, 618, 16, 460, 16, 8739, 273, 2589, 18, 10075, 67, 1376, 1435, 1529, 273, 618, 353, 18453, 309, 1529, 30, 775, 30, 1234, 16, 261, 21050, 67, 3459, 16, 7586, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 1636, 12, 2890, 4672, 618, 16, 460, 16, 8739, 273, 2589, 18, 10075, 67, 1376, 1435, 1529, 273, 618, 353, 18453, 309, 1529, 30, 775, 30, 1234, 16, 261, 21050, 67, 3459, 16, 7586, ...
sage: S == loads(dumps(S)) True
sage: TestSuite(S).run()
def __init__(self, s): """ TESTS:: sage: S = Subsets([1,2,3]) sage: S == loads(dumps(S)) True sage: s = Subsets(Set([1])) sage: e = s.first() sage: isinstance(e, s.element_class) True """ self.s = Set(s)
1a44ccc23f867ab08fe6b0234354f39b5f210df8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1a44ccc23f867ab08fe6b0234354f39b5f210df8/subset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 272, 4672, 3536, 22130, 55, 2866, 225, 272, 410, 30, 348, 273, 2592, 4424, 3816, 21, 16, 22, 16, 23, 5717, 272, 410, 30, 7766, 13587, 12, 55, 2934, 268...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 272, 4672, 3536, 22130, 55, 2866, 225, 272, 410, 30, 348, 273, 2592, 4424, 3816, 21, 16, 22, 16, 23, 5717, 272, 410, 30, 7766, 13587, 12, 55, 2934, 268...
""" fl_get_folder(ob) -> form ref.
""" fl_get_folder(ob) -> form
def fl_get_folder(ob): """ fl_get_folder(ob) -> form ref. """ retval = _fl_get_folder(ob) return retval
8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 5609, 12, 947, 4672, 3536, 1183, 67, 588, 67, 5609, 12, 947, 13, 317, 646, 3536, 225, 5221, 273, 389, 2242, 67, 588, 67, 5609, 12, 947, 13, 327, 5221, 282, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 5609, 12, 947, 4672, 3536, 1183, 67, 588, 67, 5609, 12, 947, 13, 317, 646, 3536, 225, 5221, 273, 389, 2242, 67, 588, 67, 5609, 12, 947, 13, 327, 5221, 282, 2, -1...
peer_db.updatePeerIPPort(hispermid, "127.0.0.1", 5678)
peer_db.addPeer(hispermid,{'ip':"127.0.0.1", 'port':5678})
def singtest_got_conn_incoming(self): print >> sys.stderr,"test: test_got_conn_incoming" self.wanted = True self.wanted2 = True # register handler for messages self.peer2.secure_overlay.register_recv_callback(self.receive_msg_callback) # register handler for connections self.peer2.secure_overlay.register_conns_callback(self.got_conn_incoming_conns_callback)
ea5b6bdfe334b3d2bb4810326934e4bb0038ba4f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9686/ea5b6bdfe334b3d2bb4810326934e4bb0038ba4f/test_secure_overlay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4864, 3813, 67, 13212, 67, 4646, 67, 31033, 12, 2890, 4672, 1172, 1671, 2589, 18, 11241, 10837, 3813, 30, 1842, 67, 13212, 67, 4646, 67, 31033, 6, 365, 18, 25861, 273, 1053, 365, 18, 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, 4864, 3813, 67, 13212, 67, 4646, 67, 31033, 12, 2890, 4672, 1172, 1671, 2589, 18, 11241, 10837, 3813, 30, 1842, 67, 13212, 67, 4646, 67, 31033, 6, 365, 18, 25861, 273, 1053, 365, 18, 2...
file.seek(offset)
if info.contents.WriteToEndOfFile: file.seek(0,os.SEEK_END) else: file.seek(offset)
def WriteFile(self, path, buffer, nBytesToWrite, nBytesWritten, offset, info): path = normpath(path) (file,_,lock) = self._get_file(info.contents.Context) lock.acquire() try: file.seek(offset) data = ctypes.create_string_buffer(nBytesToWrite) ctypes.memmove(data,buffer,nBytesToWrite) file.write(data.raw) nBytesWritten[0] = len(data.raw) finally: lock.release()
de36bf4ac3c2e00d4f853964c0f3379ce7efad59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5579/de36bf4ac3c2e00d4f853964c0f3379ce7efad59/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24155, 12, 2890, 16, 589, 16, 1613, 16, 290, 2160, 24538, 16, 290, 2160, 12643, 16, 1384, 16, 1123, 4672, 589, 273, 20446, 12, 803, 13, 261, 768, 16, 67, 16, 739, 13, 273, 365, 6315,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24155, 12, 2890, 16, 589, 16, 1613, 16, 290, 2160, 24538, 16, 290, 2160, 12643, 16, 1384, 16, 1123, 4672, 589, 273, 20446, 12, 803, 13, 261, 768, 16, 67, 16, 739, 13, 273, 365, 6315,...
host = string.lower(request.getHeader('host'))
host = string.split(string.lower(request.getHeader('host')),':')[0]
def _getResourceForRequest(self, request): """(Internal) Get the appropriate resource for the given host. """ host = string.lower(request.getHeader('host')) return self.hosts.get(host, error.NoResource("host %s not in vhost map" % repr(host)))
153e52a387ead8388267cc1afd6451408ab62354 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/153e52a387ead8388267cc1afd6451408ab62354/vhost.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 1420, 27649, 12, 2890, 16, 590, 4672, 3536, 12, 3061, 13, 968, 326, 5505, 1058, 364, 326, 864, 1479, 18, 3536, 1479, 273, 533, 18, 4939, 12, 1080, 18, 8167, 12, 2293, 18, 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, 389, 588, 1420, 27649, 12, 2890, 16, 590, 4672, 3536, 12, 3061, 13, 968, 326, 5505, 1058, 364, 326, 864, 1479, 18, 3536, 1479, 273, 533, 18, 4939, 12, 1080, 18, 8167, 12, 2293, 18, 5...
item=ItemId(self, "item_idlist[]")
item = ItemId(self, "item_idlist[]")
def createFields(self): yield UInt32(self, "signature", "Shortcut signature (0x0000004C)") yield GUID(self, "guid")
5ea01ffedb59df0e37cf17f12bdee54c756d117a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/5ea01ffedb59df0e37cf17f12bdee54c756d117a/lnk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2314, 12, 2890, 4672, 2824, 29810, 1578, 12, 2890, 16, 315, 8195, 3113, 315, 15576, 3372, 261, 20, 92, 9449, 24, 39, 2225, 13, 2824, 20322, 12, 2890, 16, 315, 14066, 7923, 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, 752, 2314, 12, 2890, 4672, 2824, 29810, 1578, 12, 2890, 16, 315, 8195, 3113, 315, 15576, 3372, 261, 20, 92, 9449, 24, 39, 2225, 13, 2824, 20322, 12, 2890, 16, 315, 14066, 7923, 2, -100...
def xover(self,start,end):
def xover(self, start, end, file=None):
def xover(self,start,end): """Process an XOVER command (optional server extension) Arguments: - start: start of range - end: end of range Returns: - resp: server response if successful - list: list of (art-nr, subject, poster, date, id, references, size, lines)"""
bf414590658c8878c0a27cbcf1dda4738d4ce7e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf414590658c8878c0a27cbcf1dda4738d4ce7e0/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 1643, 12, 2890, 16, 787, 16, 679, 16, 585, 33, 7036, 4672, 3536, 2227, 392, 1139, 12959, 1296, 261, 10444, 1438, 2710, 13, 13599, 30, 300, 787, 30, 787, 434, 1048, 300, 679, 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, 619, 1643, 12, 2890, 16, 787, 16, 679, 16, 585, 33, 7036, 4672, 3536, 2227, 392, 1139, 12959, 1296, 261, 10444, 1438, 2710, 13, 13599, 30, 300, 787, 30, 787, 434, 1048, 300, 679, 30, ...
db = pooler.get_db_only(db_name) cr = db.cursor() cr.execute("SELECT 1 FROM pg_class WHERE relkind = 'r' AND relname = 'ir_module_module'") if not cr.fetchone(): continue cr.execute("select id from ir_module_module where name like 'document%' and state='installed' ") res = cr.fetchone() if res and len(res): self.db_name_list.append(db_name) cr.commit()
try: db = pooler.get_db_only(db_name) cr = db.cursor() cr.execute("SELECT 1 FROM pg_class WHERE relkind = 'r' AND relname = 'ir_module_module'") if not cr.fetchone(): continue cr.execute("select id from ir_module_module where name like 'document%' and state='installed' ") res = cr.fetchone() if res and len(res): self.db_name_list.append(db_name) cr.commit() except Exception, e: log(e)
def db_list(self): #return pooler.pool_dic.keys() s = netsvc.LocalService('db') result = s.list() self.db_name_list = [] for db_name in result: db, cr = None, None try: db = pooler.get_db_only(db_name) cr = db.cursor() cr.execute("SELECT 1 FROM pg_class WHERE relkind = 'r' AND relname = 'ir_module_module'") if not cr.fetchone(): continue
90a1950b15994976dab0fa27003a072efa2dc90f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/90a1950b15994976dab0fa27003a072efa2dc90f/abstracted_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 67, 1098, 12, 2890, 4672, 468, 2463, 2845, 264, 18, 6011, 67, 15859, 18, 2452, 1435, 272, 273, 21954, 4227, 18, 25635, 2668, 1966, 6134, 563, 273, 272, 18, 1098, 1435, 365, 18, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 67, 1098, 12, 2890, 4672, 468, 2463, 2845, 264, 18, 6011, 67, 15859, 18, 2452, 1435, 272, 273, 21954, 4227, 18, 25635, 2668, 1966, 6134, 563, 273, 272, 18, 1098, 1435, 365, 18, 1...
reply = MultiEditorWindow.close(self)
reply = PyShellEditorWindow.close(self)
def close(self): # Extend base class method if self.executing: # XXX Need to ask a question here if not tkMessageBox.askokcancel( "Cancel?", "The program is still running; do you want to cancel it?", default="ok", master=self.text): return "cancel" self.canceled = 1 if self.reading: self.top.quit() return "cancel" reply = MultiEditorWindow.close(self) if reply != "cancel": # Restore std streams sys.stdout = sys.__stdout__ sys.stderr = sys.__stderr__ sys.stdin = sys.__stdin__ # Break cycles self.interp = None self.console = None return reply
6cc30cf0dd8dfcc402a00fc2e1e213407f2eac1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6cc30cf0dd8dfcc402a00fc2e1e213407f2eac1f/PyShell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 468, 27686, 1026, 667, 707, 309, 365, 18, 4177, 8490, 30, 468, 11329, 12324, 358, 6827, 279, 5073, 2674, 309, 486, 13030, 27647, 18, 835, 601, 10996, 12, 315, 6691,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 468, 27686, 1026, 667, 707, 309, 365, 18, 4177, 8490, 30, 468, 11329, 12324, 358, 6827, 279, 5073, 2674, 309, 486, 13030, 27647, 18, 835, 601, 10996, 12, 315, 6691,...
print ("Setting DirectNotify category: " + dconfigParam +
print ("Setting DirectNotify category: " + categoryName +
def setDconfigLevel(self, categoryName): """ Check to see if this category has a dconfig variable to set the notify severity and then set that level. You cannot set these until config is set. """
cff3c78df9912e389a2af0326fa8d1eafe54f189 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/cff3c78df9912e389a2af0326fa8d1eafe54f189/DirectNotify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 40, 1425, 2355, 12, 2890, 16, 3150, 461, 4672, 3536, 2073, 358, 2621, 309, 333, 3150, 711, 279, 302, 1425, 2190, 358, 444, 326, 5066, 11426, 471, 1508, 444, 716, 1801, 18, 4554, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 40, 1425, 2355, 12, 2890, 16, 3150, 461, 4672, 3536, 2073, 358, 2621, 309, 333, 3150, 711, 279, 302, 1425, 2190, 358, 444, 326, 5066, 11426, 471, 1508, 444, 716, 1801, 18, 4554, 2...
This test must detect if the underlying OS is Windows, whehter we are
This test must detect if the underlying OS is Windows, whether we are
def set_escape_dos_devices(self, subdir): """Test if DOS device files can be used as filenames.
28d327ca33f2dcc4277808983d344d91d4d92bfc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6202/28d327ca33f2dcc4277808983d344d91d4d92bfc/fs_abilities.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 6939, 67, 19219, 67, 12506, 12, 2890, 16, 16921, 4672, 3536, 4709, 309, 463, 4618, 2346, 1390, 848, 506, 1399, 487, 9066, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 6939, 67, 19219, 67, 12506, 12, 2890, 16, 16921, 4672, 3536, 4709, 309, 463, 4618, 2346, 1390, 848, 506, 1399, 487, 9066, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
if revn>3 and (revn%2) == 0:
if revn > 3 and (revn % 2) == 0:
def scache(s): "return a shared version of a string" return _scache.setdefault(s, s)
4a8d8af9a778314e085474978405a659540b0c1c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/4a8d8af9a778314e085474978405a659540b0c1c/cvsps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 888, 807, 12, 87, 4672, 315, 2463, 279, 5116, 1177, 434, 279, 533, 6, 327, 389, 1017, 807, 18, 542, 1886, 12, 87, 16, 272, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 888, 807, 12, 87, 4672, 315, 2463, 279, 5116, 1177, 434, 279, 533, 6, 327, 389, 1017, 807, 18, 542, 1886, 12, 87, 16, 272, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
_cfunc_refs[tmpval1] = c_drawit _cfunc_refs[tmpval2] = c_cleanup
def fl_add_button_class(bclass, py_drawit, py_cleanup): """ fl_add_button_class(bclass, py_drawit, py_cleanup) """ c_drawit = FL_DrawButton(py_drawit) c_cleanup = FL_CleanupButton(py_cleanup) _fl_add_button_class(bclass, c_drawit, c_cleanup) _cfunc_refs[tmpval1] = c_drawit _cfunc_refs[tmpval2] = c_cleanup
8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 1289, 67, 5391, 67, 1106, 12, 70, 1106, 16, 2395, 67, 9446, 305, 16, 2395, 67, 16732, 4672, 3536, 1183, 67, 1289, 67, 5391, 67, 1106, 12, 70, 1106, 16, 2395, 67, 9446, 305,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1289, 67, 5391, 67, 1106, 12, 70, 1106, 16, 2395, 67, 9446, 305, 16, 2395, 67, 16732, 4672, 3536, 1183, 67, 1289, 67, 5391, 67, 1106, 12, 70, 1106, 16, 2395, 67, 9446, 305,...
class WebResource(resource.Resource): def __init__(self): resource.Resource.__init__(self) self.putChild('channel', JsonChannel())
def render(self, request): #html = "<html><h4>"+ `dir(self.server)` + request.uri +"</h4></html>" tokens = re.findall("/room/([a-z0-9]+)",request.uri.lower()) if (len(tokens) == 0): request.write( simplejson.dumps("ERROR") ) request.finish() return server.NOT_DONE_YET room = tokens[0][0] seqnum = int(request.args['seqnum'][0])
63bcfd0535fdd67f9c81ff25578c462f54d8f8f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11180/63bcfd0535fdd67f9c81ff25578c462f54d8f8f7/publicbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 590, 4672, 468, 2620, 273, 3532, 2620, 4438, 76, 24, 2984, 15, 1375, 1214, 12, 2890, 18, 3567, 22025, 397, 590, 18, 1650, 397, 6, 1757, 76, 24, 4695, 2620, 2984, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 590, 4672, 468, 2620, 273, 3532, 2620, 4438, 76, 24, 2984, 15, 1375, 1214, 12, 2890, 18, 3567, 22025, 397, 590, 18, 1650, 397, 6, 1757, 76, 24, 4695, 2620, 2984, ...
cd = 'cd %s;' %targetdir util.execute('%s %s %s | patch -d %s -p%s %s' %(cd, provides, f, destDir, level, backup))
destDir = "/".join((destDir, targetdir)) util.execute('%s %s | patch -d %s -p%s %s' %(provides, f, destDir, level, backup))
def unpackSources(self, builddir):
1aa66fbcfbadccd929237896233a0e565c80373f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/1aa66fbcfbadccd929237896233a0e565c80373f/recipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 8628, 12, 2890, 16, 25666, 330, 449, 481, 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, ...
[ 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, 6167, 8628, 12, 2890, 16, 25666, 330, 449, 481, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if verbose:
if self.verbose:
def c_code(self, node, name, (img2d, filtersflipped), (z, ), sub): if node.inputs[0].type.dtype != node.inputs[1].type.dtype: raise NotImplementedError() assert node.inputs[0].type.dtype == node.inputs[1].type.dtype d=locals() d.update(sub)
62d8c81acea525912fc6a7bee2af1e3cd90026a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/62d8c81acea525912fc6a7bee2af1e3cd90026a1/conv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 67, 710, 12, 2890, 16, 756, 16, 508, 16, 261, 6081, 22, 72, 16, 3415, 12357, 1845, 3631, 261, 94, 16, 262, 16, 720, 4672, 309, 756, 18, 10029, 63, 20, 8009, 723, 18, 8972, 480...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 67, 710, 12, 2890, 16, 756, 16, 508, 16, 261, 6081, 22, 72, 16, 3415, 12357, 1845, 3631, 261, 94, 16, 262, 16, 720, 4672, 309, 756, 18, 10029, 63, 20, 8009, 723, 18, 8972, 480...
if curSize + prevSize > targetBinSize:
if curSize + prevSize > targetBinSize or (not isNumber(curLeft) and isNumber(bin[0])):
def bin2Break(bin): return [bin[0], bin[0], bin[1]]
2c7cb912f003d9ad5ac76536b1e08799d8b5029e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2773/2c7cb912f003d9ad5ac76536b1e08799d8b5029e/snpSelector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4158, 22, 7634, 12, 4757, 4672, 327, 306, 4757, 63, 20, 6487, 4158, 63, 20, 6487, 4158, 63, 21, 13563, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4158, 22, 7634, 12, 4757, 4672, 327, 306, 4757, 63, 20, 6487, 4158, 63, 20, 6487, 4158, 63, 21, 13563, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print(' [src_file.los]* dst_file.gsb ')
print(' [-major_f axis] [-minor_f axis]') print(' [-major_t axis] [-minor_t axis]') print(' [-negate] [src_file.los]* dst_file.gsb ')
def Usage(): print('Usage: loslas2ntv2.py [-a] [-auto] [-sub_name name] [-parent name]' ) print(' [-created date] [-updated date] [-gs_type name]') print(' [-system_f name] [-system_t name] [-version version]') print(' [src_file.los]* dst_file.gsb ') print('') print(' -a: append to existing NTv2 file.') print(' -auto: process a whole directory of nad27/hpgn los/las files.') print('') print('eg.') print(' loslas2ntv2.py -auto *.los' ) print(' loslas2ntv2.py -system_f NAD27 -system_t NAD83 -sub_name conus conus.los conus.gsb') sys.exit(1)
9eabdcf442033b8229402cabaf8ef48b2f4fcd60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/9eabdcf442033b8229402cabaf8ef48b2f4fcd60/loslas2ntv2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10858, 13332, 225, 1172, 2668, 5357, 30, 437, 2069, 345, 22, 496, 90, 22, 18, 2074, 225, 23059, 69, 65, 23059, 6079, 65, 23059, 1717, 67, 529, 508, 65, 23059, 2938, 508, 3864, 262, 117...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10858, 13332, 225, 1172, 2668, 5357, 30, 437, 2069, 345, 22, 496, 90, 22, 18, 2074, 225, 23059, 69, 65, 23059, 6079, 65, 23059, 1717, 67, 529, 508, 65, 23059, 2938, 508, 3864, 262, 117...
[1] William Kolakoski, proposal 5304, American Mathematical Monthly 72 (1965), 674; for a partial solution, see "Self Generating Runs," by Necdet Üçoluk, Amer. Math. Mon. 73 (1966), 681-2. """ try: a = int(alphabet[0]) b = int(alphabet[1]) if a <=0 or b <= 0 or a == b: raise ValueError, 'The alphabet (=%s) must consist of two distinct positive integers'%alphabet else: return Words(alphabet)(self._KolakoskiWord_iterator(a, b), datatype = 'iter') except: raise ValueError, 'The elements of the alphabet (=%s) must be positive integers'%alphabet
- [1] William Kolakoski, proposal 5304, American Mathematical Monthly 72 (1965), 674; for a partial solution, see "Self Generating Runs," by Necdet Üçoluk, Amer. Math. Mon. 73 (1966), 681-2. """ a, b = alphabet if a not in ZZ or a <= 0 or b not in ZZ or b <= 0 or a == b: msg = 'The alphabet (=%s) must consist of two distinct positive integers'%(alphabet,) raise ValueError, msg return Words(alphabet)(self._KolakoskiWord_iterator(a, b), datatype = 'iter')
def KolakoskiWord(self, alphabet=(1,2)): r""" Returns the Kolakoski word over the given alphabet and starting with the first letter of the alphabet.
4653f0625fde39f44d85d720d487befd707cfe35 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4653f0625fde39f44d85d720d487befd707cfe35/word_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1475, 355, 581, 538, 15299, 3944, 12, 2890, 16, 10877, 28657, 21, 16, 22, 3719, 30, 436, 8395, 2860, 326, 1475, 355, 581, 538, 15299, 2076, 1879, 326, 864, 10877, 471, 5023, 598, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1475, 355, 581, 538, 15299, 3944, 12, 2890, 16, 10877, 28657, 21, 16, 22, 3719, 30, 436, 8395, 2860, 326, 1475, 355, 581, 538, 15299, 2076, 1879, 326, 864, 10877, 471, 5023, 598, 326, ...
return line
return line.strip('\n')
def getLrmsInfo(cp): for line in runCommand(sge_version_cmd, cp): return line raise Exception("Unable to determine LRMS version info.")
2289381e5c89a3d026abfdf686951ad780ff7492 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12088/2289381e5c89a3d026abfdf686951ad780ff7492/sge_common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9014, 29716, 966, 12, 4057, 4672, 364, 980, 316, 31933, 12, 87, 908, 67, 1589, 67, 4172, 16, 3283, 4672, 327, 980, 18, 6406, 2668, 64, 82, 6134, 1002, 1185, 2932, 3370, 358, 4199, 511,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9014, 29716, 966, 12, 4057, 4672, 364, 980, 316, 31933, 12, 87, 908, 67, 1589, 67, 4172, 16, 3283, 4672, 327, 980, 18, 6406, 2668, 64, 82, 6134, 1002, 1185, 2932, 3370, 358, 4199, 511,...
ls = base_calendar_id2real_id(base_calendar_id, with_date=res.get('duration', 0))
ls = base_calendar_id2real_id(base_calendar_id, with_date=res and res.get('duration', 0) or 0)
def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'): """ Overrides orm Read method.Read List of fields for calendar event. @param cr: the current row, from the database cursor, @param user: the current user’s ID for security checks, @param ids: List of calendar event's id. @param fields: List of fields. @param context: A standard dictionary for contextual values @return: List of Dictionary of form [{‘name_of_the_field’: value, ...}, ...] """ if not context: context = {}
adf548ad9c5232c74200f848d97e74911c12b779 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/adf548ad9c5232c74200f848d97e74911c12b779/base_calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 33, 7036, 16, 819, 33, 7036, 16, 1262, 2218, 67, 1106, 335, 67, 896, 11, 4672, 3536, 531, 9857, 13969, 2720, 707, 18, 1994, 987...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 33, 7036, 16, 819, 33, 7036, 16, 1262, 2218, 67, 1106, 335, 67, 896, 11, 4672, 3536, 531, 9857, 13969, 2720, 707, 18, 1994, 987...
MAXLINES = 8 LINELEN = 60 LINEWRAP_MARKER = r'<span class="variable-linewrap">\</span>' ELLIPSIS_MARKER = r'<span class="variable-ellipsis">...</span>'
linelen = self._variable_linelen do_quoting = 1
def _pprint_var_value(self, var): if not var.has_value(): return '' val = var.uid().value()
771e91d9f27aff69c7681d17285ac18c37519cc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/771e91d9f27aff69c7681d17285ac18c37519cc0/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 1188, 67, 1401, 67, 1132, 12, 2890, 16, 569, 4672, 309, 486, 569, 18, 5332, 67, 1132, 13332, 327, 875, 1244, 273, 569, 18, 1911, 7675, 1132, 1435, 2, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 1188, 67, 1401, 67, 1132, 12, 2890, 16, 569, 4672, 309, 486, 569, 18, 5332, 67, 1132, 13332, 327, 875, 1244, 273, 569, 18, 1911, 7675, 1132, 1435, 2, -100, -100, -100, -100, ...
"""To declare a named optional argument in an expr class,
""" To declare a named optional argument in an expr class,
def Option( type_expr, dflt_expr = _E_DFLT_FROM_TYPE_, **moreopts): """To declare a named optional argument in an expr class, use an assignment like this, directly in the class namespace, and (by convention only?) after all the Arg macros: attr = Option( type, optional default value) Order probably doesn't matter. The index of the instance made from this optional argument will be attr (the attribute name). If the default value is needed and not supplied, it comes from the type. """ global _E_ATTR # fyi argpos_expr = None attr_expr = _E_ATTR return _ArgOption_helper( attr_expr, argpos_expr, type_expr, dflt_expr, **moreopts)
d0ffa4ebc7f1e32fb807fce132593cfedae374b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/d0ffa4ebc7f1e32fb807fce132593cfedae374b0/attr_decl_macros.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2698, 12, 618, 67, 8638, 16, 302, 31864, 67, 8638, 273, 389, 41, 67, 4577, 12050, 67, 11249, 67, 2399, 67, 16, 2826, 10161, 4952, 4672, 3536, 2974, 14196, 279, 4141, 3129, 1237, 316, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2698, 12, 618, 67, 8638, 16, 302, 31864, 67, 8638, 273, 389, 41, 67, 4577, 12050, 67, 11249, 67, 2399, 67, 16, 2826, 10161, 4952, 4672, 3536, 2974, 14196, 279, 4141, 3129, 1237, 316, 3...
log.error(traceback.format_exc())
log.error(traceback.format_exc(e))
def log_error(self, e, data, klass, item): log.error('error occured while loading yaml data with output:\n%s'%pformat(data)) log.error('references:\n%s'%pformat(self._references)) log.error('class: %s'%klass) log.error('item: %s'%item) import traceback log.error(traceback.format_exc())
50dbe38e59ef53f53781a8ae18ca35a6dbcce980 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5449/50dbe38e59ef53f53781a8ae18ca35a6dbcce980/loader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 1636, 12, 2890, 16, 425, 16, 501, 16, 7352, 16, 761, 4672, 613, 18, 1636, 2668, 1636, 16206, 1323, 7153, 6097, 501, 598, 876, 5581, 82, 9, 87, 11, 9, 84, 2139, 12, 892, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 1636, 12, 2890, 16, 425, 16, 501, 16, 7352, 16, 761, 4672, 613, 18, 1636, 2668, 1636, 16206, 1323, 7153, 6097, 501, 598, 876, 5581, 82, 9, 87, 11, 9, 84, 2139, 12, 892, 37...
Returns the identity projection.
Returns the identity projection of the polyhedron.
def identity(self): """ Returns the identity projection.
5ee629eab8310178e46ba2426c1e828e44fe1d2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5ee629eab8310178e46ba2426c1e828e44fe1d2e/polyhedra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4215, 12, 2890, 4672, 3536, 2860, 326, 4215, 8106, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4215, 12, 2890, 4672, 3536, 2860, 326, 4215, 8106, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
decodemenu = Menu(decodebutton, tearoff=1)
decodemenu = Menu(decodebutton, tearoff=0)
def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \ im,pim,cmap0,isync,isync_save,idsec,first,itol,txsnrdb,tx6alt,\ bm_geom utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime('%Y %b %d\n%H:%M:%S',utc) Audio.gcom2.utcdate=t[:12] ldate.configure(text=t) root_geom=root.geometry() try: bm_geom=bm.geometry() except: pass utchours=utc[3]+utc[4]/60.0 + utc[5]/3600.0 naz,nel,ndmiles,ndkm,nhotaz,nhotabetter=Audio.azdist0( \ options.MyGrid.get().upper(),HisGrid.get().upper(),utchours) azdist() g.nfreq=nfreq.get() if Audio.gcom2.ndecoding==0: g.AzSun,g.ElSun,g.AzMoon,g.ElMoon,g.AzMoonB,g.ElMoonB,g.ntsky, \ g.ndop,g.ndop00,g.dbMoon,g.RAMoon,g.DecMoon,g.HA8,g.Dgrd, \ g.sd,g.poloffset,g.MaxNR,g.dfdt,g.dfdt0,g.RaAux,g.DecAux, \ g.AzAux,g.ElAux = Audio.astro0(utc[0],utc[1],utc[2], \ utchours,nfreq.get(),options.MyGrid.get().upper(), \ options.auxra.get()+' '[:9], \ options.auxdec.get()+' '[:9]) if len(HisGrid.get().strip())<4: g.ndop=g.ndop00 g.dfdt=g.dfdt0 graph2.delete(ALL) graph2.create_text(80,13,anchor=CENTER,text="Moon",font=g2font) graph2.create_text(13,37,anchor=W, text="Az: %6.2f" % g.AzMoon,font=g2font) graph2.create_text(13,61,anchor=W, text="El: %6.2f" % g.ElMoon,font=g2font) graph2.create_text(13,85,anchor=W, text="Dop:%6d" % g.ndop,font=g2font) graph2.create_text(13,109,anchor=W,text="Dgrd:%5.1f" % g.Dgrd,font=g2font) if g.freeze_decode: itol=2 ltol.configure(text='Tol '+str(50)) Audio.gcom2.dftolerance=50 nfreeze.set(1) Audio.gcom2.nfreeze=1 if Audio.gcom2.monitoring: Audio.gcom2.ndecoding=1 Audio.gcom2.nagain=0 else: Audio.gcom2.ndecoding=4 Audio.gcom2.nagain=1 g.freeze_decode=0 n=int(20.0*log10(g.rms/770.0+0.01)) t="Rx noise:%3d dB" % (n,) if n>=-10 and n<=10: msg4.configure(text=t,bg='gray85') else: msg4.configure(text=t,bg='red') t=g.ftnstr(Audio.gcom2.decodedfile)
f15c753982ab17e3b44954cd158dec3caeb6c649 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2394/f15c753982ab17e3b44954cd158dec3caeb6c649/map65.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 82, 1561, 16, 3084, 16, 4880, 81, 1449, 16, 82, 2883, 81, 16, 82, 15224, 1561, 16, 82, 15224, 378, 11214, 16, 82, 3190, 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, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 82, 1561, 16, 3084, 16, 4880, 81, 1449, 16, 82, 2883, 81, 16, 82, 15224, 1561, 16, 82, 15224, 378, 11214, 16, 82, 3190, 16, ...
classing look like this:
classing looks like this:
def _checkHierarchicly(request, pagename, username, attr): """ Get permission by transversing page hierarchy We check each page in the hierarchy. We start with the deepest page and recurse to the top of the tree. If one of those permits, True is returned. This method should not be called by users, use __getattr__ instead. @param request: the current request object @param pagename: pagename to get permission from @param username: the user name @param attr: the attribute to check @rtype: bool @return: True if you have permission or False """ from MoinMoin.Page import Page # Use page hierarchy pages = pagename.split('/') # check before allowed = request.cfg.cache.acl_rights_before.may(request, username, attr) if allowed is not None: return allowed # Get permission some_acl = False for i in range(len(pages), 0, -1): # Create the next pagename in the hierarchy # starting with the leave, going to the root name = '/'.join(pages[:i]) # Get page acl and ask for permission acl = Page(request, name).getACL(request) if acl.acl: some_acl = True allowed = acl.may(request, username, attr) if allowed is not None: return allowed if not some_acl: allowed = request.cfg.cache.acl_rights_default.may(request, username, attr) if allowed is not None: return allowed # check after allowed = request.cfg.cache.acl_rights_after.may(request, username, attr) if allowed is not None: return allowed return False
23870e48b27372aefdec210e494029fb3d2dce7b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/23870e48b27372aefdec210e494029fb3d2dce7b/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 44, 5148, 335, 715, 12, 2293, 16, 4262, 1069, 16, 2718, 16, 1604, 4672, 3536, 968, 4132, 635, 906, 2496, 310, 1363, 9360, 225, 1660, 866, 1517, 1363, 316, 326, 9360, 18, 166...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 44, 5148, 335, 715, 12, 2293, 16, 4262, 1069, 16, 2718, 16, 1604, 4672, 3536, 968, 4132, 635, 906, 2496, 310, 1363, 9360, 225, 1660, 866, 1517, 1363, 316, 326, 9360, 18, 166...