rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
raise ScanError('Could probably not shutdown clamd') | raise ConnectionError('Could probably not shutdown clamd') | def shutdown(self): """ Force Clamd to shutdown and exit |
- ScanError: in case of communication problem | - ConnectionError: in case of communication problem - ScanError: in case of clamd reporting problems scanning | def scan_file(self, file): """ Scan a file or directory given by filename and stop on first virus or error found. Scan with archive support enabled. |
raise ScanError('Unable to scan %s' % file) | raise ConnectionError('Unable to scan %s' % file) | def scan_file(self, file): """ Scan a file or directory given by filename and stop on first virus or error found. Scan with archive support enabled. |
dr[filename] = reason | dr[filename] = ('FOUND', '{0}'.format(reason)) | def scan_file(self, file): """ Scan a file or directory given by filename and stop on first virus or error found. Scan with archive support enabled. |
- ScanError: in case of communication problem | - ConnectionError: in case of communication problem - ScanError: in case of clamd reporting problems scanning | def multiscan_file(self, file): """ Scan a file or directory given by filename using multiple threads (faster on SMP machines). Do not stop on error or virus found. Scan with archive support enabled. |
raise ScanError('Unable to scan %s' % file) | raise ConnectionError('Unable to scan %s' % file) | def multiscan_file(self, file): """ Scan a file or directory given by filename using multiple threads (faster on SMP machines). Do not stop on error or virus found. Scan with archive support enabled. |
dr[filename] = ('ERROR', '{0}'.format(reason)) | raise ScanError(reason) | def multiscan_file(self, file): """ Scan a file or directory given by filename using multiple threads (faster on SMP machines). Do not stop on error or virus found. Scan with archive support enabled. |
- ScanError: in case of communication problem | - ConnectionError: in case of communication problem | def contscan_file(self, file): """ Scan a file or directory given by filename Do not stop on error or virus found. Scan with archive support enabled. |
raise ScanError('Unable to scan %s' % file) | raise ConnectionError('Unable to scan %s' % file) | def contscan_file(self, file): """ Scan a file or directory given by filename Do not stop on error or virus found. Scan with archive support enabled. |
- ScanError: in case of communication problem | - ConnectionError: in case of communication problem - ScanError: in case of clamd reporting problems scanning | def scan_stream(self, buffer): """ Scan a buffer |
raise ScanError('Unable to scan stream') | raise ConnectionError('Unable to scan stream') | def scan_stream(self, buffer): """ Scan a buffer |
raise BufferTooLongError,'INSTREAM size limit exceeded. ERROR' | raise BufferTooLongError(result) | def scan_stream(self, buffer): """ Scan a buffer |
dr[filename] = reason | dr[filename] = ('FOUND', '{0}'.format(reason)) | def scan_stream(self, buffer): """ Scan a buffer |
raise ScanError('Could not reach clamd using unix socket (%s)' % | raise ConnectionError('Could not reach clamd using unix socket (%s)' % | def __init_socket__(self): """ internal use only """ try: self.clamd_socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) self.clamd_socket.connect(self.unix_socket) if self.timeout is not None: self.clamd_socket.settimeout(clamd_timeout) except socket.error: raise ScanError('Could not reach clamd using unix sock... |
raise ScanError('Could not reach clamd using network (%s, %s)' % | raise ConnectionError('Could not reach clamd using network (%s, %s)' % | def __init_socket__(self): """ internal use only """ try: self.clamd_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.clamd_socket.connect((self.host, self.port)) if self.timeout is not None: self.clamd_socket.settimeout(clamd_timeout) |
assert type(port) in types.IntType, 'Wrong type for [port], should be an int [was {0}]'.format(type(port)) | assert type(port) in (types.IntType, ), 'Wrong type for [port], should be an int [was {0}]'.format(type(port)) | def __init__(self, host='127.0.0.1', port=3310, timeout=None): """ class initialisation |
self.install_progress_window.modify_bg(gtk.STATE_NORMAL, " | self.install_progress_window.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(' | def switch_progress_windows(self, use_install_window=True): self.debconf_progress_window.hide() if use_install_window: self.old_progress_window = self.debconf_progress_window self.old_progress_info = self.progress_info self.old_progress_bar = self.progress_bar self.old_progress_cancel_button = self.progress_cancel_butt... |
self.progress_info.set_markup('<i>Setting up your device...</i>') | self.progress_info.set_justify(gtk.JUSTIFY_CENTER) if self.oem_user_config: self.progress_info.set_markup('<span color="white"><b>Configuring Jolicloud</b></span>') else: self.progress_info.set_markup('<span color="white"><b>Installing Jolicloud</b></span>') | def debconf_progress_info (self, progress_info): if self.progress_cancelled: return False self.progress_info.set_markup('<i>Setting up your device...</i>') return True |
split = list_splitter.split(s); for item in split: if item: result.append(item) | lex = ConfigTokenizer(s); for item in lex: if item.is_value(): result.append(str(item)) | def decode_list(self, s): result = [] split = list_splitter.split(s); for item in split: if item: result.append(item) return result |
def quote(self, value): result = '' result = re.sub(r'([\\\"\'])', r'\\\1', value) return '"%s"' % result | def read(self): """ Reads configuration settings from the config file and loads then into the Settings dictionaries. """ self.config.read(self.filename) if not self.config.has_section("General"): self.config.add_section("General") for key, value in self.config.items("General"): if key.endswith('list'): value = self.d... | |
w.writerows(members.values()) | w.writerows([[unicode(c).encode('latin-1') for c in r] for r in members.values()]) | def write_csv(f, members): w = csv.writer(open(f, "w+")) w.writerow(HEADER) w.writerows(members.values()) |
print sheet.nrows | def read_xls(f): book = xlrd.open_workbook(f) sheet = book.sheet_by_index(0) leden = {} print sheet.nrows for i in xrange(1,sheet.nrows-1): # Skip header and "Totaal:" row row = sheet.row(i) #print i, int(row[LIDNUMMER].value) leden[int(row[LIDNUMMER].value)] = [c.value for c in row] return leden | |
print "%s-plus.csv" % (d), | print "%s-plus.csv\t%d" % (d, len(plus_split[d])) | def split_by_department(members): s = dict() for d in AFDELINGEN.keys(): tmp = dict() for id in members.keys(): pc = parse_postcode(members[id][POSTCODE]) for r in AFDELINGEN[d]: if (pc >= r[0]) and (pc <= r[1]): tmp[id] = members[id] if tmp: s[d] = tmp return s |
print "Done" | def split_by_department(members): s = dict() for d in AFDELINGEN.keys(): tmp = dict() for id in members.keys(): pc = parse_postcode(members[id][POSTCODE]) for r in AFDELINGEN[d]: if (pc >= r[0]) and (pc <= r[1]): tmp[id] = members[id] if tmp: s[d] = tmp return s | |
print "%s-min.csv" % (d), | print "%s-min.csv\t%d" % (d, len(min_split[d])) | def split_by_department(members): s = dict() for d in AFDELINGEN.keys(): tmp = dict() for id in members.keys(): pc = parse_postcode(members[id][POSTCODE]) for r in AFDELINGEN[d]: if (pc >= r[0]) and (pc <= r[1]): tmp[id] = members[id] if tmp: s[d] = tmp return s |
print "%s-upd.csv" % (d), | print "%s-upd.csv\t%d" % (d, len(changed_split[d])) | def split_by_department(members): s = dict() for d in AFDELINGEN.keys(): tmp = dict() for id in members.keys(): pc = parse_postcode(members[id][POSTCODE]) for r in AFDELINGEN[d]: if (pc >= r[0]) and (pc <= r[1]): tmp[id] = members[id] if tmp: s[d] = tmp return s |
c.executemany("INSERT INTO jos_acajoom_subscribers ('name', 'email') VALUES ('%s', '%s')", values) | c.executemany("INSERT INTO jos_acajoom_subscribers (name, email) VALUES (%s, %s)", values) | def split_by_department(members): s = dict() for d in AFDELINGEN.keys(): tmp = dict() for id in members.keys(): pc = parse_postcode(members[id][POSTCODE]) for r in AFDELINGEN[d]: if (pc >= r[0]) and (pc <= r[1]): tmp[id] = members[id] if tmp: s[d] = tmp return s |
c.executemany("INSERT INTO jos_acajoom_queue ('subscriber_id', 'list_id') VALUES ((SELECT id FROM jos_acajoom_subscribers WHERE 'email' = '%s' LIMIT 1), (SELECT id FROM jos_acajoom_lists WHERE 'list_name' = 'Nieuwsbrief %s'))", values) | c.executemany("INSERT INTO jos_acajoom_queue (subscriber_id, list_id) VALUES ((SELECT id FROM jos_acajoom_subscribers WHERE email = %s LIMIT 1), (SELECT id FROM jos_acajoom_lists WHERE list_name = 'Nieuwsbrief %s'))", values) | def split_by_department(members): s = dict() for d in AFDELINGEN.keys(): tmp = dict() for id in members.keys(): pc = parse_postcode(members[id][POSTCODE]) for r in AFDELINGEN[d]: if (pc >= r[0]) and (pc <= r[1]): tmp[id] = members[id] if tmp: s[d] = tmp return s |
same = list(set(oldlist.keys()) or set(newlist.keys())) | intersect = list(set(oldlist.keys()) & set(newlist.keys())) | def get_changed_members(oldlist, newlist): # Get the members who still exsist # or is not the right operator vv same = list(set(oldlist.keys()) or set(newlist.keys())) # Find out who has changed changed = [] for id in same: if oldlist[id] != newlist[id]: changed.append(id) return changed |
changed = [] for id in same: if oldlist[id] != newlist[id]: changed.append(id) | changed = filter(lambda id: oldlist[id] != newlist[id], intersect) | def get_changed_members(oldlist, newlist): # Get the members who still exsist # or is not the right operator vv same = list(set(oldlist.keys()) or set(newlist.keys())) # Find out who has changed changed = [] for id in same: if oldlist[id] != newlist[id]: changed.append(id) return changed |
return int(s.strip()[:4]) | try: return int(s.strip()[:4]) except: return False | def parse_postcode(s): return int(s.strip()[:4]) |
old = read_csv(sys.argv[1]) new = read_csv(sys.argv[2]) | old = read_xls(sys.argv[1]) new = read_xls(sys.argv[2]) | def split_by_department(members): s = dict() for d in AFDELINGEN.keys(): tmp = dict() for id in members.keys(): pc = parse_postcode(members[id][POSTCODE]) for r in AFDELINGEN[d]: if (pc >= r[0]) and (pc <= r[1]): tmp[id] = members[id] if tmp: s[d] = tmp return s |
listiovCommand = '../bin/slc5_ia32_gcc434/cmscond_list_iov -c ' + connect + ' -t ' + tag | listiovCommand = 'cmscond_list_iov -c ' + connect + ' -t ' + tag | def listIov(connect, tag, passwd): listiovCommand = '../bin/slc5_ia32_gcc434/cmscond_list_iov -c ' + connect + ' -t ' + tag if passwd != 'None': listiovCommand = listiovCommand + ' -P ' + passwd statusAndOutput = commands.getstatusoutput(listiovCommand) if statusAndOutput[0] != 0: print warning("Warning") + ": listiov... |
loadiovCommand = '../bin/slc5_ia32_gcc434/cmscond_load_iov -c ' + connect + ' ' + iovLoadFileName | loadiovCommand = 'cmscond_load_iov -c ' + connect + ' ' + iovLoadFileName | def duplicateIovTag(connect, tag, newtag, passwd): statusAndOutput = listIov(connect,tag,passwd) if statusAndOutput[0] != 0: return statusAndOutput splitOutput = statusAndOutput[1].split("\n") #print splitOutput iovLoadFileName = '/tmp/'+ newtag + ".txt" iovLoadFile = open(iovLoadFileName, 'w') index = 0 for line in... |
duplicateiovCommand = "../bin/slc5_ia32_gcc434/cmscond_duplicate_iov -c " + connect + ' -t ' + tag + ' -f ' + run + ' -s ' + run | duplicateiovCommand = "cmscond_duplicate_iov -c " + connect + ' -t ' + tag + ' -f ' + run + ' -s ' + run | def duplicateIov(connect, tag, run, passwd): duplicateiovCommand = "../bin/slc5_ia32_gcc434/cmscond_duplicate_iov -c " + connect + ' -t ' + tag + ' -f ' + run + ' -s ' + run if passwd != 'None': duplicateiovCommand = duplicateiovCommand + ' -P ' + passwd duplicateiovStatusAndOutput = commands.getstatusoutput(duplica... |
if 'CMSSW_3_6' in releasearea or 'CMSSW_3_5' in releasearea : | if 'CMSSW_3_6' in releasearea or 'CMSSW_3_7' in releasearea : | def runGTSelection(gts, gtmap, isLocal, nThreads=4, original=False, show=False) : stdList = ['5.2', # SingleMu10 FastSim '7', # Cosmics+RECOCOS+ALCACOS '8', # BeamHalo+RECOCOS+ALCABH '25', # TTbar+RECO2+ALCATT2 STARTUP ] hiStatList = [ '121', # TTbar_Tauola '123.3', # TTBar FastSim ] mrd = MatrixReader() file... |
revision = '$Revision: 1.6 $' | revision = '$Revision: 1.7 $' | def editConfFileConnect(filename, newfilename, globaltag, newconnect): # read the original file conffile = open(filename, "r") inlines = conffile.readlines() conffile.close() # create the new file newconffile = open(newfilename, "w") for line in inlines: if line.rstrip() == 'connect=sqlite_file:' + globaltag + '.db': ... |
remote_cmd += checksum_cmd | if len(checksum_cmd) != 4: remote_cmd += checksum_cmd | def editConfFileConnect(filename, newfilename, globaltag, newconnect): # read the original file conffile = open(filename, "r") inlines = conffile.readlines() conffile.close() # create the new file newconffile = open(newfilename, "w") for line in inlines: if line.rstrip() == 'connect=sqlite_file:' + globaltag + '.db': ... |
print remote_cmd sys.exit(1) | statandout = commands.getstatusoutput(remote_cmd) | def editConfFileConnect(filename, newfilename, globaltag, newconnect): # read the original file conffile = open(filename, "r") inlines = conffile.readlines() conffile.close() # create the new file newconffile = open(newfilename, "w") for line in inlines: if line.rstrip() == 'connect=sqlite_file:' + globaltag + '.db': ... |
if 'CMSSW_3_8' in releasearea : | if 'CMSSW_3_6' in releasearea or 'CMSSW_3_5' in releasearea : command = command.replace('auto:mc',gtName+"::All") command = command.replace('auto:startup',gtName+"::All") command = command.replace('auto:craft08',gtName+"::All") command = command.replace('auto:craft09',gtName+"::All") command = command.replace('auto:... | def modifyCommandForGT(command, gtName, isLocal): if command == None: return command releasearea = os.environ["CMSSW_BASE"] if 'CMSSW_3_8' in releasearea : conditionOpt = gtName + "::All,sqlite_file:/afs/cern.ch/user/c/cerminar/public/Alca/GlobalTag/" + gtName + ".db" command = command.replace('auto:mc',conditionOpt)... |
else : command = command.replace('auto:mc',gtName+"::All") command = command.replace('auto:startup',gtName+"::All") command = command.replace('auto:craft08',gtName+"::All") command = command.replace('auto:craft09',gtName+"::All") command = command.replace('auto:com10',gtName+"::All") if isLocal and "cmsDriver" in comm... | def modifyCommandForGT(command, gtName, isLocal): if command == None: return command releasearea = os.environ["CMSSW_BASE"] if 'CMSSW_3_8' in releasearea : conditionOpt = gtName + "::All,sqlite_file:/afs/cern.ch/user/c/cerminar/public/Alca/GlobalTag/" + gtName + ".db" command = command.replace('auto:mc',conditionOpt)... | |
class IOVEntry(): | class IOVEntry: | def __str__(self): return "rcd: \'" + tuple.__getitem__(self,0) + "\' label: \'" + tuple.__getitem__(self,1) + "\'" |
class IOVTable(): | class IOVTable: | def token(self): return self._payloadToken |
if entry.isInPrepAccount() and not self._tagList[index].isInPrepAccount(): self._tagsInPrep.append(index) if not entry.isInPrepAccount() and self._tagList[index].isInPrepAccount(): self._tagsInPrep.remove(index) | def replaceEntry(self, entry): if self.hasRcdID(entry.rcdID()) == False: raise ValueError, "***Error: replaceEntry called for " + str(entry.rcdID()) + " not in the collection" # FIXME: check that the tag is not already the same as in the tag collection if entry == self.getByRcdID(entry.rcdID()): # print "tag: " + entry... | |
group=line.split('",')[8] energy=group.split(',')[0] | group=line.split(',')[8] print "GROUP: " + group | def get_map(): runfillmap={} fill=-1 FULLADDRESS="http://pccmsdqm04.cern.ch/runregistry/xmlrpc" print "RunRegistry from: ",FULLADDRESS server = xmlrpclib.ServerProxy(FULLADDRESS) # you can use this for single run query |
self.getByTag(tag).setConnect(connect) print " " + tag + ": " + connect | self.getByTag(tag).setConnect(connection) print " " + tag + ": " + connection | def modifyEntryConnection(self, tag, connection): if self.hasTag(tag): index = self._tagByTag[tag] if connection == 'frontier://FrontierPrep' and not self.getByTag(tag).isInPrepAccount(): self._tagsInPrep.append(index) |
oracleConn = 'oracle://cms_orcon_prep' | oracleConn = 'oracle://cms_orcoff_prep' | def getOraclePfn(self, online): if online == False: if self._connstring == 'frontier://FrontierProd': oracleConn = 'oracle://cms_orcoff_prod' elif self._connstring == 'frontier://FrontierPrep': oracleConn = 'oracle://cms_orcoff_prep' elif online == True: if self._connstring == 'frontier://FrontierProd': oracleConn = ... |
def isInPrepAccount(self): if self._connstring == 'frontier://FrontierPrep': return True return False | def getOraclePfn(self, online): if online == False: if self._connstring == 'frontier://FrontierProd': oracleConn = 'oracle://cms_orcoff_prod' elif self._connstring == 'frontier://FrontierPrep': oracleConn = 'oracle://cms_orcoff_prep' elif online == True: if self._connstring == 'frontier://FrontierProd': oracleConn = ... | |
if tag.isInPrepAccount(): self._tagsInPrep.append(index) | def addEntry(self, tag): # check if this is already in the collection if tag._tag in self._tagByTag or tag.rcdID() in self._tagByRcdAndLabelId: print error("***Error"),"adding entry:", tag othertagid = -1 if tag._tag in self._tagByTag: othertagid = self._tagByTag[tag._tag] else: othertagid = self._tagByRcdAndLabelId[ta... | |
if passwdfile == 'None': print error("***Error:") + " need to specify \'Passwd\' in [Common]" sys.exit(1) | def glbConnectReplace(self, newconnect): print "Force new connect: " + newconnect for entry in self._tagList: entry.setConnect(newconnect) return | |
print '-- Check tags -----------------------------' | print '-- Check all tags...' tagstobechecked = tagCollection._tagOrder if checkOnTags == 'new': print '-- Check new/modified tags...' tagstobechecked = tagCollection._newTags | def glbConnectReplace(self, newconnect): print "Force new connect: " + newconnect for entry in self._tagList: entry.setConnect(newconnect) return |
for tagidx in range(0,len(tagCollection._tagOrder)): theTag = tagCollection._tagList[tagCollection._tagOrder[tagidx]] | for tagidx in range(0,len(tagstobechecked)): theTag = tagCollection._tagList[tagstobechecked[tagidx]] | def glbConnectReplace(self, newconnect): print "Force new connect: " + newconnect for entry in self._tagList: entry.setConnect(newconnect) return |
print tag | print " ", tag | def glbConnectReplace(self, newconnect): print "Force new connect: " + newconnect for entry in self._tagList: entry.setConnect(newconnect) return |
self._isForProd = True | def __init__(self, gtName, oldGT, scope, release, changelog): self._listTagLink = 'http://condb.web.cern.ch/condb/listTags/?GlobalTag=' + gtName self._gt = gtName self._oldGt = oldGT self._scope = scope self._release = release self._change = changelog | |
revision = '$Revision: 1.4 $' vnum = revision.lstrip('$Revision: ').rstrip(' $') | revision = '$Revision: 1.5 $' vnum = revision.lstrip('$') vnum = vnum.lstrip('Revision: ') vnum = vnum.rstrip(' $') | def editConfFileConnect(filename, newfilename, globaltag, newconnect): # read the original file conffile = open(filename, "r") inlines = conffile.readlines() conffile.close() # create the new file newconffile = open(newfilename, "w") for line in inlines: if line.rstrip() == 'connect=sqlite_file:' + globaltag + '.db': ... |
zcml._initialized = 0 | zcml._initialized = 0 except ImportError: pass | def cleanUp(): '''Cleans up the component architecture.''' _cleanUp() try: from Zope2.App import zcml except ImportError: from Products.Five import zcml zcml._initialized = 0 |
import pyvisfile.silo._internal as _internal | import sys | def _ignore_extra_int_vector_warning(): from warnings import filterwarnings filterwarnings("ignore", module="pyvisfile.silo", category=RuntimeWarning, lineno=43) |
for name, value in _internal.symbols().iteritems(): | for name, value in _intnl.symbols().iteritems(): | def _export_symbols(): for name, value in _internal.symbols().iteritems(): globals()[name] = value |
DBObjectType = _internal.DBObjectType DBdatatype = _internal.DBdatatype DBToc = _internal.DBToc DBCurve = _internal.DBCurve DBQuadMesh = _internal.DBQuadMesh DBQuadVar = _internal.DBQuadVar IntVector = _internal.IntVector get_silo_version = _internal.get_silo_version set_deprecate_warnings = _internal.set_deprecate_w... | DBObjectType = _intnl.DBObjectType DBdatatype = _intnl.DBdatatype DBToc = _intnl.DBToc DBCurve = _intnl.DBCurve DBQuadMesh = _intnl.DBQuadMesh DBQuadVar = _intnl.DBQuadVar IntVector = _intnl.IntVector get_silo_version = _intnl.get_silo_version set_deprecate_warnings = _intnl.set_deprecate_warnings | def _export_symbols(): for name, value in _internal.symbols().iteritems(): globals()[name] = value |
ol = _internal.DBOptlist(optcount, optcount * 150) | ol = _intnl.DBOptlist(optcount, optcount * 150) | def _convert_optlist(ol_dict): optcount = len(ol_dict) + 1 ol = _internal.DBOptlist(optcount, optcount * 150) for key, value in ol_dict.iteritems(): if isinstance(value, int): ol.add_int_option(key, value) else: ol.add_option(key, value) return ol |
class SiloFile(_internal.DBFile): | class SiloFile(_intnl.DBFile): | def _convert_optlist(ol_dict): optcount = len(ol_dict) + 1 ol = _internal.DBOptlist(optcount, optcount * 150) for key, value in ol_dict.iteritems(): if isinstance(value, int): ol.add_int_option(key, value) else: ol.add_option(key, value) return ol |
fileinfo="Created using Pylo", | fileinfo="Created using PyVisfile", | def __init__(self, pathname, create=True, mode=None, fileinfo="Created using Pylo", target=DB_LOCAL, filetype=None): if create: if mode is None: mode = DB_NOCLOBBER if filetype is None: filetype = DB_PDB _internal.DBFile.__init__(self, pathname, mode, target, fileinfo, filetype) else: if mode is None: mode = DB_APPEND ... |
_internal.DBFile.__init__(self, pathname, mode, target, | _intnl.DBFile.__init__(self, pathname, mode, target, | def __init__(self, pathname, create=True, mode=None, fileinfo="Created using Pylo", target=DB_LOCAL, filetype=None): if create: if mode is None: mode = DB_NOCLOBBER if filetype is None: filetype = DB_PDB _internal.DBFile.__init__(self, pathname, mode, target, fileinfo, filetype) else: if mode is None: mode = DB_APPEND ... |
_internal.DBFile.__init__(self, pathname, filetype, mode) | _intnl.DBFile.__init__(self, pathname, filetype, mode) | def __init__(self, pathname, create=True, mode=None, fileinfo="Created using Pylo", target=DB_LOCAL, filetype=None): if create: if mode is None: mode = DB_NOCLOBBER if filetype is None: filetype = DB_PDB _internal.DBFile.__init__(self, pathname, mode, target, fileinfo, filetype) else: if mode is None: mode = DB_APPEND ... |
_internal.DBFile.put_zonelist_2(self, names, nzones, ndims, | _intnl.DBFile.put_zonelist_2(self, names, nzones, ndims, | def put_zonelist_2(self, names, nzones, ndims, nodelist, lo_offset, hi_offset, shapetype, shapesize, shapecounts, optlist={}): _internal.DBFile.put_zonelist_2(self, names, nzones, ndims, nodelist, lo_offset, hi_offset, shapetype, shapesize, shapecounts, _convert_optlist(optlist)) |
_internal.DBFile.put_ucdmesh(self, mname, coordnames, coords, | _intnl.DBFile.put_ucdmesh(self, mname, coordnames, coords, | def put_ucdmesh(self, mname, coordnames, coords, nzones, zonel_name, facel_name, optlist={}): _internal.DBFile.put_ucdmesh(self, mname, coordnames, coords, nzones, zonel_name, facel_name, _convert_optlist(optlist)) |
_internal.DBFile.put_ucdvar1(self, vname, mname, vec, centering, | _intnl.DBFile.put_ucdvar1(self, vname, mname, vec, centering, | def put_ucdvar1(self, vname, mname, vec, centering, optlist={}): _internal.DBFile.put_ucdvar1(self, vname, mname, vec, centering, _convert_optlist(optlist)) |
_internal.DBFile.put_ucdvar(self, vname, mname, varnames, vars, centering, | _intnl.DBFile.put_ucdvar(self, vname, mname, varnames, vars, centering, | def put_ucdvar(self, vname, mname, varnames, vars, centering, optlist={}): _internal.DBFile.put_ucdvar(self, vname, mname, varnames, vars, centering, _convert_optlist(optlist)) |
_internal.DBFile.put_defvars(self, vname, vars) | _intnl.DBFile.put_defvars(self, vname, vars) | def put_defvars(self, vname, vars): """Add an defined variable ("expression") to this database. |
_internal.DBFile.put_pointmesh(self, mname, coords, | _intnl.DBFile.put_pointmesh(self, mname, coords, | def put_pointmesh(self, mname, coords, optlist={}): _internal.DBFile.put_pointmesh(self, mname, coords, _convert_optlist(optlist)) |
_internal.DBFile.put_pointvar1(self, vname, mname, var, | _intnl.DBFile.put_pointvar1(self, vname, mname, var, | def put_pointvar1(self, vname, mname, var, optlist={}): _internal.DBFile.put_pointvar1(self, vname, mname, var, _convert_optlist(optlist)) |
_internal.DBFile.put_pointvar(self, vname, mname, vars, | _intnl.DBFile.put_pointvar(self, vname, mname, vars, | def put_pointvar(self, vname, mname, vars, optlist={}): _internal.DBFile.put_pointvar(self, vname, mname, vars, _convert_optlist(optlist)) |
_internal.DBFile.put_quadmesh(self, mname, coords, coordtype, | _intnl.DBFile.put_quadmesh(self, mname, coords, coordtype, | def put_quadmesh(self, mname, coords, coordtype=DB_COLLINEAR, optlist={}): _internal.DBFile.put_quadmesh(self, mname, coords, coordtype, _convert_optlist(optlist)) |
_internal.DBFile.put_quadvar1(self, vname, mname, var, dims, centering, | _intnl.DBFile.put_quadvar1(self, vname, mname, var, dims, centering, | def put_quadvar1(self, vname, mname, var, dims, centering, optlist={}): _internal.DBFile.put_quadvar1(self, vname, mname, var, dims, centering, _convert_optlist(optlist)) |
_internal.DBFile.put_quadvar(self, vname, mname, | _intnl.DBFile.put_quadvar(self, vname, mname, | def put_quadvar(self, vname, mname, varnames, vars, dims, centering, optlist={}): _internal.DBFile.put_quadvar(self, vname, mname, varnames, vars, dims, centering, _convert_optlist(optlist)) |
_internal.DBFile.put_multimesh(self, mname, | _intnl.DBFile.put_multimesh(self, mname, | def put_multimesh(self, mname, mnames_and_types, optlist={}): _internal.DBFile.put_multimesh(self, mname, mnames_and_types, _convert_optlist(optlist)) |
_internal.DBFile.put_multivar(self, vname, | _intnl.DBFile.put_multivar(self, vname, | def put_multivar(self, vname, vnames_and_types, optlist={}): _internal.DBFile.put_multivar(self, vname, vnames_and_types, _convert_optlist(optlist)) |
_internal.DBFile.put_curve(self, curvename, xvals, yvals, | _intnl.DBFile.put_curve(self, curvename, xvals, yvals, | def put_curve(self, curvename, xvals, yvals, optlist={}): _internal.DBFile.put_curve(self, curvename, xvals, yvals, _convert_optlist(optlist)) |
self._added_mesh(vname, DBObjectType.DB_QUADVAR, optlist) | self._added_variable(vname, DBObjectType.DB_QUADVAR, optlist) | def put_quadvar1(self, vname, mname, var, dims, centering, optlist={}): self.data_file.put_quadvar1(vname, mname, var, dims, centering, optlist) self._added_mesh(vname, DBObjectType.DB_QUADVAR, optlist) |
self._added_mesh(vname, DBObjectType.DB_QUADVAR, optlist) | self._added_variable(vname, DBObjectType.DB_QUADVAR, optlist) | def put_quadvar(self, vname, mname, varnames, vars, dims, centering, optlist={}): self.data_file.put_quadvar(vname, mname, varnames, vars, dims, centering, optlist) self._added_mesh(vname, DBObjectType.DB_QUADVAR, optlist) |
) | zip_safe=False) | def handle_component(comp): if conf["USE_"+comp]: EXTRA_DEFINES["USE_"+comp] = 1 EXTRA_INCLUDE_DIRS.extend(conf[comp+"_INC_DIR"]) EXTRA_LIBRARY_DIRS.extend(conf[comp+"_LIB_DIR"]) EXTRA_LIBRARIES.extend(conf[comp+"_LIBNAME"]) |
_internal.DBFile.__init__(self, pathname, mode, filetype) | _internal.DBFile.__init__(self, pathname, filetype, mode) | def __init__(self, pathname, create=True, mode=None, fileinfo="Hedge visualization", target=DB_LOCAL, filetype=None): if create: if mode is None: mode = DB_NOCLOBBER if filetype is None: filetype = DB_PDB _internal.DBFile.__init__(self, pathname, mode, target, fileinfo, filetype) else: if mode is None: mode = DB_APPEND... |
package="plugins.%s" % name | package="plugins.%s.main" % name plugname="plugins.%s" % name | def unloadPlugin(name): global ircc package="plugins.%s" % name if ((name in loadedPlugins) == False): return "%s is not loaded" % name else: try: if (hasattr(sys.modules[package],"priv_%s" % name)): coha.priv_remove(name) if (hasattr(sys.modules[package],"pub_%s" % name)): coha.pub_remove(name) if (hasattr(sys.modules... |
if (n.startswith(package) == True): | if (n.startswith(plugname) == True): | def unloadPlugin(name): global ircc package="plugins.%s" % name if ((name in loadedPlugins) == False): return "%s is not loaded" % name else: try: if (hasattr(sys.modules[package],"priv_%s" % name)): coha.priv_remove(name) if (hasattr(sys.modules[package],"pub_%s" % name)): coha.pub_remove(name) if (hasattr(sys.modules... |
return '%s.%s'%(self.__parent__.fullNumber, self.position) return str(self.position) | return '%s.%s'%(self.__parent__.fullNumber, self.number) return str(self.number) | def fullNumber(self): if IUserManualPage.providedBy(self.__parent__): return '%s.%s'%(self.__parent__.fullNumber, self.position) return str(self.position) |
directory=None): | directory='.'): | def __init__(self, name, buildCmd='make clean uninstall; make', buildPhase=phaseEarly, directory=None): Entity.__init__(self, name) self.directory = directory self.buildCmd = buildCmd self.buildPhase = buildPhase |
p = subprocess.Popen(self.buildCmd, cwd='.', shell=True) | p = subprocess.Popen(self.buildCmd, cwd=self.directory, shell=True) | def build(self, buildPhase): if self.buildCmd is not None and buildPhase == self.buildPhase: p = subprocess.Popen(self.buildCmd, cwd='.', shell=True) p.wait() |
self.doBuild = True | self.build = True | def processArguments(self): """Process the command line arguments. """ try: opts, args = getopt.gnu_getopt(sys.argv[1:], 'm:d:t:c:hbiges:f:p:l:xq', ['help', 'hudson', 'target=', 'case=', 'build', 'ioc', 'gui', 'simulation', 'module=']) except getopt.GetoptError, err: return False for o, a in opts: if o in ('-h', '--hel... |
ge = group[-1][2] | ge = group[-1][3] | def combineLoci(record, min_distance): '''combined adjacent loci - this is somewhat cumbersome due to the format of the matches returned from msat (a dict with keys = motif). Essentially, we are running a pairwise comparison across all motifs located to determine which are within a predetermined distance from one anoth... |
title = "My Feedback" feedback = feedback.filter(user=request.user) | if not request.user.is_authenticated(): return HttpResponseRedirect('/accounts/login/?next=%s' % request.path) else: title = "My Feedback" feedback = feedback.filter(user=request.user) | def list(request, list=False, type=False, status=False): feedback = Feedback.objects.all().order_by('-created') if not list: list = "open" title = "Feedback" if list == "open": title = "Open Feedback" feedback = feedback.filter(status__status='open') elif list == "closed": title = "Closed Feedback" feedback = feedba... |
limit = collection.getItemCount() | def randomResults(self): collection = self.targetCollection() limit = collection.getItemCount() if collection is not None: results = [x for x in collection.queryCatalog(sort_on=None, object_provides=IImageContent.__identifier__)] try: random.shuffle(results) if limit: return results[:limit] return results except Attrib... | |
results = [x for x in collection.queryCatalog(sort_on=None, object_provides=IImageContent.__identifier__)] try: random.shuffle(results) if limit: return results[:limit] return results except AttributeError: return [] | limit = collection.getItemCount() if collection is not None: results = [x for x in collection.queryCatalog(sort_on=None, object_provides=IImageContent.__identifier__)] try: random.shuffle(results) if limit: return results[:limit] return results except AttributeError: return [] | def randomResults(self): collection = self.targetCollection() limit = collection.getItemCount() if collection is not None: results = [x for x in collection.queryCatalog(sort_on=None, object_provides=IImageContent.__identifier__)] try: random.shuffle(results) if limit: return results[:limit] return results except Attrib... |
print 'show_parent_deps is True' | def usage(): print '\nUsage: %s [options] [package]\n' % (sys.argv[0]) print 'Displays OE build dependencies for a given package or recipe.' print 'Uses the pn-depends.dot file for its raw data.' print 'Generate a pn-depends.dot file by running bitbake -g <recipe>.\n' print 'Options:' print '-h, --help\tShow this help ... | |
for dep in pn[package]: | for dep in sorted(pn[package]): | def list_deps_recurse(package, parent_deps, depth, max_depth): if depth > max_depth: return; if pn.has_key(package): tab_str = '\t' * depth for dep in pn[package]: if show_parent_deps or dep not in parent_deps: print tab_str, dep list_deps_recurse(dep, pn[package], depth + 1, max_depth) |
if package in d: return; d.append(package) | def collect_deps_flat(d, package, depth, max_depth): if package in d: return; d.append(package) if depth > max_depth: return; if pn.has_key(package): for dep in pn[package]: collect_deps_flat(d, dep, depth + 1, max_depth) | |
collect_deps_flat(d, dep, depth + 1, max_depth) | if dep not in d: d.append(dep) collect_deps_flat(d, dep, depth + 1, max_depth) | def collect_deps_flat(d, package, depth, max_depth): if package in d: return; d.append(package) if depth > max_depth: return; if pn.has_key(package): for dep in pn[package]: collect_deps_flat(d, dep, depth + 1, max_depth) |
collect_deps_flat(d, package, 1, max_depth) | if dep not in d: d.append(dep) collect_deps_flat(d, dep, 2, max_depth) | def list_deps_flat(package, max_depth): d = [] if pn.has_key(package): for dep in pn[package]: collect_deps_flat(d, package, 1, max_depth) print '\nPackage [', package, '] depends on' for dep in sorted(d): print '\t', dep elif rev_pn.has_key(package): print 'Package [', package, '] has no dependencies' else: print ... |
for dep in rev_pn[package]: | for dep in sorted(rev_pn[package]): | def list_reverse_deps_recurse(package, depth, max_depth): if depth > max_depth: return; if rev_pn.has_key(package): tab_str = '\t' * depth for dep in rev_pn[package]: print tab_str, dep list_reverse_deps_recurse(dep, depth + 1, max_depth) |
print '-f, --flat\tFlat output instead of default tree output' | print '-t, --tree\tTree output instead of default flat output' | def usage(): print '\nUsage: %s [options] [package]\n' % (sys.argv[0]) print 'Displays OE build dependencies for a given package or recipe.' print 'Uses the pn-depends.dot file for its raw data.' print 'Generate a pn-depends.dot file by running bitbake -g <recipe>.\n' print 'Options:' print '-h, --help\tShow this help ... |
opts, args = getopt.getopt(sys.argv[1:], 'hrfd:s', ['help', 'reverse-deps', 'flat', 'depth=', 'show-parent-deps']) | opts, args = getopt.getopt(sys.argv[1:], 'hrtd:s', ['help', 'reverse-deps', 'tree', 'depth=', 'show-parent-deps']) | def usage(): print '\nUsage: %s [options] [package]\n' % (sys.argv[0]) print 'Displays OE build dependencies for a given package or recipe.' print 'Uses the pn-depends.dot file for its raw data.' print 'Generate a pn-depends.dot file by running bitbake -g <recipe>.\n' print 'Options:' print '-h, --help\tShow this help ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.