bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def get_arch(): import platform if '64' in platform.architecture()[0]: return 'amd64' else: return 'x86'
def get_arch(): if '64' in platform.architecture()[0]: return 'amd64' else: return 'x86'
465,400
def extract(self): cur = n = 0 size = sum(self.z.getinfo(name).file_size for name in self.arcnames) self.installed_size = size if size == 0: return
def extract(self): cur = n = 0 size = sum(self.z.getinfo(name).file_size for name in self.arcnames) self.installed_size = size if size == 0: return
465,401
def extract(self): cur = n = 0 size = sum(self.z.getinfo(name).file_size for name in self.arcnames) self.installed_size = size if size == 0: return
def extract(self): cur = n = 0 size = sum(self.z.getinfo(name).file_size for name in self.arcnames) self.installed_size = size if size == 0: return
465,402
def extract(self): cur = n = 0 size = sum(self.z.getinfo(name).file_size for name in self.arcnames) sys.stdout.write('%9s [' % human_bytes(size)) for name in self.arcnames: n += self.z.getinfo(name).file_size rat = float(n) / size if rat * 64 >= cur: sys.stdout.write('.') sys.stdout.flush() cur += 1 self.write_arcname(...
def extract(self): cur = n = 0 size = sum(self.z.getinfo(name).file_size for name in self.arcnames) self.installed_size = size if size == 0: return sys.stdout.write('%9s [' % human_bytes(size)) for name in self.arcnames: n += self.z.getinfo(name).file_size rat = float(n) / size if rat * 64 >= cur: sys.stdout.write('.'...
465,403
def extract(self): cur = n = 0 size = sum(self.z.getinfo(name).file_size for name in self.arcnames) sys.stdout.write('%9s [' % human_bytes(size)) for name in self.arcnames: n += self.z.getinfo(name).file_size rat = float(n) / size if rat * 64 >= cur: sys.stdout.write('.') sys.stdout.flush() cur += 1 self.write_arcname(...
def extract(self): cur = n = 0 size = sum(self.z.getinfo(name).file_size for name in self.arcnames) sys.stdout.write('%9s [' % human_bytes(size)) for name in self.arcnames: n += self.z.getinfo(name).file_size rat = float(n) / size if rat * 64 >= cur: sys.stdout.write('.') sys.stdout.flush() cur += 1 self.write_arcname(...
465,404
def filename_dist(dist): return split_dist(dist)[1]
def filename_dist(dist): return split_dist(dist)[1]
465,405
def main(): from optparse import OptionParser p = OptionParser(usage="usage: %prog [options] [name] [version]", description=__doc__) p.add_option("--config", action="store_true", help="display the configuration and exit") p.add_option('-f', "--force", action="store_true", help="force install the main package " "(not...
def main(): from optparse import OptionParser p = OptionParser(usage="usage: %prog [options] [name] [version]", description=__doc__) p.add_option("--config", action="store_true", help="display the configuration and exit") p.add_option('-f', "--force", action="store_true", help="force install the main package " "(not...
465,406
def main(): from optparse import OptionParser p = OptionParser(usage="usage: %prog [options] [name] [version]", description=__doc__) p.add_option("--config", action="store_true", help="display the configuration and exit") p.add_option('-f', "--force", action="store_true", help="force install the main package " "(not...
def main(): from optparse import OptionParser p = OptionParser(usage="usage: %prog [options] [name] [version]", description=__doc__) p.add_option("--config", action="store_true", help="display the configuration and exit") p.add_option('-f', "--force", action="store_true", help="force install the main package " "(not...
465,407
def find_lib(fn): for tgt in _targets: dst = abspath(join(tgt, fn)) if exists(dst): return dst print "ERROR: library %r not found" % fn return join('/ERROR/path/not/found', fn)
def find_lib(fn): for tgt in _targets: dst = abspath(join(tgt, fn)) if exists(dst): return dst print "ERROR: library %r not found" % fn return join('/ERROR/path/not/found', fn)
465,408
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as the re...
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read(262144) matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as ...
465,409
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as the re...
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: rest = m.group(1) while rest.startswith('/PLACEHOLD'): res...
465,410
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as the re...
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as the re...
465,411
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as the re...
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as the re...
465,412
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as the re...
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as the re...
465,413
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as the re...
def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as the re...
465,414
def install_app(self, remove=False): if self.noapp: return
def install_app(self, remove=False): if self.noapp: return
465,415
def main(): from optparse import OptionParser p = OptionParser( usage="usage: %prog [options] [name] [version]", description=("download and install eggs ...")) p.add_option("--config", action="store_true", help="display the configuration and exit") p.add_option('-f', "--force", action="store_true", help="force insta...
def main(): from optparse import OptionParser p = OptionParser( usage="usage: %prog [options] [name] [version]", description=("download and install eggs ...")) p.add_option("--config", action="store_true", help="display the configuration and exit") p.add_option('-f', "--force", action="store_true", help="force insta...
465,416
def input_userpass(): from getpass import getpass print """\
def input_userpass(): from getpass import getpass print """\
465,417
def label_to_filename(label): label = label.replace('/', '_')\ .replace(' ', '_')\ .replace('(', '=')\ .replace(')', '=')\ .replace(',', '_') + '.crt' return re.sub(r'\\x[0-9a-fA-F]{2}', lambda m:chr(int(m.group(0)[2:], 16)), label)
def label_to_filename(label): label = label.replace('/', '_')\ .replace(' ', '_')\ .replace('(', '=')\ .replace(')', '=')\ .replace(',', '_') + '.crt' return re.sub(r'\\x[0-9a-fA-F]{2}', lambda m:chr(int(m.group(0)[2:], 16)), label)
465,418
def principal(self): try: return getUtility(IAuthentication).getPrincipal(self.__name__) except PrincipalLookupError: return None
def principal(self): try: return getPrincipal(self.__name__) except PrincipalLookupError: return None
465,419
def move_left(self): (curr_x, curr_y) = self.pos curr_x = curr_x - 100 if (curr_x <= 50): curr_x = 50 self.pos = (curr_x, curr_y) self.rect = self.image.get_rect(center = self.pos)
def move_left(self): (curr_x, curr_y) = self.pos curr_x = curr_x - 20 if (curr_x <= 10): curr_x = 10 self.pos = (curr_x, curr_y) self.rect = self.image.get_rect(center = self.pos)
465,420
def move_right(self): (curr_x, curr_y) = self.pos curr_x = curr_x + 100 if (curr_x >= 650): curr_x = 650 self.pos = (curr_x, curr_y) self.rect = self.image.get_rect(center = self.pos)
def move_right(self): (curr_x, curr_y) = self.pos curr_x = curr_x + 20 if (curr_x >= 690): curr_x = 690 self.pos = (curr_x, curr_y) self.rect = self.image.get_rect(center = self.pos)
465,421
def fire(self): (curr_x, curr_y) = self.pos print curr_y Projectile(self.pos,self.angle,self.velocity)
def fire(self): (curr_x, curr_y) = self.pos Projectile(self.pos,self.angle,self.velocity)
465,422
def __init__(self, pos, angle = 0, velocity = 0): pygame.sprite.Sprite.__init__(self, self.containers) self.min_size =10 self.image = pygame.Surface((self.min_size,self.min_size)) self.color = [255,0,0] self.image.fill(self.color) self.pos = pos self.rect = self.image.get_rect(center = pos) self.angle = angle self.velo...
def __init__(self, pos, angle = 0, velocity = 0): pygame.sprite.Sprite.__init__(self, self.containers) self.min_size = 10 self.image = pygame.Surface((self.min_size,self.min_size)) self.color = [255,0,0] self.image.fill(self.color) self.pos = pos self.rect = self.image.get_rect(center = pos) self.angle = angle self.vel...
465,423
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
465,424
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/50.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
465,425
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 2) + self.min_size)...
465,426
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
465,427
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
465,428
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
465,429
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
465,430
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size...
465,431
def write_index(): """Create markup for a new form submit with all tests. """ entries = [] for entry in get_tests(): if entry.title: title = "".join(entry.title) entries.append(TR_TD_COLS_4 % title) if entry.url: url = "".join(entry.url) entries.append(TR_TD_URL % (url, url)) if entry.label: id = "id-%s" % entry.id[0]....
def write_index(): """Create markup for a new form submit with all tests. """ entries = [] for entry in get_tests(): if entry.title: title = "".join(entry.title) entries.append(TR_TD_COLS_4 % title) if entry.url: url = "".join(entry.url) entries.append(TR_TD_URL % (url, url)) if entry.label: id = "id-%s" % entry.id[0]....
465,432
def test(): load_templates() entries = tests2singledocs() """ label: Export mode: DOM tabs: DOM urls: http://dev.opera.com repo: dom index: 0002 file_name: 0002.export.html desc: - Press the Export button.- Verify that the current view is displayed in a new tab. """ if not os.path.exists(PAPA): os.makedirs(PAPA) inde...
def test(): load_templates() entries = tests2singledocs() """ label: Export mode: DOM tabs: DOM urls: http://dev.opera.com repo: dom index: 0002 file_name: 0002.export.html desc: - Press the Export button.- Verify that the current view is displayed in a new tab. """ if not os.path.exists(PAPA): os.makedirs(PAPA) inde...
465,433
def get_resources(os_path, web_path, file_name): resources = [] with open(os.path.join(os_path, file_name), 'r') as f: content = f.read() for match in _re_resource.finditer(content): resource = filter(bool, match.groups())[0] if resource.startswith("/"): pass elif resource.startswith("./"): resource = web_path + resour...
def get_resources(os_path, web_path, file_name): resources = [] with open(os.path.join(os_path, file_name), 'r') as f: content = f.read() for match in _re_resource.finditer(content): resource = filter(bool, match.groups())[0] if resource.startswith("/"): pass elif resource.startswith("./"): resource = web_path + resour...
465,434
def add_ids_test_index(): """Add an id to all tests which are missing one. """ import shutil import tempfile ID = 1 LABEL = 2 DESC = 3 ERROR = 4 state = DESC in_file = open(TESTS, 'rb') lines = in_file.readlines() in_file.close() id_count = DEFAULT_ID_DELTA tmpfd, tmppath = tempfile.mkstemp(".tmp", "dftests.") tmpfile...
def add_ids_test_index(): """Add an id to all tests which are missing one. """ import shutil import tempfile ID = 1 LABEL = 2 DESC = 3 ERROR = 4 state = DESC in_file = open(TESTS, 'rb') lines = in_file.readlines() in_file.close() id_count = 0 tmpfd, tmppath = tempfile.mkstemp(".tmp", "dftests.") tmpfile = os.fdopen(tm...
465,435
def add_ids_test_index(): """Add an id to all tests which are missing one. """ import shutil import tempfile ID = 1 LABEL = 2 DESC = 3 ERROR = 4 state = DESC in_file = open(TESTS, 'rb') lines = in_file.readlines() in_file.close() id_count = DEFAULT_ID_DELTA tmpfd, tmppath = tempfile.mkstemp(".tmp", "dftests.") tmpfile...
def add_ids_test_index(): """Add an id to all tests which are missing one. """ import shutil import tempfile ID = 1 LABEL = 2 DESC = 3 ERROR = 4 state = DESC in_file = open(TESTS, 'rb') lines = in_file.readlines() in_file.close() id_count = 0 tmpfd, tmppath = tempfile.mkstemp(".tmp", "dftests.") tmpfile = os.fdopen(tm...
465,436
def add_ids_test_index(): """Add an id to all tests which are missing one. """ import shutil import tempfile ID = 1 LABEL = 2 DESC = 3 ERROR = 4 state = DESC in_file = open(TESTS, 'rb') lines = in_file.readlines() in_file.close() id_count = DEFAULT_ID_DELTA tmpfd, tmppath = tempfile.mkstemp(".tmp", "dftests.") tmpfile...
def add_ids_test_index(): """Add an id to all tests which are missing one. """ import shutil import tempfile ID = 1 LABEL = 2 DESC = 3 ERROR = 4 state = DESC in_file = open(TESTS, 'rb') lines = in_file.readlines() in_file.close() id_count = DEFAULT_ID_DELTA tmpfd, tmppath = tempfile.mkstemp(".tmp", "dftests.") tmpfile...
465,437
def __init__(self): self.title = [] self.url = [] self.desc = [] self.label = [] self.id = [] self.buffer = [] self.index = 0 self.mode = '' self.tabs = '' self.urls = '' self.repo = '' self.index = '' self.file_name = ''
def __init__(self): self.title = [] self.url = [] self.desc = [] self.label = [] self.id = [] self.buffer = [] self.index = 0 self.mode = '' self.tabs = '' self.urls = '' self.repo = '' self.index_count = 0 self.file_name = ''
465,438
def is_empty(self): return bool(self.title or self.url or self.desc or self.label)
def is_empty(self): return bool(self.title or self.url or self.desc or self.label)
465,439
def tests2singledocs(): entries = get_tests() for e in entries: e.normalize() entries = filter(lambda e: e.is_empty(), entries) cur = Entry() type = '' index = 0 for entry in entries: if entry.title: cur.mode, ts = parse_title(''.join(entry.title)) cur.repo = cur.mode.lower() cur.tabs = ', '.join(ts) type = 'title' ind...
def tests2singledocs(): entries = get_tests() for e in entries: e.normalize() entries = filter(lambda e: e.is_empty(), entries) cur = Entry() type = '' for entry in entries: if entry.title: cur.mode, ts = parse_title(''.join(entry.title)) cur.repo = cur.mode.lower() cur.tabs = ', '.join(ts) type = 'title' index = 1 eli...
465,440
def tests2singledocs(): entries = get_tests() for e in entries: e.normalize() entries = filter(lambda e: e.is_empty(), entries) cur = Entry() type = '' index = 0 for entry in entries: if entry.title: cur.mode, ts = parse_title(''.join(entry.title)) cur.repo = cur.mode.lower() cur.tabs = ', '.join(ts) type = 'title' ind...
def tests2singledocs(): entries = get_tests() for e in entries: e.normalize() entries = filter(lambda e: e.is_empty(), entries) cur = Entry() type = '' index = 0 for entry in entries: if entry.title: cur.mode, ts = parse_title(''.join(entry.title)) cur.repo = cur.mode.lower() cur.tabs = ', '.join(ts) type = 'title' ind...
465,441
def tests2singledocs(): entries = get_tests() for e in entries: e.normalize() entries = filter(lambda e: e.is_empty(), entries) cur = Entry() type = '' for entry in entries: if entry.title: cur.mode, ts = parse_title(''.join(entry.title)) cur.repo = [label2filename(cur.mode)] if ts: cur.repo.append(label2filename(ts[0]...
def tests2singledocs(): entries = get_tests() for e in entries: e.normalize() entries = filter(lambda e: e.is_empty(), entries) cur = Entry() type = '' for entry in entries: if entry.title: cur.mode, ts = parse_title(''.join(entry.title)) cur.repo = [label2filename(cur.mode)] if ts: cur.repo.append(label2filename(ts[0]...
465,442
def tests2singledocs(): entries = get_tests() for e in entries: e.normalize() entries = filter(lambda e: e.is_empty(), entries) cur = Entry() type = '' for entry in entries: if entry.title: cur.mode, ts = parse_title(''.join(entry.title)) cur.repo = [label2filename(cur.mode)] if ts: cur.repo.append(label2filename(ts[0]...
def tests2singledocs(): entries = get_tests() for e in entries: e.normalize() entries = filter(lambda e: e.is_empty(), entries) cur = Entry() type = '' for entry in entries: if entry.title: cur.mode, ts = parse_title(''.join(entry.title)) cur.repo = [label2filename(cur.mode)] if ts: cur.repo.append(label2filename(ts[0]...
465,443
def test(): load_templates() entries = tests2singledocs() """ label: Export mode: DOM tabs: DOM urls: http://dev.opera.com repo: dom index: 0002 file_name: 0002.export.html desc: - Press the Export button.- Verify that the current view is displayed in a new tab. """ if not os.path.exists(PAPA): os.makedirs(PAPA) inde...
def test(): load_templates() entries = tests2singledocs() """ label: Export mode: DOM tabs: DOM urls: http://dev.opera.com repo: dom index: 0002 file_name: 0002.export.html desc: - Press the Export button.- Verify that the current view is displayed in a new tab. """ if not os.path.exists(PAPA): os.makedirs(PAPA) inde...
465,444
def tests2singledocs(): entries = get_tests() for e in entries: e.normalize() entries = filter(lambda e: e.is_empty(), entries) cur = Entry() type = '' for entry in entries: if entry.title: cur.mode, ts = parse_title(''.join(entry.title)) cur.repo = cur.mode.lower() cur.tabs = ', '.join(ts) type = 'title' index = 1 eli...
def tests2singledocs(): entries = get_tests() for e in entries: e.normalize() entries = filter(lambda e: e.is_empty(), entries) cur = Entry() type = '' for entry in entries: if entry.title: cur.mode, ts = parse_title(''.join(entry.title)) cur.repo = cur.mode.lower() cur.tabs = ', '.join(ts) type = 'title' index = 1 eli...
465,445
def test(): load_templates() entries = tests2singledocs() """ label: Export mode: DOM tabs: DOM urls: http://dev.opera.com repo: dom index: 0002 file_name: 0002.export.html desc: - Press the Export button.- Verify that the current view is displayed in a new tab. """ if not os.path.exists(PAPA): os.makedirs(PAPA) inde...
deftest():load_templates()entries=tests2singledocs()"""label:Exportmode:DOMtabs:DOMurls:http://dev.opera.comrepo:domindex:0002file_name:0002.export.htmldesc:-PresstheExportbutton.-Verifythatthecurrentviewisdisplayedinanewtab."""ifnotos.path.exists(PAPA):os.makedirs(PAPA)index=[]foreinentries:content=[HTML_HEAD%("../"+S...
465,446
def process_file(inpath, outfd): lines = [p["msgstr"] for p in dfstrings.get_po_strings(inpath) if "scope" in p and "dragonfly" in p["scope"] ] bad_escaped = dfstrings.get_strings_with_bad_escaping(lines) if bad_escaped: print "error: %s contains strings with bad escaping: %s" % (inpath, bad_escaped) return 1 bad_for...
def _process_file(inpath, outfd): lines = [p["msgstr"] for p in dfstrings.get_po_strings(inpath) if "scope" in p and "dragonfly" in p["scope"] ] bad_escaped = dfstrings.get_strings_with_bad_escaping(lines) if bad_escaped: print "error: %s contains strings with bad escaping: %s" % (inpath, bad_escaped) return 1 bad_fo...
465,447
def _process_dir(dirpath, destpath): files = _find_pofiles(dirpath) for path in files: out = os.path.join(destpath, os.path.basename(path)) outfd = codecs.open(out, "w", encoding="utf_8_sig") process_file(path, outfd) outfd.close()
def _process_dir(dirpath, destpath): files = _find_pofiles(dirpath) for path in files: out = os.path.join(destpath, "ui_strings-%s.js" % os.path.basename(path)[:-3]) outfd = codecs.open(out, "w", encoding="utf_8_sig") process_file(path, outfd) outfd.close()
465,448
def _process_dir(dirpath, destpath): files = _find_pofiles(dirpath) for path in files: out = os.path.join(destpath, os.path.basename(path)) outfd = codecs.open(out, "w", encoding="utf_8_sig") process_file(path, outfd) outfd.close()
def _process_dir(dirpath, destpath): files = _find_pofiles(dirpath) for path in files: out = os.path.join(destpath, os.path.basename(path)) outfd = codecs.open(out, "w", encoding="utf_8_sig") _process_file(path, outfd) outfd.close()
465,449
def __init__(self, bdefilename=None): """ Initialize the class and read the bde file is it is provided. """ self.content = [] self.dbname = 'oeebde.db' self.recordcode = 'recordcode' self.nfilelines = 0 if bdefilename is not None: self.bdefilename = bdefilename self.readfile(bdefilename) # Variables related to sumup # ...
def __init__(self, bdefilename=None): """ Initialize the class and read the bde file is it is provided. """ self.content = [] self.dbname = 'oeebde.db' self.recordcode = 'recordcode' self.nfilelines = 0 if bdefilename is not None: self.bdefilename = bdefilename self.readfile(bdefilename) # Variables related to sumup # ...
465,450
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
465,451
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
465,452
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
465,453
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
465,454
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
465,455
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
def data_sumup(self): """ Perform Sum-ups for Preparation and Production. The Sum-ups will be performed in two stages: 1. Simple Sum-ups to process through all selected lines and record the start and end lines of the Sum-ups. The results are saved in a intermediate dictionary. 2. Process dictionary to decide whether a ...
465,456
def gen_output_for_key(self, keys, idx):
def gen_output_for_key(self, keys, idx):
465,457
def gen_output_for_key(self, keys, idx):
def gen_output_for_key(self, keys, idx):
465,458
def gen_output_for_key(self, keys, idx):
def gen_output_for_key(self, keys, idx):
465,459
def report_output(self): # Print output print "" keys = self.output.keys() keys.sort() for key in keys: line = self.output[key] print "%10d %s %6s %15s %0.2f %10d" % line
def report_output(self): # Print output print "" keys = self.output.keys() keys.sort() for key in keys: line = self.output[key] print "%10d %s %6s %15s %0.2f %10d" % line
465,460
def report_output(self): # Print output print "" keys = self.output.keys() keys.sort() for key in keys: line = self.output[key] print "%10d %s %6s %15s %0.2f %10d" % line
def report_output(self): # Print output print "" keys = self.output.keys() keys.sort() for key in keys: line = self.output[key] print "%10d %s %6s %15s %0.2f %10d" % line
465,461
def __init__(self,args=None): description="""
def __init__(self,args=None): description="""
465,462
def addOptions(self): self.parser.add_option("--test",action="store_true",dest="test",default=False,help="Doesn't write to the file, but outputs the result on stdout") self.parser.add_option("--evaluate",action="store_false",dest="verbatim",default=True,help="Interpret the string as a python expression before assigning...
def addOptions(self): self.parser.add_option("--test", action="store_true", dest="test", default=False, help="Doesn't write to the file, but outputs the result on stdout") self.parser.add_option("--strip-quotes-from-value", action="store_true", dest="stripQuotes", default=False, help="Strip the quotes from the value i...
465,463
def run(self): fName=self.parser.getArgs()[0] all=self.parser.getArgs()[1] if all[0]=='"': all=all[1:] if all[-1]=='"': all=all[:-1] val=self.parser.getArgs()[2]
defif self.opts.stripQuotes: if val[0]=='"': val=val[1:] if val[-1]=='"': val=val[:-1] run(self):if self.opts.stripQuotes: if val[0]=='"': val=val[1:] if val[-1]=='"': val=val[:-1] fName=self.parser.getArgs()[0]if self.opts.stripQuotes: if val[0]=='"': val=val[1:] if val[-1]=='"': val=val[:-1] all=self.parser.get...
465,464
def from_params(cls, params): """Returns a list of MultipartParam objects from a sequence of name, value pairs, MultipartParam instances, or from a mapping of names to values
def from_params(cls, params): """Returns a list of MultipartParam objects from a sequence of name, value pairs, MultipartParam instances, or from a mapping of names to values
465,465
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
465,466
def prepareResubmission(self, bossJob): """ __prepareResubmission__
def prepareResubmission(self, bossJob): """ __prepareResubmission__
465,467
def prepareResubmission(self, bossJob): """ __prepareResubmission__
def prepareResubmission(self, bossJob): """ __prepareResubmission__
465,468
def __call__(self): """ copy logs to local file system, tar, stage out to storage and delete originals """ #first copy logs locally logs = [] fileInfo = { 'LFN' : None, 'PFN' : None, 'SEName' : None, 'GUID' : None, } try: stagein = StageInMgr() stageout = StageOutMgr(**self.overrideParams) delete = DeleteMgr() except ...
def __call__(self): """ copy logs to local file system, tar, stage out to storage and delete originals """ #first copy logs locally logs = [] fileInfo = { 'LFN' : None, 'PFN' : None, 'SEName' : None, 'GUID' : None, } try: stagein = StageInMgr() stageout = StageOutMgr(**self.overrideParams) delete = DeleteMgr() except ...
465,469
def __call__(self): """ copy logs to local file system, tar, stage out to storage and delete originals """ #first copy logs locally logs = [] fileInfo = { 'LFN' : None, 'PFN' : None, 'SEName' : None, 'GUID' : None, } try: stagein = StageInMgr() stageout = StageOutMgr(**self.overrideParams) delete = DeleteMgr() except ...
def __call__(self): """ copy logs to local file system, tar, stage out to storage and delete originals """ #first copy logs locally logs = [] fileInfo = { 'LFN' : None, 'PFN' : None, 'SEName' : None, 'GUID' : None, } try: stagein = StageInMgr() stageout = StageOutMgr(**self.overrideParams) delete = DeleteMgr() except ...
465,470
def __call__(self): """ copy logs to local file system, tar, stage out to storage and delete originals """ #first copy logs locally logs = [] fileInfo = { 'LFN' : None, 'PFN' : None, 'SEName' : None, 'GUID' : None, } try: stagein = StageInMgr() stageout = StageOutMgr(**self.overrideParams) delete = DeleteMgr() except ...
def __call__(self): """ copy logs to local file system, tar, stage out to storage and delete originals """ #first copy logs locally logs = [] fileInfo = { 'LFN' : None, 'PFN' : None, 'SEName' : None, 'GUID' : None, } try: stagein = StageInMgr() stageout = StageOutMgr(**self.overrideParams) delete = DeleteMgr() except ...
465,471
def saveFjr(self): """ create fjr for process """ self.report.write("./FrameworkJobReport.xml") # // # // Ensure this report gets added to the job-wide report #// toplevelReport = os.path.join(os.environ['PRODAGENT_JOB_DIR'],"FrameworkJobReport.xml") newReport = os.path.join(os.getcwd(), "FrameworkJobReport.xml") mer...
def saveFjr(self): """ create fjr for process """ self.report.write("./FrameworkJobReport.xml") # // # // Ensure this report gets added to the job-wide report #// toplevelReport = os.path.join(os.environ['PRODAGENT_JOB_DIR'],"FrameworkJobReport.xml") newReport = os.path.join(os.getcwd(), "FrameworkJobReport.xml") mer...
465,472
def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False
def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False
465,473
def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False
def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False
465,474
def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False
def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False
465,475
def localCustomization(self, config, merge = False): """ Apply site specific customizations to the config """ site_config = self.taskState.getSiteConfig()
def localCustomization(self, config, merge = False): """ Apply site specific customizations to the config """ site_config = self.taskState.getSiteConfig()
465,476
def createPSet(self): """ _createPSet_
def createPSet(self): """ _createPSet_
465,477
def createMergePSet(self): """ _createMergePSet_
def createMergePSet(self): """ _createMergePSet_
465,478
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
465,479
def __init__(self): dict.__init__(self) self.task = None self.job = None self.destinations = {} self.publisher = None self.setdefault("Application", None) self.setdefault("ApplicationVersion", None) self.setdefault("GridJobID", None) self.setdefault("LocalBatchID", None) self.setdefault("GridUser", None) self.setdefaul...
def __init__(self): dict.__init__(self) self.task = None self.job = None self.destinations = {} self.publisher = None self.setdefault("Application", None) self.setdefault("ApplicationVersion", None) self.setdefault("GridJobID", None) self.setdefault("LocalBatchID", None) self.setdefault("GridUser", None) self.setdefaul...
465,480
def getOutput(cls, job, task, schedSession ): """ __getOutput__
def getOutput(cls, job, task, schedSession ): """ __getOutput__
465,481
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
465,482
def prepareResubmission(self, bossJob): """ __prepareResubmission__
def prepareResubmission(self, bossJob): """ __prepareResubmission__
465,483
def prepareResubmission(self, bossJob): """ __prepareResubmission__
def prepareResubmission(self, bossJob): """ __prepareResubmission__
465,484
def prepareResubmission(self, bossJob): """ __prepareResubmission__
def prepareResubmission(self, bossJob): """ __prepareResubmission__
465,485
def killTask(self, taskSpecId): """
def killTask(self, taskSpecId): """
465,486
def findCfgFiles(node): """ _findCfgFiles_ Look for cms cfg file in payload node provided """ try: #hash = node._OutputDatasets[0]['PSetHash'] #cfg = node.configuration cfg = node.cfgInterface cfgInter = cfg.makeConfiguration() print node.name + ": Found cfg." except Exception, ex: # Not a cfg file print node.name + ...
def findCfgFiles(node): """ _findCfgFiles_ Look for cms cfg file in payload node provided """ try: #hash = node._OutputDatasets[0]['PSetHash'] #cfg = node.configuration cfgInter = node.cfgInterface cfgInter = cfg.makeConfiguration() print node.name + ": Found cfg." except Exception, ex: # Not a cfg file print node.na...
465,487
def __call__(self, **fileToStage): """ _operator()_
def __call__(self, **fileToStage): """ _operator()_
465,488
def processFrameworkJobReport(): """ _processFrameworkJobReport_ Read the job report and insert external information such as datasets for each file entry. """ state = TaskState(os.getcwd()) state.loadRunResDB() state.loadJobSpecNode() state.jobSpecNode.loadConfiguration() state.dumpJobReport() badReport = False try...
def processFrameworkJobReport(): """ _processFrameworkJobReport_ toplevelReport = os.path.join(os.environ['PRODAGENT_JOB_DIR'], "FrameworkJobReport.xml") if state.jobSpecNode._InputLinks and \ state.jobSpecNode._InputLinks[0]["AppearStandalone"] and \ os.path.exists(toplevelReport): parentForward = True for link...
465,489
def processFrameworkJobReport(): """ _processFrameworkJobReport_ Read the job report and insert external information such as datasets for each file entry. """ state = TaskState(os.getcwd()) state.loadRunResDB() state.loadJobSpecNode() state.jobSpecNode.loadConfiguration() state.dumpJobReport() badReport = False try...
def processFrameworkJobReport(): """ _processFrameworkJobReport_ Read the job report and insert external information such as datasets for each file entry. """ state = TaskState(os.getcwd()) state.loadRunResDB() state.loadJobSpecNode() state.jobSpecNode.loadConfiguration() state.dumpJobReport() badReport = False try...
465,490
def processFrameworkJobReport(): """ _processFrameworkJobReport_ Read the job report and insert external information such as datasets for each file entry. """ state = TaskState(os.getcwd()) state.loadRunResDB() state.loadJobSpecNode() state.jobSpecNode.loadConfiguration() state.dumpJobReport() badReport = False try...
def processFrameworkJobReport(): """ _processFrameworkJobReport_ Read the job report and insert external information such as datasets for each file entry. """ state = TaskState(os.getcwd()) state.loadRunResDB() state.loadJobSpecNode() state.jobSpecNode.loadConfiguration() state.dumpJobReport() badReport = False try...
465,491
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
465,492
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
465,493
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
465,494
def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False
def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False
465,495
def setDBSDropDown(self): ## Get DBS URL by Drop Down control = self.br.find_control("custom_sb4",type="select") dbs_url = self.DBSByValueDict[control.value[0]]
def setDBSDropDown(self): ## Get DBS URL by Drop Down control = self.br.find_control("custom_sb4",type="select") dbs_url = self.DBSByValueDict[control.value[0]]
465,496
def getRequests(self,**kargs): requests = [] if self.isLoggedIn: self.selectQueryForm(**kargs) self.createValueDicts() self.br.select_form(name="bug_form") response = self.br.submit()
def getRequests(self,**kargs): requests = [] if self.isLoggedIn: self.selectQueryForm(**kargs) self.createValueDicts() self.br.select_form(name="bug_form") response = self.br.submit()
465,497
def getRequests(self,**kargs): requests = [] if self.isLoggedIn: self.selectQueryForm(**kargs) self.createValueDicts() self.br.select_form(name="bug_form") response = self.br.submit()
def getRequests(self,**kargs): requests = [] if self.isLoggedIn: self.selectQueryForm(**kargs) self.createValueDicts() self.br.select_form(name="bug_form") response = self.br.submit()
465,498
def getRequests(self,**kargs): requests = [] if self.isLoggedIn: self.selectQueryForm(**kargs) self.createValueDicts() self.br.select_form(name="bug_form") response = self.br.submit()
def getRequests(self,**kargs): requests = [] if self.isLoggedIn: self.selectQueryForm(**kargs) self.createValueDicts() self.br.select_form(name="bug_form") response = self.br.submit()
465,499