bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def SdkLocatePython(force_use_sys_executable = False): if (PkgSkip("PYTHON")==0): if (sys.platform == "win32" and not force_use_sys_executable): SDK["PYTHON"] = "thirdparty/win-python" if (GetOptimize() <= 2): SDK["PYTHON"] += "-dbg" if (platform.architecture()[0] == "64bit" and os.path.isdir(SDK["PYTHON"] + "-x64")): ... | def SdkLocatePython(force_use_sys_executable = False): if (PkgSkip("PYTHON")==0): if (sys.platform == "win32" and not force_use_sys_executable): SDK["PYTHON"] = "thirdparty/win-python" if (GetOptimize() <= 2): SDK["PYTHON"] += "-dbg" if (platform.architecture()[0] == "64bit" and os.path.isdir(SDK["PYTHON"] + "-x64")): ... | 458,600 |
def SdkLocatePython(force_use_sys_executable = False): if (PkgSkip("PYTHON")==0): if (sys.platform == "win32" and not force_use_sys_executable): SDK["PYTHON"] = "thirdparty/win-python" if (GetOptimize() <= 2): SDK["PYTHON"] += "-dbg" if (platform.architecture()[0] == "64bit" and os.path.isdir(SDK["PYTHON"] + "-x64")): ... | def SdkLocatePython(force_use_sys_executable = False): if (PkgSkip("PYTHON")==0): if (sys.platform == "win32" and not force_use_sys_executable): SDK["PYTHON"] = "thirdparty/win-python" if (GetOptimize() <= 2): SDK["PYTHON"] += "-dbg" if (platform.architecture()[0] == "64bit" and os.path.isdir(SDK["PYTHON"] + "-x64")): ... | 458,601 |
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 458,602 |
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 458,603 |
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 458,604 |
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 458,605 |
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 458,606 |
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 458,607 |
def functor(*cArgs, **ckArgs): kwArgs = {} kwArgs.update(kArgs) kwArgs.update(ckArgs) kwArgs.pop('static', None) kwArgs['frameCount'] = ckArgs.get('frameCount',1)+1 if kwArgs.pop('call', None): return self.bpCall(*(cArgs), **kwArgs) else: return self.bp(*(cArgs), **kwArgs) | def functor(*cArgs, **ckArgs): kwArgs = {} kwArgs.update(kArgs) kwArgs.update(ckArgs) kwArgs.pop('static', None) kwArgs['frameCount'] = ckArgs.get('frameCount',1)+1 if kwArgs.pop('call', None): return self.bpCall(*(cArgs), **kwArgs) else: return self.bp(*(cArgs), **kwArgs) | 458,608 |
def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm... | def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm... | 458,609 |
def do_mainModule(self, moduleName, newName = None, filename = None): """ Names the indicated module as the "main" module of the application or exe. """ | def do_mainModule(self, moduleName, newName = None, filename = None): """ Names the indicated module as the "main" module of the application or exe. """ | 458,610 |
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 458,611 |
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 458,612 |
def buildDEB(self, output, platform): """ Builds a .deb archive and stores it in the path indicated by the 'output' argument. It will be built for the architecture specified by the 'arch' argument. If 'output' is a directory, the deb file will be stored in it. """ arch = platform.rsplit("_", 1)[-1] output = Filename(o... | def buildDEB(self, output, platform): """ Builds a .deb archive and stores it in the path indicated by the 'output' argument. It will be built for the architecture specified by the 'arch' argument. If 'output' is a directory, the deb file will be stored in it. """ arch = platform.rsplit("_", 1)[-1] output = Filename(o... | 458,613 |
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 458,614 |
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 458,615 |
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","ou... | def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","ou... | 458,616 |
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","ou... | def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","ou... | 458,617 |
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","ou... | def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","ou... | 458,618 |
def disableWidgetMove(self): self.fMovable = 0 if hasattr(base.direct, 'widget'): base.direct.widget.disableModeColor() else: self.objectHandles.disabledModeColor() | def disableWidgetMove(self): self.fMovable = 0 if hasattr(base.direct, 'widget'): base.direct.widget.disabledModeColor() else: self.objectHandles.disabledModeColor() | 458,619 |
def makeCHM(outputfile, dirname, title, special = None): """Creates a CHM file based on a directory of HTML files. See the top of this file for more info.""" assert special == None or special in ["manual", "reference"] reference = (special == "reference") manual = (special == "manual") base = ireplace(outputfile, ".chm... | def makeCHM(outputfile, dirname, title, special = None): """Creates a CHM file based on a directory of HTML files. See the top of this file for more info.""" assert special == None or special in ["manual", "reference"] reference = (special == "reference") manual = (special == "manual") base = ireplace(outputfile, ".chm... | 458,620 |
def makeCHM(outputfile, dirname, title, special = None): """Creates a CHM file based on a directory of HTML files. See the top of this file for more info.""" assert special == None or special in ["manual", "reference"] reference = (special == "reference") manual = (special == "manual") base = ireplace(outputfile, ".chm... | def makeCHM(outputfile, dirname, title, special = None): """Creates a CHM file based on a directory of HTML files. See the top of this file for more info.""" assert special == None or special in ["manual", "reference"] reference = (special == "reference") manual = (special == "manual") base = ireplace(outputfile, ".chm... | 458,621 |
def makeReferenceCHM(outputfile, dirname, title): """Same as makeCHM, but converts a structure resembling that of the Panda3D reference.""" return makeCHM(outputfile, dirname, title, special = "reference") | def makeReferenceCHM(outputfile, dirname, title): """Same as makeCHM, but converts a structure resembling that of the Panda3D reference.""" return makeCHM(outputfile, dirname, title, special = "reference") | 458,622 |
def makeReferenceCHM(outputfile, dirname, title): """Same as makeCHM, but converts a structure resembling that of the Panda3D reference.""" return makeCHM(outputfile, dirname, title, special = "reference") | def makeReferenceCHM(outputfile, dirname, title): """Same as makeCHM, but converts a structure resembling that of the Panda3D reference.""" return makeCHM(outputfile, dirname, title, special = "reference") | 458,623 |
def makeReferenceCHM(outputfile, dirname, title): """Same as makeCHM, but converts a structure resembling that of the Panda3D reference.""" return makeCHM(outputfile, dirname, title, special = "reference") | def makeReferenceCHM(outputfile, dirname, title): """Same as makeCHM, but converts a structure resembling that of the Panda3D reference.""" return makeCHM(outputfile, dirname, title, special = "reference") | 458,624 |
def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm... | def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm... | 458,625 |
def changeHierarchy(self, data, x, y): itemText = data.split('_') itemId = itemText[1] parent = self.tree.GetRootItem() item = self.traverse(parent, itemId) if item is None: return | def changeHierarchy(self, data, x, y): itemText = data.split('_') itemId = itemText[-1] parent = self.tree.GetRootItem() item = self.traverse(parent, itemId) if item is None: return | 458,626 |
def createMenu(self): menuItem = self.menuFile.Insert(0, ID_NEW, self.MENU_TEXTS[ID_NEW][0]) self.Bind(wx.EVT_MENU, self.onNew, menuItem) menuItem = self.menuFile.Insert(1, ID_OPEN, self.MENU_TEXTS[ID_OPEN][0]) self.Bind(wx.EVT_MENU, self.onOpen, menuItem) | def createMenu(self): menuItem = self.menuFile.Insert(0, ID_NEW, self.MENU_TEXTS[ID_NEW][0]) self.Bind(wx.EVT_MENU, self.onNew, menuItem) menuItem = self.menuFile.Insert(1, ID_OPEN, self.MENU_TEXTS[ID_OPEN][0]) self.Bind(wx.EVT_MENU, self.onOpen, menuItem) | 458,627 |
def __parseManifest(self, tempFile): """ Reads the indicated application manifest file, to determine the list of dependent assemblies this executable file depends on. """ | def __parseManifest(self, tempFile): """ Reads the indicated application manifest file, to determine the list of dependent assemblies this executable file depends on. """ | 458,628 |
def __parseManifest(self, tempFile): """ Reads the indicated application manifest file, to determine the list of dependent assemblies this executable file depends on. """ | def __parseManifest(self, tempFile): """ Reads the indicated application manifest file, to determine the list of dependent assemblies this executable file depends on. """ | 458,629 |
def close(self): """Closes the viewport.""" if self.initialized: Window.close(self) ViewportManager.viewports.remove(self) | def close(self): """Closes the viewport.""" if self.initialized: wx.Window.Close(self) base.closeWindow(self.win) ViewportManager.viewports.remove(self) | 458,630 |
def restoreObject(uid, parentNP): obj = self.objInfos[uid] objDef = obj[OG.OBJ_DEF] objModel = obj[OG.OBJ_MODEL] objProp = obj[OG.OBJ_PROP] objRGBA = obj[OG.OBJ_RGBA] objNP = self.editor.objectMgr.addNewObject(objDef.name, uid, obj[OG.OBJ_MODEL], parentNP) self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1],... | def restoreObject(uid, parentNP): obj = self.objInfos[uid] objDef = obj[OG.OBJ_DEF] objModel = obj[OG.OBJ_MODEL] objProp = obj[OG.OBJ_PROP] objRGBA = obj[OG.OBJ_RGBA] objNP = self.editor.objectMgr.addNewObject(objDef.name, uid, obj[OG.OBJ_MODEL], parentNP) self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1],... | 458,631 |
def restoreObject(uid, parentNP): obj = self.objInfos[uid] objDef = obj[OG.OBJ_DEF] objModel = obj[OG.OBJ_MODEL] objProp = obj[OG.OBJ_PROP] objRGBA = obj[OG.OBJ_RGBA] objNP = self.editor.objectMgr.addNewObject(objDef.name, uid, obj[OG.OBJ_MODEL], parentNP) self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1],... | def restoreObject(uid, parentNP): obj = self.objInfos[uid] objDef = obj[OG.OBJ_DEF] objModel = obj[OG.OBJ_MODEL] objProp = obj[OG.OBJ_PROP] objRGBA = obj[OG.OBJ_RGBA] objNP = self.editor.objectMgr.addNewObject(objDef.name, uid, obj[OG.OBJ_MODEL], parentNP) self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1],... | 458,632 |
def test_setproctitle(self): """setproctitle() can set the process title, duh.""" rv = self.run_script(r""" import setproctitle setproctitle.setproctitle('Hello, world!') import os print os.getpid() print os.popen("ps -o pid,command").read() """) lines = filter(None, rv.splitlines()) pid = lines.pop(0) pids = dict([r.... | def test_setproctitle(self): """setproctitle() can set the process title, duh.""" rv = self.run_script(r""" import setproctitle setproctitle.setproctitle('Hello, world!') import os print os.getpid() print os.popen("ps -o pid,command").read() """) lines = filter(None, rv.splitlines()) pid = lines.pop(0) pids = dict([r.... | 458,633 |
def test_setproctitle(self): """setproctitle() can set the process title, duh.""" rv = self.run_script(r""" import setproctitle setproctitle.setproctitle('Hello, world!') import os print os.getpid() print os.popen("ps -o pid,command").read() """) lines = filter(None, rv.splitlines()) pid = lines.pop(0) pids = dict([r.... | def test_setproctitle(self): """setproctitle() can set the process title, duh.""" rv = self.run_script(r""" import setproctitle setproctitle.setproctitle('Hello, world!') import os print os.getpid() print os.popen("ps -o pid,command 2> /dev/null").read() """) lines = filter(None, rv.splitlines()) pid = lines.pop(0) ... | 458,634 |
def test_unicode(self): """Title can contain unicode characters.""" if 'utf-8' != sys.getdefaultencoding(): raise SkipTest("encoding '%s' can't deal with snowmen" % sys.getdefaultencoding()) | def test_unicode(self): """Title can contain unicode characters.""" if 'utf-8' != sys.getdefaultencoding(): raise SkipTest("encoding '%s' can't deal with snowmen" % sys.getdefaultencoding()) | 458,635 |
def test_unicode(self): """Title can contain unicode characters.""" if 'utf-8' != sys.getdefaultencoding(): raise SkipTest("encoding '%s' can't deal with snowmen" % sys.getdefaultencoding()) | def test_unicode(self): """Title can contain unicode characters.""" if 'utf-8' != sys.getdefaultencoding(): raise SkipTest("encoding '%s' can't deal with snowmen" % sys.getdefaultencoding()) | 458,636 |
def test_environ(self): """Check that clobbering environ didn't break env.""" rv = self.run_script(r""" import setproctitle setproctitle.setproctitle('Hello, world! ' + 'X' * 1024) | def test_environ(self): """Check that clobbering environ didn't break env.""" rv = self.run_script(r""" import setproctitle setproctitle.setproctitle('Hello, world! ' + 'X' * 1024) | 458,637 |
def run_script(self, script, args=None): """run a script in a separate process. | def test_issue_8(self): """Test that the module works with 'python -m'.""" module = 'spt_issue_8' pypath = os.environ.get('PYTHONPATH', None) dir = tempfile.mkdtemp() os.environ['PYTHONPATH'] = dir + os.pathsep + (pypath or '') try: open(dir + '/' + module + '.py', 'w').write( self._clean_whitespaces(r""" import setpro... | 458,638 |
def run_script(self, script, args=None): """run a script in a separate process. | def run_script(self, script, args=None): """run a script in a separate process. | 458,639 |
def test_issue_8(self): """Test that the module works with 'python -m'.""" module = 'spt_issue_8' pypath = os.environ.get('PYTHONPATH', None) dir = tempfile.mkdtemp() os.environ['PYTHONPATH'] = dir + os.pathsep + (pypath or '') try: open(dir + '/' + module + '.py', 'w').write( self._clean_whitespaces(r""" import setpro... | def test_issue_8(self): """Test that the module works with 'python -m'.""" module = 'spt_issue_8' pypath = os.environ.get('PYTHONPATH', None) dir = tempfile.mkdtemp() os.environ['PYTHONPATH'] = dir + os.pathsep + (pypath or '') try: open(dir + '/' + module + '.py', 'w').write( self._clean_whitespaces(r""" import setpro... | 458,640 |
def test_issue_8(self): """Test that the module works with 'python -m'.""" module = 'spt_issue_8' pypath = os.environ.get('PYTHONPATH', None) dir = tempfile.mkdtemp() os.environ['PYTHONPATH'] = dir + os.pathsep + (pypath or '') try: open(dir + '/' + module + '.py', 'w').write( self._clean_whitespaces(r""" import setpro... | def test_issue_8(self): """Test that the module works with 'python -m'.""" module = 'spt_issue_8' pypath = os.environ.get('PYTHONPATH', None) dir = tempfile.mkdtemp() os.environ['PYTHONPATH'] = dir + os.pathsep + (pypath or '') try: open(dir + '/' + module + '.py', 'w').write( self._clean_whitespaces(r""" import setpro... | 458,641 |
def test_setproctitle(self): """setproctitle() can set the process title, duh.""" rv = self.run_script(r""" import setproctitle setproctitle.setproctitle('Hello, world!') | def test_setproctitle(self): """setproctitle() can set the process title, duh.""" rv = self.run_script(r""" import setproctitle setproctitle.setproctitle('Hello, world!') | 458,642 |
def test_issue_8(self): """Test that the module works with 'python -m'.""" module = 'spt_issue_8' pypath = os.environ.get('PYTHONPATH', None) dir = tempfile.mkdtemp() os.environ['PYTHONPATH'] = dir + os.pathsep + (pypath or '') try: open(dir + '/' + module + '.py', 'w').write( self._clean_whitespaces(r""" import setpro... | def test_issue_8(self): """Test that the module works with 'python -m'.""" module = 'spt_issue_8' pypath = os.environ.get('PYTHONPATH', None) dir = tempfile.mkdtemp() os.environ['PYTHONPATH'] = dir + os.pathsep + (pypath or '') try: open(dir + '/' + module + '.py', 'w').write( self._clean_whitespaces(r""" import setpro... | 458,643 |
def test_issue_8(self): """Test that the module works with 'python -m'.""" module = 'spt_issue_8' pypath = os.environ.get('PYTHONPATH', None) dir = tempfile.mkdtemp() os.environ['PYTHONPATH'] = dir + os.pathsep + (pypath or '') try: open(dir + '/' + module + '.py', 'w').write( self._clean_whitespaces(r""" import setpro... | def test_issue_8(self): """Test that the module works with 'python -m'.""" module = 'spt_issue_8' pypath = os.environ.get('PYTHONPATH', None) dir = tempfile.mkdtemp() os.environ['PYTHONPATH'] = dir + os.pathsep + (pypath or '') try: open(dir + '/' + module + '.py', 'w').write( self._clean_whitespaces(r""" import setpro... | 458,644 |
def run_script(self, script=None, args=None): """run a script in a separate process. | def run_script(self, script=None, args=None): """run a script in a separate process. | 458,645 |
def run_script(self, script=None, args=None): """run a script in a separate process. | def run_script(self, script=None, args=None): """run a script in a separate process. | 458,646 |
def run_script(self, script=None, args=None): """run a script in a separate process. | def run_script(self, script=None, args=None): """run a script in a separate process. | 458,647 |
def openid_is_authorized(req, identity_url, trust_root): """ Check that they own the given identity URL, and that the trust_root is in their whitelist of trusted sites. """ if not req.user.is_authenticated(): return None openid = openid_get_identity(req, identity_url) if openid is None: return None import logging LOG... | def openid_is_authorized(req, identity_url, trust_root): """ Check that they own the given identity URL, and that the trust_root is in their whitelist of trusted sites. """ if not req.user.is_authenticated(): return None openid = openid_get_identity(req, identity_url) if openid is None: return None if openid.trustedr... | 458,648 |
def landing_page(request, orequest): """ The page shown when the user attempts to sign in somewhere using OpenID but is not authenticated with the site. For idproxy.net, a message telling them to log in manually is displayed. """ request.session['OPENID_REQUEST'] = orequest login_url = settings.LOGIN_URL path = request... | def landing_page(request, orequest): """ The page shown when the user attempts to sign in somewhere using OpenID but is not authenticated with the site. For idproxy.net, a message telling them to log in manually is displayed. """ request.session['OPENID_REQUEST'] = orequest login_url = settings.LOGIN_URL path = request... | 458,649 |
def wait_msg_from(self, timeout): endtime = time.time() + timeout msg = "" src_addr = None while time.time() < endtime: readset = select([self.sock], [], [], timeout) if len(readset) < 1 or not self.sock in readset[0]: if len(readset) < 1: print "select() returns " + str(len(readset)) elif not self.sock in readset[0]: ... | def wait_msg_from(self, timeout): endtime = time.time() + timeout msg = "" src_addr = None while time.time() < endtime: readset = select([self.sock], [], [], timeout) if len(readset[0]) < 1 or not self.sock in readset[0]: if len(readset[0]) < 1: print "select() timeout" elif not self.sock in readset[0]: print "select()... | 458,650 |
def __init__(self, title, resp_code, check_cseq=True, include=[], exclude=[], cmds=[], resp_hdr=[], resp_body=None, expect=""): self.title = title self.cmds = cmds self.include = include self.exclude = exclude self.resp_code = resp_code self.resp_hdr = resp_hdr self.resp_body = resp_body self.expect = expect | def __init__(self, title, resp_code, check_cseq=True, include=[], exclude=[], cmds=[], resp_hdr=[], resp_body=None, expect=""): self.title = title self.cmds = cmds self.include = include self.exclude = exclude self.resp_code = resp_code self.resp_hdr = resp_hdr self.body = resp_body self.expect = expect | 458,651 |
def test_func(test): pjsua = test.process[0] dlg = sip.Dialog("127.0.0.1", pjsua.inst_param.sip_port, local_port=srv_port, tcp=cfg_file.recvfrom_cfg.tcp) last_cseq = 0 last_method = "" for t in cfg_file.recvfrom_cfg.transaction: # Print transaction title if t.title != "": dlg.trace(t.title) # Run command and expect pa... | def test_func(test): pjsua = test.process[0] dlg = sip.Dialog("127.0.0.1", pjsua.inst_param.sip_port, local_port=srv_port, tcp=cfg_file.recvfrom_cfg.tcp) last_cseq = 0 last_method = "" for t in cfg_file.recvfrom_cfg.transaction: # Print transaction title if t.title != "": dlg.trace(t.title) # Run command and expect pa... | 458,652 |
def test_func(test): pjsua = test.process[0] dlg = sip.Dialog("127.0.0.1", pjsua.inst_param.sip_port, local_port=srv_port, tcp=cfg_file.recvfrom_cfg.tcp) last_cseq = 0 last_method = "" for t in cfg_file.recvfrom_cfg.transaction: # Print transaction title if t.title != "": dlg.trace(t.title) # Run command and expect pa... | def test_func(test): pjsua = test.process[0] dlg = sip.Dialog("127.0.0.1", pjsua.inst_param.sip_port, local_port=srv_port, tcp=cfg_file.recvfrom_cfg.tcp) last_cseq = 0 last_method = "" for t in cfg_file.recvfrom_cfg.transaction: # Print transaction title if t.title != "": dlg.trace(t.title) # Run command and expect pa... | 458,653 |
def usage(): print """Periodically monitor working directory for Continuous and Nightly builds | def usage(): print """Periodically monitor working directory for Continuous and Nightly builds | 458,654 |
def wait_msg_from(self, timeout): endtime = time.time() + timeout msg = "" src_addr = None while time.time() < endtime: readset = select([self.sock], [], [], timeout) if len(readset[0]) < 1 or not self.sock in readset[0]: if len(readset[0]) < 1: print "select() timeout" elif not self.sock in readset[0]: print "select()... | def wait_msg_from(self, timeout): endtime = time.time() + timeout msg = "" src_addr = None while time.time() < endtime: readset = select([self.sock], [], [], 1) if len(readset[0]) < 1 or not self.sock in readset[0]: if len(readset[0]) < 1: print "select() timeout" elif not self.sock in readset[0]: print "select() alien... | 458,655 |
def wait_msg_from(self, timeout): endtime = time.time() + timeout msg = "" src_addr = None while time.time() < endtime: readset = select([self.sock], [], [], timeout) if len(readset[0]) < 1 or not self.sock in readset[0]: if len(readset[0]) < 1: print "select() timeout" elif not self.sock in readset[0]: print "select()... | def wait_msg_from(self, timeout): endtime = time.time() + timeout msg = "" src_addr = None while time.time() < endtime: readset = select([self.sock], [], [], timeout) if len(readset[0]) < 1 or not self.sock in readset[0]: if len(readset[0]) < 1: print "select() timeout (will wait for " + str(int(endtime - time.time()))... | 458,656 |
def wsgify_django(global_config, **local_conf): """ Load the Django application for use in a WSGI server. :raises ImportError: If the Django settings module cannot be imported. :raises ValueError: If ``local_conf`` contains a Django setting which is not supported. :raises ValueError: If the ``django_settings_module`` ... | def wsgify_django(global_config, **local_conf): """ Load the Django application for use in a WSGI server. :raises ImportError: If the Django settings module cannot be imported. :raises ValueError: If ``local_conf`` contains a Django setting which is not supported. :raises ValueError: If the ``django_settings_module`` ... | 458,657 |
def test_string_as_response(self): app = MockApp("200 It is OK", [("X-HEADER", "Foo")]) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: django_response = django_view(request... | def test_string_as_response(self): app = MockApp("200 It is OK", [("X-HEADER", "Foo")]) # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: django_response = django_view(request) http_response = ( "X-HEADER: Foo\n" "Cont... | 458,658 |
def test_string_as_response(self): app = MockApp("200 It is OK", [("X-HEADER", "Foo")]) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: django_response = django_view(request... | def test_string_as_response(self): app = MockApp("200 It is OK", [("X-HEADER", "Foo")]) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: http_response = ( "X-HEADER: Foo\n" "... | 458,659 |
def test_iterable_as_response(self): app = MockGeneratorApp("200 It is OK", [("X-HEADER", "Foo")]) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: django_response = django_v... | def test_iterable_as_response(self): app = MockGeneratorApp("200 It is OK", [("X-HEADER", "Foo")]) # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: django_response = django_view(request) assert_false(django_response._... | 458,660 |
def test_iterable_as_response(self): app = MockGeneratorApp("200 It is OK", [("X-HEADER", "Foo")]) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: django_response = django_v... | def test_iterable_as_response(self): app = MockGeneratorApp("200 It is OK", [("X-HEADER", "Foo")]) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: assert_false(django_respon... | 458,661 |
def test_write_response(self): app = MockWriteApp("200 It is OK", [("X-HEADER", "Foo")]) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: django_response = django_view(reques... | def test_write_response(self): app = MockWriteApp("200 It is OK", [("X-HEADER", "Foo")]) # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: django_response = django_view(request) assert_false(django_response._is_string)... | 458,662 |
def test_write_response(self): app = MockWriteApp("200 It is OK", [("X-HEADER", "Foo")]) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: django_response = django_view(reques... | def test_write_response(self): app = MockWriteApp("200 It is OK", [("X-HEADER", "Foo")]) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) # Checking the response: assert_false(django_response._is_str... | 458,663 |
def test_closure_response(self): """The .close() method in the response (if any) must be kept.""" app = MockClosingApp("200 It is OK", []) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) django_resp... | def test_closure_response(self): """The .close() method in the response (if any) must be kept.""" app = MockClosingApp("200 It is OK", []) # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) django_response = django_view(request) # Checking the ... | 458,664 |
def test_closure_response(self): """The .close() method in the response (if any) must be kept.""" app = MockClosingApp("200 It is OK", []) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) django_resp... | def test_closure_response(self): """The .close() method in the response (if any) must be kept.""" app = MockClosingApp("200 It is OK", []) django_view = make_wsgi_view(app, "/blog") # Running a request: environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts") request = make_request(**environ) django_resp... | 458,665 |
def Cleanup(ret): | def Cleanup(ret): | 458,666 |
def hash_qbk_file(self, xml_file): qbk_file = xml_file.replace('.xml', '.qbk') if(not os.path.isfile(qbk_file)): return (None, None) with open(qbk_file) as file: return (qbk_file, hashlib.sha256(file.read()).hexdigest()) | def hash_qbk_file(self, xml_file): qbk_file = os.path.normpath(xml_file.replace('.xml', '.qbk')).replace('\\', '/') if(not os.path.isfile(qbk_file)): return (None, None) with open(qbk_file) as file: return (qbk_file, hashlib.sha256(file.read()).hexdigest()) | 458,667 |
def setUp(self): super(TestHesiodLookup, self).setUp() | def setUp(self): super(TestHesiodLookup, self).setUp() | 458,668 |
def is_cups_server(rm): """See if a host is accepting connections on port 631. Args: A hostname Returns: True if the server is accepting connections, otherwise False """ try: s = socket.socket() s.settimeout(0, 3) s.connect((rm, 631)) s.close() return True except (socket.error, socket.timeout): return False | def is_cups_server(rm): """See if a host is accepting connections on port 631. Args: A hostname Returns: True if the server is accepting connections, otherwise False """ try: s = socket.socket() s.settimeout(0.3) s.connect((rm, 631)) s.close() return True except (socket.error, socket.timeout): return False | 458,669 |
def get_default_printer(): """Find and return the default printer""" _setup() if 'PRINTER' in os.environ: return os.environ['PRINTER'] if cupsd: default = cups.getDefault() if default: return default for result in _hesiod_lookup(socket.getfqdn(), 'cluster'): key, value = result.split(None, 1) if key == 'lpr': return... | def get_default_printer(): """Find and return the default printer""" _setup() if 'PRINTER' in os.environ: return os.environ['PRINTER'] if cupsd: default = cupsd.getDefault() if default: return default for result in _hesiod_lookup(socket.getfqdn(), 'cluster'): key, value = result.split(None, 1) if key == 'lpr': retur... | 458,670 |
def classify(self, text): scores = {} | def classify(self, text): scores = {} | 458,671 |
def __init__(self, *args, **kwargs): super(DatabaseWrapper, self).__init__(*args, **kwargs) self.features = DatabaseFeatures() self.ops = DatabaseOperations() self.client = BaseDatabaseClient(self) self.creation = DatabaseCreation(self) self.introspection = DatabaseIntrospection(self) self.validation = BaseDatabaseVa... | def __init__(self, *args, **kwargs): super(DatabaseWrapper, self).__init__(*args, **kwargs) self.features = DatabaseFeatures() self.ops = DatabaseOperations() self.client = BaseDatabaseClient(self) self.creation = DatabaseCreation(self) self.introspection = DatabaseIntrospection(self) self.validation = BaseDatabaseVa... | 458,672 |
def to_python(self, value): if value is None: return value try: return long(value) except (TypeError, ValueError): raise exceptions.ValidationError( _("This value must be an long.")) | def to_python(self, value): if value is None: return value try: return long(value) except (TypeError, ValueError): raise ValidationError( _("This value must be an long.")) | 458,673 |
def to_python(self, value): if value is None: return value try: return long(value) except (TypeError, ValueError): raise exceptions.ValidationError( _("This value must be an long.")) | def to_python(self, value): if value is None: return value try: return long(value) except (TypeError, ValueError): raise ValidationError( _("This value must be an long.")) | 458,674 |
def get_generator_from_config(self): if self.generator_index: generators = self.get_generators() return generators[self.generator_index] else: config = ConfigParser.RawConfigParser() config.read(self.config_filepath()) return config.get('cmake', 'generator') | def get_generator_from_config(self): if self.generator_id: generators = self.get_generators() return generators[self.generator_index] else: config = ConfigParser.RawConfigParser() config.read(self.config_filepath()) return config.get('cmake', 'generator') | 458,675 |
def get_generator_from_config(self): if self.generator_index: generators = self.get_generators() return generators[self.generator_index] else: config = ConfigParser.RawConfigParser() config.read(self.config_filepath()) return config.get('cmake', 'generator') | def get_generator_from_config(self): if self.generator_index: generators = self.get_generators() return generators[self.generator_id] else: config = ConfigParser.RawConfigParser() config.read(self.config_filepath()) return config.get('cmake', 'generator') | 458,676 |
def get_generator_from_prompt(self): generators = self.get_generators() # if user has specified a generator as an argument if self.generator_index: return generators[self.generator_index] # if we can accept user input elif not self.no_prompts: generator_options = '' generators_sorted = sorted(generators.iteritems(),... | def get_generator_from_prompt(self): generators = self.get_generators() # if user has specified a generator as an argument if self.generator_id: return generators[self.generator_id] # if we can accept user input elif not self.no_prompts: generator_options = '' generators_sorted = sorted(generators.iteritems(), key=l... | 458,677 |
def __init__(self, argv, opts, args): self.opts = opts self.args = args for o, a in self.opts: if o == '--no-prompts': self.ic.no_prompts = True elif o in ('-g', '--generator'): self.ic.generator_index = a | def __init__(self, argv, opts, args): self.opts = opts self.args = args for o, a in self.opts: if o == '--no-prompts': self.ic.no_prompts = True elif o in ('-g', '--generator'): self.ic.generator_index = a | 458,678 |
def start_cmd(argv): cmd_arg = '' if len(argv) > 1: cmd_arg = argv[1] # change common help args to help command if cmd_arg in ('--help', '-h', '--usage', '-u', '/?'): cmd_arg = 'usage' completions = complete_command(cmd_arg) if cmd_arg and len(completions) > 0: if len(completions) == 1: # get the only completion ... | def start_cmd(argv): cmd_arg = '' if len(argv) > 1: cmd_arg = argv[1] # change common help args to help command if cmd_arg in ('--help', '-h', '--usage', '-u', '/?'): cmd_arg = 'usage' completions = complete_command(cmd_arg) if cmd_arg and len(completions) > 0: if len(completions) == 1: # get the only completion ... | 458,679 |
def start_cmd(argv): cmd_arg = '' if len(argv) > 1: cmd_arg = argv[1] # change common help args to help command if cmd_arg in ('--help', '-h', '--usage', '-u', '/?'): cmd_arg = 'usage' completions = complete_command(cmd_arg) if cmd_arg and len(completions) > 0: if len(completions) == 1: # get the only completion ... | def start_cmd(argv): cmd_arg = '' if len(argv) > 1: cmd_arg = argv[1] # change common help args to help command if cmd_arg in ('--help', '-h', '--usage', '-u', '/?'): cmd_arg = 'usage' completions = complete_command(cmd_arg) if cmd_arg and len(completions) > 0: if len(completions) == 1: # get the only completion ... | 458,680 |
def start_cmd(argv): cmd_arg = '' if len(argv) > 1: cmd_arg = argv[1] # change common help args to help command if cmd_arg in ('--help', '-h', '--usage', '-u', '/?'): cmd_arg = 'usage' completions = complete_command(cmd_arg) if cmd_arg and len(completions) > 0: if len(completions) == 1: # get the only completion ... | def start_cmd(argv): cmd_arg = '' if len(argv) > 1: cmd_arg = argv[1] # change common help args to help command if cmd_arg in ('--help', '-h', '--usage', '-u', '/?'): cmd_arg = 'usage' completions = complete_command(cmd_arg) if cmd_arg and len(completions) > 0: if len(completions) == 1: # get the only completion ... | 458,681 |
def persist_cmake(self): if sys.platform == 'win32': version = '2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s by running `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=subpr... | def persist_cmake(self): if sys.platform == 'win32': version = '>= 2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s by running `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=su... | 458,682 |
def persist_cmake(self): if sys.platform == 'win32': version = '2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s by running `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=subpr... | def persist_cmake(self): if sys.platform == 'win32': version = '2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s by running `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=subpr... | 458,683 |
def persist_cmake(self): if sys.platform == 'win32': version = '2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s by running `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=subpr... | def persist_cmake(self): if sys.platform == 'win32': version = '2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s by running `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=subpr... | 458,684 |
def open(self): generator = self.get_generator_from_config() if generator.startswith('Visual Studio'): print 'Opening with %s...' % generator self.open_internal(self.sln_filepath()) elif generator.startswith('Xcode'): print 'Opening with %s...' % generator self.open_internal(xcodeproj_filepath(), 'open') else: raise ... | def open(self): generator = self.get_generator_from_config() if generator.startswith('Visual Studio'): print 'Opening with %s...' % generator self.open_internal(self.sln_filepath()) elif generator.startswith('Xcode'): print 'Opening with %s...' % generator self.open_internal(self.xcodeproj_filepath(), 'open') else: r... | 458,685 |
def open(self): generator = self.get_generator_from_config() if generator.startswith('Visual Studio'): print 'Opening with %s...' % generator self.open_internal(self.sln_filepath()) elif generator.startswith('Xcode'): print 'Opening with %s...' % generator self.open_internal(xcodeproj_filepath(), 'open') else: raise ... | def open(self): generator = self.get_generator_from_config() if generator.startswith('Visual Studio'): print 'Opening with %s...' % generator self.open_internal(self.sln_filepath()) elif generator.startswith('Xcode'): print 'Opening with %s...' % generator self.open_internal(self.xcodeproj_filepath(), 'open') else: r... | 458,686 |
def get_build_mode(self): mode = None for o, a in self.opts: if o == ('-d', '--debug'): mode = 'debug' elif o == ('-r', '--release'): mode = 'release' return mode | def get_build_mode(self): mode = None for o, a in self.opts: if o in ('-d', '--debug'): mode = 'debug' elif o == ('-r', '--release'): mode = 'release' return mode | 458,687 |
def get_build_mode(self): mode = None for o, a in self.opts: if o == ('-d', '--debug'): mode = 'debug' elif o == ('-r', '--release'): mode = 'release' return mode | def get_build_mode(self): mode = None for o, a in self.opts: if o == ('-d', '--debug'): mode = 'debug' elif o in ('-r', '--release'): mode = 'release' return mode | 458,688 |
def persist_cmake(self): if sys.platform == 'win32': version = '2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s at `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PI... | def persist_cmake(self): if sys.platform == 'win32': version = '2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s by running `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=subpr... | 458,689 |
def persist_cmake(self): if sys.platform == 'win32': version = '2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s at `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PI... | def persist_cmake(self): if sys.platform == 'win32': version = '2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s at `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PI... | 458,690 |
def build(self, mode = None): | def build(self, mode = None): | 458,691 |
def test0005views(self): ''' Test views. ''' self.assertRaises(Exception, test_view('stock_supply_day')) | def test0005views(self): ''' Test views. ''' self.assertRaises(Exception, test_view('stock_supply_day')) | 458,692 |
def move(form, field_name, before=None, after=None, prefix=None, relative_prefix=None): """Move the field with the given name before or after another field. """ if prefix: field_name = expandPrefix(prefix) + field_name if before and after: raise ValueError(u"Only one of 'before' or 'after' is allowed") offset = 0 if ... | def move(form, field_name, before=None, after=None, prefix=None, relative_prefix=None): """Move the field with the given name before or after another field. """ if prefix: field_name = expandPrefix(prefix) + field_name if before and after: raise ValueError(u"Only one of 'before' or 'after' is allowed") offset = 0 if ... | 458,693 |
def dir(*dirs): return apply(os.path.join,(dest_dir,)+dirs) | def dir(*dirs): return apply(os.path.join,(dest_dir,)+dirs) | 458,694 |
def install_project(self, scheduler_file = None): if os.path.exists(self.dir()): raise SystemExit('Project directory "%s" already exists; this would clobber it!'%self.dir()) | def install_project(self, scheduler_file = None): if os.path.exists(self.dir()): raise SystemExit('Project directory "%s" already exists; this would clobber it!'%self.dir()) | 458,695 |
def dir(*dirs): return apply(os.path.join,(dest_dir,)+dirs) | def dir(*dirs): return apply(os.path.join,(dest_dir,)+dirs) | 458,696 |
def _get_filetype(fn): if fn.rfind('.c') or fn.rfind('.C') or fn.rfind('.cpp'): return 1 # assimble file type if fn.rfind('.s') or fn.rfind('.S'): return 2 # header type if fn.rfind('.h'): return 5 # other filetype return 5 | def _get_filetype(fn): if fn.rfind('.c') != -1 or fn.rfind('.C') != -1 or fn.rfind('.cpp') != -1: return 1 # assimble file type if fn.rfind('.s') or fn.rfind('.S'): return 2 # header type if fn.rfind('.h'): return 5 # other filetype return 5 | 458,697 |
def _get_filetype(fn): if fn.rfind('.c') or fn.rfind('.C') or fn.rfind('.cpp'): return 1 # assimble file type if fn.rfind('.s') or fn.rfind('.S'): return 2 # header type if fn.rfind('.h'): return 5 # other filetype return 5 | def _get_filetype(fn): if fn.rfind('.c') or fn.rfind('.C') or fn.rfind('.cpp'): return 1 # assimble file type if fn.rfind('.s') != -1 or fn.rfind('.S') != -1: return 2 # header type if fn.rfind('.h'): return 5 # other filetype return 5 | 458,698 |
def _get_filetype(fn): if fn.rfind('.c') or fn.rfind('.C') or fn.rfind('.cpp'): return 1 # assimble file type if fn.rfind('.s') or fn.rfind('.S'): return 2 # header type if fn.rfind('.h'): return 5 # other filetype return 5 | def _get_filetype(fn): if fn.rfind('.c') or fn.rfind('.C') or fn.rfind('.cpp'): return 1 # assimble file type if fn.rfind('.s') or fn.rfind('.S'): return 2 # header type if fn.rfind('.h') != -1: return 5 # other filetype return 5 | 458,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.