rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
authreq = headers.get(self.header, None)
authreq = headers.get(self.auth_header, None)
def http_error_auth_reqed(self, authreq, host, req, headers): authreq = headers.get(self.header, None) if authreq: kind = authreq.split()[0] if kind == 'Digest': return self.retry_http_digest_auth(req, authreq)
b9e8cfea89d64b99d4dc23c433ee2555096d3808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e8cfea89d64b99d4dc23c433ee2555096d3808/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 1636, 67, 1944, 67, 3658, 329, 12, 2890, 16, 1357, 3658, 16, 1479, 16, 1111, 16, 1607, 4672, 1357, 3658, 273, 1607, 18, 588, 12, 2890, 18, 1944, 67, 3374, 16, 599, 13, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 1636, 67, 1944, 67, 3658, 329, 12, 2890, 16, 1357, 3658, 16, 1479, 16, 1111, 16, 1607, 4672, 1357, 3658, 273, 1607, 18, 588, 12, 2890, 18, 1944, 67, 3374, 16, 599, 13, 309,...
ticket = self.__generate_ticket_name() query = db.add_guest_ticket(ticket=ticket, **args[0])
for i in range(3): ticket = self.__generate_ticket_name() if not db.get_guest_tickets(ticket=ticket): break db.add_guest_ticket(ticket=ticket, **args[0])
def add_guest_ticket(self, *args): """ Adds a guest ticket to the database and associates it to this user @param kw['starts']: the start datetime @param kw['ends']: the end datetime @param kw['description']: a description for this ticket @return: a string of the ticket name, if no errors raised """ # Check permissions -- do this in every exposed function db = self.__check_session() if not args: raise error.RequiredArgument("nothing passed to add_guest_ticket") ticket = self.__generate_ticket_name() query = db.add_guest_ticket(ticket=ticket, **args[0]) return { 'ticket' : ticket, 'starts' : args[0]['starts'], 'ends' : args[0]['ends'], 'description' : args[0]['description'] }
f12df2443cd26b520a43458a7ac476af675b31e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7602/f12df2443cd26b520a43458a7ac476af675b31e5/xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 18908, 67, 16282, 12, 2890, 16, 380, 1968, 4672, 3536, 15605, 279, 13051, 9322, 358, 326, 2063, 471, 2576, 815, 518, 358, 333, 729, 225, 632, 891, 5323, 3292, 17514, 3546, 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, 527, 67, 18908, 67, 16282, 12, 2890, 16, 380, 1968, 4672, 3536, 15605, 279, 13051, 9322, 358, 326, 2063, 471, 2576, 815, 518, 358, 333, 729, 225, 632, 891, 5323, 3292, 17514, 3546, 30, ...
host_dict = {} host_dict['hostname'] = host.hostname host_dict['id'] = host.id
def get_info_for_clone(id): """\ Retrieves all the information needed to clone a job. """ info = {} job = models.Job.objects.get(id=id) query = job.hostqueueentry_set.filter(deleted=False) hosts = [queue_entry.host for queue_entry in query if queue_entry.host and not queue_entry.meta_host] meta_hosts = [queue_entry.meta_host.name for queue_entry in query if queue_entry.meta_host] host_dicts = [] for host in hosts: host_dict = {} host_dict['hostname'] = host.hostname host_dict['id'] = host.id # one-time host if host.invalid: host_dict['platform'] = '(one-time host)' host_dict['locked_text'] = '' else: platform = host.platform() if platform: host_dict['platform'] = platform.name else: host_dict['platform'] = None labels = [label.name for label in host.labels.all()] if platform and platform.name in labels: labels.remove(platform.name) host_dict['other_labels'] = ', '.join(labels) host_dict['status'] = host.status host_dict['locked'] = host.locked host_dicts.append(host_dict) meta_host_counts = {} for meta_host in meta_hosts: meta_host_counts.setdefault(meta_host, 0) meta_host_counts[meta_host] += 1 info['job'] = job.get_object_dict() info['meta_host_counts'] = meta_host_counts info['hosts'] = host_dicts return rpc_utils.prepare_for_serialization(info)
54c10d81dd522aa5edb55b30106bbe11e2941ad6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/54c10d81dd522aa5edb55b30106bbe11e2941ad6/rpc_interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1376, 67, 1884, 67, 14056, 12, 350, 4672, 3536, 64, 20507, 777, 326, 1779, 3577, 358, 3236, 279, 1719, 18, 3536, 1123, 273, 2618, 1719, 273, 3679, 18, 2278, 18, 6911, 18, 588,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1376, 67, 1884, 67, 14056, 12, 350, 4672, 3536, 64, 20507, 777, 326, 1779, 3577, 358, 3236, 279, 1719, 18, 3536, 1123, 273, 2618, 1719, 273, 3679, 18, 2278, 18, 6911, 18, 588,...
HT_XEN_PVM: { HV_KERNEL_PATH: "/boot/vmlinuz-2.6-xenU", HV_INITRD_PATH: None, HV_ROOT_PATH: '/dev/sda', }, HT_XEN_HVM: { HV_BOOT_ORDER: "cd", HV_CDROM_IMAGE_PATH: None, HV_NIC_TYPE: HT_HVM_NIC_RTL8139, HV_DISK_TYPE: HT_HVM_DEV_PARAVIRTUAL, HV_VNC_BIND_ADDRESS: '0.0.0.0', HV_ACPI: True, HV_PAE: True, }, HT_KVM: { HV_KERNEL_PATH: "/boot/vmlinuz-2.6-kvmU", HV_INITRD_PATH: None, HV_ROOT_PATH: '/dev/vda', HV_ACPI: True, HV_SERIAL_CONSOLE: True, HV_VNC_BIND_ADDRESS: None, }, HT_FAKE: { }, }
HT_XEN_PVM: { HV_KERNEL_PATH: "/boot/vmlinuz-2.6-xenU", HV_INITRD_PATH: None, HV_ROOT_PATH: '/dev/sda', }, HT_XEN_HVM: { HV_BOOT_ORDER: "cd", HV_CDROM_IMAGE_PATH: None, HV_NIC_TYPE: HT_HVM_NIC_RTL8139, HV_DISK_TYPE: HT_HVM_DEV_PARAVIRTUAL, HV_VNC_BIND_ADDRESS: '0.0.0.0', HV_ACPI: True, HV_PAE: True, }, HT_KVM: { HV_KERNEL_PATH: "/boot/vmlinuz-2.6-kvmU", HV_INITRD_PATH: None, HV_ROOT_PATH: '/dev/vda', HV_ACPI: True, HV_SERIAL_CONSOLE: True, HV_VNC_BIND_ADDRESS: None, }, HT_FAKE: { }, }
def SplitVersion(version): """Splits version number stored in an int. Returns: tuple; (major, minor, revision) """ assert isinstance(version, int) (major, remainder) = divmod(version, 1000000) (minor, revision) = divmod(remainder, 10000) return (major, minor, revision)
bd0ff7c26467fb50c23b2c6964c87b6bf31ecaf3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/bd0ff7c26467fb50c23b2c6964c87b6bf31ecaf3/constants.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5385, 1444, 12, 1589, 4672, 3536, 16582, 1177, 1300, 4041, 316, 392, 509, 18, 225, 2860, 30, 3193, 31, 261, 14019, 16, 8439, 16, 6350, 13, 225, 3536, 1815, 1549, 12, 1589, 16, 509, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5385, 1444, 12, 1589, 4672, 3536, 16582, 1177, 1300, 4041, 316, 392, 509, 18, 225, 2860, 30, 3193, 31, 261, 14019, 16, 8439, 16, 6350, 13, 225, 3536, 1815, 1549, 12, 1589, 16, 509, 13,...
lyr = ds.ExecuteSQL("select * from contour_orientation order by elev asc")
lyr = ds.ExecuteSQL("select * from contour_orientation1 order by elev asc")
def test_gdal_contour_4(): if test_cli_utilities.get_gdal_contour_path() is None: return 'skip' try: os.remove('tmp/contour_orientation.shp') except: pass try: os.remove('tmp/contour_orientation.dbf') except: pass try: os.remove('tmp/contour_orientation.shx') except: pass drv = gdal.GetDriverByName('GTiff') wkt = 'GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AUTHORITY[\"EPSG\",\"4326\"]]' size = 160 precision = 1. / size ds = drv.Create('tmp/gdal_contour_orientation.tif', size, size, 1) ds.SetProjection( wkt ) ds.SetGeoTransform( [ 1, precision, 0, 50, 0, -precision ] )
52b395ad004cc7c0a1b03ec0ed2785887bb229a6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10289/52b395ad004cc7c0a1b03ec0ed2785887bb229a6/test_gdal_contour.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 19016, 287, 67, 1213, 477, 67, 24, 13332, 309, 1842, 67, 4857, 67, 1367, 1961, 18, 588, 67, 19016, 287, 67, 1213, 477, 67, 803, 1435, 353, 599, 30, 327, 296, 7457, 11, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 19016, 287, 67, 1213, 477, 67, 24, 13332, 309, 1842, 67, 4857, 67, 1367, 1961, 18, 588, 67, 19016, 287, 67, 1213, 477, 67, 803, 1435, 353, 599, 30, 327, 296, 7457, 11, 225,...
tag = re.sub('^http://', '', url) if date is not None: tag = re.sub('/', ',%s:/' % time.mktime(date.timetuple()), tag, 1) tag = re.sub(' return u'tag:' + tag
parsed_url = urlparse(url) time_stp = time.mktime(date.timetuple()) if date is not None else '' return u'tag:%s,%s:%s' %(parsed_url.hostname, time_stp, parsed_url.path)
def get_tag_uri(url, date): "Creates a TagURI. See http://diveintomark.org/archives/2004/05/28/howto-atom-id" tag = re.sub('^http://', '', url) if date is not None: tag = re.sub('/', ',%s:/' % time.mktime(date.timetuple()), tag, 1) tag = re.sub('#', '/', tag) return u'tag:' + tag
9766d55b5b3000ae84ebc257198df888ebed5764 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5622/9766d55b5b3000ae84ebc257198df888ebed5764/feeds.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2692, 67, 1650, 12, 718, 16, 1509, 4672, 315, 2729, 279, 4034, 3098, 18, 2164, 1062, 2207, 72, 688, 474, 362, 1313, 18, 3341, 19, 991, 3606, 19, 6976, 24, 19, 6260, 19, 6030...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2692, 67, 1650, 12, 718, 16, 1509, 4672, 315, 2729, 279, 4034, 3098, 18, 2164, 1062, 2207, 72, 688, 474, 362, 1313, 18, 3341, 19, 991, 3606, 19, 6976, 24, 19, 6260, 19, 6030...
P = self._check_valid() return P.get(self._name)
return self.str()
def __str__(self): P = self._check_valid() return P.get(self._name)
7b566e19d7cedd37ccc13af681b0189e7c1970ef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7b566e19d7cedd37ccc13af681b0189e7c1970ef/axiom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 453, 273, 365, 6315, 1893, 67, 877, 1435, 327, 453, 18, 588, 12, 2890, 6315, 529, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 453, 273, 365, 6315, 1893, 67, 877, 1435, 327, 453, 18, 588, 12, 2890, 6315, 529, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if self.type < 1500:
if self.type <= 1500:
def extract_padding(self,s): if self.type < 1500: return s[:self.type],s[self.type:] return s,None
d513ff4724f71a2f9ed3cb2fa6bd1b3139622890 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/d513ff4724f71a2f9ed3cb2fa6bd1b3139622890/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 9598, 12, 2890, 16, 87, 4672, 309, 365, 18, 723, 1648, 4711, 713, 30, 327, 272, 10531, 2890, 18, 723, 6487, 87, 63, 2890, 18, 723, 26894, 327, 272, 16, 7036, 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, 2608, 67, 9598, 12, 2890, 16, 87, 4672, 309, 365, 18, 723, 1648, 4711, 713, 30, 327, 272, 10531, 2890, 18, 723, 6487, 87, 63, 2890, 18, 723, 26894, 327, 272, 16, 7036, 2, -100, -100,...
file.write('void InitializeGLBindings%s() {\n' % setName.upper()) for [returnType, names, arguments] in functions:
file.write('void InitializeGLBindings%s() {\n' % set_name.upper()) for [return_type, names, arguments] in functions:
def GenerateSource(file, functions, setName): """Generates gl_binding_autogen_x.cc""" # Write file header. file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file.write('\n') file.write('// This file is automatically generated.\n') file.write('\n') file.write('#include "app/gfx/gl/gl_bindings.h"\n') file.write('#include "app/gfx/gl/gl_implementation.h"\n') # Write definitions of function pointers. file.write('\n') file.write('namespace gfx {\n') file.write('\n') for [returnType, names, arguments] in functions: file.write('%sProc g_%s;\n' % (names[0], names[0])) # Write function to initialize the function pointers. file.write('\n') file.write('void InitializeGLBindings%s() {\n' % setName.upper()) for [returnType, names, arguments] in functions: for name in names: file.write(' if (!g_%s)\n' % names[0]) file.write( ' g_%s = reinterpret_cast<%sProc>(GetGLProcAddress("%s"));\n' % (names[0], names[0], name)) file.write('}\n') file.write('\n') file.write( '} // namespace gfx\n')
218a5a204661ad6185f01d6233b35b2d5f86027b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/218a5a204661ad6185f01d6233b35b2d5f86027b/generate_bindings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 1830, 12, 768, 16, 4186, 16, 6788, 4672, 3536, 6653, 5118, 67, 7374, 67, 5854, 19409, 67, 92, 18, 952, 8395, 225, 468, 2598, 585, 1446, 18, 585, 18, 2626, 2668, 759, 25417, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 1830, 12, 768, 16, 4186, 16, 6788, 4672, 3536, 6653, 5118, 67, 7374, 67, 5854, 19409, 67, 92, 18, 952, 8395, 225, 468, 2598, 585, 1446, 18, 585, 18, 2626, 2668, 759, 25417, 261, ...
repeat = (address == last_plc_address and (last_plc_time + PLC_DELAY) > now)
repeat = (last_plc_time + PLC_DELAY) > now
def do_GET(self): global last_plc_time global last_plc_address global last_rf_time global last_rf_address path = self.path if "?" not in path: # Serve the script page print "Serving script page for url " + path self.send_response(200) self.send_header("Content-Type", "text/html") self.end_headers() with open("src/activehomed/receive_ie.html") as file: for line in file: self.wfile.write(line + " ") else: # Incoming event from the script page print "Inbound event for url " + path params = dict(parse_qsl(path.split("?")[1], True)) mode, address, command, sequence, timestamp, _, _ = (params["a"], params["b"], params["c"], params["d"], params["e"], params["f"], params["g"]) receive_action_event(mode, address, command, sequence, timestamp) repeat = False if mode.startswith("send") or mode.startswith("recv"): mode = mode[4:] now = time() if mode == "plc": repeat = (address == last_plc_address and (last_plc_time + PLC_DELAY) > now) last_plc_time = now last_plc_address = address elif mode == "rf": repeat = (address == last_rf_address and (last_rf_time + RF_DELAY) > now) last_rf_time = now last_rf_address = address house, unit = address[0], address[1:] if sequence == "": sequence = None else: try: sequence = int(sequence) except ValueError: print ("WARNING: Sequence number " + str(sequence) + " couldn't be converted to an integer.") if timestamp == "": timestamp = None receive_event(mode, house, unit, address, command, sequence, timestamp, repeat) self.send_response(200) self.send_header("Content-Type", "text/plain") self.end_headers() self.wfile.write("ok")
0308ccc9978cf272a44d7ebe62b4ac6d2f63e867 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/0308ccc9978cf272a44d7ebe62b4ac6d2f63e867/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3264, 12, 2890, 4672, 2552, 1142, 67, 412, 71, 67, 957, 2552, 1142, 67, 412, 71, 67, 2867, 2552, 1142, 67, 5809, 67, 957, 2552, 1142, 67, 5809, 67, 2867, 589, 273, 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, 741, 67, 3264, 12, 2890, 4672, 2552, 1142, 67, 412, 71, 67, 957, 2552, 1142, 67, 412, 71, 67, 2867, 2552, 1142, 67, 5809, 67, 957, 2552, 1142, 67, 5809, 67, 2867, 589, 273, 365, 18, ...
"id" : 107, "bug_id" : 76, "url" : "http://example.com/103", "is_obsolete" : True, "is_patch" : True, "review" : "+", "reviewer_email" : "foo@bar.com", "attacher_email" : "eric@webkit.org", }
"id": 107, "bug_id": 76, "url": "http://example.com/103", "is_obsolete": True, "is_patch": True, "review": "+", "reviewer_email": "foo@bar.com", "attacher_email": "eric@webkit.org", }
def _id_to_object_dictionary(*objects): dictionary = {} for thing in objects: dictionary[thing["id"]] = thing return dictionary
c40aa4d55730657b1c744e6ea677416c5bf4f7d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/c40aa4d55730657b1c744e6ea677416c5bf4f7d9/mock_bugzillatool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 350, 67, 869, 67, 1612, 67, 15556, 30857, 6911, 4672, 3880, 273, 2618, 364, 7757, 316, 2184, 30, 3880, 63, 4274, 9614, 350, 11929, 65, 273, 7757, 327, 3880, 225, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 350, 67, 869, 67, 1612, 67, 15556, 30857, 6911, 4672, 3880, 273, 2618, 364, 7757, 316, 2184, 30, 3880, 63, 4274, 9614, 350, 11929, 65, 273, 7757, 327, 3880, 225, 2, -100, -100, -1...
cr.execute('update "' + self._table + '" set ' + \ string.join(upd0, ',') + ' where id = %s', upd1)
if upd0 and upd1: cr.execute('update "' + self._table + '" set ' + \ string.join(upd0, ',') + ' where id = %s', upd1)
def _store_set_values(self, cr, uid, ids, fields, context): field_flag = False field_dict = {} if self._log_access: cr.execute('select id,write_date from '+self._table+' where id in ('+','.join(map(str, ids))+')') res = cr.fetchall() for r in res: if r[1]: field_dict.setdefault(r[0], []) res_date = time.strptime((r[1])[:19], '%Y-%m-%d %H:%M:%S') write_date = datetime.datetime.fromtimestamp(time.mktime(res_date)) for i in self.pool._store_function.get(self._name, []): if i[5]: up_write_date = write_date + datetime.timedelta(hours=i[5]) if datetime.datetime.now() < up_write_date: if i[1] in fields: field_dict[r[0]].append(i[1]) if not field_flag: field_flag = True todo = {} keys = [] for f in fields: if self._columns[f]._multi not in keys: keys.append(self._columns[f]._multi) todo.setdefault(self._columns[f]._multi, []) todo[self._columns[f]._multi].append(f) for key in keys: val = todo[key] if key: # uid == 1 for accessing objects having rules defined on store fields result = self._columns[val[0]].get(cr, self, ids, val, 1, context=context) for id,value in result.items(): if field_flag: for f in value.keys(): if f in field_dict[id]: value.pop(f) upd0 = [] upd1 = [] for v in value: if v not in val: continue if self._columns[v]._type in ('many2one', 'one2one'): try: value[v] = value[v][0] except: pass upd0.append('"'+v+'"='+self._columns[v]._symbol_set[0]) upd1.append(self._columns[v]._symbol_set[1](value[v])) upd1.append(id) cr.execute('update "' + self._table + '" set ' + \ string.join(upd0, ',') + ' where id = %s', upd1)
c99164b24f23873deacc1be236bbe7c9b515fd1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/c99164b24f23873deacc1be236bbe7c9b515fd1f/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2233, 67, 542, 67, 2372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 16, 819, 4672, 652, 67, 6420, 273, 1083, 652, 67, 1576, 273, 2618, 309, 365, 6315, 1330, 67, 3860, 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, 389, 2233, 67, 542, 67, 2372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 16, 819, 4672, 652, 67, 6420, 273, 1083, 652, 67, 1576, 273, 2618, 309, 365, 6315, 1330, 67, 3860, 30,...
return split(p)[0]
i = p.rfind('/') + 1 head = p[:i] if head and head != '/'*len(head): head = head.rstrip('/') return head
def dirname(p): """Returns the directory component of a pathname""" return split(p)[0]
b05042ef4470b87237460ec8ae24fbb4c8fed8a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b05042ef4470b87237460ec8ae24fbb4c8fed8a7/posixpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4283, 12, 84, 4672, 3536, 1356, 326, 1867, 1794, 434, 279, 9806, 8395, 277, 273, 293, 18, 86, 4720, 2668, 2473, 13, 397, 404, 910, 273, 293, 10531, 77, 65, 309, 910, 471, 910, 480, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4283, 12, 84, 4672, 3536, 1356, 326, 1867, 1794, 434, 279, 9806, 8395, 277, 273, 293, 18, 86, 4720, 2668, 2473, 13, 397, 404, 910, 273, 293, 10531, 77, 65, 309, 910, 471, 910, 480, 2...
self.initdef += "\n%sschema = '%s'" % (ID2, tp.getTargetNamespace()) self.initdef += "\n%stype = '%s'\n" % (ID2, tp.getName()) self.initdef += '\n%sdef __init__(self, name=None, ns=None, **kw):' % (ID2)
self.classvar.set("\n%sschema = '%s'" % (ID2, tp.getTargetNamespace())) self.classvar.write("\n%stype = '%s'\n" % (ID2, tp.getName())) self.initdef.set('\n%sdef __init__(self, name=None, ns=None, **kw):' % (ID2))
self.initdef += "\n%sschema = '%s'" % (ID2, tp.getTargetNamespace())
e2d87b566667969a1290b56d51a1ba4563446870 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/e2d87b566667969a1290b56d51a1ba4563446870/wsdl2python.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 365, 18, 2738, 536, 1011, 1548, 82, 9, 1049, 1243, 273, 1995, 87, 4970, 738, 261, 734, 22, 16, 8071, 18, 588, 2326, 3402, 10756, 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, 365, 18, 2738, 536, 1011, 1548, 82, 9, 1049, 1243, 273, 1995, 87, 4970, 738, 261, 734, 22, 16, 8071, 18, 588, 2326, 3402, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def getMirrorDistance(self, chunkCenter, mirrorPlaneCenter): "return the distance between the chunk center and the mirror plane center" return vlen(chunkCenter - mirrorPlaneCenter)
def getMirrorDistance(self, chunkCenter, mirrorPlaneCenter): "return the distance between the chunk center and the mirror plane center" return vlen(chunkCenter - mirrorPlaneCenter)
72c296b7a9b5eded3b9584b9d50197a45196ba39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/72c296b7a9b5eded3b9584b9d50197a45196ba39/ops_motion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if not groupsequence or groupsequence[-1] != group_key:
if not groupsequence or group_key not in groupsequence:
def template_data(self, context, tickets, orig_list=None, orig_time=None): constraints = {} for k, v in self.constraints.items(): constraint = {'values': [], 'mode': ''} for val in v: neg = val.startswith('!') if neg: val = val[1:] mode = '' if val[:1] in ('~', '^', '$'): mode, val = val[:1], val[1:] constraint['mode'] = (neg and '!' or '') + mode constraint['values'].append(val) constraints[k] = constraint
4cfd8d2f568991c27457d313c4a60b4379633448 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9317/4cfd8d2f568991c27457d313c4a60b4379633448/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1542, 67, 892, 12, 2890, 16, 819, 16, 24475, 16, 1647, 67, 1098, 33, 7036, 16, 1647, 67, 957, 33, 7036, 4672, 6237, 273, 2618, 364, 417, 16, 331, 316, 365, 18, 11967, 18, 3319, 13332...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1542, 67, 892, 12, 2890, 16, 819, 16, 24475, 16, 1647, 67, 1098, 33, 7036, 16, 1647, 67, 957, 33, 7036, 4672, 6237, 273, 2618, 364, 417, 16, 331, 316, 365, 18, 11967, 18, 3319, 13332...
self.send_dns_request()
wc.proxy.make_timer(30, self.handle_connect_timeout)
def establish_connection (self): family = self.get_family(self.nameserver) if self.tcp: self.create_socket(family, socket.SOCK_STREAM) self.connect((self.nameserver, self.PORT)) wc.proxy.make_timer(30, self.handle_connect_timeout) else: self.create_socket(family, socket.SOCK_DGRAM) self.connect((self.nameserver, self.PORT)) self.send_dns_request()
384651e9b114042a1232a3d9263caae3a28b34ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/384651e9b114042a1232a3d9263caae3a28b34ab/dns_lookups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18312, 67, 4071, 261, 2890, 4672, 6755, 273, 365, 18, 588, 67, 9309, 12, 2890, 18, 30654, 13, 309, 365, 18, 14832, 30, 365, 18, 2640, 67, 7814, 12, 9309, 16, 2987, 18, 3584, 3507, 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, 18312, 67, 4071, 261, 2890, 4672, 6755, 273, 365, 18, 588, 67, 9309, 12, 2890, 18, 30654, 13, 309, 365, 18, 14832, 30, 365, 18, 2640, 67, 7814, 12, 9309, 16, 2987, 18, 3584, 3507, 67...
assert n == head.n_samps, "Missmatching length in lib.decomp_6b"
if n != head.n_samps: raise GSEUtiError("Missmatching length in lib.decomp_6b")
def read(f, verify_chksum=True): """ Read GSE2 file and return header and data. Currently supports only CM6 compressed GSE2 files, this should be sufficient for most cases. Data are in circular frequency counts, for correction of calper multiply by 2PI and calper: data * 2 * pi * header['calper']. :type f: File Pointer :param f: Open file pointer of GSE2 file to read, opened in binary mode, e.g. f = open('myfile','rb') :type test_chksum: Bool :param verify_chksum: If True verify Checksum and raise Exception if it is not correct :rtype: Dictionary, Numpy.ndarray int32 :return: Header entries and data as numpy.ndarray of type int32. """ fp = C.pythonapi.PyFile_AsFile(f) head = HEADER() lib.read_header(fp, C.pointer(head)) data = np.empty(head.n_samps, dtype='int') n = lib.decomp_6b(fp, head.n_samps, data) assert n == head.n_samps, "Missmatching length in lib.decomp_6b" lib.rem_2nd_diff(data, head.n_samps) # test checksum only if enabled if verify_chksum: # calculate checksum from data, as in gse_driver.c line 60 chksum_data = abs(lib.check_sum(data, head.n_samps, C.c_longlong())) # find checksum within file buf = f.readline() chksum_file = -1 while buf: if buf.startswith('CHK2'): chksum_file = int(buf.strip().split()[1]) break buf = f.readline() if chksum_data != chksum_file: msg = "Mismatching checksums, CHK %d != CHK %d" raise ChksumError(msg % (chksum_data, chksum_file)) headdict = {} for i in head._fields_: headdict[i[0]] = getattr(head, i[0]) # cleaning up del fp, head return headdict, data
b8b235fc0e89d4060f3bac733e241a6a21790b73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/b8b235fc0e89d4060f3bac733e241a6a21790b73/libgse2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 74, 16, 3929, 67, 27038, 1364, 33, 5510, 4672, 3536, 2720, 611, 1090, 22, 585, 471, 327, 1446, 471, 501, 18, 225, 15212, 6146, 1338, 15871, 26, 8968, 611, 1090, 22, 1390, 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, 855, 12, 74, 16, 3929, 67, 27038, 1364, 33, 5510, 4672, 3536, 2720, 611, 1090, 22, 585, 471, 327, 1446, 471, 501, 18, 225, 15212, 6146, 1338, 15871, 26, 8968, 611, 1090, 22, 1390, 16, ...
module_name = entry.getAttribute("name")
module_name = entry.getAttribute("module")
def fixup_refmodindexes_chunk(container): # node is probably a <para>; let's see how often it isn't: if container.tagName != PARA_ELEMENT: bwrite("--- fixup_refmodindexes_chunk(%s)\n" % container) module_entries = find_all_elements(container, "module") if not module_entries: return index_entries = find_all_elements_from_set(container, REFMODINDEX_ELEMENTS) removes = [] for entry in index_entries: children = entry.childNodes if len(children) != 0: bwrite("--- unexpected number of children for %s node:\n" % entry.tagName) ewrite(entry.toxml() + "\n") continue found = 0 module_name = entry.getAttribute("name") for node in module_entries: if len(node.childNodes) != 1: continue this_name = node.childNodes[0].data if this_name == module_name: found = 1 node.setAttribute("index", "yes") if found: removes.append(entry) for node in removes: container.removeChild(node)
82ebc27357891ec342b8602fb28189751b8d06e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/82ebc27357891ec342b8602fb28189751b8d06e6/docfixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 416, 67, 1734, 1711, 11265, 67, 6551, 12, 3782, 4672, 468, 756, 353, 8656, 279, 411, 25072, 34, 31, 2231, 1807, 2621, 3661, 16337, 518, 5177, 1404, 30, 309, 1478, 18, 2692, 461, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 416, 67, 1734, 1711, 11265, 67, 6551, 12, 3782, 4672, 468, 756, 353, 8656, 279, 411, 25072, 34, 31, 2231, 1807, 2621, 3661, 16337, 518, 5177, 1404, 30, 309, 1478, 18, 2692, 461, ...
'rbsite': os.path.abspath(__file__),
'rbsite': rbsite_path,
def process_template(self, template_path, dest_filename): """ Generates a file from a template. """ domain_name_escaped = self.domain_name.replace(".", "\\.") template = pkg_resources.resource_string("reviewboard", template_path) sitedir = os.path.abspath(self.install_dir).replace("\\", "/")
d7d277c321cee8f50a6a2f98bcd6f56b967b081d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/d7d277c321cee8f50a6a2f98bcd6f56b967b081d/rbsite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 3202, 12, 2890, 16, 1542, 67, 803, 16, 1570, 67, 3459, 4672, 3536, 31902, 279, 585, 628, 279, 1542, 18, 3536, 2461, 67, 529, 67, 16502, 273, 365, 18, 4308, 67, 529, 18, 207...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 3202, 12, 2890, 16, 1542, 67, 803, 16, 1570, 67, 3459, 4672, 3536, 31902, 279, 585, 628, 279, 1542, 18, 3536, 2461, 67, 529, 67, 16502, 273, 365, 18, 4308, 67, 529, 18, 207...
def jacobi_sencil(W,H,Dist): full = np.zeros((W+2,H+2), dtype=np.double, dist=Dist) work = np.zeros((W,H), dtype=np.double, dist=Dist) diff = np.zeros((W,H), dtype=np.double, dist=Dist)
def jacobi_sencil(H,W,Dist): full = np.zeros((H+2,W+2), dtype=np.double, dist=Dist) work = np.zeros((H,W), dtype=np.double, dist=Dist) diff = np.zeros((H,W), dtype=np.double, dist=Dist)
def jacobi_sencil(W,H,Dist): full = np.zeros((W+2,H+2), dtype=np.double, dist=Dist) work = np.zeros((W,H), dtype=np.double, dist=Dist) diff = np.zeros((W,H), dtype=np.double, dist=Dist) cells = full[1:W+1,1:H+1] up = full[1:W+1, 0:H] left = full[0:W, 1:H+1] right = full[2:W+2, 1:H+1] down = full[1:W+1, 2:H+2] for i in range(1,W+1): full[i][0]=-273.15 full[i][-1]=-273.15 full[0,:] += 40.0 full[W+1,:] += -273.13 epsilon=W*H*0.002 delta=epsilon+1 i=0 while epsilon<delta: i+=1 work[:] = cells work += up work += left work += right work += down work *= 0.2 np.subtract(cells,work,diff) diff=np.absolute(diff) delta=np.sum(diff) cells[:] = work return cells
518b31b74ac68ebb7abc56a3d1bf39667b165f0d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4342/518b31b74ac68ebb7abc56a3d1bf39667b165f0d/test_jacobi_stencil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20138, 30875, 67, 87, 21620, 12, 44, 16, 59, 16, 5133, 4672, 1983, 273, 1130, 18, 22008, 12443, 44, 15, 22, 16, 59, 15, 22, 3631, 3182, 33, 6782, 18, 9056, 16, 2411, 33, 5133, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20138, 30875, 67, 87, 21620, 12, 44, 16, 59, 16, 5133, 4672, 1983, 273, 1130, 18, 22008, 12443, 44, 15, 22, 16, 59, 15, 22, 3631, 3182, 33, 6782, 18, 9056, 16, 2411, 33, 5133, 13, ...
return Infsign[sign]
return _Infsign[sign]
def handle(self, context, sign, *args): if context.rounding in (ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_HALF_DOWN, ROUND_UP): return Infsign[sign] if sign == 0: if context.rounding == ROUND_CEILING: return Infsign[sign] return _dec_from_triple(sign, '9'*context.prec, context.Emax-context.prec+1) if sign == 1: if context.rounding == ROUND_FLOOR: return Infsign[sign] return _dec_from_triple(sign, '9'*context.prec, context.Emax-context.prec+1)
c5de0969ca2a82c66efd30bb675f03c2324a3b27 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/c5de0969ca2a82c66efd30bb675f03c2324a3b27/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 819, 16, 1573, 16, 380, 1968, 4672, 309, 819, 18, 17376, 316, 261, 15092, 67, 44, 21497, 67, 3079, 16, 27048, 67, 44, 21497, 67, 24427, 1157, 16, 27048, 67, 44, 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, 1640, 12, 2890, 16, 819, 16, 1573, 16, 380, 1968, 4672, 309, 819, 18, 17376, 316, 261, 15092, 67, 44, 21497, 67, 3079, 16, 27048, 67, 44, 21497, 67, 24427, 1157, 16, 27048, 67, 44, 2...
bri t0, label("end"), flags=(CECF,)
bri t0, label("end"), flags=(nCECF,)
def macroop CPUID_R {
bbc8a40857d47348753c59b91a93dd312fa1b809 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6787/bbc8a40857d47348753c59b91a93dd312fa1b809/processor_information.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 5181, 3060, 67, 54, 288, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 5181, 3060, 67, 54, 288, 225, 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,...
return self.cursor.execute("SELECT MAX(ROWID) FROM %s" % self.dbtablename).fetchone()[0]
self.cursor.execute("SELECT MAX(ROWID) FROM %s" % self.dbtablename) return self.cursor.fetchone()[0]
def maxrowid(self): return self.cursor.execute("SELECT MAX(ROWID) FROM %s" % self.dbtablename).fetchone()[0]
3e6d9f6b759de94a9a183072c94cc952e9fcf558 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/3e6d9f6b759de94a9a183072c94cc952e9fcf558/dbtables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 943, 492, 350, 12, 2890, 4672, 327, 365, 18, 9216, 18, 8837, 2932, 4803, 4552, 12, 11226, 734, 13, 4571, 738, 87, 6, 738, 365, 18, 1966, 7032, 14724, 2934, 5754, 476, 1435, 63, 20, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 943, 492, 350, 12, 2890, 4672, 327, 365, 18, 9216, 18, 8837, 2932, 4803, 4552, 12, 11226, 734, 13, 4571, 738, 87, 6, 738, 365, 18, 1966, 7032, 14724, 2934, 5754, 476, 1435, 63, 20, 6...
if not tokens:
if tokens is None:
def parse(self, text, info): defblock = self.DEFBLOCK = {} metadata = self.METADATA = [] self._ERROR = "" tokens = self.split_text(text) if not tokens: return None self.FILEINFO.append(info) block = self._parse(tokens, info) self.FILEINFO.pop() if block: return {"BLOCK": block, "DEFBLOCKS": defblock, "METADATA": dict(self.METADATA)} else: return None
68b6c4f1d7e52d3483b48a88f692adac9aa73648 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1390/68b6c4f1d7e52d3483b48a88f692adac9aa73648/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 1123, 4672, 1652, 2629, 273, 365, 18, 12904, 11403, 273, 2618, 1982, 273, 365, 18, 22746, 273, 5378, 365, 6315, 3589, 273, 1408, 2430, 273, 365, 18, 4939, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 1123, 4672, 1652, 2629, 273, 365, 18, 12904, 11403, 273, 2618, 1982, 273, 365, 18, 22746, 273, 5378, 365, 6315, 3589, 273, 1408, 2430, 273, 365, 18, 4939, ...
AbelianGroup( 4, [4, 5, 5, 7])
Abelian Group isomorphic to Z/4Z x Z/5Z x Z/5Z x Z/7Z
def __init__(self, ambient, gens, names="f"): """
82feb7d5287b66fa860c45cb0b160fbe7aa67b0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/82feb7d5287b66fa860c45cb0b160fbe7aa67b0a/abelian_group.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13232, 1979, 16, 314, 773, 16, 1257, 1546, 74, 6, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13232, 1979, 16, 314, 773, 16, 1257, 1546, 74, 6, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
ep_name = 'main'
dist_name, ep_name = project_name, 'main'
def find_project_class(project_name, logger): """ Takes a project name (like 'fassembler:opencore') and loads the class that is being referred to, using entry points. """ if ':' in project_name: dist_name, ep_name = project_name.split(':', 1) else: ep_name = 'main' try: dist = pkg_resources.get_distribution(dist_name) except pkg_resources.DistributionNotFound, e: if ep_name != 'main': ## FIXME: log something? return project_name, None logger.debug('Could not get distribution %s: %s' % (dist_name, e)) options = list(pkg_resources.iter_entry_points('fassembler.project', project_name)) if not options: logger.fatal('NO entry points in [fassembler.project] found with name %s' % project_name) return project_name, None if len(options) > 1: logger.fatal('More than one entry point in [fassembler.project] found with name %s: %s' % (project_name, ', '.join(map(repr, options)))) return project_name, None return ep_name(options[0]), options[0].load() else: ep = dist.get_entry_info('fassembler.project', ep_name) if not ep: logger.fatal('Distribution %s (at %s) does not have an entry point %r' % (dist.project_name, dist.location, ep_name)) return project_name, None logger.debug('Found entry point %s:main = %s' % (dist, ep)) return project_name, ep.load()
058d445a69c3b2c033e5765bf82d7b2bc8c51187 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12796/058d445a69c3b2c033e5765bf82d7b2bc8c51187/command.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 4406, 67, 1106, 12, 4406, 67, 529, 16, 1194, 4672, 3536, 23004, 279, 1984, 508, 261, 5625, 296, 74, 345, 5747, 749, 30, 556, 1331, 479, 6134, 471, 6277, 326, 667, 716, 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, 67, 4406, 67, 1106, 12, 4406, 67, 529, 16, 1194, 4672, 3536, 23004, 279, 1984, 508, 261, 5625, 296, 74, 345, 5747, 749, 30, 556, 1331, 479, 6134, 471, 6277, 326, 667, 716, 353, ...
'nl': u'Links naar gespamde site %s verwijderd',
'nl': u'Links naar gespamde site: %s verwijderd',
def main(): automatic = False msg = { 'de': u'Entferne in Spam-Blacklist eingetragenen Weblink auf %s', 'en': u'Removing links to spammed site %s', 'nl': u'Links naar gespamde site %s verwijderd', 'pt': u'Removendo links de spam do site %s', } spamSite = '' for arg in wikipedia.handleArgs(): if arg.startswith("-automatic"): automatic = True else: spamSite = arg if not automatic: wikipedia.put_throttle.setDelay(1) if not spamSite: wikipedia.output(u"No spam site specified.") sys.exit() mysite = wikipedia.getSite() pages = list(set(mysite.linksearch(spamSite))) wikipedia.getall(mysite, pages) for p in pages: text = p.get() if not spamSite in text: continue # Show the title of the page we're working on. # Highlight the title in purple. wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % p.title()) lines = text.split('\n') newpage = [] lastok = "" for line in lines: if spamSite in line: if lastok: wikipedia.output(lastok) wikipedia.output('\03{lightred}%s\03{default}' % line) lastok = None else: newpage.append(line) if line.strip(): if lastok is None: wikipedia.output(line) lastok = line if automatic: answer = "y" else: answer = wikipedia.inputChoice(u'\nDelete the red lines?', ['yes', 'no', 'edit'], ['y', 'N', 'e'], 'n') if answer == "n": continue elif answer == "e": editor = editarticle.TextEditor() newtext = editor.edit(text, highlight = spamSite, jumpIndex = text.find(spamSite)) else: newtext = "\n".join(newpage) if newtext != text: p.put(newtext, wikipedia.translate(mysite, msg) % spamSite)
b209b035be5447b6fc05875ed330944200ad9e1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/b209b035be5447b6fc05875ed330944200ad9e1d/spamremove.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 5859, 273, 1083, 1234, 273, 288, 296, 323, 4278, 582, 11, 14199, 586, 4644, 316, 5878, 301, 17, 25811, 425, 310, 278, 2458, 275, 275, 2999, 1232, 279, 696, 738, 87, 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, 2774, 13332, 5859, 273, 1083, 1234, 273, 288, 296, 323, 4278, 582, 11, 14199, 586, 4644, 316, 5878, 301, 17, 25811, 425, 310, 278, 2458, 275, 275, 2999, 1232, 279, 696, 738, 87, 2187, ...
working_dir, parent, name, config
work_dir, parent, name, config
def __init__(self, working_dir, parent=None, name=None, config=None): super(WindowsHPCLauncher, self).__init__( working_dir, parent, name, config )
0e1a8878339575b302cf159e8b9d71fbaa0d82ec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4219/0e1a8878339575b302cf159e8b9d71fbaa0d82ec/launcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5960, 67, 1214, 16, 982, 33, 7036, 16, 508, 33, 7036, 16, 642, 33, 7036, 4672, 2240, 12, 10399, 2500, 5017, 4760, 264, 16, 365, 2934, 972, 2738, 972, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5960, 67, 1214, 16, 982, 33, 7036, 16, 508, 33, 7036, 16, 642, 33, 7036, 4672, 2240, 12, 10399, 2500, 5017, 4760, 264, 16, 365, 2934, 972, 2738, 972, 1...
except SyntaxWarning, msg: print "got SyntaxWarning as expected"
except SyntaxError, msg: print "got SyntaxError as expected"
def compile_and_catch_warning(text): try: compile(text, "<test code>", "exec") except SyntaxWarning, msg: print "got SyntaxWarning as expected" else: print "expected SyntaxWarning"
a1eb4eb036f5bd0d3416f564ddf4deb75c1f2632 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a1eb4eb036f5bd0d3416f564ddf4deb75c1f2632/test_global.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 464, 67, 14683, 67, 8551, 12, 955, 4672, 775, 30, 4074, 12, 955, 16, 3532, 3813, 981, 2984, 16, 315, 4177, 7923, 1335, 18453, 16, 1234, 30, 1172, 315, 13212, 18453, 487, 2665...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4074, 67, 464, 67, 14683, 67, 8551, 12, 955, 4672, 775, 30, 4074, 12, 955, 16, 3532, 3813, 981, 2984, 16, 315, 4177, 7923, 1335, 18453, 16, 1234, 30, 1172, 315, 13212, 18453, 487, 2665...
if self._getChildData('type',root=param) in ( 'class','typename'):
if type in ('class','typename'):
def _translate_templateparamlist( self, templateparamlist, target=None, **kwargs ): template = target.appendChild(self._createNode('template')) for param in templateparamlist.childNodes: if param.nodeName == 'param': paramKind = None if self._getChildData('type',root=param) in ( 'class','typename'): paramKind = 'template-type-parameter' else: paramKind = 'template-nontype-parameter' templateParam = template.appendChild( self._createNode(paramKind, name=self._getChildData('declname',root=param))) defval = self._getChild('defval',root=param) if defval: value = self._getChildData('ref',root=defval.firstChild) if not value: value = self._getData(defval) templateParam.appendChild(self._createText('default',value)) return template
74d8dd29c88bf17661b7e631fb09ea9c087eca91 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9981/74d8dd29c88bf17661b7e631fb09ea9c087eca91/doxproc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13929, 67, 3202, 891, 1098, 12, 365, 16, 1542, 891, 1098, 16, 1018, 33, 7036, 16, 2826, 4333, 262, 30, 1542, 273, 1018, 18, 6923, 1763, 12, 2890, 6315, 2640, 907, 2668, 3202, 2611...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13929, 67, 3202, 891, 1098, 12, 365, 16, 1542, 891, 1098, 16, 1018, 33, 7036, 16, 2826, 4333, 262, 30, 1542, 273, 1018, 18, 6923, 1763, 12, 2890, 6315, 2640, 907, 2668, 3202, 2611...
""" for c in IntegerVectors(sum(self.p), sum(self.p)): for sst in SemistandardTableaux(self.p, c):
sage: [ t for t in SemistandardTableaux([1,1,1], max_entry=4) ] [[[1], [2], [3]], [[1], [2], [4]], [[1], [3], [4]], [[2], [3], [4]]] """ for c in IntegerVectors(sum(self.p), self.max_entry): for sst in SemistandardTableaux_pmu(self.p, c):
def __iter__(self): """ An iterator for the semistandard partitions of shape p. EXAMPLES:: sage: [ t for t in SemistandardTableaux([3]) ] [[[1, 1, 1]], [[1, 1, 2]], [[1, 1, 3]], [[1, 2, 2]], [[1, 2, 3]], [[1, 3, 3]], [[2, 2, 2]], [[2, 2, 3]], [[2, 3, 3]], [[3, 3, 3]]] sage: [ t for t in SemistandardTableaux([2,1]) ] [[[1, 1], [2]], [[1, 1], [3]], [[1, 2], [2]], [[1, 2], [3]], [[1, 3], [2]], [[1, 3], [3]], [[2, 2], [3]], [[2, 3], [3]]] sage: [ t for t in SemistandardTableaux([1,1,1]) ] [[[1], [2], [3]]] """ for c in IntegerVectors(sum(self.p), sum(self.p)): for sst in SemistandardTableaux(self.p, c): yield sst
dc756d26ea922387ee74781c3b99359e739e8c01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/dc756d26ea922387ee74781c3b99359e739e8c01/tableau.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 3536, 1922, 2775, 364, 326, 6111, 376, 2958, 10060, 434, 2179, 293, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 306, 268, 364, 268, 316, 15661, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 3536, 1922, 2775, 364, 326, 6111, 376, 2958, 10060, 434, 2179, 293, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 306, 268, 364, 268, 316, 15661, ...
conf_file_id = self['pcu_id']
conf_file_id = self['conf_file_id']
def add_nodegroup(self, nodegroup, commit = True): """ Add configuration file to node group. """
5846977d38cce6e4fc3019e61a42188e8a3a319c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/5846977d38cce6e4fc3019e61a42188e8a3a319c/ConfFiles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2159, 1655, 12, 2890, 16, 756, 1655, 16, 3294, 273, 1053, 4672, 3536, 1436, 1664, 585, 358, 756, 1041, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2159, 1655, 12, 2890, 16, 756, 1655, 16, 3294, 273, 1053, 4672, 3536, 1436, 1664, 585, 358, 756, 1041, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
os.system('gqview %s >/dev/null&'%filename)
os.system('%s %s 2>/dev/null 1>/dev/null &'%( sage.misc.log.browser(), filename))
def show(self, filename=""):
2f2d0525b96cd1cbeb5108d84c79e09d75dbd8f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/2f2d0525b96cd1cbeb5108d84c79e09d75dbd8f7/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 1544, 1546, 6, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 1544, 1546, 6, 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, ...
def urljoin(base, url, allow_framents = 1):
def urljoin(base, url, allow_fragments = 1):
def urljoin(base, url, allow_framents = 1): if not base: return url bscheme, bnetloc, bpath, bparams, bquery, bfragment = \ urlparse(base, '', allow_framents) scheme, netloc, path, params, query, fragment = \ urlparse(url, bscheme, allow_framents) # XXX Unofficial hack: default netloc to bnetloc even if # schemes differ if scheme != bscheme and not netloc and \ scheme in uses_relative and bscheme in uses_relative and \ scheme in uses_netloc and bscheme in uses_netloc: netloc = bnetloc # Strip the port number i = find(netloc, '@') if i < 0: i = 0 i = find(netloc, ':', i) if i >= 0: netloc = netloc[:i] if scheme != bscheme or scheme not in uses_relative: return urlunparse((scheme, netloc, path, params, query, fragment)) if scheme in uses_netloc: if netloc: return urlunparse((scheme, netloc, path, params, query, fragment)) netloc = bnetloc if path[:1] == '/': return urlunparse((scheme, netloc, path, params, query, fragment)) if not path: return urlunparse((scheme, netloc, bpath, params, query or bquery, fragment)) i = rfind(bpath, '/') if i >= 0: path = bpath[:i] + '/' + path segments = splitfields(path, '/') if segments[-1] == '.': segments[-1] = '' while '.' in segments: segments.remove('.') while 1: i = 1 n = len(segments) - 1 while i < n: if segments[i] == '..' and segments[i-1]: del segments[i-1:i+1] break i = i+1 else: break if len(segments) == 2 and segments[1] == '..' and segments[0] == '': segments[-1] = '' elif len(segments) >= 2 and segments[-1] == '..': segments[-2:] = [''] return urlunparse((scheme, netloc, joinfields(segments, '/'), params, query, fragment))
e47e7c496015d6bf1f8df6187e40ee660f575844 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e47e7c496015d6bf1f8df6187e40ee660f575844/urlparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25447, 12, 1969, 16, 880, 16, 1699, 67, 29528, 273, 404, 4672, 309, 486, 1026, 30, 327, 880, 7081, 2905, 16, 324, 2758, 1829, 16, 324, 803, 16, 324, 2010, 16, 324, 2271, 16, 324, 119...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25447, 12, 1969, 16, 880, 16, 1699, 67, 29528, 273, 404, 4672, 309, 486, 1026, 30, 327, 880, 7081, 2905, 16, 324, 2758, 1829, 16, 324, 803, 16, 324, 2010, 16, 324, 2271, 16, 324, 119...
elif options.empty and stack.patches.get(patch).is_empty(): prefix = empty_prefix
elif options.empty: if stack.patches.get(patch).is_empty(): prefix = '0' + prefix else: prefix = ' ' + prefix
def __print_patch(stack, patch, branch_str, prefix, empty_prefix, length, options): """Print a patch name, description and various markers. """ if options.noprefix: prefix = '' elif options.empty and stack.patches.get(patch).is_empty(): prefix = empty_prefix patch_str = branch_str + patch if options.description or options.author: patch_str = patch_str.ljust(length) if options.description: out.stdout(prefix + patch_str + ' # ' + __get_description(stack, patch)) elif options.author: out.stdout(prefix + patch_str + ' # ' + __get_author(stack, patch)) else: out.stdout(prefix + patch_str)
2775a653b86683bf3531e9352b85309eea7432c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12366/2775a653b86683bf3531e9352b85309eea7432c1/series.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1188, 67, 2272, 12, 3772, 16, 4729, 16, 3803, 67, 701, 16, 1633, 16, 1008, 67, 3239, 16, 769, 16, 702, 4672, 3536, 5108, 279, 4729, 508, 16, 2477, 471, 11191, 11754, 18, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1188, 67, 2272, 12, 3772, 16, 4729, 16, 3803, 67, 701, 16, 1633, 16, 1008, 67, 3239, 16, 769, 16, 702, 4672, 3536, 5108, 279, 4729, 508, 16, 2477, 471, 11191, 11754, 18, 3536, ...
reflect.accumulateClassList(self.__class__, 'parameters', parameters)
def _gather_parameters(self): """Gather options which take a value. """ longOpt, shortOpt = [], '' docs, settings, synonyms, dispatch = {}, {}, {}, {}
6db8f942819c7bc0ce920361f879a1125e2a06db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6db8f942819c7bc0ce920361f879a1125e2a06db/usage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 75, 4806, 67, 3977, 12, 2890, 4672, 3536, 26092, 702, 1492, 4862, 279, 460, 18, 3536, 1525, 6179, 16, 3025, 6179, 273, 5378, 16, 875, 3270, 16, 1947, 16, 27260, 16, 3435, 273, 106...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 75, 4806, 67, 3977, 12, 2890, 4672, 3536, 26092, 702, 1492, 4862, 279, 460, 18, 3536, 1525, 6179, 16, 3025, 6179, 273, 5378, 16, 875, 3270, 16, 1947, 16, 27260, 16, 3435, 273, 106...
if self.capped == True and self.emailed == False:
if self.capped == True:
def update(self, runningmaxrate, runningmaxi2rate, usedbytes, usedi2bytes, runningshare, rspec): """ Update byte counts and check if byte thresholds have been exceeded. If exceeded, cap to remaining bytes in limit over remaining time in period. Recalculate every time module runs. """ # Query Node Manager for max rate overrides self.updateSliceAttributes(rspec)
0c9f6590a6f97823553cc557e25cd6a381cb5adb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6995/0c9f6590a6f97823553cc557e25cd6a381cb5adb/bwmon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 3549, 1896, 5141, 16, 3549, 1896, 77, 22, 5141, 16, 1399, 3890, 16, 1399, 77, 22, 3890, 16, 3549, 14419, 16, 436, 2793, 4672, 3536, 2315, 1160, 6880, 471, 866, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 3549, 1896, 5141, 16, 3549, 1896, 77, 22, 5141, 16, 1399, 3890, 16, 1399, 77, 22, 3890, 16, 3549, 14419, 16, 436, 2793, 4672, 3536, 2315, 1160, 6880, 471, 866, 309,...
variantsStr += 'if(qxvariants["%s"]==undefined)qxvariants["%s"]=%s;%s' % (variantKey, variantKey, variantValue, lineBreak)
variantsStr += 'qxvariants["%s"]=%s;%s' % (variantKey, variantValue, lineBreak)
def generate(variantsList, newLines): typeNumber = re.compile("^([0-9\-]+)$") if newLines: lineBreak = "\n" else: lineBreak = "" variantsStr = 'if(!window.qxvariants)qxvariants={};' + lineBreak for variant in variantsList: variantSplit = variant.split(":") variantKey = variantSplit.pop(0) variantValue = ":".join(variantSplit) if not (variantValue == "false" or variantValue == "true" or variantValue == "null" or typeNumber.match(variantValue)): variantValue = '"%s"' % variantValue.replace("\"", "\\\"") variantsStr += 'if(qxvariants["%s"]==undefined)qxvariants["%s"]=%s;%s' % (variantKey, variantKey, variantValue, lineBreak) return variantsStr
2cc4f7761ceb36e524446bf1af3ca1c68ca12d6d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/2cc4f7761ceb36e524446bf1af3ca1c68ca12d6d/variants.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 15886, 682, 16, 394, 5763, 4672, 618, 1854, 273, 283, 18, 11100, 2932, 66, 3816, 20, 17, 29, 12907, 7941, 8, 7923, 225, 309, 394, 5763, 30, 980, 7634, 273, 1548, 82, 6, 469...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 15886, 682, 16, 394, 5763, 4672, 618, 1854, 273, 283, 18, 11100, 2932, 66, 3816, 20, 17, 29, 12907, 7941, 8, 7923, 225, 309, 394, 5763, 30, 980, 7634, 273, 1548, 82, 6, 469...
spec = PerfectSpecializer(Loop(A.ops))
spec = PerfectSpecializer(Loop(A.inputargs, A.ops))
def test_A_intersect(): spec = PerfectSpecializer(Loop(A.ops)) spec.find_nodes() spec.intersect_input_and_output() assert isinstance(spec.specnodes[0], DelayedFixedListSpecNode)
b9f890a8e721d63e12651c6fbae7c1a5a8e0cb31 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/b9f890a8e721d63e12651c6fbae7c1a5a8e0cb31/test_list_optimize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 37, 67, 12288, 13332, 857, 273, 5722, 74, 386, 1990, 3926, 12, 6452, 12, 37, 18, 2630, 1968, 16, 432, 18, 4473, 3719, 857, 18, 4720, 67, 4690, 1435, 857, 18, 12288, 67, 263...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 37, 67, 12288, 13332, 857, 273, 5722, 74, 386, 1990, 3926, 12, 6452, 12, 37, 18, 2630, 1968, 16, 432, 18, 4473, 3719, 857, 18, 4720, 67, 4690, 1435, 857, 18, 12288, 67, 263...
if size is not None: if i==-1 and len(c) > size: i=size-1 elif size <= i: i = size -1
def readline(self, size=-1): if size < 0: size = sys.maxint bufs = [] readsize = min(100, size) # Read from the file in small chunks while True: if size == 0: return "".join(bufs) # Return resulting line
d72aab5e31f831edb2b8e837e2ab387f2db07aee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d72aab5e31f831edb2b8e837e2ab387f2db07aee/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 963, 29711, 21, 4672, 309, 963, 411, 374, 30, 963, 273, 2589, 18, 1896, 474, 1681, 87, 273, 5378, 855, 1467, 273, 1131, 12, 6625, 16, 963, 13, 565, 468, 2720, 62...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 963, 29711, 21, 4672, 309, 963, 411, 374, 30, 963, 273, 2589, 18, 1896, 474, 1681, 87, 273, 5378, 855, 1467, 273, 1131, 12, 6625, 16, 963, 13, 565, 468, 2720, 62...
if siteIsBanned: siteInTheMask = '' ind1 = tqReqs.find('other.Site ==') if ind1 != -1: ind2 = tqReqs[ind1+13:].find('other.Site ==') if ind2 == -1: siteInTheMask = tqReqs[ind1+13:].split()[0] if siteInTheMask and siteInTheMask == agentSite: pass else: return S_ERROR('Site is banned and no dedicated jobs available')
def selectJob(self, resourceJDL): """ Main job selection function to find the highest priority job matching the resource capacity """
74269a00ba9c0d024d2d7f687918a33012e56f91 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/74269a00ba9c0d024d2d7f687918a33012e56f91/MatcherHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 2278, 12, 2890, 16, 1058, 46, 8914, 4672, 3536, 12740, 1719, 4421, 445, 358, 1104, 326, 9742, 4394, 1719, 3607, 326, 1058, 7519, 3536, 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, 0, 0, 0, 0, 0, 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, 2027, 2278, 12, 2890, 16, 1058, 46, 8914, 4672, 3536, 12740, 1719, 4421, 445, 358, 1104, 326, 9742, 4394, 1719, 3607, 326, 1058, 7519, 3536, 2, -100, -100, -100, -100, -100, -100, -100, ...
err = str(err)
def stop(self): """ Stop the daemon """ # Get the pid from the pidfile try: pf = file(self.pidfile,'r') pid = int(pf.read().strip()) pf.close() except IOError: pid = None if not pid: message = "pidfile %s does not exist. Daemon not running?\n" sys.stderr.write(message % self.pidfile) return # not an error in a restart
5a536bd60aba532459557d6b292070d3061586ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6143/5a536bd60aba532459557d6b292070d3061586ad/daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 3536, 5131, 326, 8131, 3536, 468, 968, 326, 4231, 628, 326, 27656, 775, 30, 10811, 273, 585, 12, 2890, 18, 6610, 768, 11189, 86, 6134, 4231, 273, 509, 12, 14241, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 3536, 5131, 326, 8131, 3536, 468, 968, 326, 4231, 628, 326, 27656, 775, 30, 10811, 273, 585, 12, 2890, 18, 6610, 768, 11189, 86, 6134, 4231, 273, 509, 12, 14241, ...
self.load_new_image(False, False, False, True, False)
self.load_new_image2(False, False, True, False)
def parse_action_command(self, command, batchmode): self.running_custom_actions = True self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() self.curr_custom_action = 0 if batchmode == True: self.num_custom_actions = len(self.image_list) for i in range(self.num_custom_actions): self.curr_custom_action += 1 self.update_statusbar() while gtk.events_pending(): gtk.main_iteration() imagename = self.image_list[i] self.parse_action_command2(command, imagename) else: self.num_custom_actions = 1 self.curr_custom_action = 1 self.update_statusbar() while gtk.events_pending(): gtk.main_iteration() self.parse_action_command2(command, self.currimg_name) gc.collect() self.change_cursor(None) # Refresh the current image or any preloaded needed if they have changed: if os.path.exists(self.currimg_name) == False: self.currimg_pixbuf_original = None self.image_load_failed(False) else: animtest = gtk.gdk.PixbufAnimation(self.currimg_name) if animtest.is_static_image() == True: if self.images_are_different(animtest.get_static_image(), self.currimg_pixbuf_original): self.load_new_image(False, False, False, True, False) else: if self.images_are_different(animtest, self.currimg_pixbuf_original): self.load_new_image(False, False, False, True, False) self.running_custom_actions = False self.update_statusbar() while gtk.events_pending(): gtk.main_iteration() if os.path.exists(self.preloadimg_prev_name) == False: self.preloadimg_prev_pixbuf_original = None else: animtest = gtk.gdk.PixbufAnimation(self.preloadimg_prev_name) if animtest.is_static_image() == True: if self.images_are_different(animtest.get_static_image(), self.preloadimg_prev_pixbuf_original): self.preloadimg_prev_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_prev_image, False) else: if self.images_are_different(animtest, self.preloadimg_prev_pixbuf_original): self.preloadimg_prev_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_prev_image, False) if os.path.exists(self.preloadimg_next_name) == False: self.preloadimg_next_pixbuf_original = None else: animtest = gtk.gdk.PixbufAnimation(self.preloadimg_next_name) if animtest.is_static_image() == True: if self.images_are_different(animtest.get_static_image(), self.preloadimg_next_pixbuf_original): self.preloadimg_next_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_next_image, False) else: if self.images_are_different(animtest, self.preloadimg_next_pixbuf_original): self.preloadimg_next_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_next_image, False)
b2e5967bb60ec75f61407fa81eb48dca2dcd947b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/b2e5967bb60ec75f61407fa81eb48dca2dcd947b/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1128, 67, 3076, 12, 2890, 16, 1296, 16, 2581, 3188, 4672, 365, 18, 8704, 67, 3662, 67, 4905, 273, 1053, 365, 18, 3427, 67, 9216, 12, 4521, 79, 18, 75, 2883, 18, 6688, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1128, 67, 3076, 12, 2890, 16, 1296, 16, 2581, 3188, 4672, 365, 18, 8704, 67, 3662, 67, 4905, 273, 1053, 365, 18, 3427, 67, 9216, 12, 4521, 79, 18, 75, 2883, 18, 6688, 12, ...
if os.name == 'posix': features = source.get_contents().split(',')
str_val = source.get_contents() if str_val.find("'") > 0: features = eval(source.get_contents())
f.write('#ifndef RAM_CORE_FEATURES\n#define RAM_CORE_FEATURES\n\n')
77c2e42e55433bc39c3b37681abb74e6b3b6b954 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10608/77c2e42e55433bc39c3b37681abb74e6b3b6b954/features.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 284, 18, 2626, 2668, 7, 430, 82, 536, 30327, 67, 15715, 67, 18257, 55, 64, 82, 7, 11255, 30327, 67, 15715, 67, 18257, 55, 64, 82, 64, 82, 6134, 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, 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, 284, 18, 2626, 2668, 7, 430, 82, 536, 30327, 67, 15715, 67, 18257, 55, 64, 82, 7, 11255, 30327, 67, 15715, 67, 18257, 55, 64, 82, 64, 82, 6134, 2, -100, -100, -100, -100, -100, -100, -100,...
return r
def gnuplot( self, hetatm=False ): """ Get a quick & dirty overview over the content of a PDB. gnuplot simply creates a 2-D plot of all x-coordinates versus all y coordinates, colored by chain. This is obviously not publication-quality ;-). Use the Biskit.Pymoler class for real visalization. @param hetatm: include hetero atoms, usually messy, (default False) @type hetatm: bool """ from Biskit import gnuplot m = self if not hetatm: m = self.compress( N.logical_not( self.maskHetatm() ) )
def report( self ): """ Create a brief description of this model. Use:: print model.report() @return: formatted description of this model @rtype: str """ r = self.__repr__() for c in range( self.lenChains() ): r += '\n\t* chain %i: %s' % ( c, T.clipStr( self.takeChains( [c] ).sequence(), 60 ) )
d5b740df2cb217b29c2214c27dcf0eafa051b72a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/d5b740df2cb217b29c2214c27dcf0eafa051b72a/PDBModel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 365, 262, 30, 3536, 1788, 279, 324, 17802, 2477, 434, 333, 938, 18, 2672, 2866, 225, 1172, 938, 18, 6006, 1435, 225, 632, 2463, 30, 4955, 2477, 434, 333, 938, 632, 86, 723, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 365, 262, 30, 3536, 1788, 279, 324, 17802, 2477, 434, 333, 938, 18, 2672, 2866, 225, 1172, 938, 18, 6006, 1435, 225, 632, 2463, 30, 4955, 2477, 434, 333, 938, 632, 86, 723, ...
delta = 1 / float(next.samprate)
delta = 1 / float(next.samprate)
def getGapList(self, filename, time_tolerance = -1, samprate_tolerance = -1, min_gap = None, max_gap = None): """ Returns gaps, overlaps and trace header information of a given file. Each item has a starttime and a duration value to characterize the gap. The starttime is the last correct data sample. If no gaps are found it will return an empty list. @param time_tolerance: Time tolerance while reading the traces, default to -1 (1/2 sample period). @param samprate_tolerance: Sample rate tolerance while reading the traces, defaults to -1 (rate dependent). @param min_gap: Omit gaps with less than this value if not None. @param max_gap: Omit gaps with greater than this value if not None. @return: List of tuples in form of (network, station, location, channel, starttime, endtime, gap, samples) """ # read file mstg = self.readFileToTraceGroup(filename, dataflag = 0, skipnotdata = 0, timetol = time_tolerance, sampratetol = samprate_tolerance) gap_list = [] # iterate through traces cur = mstg.contents.traces.contents for _ in xrange(mstg.contents.numtraces-1): next = cur.next.contents # Skip MSTraces with 0 sample rate, usually from SOH records if cur.samprate == 0: cur = next continue # Check that sample rates match using default tolerance if not self._isRateTolerable(cur.samprate, next.samprate): msg = "%s Sample rate changed! %.10g -> %.10g\n" print msg % (cur.samprate, next.samprate) gap = (next.starttime - cur.endtime) / HPTMODULUS # Check that any overlap is not larger than the trace coverage if gap < 0: if next.samprate: delta = 1 / float(next.samprate) else: delta = 0 temp = (next.endtime - next.starttime) / HPTMODULUS + delta if (gap * -1) > temp: gap = -1 * temp # Check gap/overlap criteria if min_gap and gap < min_gap: cur = next continue if max_gap and gap > max_gap: cur = next continue # Number of missing samples nsamples = math.fabs(gap) * cur.samprate if gap > 0: nsamples-=1 else: nsamples+=1 # Convert to python datetime objects time1 = DateTime.utcfromtimestamp(cur.endtime / HPTMODULUS) time2 = DateTime.utcfromtimestamp(next.starttime / HPTMODULUS) gap_list.append((cur.network, cur.station, cur.location, cur.channel, time1, time2, gap, nsamples)) cur = next return gap_list
da81b4ce7064a28a168b56663efe435b307a52d4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/da81b4ce7064a28a168b56663efe435b307a52d4/libmseed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7162, 438, 682, 12, 2890, 16, 1544, 16, 813, 67, 25456, 273, 300, 21, 16, 16260, 683, 340, 67, 25456, 273, 300, 21, 16, 1131, 67, 14048, 273, 599, 16, 943, 67, 14048, 273, 599, 4672,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7162, 438, 682, 12, 2890, 16, 1544, 16, 813, 67, 25456, 273, 300, 21, 16, 16260, 683, 340, 67, 25456, 273, 300, 21, 16, 1131, 67, 14048, 273, 599, 16, 943, 67, 14048, 273, 599, 4672,...
elif len(cpusplit) == 8:
elif len(cpusplit) >= 8:
def collectData(self):
ca27edd93d80c05e0905a6be5028fe811d63152f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/ca27edd93d80c05e0905a6be5028fe811d63152f/system.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 751, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 751, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
elif self.current != user and self.current != None: pmusers = self.logs.keys() pmusers.sort(key=str.lower) self.mucous.DrawTabs(pmusers, self.current)
elif self.current != user and self.current != None: pmusers = self.logs.keys() pmusers.sort(key=str.lower) self.mucous.DrawTabs(pmusers, self.current)
def Recieved(self,direction, timestamp, user, message): try: ctcpversion = 0 if message == curses.ascii.ctrl("A")+"VERSION"+curses.ascii.ctrl("A"): message = "CTCP VERSION" ctcpversion = 1 if user not in self.logs.keys(): self.logs[user] = [] if self.mucous.Config["mucous"]["logging"] in ("yes"): self.ImportLogs(user) if self.mucous.Config["mucous"]["logging"] in ("yes"): if direction == 0: self.mucous.FileLog("private", time.strftime("%d %b %Y %H:%M:%S"), user, "["+user+"]\t"+ message ) elif direction == 1: self.mucous.FileLog("private", time.strftime("%d %b %Y %H:%M:%S"), user, "["+self.mucous.username+"]\t"+ message ) if self.current == None: self.current = user self.Log(direction, user, message) if ctcpversion == 1 and direction == 0: if self.mucous.Config["mucous"]["extra_requests"] == "Yes": self.Send(user, "Mucous %s" % Version) if self.mucous.mode != "private": self.mucous.Alerts.Add(user, "PRIVATE") #self.Alerts.setStatus("New PM") #if user not in self.Alerts.alert["PRIVATE"]: #self.Alerts.alert["PRIVATE"].append(user) self.mucous.HotKeyBar() self.mucous.Beep() elif self.mucous.mode == "private" and self.current != user: self.mucous.Alerts.Add(user, "PRIVATE") self.mucous.HotKeyBar() self.mucous.Beep() if self.current == None: self.current = user if self.mucous.mode == "private": self.Mode() elif self.current == user: if self.mucous.mode == "private": self.Mode() elif self.current != user and self.current != None: pmusers = self.logs.keys() pmusers.sort(key=str.lower) self.mucous.DrawTabs(pmusers, self.current) #self.mucous.Alerts.setStatus("PM: "+user) except Exception ,e: self.mucous.Help.Log("debug", "PrivateChat.Recieved: " + str(e))
26e5c555150354eaccbf13fc5b89a9ce51be55c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8737/26e5c555150354eaccbf13fc5b89a9ce51be55c9/MucousPrivateChat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7776, 1385, 2155, 12, 2890, 16, 9855, 16, 2858, 16, 729, 16, 883, 4672, 775, 30, 225, 5691, 4057, 1589, 273, 374, 309, 883, 422, 30436, 18, 9184, 18, 16277, 2932, 37, 7923, 9078, 5757,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7776, 1385, 2155, 12, 2890, 16, 9855, 16, 2858, 16, 729, 16, 883, 4672, 775, 30, 225, 5691, 4057, 1589, 273, 374, 309, 883, 422, 30436, 18, 9184, 18, 16277, 2932, 37, 7923, 9078, 5757,...
xmax,ymax=bottom_right[0] for x in xrange(xmin,xmax+1): for y in xrange(ymin,ymax+1):
xmax,ymax=bottom_right[0] for i in range((xmax-xmin+1+world_tiles)%world_tiles): x=(xmin+i)%world_tiles for j in range((ymax-ymin+1+world_tiles)%world_tiles): y=(ymin+j)%world_tiles
def run(self,w): if self.processing: return try: lat0=float(self.e_lat0.get_text()) lon0=float(self.e_lon0.get_text()) kmx=float(self.e_kmx.get_text()) kmy=float(self.e_kmy.get_text()) zoom0=self.s_zoom0.get_value_as_int() zoom1=self.s_zoom1.get_value_as_int() layer=self.layer except ValueError: d=gtk.MessageDialog(self,gtk.DIALOG_MODAL,gtk.MESSAGE_ERROR,gtk.BUTTONS_CLOSE, "Some field contain non-numbers") d.run() d.destroy() self.b_cancel.set_sensitive(True) self.b_download.set_sensitive(False) print ("lat0=%g lon0=%g kmx=%g kmy=%g zoom0=%d zoom1=%d layer=%d" % (lat0, lon0, kmx, kmy, zoom0, zoom1, layer)) dlon=kmx*180/math.pi/(mapUtils.R_EARTH*math.cos(lat0*math.pi/180)) dlat=kmy*180/math.pi/mapUtils.R_EARTH todo=[] if zoom0>zoom1: zoom0,zoom1=zoom1,zoom0 for zoom in xrange(zoom1,zoom0-1,-1): top_left = mapUtils.coord_to_tile((lat0+dlat/2., lon0-dlon/2., zoom)) bottom_right = mapUtils.coord_to_tile((lat0-dlat/2., lon0+dlon/2., zoom)) xmin,ymin=top_left[0] xmax,ymax=bottom_right[0] for x in xrange(xmin,xmax+1): for y in xrange(ymin,ymax+1): todo.append((x,y,zoom)) self.gmap=googleMaps.GoogleMaps(layer=layer) # creating our own gmap self.processing=True self.thr=threading.Thread(target=self.run_thread, args=(todo,)) self.thr.start()
99b94c67debb7c20e10705bf7d4e7e0a9e0c4e13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5373/99b94c67debb7c20e10705bf7d4e7e0a9e0c4e13/maps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 91, 4672, 309, 365, 18, 10632, 30, 327, 775, 30, 2516, 20, 33, 5659, 12, 2890, 18, 73, 67, 4801, 20, 18, 588, 67, 955, 10756, 4281, 20, 33, 5659, 12, 2890, 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, 1086, 12, 2890, 16, 91, 4672, 309, 365, 18, 10632, 30, 327, 775, 30, 2516, 20, 33, 5659, 12, 2890, 18, 73, 67, 4801, 20, 18, 588, 67, 955, 10756, 4281, 20, 33, 5659, 12, 2890, 18, ...
self.diseqc = Diseqc(self.feid)
self.diseqc = Diseqc(self.frontend)
def __init__(self, session, feid): self.skin = PositionerSetup.skin Screen.__init__(self, session) self.feid = feid self.oldref = None if not self.openFrontend(): self.oldref = session.nav.getCurrentlyPlayingServiceReference() session.nav.stopService() # try to disable foreground service if not self.openFrontend(): if session.pipshown: # try to disable pip session.pipshown = False del session.pip if not self.openFrontend(): self.frontend = None # in normal case this should not happen self.getFrontend = None self.diseqc = Diseqc(self.feid) self.tuner = Tuner(self.frontend) self.tuner.tune((0,0,0,0,0,0)) self.createConfig() self.isMoving = False self.stopOnLock = False self.red = Label("") self["red"] = self.red self.green = Label("") self["green"] = self.green self.yellow = Label("") self["yellow"] = self.yellow self.blue = Label("") self["blue"] = self.blue self.list = [] self["list"] = ConfigList(self.list) self.createSetup() self["snr"] = Label() self["agc"] = Label() self["ber"] = Label() self["lock"] = Label() self["snr_percentage"] = TunerInfo(TunerInfo.SNR_PERCENTAGE, frontendfkt = self.getFrontend) self["agc_percentage"] = TunerInfo(TunerInfo.AGC_PERCENTAGE, frontendfkt = self.getFrontend) self["ber_value"] = TunerInfo(TunerInfo.BER_VALUE, frontendfkt = self.getFrontend) self["snr_bar"] = TunerInfo(TunerInfo.SNR_BAR, frontendfkt = self.getFrontend) self["agc_bar"] = TunerInfo(TunerInfo.AGC_BAR, frontendfkt = self.getFrontend) self["ber_bar"] = TunerInfo(TunerInfo.BER_BAR, frontendfkt = self.getFrontend) self["lock_state"] = TunerInfo(TunerInfo.LOCK_STATE, frontendfkt = self.getFrontend)
c35d7a70bffec606d65d17e5563c03f5f8dee7ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/c35d7a70bffec606d65d17e5563c03f5f8dee7ad/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 1656, 350, 4672, 365, 18, 7771, 267, 273, 11010, 264, 7365, 18, 7771, 267, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 365, 18, 3030, 350,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 1656, 350, 4672, 365, 18, 7771, 267, 273, 11010, 264, 7365, 18, 7771, 267, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 365, 18, 3030, 350,...
h.putheader('Host', host)
scheme, sel = splittype(req.get_selector()) sel_host, sel_path = splithost(sel) h.putheader('Host', sel_host or host)
def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given')
d1690a106e77ea2febb1b807a25311393939692d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d1690a106e77ea2febb1b807a25311393939692d/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3190, 12, 2890, 16, 1062, 67, 1106, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 309, 486, 1479, 30, 1002, 1976, 668, 2668, 2135, 1479, 864, 6134, 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, 741, 67, 3190, 12, 2890, 16, 1062, 67, 1106, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 309, 486, 1479, 30, 1002, 1976, 668, 2668, 2135, 1479, 864, 6134, 2, -100, -100, ...
self.daylightEnd, self.daylightStart = winTZI[3:11], winTZI[11:19] self._LoadDynamicInfoFromKey( key ) def _LoadDynamicInfoFromKey( self, key ): try: dkey = _winreg.OpenKeyEx( key, 'Dynamic DST' ) except WindowsError: return self.dynamicInfo = _RegKeyDict( dkey ) del self.dynamicInfo['FirstEntry'] del self.dynamicInfo['LastEntry'] def __repr__( self ): result = '%s( %s' % ( self.__class__.__name__, repr( self.timeZoneName ) ) if self.fixedStandardTime: result += ', True' result += ' )' return result def __str__( self ): return self.displayName def tzname( self, dt ): if self.dst( dt ) == self.daylightBiasOffset: result = self.daylightName elif self.dst( dt ) == self.standardBiasOffset: result = self.standardName return result def _getStandardBias( self ): return self.bias + self.standardBiasOffset standardBias = property( _getStandardBias ) def _getDaylightBias( self ): return self.bias + self.daylightBiasOffset daylightBias = property( _getDaylightBias ) def utcoffset( self, dt ): "Calculates the utcoffset according to the datetime.tzinfo spec" if dt is None: return return -( self.bias + self.dst( dt ) ) def dst( self, dt ): "Calculates the daylight savings offset according to the datetime.tzinfo spec" if dt is None: return assert dt.tzinfo is self result = self.standardBiasOffset try: dstStart = self.GetDSTStartTime( dt.year ) dstEnd = self.GetDSTEndTime( dt.year ) if dstStart < dstEnd: inDaylightSavings = dstStart <= dt.replace( tzinfo=None ) < dstEnd else: inDaylightSavings = not ( dstEnd < dt.replace( tzinfo=None ) <= dstStart ) if inDaylightSavings and not self.fixedStandardTime: result = self.daylightBiasOffset except ValueError: pass return result def GetDSTStartTime( self, year ): "Given a year, determines the time when daylight savings time starts"
self.daylightEnd, self.daylightStart = components[3:11], components[11:19] def LocateStartDay( self, year ):
def _LoadInfoFromKey( self, key ): """Loads the information from an opened time zone registry key into relevant fields of this TZI object""" self.displayName = _winreg.QueryValueEx( key, "Display" )[0] self.standardName = _winreg.QueryValueEx( key, "Std" )[0] self.daylightName = _winreg.QueryValueEx( key, "Dlt" )[0] # TZI contains a structure of time zone information and is similar to # TIME_ZONE_INFORMATION described in the Windows Platform SDK winTZI, type = _winreg.QueryValueEx( key, "TZI" ) winTZI = struct.unpack( '3l8h8h', winTZI ) makeMinuteTimeDelta = lambda x: datetime.timedelta( minutes = x ) self.bias, self.standardBiasOffset, self.daylightBiasOffset = \ map( makeMinuteTimeDelta, winTZI[:3] ) # daylightEnd and daylightStart are 8-tuples representing a Win32 SYSTEMTIME structure self.daylightEnd, self.daylightStart = winTZI[3:11], winTZI[11:19] self._LoadDynamicInfoFromKey( key )
f065de2359741f6332289ad3f60b2977f2376ee9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/677/f065de2359741f6332289ad3f60b2977f2376ee9/win32timezone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2563, 966, 1265, 653, 12, 365, 16, 498, 262, 30, 3536, 7968, 326, 1779, 628, 392, 10191, 813, 4157, 4023, 498, 1368, 9368, 1466, 434, 333, 399, 62, 45, 733, 8395, 365, 18, 5417, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2563, 966, 1265, 653, 12, 365, 16, 498, 262, 30, 3536, 7968, 326, 1779, 628, 392, 10191, 813, 4157, 4023, 498, 1368, 9368, 1466, 434, 333, 399, 62, 45, 733, 8395, 365, 18, 5417, ...
failed[lfn] = "TransformationDB.getReplicas: File not found."
successful[lfn] = {}
def getReplicas(self,lfns,getAll=False): """ Get replicas for the files specified by the lfn list """ gLogger.info("TransformationDB.getReplicas: Attempting to get replicas for %s files." % len(lfns)) fileIDs = self.__getFileIDsForLfns(lfns) failed = {} successful = {} for lfn in lfns: if not lfn in fileIDs.values(): failed[lfn] = "TransformationDB.getReplicas: File not found." if len(fileIDs.keys()) > 0: req = "SELECT FileID,SE,PFN,Status FROM Replicas WHERE FileID IN (%s);" % intListToString(fileIDs.keys()) res = self._query(req) if not res['OK']: return res for fileID,se,pfn,status in res['Value']: takeReplica = True if status != "AprioriGood": if not getAll: takeReplica = False if takeReplica: lfn = fileIDs[fileID] if not successful.has_key(lfn): successful[lfn] = {} successful[lfn][se] = pfn for lfn in fileIDs.values(): if not successful.has_key(lfn): successful[lfn] = {} #"TransformationDB.getReplicas: No replicas found." resDict = {'Successful':successful,'Failed':failed} return S_OK(resDict)
dfb2b09488faa2cbb0d35ddc742459415fe06c71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/dfb2b09488faa2cbb0d35ddc742459415fe06c71/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 10528, 12, 2890, 16, 20850, 2387, 16, 588, 1595, 33, 8381, 4672, 3536, 968, 21545, 364, 326, 1390, 1269, 635, 326, 328, 4293, 666, 3536, 314, 3328, 18, 1376, 2932, 15292, 2290, 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, 5561, 10528, 12, 2890, 16, 20850, 2387, 16, 588, 1595, 33, 8381, 4672, 3536, 968, 21545, 364, 326, 1390, 1269, 635, 326, 328, 4293, 666, 3536, 314, 3328, 18, 1376, 2932, 15292, 2290, 18,...
c2pread, c2pwrite = CreatePipe(None, 0)
c2pread, c2pwrite = _subprocess.CreatePipe(None, 0)
def _get_handles(self, stdin, stdout, stderr): """Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ if stdin is None and stdout is None and stderr is None: return (None, None, None, None, None, None)
958deca641a868ca98342972b095b9029eaf8c72 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/958deca641a868ca98342972b095b9029eaf8c72/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 24111, 12, 2890, 16, 8801, 16, 3909, 16, 4514, 4672, 3536, 7249, 471, 327, 3193, 598, 1665, 2184, 30, 293, 22, 71, 896, 16, 293, 22, 71, 2626, 16, 276, 22, 84, 896, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 24111, 12, 2890, 16, 8801, 16, 3909, 16, 4514, 4672, 3536, 7249, 471, 327, 3193, 598, 1665, 2184, 30, 293, 22, 71, 896, 16, 293, 22, 71, 2626, 16, 276, 22, 84, 896, 1...
print(" Quelle: "+srcendpoint[0][0]+"/"+str(srcendpoint[0][1])+":"+srcendpoint[1]) srcfilter = filter2where("src", srcendpoint[0][0], srcendpoint[0][1], srcendpoint[1])
print(" Quelle: "+srcendpoint[0][0]+"/"+srcendpoint[0][1]+":"+srcendpoint[1]) srcfilter = filter2where("src", srcendpoint[0][0], string.atoi(srcendpoint[0][1]), srcendpoint[1])
def printresult(result, colnames, ipcols): rowstr = "" for col in colnames: rowstr += col + "\t" print(rowstr) for row in result: rowstr = "" i = 0 for col in row: if i in ipcols: rowstr += int2ip(col) + "\t" else: rowstr += str(col) + "\t" i += 1 print rowstr
36da5ebce86e3ad89a7e51790f261c3c224af8d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2286/36da5ebce86e3ad89a7e51790f261c3c224af8d8/inspect-anomaly.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 2088, 12, 2088, 16, 645, 1973, 16, 2359, 6842, 4672, 1027, 701, 273, 1408, 364, 645, 316, 645, 1973, 30, 1027, 701, 1011, 645, 397, 1548, 88, 6, 1172, 12, 492, 701, 13, 364, 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, 1172, 2088, 12, 2088, 16, 645, 1973, 16, 2359, 6842, 4672, 1027, 701, 273, 1408, 364, 645, 316, 645, 1973, 30, 1027, 701, 1011, 645, 397, 1548, 88, 6, 1172, 12, 492, 701, 13, 364, 10...
addr += 8
def __init__(self, parent, name, max_size=None, description=None): Field.__init__(self, parent, name, size=8, description=description) value = 0 addr = self.absolute_address mask = 0x80 firstByte = parent.stream.readBits(addr, 8, LITTLE_ENDIAN) for i in xrange(8): if not (firstByte & mask): value += ((firstByte & (mask-1)) << (8*i)) break value |= parent.stream.readBits(addr, 8, LITTLE_ENDIAN) << (8*i) mask >>= 1 self._size += 8 addr += 8 self.createValue = lambda: value
b4c2f8e4923f171866d7b1e3baacbcfb958f1557 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/b4c2f8e4923f171866d7b1e3baacbcfb958f1557/sevenzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 943, 67, 1467, 33, 7036, 16, 2477, 33, 7036, 4672, 2286, 16186, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 963, 33, 28, 16, 2477, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 943, 67, 1467, 33, 7036, 16, 2477, 33, 7036, 4672, 2286, 16186, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 963, 33, 28, 16, 2477, 3...
define_macros = [("NTL_ALL",None)]),
define_macros = [("NTL_ALL",None)], depends = [ SAGE_INC + "eclib/" + h for h in ["interface.h","bigrat.h","rat.h","curve.h", "moddata.h","symb.h","cusp.h","homspace.h","mat.h"] ]),
def uname_specific(name, value, alternative): if name in os.uname()[0]: return value else: return alternative
970aa08d4456e1607da4c3f1d5fd3f359c3811e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/970aa08d4456e1607da4c3f1d5fd3f359c3811e9/module_list.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31444, 67, 12524, 12, 529, 16, 460, 16, 10355, 4672, 309, 508, 316, 1140, 18, 318, 339, 1435, 63, 20, 14542, 327, 460, 469, 30, 327, 10355, 225, 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, 31444, 67, 12524, 12, 529, 16, 460, 16, 10355, 4672, 309, 508, 316, 1140, 18, 318, 339, 1435, 63, 20, 14542, 327, 460, 469, 30, 327, 10355, 225, 2, -100, -100, -100, -100, -100, -100, ...
s = "Module(%r" % % (self.__name__,)
s = "Module(%r" % (self.__name__,)
def __repr__(self): s = "Module(%r" % % (self.__name__,) if self.__file__ is not None: s = s + ", %r" % (self.__file__,) if self.__path__ is not None: s = s + ", %r" % (self.__path__,) s = s + ")" return s
5f26424897c18812de66993c748b6c3c7c63aea5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/5f26424897c18812de66993c748b6c3c7c63aea5/modulefinder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 272, 273, 315, 3120, 9275, 86, 6, 738, 261, 2890, 16186, 529, 972, 16, 13, 309, 365, 16186, 768, 972, 353, 486, 599, 30, 272, 273, 272, 397, 3104, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 272, 273, 315, 3120, 9275, 86, 6, 738, 261, 2890, 16186, 529, 972, 16, 13, 309, 365, 16186, 768, 972, 353, 486, 599, 30, 272, 273, 272, 397, 3104, 7...
subject = prefix_re.sub('', subject)
prefixes = [] match = prefix_re.match(subject) while match: prefix_str = match.group(1) prefixes += [ p for p in split_prefixes(prefix_str) \ if p.lower() not in drop_prefixes] subject = match.group(2) match = prefix_re.match(subject)
def clean_subject(subject): subject = re_re.sub(' ', subject) subject = prefix_re.sub('', subject) subject = whitespace_re.sub(' ', subject) return subject.strip()
96467db48884d72bc04fc23c8f957190fa004779 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7754/96467db48884d72bc04fc23c8f957190fa004779/parsemail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 7857, 12, 7857, 4672, 3221, 273, 283, 67, 266, 18, 1717, 2668, 2265, 3221, 13, 225, 9419, 273, 5378, 225, 845, 273, 1633, 67, 266, 18, 1916, 12, 7857, 13, 225, 1323, 845, 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, 2721, 67, 7857, 12, 7857, 4672, 3221, 273, 283, 67, 266, 18, 1717, 2668, 2265, 3221, 13, 225, 9419, 273, 5378, 225, 845, 273, 1633, 67, 266, 18, 1916, 12, 7857, 13, 225, 1323, 845, 3...
objectNumber=str(objectsList.index(source))
objectNumber=str(sources.index(source))
def GenerateNetworkOSCReceiver(filename): liblos="" connections="" printers="" argumentNumbers=3 xPosition=50 yPosition=150 path="/SpatDIF/sources/%(objectNumber)s/xyz/location" port=7000
deb14107a583f046c0d70d47e8c05a2bc6aa51de /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1456/deb14107a583f046c0d70d47e8c05a2bc6aa51de/network_scene_exporter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 3906, 51, 2312, 12952, 12, 3459, 4672, 2561, 383, 87, 1546, 6, 5921, 1546, 6, 12539, 87, 1546, 6, 1237, 10072, 33, 23, 619, 2555, 33, 3361, 677, 2555, 33, 23014, 589, 1546, 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, 6654, 3906, 51, 2312, 12952, 12, 3459, 4672, 2561, 383, 87, 1546, 6, 5921, 1546, 6, 12539, 87, 1546, 6, 1237, 10072, 33, 23, 619, 2555, 33, 3361, 677, 2555, 33, 23014, 589, 1546, 19, ...
queue1.put(('startobsblock',) + tuple(args))
queue1.put(args)
def startobsblock(self, args): _logger.info('Received start observing block command') queue1.put(('startobsblock',) + tuple(args))
f0f56d534c156a20f445d9e93a14f6d83f1abb02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3469/f0f56d534c156a20f445d9e93a14f6d83f1abb02/dbengine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 10992, 2629, 12, 2890, 16, 833, 4672, 389, 4901, 18, 1376, 2668, 8872, 787, 8681, 310, 1203, 1296, 6134, 2389, 21, 18, 458, 12, 2668, 1937, 10992, 2629, 2187, 13, 397, 3193, 12, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 10992, 2629, 12, 2890, 16, 833, 4672, 389, 4901, 18, 1376, 2668, 8872, 787, 8681, 310, 1203, 1296, 6134, 2389, 21, 18, 458, 12, 2668, 1937, 10992, 2629, 2187, 13, 397, 3193, 12, 1...
order=None, desc=0, group=None, groupdesc=0, verbose=0):
order=None, desc=0, group=None, groupdesc=0, verbose=0, limit=None):
def __init__(self, env, report=None, constraints=None, cols=None, order=None, desc=0, group=None, groupdesc=0, verbose=0): self.env = env self.id = report # if not None, it's the corresponding saved query self.constraints = constraints or {} self.order = order self.desc = desc self.group = group self.groupdesc = groupdesc self.verbose = verbose self.fields = TicketSystem(self.env).get_ticket_fields() field_names = [f['name'] for f in self.fields] self.explicit_cols = [c for c in cols or [] if c in field_names] self.cols = [] # lazily initialized
72c5aaa52df5ecddc316fe06a47e5348ca08a59a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/72c5aaa52df5ecddc316fe06a47e5348ca08a59a/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1550, 16, 2605, 33, 7036, 16, 6237, 33, 7036, 16, 5347, 33, 7036, 16, 1353, 33, 7036, 16, 3044, 33, 20, 16, 1041, 33, 7036, 16, 1041, 5569, 33, 20, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1550, 16, 2605, 33, 7036, 16, 6237, 33, 7036, 16, 5347, 33, 7036, 16, 1353, 33, 7036, 16, 3044, 33, 20, 16, 1041, 33, 7036, 16, 1041, 5569, 33, 20, 1...
pass ColorSorter.finish() return
ColorSorter.finish() return
# global dispdef change (in GLPane.setDisplay).]
3971a34cb2c9397758adb6806cf46511169c7807 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/3971a34cb2c9397758adb6806cf46511169c7807/chunk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 225, 2552, 16232, 536, 2549, 261, 267, 10252, 8485, 18, 542, 4236, 2934, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 225, 2552, 16232, 536, 2549, 261, 267, 10252, 8485, 18, 542, 4236, 2934, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"armeb" : arch_armeb, "armv5b" : arch_armv5b
"armeb" : arch_armeb
def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi"
fe19908781c7739d7cbf2a94ca1094c5ce059425 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7327/fe19908781c7739d7cbf2a94ca1094c5ce059425/arm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 81, 1900, 705, 4672, 5210, 67, 297, 3501, 70, 16186, 2738, 972, 12, 2890, 16, 81, 1900, 705, 13, 365, 18, 4272, 9614, 8955, 6552, 55, 6, 3737, 1546, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 81, 1900, 705, 4672, 5210, 67, 297, 3501, 70, 16186, 2738, 972, 12, 2890, 16, 81, 1900, 705, 13, 365, 18, 4272, 9614, 8955, 6552, 55, 6, 3737, 1546, 30...
signal.signal(signal.SIGABRT, handler) signal.signal(signal.SIGFPE, handler) signal.signal(signal.SIGILL, handler) signal.signal(signal.SIGINT, handler) signal.signal(signal.SIGSEGV, handler) signal.signal(signal.SIGTERM, handler)
for sig in (signal.SIGABRT, signal.SIGBREAK, signal.SIGFPE, signal.SIGILL, signal.SIGINT, signal.SIGSEGV, signal.SIGTERM): signal.signal(sig, signal.signal(sig, handler))
def test_issue9324(self): handler = lambda x, y: None signal.signal(signal.SIGABRT, handler) signal.signal(signal.SIGFPE, handler) signal.signal(signal.SIGILL, handler) signal.signal(signal.SIGINT, handler) signal.signal(signal.SIGSEGV, handler) signal.signal(signal.SIGTERM, handler)
6a383ba7725e09cf7b14b8856203bef5b4d88e70 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/6a383ba7725e09cf7b14b8856203bef5b4d88e70/test_signal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13882, 29, 1578, 24, 12, 2890, 4672, 1838, 273, 3195, 619, 16, 677, 30, 599, 4277, 18, 10420, 12, 10420, 18, 18513, 2090, 12185, 16, 1838, 13, 4277, 18, 10420, 12, 10420, 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, 67, 13882, 29, 1578, 24, 12, 2890, 4672, 1838, 273, 3195, 619, 16, 677, 30, 599, 4277, 18, 10420, 12, 10420, 18, 18513, 2090, 12185, 16, 1838, 13, 4277, 18, 10420, 12, 10420, 18,...
output of the second cell were retained.
output of the second cell were retained. WARNING: Backspace on the first cell if empty deletes it.
def notebook_lib(): s= r"""
6b8c776c30d1dfcc7190fa202836f4d39c6e34c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/6b8c776c30d1dfcc7190fa202836f4d39c6e34c6/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
except BaseException, le:
except Exception, le:
def _setup(test_suite): setup(name=PKG, version=verstr, description='Python wrappers for the Crypto++ library', long_description='RSA-PSS-SHA256 signatures, ECDSA(1363)/EMSA1(SHA-256) signatures, SHA-256 hashes, and AES-CTR encryption', author='Zooko O\'Whielacronx', author_email='zooko@zooko.com', url='http://allmydata.org/trac/' + PKG, license='GNU GPL', packages=find_packages(), include_package_data=True, data_files=data_files, setup_requires=setup_requires, install_requires=install_requires, dependency_links=dependency_links, classifiers=trove_classifiers, ext_modules=ext_modules, test_suite=test_suite, zip_safe=False, # I prefer unzipped for easier access. )
2fc47aaded025685ac8f495e4d2a8824fd1b48fd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11791/2fc47aaded025685ac8f495e4d2a8824fd1b48fd/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 12, 3813, 67, 30676, 4672, 3875, 12, 529, 33, 8784, 43, 16, 1177, 33, 2496, 313, 16, 2477, 2218, 15774, 21589, 364, 326, 15629, 9904, 5313, 2187, 1525, 67, 3384, 2218, 15248, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8401, 12, 3813, 67, 30676, 4672, 3875, 12, 529, 33, 8784, 43, 16, 1177, 33, 2496, 313, 16, 2477, 2218, 15774, 21589, 364, 326, 15629, 9904, 5313, 2187, 1525, 67, 3384, 2218, 15248, ...
"""<html xmlns="http://www.w3.org/1999/xhtml"> <head><title>XLINK</title></head> <body> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"> <defs xmlns:l="http://www.w3.org/1999/xlink"> <radialGradient id="s1" fx=".4" fy=".2" r=".7"> <stop stop-color=" <stop stop-color=" </radialGradient> <radialGradient id="s2" fx=".8" fy=".5" l:href=" <radialGradient id="s3" fx=".5" fy=".9" l:href=" <radialGradient id="s4" fx=".1" fy=".5" l:href=" </defs> <g stroke=" <path d="M73,29c-37-40-62-24-52,4l6-7c-8-16,7-26,42,9z" fill="url( <path d="M47,8c33-16,48,21,9,47l-6-5c38-27,20-44,5-37z" fill="url( <path d="M77,32c22,30,10,57-39,51l-1-8c3,3,67,5,36-36z" fill="url(
'<html xmlns="http://www.w3.org/1999/xhtml">' + '<head><title>XLINK</title></head>' + '<body>' + '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">' + '<defs xmlns:l="http://www.w3.org/1999/xlink">' + '<radialGradient id="s1" fx=".4" fy=".2" r=".7">' + '<stop stop-color=" '<stop stop-color=" '</radialGradient>' + '<radialGradient id="s2" fx=".8" fy=".5" l:href=" '<radialGradient id="s3" fx=".5" fy=".9" l:href=" '<radialGradient id="s4" fx=".1" fy=".5" l:href=" '</defs>' + '<g stroke=" '<path d="M73,29c-37-40-62-24-52,4l6-7c-8-16,7-26,42,9z" fill="url( '<path d="M47,8c33-16,48,21,9,47l-6-5c38-27,20-44,5-37z" fill="url( '<path d="M77,32c22,30,10,57-39,51l-1-8c3,3,67,5,36-36z" fill="url(
def test_ns(self): self.saxdiff(
feb3f51740d9bcf654526bbeec9633018d9a13a2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9368/feb3f51740d9bcf654526bbeec9633018d9a13a2/test_sax.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2387, 12, 2890, 4672, 365, 18, 87, 651, 5413, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2387, 12, 2890, 4672, 365, 18, 87, 651, 5413, 12, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
sage: c.contains(c.lattice().dual()(1,0))
sage: c.contains(c.dual_lattice()(1,0))
def contains(self, *args): r""" Check if a given point is contained in ``self``.
cd46023bf461985a0cb2a78bcb8518b0aca3a446 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/cd46023bf461985a0cb2a78bcb8518b0aca3a446/cone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1914, 12, 2890, 16, 380, 1968, 4672, 436, 8395, 2073, 309, 279, 864, 1634, 353, 7542, 316, 12176, 2890, 68, 8338, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1914, 12, 2890, 16, 380, 1968, 4672, 436, 8395, 2073, 309, 279, 864, 1634, 353, 7542, 316, 12176, 2890, 68, 8338, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return self.parser.get(section, name)
return self.parser.get(section, option)
def get(self, section, name, default=None): """Get the value of a option.
87f41b8778adea6ff296608ee62d0ab5f3a24bb5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/87f41b8778adea6ff296608ee62d0ab5f3a24bb5/test_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 2442, 16, 508, 16, 805, 33, 7036, 4672, 3536, 967, 326, 460, 434, 279, 1456, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 2442, 16, 508, 16, 805, 33, 7036, 4672, 3536, 967, 326, 460, 434, 279, 1456, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
skeleton = self.get_skeleton(title) file = StringIO() file.write(skeleton) file.seek(0) self.load_state_from_file(file)
skeleton = self.get_skeleton() self.load_state_from_string(skeleton)
def new(self, title=''): # XXX Old style (like in the "get_skeleton" times) skeleton = self.get_skeleton(title) file = StringIO() file.write(skeleton) file.seek(0) self.load_state_from_file(file)
ff7fd91e1eda69047b7e2b74befb0cae69793b1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/ff7fd91e1eda69047b7e2b74befb0cae69793b1c/PO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 12, 2890, 16, 2077, 2218, 11, 4672, 468, 11329, 18613, 2154, 261, 5625, 316, 326, 315, 588, 67, 7771, 12143, 6, 4124, 13, 17761, 273, 365, 18, 588, 67, 7771, 12143, 12, 2649, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 12, 2890, 16, 2077, 2218, 11, 4672, 468, 11329, 18613, 2154, 261, 5625, 316, 326, 315, 588, 67, 7771, 12143, 6, 4124, 13, 17761, 273, 365, 18, 588, 67, 7771, 12143, 12, 2649, 13, ...
url='http://foo/?q=%s')
url='http://localhost/?q=%s')
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, ...
from release_config import releaseConfig
def verify_options(cmd_options, config): """Check release_configs against command-line opts""" success = True if cmd_options.branch != config['sourceRepoName']: log.error("branch passed in does not match release_configs") success = False if cmd_options.version != config['version']: log.error("version passed in does not match release_configs") success = False if int(cmd_options.buildNumber) != int(config['buildNumber']): log.error("buildNumber passed in does not match release_configs") success = False return success
7323f383ed14885ae5c58692ab3896ca5449179a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/7323f383ed14885ae5c58692ab3896ca5449179a/release_sanity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 2116, 12, 4172, 67, 2116, 16, 642, 4672, 3536, 1564, 3992, 67, 10955, 5314, 1296, 17, 1369, 1500, 8395, 2216, 273, 1053, 309, 1797, 67, 2116, 18, 7500, 480, 642, 3292, 3168, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 2116, 12, 4172, 67, 2116, 16, 642, 4672, 3536, 1564, 3992, 67, 10955, 5314, 1296, 17, 1369, 1500, 8395, 2216, 273, 1053, 309, 1797, 67, 2116, 18, 7500, 480, 642, 3292, 3168, ...
fix_makefile(makefile, m32) makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile)
rc = os.system(r"ml64 -c -Foms\uptable.obj ms\uptable.asm") if rc: print("ml64 assembler has failed.") sys.exit(rc) shutil.copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h") shutil.copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h") makeCommand = "nmake /nologo -f \"%s\"" % makefile
def main(): build_all = "-a" in sys.argv if sys.argv[1] == "Release": debug = False elif sys.argv[1] == "Debug": debug = True else: raise ValueError(str(sys.argv)) if sys.argv[2] == "Win32": arch = "x86" configure = "VC-WIN32" do_script = "ms\\do_nasm" makefile="ms\\nt.mak" m32 = makefile elif sys.argv[2] == "x64": arch="amd64" configure = "VC-WIN64A" do_script = "ms\\do_win64a" makefile = "ms\\nt64.mak" m32 = makefile.replace('64', '') #os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON" else: raise ValueError(str(sys.argv)) make_flags = "" if build_all: make_flags = "-a" # perl should be on the path, but we also look in "\perl" and "c:\\perl" # as "well known" locations perls = find_all_on_path("perl.exe", ["\\perl\\bin", "C:\\perl\\bin"]) perl = find_working_perl(perls) if perl is None: sys.exit(1) print("Found a working perl at '%s'" % (perl,)) sys.stdout.flush() # Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live. ssl_dir = find_best_ssl_dir(("..\\..",)) if ssl_dir is None: sys.exit(1) old_cd = os.getcwd() try: os.chdir(ssl_dir) # rebuild makefile when we do the role over from 32 to 64 build if arch == "amd64" and os.path.isfile(m32) and not os.path.isfile(makefile): os.unlink(m32) # If the ssl makefiles do not exist, we invoke Perl to generate them. # Due to a bug in this script, the makefile sometimes ended up empty # Force a regeneration if it is. if not os.path.isfile(makefile) or os.path.getsize(makefile)==0: print("Creating the makefiles...") sys.stdout.flush() # Put our working Perl at the front of our path os.environ["PATH"] = os.path.dirname(perl) + \ os.pathsep + \ os.environ["PATH"] run_configure(configure, do_script) if arch=="x86" and debug: # the do_masm script in openssl doesn't generate a debug # build makefile so we generate it here: os.system("perl util\mk1mf.pl debug "+configure+" >"+makefile) if arch == "amd64": fix_makefile(makefile, m32) # Now run make. makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile) print("Executing ssl makefiles:", makeCommand) sys.stdout.flush() rc = os.system(makeCommand) if rc: print("Executing "+makefile+" failed") print(rc) sys.exit(rc) finally: os.chdir(old_cd) sys.exit(rc)
64769907bf2b42428cf366b627a194db211a2c15 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/64769907bf2b42428cf366b627a194db211a2c15/build_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1361, 67, 454, 273, 3701, 69, 6, 316, 2589, 18, 19485, 309, 2589, 18, 19485, 63, 21, 65, 422, 315, 7391, 6877, 1198, 273, 1083, 1327, 2589, 18, 19485, 63, 21, 65, 422, 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, 2774, 13332, 1361, 67, 454, 273, 3701, 69, 6, 316, 2589, 18, 19485, 309, 2589, 18, 19485, 63, 21, 65, 422, 315, 7391, 6877, 1198, 273, 1083, 1327, 2589, 18, 19485, 63, 21, 65, 422, 3...
for ind in indices:
for ind in self.cvIndices:
def _Evaluate(self, attrs): newFeature, quality = FeatureByCartesianProduct(self.data, attrs) retVal = -1 if self.qualityMeasure in [CHI_SQUARE, CRAMERS_PHI]: aprioriSum = sum(self.aprioriDistribution) retVal = 0.0
eb316246e2bfc8bb37046dcac9d47deffa628900 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/eb316246e2bfc8bb37046dcac9d47deffa628900/orngMosaic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15369, 12, 2890, 16, 3422, 4672, 394, 4595, 16, 9312, 273, 7881, 858, 13006, 13404, 4133, 12, 2890, 18, 892, 16, 3422, 13, 225, 12197, 273, 300, 21, 309, 365, 18, 16495, 7197, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15369, 12, 2890, 16, 3422, 4672, 394, 4595, 16, 9312, 273, 7881, 858, 13006, 13404, 4133, 12, 2890, 18, 892, 16, 3422, 13, 225, 12197, 273, 300, 21, 309, 365, 18, 16495, 7197, 316...
if rangeType == int:
if rangeType is int:
def _getRange (self, range): # Private method. selectRange and unSelectRange only accepts # ranges of an int or a tuple of length 2 of int. rangeType = type (range) assert (rangeType == int or (rangeType == tuple and len (range) == 2))
9de7e84158c62cf2c1708a7297e7e7a8afe5e2fa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/9de7e84158c62cf2c1708a7297e7e7a8afe5e2fa/RangeSet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 2655, 261, 2890, 16, 1048, 4672, 468, 8726, 707, 18, 2027, 2655, 471, 640, 3391, 2655, 1338, 8104, 468, 7322, 434, 392, 509, 578, 279, 3193, 434, 769, 576, 434, 509, 18, 1048...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2655, 261, 2890, 16, 1048, 4672, 468, 8726, 707, 18, 2027, 2655, 471, 640, 3391, 2655, 1338, 8104, 468, 7322, 434, 392, 509, 578, 279, 3193, 434, 769, 576, 434, 509, 18, 1048...
analisys.dependencies.append((":".join((dep_path, tpl[0])), tpl[1], "DEPENDENCY"))
analysis.dependencies.append((":".join((dep_path, tpl[0])), tpl[1], "DEPENDENCY"))
def set_dependencies(analisys, dependencies, path): for toc in (analisys.binaries, analisys.datas): for i in range(len(toc)): tpl = toc[i] if not tpl[1] in dependencies.keys(): print "Adding dependency %s located in %s" % (tpl[1], path) dependencies[tpl[1]] = path else: dep_path = get_relative_path(path, dependencies[tpl[1]]) print "Referencing %s to be a dependecy for %s, located in %s" % (tpl[1], path, dep_path) analisys.dependencies.append((":".join((dep_path, tpl[0])), tpl[1], "DEPENDENCY")) toc[i] = (None, None, None) # Clean the list toc[:] = [tpl for tpl in toc if tpl != (None, None, None)]
dc6418bcc534841624abc6688b456d8060ecfb12 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11925/dc6418bcc534841624abc6688b456d8060ecfb12/Build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 11037, 12, 304, 287, 291, 1900, 16, 5030, 16, 589, 4672, 364, 17919, 316, 261, 304, 287, 291, 1900, 18, 4757, 5646, 16, 392, 287, 291, 1900, 18, 13178, 4672, 364, 277, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 11037, 12, 304, 287, 291, 1900, 16, 5030, 16, 589, 4672, 364, 17919, 316, 261, 304, 287, 291, 1900, 18, 4757, 5646, 16, 392, 287, 291, 1900, 18, 13178, 4672, 364, 277, 316, ...
run_sql("""INSERT INTO accROLE_accACTION_accARGUMENT values (%s, %s, %s, %s)""", (id_role, id_action, 0, 0))
run_sql("""INSERT INTO accROLE_accACTION_accARGUMENT (id_accROLE, id_accACTION, id_accARGUMENT, argumentlistid) VALUES (%s, %s, %s, %s)""", (id_role, id_action, 0, 0))
def acc_add_role_action_arguments(id_role=0, id_action=0, arglistid=-1, optional=0, verbose=0, id_arguments=[]): """ function inserts entries in accROLE_accACTION_accARGUMENT if all references are valid. id_role, id_action - self explanatory arglistid - argumentlistid for the inserted entries if -1: create new group other values: add to this group, if it exists or not optional - if this is set to 1, check that function can have optional arguments and add with arglistid -1 and id_argument -1 verbose - extra output id_arguments - list of arguments to add to group.""" inserted = [] if verbose: print 'ids: starting' if verbose: print 'ids: checking ids' # check that all the ids are valid and reference something... if not run_sql("""SELECT * FROM accROLE WHERE id = %s""", (id_role, )): return 0 if verbose: print 'ids: get allowed keywords' # check action exist and get allowed keywords try: allowedkeys = acc_get_action_keywords(id_action=id_action) # allowedkeys = run_sql("""SELECT * FROM accACTION WHERE id = %s""" % # (id_action, ))[0][3].split(',') except (IndexError, AttributeError): return 0 if verbose: print 'ids: is it optional' # action with optional arguments if optional: if verbose: print 'ids: yes - optional' if not acc_get_action_is_optional(id_action=id_action): return [] if verbose: print 'ids: run query to check if exists' if not run_sql("""SELECT * FROM accROLE_accACTION_accARGUMENT WHERE id_accROLE = %s AND id_accACTION = %s AND id_accARGUMENT = -1 AND argumentlistid = -1""", (id_role, id_action, )): if verbose: print 'ids: does not exist' run_sql("""INSERT INTO accROLE_accACTION_accARGUMENT (id_accROLE, id_accACTION, id_accARGUMENT, argumentlistid) VALUES (%s, %s, -1, -1) """, (id_role, id_action)) return ((id_role, id_action, -1, -1), ) if verbose: print 'ids: exists' return [] if verbose: print 'ids: check if not arguments' # action without arguments if not allowedkeys: if verbose: print 'ids: not arguments' if not run_sql("""SELECT * FROM accROLE_accACTION_accARGUMENT WHERE id_accROLE = %s AND id_accACTION = %s AND argumentlistid = %s AND id_accARGUMENT = %s""", (id_role, id_action, 0, 0)): if verbose: print 'ids: try to insert' run_sql("""INSERT INTO accROLE_accACTION_accARGUMENT values (%s, %s, %s, %s)""", (id_role, id_action, 0, 0)) return ((id_role, id_action, 0, 0), ) else: if verbose: print 'ids: already existed' return 0 else: if verbose: print 'ids: arguments exist' argstr = '' # check that the argument exists, and that it is a valid key if verbose: print 'ids: checking all the arguments' for id_argument in id_arguments: res_arg = run_sql("""SELECT * FROM accARGUMENT WHERE id = %s""", (id_argument, )) if not res_arg or res_arg[0][1] not in allowedkeys: return 0 else: if argstr: argstr += ',' argstr += '%s' % (id_argument, ) # arglistid = -1 means that the user wants a new group if verbose: print 'ids: find arglistid' if arglistid < 0: # check if such single group already exists for (id_trav, ) in run_sql("""SELECT DISTINCT argumentlistid FROM accROLE_accACTION_accARGUMENT WHERE id_accROLE = %s AND id_accACTION = %s""", (id_role, id_action)): listlength = run_sql("""SELECT COUNT(*) FROM accROLE_accACTION_accARGUMENT WHERE id_accROLE = %%s AND id_accACTION = %%s AND argumentlistid = %%s AND id_accARGUMENT IN (%s)""" % (argstr), (id_role, id_action, id_trav))[0][0] notlist = run_sql("""SELECT COUNT(*) FROM accROLE_accACTION_accARGUMENT WHERE id_accROLE = %%s AND id_accACTION = %%s AND argumentlistid = %%s AND id_accARGUMENT NOT IN (%s)""" % (argstr), (id_role, id_action, id_trav))[0][0] # this means that a duplicate already exists if not notlist and listlength == len(id_arguments): return 0 # find new arglistid try: arglistid = run_sql("""SELECT MAX(argumentlistid) FROM accROLE_accACTION_accARGUMENT WHERE id_accROLE = %s AND id_accACTION = %s""", (id_role, id_action))[0][0] + 1 except ProgrammingError: return 0 except (IndexError, TypeError): arglistid = 1 if arglistid <= 0: arglistid = 1 if verbose: print 'ids: insert all the entries' # all references are valid, insert: one entry in raa for each argument for id_argument in id_arguments: if not run_sql("""SELECT * FROM accROLE_accACTION_accARGUMENT WHERE id_accROLE = %s AND id_accACTION = %s AND id_accARGUMENT = %s AND argumentlistid = %s""", (id_role, id_action, id_argument, arglistid)): run_sql("""INSERT INTO accROLE_accACTION_accARGUMENT (id_accROLE, id_accACTION, id_accARGUMENT, argumentlistid) VALUES (%s, %s, %s, %s)""", (id_role, id_action, id_argument, arglistid)) inserted.append((id_role, id_action, id_argument, arglistid)) # [(r, ac, ar1, aid), (r, ac, ar2, aid)] if verbose: print 'ids: inside add function' for r in acc_find_possible_actions(id_role=id_role, id_action=id_action): print 'ids: ', r return inserted
6338ce6cd2e72c59fd092b48c385b738dedebcc1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/6338ce6cd2e72c59fd092b48c385b738dedebcc1/access_control_admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4078, 67, 1289, 67, 4615, 67, 1128, 67, 7099, 12, 350, 67, 4615, 33, 20, 16, 612, 67, 1128, 33, 20, 16, 31805, 350, 29711, 21, 16, 3129, 33, 20, 16, 3988, 33, 20, 16, 612, 67, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4078, 67, 1289, 67, 4615, 67, 1128, 67, 7099, 12, 350, 67, 4615, 33, 20, 16, 612, 67, 1128, 33, 20, 16, 31805, 350, 29711, 21, 16, 3129, 33, 20, 16, 3988, 33, 20, 16, 612, 67, 70...
for tokentype, token, start, end, line in g:
for tokentype, token, start, _end, _line in g:
def _readmodule(module, path, inpackage=None): '''Do the hard work for readmodule[_ex].''' # Compute the full module name (prepending inpackage if set) if inpackage: fullmodule = "%s.%s" % (inpackage, module) else: fullmodule = module # Check in the cache if fullmodule in _modules: return _modules[fullmodule] # Initialize the dict for this module's contents dict = {} # Check if it is a built-in module; we don't do much for these if module in sys.builtin_module_names and not inpackage: _modules[module] = dict return dict # Check for a dotted module name i = module.rfind('.') if i >= 0: package = module[:i] submodule = module[i+1:] parent = _readmodule(package, path, inpackage) if inpackage: package = "%s.%s" % (inpackage, package) return _readmodule(submodule, parent['__path__'], package) # Search the path for the module f = None if inpackage: f, file, (suff, mode, type) = imp.find_module(module, path) else: f, file, (suff, mode, type) = imp.find_module(module, path + sys.path) if type == imp.PKG_DIRECTORY: dict['__path__'] = [file] path = [file] + path f, file, (suff, mode, type) = imp.find_module('__init__', [file]) _modules[fullmodule] = dict if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() return dict stack = [] # stack of (class, indent) pairs g = tokenize.generate_tokens(f.readline) try: for tokentype, token, start, end, line in g: if tokentype == DEDENT: lineno, thisindent = start # close nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] elif token == 'def': lineno, thisindent = start # close previous nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] tokentype, meth_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error if stack: cur_class = stack[-1][0] if isinstance(cur_class, Class): # it's a method cur_class._addmethod(meth_name, lineno) # else it's a nested def else: # it's a function dict[meth_name] = Function(fullmodule, meth_name, file, lineno) stack.append((None, thisindent)) # Marker for nested fns elif token == 'class': lineno, thisindent = start # close previous nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] tokentype, class_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # parse what follows the class name tokentype, token, start, end, line = g.next() inherit = None if token == '(': names = [] # List of superclasses # there's a list of superclasses level = 1 super = [] # Tokens making up current superclass while True: tokentype, token, start, end, line = g.next() if token in (')', ',') and level == 1: n = "".join(super) if n in dict: # we know this super class n = dict[n] else: c = n.split('.') if len(c) > 1: # super class is of the form # module.class: look in module for # class m = c[-2] c = c[-1] if m in _modules: d = _modules[m] if c in d: n = d[c] names.append(n) super = [] if token == '(': level += 1 elif token == ')': level -= 1 if level == 0: break elif token == ',' and level == 1: pass # only use NAME and OP (== dot) tokens for type name elif tokentype in (NAME, OP) and level == 1: super.append(token) # expressions in the base list are not supported inherit = names cur_class = Class(fullmodule, class_name, inherit, file, lineno) if not stack: dict[class_name] = cur_class stack.append((cur_class, thisindent)) elif token == 'import' and start[1] == 0: modules = _getnamelist(g) for mod, mod2 in modules: try: # Recursively read the imported module if not inpackage: _readmodule(mod, path) else: try: _readmodule(mod, path, inpackage) except ImportError: _readmodule(mod, []) except: # If we can't find or parse the imported module, # too bad -- don't die here. pass elif token == 'from' and start[1] == 0: mod, token = _getname(g) if not mod or token != "import": continue names = _getnamelist(g) try: # Recursively read the imported module d = _readmodule(mod, path, inpackage) except: # If we can't find or parse the imported module, # too bad -- don't die here. continue # add any classes that were defined in the imported module # to our name space if they were mentioned in the list for n, n2 in names: if n in d: dict[n2 or n] = d[n] elif n == '*': # don't add names that start with _ for n in d: if n[0] != '_': dict[n] = d[n] except StopIteration: pass f.close() return dict
4b228016f7248c15c1df2d1be731768fca57d0ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/4b228016f7248c15c1df2d1be731768fca57d0ca/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 2978, 12, 2978, 16, 589, 16, 316, 5610, 33, 7036, 4672, 9163, 3244, 326, 7877, 1440, 364, 855, 2978, 63, 67, 338, 65, 1093, 6309, 468, 8155, 326, 1983, 1605, 508, 261, 1484, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 896, 2978, 12, 2978, 16, 589, 16, 316, 5610, 33, 7036, 4672, 9163, 3244, 326, 7877, 1440, 364, 855, 2978, 63, 67, 338, 65, 1093, 6309, 468, 8155, 326, 1983, 1605, 508, 261, 1484, ...
global clamav_conf
global _clamav_conf
def init_clamav_conf (): global clamav_conf from wc import config clamav_conf = ClamavConfig(config['clamavconf'])
c1d07a5dae765cc144bb6ec68299de892bfde3ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/c1d07a5dae765cc144bb6ec68299de892bfde3ff/VirusFilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 830, 301, 842, 67, 3923, 1832, 30, 2552, 389, 830, 301, 842, 67, 3923, 628, 14310, 1930, 642, 927, 301, 842, 67, 3923, 273, 3905, 301, 842, 809, 12, 1425, 3292, 830, 301, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 830, 301, 842, 67, 3923, 1832, 30, 2552, 389, 830, 301, 842, 67, 3923, 628, 14310, 1930, 642, 927, 301, 842, 67, 3923, 273, 3905, 301, 842, 809, 12, 1425, 3292, 830, 301, 8...
invalidate(oid)
def commit_sub(self, t): tmp=self._tmp if tmp is None: return src=self._storage self._storage=tmp self._tmp=None
43766b7aafac21e618426d131281635173db942e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/43766b7aafac21e618426d131281635173db942e/Connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 67, 1717, 12, 2890, 16, 268, 4672, 1853, 33, 2890, 6315, 5645, 309, 1853, 353, 599, 30, 327, 1705, 33, 2890, 6315, 5697, 365, 6315, 5697, 33, 5645, 365, 6315, 5645, 33, 7036, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 67, 1717, 12, 2890, 16, 268, 4672, 1853, 33, 2890, 6315, 5645, 309, 1853, 353, 599, 30, 327, 1705, 33, 2890, 6315, 5697, 365, 6315, 5697, 33, 5645, 365, 6315, 5645, 33, 7036, 2, ...
M, N = arg3 except TypeError: raise TypeError, "argument 3 must be a pair (M, N) of dimensions" else: M = N = None if N is None: try: N = int(amax(self.colind)) + 1 except ValueError: N = 0 if M is None: M = len(self.indptr) - 1 if M == -1: M = 0 self.shape = (M, N) else: raise ValueError, "unrecognized form for csr_matrix constructor"
(s, colind, indptr) = arg1 if copy: self.data = array(s) self.colind = array(colind) self.indptr = array(indptr) else: self.data = asarray(s) self.colind = asarray(colind) self.indptr = asarray(indptr) except: raise ValueError, "unrecognized form for csr_matrix constructor"
def __init__(self, arg1, arg2=None, arg3=None, nzmax=100, dtype='d', copy=False): spmatrix.__init__(self) if isspmatrix(arg1): s = arg1 if isinstance(s, csr_matrix): # do nothing but copy information self.shape = s.shape if copy: self.data = s.data.copy() self.colind = s.colind.copy() self.indptr = s.indptr.copy() else: self.data = s.data self.colind = s.colind self.indptr = s.indptr elif isinstance(s, csc_matrix): self.shape = s.shape func = getattr(sparsetools, s.ftype+'transp') self.data, self.colind, self.indptr = \ func(s.shape[1], s.data, s.rowind, s.indptr) else: try: temp = s.tocsr() except AttributeError: temp = csr_matrix(s.tocsc()) self.data = temp.data self.colind = temp.colind self.indptr = temp.indptr self.shape = temp.shape elif type(arg1) == tuple: try: assert len(arg1) == 2 and type(arg1[0]) == int and type(arg1[1]) == int except AssertionError: raise TypeError, "matrix dimensions must be a tuple of two integers" (M, N) = arg1 self.data = zeros((nzmax,), dtype) self.colind = zeros((nzmax,), 'i') self.indptr = zeros((M+1,), 'i') self.shape = (M, N) elif isinstance(arg1, ArrayType) or type(arg1) == list: s = asarray(arg1) if (rank(s) == 2): # converting from a full array ocsc = csc_matrix(transpose(s)) self.colind = ocsc.rowind self.indptr = ocsc.indptr self.data = ocsc.data self.shape = (ocsc.shape[1], ocsc.shape[0])
a9fa59f2c7be4099d580674761bd725b0c430682 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/a9fa59f2c7be4099d580674761bd725b0c430682/sparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1501, 21, 16, 1501, 22, 33, 7036, 16, 1501, 23, 33, 7036, 16, 15062, 1896, 33, 6625, 16, 3182, 2218, 72, 2187, 1610, 33, 8381, 4672, 1694, 5667, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1501, 21, 16, 1501, 22, 33, 7036, 16, 1501, 23, 33, 7036, 16, 15062, 1896, 33, 6625, 16, 3182, 2218, 72, 2187, 1610, 33, 8381, 4672, 1694, 5667, 16186, ...
dataInfo = data.info() dataUrl = data.geturl() filename = getFilenameFromHTTP(dataInfo, link)
filename = getFilenameFromHTTP(data.info(), link)
def downloadFile(link=None, threadName=None, rssItemNode=None, downItemConfig=None): u"""tries to download data at URL. returns None if it was not supposed to, False if it failed, and a tuple of arguments for userFunct""" try: data = downloader(link) except (urllib2.HTTPError, urllib2.URLError, httplib.HTTPException), m: logStatusMsg( unicodeC(m) + os.linesep + u'error grabbing url: %s' % link, 1 ) return False dataInfo = data.info() dataUrl = data.geturl() # could try to grab filename from ppage item title attribute, but this seems safer for file extension assurance # could use url from attempted grab, but it won't be properly encoded. when python network stuff works properly with unicode # use dataUrl here? filename = getFilenameFromHTTP(dataInfo, link) if not filename: return False size, data2 = getFileSize(dataInfo, data) # check size against configuration options if size and not checkFileSize(size, threadName, downItemConfig): # size is outside range, don't need the data, but want to report that we succeeded in getting data del data, data2, dataInfo, dataUrl return None if downItemConfig['Dir']: directory = downItemConfig['Dir'] elif getConfig()['threads'][threadName]['directory']: directory = getConfig()['threads'][threadName]['directory'] else: directory = getConfig()['global']['downloadDir'] try: filename = writeNewFile( filename, directory, data2 ) except IOError: logStatusMsg( u"write to disk failed", 1 ) return False logStatusMsg( u"\tFilename: %s%s\tDirectory: %s%s\tFrom Thread: %s%s" % ( filename, os.linesep, directory, os.linesep, threadName, os.linesep ), 3 ) if rss: logStatusMsg( u"generating rss item", 5) if 'description' in rssItemNode: description = rssItemNode['description'] else: description = None if 'title' in rssItemNode: title = rssItemNode['title'] else: title = None pubdate = time.strftime(u"%a, %d %b %Y %H:%M:%S GMT", time.gmtime()) itemLoad = {'title':title , 'description':description , 'pubDate':pubdate } rss.addItem( itemLoad ) userFunctArgs = directory, filename, rssItemNode, dataUrl, downItemConfig, threadName return userFunctArgs
633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 812, 12, 1232, 33, 7036, 16, 2650, 461, 33, 7036, 16, 18817, 1180, 907, 33, 7036, 16, 2588, 1180, 809, 33, 7036, 4672, 582, 8395, 2007, 358, 4224, 501, 622, 1976, 18, 1135, 599, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 812, 12, 1232, 33, 7036, 16, 2650, 461, 33, 7036, 16, 18817, 1180, 907, 33, 7036, 16, 2588, 1180, 809, 33, 7036, 4672, 582, 8395, 2007, 358, 4224, 501, 622, 1976, 18, 1135, 599, ...
circles =(Circle, CircleBy3Points, CircularInversion, ArcBy3Points,
circles =(CircleByCenterPoint, CircleBy3Points, CircularInversion, ArcBy3Points,
def __init__(self, %s shown=None, name=None, internal=False, width=None, pointstyle=None, linestyle=None, color=None): Property.__init__(self, "%s", %s shown, name, internal, width, pointstyle, linestyle, color)
5069954c5a9377dbcd6d1a584034fc817dc0015a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1714/5069954c5a9377dbcd6d1a584034fc817dc0015a/pykig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 738, 87, 12188, 33, 7036, 16, 508, 33, 7036, 16, 2713, 33, 8381, 16, 1835, 33, 7036, 16, 1634, 4060, 33, 7036, 16, 26388, 33, 7036, 16, 2036, 33, 7036,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 738, 87, 12188, 33, 7036, 16, 508, 33, 7036, 16, 2713, 33, 8381, 16, 1835, 33, 7036, 16, 1634, 4060, 33, 7036, 16, 26388, 33, 7036, 16, 2036, 33, 7036,...
if shouldround:
if context._rounding_decision == ALWAYS_ROUND:
def __pow__(self, n, modulo = None, context=None): """Return self ** n (mod modulo)
1ed35120311fad235121c44f5d777a7f152b6bc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1ed35120311fad235121c44f5d777a7f152b6bc9/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 23509, 972, 12, 2890, 16, 290, 16, 26109, 273, 599, 16, 819, 33, 7036, 4672, 3536, 990, 365, 2826, 290, 261, 1711, 26109, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 23509, 972, 12, 2890, 16, 290, 16, 26109, 273, 599, 16, 819, 33, 7036, 4672, 3536, 990, 365, 2826, 290, 261, 1711, 26109, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
tests = [ GeneralModuleTests, BasicTCPTest ]
tests = [GeneralModuleTests, BasicTCPTest, TCPTimeoutTest, TestExceptions]
def test_main(): tests = [ GeneralModuleTests, BasicTCPTest ] if sys.platform != 'mac': tests.append(BasicUDPTest) tests.extend([ NonBlockingTCPTests, FileObjectClassTestCase, UnbufferedFileObjectClassTestCase, LineBufferedFileObjectClassTestCase, SmallBufferedFileObjectClassTestCase ]) test_support.run_unittest(*tests)
345c270f4674fb1b5b29d3d793bac96a0d8b3db3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/345c270f4674fb1b5b29d3d793bac96a0d8b3db3/test_socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 7434, 273, 306, 12580, 3120, 14650, 16, 7651, 15988, 1856, 395, 16, 9911, 2694, 4709, 16, 7766, 11416, 65, 309, 2589, 18, 9898, 480, 296, 5821, 4278, 7434, 18, 692...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 7434, 273, 306, 12580, 3120, 14650, 16, 7651, 15988, 1856, 395, 16, 9911, 2694, 4709, 16, 7766, 11416, 65, 309, 2589, 18, 9898, 480, 296, 5821, 4278, 7434, 18, 692...
podir = os.path.join (os.path.realpath ("."), "po") if os.path.isdir (podir): buildcmd = "msgfmt -o build/locale/%s/ccsm.mo po/%s.po" mopath = "build/locale/%s/ccsm.mo" destpath = "share/locale/%s/LC_MESSAGES" for name in os.listdir (podir): if name[-2:] == "po": name = name[:-3] if not os.path.isdir ("build/locale/" + name): os.makedirs ("build/locale/" + name) os.system (buildcmd % (name, name)) data_files.append ((destpath % name, [mopath % name]))
if sys.argv[1] == "build": podir = os.path.join (os.path.realpath ("."), "po") if os.path.isdir (podir): buildcmd = "msgfmt -o build/locale/%s/ccsm.mo po/%s.po" mopath = "build/locale/%s/ccsm.mo" destpath = "share/locale/%s/LC_MESSAGES" for name in os.listdir (podir): if name[-2:] == "po": name = name[:-3] if not os.path.isdir ("build/locale/" + name): os.makedirs ("build/locale/" + name) os.system (buildcmd % (name, name)) data_files.append ((destpath % name, [mopath % name]))
def filter_images (image): return image.startswith ("plugin-") or image.startswith ("category-")
a3d54919177bc2429985cf5576cf067c557030a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7062/a3d54919177bc2429985cf5576cf067c557030a0/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 7369, 261, 2730, 4672, 327, 1316, 18, 17514, 1918, 7566, 4094, 17, 7923, 578, 1316, 18, 17514, 1918, 7566, 4743, 17, 7923, 225, 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, 0, 0, 0, 0, 0, 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, 1034, 67, 7369, 261, 2730, 4672, 327, 1316, 18, 17514, 1918, 7566, 4094, 17, 7923, 578, 1316, 18, 17514, 1918, 7566, 4743, 17, 7923, 225, 2, -100, -100, -100, -100, -100, -100, -100, -10...
expected_text='Search term <em>&lt;SCRIPT&gt;alert("XSS");&lt;/SCRIPT&gt;</em> inside index <em>&lt;SCRIPT&gt;alert("XSS");&lt;/SCRIPT&gt;</em> did not match any record.'))
expected_text='Search term <em>&lt;SCRIPT&gt;alert("XSS");&lt;/SCRIPT&gt;</em> inside index <em>&lt;script&gt;alert("xss");&lt;/script&gt;</em> did not match any record.'))
def test_xss_in_advanced_search(self): """websearch - no XSS vulnerability in advanced search""" self.assertEqual([], test_web_page_content(CFG_SITE_URL + '/search?as=1&p1=ellis&f1=author&op1=a&p2=%3CSCRIPT%3Ealert%28%22XSS%22%29%3B%3C%2FSCRIPT%3E&f2=%3CSCRIPT%3Ealert%28%22XSS%22%29%3B%3C%2FSCRIPT%3E&m2=e', expected_text='Search term <em>&lt;SCRIPT&gt;alert("XSS");&lt;/SCRIPT&gt;</em> inside index <em>&lt;SCRIPT&gt;alert("XSS");&lt;/SCRIPT&gt;</em> did not match any record.'))
e07e04409161ad5def2e6d558116caa884c25711 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/e07e04409161ad5def2e6d558116caa884c25711/websearch_regression_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 92, 1049, 67, 267, 67, 27080, 67, 3072, 12, 2890, 4672, 3536, 4875, 3072, 300, 1158, 1139, 1260, 331, 26064, 316, 16111, 1623, 8395, 365, 18, 11231, 5812, 3816, 6487, 1842, 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, 1842, 67, 92, 1049, 67, 267, 67, 27080, 67, 3072, 12, 2890, 4672, 3536, 4875, 3072, 300, 1158, 1139, 1260, 331, 26064, 316, 16111, 1623, 8395, 365, 18, 11231, 5812, 3816, 6487, 1842, 67,...
checkin.acquire() self.waiting = self.waiting + 1 if self.waiting == self.n: self.waiting = self.n - 1 checkout.release() return checkin.release() checkout.acquire()
self.checkout_mutex.acquire()
def enter(self): checkin, checkout = self.checkin, self.checkout
157f92e2b29d073ecbc5a79ea012f85cd0478331 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/157f92e2b29d073ecbc5a79ea012f85cd0478331/test_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 12, 2890, 4672, 866, 267, 16, 13926, 273, 365, 18, 1893, 267, 16, 365, 18, 17300, 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, 6103, 12, 2890, 4672, 866, 267, 16, 13926, 273, 365, 18, 1893, 267, 16, 365, 18, 17300, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
"contact_email", "licence", "classifiers",
"contact_email", "license", "classifiers",
def is_pure (self): return (self.has_pure_modules() and not self.has_ext_modules() and not self.has_c_libraries())
bb8b1de0dc54a0ef19e7febe07cd8c26e0c0e5d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/bb8b1de0dc54a0ef19e7febe07cd8c26e0c0e5d6/dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 84, 594, 261, 2890, 4672, 327, 261, 2890, 18, 5332, 67, 84, 594, 67, 6400, 1435, 471, 486, 365, 18, 5332, 67, 408, 67, 6400, 1435, 471, 486, 365, 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, 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, 84, 594, 261, 2890, 4672, 327, 261, 2890, 18, 5332, 67, 84, 594, 67, 6400, 1435, 471, 486, 365, 18, 5332, 67, 408, 67, 6400, 1435, 471, 486, 365, 18, 5332, 67, 71, 67, 314...
A rank zero example: sage: EllipticCurve('11a').padic_regulator(3) 1 + O(3^20) ???
def padic_regulator(self, p, prec=20, height=None, check_hypotheses=True): r""" Computes the cyclotomic p-adic regulator of this curve.
97a7111045a2e1421945261832ecad2046ecee85 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/97a7111045a2e1421945261832ecad2046ecee85/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 1574, 11775, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 2072, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281, 326, 6143, 830, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 1574, 11775, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 2072, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281, 326, 6143, 830, ...
if not NVDAEvent: return False focus=liveNVDAObjectTable.get('focus',None)
if not NVDAEvent: return False
def processGenericWinEvent(eventID,window,objectID,childID): """Converts the win event to an NVDA event, Checks to see if this NVDAObject equals the current focus. If all goes well, then the event is queued and we return True @param eventID: a win event ID (type) @type eventID: integer @param window: a win event's window handle @type window: integer @param objectID: a win event's object ID @type objectID: integer @param childID: a win event's child ID @type childID: integer @returns: True if the event was processed, False otherwise. @rtype: boolean """ #Notify appModuleHandler of this new foreground window appModuleHandler.update(window) #Handle particular events for the special MSAA caret object just as if they were for the focus object if objectID==OBJID_CARET and eventID in (winUser.EVENT_OBJECT_LOCATIONCHANGE,winUser.EVENT_OBJECT_SHOW): focus=liveNVDAObjectTable.get('focus',None) if focus: NVDAEvent=("caret",focus) else: NVDAEvent=winEventToNVDAEvent(eventID,window,objectID,childID) if not NVDAEvent: return False focus=liveNVDAObjectTable.get('focus',None) if NVDAEvent[1]==focus: NVDAEvent=(NVDAEvent[0],focus) queueHandler.queueFunction(queueHandler.eventQueue,eventHandler.manageEvent,*NVDAEvent) return True
3abcd3f7588044a54df68f1fef6ad5b2ef7649bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/3abcd3f7588044a54df68f1fef6ad5b2ef7649bf/IAccessibleHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 7014, 18049, 1133, 12, 2575, 734, 16, 5668, 16, 1612, 734, 16, 3624, 734, 4672, 3536, 5692, 326, 5657, 871, 358, 392, 423, 58, 9793, 871, 16, 13074, 358, 2621, 309, 333, 423, 58,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7014, 18049, 1133, 12, 2575, 734, 16, 5668, 16, 1612, 734, 16, 3624, 734, 4672, 3536, 5692, 326, 5657, 871, 358, 392, 423, 58, 9793, 871, 16, 13074, 358, 2621, 309, 333, 423, 58,...
registry.String('Maveric Meercat', "Current development release"))
registry.String('Maverick Meerkat', "Current development release"))
def configure(advanced): from supybot.questions import yn, something, anything, output from supybot.utils.str import format import sqlite import re Encyclopedia = conf.registerPlugin('Encyclopedia', True) enabled = yn("Enable Encyclopedia for all channels?", default=Encyclopedia.enabled._default) if advanced: datadir = something("Which directory should the factoids database be in?", default=Encyclopedia.datadir._default) database = something("What should be the name of the default database (without the .db extension)?", default=Encyclopedia.database._default) prefixchar = something("What prefix character should the bot respond to factoid requests with?", default=Encyclopedia.prefixchar._default) ignores = set([]) output("This plugin can be configured to always ignore certain factoid requests, this is useful when you want another plugin to handle them") output("For instance, the PackageInfo plugin responds to !info and !find, so those should be ignored in Encyclopedia to allow this to work") ignores_i = anythnig("Which factoid requets should the bot always ignore?", default=', '.join(Encyclopedia.ignores._default)) for name in re.split(r',?\s', +ignore_i): ignores.add(name.lower()) curStabel = something("What is short name of the current stable release?", default=Encyclopedia.curStable._default) curStableLong = something("What is long name of the current stable release?", default=Encyclopedia.curStableLong._default) curStableNum = something("What is version number of the current stable release?", default=Encyclopedia.curStableNum._default) curDevel = something("What is short name of the current development release?", default=Encyclopedia.curDevel._default) curDevelLong = something("What is long name of the current development release?", default=Encyclopedia.curDevelLong._default) curDevelNum = something("What is version number of the current development release?", default=Encyclopedia.curDevelNum._default) curLTS = something("What is short name of the current LTS release?", default=Encyclopedia.curLTS._default) curLTSong = something("What is long name of the current LTS release?", default=Encyclopedia.curLTSLoong._default) curLTSNum = something("What is version number of the current LTS release?", default=Encyclopedia.curLTSNum._default) else: datadir = Encyclopedia.datadir._default database = Encyclopedia.database._default prefixchar = Encyclopedia.prefixchar._default ignores = Encyclopedia.ignores._default curStabel = Encyclopedia.curStable._default curStableLong = Encyclopedia.curStableLong._default curStableNum = Encyclopedia.curStableNum._default curDevel = Encyclopedia.curDevel._default curDevelLong = Encyclopedia.curDevelLong._default curDevelNum = Encyclopedia.curDevelNum._default curLTS = Encyclopedia.curLTS._default curLTSLong = Encyclopedia.curLTSLong._default curLTSNum = Encyclopedia.curLTSNum._default relaychannel = anything("What channel/nick should the bot forward alter messages to?", default=Encyclopedia.replaychannel._default) output("What message should the bot reply with when a factoid can not be found?") notfoundmsg = something("If you include a '%s' in the message, it will be replaced with the requested factoid", default=Encyclopedia.notfoundmsg._default) output("When certain factoids are called an alert can be forwarded to a channel/nick") output("Which factoids should the bot forward alert calls for?") alert = set([]) alert_i = anything("Separate types by spaces or commas:", default=', '.join(Encyclopedia.alert._default)) for name in re.split(r',?\s+', alert_i): alert.add(name.lower()) remotedb = anything("Location of a remote database to sync with (used with @sync)", default=Encyclopedia.remotedb._default) privateNotFound = yn("Should the bot reply in private when a factoid is not found, as opposed to in the channel?", default=Encyclopedia.privateNotFound._default) Encyclopedia.enabled.setValue(enabled) Encyclopedia.datadir.setValue(datadir) Encyclopedia.database.setValue(database) Encyclopedia.prefixchar.setValue(prefixchar) Encyclopedia.ignores.setValue(ignores) Encyclopedia.curStable.setValue(curStable) Encyclopedia.curStableLong.setValue(curStableLong) Encyclopedia.curStableNum.setValue(curStableNum) Encyclopedia.curDevel.setValue(curDevel) Encyclopedia.curDevelLong.setValue(curDevelLong) Encyclopedia.curDevelNum.setValue(curDevelNum) Encyclopedia.curLTS.setValue(curLTS) Encyclopedia.curLTSLong.setValue(curLTSLong) Encyclopedia.curLTSNum.setValue(curLTSNum) Encyclopedia.relaychannel.setValue(relaychannel) Encyclopedia.notfoundmsg.setValue(notfoundmsg) Encyclopedia.alert.setValue(alert) Encyclopedia.privateNotFound.setValue(privateNotFound) # Create the initial database db_dir = Encyclopedia.datadir() db_file = Encyclopedia.database() if not db_dir: db_dir = conf.supybot.directories.data() output("supybot.plugins.Encyclopedia.datadir will be set to %r" % db_dir) Encyclopedia.datadir.setValue(db_dir) if not db_file: db_file = 'ubuntu' output("supybot.plugins.Encyclopedia.database will be set to %r" % db_file) Encyclopedia.database.setValue(db_dir) if os.path.exists(os.path.join(db_dir, db_file + '.db')): return con = sqlite.connect(os.path.join(db_dir, db_file + '.db')) cur = con.cursor() try: con.begin() cur.execute("""CREATE TABLE facts ( id INTEGER PRIMARY KEY, author VARCHAR(100) NOT NULL, name VARCHAR(20) NOT NULL, added DATETIME, value VARCHAR(200) NOT NULL, popularity INTEGER NOT NULL DEFAULT 0
46f1113b2da4c4395501f26b130a05a91a716523 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3105/46f1113b2da4c4395501f26b130a05a91a716523/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 27080, 4672, 628, 1169, 93, 4819, 18, 9758, 1930, 677, 82, 16, 5943, 16, 6967, 16, 876, 628, 1169, 93, 4819, 18, 5471, 18, 701, 1930, 740, 1930, 16184, 1930, 283, 1374, 2431,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 27080, 4672, 628, 1169, 93, 4819, 18, 9758, 1930, 677, 82, 16, 5943, 16, 6967, 16, 876, 628, 1169, 93, 4819, 18, 5471, 18, 701, 1930, 740, 1930, 16184, 1930, 283, 1374, 2431,...
except NoSuchNode, e: env.log.warn('Node for configuration %r not found', config.name, exc_info=True)
except Exception, e: env.log.warn('Error accessing path %r for configuration %r', config.path, config.name, exc_info=True)
def collect_changes(repos, config, db=None): """Collect all changes for a build configuration that either have already been built, or still need to be built. This function is a generator that yields ``(platform, rev, build)`` tuples, where ``platform`` is a `TargetPlatform` object, ``rev`` is the identifier of the changeset, and ``build`` is a `Build` object or `None`. :param repos: the version control repository :param config: the build configuration :param db: a database connection (optional) """ env = config.env if not db: db = env.get_db_cnx() try: node = repos.get_node(config.path) except NoSuchNode, e: env.log.warn('Node for configuration %r not found', config.name, exc_info=True) return for path, rev, chg in node.get_history(): # Don't follow moves/copies if path != repos.normalize_path(config.path): break # Stay within the limits of the build config if config.min_rev and repos.rev_older_than(rev, config.min_rev): break if config.max_rev and repos.rev_older_than(config.max_rev, rev): continue # Make sure the repository directory isn't empty at this # revision old_node = repos.get_node(path, rev) is_empty = True for entry in old_node.get_entries(): is_empty = False break if is_empty: continue # For every target platform, check whether there's a build # of this revision for platform in TargetPlatform.select(env, config.name, db=db): builds = list(Build.select(env, config.name, rev, platform.id, db=db)) if builds: build = builds[0] else: build = None yield platform, rev, build
9350667aa1a8e5fcfd4b7dc867ad524865405340 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4547/9350667aa1a8e5fcfd4b7dc867ad524865405340/queue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 67, 6329, 12, 15564, 16, 642, 16, 1319, 33, 7036, 4672, 3536, 10808, 777, 3478, 364, 279, 1361, 1664, 716, 3344, 1240, 1818, 2118, 6650, 16, 578, 4859, 1608, 358, 506, 6650, 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, 3274, 67, 6329, 12, 15564, 16, 642, 16, 1319, 33, 7036, 4672, 3536, 10808, 777, 3478, 364, 279, 1361, 1664, 716, 3344, 1240, 1818, 2118, 6650, 16, 578, 4859, 1608, 358, 506, 6650, 18, ...
description = _("""Lets you control what markup is available when editing content.""")
description = _("Lets you control what markup is available when editing " "content.")
def unregister_wicked_types(self): """Unregisters all previous registration objects """ for name in wicked_type_regs.keys(): wicked_type_regs[name](self.context).handle(unregister=True)
319361342a3eb08eafb9f0347eb1e51591c240a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12189/319361342a3eb08eafb9f0347eb1e51591c240a0/markup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10232, 67, 91, 1200, 329, 67, 2352, 12, 2890, 4672, 3536, 984, 22559, 777, 2416, 7914, 2184, 3536, 364, 508, 316, 341, 1200, 329, 67, 723, 67, 266, 564, 18, 2452, 13332, 341, 1200, 329...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10232, 67, 91, 1200, 329, 67, 2352, 12, 2890, 4672, 3536, 984, 22559, 777, 2416, 7914, 2184, 3536, 364, 508, 316, 341, 1200, 329, 67, 723, 67, 266, 564, 18, 2452, 13332, 341, 1200, 329...
def distance(self):
def test_fuzzy_no_abrevation(self): first_text = """ Monsieur toto is here
def distance(self): """ Return a gap and a percent that takes account of abrevations. """ a = SelectText(self.first_text) b = SelectText(self.second_text) a_create = a.create_new_text() b_create = b.create_new_text() dist = max (len(a.text), len(b.text)) dist_create = 5*(max (len(a_create), len(b_create))) gap = self.gap(self.first_text, self.second_text) gap_create = 5*(self.gap(a_create, b_create)) percent = 100 - 100*(gap_create + gap)/(dist_create + dist) return gap_create + gap, percent
dfb1988a57a8adf0d004b7d809532c37a030fb65 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/dfb1988a57a8adf0d004b7d809532c37a030fb65/test_fuzzy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 74, 13903, 67, 2135, 67, 378, 266, 7112, 12, 2890, 4672, 1122, 67, 955, 273, 3536, 490, 7008, 1385, 295, 268, 6302, 353, 2674, 3536, 2000, 279, 9300, 471, 279, 5551, 716, 553...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 74, 13903, 67, 2135, 67, 378, 266, 7112, 12, 2890, 4672, 1122, 67, 955, 273, 3536, 490, 7008, 1385, 295, 268, 6302, 353, 2674, 3536, 2000, 279, 9300, 471, 279, 5551, 716, 553...
num_invalid_values = arg.GetNumInvalidValues()
num_invalid_values = arg.GetNumInvalidValues(func)
def WriteInvalidUnitTest(self, func, file, test, extra = {}): """Writes a invalid unit test.""" arg_index = 0 for arg in func.GetOriginalArgs(): num_invalid_values = arg.GetNumInvalidValues() for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" gl_error = None count = 0 for arg in func.GetOriginalArgs(): if count == arg_index: (arg_string, parse_result, gl_error) = arg.GetInvalidArg( count, value_index) else: arg_string = arg.GetValidArg(count, 0) arg_strings.append(arg_string) count += 1 gl_arg_strings = [] count = 0 for arg in func.GetOriginalArgs(): gl_arg_strings.append("_") count += 1 gl_func_name = func.GetGLTestFunctionName() gl_error_test = '' if not gl_error == None: gl_error_test = '\n EXPECT_EQ(%s, GetGLError());' % gl_error
51330b3a08d845da9815b843e020833e62577828 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/51330b3a08d845da9815b843e020833e62577828/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1941, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 16, 1842, 16, 2870, 273, 2618, 4672, 3536, 8368, 279, 2057, 2836, 1842, 12123, 1501, 67, 1615, 273, 374, 364, 1501, 316, 1326, 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, 2598, 1941, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 16, 1842, 16, 2870, 273, 2618, 4672, 3536, 8368, 279, 2057, 2836, 1842, 12123, 1501, 67, 1615, 273, 374, 364, 1501, 316, 1326, 18, ...
endmatch = pattern.search(string[matchend:])
endmatch = end_pattern.search(string[matchend:])
def interpreted_or_phrase_ref(self, match, lineno): pattern = self.patterns.interpreted_or_phrase_ref string = match.string matchstart = match.start('backquote') matchend = match.end('backquote') rolestart = match.start('role') role = match.group('role') position = '' if role: role = role[1:-1] position = 'prefix' elif self.quoted_start(match): return (string[:matchend], [], string[matchend:], []) endmatch = pattern.search(string[matchend:]) if endmatch and endmatch.start(1): # 1 or more chars escaped = endmatch.string[:endmatch.start(1)] text = unescape(escaped, 0) rawsource = unescape( string[match.start():matchend+endmatch.end()], 1) if rawsource[-1:] == '_': if role: msg = self.reporter.warning( 'Mismatch: inline interpreted text start-string and' ' role with phrase-reference end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return (string[:matchstart], [prb], string[matchend:], [msg]) return self.phrase_ref( string[:matchstart], string[matchend:][endmatch.end():], text, rawsource) else: return self.interpreted( string[:rolestart], string[matchend:][endmatch.end():], endmatch, role, position, lineno, escaped, rawsource, text) msg = self.reporter.warning( 'Inline interpreted text or phrase reference start-string ' 'without end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return string[:matchstart], [prb], string[matchend:], [msg]
a5c0eb6861885d1f50c31667ba475c9c99a4acf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/a5c0eb6861885d1f50c31667ba475c9c99a4acf6/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19898, 67, 280, 67, 9429, 67, 1734, 12, 2890, 16, 845, 16, 7586, 4672, 1936, 273, 365, 18, 13317, 18, 24713, 329, 67, 280, 67, 9429, 67, 1734, 533, 273, 845, 18, 1080, 845, 1937, 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, 19898, 67, 280, 67, 9429, 67, 1734, 12, 2890, 16, 845, 16, 7586, 4672, 1936, 273, 365, 18, 13317, 18, 24713, 329, 67, 280, 67, 9429, 67, 1734, 533, 273, 845, 18, 1080, 845, 1937, 273...
else
else:
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 615) else quickfix.DoubleField.__init__(self, 615, 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, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 3600, 13, 469, 30, 9549, 904, 18, 5265, 974, 16186, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 3600, 13, 469, 30, 9549, 904, 18, 5265, 974, 16186, 27...