rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
pass | self._update() | def write_char(self, char): if self.exercise.is_character_match(char): self.exercise.get_current_sequence().write_char(char) self._update() self.set_can_save(True) else: pass |
except Exception as e: | except Exception, e: | def install_app(self, remove=False): if self.noapp: return |
from optparse import OptionParser | 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... | |
if opts.proxy: from proxy.api import setup_proxy setup_proxy(opts.proxy) | 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... | |
if (not opts.proxy) and conf['proxy']: from proxy.api import setup_proxy | if opts.proxy: setup_proxy(opts.proxy) elif conf['proxy']: | 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... |
_placehold_pat = re.compile('/PLACEHOLD' * 5 + '([^\0]*)\0') | _placehold_pat = re.compile('/PLACEHOLD' * 5 + '([^\0\\s]*)\0') | 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) |
import platform | def get_arch(): import platform if '64' in platform.architecture()[0]: return 'amd64' else: return 'x86' | |
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 | |
rat = float(n) / size | if size == 0: rat = 1 else: rat = float(n) / size | 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 |
size = sum(self.z.getinfo(name).file_size for name in self.arcnames) | 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) 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(... |
self.installed_size = size | 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(... | |
egg_pat = re.compile(r'([\w.]+)-([\w.]+)-(\d+).egg$') | egg_pat = re.compile(r'([\w.]+)-([\w.]+)-(\d+)\.egg$') | def filename_dist(dist): return split_dist(dist)[1] |
help="show information about package(s)") | help="show information about a package") | 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... |
if opts.info: if len(args) != 1: p.error("Option requires one argument (the name)") info_option(conf['info_url'], c, req.name) return | 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... | |
placehold_pat = re.compile('(/PLACEHOLD){5,}([^\0\\s]*)\0') | placehold_pat = re.compile(5 * '/PLACEHOLD' + '([^\0\\s]*)\0') | 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) |
data = f.read() | data = f.read(262144) | 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... |
gr2 = m.group(2) | rest = m.group(1) while rest.startswith('/PLACEHOLD'): rest = rest[10:] | 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... |
while gr2.startswith('/PLACEHOLD'): gr2 = gr2[10:] if tp.startswith('MachO-') and gr2.startswith('/'): | if tp.startswith('MachO-') and rest.startswith('/'): | 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... |
r = find_lib(gr2[1:]) | r = find_lib(rest[1:]) | 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... |
assert gr2 == '' or gr2.startswith(':') | assert rest == '' or rest.startswith(':') | 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... |
rpaths.extend(p for p in gr2.split(':') if p) | rpaths.extend(p for p in rest.split(':') if p) | 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... |
except: print("Warning: An error occurred while %sinstalling application " "item" % ('un' if remove else '')) | except Exception as e: print("Warning (%sinstalling application item):\n%r" % ('un' if remove else '', e)) | def install_app(self, remove=False): if self.noapp: return |
if opts.proxy: proxy = opts.proxy else: proxy = conf['proxy'] if proxy: from proxy.api import setup_proxy setup_proxy(proxy) | 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... | |
password2 = getpass('Confirm passowrd: ') | password2 = getpass('Confirm password: ') | def input_userpass(): from getpass import getpass print """\ |
return getUtility(IAuthentication).getPrincipal(self.__name__) | return getPrincipal(self.__name__) | def principal(self): try: return getUtility(IAuthentication).getPrincipal(self.__name__) except PrincipalLookupError: return None |
curr_x = curr_x - 100 if (curr_x <= 50): curr_x = 50 | curr_x = curr_x - 20 if (curr_x <= 10): curr_x = 10 | 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) |
curr_x = curr_x + 100 if (curr_x >= 650): curr_x = 650 | curr_x = curr_x + 20 if (curr_x >= 690): curr_x = 690 | 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) |
print curr_y | def fire(self): (curr_x, curr_y) = self.pos print curr_y Projectile(self.pos,self.angle,self.velocity) | |
tx = self.t/10.0 | tx = self.t/50.0 | 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... |
size = ((proj_y / 20) + self.min_size) | size = ((proj_y / 2) + 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... |
print "proj_x:" + str(proj_x) | 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... | |
if (curr_y >= 500 and curr_y <= 600): | if (proj_x > 11 and proj_x < 12): | 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... |
print proj_y | print "proj_y: " + str(proj_y) | 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... |
self.pos = (curr_x, (curr_y + (tx*10))) | self.pos = (curr_x,curr_y) | 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... |
items = re.split("\-|\*", " ".join([item.strip() for item in entry.desc if item])) | raw_items = [item.strip().replace('"', '"') for item in entry.desc if item] string = "" items = [] for item in raw_items: if item.startswith('-') or item.startswith('*'): if string: items.append(string) string = item.lstrip('-* ') else: string += item if string: items.append(string) | 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].... |
u = u.replace('./', '../') | u = u.replace('./', '../' * len(e.repo)) | 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... |
id_count = DEFAULT_ID_DELTA | id_count = 0 | 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... |
self.index = '' | self.index_count = 0 | 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 get_ids(): """Parse the IDS file. Parse the IDS file and return a list of the id's. Includes all tests and other attributes of a protocol like tester and changeset to check if a new submitted protocol is complete. """ f_ids = open(IDS, 'r') ids = [id.strip() for id in f_ids.readlines()] f_ids.close() return ids | def is_empty(self): return bool(self.title or self.url or self.desc or self.label) | |
index = 0 | 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... | |
cur.index_count += 1 | 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]... | |
entry.index = "% | entry.index = ''.join(entry.id) | 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]... |
content = [HTML_HEAD % ("../" + STYLESHEET_NAME)] | content = [HTML_HEAD % (("../" * len(e.repo)) + STYLESHEET_NAME)] | 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... |
file_name = ''.join(entry.label).strip().replace(' ', '-').replace(',', '').lower() | file_name = label2filename(entry.label) | 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... |
self.sum_status = {'Preparation': 0, 'Production': 0, 'Maintenance': 0, 'Process': 0, 'W-up': 0} | self.sum_status = {'Preparation': 0, 'Production': 0, 'Maintenance': 0, 'Process': 0, 'W-up': 0, 'JobEnd': 0} | 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 # ... |
sys.exit(0) | return False | 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 ... |
print "Error: Preparation started before previous Preparation ends" | self.report_error(917, self.sumups[key][1]) | 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 ... |
print "Error: Production started before previous Production ends" | self.report_error(918, self.sumups[key][1]) | 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 ... |
elif key[1] == 'Maintenance': | elif key[1] in ['Maintenance', 'JobEnd']: | 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 ... |
print "Warning: Preparation without Production" | self.report_error(804) | 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 ... |
self.report_error(803) print badids | thelines = [] for theid in badids: idx = [line[4] for line in self.content].index(theid) thelines += [(idx+1,) + (self.content[idx])] self.report_error(803, thelines) | 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 ... |
prekey == self.get_key_for_concatenate(prekey) | prekey = self.get_key_for_concatenate(prekey) | def gen_output_for_key(self, keys, idx): |
print 'Warning: Trivial Sum-up with nothing to concatenate.' | self.report_error(916, self.sumups[key][1]) self.sumups[key][0] = self.SUM_TRIVIAL_BUT_NEEDED self.output[key] = (lnum, stime, jobid, sumup_name, duration, impcount) | def gen_output_for_key(self, keys, idx): |
print 'Warning: Trivial Sum-up with nothing to concatenate.' else: | self.report_error(916, self.sumups[key][1]) self.sumups[key][0] = self.SUM_TRIVIAL_BUT_NEEDED self.output[key] = (lnum, stime, jobid, sumup_name, duration, impcount) elif key[1] in ['Maintenance', 'Process', 'W-up', 'JobEnd']: | def gen_output_for_key(self, keys, idx): |
print "%10d %s %6s %15s %0.2f %10d" % line | print "%10d %s %6s %15s %6.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 |
if not bde.readfile("tmp.bde"): | if not bde.readfile("good.bde"): | 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 |
interspersed=True) | interspersed=False) | def __init__(self,args=None): description=""" |
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 it") | 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 if they had to be defin... | 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... |
if self.opts.stripQuotes: if val[0]=='"': val=val[1:] if val[-1]=='"': val=val[:-1] | 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] | |
name,value pairs or mapping, if applicable. If """ | name,value pairs or mapping, if applicable.""" | 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 |
command += '--chained-input=output \\\n' | command += '--chained-input=%s \\\n' % ( steps[step]['inputModule']) | 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 ... |
executable = os.path.join(self.workingDir, bossJob['executable'] ) if not os.path.exists( executable ): | executable = bossJob['executable'] executablePath = os.path.join(self.workingDir, executable) updateJob = False if not self.isBulk and not executable.count(self.singleSpecName): executable = self.singleSpecName + '-submit' executablePath = os.path.join(self.workingDir, executable) msg = "This job %s was originally sumb... | def prepareResubmission(self, bossJob): """ __prepareResubmission__ |
% executable) self.makeWrapperScript( executable, "$1" ) | % executablePath) self.makeWrapperScript( executablePath, "$1" ) | def prepareResubmission(self, bossJob): """ __prepareResubmission__ |
self.report.exitCode = 60312 self.report.status = "Failed" self.report.addError(msg, "StageOutError") | self.report.exitCode = 60314 self.report.status = "Failed" newError = self.report.addError(60314, "StageOutError") newError['Description'] = msg | 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 ... |
self.report.addError(msg, "StageOutError") | newError = self.report.addError(60312, "StageInError") newError['Description'] = msg | 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 ... |
self.report.exitCode = 60312 | self.report.exitCode = 60314 | 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 ... |
runs_to_process = [] | runs_to_process = set() | def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False |
runs_to_process.extend(list(blocks[block]['Runs'])) | runs_to_process = runs_to_process.union(blocks[block]['Runs']) | def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False |
dqmData['Runs'] = ",".join(runs_to_process) | dqmData['Runs'] = ",".join(list(runs_to_process)) | def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False |
def localCustomization(self, config, merge = False): """ Apply site specific customizations to the config """ site_config = self.taskState.getSiteConfig() self.ioCustomization(config, site_config.io_config, merge) def ioCustomization(self, config, custom_config, merge = False): """ Apply site specific io customizati... | def localCustomization(self, config, merge = False): """ Apply site specific customizations to the config """ site_config = self.taskState.getSiteConfig() | |
self.localCustomization(self.jobSpecNode.cfgInterface) | def createPSet(self): """ _createPSet_ | |
self.localCustomization(self.jobSpecNode.cfgInterface, merge = True) | def createMergePSet(self): """ _createMergePSet_ | |
timingInfo.write('Min. time on %s: %s s\n' % tuple(max)) | timingInfo.write('Min. time on %s: %s s\n' % tuple(min)) | 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 ... |
self.setdefault("JSToolUI" , "ProdAgent") | self.setdefault("JSToolUI" , None) | 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... |
elif err.message().find( "Job current status doesn" ) != -1: | elif err.message().find("Output not yet Ready") != -1 or \ err.message().find( "Job current status doesn" ) != -1: | def getOutput(cls, job, task, schedSession ): """ __getOutput__ |
print "DEBUG 777 setting fileclass %s" % fileclass | print "DEBUG 777 creating %s" % targetDir | def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_ |
if not self.isBulk and not executable.count(self.singleSpecName): | if not self.isBulk and (not executable.count(self.singleSpecName) or \ not oldGlobalSandbox.count(self.singleSpecName)): | def prepareResubmission(self, bossJob): """ __prepareResubmission__ |
msg += "Submission. Making a new wrapping script %s for single submission." \ | msg += "Submission." msg += " Making a new wrapping script %s for single submission." \ | def prepareResubmission(self, bossJob): """ __prepareResubmission__ |
self.bossTask = self.bossLiteSession.loadTask( bossJob['taskId'], bossJob['jobId'] ) | def prepareResubmission(self, bossJob): """ __prepareResubmission__ | |
if len(splittedPayload) == 3 and splittedPayload[2] != 'all': jobsToKill = eval(str(splittedPayload[2])) | if len(splittedPayload) == 2 and splittedPayload[1] != 'all': jobsToKill = eval(str(splittedPayload[1])) | def killTask(self, taskSpecId): """ |
cfg = node.cfgInterface | cfgInter = node.cfgInterface | 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 + ... |
pfn = self.localStageOut(lfn, fileToStage['PFN'], fileToStage['Checksums']) | checksums = fileToStage.get('Checksums', None) pfn = self.localStageOut(lfn, fileToStage['PFN'], checksums) | def __call__(self, **fileToStage): """ _operator()_ |
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 in state.jobSpecNode._InputLinks: if not link["AppearStandalone"]: pa... | 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... | |
x['LFN'] in (None, '')] | x['LFN'] in (None, '') and \ x['PFN'] not in [y['PFN'] for y in state.parentsForwarded]] | 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... |
try: version = os.environ.get("CMSSW_VERSION") except: | version = os.environ.get("CMSSW_VERSION") if version is None: | 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 ... |
try: architecture = os.environ.get("SCRAM_ARCH") except: | architecture = os.environ.get("SCRAM_ARCH") if architecture is None: | 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 ... |
scriptsDir = '$PUTIL' | scriptsDir = os.path.expandvars(os.environ.get('PUTIL', None)) | 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 ... |
print 'failed' | print 'failed: %s' % error | def endElement(self, name): global is_dataset if name == 'dataset': is_dataset = False |
msg = 'DBS URL of the old request is neither analysis_01 nor analysis_02. Please, check!' | msg = 'DBS URL of the old request is neither analysis_01, analysis_02 nor local_09. Please, check!' | 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]] |
group_squad = 'cms-storeresults-'+self.GroupByValueDict[group_id].replace("-","_") | group_squad = 'cms-storeresults-'+self.GroupByValueDict[group_id].replace("-","_").lower() | def getRequests(self,**kargs): requests = [] if self.isLoggedIn: self.selectQueryForm(**kargs) self.createValueDicts() self.br.select_form(name="bug_form") response = self.br.submit() |
new_dataset = "" dataset_prefix = "StoreResults"+dataset_version | if len(dataset_version)>0: dataset_prefix = "StoreResults-"+dataset_version else: dataset_prefix = "StoreResults" | def getRequests(self,**kargs): requests = [] if self.isLoggedIn: self.selectQueryForm(**kargs) self.createValueDicts() self.br.select_form(name="bug_form") response = self.br.submit() |
infoDict["cmsswRelease"] = self.ReleaseByValueDict[release_id[0]] | try: infoDict["cmsswRelease"] = self.ReleaseByValueDict[release_id[0]] except: continue | def getRequests(self,**kargs): requests = [] if self.isLoggedIn: self.selectQueryForm(**kargs) self.createValueDicts() self.br.select_form(name="bug_form") response = self.br.submit() |
ds['DataTier'], \ ds['ProcessedDataset']) \ | ds['ProcessedDataset'], \ ds['DataTier']) \ | def closeRequest(self, workflowFile): """ _closeRequest_ |
expr = '' is_the_first = True for run in runs_list: if is_the_first: expr += "(" is_the_first = False else: expr += " or " if run.count("-"): run_limits = \ [x.strip() for x in run.split('-') if x.strip()] expr += "(x >= %s and x <= %s)" % ( run_limits[0], run_limits[1]) else: expr += "x == %s" % run if not is_the_fi... | if runs_list: expr = '' is_the_first = True for run in runs_list: if is_the_first: expr += "(" is_the_first = False else: expr += " or " if run.count("-"): run_limits = \ [x.strip() for x in run.split('-') if x.strip()] expr += "(x >= %s and x <= %s)" % ( run_limits[0], run_limits[1]) else: expr += "x == %s" % run if... | 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 ... |
[str(x['RunNumber']) for x in input_file['RunsList']] | [int(x['RunNumber']) for x in input_file['RunsList']] | 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 ... |
dqmData['Runs'] = ",".join(list(runs_to_process)) | dqmData['Runs'] = \ ",".join([str(x) for x in list(runs_to_process)]) | 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 ... |
msg += ex | msg += str(ex) | def publishStatusToDashboard(self, jobSpecId, data): """ _publishStatusToDashboard_ |
targetDirCheck = "rfstat %s 2> /dev/null | grep Protection" % targetDir print "Check dir existence : %s" % targetDirCheck try: targetDirCheckExitCode, targetDirCheckOutput = runCommandWithOutput(targetDirCheck) except Exception, ex: msg = "Error: Exception while invoking command:\n" msg += "%s\n" % targetDirCheck msg +... | if not self.checkDirExists(targetDir): | def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_ |
fileclassDirCheck = "rfstat %s 2> /dev/null | grep Protection" % fileclassDir print "Check dir existence : %s" % fileclassDirCheck try: fileclassDirCheckExitCode, fileclassDirCheckOutput = runCommandWithOutput(fileclassDirCheck) except Exception, ex: msg = "Error: Exception while invoking command:\n" msg += "%s\n" % rf... | if not self.checkDirExists(fileclassDir): | def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_ |
self.createDir(fileclassDir, self.permissions) | self.createDir(fileclassDir) | def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.