rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
utils.logger.info( 'find single query execution - started' ) | utils.logger.debug( 'find single query execution - started' ) | def _find_single( self, match_class, **keywds ): utils.logger.info( 'find single query execution - started' ) start_time = time.clock() norm_keywds = self.__normalize_args( **keywds ) matcher = self.__create_matcher( match_class, **norm_keywds ) dtype = self.__findout_decl_type( match_class, **norm_keywds ) recursive_ ... |
utils.logger.info( 'find single query execution - done( %f seconds )' % ( time.clock() - start_time ) ) | utils.logger.debug( 'find single query execution - done( %f seconds )' % ( time.clock() - start_time ) ) | def _find_single( self, match_class, **keywds ): utils.logger.info( 'find single query execution - started' ) start_time = time.clock() norm_keywds = self.__normalize_args( **keywds ) matcher = self.__create_matcher( match_class, **norm_keywds ) dtype = self.__findout_decl_type( match_class, **norm_keywds ) recursive_ ... |
utils.logger.info( 'find all query execution - started' ) | utils.logger.debug( 'find all query execution - started' ) | def _find_multiple( self, match_class, **keywds ): utils.logger.info( 'find all query execution - started' ) start_time = time.clock() norm_keywds = self.__normalize_args( **keywds ) matcher = self.__create_matcher( match_class, **norm_keywds ) dtype = self.__findout_decl_type( match_class, **norm_keywds ) recursive_ =... |
utils.logger.info( '%d declaration(s) that match query' % len(mfound) ) utils.logger.info( 'find single query execution - done( %f seconds )' | utils.logger.debug( '%d declaration(s) that match query' % len(mfound) ) utils.logger.debug( 'find single query execution - done( %f seconds )' | def _find_multiple( self, match_class, **keywds ): utils.logger.info( 'find all query execution - started' ) start_time = time.clock() norm_keywds = self.__normalize_args( **keywds ) matcher = self.__create_matcher( match_class, **norm_keywds ) dtype = self.__findout_decl_type( match_class, **norm_keywds ) recursive_ =... |
defines a mapping between funcdamental type name and its synonym to the instance | defines a mapping between fundamental type name and its synonym to the instance | def __init__( self ): java_fundamental_t.__init__( self, jboolean_t.JNAME ) |
operator.name = 'operator' + operator.name | if 'new' in operator.name or 'delete' in operator.name: operator.name = 'operator ' + operator.name else: operator.name = 'operator' + operator.name | def __read_free_operator(self, attrs ): operator = self.__decl_factory.create_free_operator() self.__read_member_function( operator, attrs ) operator.name = 'operator' + operator.name return operator |
, allow_empty=allow_empty) | , allow_empty=allow_empty) def __getitem__(self, name_or_function): """ Allow simple name based find of decls. Internally just calls decls() method. @param name_or_function Name of decl to lookup or finder function. """ return self.decls(name_or_function) | , decl_type=self._impl_decl_types[ scopedef_t.typedef ] |
elif sys.platform == 'linux2': | elif sys.platform == 'linux2' or sys.platform == 'darwin': | def __raise_on_wrong_settings(self): if not os.path.isfile( self.__config.gccxml_path ): if sys.platform == 'win32': gccxml_name = 'gccxml' + '.exe' environment_var_delimiter = ';' elif sys.platform == 'linux2': gccxml_name = 'gccxml' environment_var_delimiter = ':' else: raise RuntimeError( 'unable to find out locatio... |
if 'win' in sys.platform: | if 'win32' in sys.platform: | def __create_command_line(self, file, xmlfile): assert isinstance( self.__config, config.config_t ) #returns cmd = [] #first is gccxml executable if 'win' in sys.platform: cmd.append( '"%s"' % os.path.normpath( self.__config.gccxml_path ) ) else: cmd.append( '%s' % os.path.normpath( self.__config.gccxml_path ) ) #seco... |
type = remove_alias( type ) return remove_cv( type ).decl_string in decl_strings | if isinstance( type, types.StringTypes ): return type in decl_strings else: type = remove_alias( type ) return remove_cv( type ).decl_string in decl_strings | def is_std_string( type ): decl_strings = [ '::std::basic_string<char,std::char_traits<char>,std::allocator<char> >' , '::std::basic_string<char, std::char_traits<char>, std::allocator<char> >' , '::std::string' ] type = remove_alias( type ) return remove_cv( type ).decl_string in decl_strings |
symcodes.append(j, i) | symcodes.append((j, i)) | def _update_keymap(self, first_keycode, count): |
self.request_queue.append(request, wait_for_response) | self.request_queue.append((request, wait_for_response)) | def send_request(self, request, wait_for_response): |
raise BadDataError('Invalid property data format %s' % format) | raise BadDataError('Invalid property data format %d' % format) | def pack_value(self, value): |
request.PolSegment(display = self.display, onerror = onerror, drawable = self.id, gc = gc, segments = [(x1, y1, x2, y2)]) | request.PolySegment(display = self.display, onerror = onerror, drawable = self.id, gc = gc, segments = [(x1, y1, x2, y2)]) | def line(self, gc, x1, y1, x2, y2, onerror = None): |
self.get_waiting_request(e.sequence_number) | self.get_waiting_request((e.sequence_number - 1) % 65536) | def parse_event_response(self, etype): |
self.default_screen = max(self.default_screen, len(self.info.roots) - 1) | self.default_screen = min(self.default_screen, len(self.info.roots) - 1) | def __init__(self, display = None): |
return map(lambda x: x[1], self._keymap_syms[keysym]) | return map(lambda x: (x[1], x[0]), self._keymap_syms[keysym]) | def keysym_to_keycodes(self, keysym): |
for keysym, code in self._keymap_syms.items(): if code >= first_keycode and code < lastcode: symcodes = self._keymap_syms[keysym] i = 0 while i < len(symcodes): if symcodes[i][1] == code: del symcodes[i] else: i = i + 1 | for keysym, codes in self._keymap_syms.items(): i = 0 while i < len(codes): code = codes[i][1] if code >= first_keycode and code < lastcode: del codes[i] else: i = i + 1 | def _update_keymap(self, first_keycode, count): |
i = first_keycode | code = first_keycode | def _update_keymap(self, first_keycode, count): |
j = 0 | index = 0 | def _update_keymap(self, first_keycode, count): |
symcodes.append((j, i)) | symcodes.append((index, code)) | def _update_keymap(self, first_keycode, count): |
self._keymap_syms[sym] = [(j, i)] | self._keymap_syms[sym] = [(index, code)] | def _update_keymap(self, first_keycode, count): |
j = j + 1 i = i + 1 | index = index + 1 code = code + 1 | def _update_keymap(self, first_keycode, count): |
self._update_keymap(evt.first_keycode, evt.count) | if evt.request == X.MappingKeyboard: self._update_keymap(evt.first_keycode, evt.count) | def refresh_keyboard_mapping(self, evt): """This method should be called once when a MappingNotify event is received, to update the keymap cache. evt should be the event object.""" |
self._update_keymap(self, evt.first_keycode, evt.count) | self._update_keymap(evt.first_keycode, evt.count) | def refresh_keyboard_mapping(self, evt): |
if recv: | if recv or flush: | def send_and_recv(self, flush = None, event = None, request = None, recv = None): |
fcntl.fcntl(s.fileno(), FCNTL.F_SETFD, FCNTL.FD_CLOEXEC) | fcntl.fcntl(s.fileno(), F_SETFD, FD_CLOEXEC) | def get_socket(dname, host, dno): try: # If hostname (or IP) is provided, use TCP socket if host: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, 6000 + dno)) # Else use Unix socket else: s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) s.connect('/tmp/.X11-unix/X%d' % dno) except socket.er... |
rq.Card8('key_click_percent,'), rq.Card8('bell_percent,'), | rq.Card8('key_click_percent'), rq.Card8('bell_percent'), | def __len__(self): |
BaseSolver.initialize(self. application) | BaseSolver.initialize(self, application) | def initialize(self, application): BaseSolver.initialize(self. application) |
__id__ = "$Id: Solver.py,v 1.18 2003/09/09 21:04:45 tan2 Exp $" | __id__ = "$Id: Solver.py,v 1.19 2003/09/26 21:54:11 ces74 Exp $" | def setProperties(self): |
filename = '%s.cap%d.%d' % (prefix, i, step) | filename = '%s.cap%02d.%d' % (prefix, i, step) | def write(self, filename, grid): fp = file(filename, 'w') header = '%d x %d x %d\n' % (grid['nox'], grid['noy'], grid['noz']) #print header fp.write(header) |
__inventory__ = [ | inventory = [ | def setProperties(self): import CitcomS.Regional as Regional |
__id__ = "$Id: IC.py,v 1.3 2003/07/23 05:29:58 ces74 Exp $" | __id__ = "$Id: IC.py,v 1.4 2003/07/23 19:00:17 tan2 Exp $" | def setProperties(self): import CitcomS.Regional as Regional |
__id__ = "$Id: __init__.py,v 1.1 2003/08/28 23:04:19 ces74 Exp $" | __id__ = "$Id: __init__.py,v 1.2 2003/08/28 23:12:43 ces74 Exp $" | def controller(name="controller"): return Controller(name) |
print 'in output.py' | def setProperties(self): print 'in output.py' from CitcomSLib import Output_set_properties Output_set_properties(self.all_variables, self.inventory) return | |
ic.initTemperature = self.coupler.initTemperature | ic.initTemperature = self.exchanger.initTemperature | def launch(self, application): BaseSolver.launch(self, application) |
__id__ = "$Id: Solver.py,v 1.33 2003/11/28 22:17:26 tan2 Exp $" | __id__ = "$Id: Solver.py,v 1.34 2003/12/24 22:46:56 ces74 Exp $" | def setProperties(self): self.CitcomModule.Solver_set_properties(self.all_variables, self.inventory) |
nox = grid['nox'] noy = grid['noy'] noz = grid['noz'] | nox = int(grid['nox']) noy = int(grid['noy']) noz = int(grid['noz']) | def join(self, data, me, grid, cap): # processor geometry nprocx = cap['nprocx'] nprocy = cap['nprocy'] nprocz = cap['nprocz'] |
n = (i+1) * nproc_per_cap - 1 crdfilename = '%s.coord.%d' % (prefix, n) surffilename = '%s.surf.%d.%d' % (prefix, n, step) print 'reading', surffilename data = cb.readData(crdfilename, surffilename, grid, cap) cb.join(data, n, grid, cap) | for n in range(i * nproc_per_cap + (cap['nprocz']-1), (i+1) * nproc_per_cap, cap['nprocz']): crdfilename = '%s.coord.%d' % (prefix, n) surffilename = '%s.surf.%d.%d' % (prefix, n, step) print 'reading', surffilename data = cb.readData(crdfilename, surffilename, grid, cap) cb.join(data, n, grid, cap) | def write(self, filename, grid, data): fp = file(filename, 'w') fp.write('%d x %d\n' % (grid['nox'], grid['noy'])) fp.writelines(data) return |
pyre.properties.list("blob_center", default=[1.570800,1.570800,0.9246600]), | pyre.properties.list("blob_center", default=[-999.,-999.,-999.]), | def initViscosity(self): self.CitcomModule.initViscosity(self.all_variables) return |
__id__ = "$Id: IC.py,v 1.14 2005/05/23 22:00:45 ces74 Exp $" | __id__ = "$Id: IC.py,v 1.15 2005/05/28 05:27:26 ces74 Exp $" | def initViscosity(self): self.CitcomModule.initViscosity(self.all_variables) return |
else if self.inventory.Solver == "multigrid": | elif self.inventory.Solver == "multigrid": | def init(self, parent): if self.inventory.Solver == "cgrad": Regional.set_cg_defaults() else if self.inventory.Solver == "multigrid": Regional.set_mg_defaults() else if self.inventory.Solver == "multigrid-el": Regional.set_mg_el_defaults() |
else if self.inventory.Solver == "multigrid-el": | elif self.inventory.Solver == "multigrid-el": | def init(self, parent): if self.inventory.Solver == "cgrad": Regional.set_cg_defaults() else if self.inventory.Solver == "multigrid": Regional.set_mg_defaults() else if self.inventory.Solver == "multigrid-el": Regional.set_mg_el_defaults() |
__id__ = "$Id: Stokes_solver.py,v 1.7 2003/07/15 00:40:03 tan2 Exp $" | __id__ = "$Id: Stokes_solver.py,v 1.8 2003/07/15 21:47:05 tan2 Exp $" | def output(self, *args, **kwds): |
if capnr==0: print iter | def citcom2vtk(t): print "Timestep:",t benchmarkstr = "" #Assign create_bottom and create_surface to bottom and surface #to make them valid in methods namespace bottom = create_bottom surface = create_surface ordered_points = [] #reset Sequences for points ordered_temperature = [] ordered_velocity = [] ordered_visc =... | |
output_ll_max = pyre.inventory.int("output_ll_max", default=20) | output_ll_max = inv.int("output_ll_max", default=20) | def setProperties(self, stream): from CitcomSLib import Output_set_properties Output_set_properties(self.all_variables, self.inventory, stream) return |
import pyre.inventory | import pyre.inventory as inv | def finalize(self): from CitcomSLib import output_finalize output_finalize(self.all_variables) return |
tsolver = pyre.inventory.facility("tsolver", factory=Advection_diffusion.temperature_diffadv) vsolver = pyre.inventory.facility("vsolver", factory=Stokes_solver.incompressibleNewtonian) bc = pyre.inventory.facility("bc", factory=BC) const = pyre.inventory.facility("const", factory=Const) ic = pyre.inventory.facility("... | tsolver = inv.facility("tsolver", factory=Advection_diffusion.temperature_diffadv) vsolver = inv.facility("vsolver", factory=Stokes_solver.incompressibleNewtonian) bc = inv.facility("bc", factory=BC) const = inv.facility("const", factory=Const) ic = inv.facility("ic", factory=IC) param = inv.facility("param", factory=... | def finalize(self): from CitcomSLib import output_finalize output_finalize(self.all_variables) return |
self.saved = range(grid['nox'] * grid['noy']) | self.saved = [''] * (grid['nox'] * grid['noy']) | def __init__(self, grid): # data storage self.saved = range(grid['nox'] * grid['noy']) return |
def readData(self, crdfilename, surffilename, grid): | def readData(self, crdfilename, surffilename, grid, cap): | def readData(self, crdfilename, surffilename, grid): fp1 = file(crdfilename, 'r') fp2 = file(surffilename, 'r') |
snodes = nox*noy | mynox = 1 + (nox-1)/nprocx mynoy = 1 + (noy-1)/nprocy mynoz = 1 + (noz-1)/nprocz snodes = mynox * mynoy | def readData(self, crdfilename, surffilename, grid): fp1 = file(crdfilename, 'r') fp2 = file(surffilename, 'r') |
if not (len(crd) == snodes*noz): | if not (len(crd) == snodes*mynoz): | def readData(self, crdfilename, surffilename, grid): fp1 = file(crdfilename, 'r') fp2 = file(surffilename, 'r') |
x, y, z = crd[(i+1)*noz-1].split() | x, y, z = crd[(i+1)*mynoz-1].split() | def readData(self, crdfilename, surffilename, grid): fp1 = file(crdfilename, 'r') fp2 = file(surffilename, 'r') |
data = cb.readData(crdfilename, surffilename, grid) | data = cb.readData(crdfilename, surffilename, grid, cap) | def write(self, filename, grid, data): fp = file(filename, 'w') fp.write('%d x %d\n' % (grid['nox'], grid['noy'])) fp.writelines(data) return |
self.II = Inlet.VTInlet(self.interior, self.sink["Intr"], self.all_variables) | self.II = Inlet.TInlet(self.interior, self.sink["Intr"], self.all_variables) | def createII(self): import Inlet self.II = Inlet.VTInlet(self.interior, self.sink["Intr"], self.all_variables) return |
__id__ = "$Id: CoarseGridExchanger.py,v 1.35 2004/05/29 01:19:31 tan2 Exp $" | __id__ = "$Id: CoarseGridExchanger.py,v 1.36 2004/08/06 20:22:30 tan2 Exp $" | def exchangeSignal(self, signal): newsgnl = self.module.exchangeSignal(signal, self.communicator.handle(), self.srcComm[0].handle(), self.srcComm[0].size - 1) return newsgnl |
"%s: step %d: advancing the solution by dt = %s" % (self.name, self.step, dt)) | "%s: step %d: advancing the solution by dt = %s" % (self.name, self.step, dt)) vsolver = self.inventory.vsolver vsolver.setup() tsolver = self.inventory.tsolver tsolver.setup() | def advance(self,dt): self._loopInfo.log( "%s: step %d: advancing the solution by dt = %s" % (self.name, self.step, dt)) tsolver.run(dt) vsolver.run() |
__id__ = "$Id: Solver.py,v 1.10 2003/08/28 23:04:19 ces74 Exp $" | __id__ = "$Id: Solver.py,v 1.11 2003/08/28 23:18:10 ces74 Exp $" | def setProperties(self): |
component = Facility.bind(configuration) | component = Facility.bind(self, configuration) | def bind(self, configuration): componentName = configuration.get(self.name) |
__id__ = "$Id: VSolver.py,v 1.1 2003/06/23 20:43:32 tan2 Exp $" | __id__ = "$Id: VSolver.py,v 1.2 2003/06/23 21:01:03 tan2 Exp $" | def bind(self, configuration): componentName = configuration.get(self.name) |
name = 'citcomsregional.sh' if self.inventory.solver.name == 'full': name = 'citcomsfull.sh' print 'usage: %s [<property>=<value>] [<facility>.<property>=<value>] ...' % name | print 'usage: citcoms [<property>=<value>] [<facility>.<property>=<value>] ...' | def usage(self): name = 'citcomsregional.sh' if self.inventory.solver.name == 'full': name = 'citcomsfull.sh' print 'usage: %s [<property>=<value>] [<facility>.<property>=<value>] ...' % name self.showUsage() print """\ |
try: from config import makefile list.append(makefile['pkgsysconfdir']) except ImportError, KeyError: | etc = join(dirname(dirname(__file__)), 'etc') if isdir(etc): | def _getPrivateDepositoryLocations(self): list = [] try: from config import makefile list.append(makefile['pkgsysconfdir']) except ImportError, KeyError: # The user is running directly from the source directory. from os.path import dirname, join etc = join(dirname(dirname(__file__)), 'etc') list.append(etc) return list |
from os.path import dirname, join etc = join(dirname(dirname(__file__)), 'etc') | def _getPrivateDepositoryLocations(self): list = [] try: from config import makefile list.append(makefile['pkgsysconfdir']) except ImportError, KeyError: # The user is running directly from the source directory. from os.path import dirname, join etc = join(dirname(dirname(__file__)), 'etc') list.append(etc) return list | |
self.inventory.fixed_timestep = 0.0 self.inventory.finetunedt = 0.7 | def __init__(self, name, facility): CitcomComponent.__init__(self, name, facility) self.inventory.ADV = True self.inventory.fixed_timestep = 0.0 self.inventory.finetunedt = 0.7 | |
__id__ = "$Id: Advection_diffusion.py,v 1.19 2003/11/28 22:17:26 tan2 Exp $" | __id__ = "$Id: Advection_diffusion.py,v 1.20 2004/05/26 23:53:35 tan2 Exp $" | def stable_timestep(self): dt = self.CitcomModule.stable_timestep(self.all_variables) return dt |
blob_radius = pyre.inventory.float("blob_radius", default=[0.063]) blob_dT = pyre.inventory.float("blob_dT", default=[0.18]) | blob_radius = pyre.inventory.float("blob_radius", default=0.063) blob_dT = pyre.inventory.float("blob_dT", default=0.18) | def initViscosity(self): self.CitcomModule.initViscosity(self.all_variables) return |
validator=pyre.properties.range(0, 1)), | validator=pyre.properties.choice([0, 1])), | def initViscosity(self): self.CitcomModule.initViscosity(self.all_variables) return |
__id__ = "$Id: IC.py,v 1.12 2005/02/17 22:57:42 tan2 Exp $" | __id__ = "$Id: IC.py,v 1.13 2005/02/18 00:13:36 tan2 Exp $" | def initViscosity(self): self.CitcomModule.initViscosity(self.all_variables) return |
outupt_alignment = inv.int("outupt_alignment", default=mega1/4) outupt_alignment_threshold = inv.int("outupt_alignment_threshold", | output_alignment = inv.int("output_alignment", default=mega1/4) output_alignment_threshold = inv.int("output_alignment_threshold", | def setProperties(self): from CitcomSLib import Output_set_properties Output_set_properties(self.all_variables, self.inventory) return |
def __init__(self, communicator, boundary, sink, all_variables, mode='F'): | def __init__(self, boundary, sink, all_variables, mode='F'): | def __init__(self, communicator, boundary, sink, all_variables, mode='F'): import CitcomS.Exchanger as Exchanger self._handle = Exchanger.TractionInlet_create(communicator.handle(), boundary, sink, all_variables, mode) return |
self._handle = Exchanger.TractionInlet_create(communicator.handle(), boundary, | self._handle = Exchanger.TractionInlet_create(boundary, | def __init__(self, communicator, boundary, sink, all_variables, mode='F'): import CitcomS.Exchanger as Exchanger self._handle = Exchanger.TractionInlet_create(communicator.handle(), boundary, sink, all_variables, mode) return |
__id__ = "$Id: Inlet.py,v 1.3 2004/03/11 23:25:47 tan2 Exp $" | __id__ = "$Id: Inlet.py,v 1.4 2004/03/28 23:20:55 tan2 Exp $" | def __init__(self, communicator, boundary, sink, all_variables, mode='F'): import CitcomS.Exchanger as Exchanger self._handle = Exchanger.TractionInlet_create(communicator.handle(), boundary, sink, all_variables, mode) return |
__id__ = "$Id: Visc.py,v 1.11 2005/01/19 18:55:00 tan2 Exp $" | __id__ = "$Id: Visc.py,v 1.12 2005/01/20 22:25:53 tan2 Exp $" | def updateMaterial(self): self.CitcomModule.Visc_update_material(self.all_variables) return |
self.method = method | self.method = method.upper() | def __init__(self, parent, src, method="GET", root_path=""): """ http_generator constructor. |
parameters = urllib.urlencode(self.parameter_children(self.child_results)) + q | parameters = urllib.urlencode(self.parameter_children(child_results)) + q | def _result(self, req, p_sibling_result=None, child_results=[]): """ Attempts to retrieve XML from the URI and return an ElementTree representation of it. """ |
response = conn.request("GET", urlparse.urlunparse(protocol, host, path, p, parameters, f)) | conn.request("GET", urlparse.urlunparse((protocol, host, path, p, parameters, f))) response = conn.getresponse() | def _result(self, req, p_sibling_result=None, child_results=[]): """ Attempts to retrieve XML from the URI and return an ElementTree representation of it. """ |
response = conn.request("POST", urlparse.urlunparse(protocol, host, path, p, "", f), parameters) | conn.request("POST", urlparse.urlunparse((protocol, host, path, p, "", f)), parameters) response = conn.getresponse() | def _result(self, req, p_sibling_result=None, child_results=[]): """ Attempts to retrieve XML from the URI and return an ElementTree representation of it. """ |
except httplib.HTTPException, e: raise GeneratorError("http_generator: exception occured during HTTP request: \"%\"" % str(e)) | def _result(self, req, p_sibling_result=None, child_results=[]): """ Attempts to retrieve XML from the URI and return an ElementTree representation of it. """ | |
invk_syn.optional_attribs = ["allow-query"] | invk_syn.optional_attribs = ["allow-query", "required-parameters"] | def register_invokation_syntax(server): """ Allows the component to register the required XML element syntax for it's invokation in sitemap files with the sitemap_config_parse class. """ invk_syn = invokation_syntax() invk_syn.element_name = "match" invk_syn.allowed_parent_components = ["pipeline"] invk_syn.required_a... |
@pattern: the URI pattern string @allow_query: if True, then a URI including a query string will match (default: True) | def register_invokation_syntax(server): """ Allows the component to register the required XML element syntax for it's invokation in sitemap files with the sitemap_config_parse class. """ invk_syn = invokation_syntax() invk_syn.element_name = "match" invk_syn.allowed_parent_components = ["pipeline"] invk_syn.required_a... | |
def __init__(self, parent, pattern, allow_query="yes", root_path=""): | def __init__(self, parent, pattern, allow_query="yes", required_parameters="", root_path=""): """ uri_matcher constructor. @pattern: the URI pattern string @allow_query: if True, then a URI including a query string will match (default: True) @required_parameters: a space separated list of parameters which must be spec... | def __init__(self, parent, pattern, allow_query="yes", root_path=""): self.pattern = pattern |
self.match_obj = self.regex.match(req.parsed_uri[apache.URI_PATH]) | if self.regex.pattern.find("?") >= 0: self.match_obj = self.regex.match(req.unparsed_uri) else: self.match_obj = self.regex.match(req.parsed_uri[apache.URI_PATH]) | def parse_uri(self, req): """ Parses the request URI into its constituent parts and stores them for later use. Returns True if the request uri matches this object's pattern, returns False otherwise. """ self.req = req |
res = {} | res = {'dpi': [resolution, y_resolution], 'quality': self.quality, } | def save_options(self, resolution, y_resolution): if y_resolution == None: y_resolution = resolution res = {} return res |
osi = [os.dup(sys.stdin.fileno()), sys.stdin.fileno()] oso = [os.dup(sys.stdout.fileno()), sys.stdout.fileno()] ose = [os.dup(sys.stderr.fileno()), sys.stderr.fileno()] os.dup2(si.fileno(), osi[1]) os.dup2(so.fileno(), oso[1]) os.dup2(se.fileno(), ose[1]) | if not interact: osi = [os.dup(sys.stdin.fileno()), sys.stdin.fileno()] oso = [os.dup(sys.stdout.fileno()), sys.stdout.fileno()] ose = [os.dup(sys.stderr.fileno()), sys.stderr.fileno()] os.dup2(si.fileno(), osi[1]) os.dup2(so.fileno(), oso[1]) os.dup2(se.fileno(), ose[1]) | def exec_func_shell(func, d): """Execute a shell BB 'function' Returns true if execution was successful. For this, it creates a bash shell script in the tmp dectory, writes the local data into it and finally executes. The output of the shell will end in a log file and stdout. Note on directory behavior. The 'dirs' v... |
os.dup2(osi[0], osi[1]) os.dup2(oso[0], oso[1]) os.dup2(ose[0], ose[1]) si.close() so.close() se.close() os.close(osi[0]) os.close(oso[0]) os.close(ose[0]) | if not interact: os.dup2(osi[0], osi[1]) os.dup2(oso[0], oso[1]) os.dup2(ose[0], ose[1]) si.close() so.close() se.close() os.close(osi[0]) os.close(oso[0]) os.close(ose[0]) | def exec_func_shell(func, d): """Execute a shell BB 'function' Returns true if execution was successful. For this, it creates a bash shell script in the tmp dectory, writes the local data into it and finally executes. The output of the shell will end in a log file and stdout. Note on directory behavior. The 'dirs' v... |
open(stamp, "w+") | if os.access(stamp, os.F_OK): os.remove(stamp) f = open(stamp, "w") f.close() | def mkstamp(task, d): """Creates/updates a stamp for a given task""" stamp = data.getVar('STAMP', d) if not stamp: return stamp = "%s.%s" % (data.expand(stamp, d), task) mkdirhier(os.path.dirname(stamp)) open(stamp, "w+") |
if url not in urldata: | fn = bb.data.getVar('FILE', d, 1) if fn not in urldata: urldata[fn] = {} if url not in urldata[fn]: | def initdata(url, d): if url not in urldata: ud = FetchData() (ud.type, ud.host, ud.path, ud.user, ud.pswd, ud.parm) = bb.decodeurl(data.expand(url, d)) ud.date = Fetch.getSRCDate(d) for m in methods: if m.supports(url, ud, d): ud.localpath = m.localpath(url, ud, d) ud.md5 = ud.localpath + '.md5' # if user sets localpa... |
urldata[url] = ud return urldata[url] | urldata[fn][url] = ud return urldata[fn][url] | def initdata(url, d): if url not in urldata: ud = FetchData() (ud.type, ud.host, ud.path, ud.user, ud.pswd, ud.parm) = bb.decodeurl(data.expand(url, d)) ud.date = Fetch.getSRCDate(d) for m in methods: if m.supports(url, ud, d): ud.localpath = m.localpath(url, ud, d) ud.md5 = ud.localpath + '.md5' # if user sets localpa... |
ud = urldata[u] if ud.localfile and not m.forcefetch(u, ud, d) and os.path.exists(urldata[u].md5): | ud = urldata[fn][u] if ud.localfile and not m.forcefetch(u, ud, d) and os.path.exists(urldata[fn][u].md5): | def go(d): """Fetch all urls""" for m in methods: for u in m.urls: ud = urldata[u] if ud.localfile and not m.forcefetch(u, ud, d) and os.path.exists(urldata[u].md5): # File already present along with md5 stamp file # Touch md5 file to show activity os.utime(ud.md5, None) continue # RP - is olddir needed? # olddir = os.... |
local.append(urldata[u].localpath) | local.append(urldata[fn][u].localpath) | def localpaths(d): """Return a list of the local filenames, assuming successful fetch""" local = [] for m in methods: for u in m.urls: local.append(urldata[u].localpath) return local |
fdata.replace('@@'+key+'@@', bb.data.getVar(key, package)) | fdata = fdata.replace('@@'+key+'@@', bb.data.getVar(key, package)) | def write(self, package, template = None): # 1) Assemble new file contents in ram, either new from bitbake # metadata, or a combination of the template and that metadata. # 2) Open the path returned by the filefunc + the basedir for writing. # 3) Write the new bitbake data file. fdata = '' if template: f = file(temp... |
template = os.path.join(emitter.filefunc(package), '.in') | template = emitter.filefunc(package) + '.in' | def filefunc(package): # return a relative path to the bitbake .bb which will be written src_uri = bb.data.getVar('SRC_URI', package, 1) filename = bb.data.getVar('PN', package, 1) + '.bb' if not src_uri: return filename else: substr = src_uri[src_uri.find('xorg/'):] subdirlist = substr.split('/')[:2] subdir = '-'.join... |
return os.path.join(data.getVar("DL_DIR", d, 1),data.expand('%s_%s_%s_%s.tar.gz' % ( module.replace('/', '.'), host, revision, date), d)) | return os.path.join(data.getVar("DL_DIR", d, 1),data.expand('%s_%s_%s_%s_%s.tar.gz' % ( module.replace('/', '.'), host, path.replace('/','.'), revision, date), d)) | def localpath(url, d): (type, host, path, user, pswd, parm) = bb.decodeurl(data.expand(url, d)) if "localpath" in parm: |
tarfn = data.expand('%s_%s_%s_%s.tar.gz' % (module.replace('/', '.'), host, revision, date), localdata) | tarfn = data.expand('%s_%s_%s_%s_%s.tar.gz' % (module.replace('/', '.'), host, path.replace('/', '.'), revision, date), localdata) | def go(self, d, urls = []): """Fetch urls""" if not urls: urls = self.urls |
print "ERROR: '%s' failed" % td.fn_index[fnid]) | print "ERROR: '%s' failed" % td.fn_index[fnid] | def build( self, params, cmd = "build" ): """Build a providee""" globexpr = params[0] self._checkParsed() names = globfilter( cooker.status.pkg_pn.keys(), globexpr ) if len( names ) == 0: names = [ globexpr ] print "SHELL: Building %s" % ' '.join( names ) |
gettext.bindtextdomain('invest-applet', abspath(join(invest.defs.DATA_DIR, "locale"))) gettext.textdomain('invest-applet') locale.bindtextdomain('invest-applet', abspath(join(invest.defs.DATA_DIR, "locale"))) locale.textdomain('invest-applet') | gettext.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.GNOMELOCALEDIR) gettext.textdomain(invest.defs.GETTEXT_PACKAGE) locale.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.GNOMELOCALEDIR) locale.textdomain(invest.defs.GETTEXT_PACKAGE) gtk.glade.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.... | def _check(path): return exists(path) and isdir(path) and isfile(path+"/ChangeLog") |
def printIFaceTableCXXFile(f,out): constants = [] functions = {} properties = {} | def GetScriptableInterface(f): """Returns a tuple of (constants, functions, properties) constants - a sorted list of (name, features) tuples, including all constants except for SCLEX_ constants which are presumed not used by scripts. The SCI_ constants for functions are omitted, since they can be derived, but the SCI_... | def printIFaceTableCXXFile(f,out): constants = [] functions = {} properties = {} for name in f.order: features = f.features[name] if features["Category"] != "Deprecated": if features["FeatureType"] == "val": if not StartsWith(name, "SCLEX_"): constants.append( (name, features["Value"]) ) elif features["FeatureType"] i... |
constants.append( (name, features["Value"]) ) | constants.append( (name, features) ) | def printIFaceTableCXXFile(f,out): constants = [] functions = {} properties = {} for name in f.order: features = f.features[name] if features["Category"] != "Deprecated": if features["FeatureType"] == "val": if not StartsWith(name, "SCLEX_"): constants.append( (name, features["Value"]) ) elif features["FeatureType"] i... |
functions[name] = features | def printIFaceTableCXXFile(f,out): constants = [] functions = {} properties = {} for name in f.order: features = f.features[name] if features["Category"] != "Deprecated": if features["FeatureType"] == "val": if not StartsWith(name, "SCLEX_"): constants.append( (name, features["Value"]) ) elif features["FeatureType"] i... | |
getter = getterName and functions[getterName] setter = setterName and functions[setterName] | getter = getterName and f.features[getterName] setter = setterName and f.features[setterName] | def printIFaceTableCXXFile(f,out): constants = [] functions = {} properties = {} for name in f.order: features = f.features[name] if features["Category"] != "Deprecated": if features["FeatureType"] == "val": if not StartsWith(name, "SCLEX_"): constants.append( (name, features["Value"]) ) elif features["FeatureType"] i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.