project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pasteorg_pastescript | public | public | 0 | 0 | warn | def warn(name, stacklevel=3):# Deprecated 2007-12-17warnings.warn('The egg:PasteScript#flup_%s entry point is deprecated; please use egg:Flup#%s instead'% (name, name),DeprecationWarning, stacklevel=stacklevel) | 1 | 5 | 2 | 27 | 0 | 7 | 12 | 7 | name,stacklevel | [] | None | {"Expr": 1} | 1 | 6 | 1 | ["warnings.warn"] | 126 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535398_idsia_brainstorm.setup_py.build_ext.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670679_blaze_datashape.datashape.discovery_py.discover", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.... | The function (warn) defined within the public class called public.The function start at line 7 and ends at 12. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [7.0] and does not return any value. It declare 1.0 function, It has 1.0 function called inside which ... |
pasteorg_pastescript | public | public | 0 | 0 | run_ajp_thread | def run_ajp_thread(wsgi_app, global_conf, scriptName='', host='localhost', port='8009', allowedServers='127.0.0.1'):import flup.server.ajpwarn('ajp_thread')addr = (host, int(port))ensure_port_cleanup([addr])s = flup.server.ajp.WSGIServer(wsgi_app,scriptName=scriptName,bindAddress=addr,allowedServers=aslist(allowedServe... | 1 | 14 | 6 | 82 | 2 | 14 | 27 | 14 | wsgi_app,global_conf,scriptName,host,port,allowedServers | ['s', 'addr'] | None | {"Assign": 2, "Expr": 3} | 6 | 14 | 6 | ["warn", "int", "ensure_port_cleanup", "flup.server.ajp.WSGIServer", "aslist", "s.run"] | 0 | [] | The function (run_ajp_thread) defined within the public class called public.The function start at line 14 and ends at 27. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [14.0] and does not return any value. It declares 6.0 functions, and It has 6.0 functions... |
pasteorg_pastescript | public | public | 0 | 0 | run_ajp_fork | def run_ajp_fork(wsgi_app, global_conf, scriptName='', host='localhost', port='8009', allowedServers='127.0.0.1'):import flup.server.ajp_forkwarn('ajp_fork')addr = (host, int(port))ensure_port_cleanup([addr])s = flup.server.ajp_fork.WSGIServer(wsgi_app,scriptName=scriptName,bindAddress=addr,allowedServers=aslist(allowe... | 1 | 14 | 6 | 82 | 2 | 29 | 42 | 29 | wsgi_app,global_conf,scriptName,host,port,allowedServers | ['s', 'addr'] | None | {"Assign": 2, "Expr": 3} | 6 | 14 | 6 | ["warn", "int", "ensure_port_cleanup", "flup.server.ajp_fork.WSGIServer", "aslist", "s.run"] | 0 | [] | The function (run_ajp_fork) defined within the public class called public.The function start at line 29 and ends at 42. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [29.0] and does not return any value. It declares 6.0 functions, and It has 6.0 functions c... |
pasteorg_pastescript | public | public | 0 | 0 | run_fcgi_thread | def run_fcgi_thread(wsgi_app, global_conf,host=None, port=None,socket=None, umask=None,multiplexed=False):import flup.server.fcgiwarn('fcgi_thread')if socket:assert host is None and port is Nonesock = socketelif host:assert host is not None and port is not Nonesock = (host, int(port))ensure_port_cleanup([sock])else:soc... | 6 | 22 | 7 | 129 | 3 | 44 | 65 | 44 | wsgi_app,global_conf,host,port,socket,umask,multiplexed | ['s', 'sock', 'umask'] | None | {"Assign": 5, "Expr": 3, "If": 3} | 7 | 22 | 7 | ["warn", "int", "ensure_port_cleanup", "int", "flup.server.fcgi.WSGIServer", "asbool", "s.run"] | 0 | [] | The function (run_fcgi_thread) defined within the public class called public.The function start at line 44 and ends at 65. It contains 22 lines of code and it has a cyclomatic complexity of 6. It takes 7 parameters, represented as [44.0] and does not return any value. It declares 7.0 functions, and It has 7.0 function... |
pasteorg_pastescript | public | public | 0 | 0 | run_fcgi_fork | def run_fcgi_fork(wsgi_app, global_conf,host=None, port=None,socket=None, umask=None,multiplexed=False):import flup.server.fcgi_forkwarn('fcgi_fork')if socket:assert host is None and port is Nonesock = socketelif host:assert host is not None and port is not Nonesock = (host, int(port))ensure_port_cleanup([sock])else:so... | 6 | 22 | 7 | 129 | 3 | 67 | 88 | 67 | wsgi_app,global_conf,host,port,socket,umask,multiplexed | ['s', 'sock', 'umask'] | None | {"Assign": 5, "Expr": 3, "If": 3} | 7 | 22 | 7 | ["warn", "int", "ensure_port_cleanup", "int", "flup.server.fcgi_fork.WSGIServer", "asbool", "s.run"] | 0 | [] | The function (run_fcgi_fork) defined within the public class called public.The function start at line 67 and ends at 88. It contains 22 lines of code and it has a cyclomatic complexity of 6. It takes 7 parameters, represented as [67.0] and does not return any value. It declares 7.0 functions, and It has 7.0 functions ... |
pasteorg_pastescript | public | public | 0 | 0 | run_scgi_thread | def run_scgi_thread(wsgi_app, global_conf,scriptName='', host='localhost', port='4000',allowedServers='127.0.0.1'):import flup.server.scgiwarn('scgi_thread')addr = (host, int(port))ensure_port_cleanup([addr])s = flup.server.scgi.WSGIServer(wsgi_app,scriptName=scriptName,bindAddress=addr,allowedServers=aslist(allowedSer... | 1 | 14 | 6 | 82 | 2 | 90 | 103 | 90 | wsgi_app,global_conf,scriptName,host,port,allowedServers | ['s', 'addr'] | None | {"Assign": 2, "Expr": 3} | 6 | 14 | 6 | ["warn", "int", "ensure_port_cleanup", "flup.server.scgi.WSGIServer", "aslist", "s.run"] | 0 | [] | The function (run_scgi_thread) defined within the public class called public.The function start at line 90 and ends at 103. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [90.0] and does not return any value. It declares 6.0 functions, and It has 6.0 functio... |
pasteorg_pastescript | public | public | 0 | 0 | run_scgi_fork | def run_scgi_fork(wsgi_app, global_conf,scriptName='', host='localhost', port='4000',allowedServers='127.0.0.1'):import flup.server.scgi_forkwarn('scgi_fork')addr = (host, int(port))ensure_port_cleanup([addr])s = flup.server.scgi_fork.WSGIServer(wsgi_app,scriptName=scriptName,bindAddress=addr,allowedServers=aslist(allo... | 1 | 14 | 6 | 82 | 2 | 105 | 118 | 105 | wsgi_app,global_conf,scriptName,host,port,allowedServers | ['s', 'addr'] | None | {"Assign": 2, "Expr": 3} | 6 | 14 | 6 | ["warn", "int", "ensure_port_cleanup", "flup.server.scgi_fork.WSGIServer", "aslist", "s.run"] | 0 | [] | The function (run_scgi_fork) defined within the public class called public.The function start at line 105 and ends at 118. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [105.0] and does not return any value. It declares 6.0 functions, and It has 6.0 functio... |
pasteorg_pastescript | GrepCommand | public | 0 | 1 | command | def command(self):self.exclude_modules = self.options.exclude_modules or []self.add_types = self.options.add_types or []self.symbol = self.args[0]self.basedir = os.path.dirname(pluginlib.find_egg_info_dir(os.getcwd()))if self.verbose:print("Searching in %s" % self.basedir)self.total_files = 0self.search_dir(self.basedi... | 5 | 12 | 1 | 101 | 0 | 38 | 49 | 38 | self | [] | None | {"Assign": 5, "Expr": 3, "If": 2} | 6 | 12 | 6 | ["os.path.dirname", "pluginlib.find_egg_info_dir", "os.getcwd", "print", "self.search_dir", "print"] | 59 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec._eval", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec.retry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.368186... | The function (command) defined within the public class called GrepCommand, that inherit another class.The function start at line 38 and ends at 49. It contains 12 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 6.0 functions, It... |
pasteorg_pastescript | GrepCommand | public | 0 | 1 | search_dir | def search_dir(self, dir):names = os.listdir(dir)names.sort()dirs = []for name in names:full = os.path.join(dir, name)if name in self.bad_names:continueif os.path.isdir(full):# Breadth-first; we'll do this later...dirs.append(full)continuefor t in self.add_types:if name.lower().endswith(t.lower()):self.search_text(full... | 8 | 19 | 2 | 122 | 0 | 51 | 70 | 51 | self,dir | [] | None | {"Assign": 3, "Expr": 5, "For": 3, "If": 4} | 12 | 20 | 12 | ["os.listdir", "names.sort", "os.path.join", "os.path.isdir", "dirs.append", "endswith", "name.lower", "t.lower", "self.search_text", "name.endswith", "self.search_file", "self.search_dir"] | 0 | [] | The function (search_dir) defined within the public class called GrepCommand, that inherit another class.The function start at line 51 and ends at 70. It contains 19 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [51.0] and does not return any value. It declares 12.0 functi... |
pasteorg_pastescript | GrepCommand | public | 0 | 1 | search_file | def search_file(self, filename):self.total_files += 1if not filename.endswith('.py'):self.search_text(filename)returnpyc = filename[:-2]+'pyc'if not os.path.exists(pyc):try:py_compile.compile(filename)except OSError:# ignore permission error if the .pyc cannot be writtenpassif not os.path.exists(pyc):# Invalid syntax..... | 6 | 22 | 2 | 126 | 0 | 72 | 98 | 72 | self,filename | [] | None | {"Assign": 2, "AugAssign": 1, "Expr": 5, "If": 3, "Return": 2, "Try": 2, "With": 1} | 10 | 27 | 10 | ["filename.endswith", "self.search_text", "os.path.exists", "py_compile.compile", "os.path.exists", "self.search_text", "open", "f.read", "marshal.load", "self.search_code"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3722056_grml_grml2usb.test.grml2usb_py.copy_bootloader_files", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3722056_grml_grml2usb.test.grml2usb_py.copy_system_files", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cr... | The function (search_file) defined within the public class called GrepCommand, that inherit another class.The function start at line 72 and ends at 98. It contains 22 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [72.0] and does not return any value. It declares 10.0 funct... |
pasteorg_pastescript | GrepCommand | public | 0 | 1 | search_code | def search_code(self, code, filename, path):if code.co_name != "?":path = path + [code.co_name]else:path = pathsym = self.symbolif sym in code.co_varnames:self.found(code, filename, path)elif sym in code.co_names:self.found(code, filename, path)for const in code.co_consts:if const == sym:self.found(code, filename, path... | 8 | 17 | 4 | 120 | 0 | 100 | 116 | 100 | self,code,filename,path | [] | None | {"Assign": 3, "Expr": 4, "For": 1, "If": 6} | 5 | 17 | 5 | ["self.found", "self.found", "self.found", "inspect.iscode", "self.search_code"] | 0 | [] | The function (search_code) defined within the public class called GrepCommand, that inherit another class.The function start at line 100 and ends at 116. It contains 17 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [100.0] and does not return any value. It declares 5.0 fun... |
pasteorg_pastescript | GrepCommand | public | 0 | 1 | _open | def _open(self, filename):if filename.endswith('.py') and hasattr(tokenize, 'open'):# On Python 3.2 and newer, open Python files with tokenize.open().# This functions uses the encoding cookie to get the encoding.return tokenize.open(filename)else:return open(filename) | 3 | 5 | 2 | 36 | 0 | 118 | 124 | 118 | self,filename | [] | Returns | {"If": 1, "Return": 2} | 4 | 7 | 4 | ["filename.endswith", "hasattr", "tokenize.open", "open"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3959435_kscsdk_ksc_sdk_python.kscore.utils_py.parse_key_val_file"] | The function (_open) defined within the public class called GrepCommand, that inherit another class.The function start at line 118 and ends at 124. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [118.0], and this function return a value. It declares 4.0 functi... |
pasteorg_pastescript | GrepCommand | public | 0 | 1 | search_text | def search_text(self, filename, as_module=False):with self._open(filename) as f:lineno = 0any = Falsefor line in f:lineno += 1if line.find(self.symbol) != -1:if not any:any = Trueif as_module:print('%s (unloadable)' % self.module_name(filename))else:print(self.relative_name(filename))print('%3i%s' % (lineno, line))if n... | 6 | 16 | 3 | 97 | 0 | 126 | 141 | 126 | self,filename,as_module | [] | None | {"Assign": 3, "AugAssign": 1, "Expr": 3, "For": 1, "If": 4, "With": 1} | 7 | 16 | 7 | ["self._open", "line.find", "print", "self.module_name", "print", "self.relative_name", "print"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675353_recipy_recipy.recipyCmd.recipycmd_py.search"] | The function (search_text) defined within the public class called GrepCommand, that inherit another class.The function start at line 126 and ends at 141. It contains 16 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [126.0] and does not return any value. It declares 7.0 fun... |
pasteorg_pastescript | GrepCommand | public | 0 | 1 | found | def found(self, code, filename, path):print(self.display(filename, path))self.find_occurance(code) | 1 | 3 | 4 | 28 | 0 | 143 | 145 | 143 | self,code,filename,path | [] | None | {"Expr": 2} | 3 | 3 | 3 | ["print", "self.display", "self.find_occurance"] | 0 | [] | The function (found) defined within the public class called GrepCommand, that inherit another class.The function start at line 143 and ends at 145. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [143.0] and does not return any value. It declares 3.0 functions,... |
pasteorg_pastescript | GrepCommand | public | 0 | 1 | find_occurance | def find_occurance(self, code):with self._open(code.co_filename) as f:lineno = 0for index, line in zip(range(code.co_firstlineno), f):lineno += 1passfirst_indent = Nonefor line in f:lineno += 1if line.find(self.symbol) != -1:this_indent = len(re.match(r'^[ \t]*', line).group(0))if first_indent is None:first_indent = th... | 7 | 19 | 2 | 127 | 0 | 147 | 165 | 147 | self,code | [] | None | {"Assign": 4, "AugAssign": 2, "Expr": 1, "For": 2, "If": 4, "With": 1} | 9 | 19 | 9 | ["self._open", "zip", "range", "line.find", "len", "group", "re.match", "print", "rstrip"] | 0 | [] | The function (find_occurance) defined within the public class called GrepCommand, that inherit another class.The function start at line 147 and ends at 165. It contains 19 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [147.0] and does not return any value. It declares 9.0 ... |
pasteorg_pastescript | GrepCommand | public | 0 | 1 | module_name | def module_name(self, filename):#assert filename, startswith(self.basedir)mod = filename[len(self.basedir):].strip('/').strip(os.path.sep)mod = os.path.splitext(mod)[0]mod = mod.replace(os.path.sep, '.').replace('/', '.')return mod | 1 | 5 | 2 | 69 | 0 | 167 | 172 | 167 | self,filename | [] | Returns | {"Assign": 3, "Return": 1} | 6 | 6 | 6 | ["strip", "strip", "len", "os.path.splitext", "replace", "mod.replace"] | 0 | [] | The function (module_name) defined within the public class called GrepCommand, that inherit another class.The function start at line 167 and ends at 172. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [167.0], and this function return a value. It declares 6.0 ... |
pasteorg_pastescript | GrepCommand | public | 0 | 1 | relative_name | def relative_name(self, filename):#assert filename, startswith(self.basedir)name = filename[len(self.basedir):].strip('/').strip(os.path.sep)return name | 1 | 3 | 2 | 35 | 0 | 174 | 177 | 174 | self,filename | [] | Returns | {"Assign": 1, "Return": 1} | 3 | 4 | 3 | ["strip", "strip", "len"] | 0 | [] | The function (relative_name) defined within the public class called GrepCommand, that inherit another class.The function start at line 174 and ends at 177. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [174.0], and this function return a value. It declares 3.... |
pasteorg_pastescript | GrepCommand | public | 0 | 1 | display | def display(self, filename, path):parts = '.'.join(path)if parts:parts = ':' + partsreturn self.module_name(filename) + parts | 2 | 5 | 3 | 34 | 0 | 179 | 183 | 179 | self,filename,path | [] | Returns | {"Assign": 2, "If": 1, "Return": 1} | 2 | 5 | 2 | ["join", "self.module_name"] | 19 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3714973_gandi_gandi_cli.gandi.cli.commands.contact_py.ask_field", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70179132_vyperlang_titanoboa.boa.integrations.jupyter.browser_py._install_javascript_triggers", "_.cont... | The function (display) defined within the public class called GrepCommand, that inherit another class.The function start at line 179 and ends at 183. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [179.0], and this function return a value. It declares 2.0 func... |
pasteorg_pastescript | HelpCommand | public | 0 | 1 | command | def command(self):if not self.args:self.generic_help()returnname = self.args[0]commands = get_commands()if name not in commands:print('No such command: %s' % name)self.generic_help()returncommand = commands[name].load()runner = command(name)runner.run(['-h']) | 3 | 13 | 1 | 72 | 0 | 15 | 29 | 15 | self | [] | None | {"Assign": 4, "Expr": 4, "If": 2, "Return": 2} | 7 | 15 | 7 | ["self.generic_help", "get_commands", "print", "self.generic_help", "load", "command", "runner.run"] | 59 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec._eval", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec.retry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.368186... | The function (command) defined within the public class called HelpCommand, that inherit another class.The function start at line 15 and ends at 29. It contains 13 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 7.0 functions, It... |
pasteorg_pastescript | HelpCommand | public | 0 | 1 | generic_help | def generic_help(self):base_parser.print_help()print()commands_grouped = {}commands = get_commands()longest = max([len(n) for n in commands.keys()])for name, command in commands.items():try:command = command.load()except Exception as e:print('Cannot load command %s: %s' % (name, e))continueif getattr(command, 'hidden',... | 8 | 27 | 1 | 177 | 0 | 31 | 59 | 31 | self | [] | None | {"Assign": 6, "Expr": 9, "For": 3, "If": 2, "Try": 1} | 20 | 29 | 20 | ["base_parser.print_help", "print", "get_commands", "max", "len", "commands.keys", "commands.items", "command.load", "print", "getattr", "append", "commands_grouped.setdefault", "commands_grouped.items", "sorted", "print", "print", "commands.sort", "print", "self.pad", "print"] | 0 | [] | The function (generic_help) defined within the public class called HelpCommand, that inherit another class.The function start at line 31 and ends at 59. It contains 27 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares 20.0 functio... |
pasteorg_pastescript | IAppInstall | public | 0 | 1 | __init__ | def __init__(distribution, entry_group, entry_name):"""An object representing a specific application (thedistribution is a pkg_resource.Distribution object), for thegiven entry point name in the given group.Right now the onlygroup used for this is ``'paste.app_factory'``.""" | 1 | 1 | 3 | 10 | 0 | 10 | 16 | 10 | distribution,entry_group,entry_name | [] | None | {"Expr": 1} | 0 | 7 | 0 | [] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called IAppInstall, that inherit another class.The function start at line 10 and ends at 16. It contains 1 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [10.0] and does not return any value. It has 8182.0 functions ca... |
pasteorg_pastescript | IAppInstall | public | 0 | 1 | description | def description(sys_config):"""Return a text description of the application and itsconfiguration.``sys_config`` is a dictionary representingthe system configuration, and can be used for giving moreexplicit defaults if the application preparation uses thesystem configuration.It may be None, in which case thedescription ... | 1 | 1 | 1 | 6 | 0 | 18 | 28 | 18 | sys_config | [] | None | {"Expr": 1} | 0 | 11 | 0 | [] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700117_gmr_rabbitpy.rabbitpy.events_py.Events.clear", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700117_gmr_rabbitpy.rabbitpy.events_py.Events.is_set", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Outp... | The function (description) defined within the public class called IAppInstall, that inherit another class.The function start at line 18 and ends at 28. It contains 1 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 5.0 functions calli... |
pasteorg_pastescript | IAppInstall | public | 0 | 1 | write_config | def write_config(command, filename, sys_config):"""Write a fresh config file to ``filename``.``command`` is a``paste.script.command.Command`` object, and should be usedfor the actual operations.It handles things like simulationand verbosity.``sys_config`` is (if given) a dictionary of system-wideconfiguration options."... | 1 | 1 | 3 | 10 | 0 | 30 | 39 | 30 | command,filename,sys_config | [] | None | {"Expr": 1} | 0 | 10 | 0 | [] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3966919_archivy_archivy.archivy.cli_py.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3966919_archivy_archivy.archivy.routes_py.config"] | The function (write_config) defined within the public class called IAppInstall, that inherit another class.The function start at line 30 and ends at 39. It contains 1 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [30.0] and does not return any value. It has 2.0 functions c... |
pasteorg_pastescript | IAppInstall | public | 0 | 1 | setup_config | def setup_config(command, config_filename, config_section, sys_config):"""Set up the application, using ``command`` (to ensure simulate,etc).The application is described by the configuration file``config_filename``.``sys_config`` is the systemconfiguration (though probably the values from it should havealready been enc... | 1 | 2 | 4 | 12 | 0 | 41 | 49 | 41 | command,config_filename,config_section,sys_config | [] | None | {"Expr": 1} | 0 | 9 | 0 | [] | 0 | [] | The function (setup_config) defined within the public class called IAppInstall, that inherit another class.The function start at line 41 and ends at 49. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [41.0] and does not return any value.. |
pasteorg_pastescript | public | public | 0 | 0 | add_plugin | def add_plugin(egg_info_dir, plugin_name):"""Add the plugin to the given distribution (or spec), in.egg-info/paster_plugins.txt"""fn = os.path.join(egg_info_dir, 'paster_plugins.txt')if not os.path.exists(fn):lines = []else:f = open(fn)lines = [l.strip() for l in f.readlines() if l.strip()]f.close()if plugin_name in li... | 7 | 18 | 2 | 144 | 3 | 6 | 28 | 6 | egg_info_dir,plugin_name | ['fn', 'lines', 'f'] | None | {"Assign": 5, "Expr": 7, "For": 1, "If": 3, "Return": 1} | 16 | 23 | 16 | ["os.path.join", "os.path.exists", "open", "l.strip", "f.readlines", "l.strip", "f.close", "lines.append", "os.path.exists", "os.path.dirname", "os.makedirs", "os.path.dirname", "open", "f.write", "f.write", "f.close"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3714737_divio_aldryn_forms.tests.test_cms_plugins_py.EmailNotificationFormPluginTestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3714737_divio_aldryn_forms.tests.test_cms_plugins_py.FormPluginTestCase.... | The function (add_plugin) defined within the public class called public.The function start at line 6 and ends at 28. It contains 18 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [6.0] and does not return any value. It declares 16.0 functions, It has 16.0 functions called i... |
pasteorg_pastescript | public | public | 0 | 0 | remove_plugin | def remove_plugin(egg_info_dir, plugin_name):"""Remove the plugin to the given distribution (or spec), in.egg-info/paster_plugins.txt.Raises ValueError if theplugin is not in the file."""fn = os.path.join(egg_info_dir, 'paster_plugins.txt')if not os.path.exists(fn):raise ValueError("Cannot remove plugin from %s; file d... | 7 | 23 | 2 | 148 | 3 | 30 | 58 | 30 | egg_info_dir,plugin_name | ['fn', 'lines', 'f'] | None | {"Assign": 4, "Expr": 7, "For": 2, "If": 2} | 17 | 29 | 17 | ["os.path.join", "os.path.exists", "ValueError", "open", "l.strip", "f.readlines", "l.strip", "f.close", "line.lower", "plugin_name.lower", "ValueError", "lines.remove", "print", "open", "f.write", "f.write", "f.close"] | 0 | [] | The function (remove_plugin) defined within the public class called public.The function start at line 30 and ends at 58. It contains 23 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [30.0] and does not return any value. It declares 17.0 functions, and It has 17.0 function... |
pasteorg_pastescript | public | public | 0 | 0 | find_egg_info_dir | def find_egg_info_dir(dir):while 1:try:filenames = os.listdir(dir)except OSError:# Probably permission denied or somethingreturn Nonefor fn in filenames:if (fn.endswith('.egg-info')and os.path.isdir(os.path.join(dir, fn))):return os.path.join(dir, fn)parent = os.path.dirname(dir)if parent == dir:# Top-most directoryret... | 7 | 14 | 1 | 87 | 3 | 60 | 75 | 60 | dir | ['filenames', 'parent', 'dir'] | Returns | {"Assign": 3, "For": 1, "If": 2, "Return": 3, "Try": 1, "While": 1} | 6 | 16 | 6 | ["os.listdir", "fn.endswith", "os.path.isdir", "os.path.join", "os.path.join", "os.path.dirname"] | 0 | [] | The function (find_egg_info_dir) defined within the public class called public.The function start at line 60 and ends at 75. It contains 14 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters, and this function return a value. It declares 6.0 functions, and It has 6.0 funct... |
pasteorg_pastescript | public | public | 0 | 0 | resolve_plugins | def resolve_plugins(plugin_list):found = []while plugin_list:plugin = plugin_list.pop()try:pkg_resources.require(plugin)except pkg_resources.DistributionNotFound as e:msg = '%sNot Found%s: %s (did you run python setup.py develop?)'if str(e) != plugin:e.args = (msg % (str(e) + ': ', ' for', plugin)),else:e.args = (msg %... | 7 | 21 | 1 | 143 | 5 | 77 | 97 | 77 | plugin_list | ['dist', 'data', 'found', 'plugin', 'msg'] | Returns | {"Assign": 7, "Expr": 3, "For": 1, "If": 3, "Return": 1, "Try": 1, "While": 1} | 12 | 21 | 12 | ["plugin_list.pop", "pkg_resources.require", "str", "str", "found.append", "get_distro", "dist.has_metadata", "dist.get_metadata", "parse_lines", "plugin_list.append", "list", "map"] | 0 | [] | The function (resolve_plugins) defined within the public class called public.The function start at line 77 and ends at 97. It contains 21 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters, and this function return a value. It declares 12.0 functions, and It has 12.0 funct... |
pasteorg_pastescript | public | public | 0 | 0 | get_distro | def get_distro(spec):return pkg_resources.get_distribution(spec) | 1 | 2 | 1 | 12 | 0 | 99 | 100 | 99 | spec | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["pkg_resources.get_distribution"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.pluginlib_py.resolve_plugins"] | The function (get_distro) defined within the public class called public.The function start at line 99 and ends at 100. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_pastescript | public | public | 0 | 0 | load_commands_from_plugins | def load_commands_from_plugins(plugins):commands = {}for plugin in plugins:commands.update(pkg_resources.get_entry_map(plugin, group='paste.paster_command'))return commands | 2 | 6 | 1 | 31 | 1 | 102 | 107 | 102 | plugins | ['commands'] | Returns | {"Assign": 1, "Expr": 1, "For": 1, "Return": 1} | 2 | 6 | 2 | ["commands.update", "pkg_resources.get_entry_map"] | 0 | [] | The function (load_commands_from_plugins) defined within the public class called public.The function start at line 102 and ends at 107. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has... |
pasteorg_pastescript | public | public | 0 | 0 | parse_lines | def parse_lines(data):result = []for line in data.splitlines():line = line.strip()if line and not line.startswith('#'):result.append(line)return result | 4 | 7 | 1 | 44 | 2 | 109 | 115 | 109 | data | ['line', 'result'] | Returns | {"Assign": 2, "Expr": 1, "For": 1, "If": 1, "Return": 1} | 4 | 7 | 4 | ["data.splitlines", "line.strip", "line.startswith", "result.append"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.pluginlib_py.resolve_plugins"] | The function (parse_lines) defined within the public class called public.The function start at line 109 and ends at 115. It contains 7 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 4.0 functions, It has 4.0 functions calle... |
pasteorg_pastescript | public | public | 0 | 0 | load_global_commands | def load_global_commands():commands = {}for p in pkg_resources.iter_entry_points('paste.global_paster_command'):commands[p.name] = preturn commands | 2 | 5 | 0 | 28 | 1 | 117 | 121 | 117 | ['commands'] | Returns | {"Assign": 2, "For": 1, "Return": 1} | 1 | 5 | 1 | ["pkg_resources.iter_entry_points"] | 0 | [] | The function (load_global_commands) defined within the public class called public.The function start at line 117 and ends at 121. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 fun... | |
pasteorg_pastescript | public | public | 0 | 0 | egg_name | def egg_name(dist_name):return pkg_resources.to_filename(pkg_resources.safe_name(dist_name)) | 1 | 2 | 1 | 17 | 0 | 123 | 124 | 123 | dist_name | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["pkg_resources.to_filename", "pkg_resources.safe_name"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.pluginlib_py.egg_info_dir"] | The function (egg_name) defined within the public class called public.The function start at line 123 and ends at 124. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functions called i... |
pasteorg_pastescript | public | public | 0 | 0 | egg_info_dir | def egg_info_dir(base_dir, dist_name):all = []for dir_extension in ['.'] + os.listdir(base_dir):full = os.path.join(base_dir, dir_extension,egg_name(dist_name)+'.egg-info')all.append(full)if os.path.exists(full):return fullraise IOError("No egg-info directory found (looked in %s)"% ', '.join(all)) | 3 | 10 | 2 | 74 | 2 | 126 | 135 | 126 | base_dir,dist_name | ['all', 'full'] | Returns | {"Assign": 2, "Expr": 1, "For": 1, "If": 1, "Return": 1} | 7 | 10 | 7 | ["os.listdir", "os.path.join", "egg_name", "all.append", "os.path.exists", "IOError", "join"] | 0 | [] | The function (egg_info_dir) defined within the public class called public.The function start at line 126 and ends at 135. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [126.0], and this function return a value. It declares 7.0 functions, and It has 7.0 func... |
pasteorg_pastescript | RequestCommand | public | 0 | 1 | command | def command(self):vars = {}app_spec = self.args[0]url = self.args[1]url = urljoin('/.command/', url)if self.options.config_vars:for item in self.option.config_vars:if ':' not in item:raise BadCommand("Bad option, should be name:value : --config-var=%s" % item)name, value = item.split(':', 1)vars[name] = valueheaders = ... | 19 | 72 | 1 | 518 | 0 | 65 | 139 | 65 | self | [] | Returns | {"Assign": 27, "Expr": 7, "For": 5, "If": 13, "Return": 1} | 31 | 75 | 31 | ["urljoin", "BadCommand", "item.split", "BadCommand", "item.split", "value.strip", "self._scheme_re.search", "app_spec.split", "loadapp", "os.getcwd", "self.command_name.lower", "quote", "item.split", "quote", "item.split", "quote", "qs.append", "join", "headers.items", "name.lower", "replace", "name.upper", "raw_inter... | 59 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec._eval", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec.retry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.368186... | The function (command) defined within the public class called RequestCommand, that inherit another class.The function start at line 65 and ends at 139. It contains 72 lines of code and it has a cyclomatic complexity of 19. The function does not take any parameters, and this function return a value. It declares 31.0 fun... |
pasteorg_pastescript | RequestCommand | public | 0 | 1 | parse_args | def parse_args(self, args):if args == ['-h']:Command.parse_args(self, args)return# These are the arguments parsed normally:normal_args = []# And these are arguments passed to the URL:extra_args = []# This keeps track of whether we have the two required positional arguments:pos_args = 0while args:start = args[0]if not s... | 11 | 46 | 2 | 222 | 0 | 141 | 190 | 141 | self,args | [] | None | {"Assign": 8, "AugAssign": 1, "Expr": 15, "For": 1, "If": 8, "Return": 1, "While": 1} | 19 | 50 | 19 | ["Command.parse_args", "start.startswith", "normal_args.append", "args.pop", "normal_args.append", "args.pop", "normal_args.append", "args.pop", "BadCommand", "normal_args.append", "args.pop", "start.startswith", "normal_args.append", "args.pop", "normal_args.append", "args.pop", "extra_args.append", "args.pop", "Comma... | 296 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.main_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3580082_pacificbiosciences_falcon.falcon_kit.mains.build_pdb_py.main", "_.content.gdrive.MyDrive.Phd_Thes... | The function (parse_args) defined within the public class called RequestCommand, that inherit another class.The function start at line 141 and ends at 190. It contains 46 lines of code and it has a cyclomatic complexity of 11. It takes 2 parameters, represented as [141.0] and does not return any value. It declares 19.0... |
pasteorg_pastescript | public | public | 0 | 0 | command.serve | def serve():try:server(app)except (SystemExit, KeyboardInterrupt) as e:if self.verbose > 1:raiseif str(e):msg = ' '+str(e)else:msg = ''print('Exiting%s (-v to see traceback)' % msg) | 4 | 11 | 0 | 52 | 0 | 300 | 310 | 300 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (command.serve) defined within the public class called public.The function start at line 300 and ends at 310. It contains 11 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
pasteorg_pastescript | ServeCommand | public | 0 | 1 | command | def command(self):if self.options.stop_daemon:return self.stop_daemon()if not hasattr(self.options, 'set_user'):# Windows case:self.options.set_user = self.options.set_group = None# @@: Is this the right stage to set the user at?self.change_user_group(self.options.set_user, self.options.set_group)if self.requires_confi... | 55 | 152 | 1 | 978 | 0 | 126 | 318 | 126 | self | [] | Returns | {"Assign": 43, "Expr": 24, "If": 42, "Return": 7, "Try": 6, "While": 1} | 64 | 193 | 64 | ["self.stop_daemon", "hasattr", "self.change_user_group", "BadCommand", "len", "getattr", "getattr", "BadCommand", "JythonMonitor", "int", "jython_monitor.watch_file", "os.environ.get", "print", "reloader.install", "int", "reloader.watch_file", "self.restart_with_reloader", "BadCommand", "self.show_status", "self.stop_... | 59 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec._eval", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec.retry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.368186... | The function (command) defined within the public class called ServeCommand, that inherit another class.The function start at line 126 and ends at 318. It contains 152 lines of code and it has a cyclomatic complexity of 55. The function does not take any parameters, and this function return a value. It declares 64.0 fun... |
pasteorg_pastescript | ServeCommand | public | 0 | 1 | loadserver | def loadserver(self, server_spec, name, relative_to, **kw):return loadserver(server_spec, name=name,relative_to=relative_to, **kw) | 1 | 4 | 5 | 30 | 0 | 320 | 323 | 320 | self,server_spec,name,relative_to,**kw | [] | Returns | {"Return": 1} | 1 | 4 | 1 | ["loadserver"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.serve_py.ServeCommand.loadserver"] | The function (loadserver) defined within the public class called ServeCommand, that inherit another class.The function start at line 320 and ends at 323. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [320.0], and this function return a value. It declare 1.0 f... |
pasteorg_pastescript | ServeCommand | public | 0 | 1 | loadapp | def loadapp(self, app_spec, name, relative_to, **kw):return loadapp(app_spec, name=name, relative_to=relative_to,**kw) | 1 | 4 | 5 | 30 | 0 | 325 | 328 | 325 | self,app_spec,name,relative_to,**kw | [] | Returns | {"Return": 1} | 1 | 4 | 1 | ["loadapp"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.request_py.RequestCommand.command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.serve_py.ServeCommand.loadapp"] | The function (loadapp) defined within the public class called ServeCommand, that inherit another class.The function start at line 325 and ends at 328. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [325.0], and this function return a value. It declare 1.0 func... |
pasteorg_pastescript | ServeCommand | public | 0 | 1 | daemonize | def daemonize(self):pid = live_pidfile(self.options.pid_file)if pid:raise DaemonizeException("Daemon is already running (PID: %s from PID file %s)"% (pid, self.options.pid_file))if self.verbose > 0:print('Entering daemon mode')pid = os.fork()if pid:# The forked process also has a handle on resources, so we# *don't* wan... | 9 | 31 | 1 | 176 | 0 | 330 | 372 | 330 | self | [] | None | {"Assign": 7, "Expr": 8, "For": 1, "If": 6, "Try": 1} | 15 | 43 | 15 | ["live_pidfile", "DaemonizeException", "print", "os.fork", "os._exit", "os.setsid", "os.fork", "os._exit", "resource.getrlimit", "range", "os.close", "hasattr", "os.open", "os.dup2", "os.dup2"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3704533_opentsdb_tcollector.tcollector_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3712295_dalibo_temboard_agent.temboardagent.scripts.agent_py.AgentApplication.main", "_.content.gdrive.MyDrive.Phd_Thesi... | The function (daemonize) defined within the public class called ServeCommand, that inherit another class.The function start at line 330 and ends at 372. It contains 31 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value. It declares 15.0 functio... |
pasteorg_pastescript | ServeCommand | public | 0 | 1 | record_pid | def record_pid(self, pid_file):pid = os.getpid()if self.verbose > 1:print('Writing PID %s to %s' % (pid, pid_file))f = open(pid_file, 'w')f.write(str(pid))f.close()atexit.register(_remove_pid_file, pid, pid_file, self.verbose) | 2 | 8 | 2 | 67 | 0 | 374 | 381 | 374 | self,pid_file | [] | None | {"Assign": 2, "Expr": 4, "If": 1} | 7 | 8 | 7 | ["os.getpid", "print", "open", "f.write", "str", "f.close", "atexit.register"] | 0 | [] | The function (record_pid) defined within the public class called ServeCommand, that inherit another class.The function start at line 374 and ends at 381. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [374.0] and does not return any value. It declares 7.0 func... |
pasteorg_pastescript | ServeCommand | public | 0 | 1 | stop_daemon | def stop_daemon(self):pid_file = self.options.pid_file or 'paster.pid'if not os.path.exists(pid_file):print('No PID file exists in %s' % pid_file)return 1pid = read_pidfile(pid_file)if not pid:print("Not a valid PID file in %s" % pid_file)return 1pid = live_pidfile(pid_file)if not pid:print("PID in %s is not valid (del... | 11 | 36 | 1 | 190 | 0 | 383 | 418 | 383 | self | [] | Returns | {"Assign": 3, "Expr": 11, "For": 2, "If": 6, "Return": 6, "Try": 1} | 19 | 36 | 19 | ["os.path.exists", "print", "read_pidfile", "print", "live_pidfile", "print", "os.unlink", "print", "range", "live_pidfile", "os.kill", "time.sleep", "range", "live_pidfile", "os.kill", "time.sleep", "print", "os.path.exists", "os.unlink"] | 0 | [] | The function (stop_daemon) defined within the public class called ServeCommand, that inherit another class.The function start at line 383 and ends at 418. It contains 36 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters, and this function return a value. It declares 19.0 ... |
pasteorg_pastescript | ServeCommand | public | 0 | 1 | show_status | def show_status(self):pid_file = self.options.pid_file or 'paster.pid'if not os.path.exists(pid_file):print('No PID file %s' % pid_file)return 1pid = read_pidfile(pid_file)if not pid:print('No PID in file %s' % pid_file)return 1pid = live_pidfile(pid_file)if not pid:print('PID %s in %s is not running' % (pid, pid_file)... | 5 | 15 | 1 | 81 | 0 | 420 | 434 | 420 | self | [] | Returns | {"Assign": 3, "Expr": 4, "If": 3, "Return": 4} | 7 | 15 | 7 | ["os.path.exists", "print", "read_pidfile", "print", "live_pidfile", "print", "print"] | 0 | [] | The function (show_status) defined within the public class called ServeCommand, that inherit another class.The function start at line 420 and ends at 434. It contains 15 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a value. It declares 7.0 fu... |
pasteorg_pastescript | ServeCommand | public | 0 | 1 | restart_with_reloader | def restart_with_reloader(self):self.restart_with_monitor(reloader=True) | 1 | 2 | 1 | 13 | 0 | 436 | 437 | 436 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.restart_with_monitor"] | 0 | [] | The function (restart_with_reloader) defined within the public class called ServeCommand, that inherit another class.The function start at line 436 and ends at 437. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.... |
pasteorg_pastescript | ServeCommand | public | 0 | 1 | restart_with_monitor | def restart_with_monitor(self, reloader=False):if self.verbose > 0:if reloader:print('Starting subprocess with file monitor')else:print('Starting subprocess with monitor parent')while 1:args = [self.quote_first_command_arg(sys.executable)] + sys.argvnew_environ = os.environ.copy()if reloader:new_environ[self._reloader_... | 14 | 38 | 2 | 197 | 0 | 439 | 478 | 439 | self,reloader | [] | Returns | {"Assign": 8, "Expr": 6, "If": 8, "Return": 2, "Try": 3, "While": 1} | 11 | 40 | 11 | ["print", "print", "self.quote_first_command_arg", "os.environ.copy", "_turn_sigterm_into_systemexit", "subprocess.Popen", "proc.wait", "print", "hasattr", "os.kill", "print"] | 0 | [] | The function (restart_with_monitor) defined within the public class called ServeCommand, that inherit another class.The function start at line 439 and ends at 478. It contains 38 lines of code and it has a cyclomatic complexity of 14. It takes 2 parameters, represented as [439.0], and this function return a value. It d... |
pasteorg_pastescript | ServeCommand | public | 0 | 1 | change_user_group | def change_user_group(self, user, group):if not user and not group:returnimport pwd, grpuid = gid = Noneif group:try:gid = int(group)group = grp.getgrgid(gid).gr_nameexcept ValueError:import grptry:entry = grp.getgrnam(group)except KeyError:raise BadCommand("Bad group: %r; no such group exists" % group)gid = entry.gr_g... | 16 | 41 | 3 | 219 | 0 | 480 | 520 | 480 | self,user,group | [] | None | {"Assign": 10, "Expr": 5, "If": 7, "Return": 1, "Try": 4} | 15 | 41 | 15 | ["int", "grp.getgrgid", "grp.getgrnam", "BadCommand", "int", "pwd.getpwuid", "pwd.getpwnam", "BadCommand", "print", "hasattr", "os.initgroups", "os.setgroups", "grp.getgrall", "os.setgid", "os.setuid"] | 0 | [] | The function (change_user_group) defined within the public class called ServeCommand, that inherit another class.The function start at line 480 and ends at 520. It contains 41 lines of code and it has a cyclomatic complexity of 16. It takes 3 parameters, represented as [480.0] and does not return any value. It declares... |
pasteorg_pastescript | LazyWriter | public | 0 | 1 | __init__ | def __init__(self, filename, mode='w'):self.filename = filenameself.fileobj = Noneself.lock = threading.Lock()self.mode = mode | 1 | 5 | 3 | 35 | 0 | 529 | 533 | 529 | self,filename,mode | [] | None | {"Assign": 4} | 1 | 5 | 1 | ["threading.Lock"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called LazyWriter, that inherit another class.The function start at line 529 and ends at 533. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [529.0] and does not return any value. It declare 1.0 function,... |
pasteorg_pastescript | LazyWriter | public | 0 | 1 | open | def open(self):if self.fileobj is None:self.lock.acquire()try:if self.fileobj is None:self.fileobj = open(self.filename, self.mode)finally:self.lock.release()return self.fileobj | 4 | 9 | 1 | 55 | 0 | 535 | 543 | 535 | self | [] | Returns | {"Assign": 1, "Expr": 2, "If": 2, "Return": 1, "Try": 1} | 3 | 9 | 3 | ["self.lock.acquire", "open", "self.lock.release"] | 3,920 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.144686_familysearch_gedcom.build.uri_def_py.get_text", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16418165_szabgab_pydigger_com.PyDigger.common_py.read_config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creati... | The function (open) defined within the public class called LazyWriter, that inherit another class.The function start at line 535 and ends at 543. It contains 9 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 3.0 functions, I... |
pasteorg_pastescript | LazyWriter | public | 0 | 1 | write | def write(self, text):fileobj = self.open()fileobj.write(text)fileobj.flush() | 1 | 4 | 2 | 25 | 0 | 545 | 548 | 545 | self,text | [] | None | {"Assign": 1, "Expr": 2} | 3 | 4 | 3 | ["self.open", "fileobj.write", "fileobj.flush"] | 182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3529443_petertodd_checklocktimeverify_demos.lib.python_bitcoinlib.examples.bip_0070_payment_protocol_py.payment_ack", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3529443_petertodd_checklocktimeverify_demos.lib.pyt... | The function (write) defined within the public class called LazyWriter, that inherit another class.The function start at line 545 and ends at 548. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [545.0] and does not return any value. It declares 3.0 functions, ... |
pasteorg_pastescript | LazyWriter | public | 0 | 1 | writelines | def writelines(self, text):fileobj = self.open()fileobj.writelines(text)fileobj.flush() | 1 | 4 | 2 | 25 | 0 | 550 | 553 | 550 | self,text | [] | None | {"Assign": 1, "Expr": 2} | 3 | 4 | 3 | ["self.open", "fileobj.writelines", "fileobj.flush"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3685539_vladris_tinkerer.blog.build_py.update_conf", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95027020_joezuntz_cosmosis.cosmosis.utils_py.save_section"] | The function (writelines) defined within the public class called LazyWriter, that inherit another class.The function start at line 550 and ends at 553. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [550.0] and does not return any value. It declares 3.0 functi... |
pasteorg_pastescript | LazyWriter | public | 0 | 1 | flush | def flush(self):self.open().flush() | 1 | 2 | 1 | 14 | 0 | 555 | 556 | 555 | self | [] | None | {"Expr": 1} | 2 | 2 | 2 | ["flush", "self.open"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625987_abdur_rahmaanj_honeybot.honeybot.plugins.poker_assets.best5_py.hand_rank", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720175_gabrielfalcao_httpretty.httpretty.core_py.FakeSockFile.flush", "_.content.gdri... | The function (flush) defined within the public class called LazyWriter, that inherit another class.The function start at line 555 and ends at 556. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It h... |
pasteorg_pastescript | public | public | 0 | 0 | live_pidfile | def live_pidfile(pidfile):"""(pidfile:str) -> int | NoneReturns an int found in the named file, if there is one,and if there is a running process with that process id.Return None if no such process exists."""pid = read_pidfile(pidfile)if pid:try:os.kill(int(pid), 0)return pidexcept OSError as e:if e.errno == errno.EPER... | 4 | 10 | 1 | 48 | 1 | 558 | 572 | 558 | pidfile | ['pid'] | Returns | {"Assign": 1, "Expr": 2, "If": 2, "Return": 3, "Try": 1} | 3 | 15 | 3 | ["read_pidfile", "os.kill", "int"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.serve_py.ServeCommand.daemonize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.serve_py.ServeCommand.show_status", "_.content.gd... | The function (live_pidfile) defined within the public class called public.The function start at line 558 and ends at 572. It contains 10 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions cal... |
pasteorg_pastescript | public | public | 0 | 0 | read_pidfile | def read_pidfile(filename):if os.path.exists(filename):try:f = open(filename)content = f.read()f.close()return int(content.strip())except (ValueError, IOError):return Noneelse:return None | 3 | 11 | 1 | 57 | 2 | 574 | 584 | 574 | filename | ['content', 'f'] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 3, "Try": 1} | 6 | 11 | 6 | ["os.path.exists", "open", "f.read", "f.close", "int", "content.strip"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.serve_py.ServeCommand.show_status", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.serve_py.ServeCommand.stop_daemon", "_.content.... | The function (read_pidfile) defined within the public class called public.The function start at line 574 and ends at 584. It contains 11 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 6.0 functions, It has 6.0 functions cal... |
pasteorg_pastescript | public | public | 0 | 0 | _remove_pid_file | def _remove_pid_file(written_pid, filename, verbosity):current_pid = os.getpid()if written_pid != current_pid:# A forked process must be exiting, not the process that# wrote the PID filereturnif not os.path.exists(filename):returnf = open(filename)content = f.read().strip()f.close()try:pid_in_file = int(content)except ... | 8 | 33 | 3 | 161 | 4 | 586 | 622 | 586 | written_pid,filename,verbosity | ['content', 'f', 'current_pid', 'pid_in_file'] | None | {"Assign": 5, "Expr": 9, "If": 4, "Return": 4, "Try": 3} | 16 | 37 | 16 | ["os.getpid", "os.path.exists", "open", "strip", "f.read", "f.close", "int", "print", "print", "os.unlink", "print", "open", "f.write", "f.close", "print", "print"] | 0 | [] | The function (_remove_pid_file) defined within the public class called public.The function start at line 586 and ends at 622. It contains 33 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [586.0] and does not return any value. It declares 16.0 functions, and It has 16.0 fu... |
pasteorg_pastescript | public | public | 0 | 0 | ensure_port_cleanup | def ensure_port_cleanup(bound_addresses, maxtries=30, sleeptime=2):"""This makes sure any open ports are closed.Does this by connecting to them until they give connectionrefused.Servers should call like::import paste.scriptensure_port_cleanup([80, 443])"""atexit.register(_cleanup_ports, bound_addresses, maxtries=maxtri... | 1 | 3 | 3 | 30 | 0 | 625 | 636 | 625 | bound_addresses,maxtries,sleeptime | [] | None | {"Expr": 2} | 1 | 12 | 1 | ["atexit.register"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.flup_server_py.run_ajp_fork", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.flup_server_py.run_ajp_thread", "_.content.gdrive.MyD... | The function (ensure_port_cleanup) defined within the public class called public.The function start at line 625 and ends at 636. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [625.0] and does not return any value. It declare 1.0 function, It has 1.0 function ... |
pasteorg_pastescript | public | public | 0 | 0 | _cleanup_ports | def _cleanup_ports(bound_addresses, maxtries=30, sleeptime=2):# Wait for the server to bind to the port.import socketimport errnofor bound_address in bound_addresses:for attempt in range(maxtries):sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)try:sock.connect(bound_address)except socket.error as e:if e.args[0... | 5 | 17 | 3 | 93 | 1 | 638 | 655 | 638 | bound_addresses,maxtries,sleeptime | ['sock'] | None | {"Assign": 1, "Expr": 3, "For": 2, "If": 1, "Try": 1} | 6 | 18 | 6 | ["range", "socket.socket", "sock.connect", "time.sleep", "SystemExit", "sock.close"] | 0 | [] | The function (_cleanup_ports) defined within the public class called public.The function start at line 638 and ends at 655. It contains 17 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [638.0] and does not return any value. It declares 6.0 functions, and It has 6.0 functi... |
pasteorg_pastescript | public | public | 0 | 0 | _turn_sigterm_into_systemexit.handle_term | def handle_term(signo, frame):raise SystemExit | 1 | 2 | 2 | 9 | 0 | 665 | 666 | 665 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_turn_sigterm_into_systemexit.handle_term) defined within the public class called public.The function start at line 665 and ends at 666. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [665.0] and does not return any value.. |
pasteorg_pastescript | public | public | 0 | 0 | _turn_sigterm_into_systemexit | def _turn_sigterm_into_systemexit():"""Attempts to turn a SIGTERM exception into a SystemExit exception."""try:import signalexcept ImportError:returndef handle_term(signo, frame):raise SystemExitsignal.signal(signal.SIGTERM, handle_term) | 2 | 7 | 0 | 25 | 0 | 657 | 667 | 657 | [] | None | {"Expr": 2, "Return": 1, "Try": 1} | 1 | 11 | 1 | ["signal.signal"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.serve_py.ServeCommand.restart_with_monitor"] | The function (_turn_sigterm_into_systemexit) defined within the public class called public.The function start at line 657 and ends at 667. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 fun... | |
pasteorg_pastescript | Template | public | 0 | 0 | __init__ | def __init__(self, name):self.name = nameself._read_vars = None | 1 | 3 | 2 | 17 | 0 | 39 | 41 | 39 | self,name | [] | None | {"Assign": 2} | 0 | 3 | 0 | [] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called Template.The function start at line 39 and ends at 41. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [39.0] and does not return any value. It has 8182.0 functions calling this function which are [... |
pasteorg_pastescript | Template | public | 0 | 0 | module_dir | def module_dir(self):"""Returns the module directory of this template."""mod = sys.modules[self.__class__.__module__]return os.path.dirname(mod.__file__) | 1 | 3 | 1 | 29 | 0 | 43 | 46 | 43 | self | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 1 | 4 | 1 | ["os.path.dirname"] | 0 | [] | The function (module_dir) defined within the public class called Template.The function start at line 43 and ends at 46. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 function call... |
pasteorg_pastescript | Template | public | 0 | 0 | template_dir | def template_dir(self):assert self._template_dir is not None, ("Template %r didn't set _template_dir" % self)if isinstance( self._template_dir, tuple):return self._template_direlse:return os.path.join(self.module_dir(), self._template_dir) | 2 | 7 | 1 | 51 | 0 | 48 | 54 | 48 | self | [] | Returns | {"If": 1, "Return": 2} | 3 | 7 | 3 | ["isinstance", "os.path.join", "self.module_dir"] | 0 | [] | The function (template_dir) defined within the public class called Template.The function start at line 48 and ends at 54. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions, and It has 3.0 functions... |
pasteorg_pastescript | Template | public | 0 | 0 | run | def run(self, command, output_dir, vars):self.pre(command, output_dir, vars)self.write_files(command, output_dir, vars)self.post(command, output_dir, vars) | 1 | 4 | 4 | 41 | 0 | 56 | 59 | 56 | self,command,output_dir,vars | [] | None | {"Expr": 3} | 3 | 4 | 3 | ["self.pre", "self.write_files", "self.post"] | 668 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508273_sc3_cookcountyjail.fabfile_py.add_directories", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508273_sc3_cookcountyjail.fabfile_py.add_project_to_path", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation... | The function (run) defined within the public class called Template.The function start at line 56 and ends at 59. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [56.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called inside ... |
pasteorg_pastescript | Template | public | 0 | 0 | check_vars | def check_vars(self, vars, cmd):expect_vars = self.read_vars(cmd)if not expect_vars:# Assume that variables aren't definedreturn varsconverted_vars = {}unused_vars = vars.copy()errors = []for var in expect_vars:if var.name not in unused_vars:if cmd.interactive:prompt = 'Enter %s' % var.full_description()response = cmd.... | 7 | 26 | 3 | 170 | 0 | 61 | 87 | 61 | self,vars,cmd | [] | Returns | {"Assign": 9, "Expr": 3, "For": 1, "If": 5, "Return": 2} | 11 | 27 | 11 | ["self.read_vars", "vars.copy", "var.full_description", "cmd.challenge", "errors.append", "var.full_description", "unused_vars.pop", "command.BadCommand", "join", "converted_vars.update", "vars.update"] | 0 | [] | The function (check_vars) defined within the public class called Template.The function start at line 61 and ends at 87. It contains 26 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [61.0], and this function return a value. It declares 11.0 functions, and It has 11.0 funct... |
pasteorg_pastescript | Template | public | 0 | 0 | read_vars | def read_vars(self, command=None):if self._read_vars is not None:return self._read_varsassert (not self.read_vars_from_templatesor self.use_cheetah), ("You can only read variables from templates if using Cheetah")if not self.read_vars_from_templates:self._read_vars = self.varsreturn self.varsvars = self.vars[:]var_name... | 8 | 20 | 2 | 129 | 0 | 89 | 109 | 89 | self,command | [] | Returns | {"Assign": 5, "Expr": 2, "For": 1, "If": 3, "Return": 3} | 5 | 21 | 5 | ["items", "find_args_in_dir", "self.template_dir", "read_vars.sort", "vars.append"] | 0 | [] | The function (read_vars) defined within the public class called Template.The function start at line 89 and ends at 109. It contains 20 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [89.0], and this function return a value. It declares 5.0 functions, and It has 5.0 functio... |
pasteorg_pastescript | Template | public | 0 | 0 | write_files | def write_files(self, command, output_dir, vars):template_dir = self.template_dir()if not os.path.exists(output_dir):print("Creating directory %s" % output_dir)if not command.simulate:# Don't let copydir create this top-level directory,# since copydir will svn add it sometimes:os.makedirs(output_dir)copydir.copy_dir(te... | 3 | 15 | 4 | 101 | 0 | 111 | 127 | 111 | self,command,output_dir,vars | [] | None | {"Assign": 1, "Expr": 3, "If": 2} | 5 | 17 | 5 | ["self.template_dir", "os.path.exists", "print", "os.makedirs", "copydir.copy_dir"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70255548_futaguard_lowtechfilter.AutoBuild.nrdlist_py.main"] | The function (write_files) defined within the public class called Template.The function start at line 111 and ends at 127. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [111.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions ca... |
pasteorg_pastescript | Template | public | 0 | 0 | print_vars | def print_vars(self, indent=0):vars = self.read_vars()var.print_vars(vars) | 1 | 3 | 2 | 22 | 0 | 129 | 131 | 129 | self,indent | [] | None | {"Assign": 1, "Expr": 1} | 2 | 3 | 2 | ["self.read_vars", "var.print_vars"] | 0 | [] | The function (print_vars) defined within the public class called Template.The function start at line 129 and ends at 131. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [129.0] and does not return any value. It declares 2.0 functions, and It has 2.0 functions... |
pasteorg_pastescript | Template | public | 0 | 0 | pre | def pre(self, command, output_dir, vars):"""Called before template is applied."""pass | 1 | 2 | 4 | 13 | 0 | 133 | 137 | 133 | self,command,output_dir,vars | [] | None | {"Expr": 1} | 0 | 5 | 0 | [] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3968769_returntocorp_semgrep_action.tests.acceptance.qa_py.run_repo", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69411822_minjunkimkr_154algoritm_5weeks.Eastar_DS.1_23_1_31.Graph_py.pre", "_.content.gdrive.MyDriv... | The function (pre) defined within the public class called Template.The function start at line 133 and ends at 137. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [133.0] and does not return any value. It has 4.0 functions calling this function which are ["_.co... |
pasteorg_pastescript | Template | public | 0 | 0 | post | def post(self, command, output_dir, vars):"""Called after template is applied."""pass | 1 | 2 | 4 | 13 | 0 | 139 | 143 | 139 | self,command,output_dir,vars | [] | None | {"Expr": 1} | 0 | 5 | 0 | [] | 34 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.views_py.TranslatableBaseCreateView.post", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.views_py.TranslatableBaseUpdateView.po... | The function (post) defined within the public class called Template.The function start at line 139 and ends at 143. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [139.0] and does not return any value. It has 34.0 functions calling this function which are ["_.... |
pasteorg_pastescript | Template | public | 0 | 0 | __init__ | def __init__(self, name, description, default='', should_echo=True):self.name = nameself.description = descriptionself.default = defaultself.should_echo = should_echo | 1 | 6 | 5 | 37 | 0 | 149 | 154 | 149 | self,name | [] | None | {"Assign": 2} | 0 | 3 | 0 | [] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called Template.The function start at line 149 and ends at 154. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [149.0] and does not return any value. It has 8182.0 functions calling this function which ar... |
pasteorg_pastescript | var | public | 0 | 1 | __repr__ | def __repr__(self):return '<%s %s default=%r should_echo=%s>' % (self.__class__.__name__,self.name, self.default, self.should_echo) | 1 | 4 | 1 | 27 | 0 | 156 | 159 | 156 | self | [] | Returns | {"Return": 1} | 0 | 4 | 0 | [] | 33 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3517602_chromaway_ngcccbase.ngcccbase.tests.test_address_py.TestAddress.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3517602_chromaway_ngcccbase.ngcccbase.tests.test_address_py.TestAddress.test_get_color_se... | The function (__repr__) defined within the public class called var, that inherit another class.The function start at line 156 and ends at 159. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 33.0 functions calling t... |
pasteorg_pastescript | var | public | 0 | 1 | full_description | def full_description(self):if self.description:return '%s (%s)' % (self.name, self.description)else:return self.name | 2 | 5 | 1 | 28 | 0 | 161 | 165 | 161 | self | [] | Returns | {"If": 1, "Return": 2} | 0 | 5 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.templates_py.Template.check_vars"] | The function (full_description) defined within the public class called var, that inherit another class.The function start at line 161 and ends at 165. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It has 1.0 function cal... |
pasteorg_pastescript | Template | public | 0 | 0 | print_vars | def print_vars(cls, vars, indent=0):max_name = max([len(v.name) for v in vars])for var in vars:if var.description:print('%s%s%s%s' % (' '*indent,var.name,' '*(max_name-len(var.name)),var.description))else:print('%s' % var.name)if var.default is not command.NoDefault:print('default: %r' % var.default)if var.should_echo ... | 6 | 16 | 3 | 115 | 0 | 167 | 182 | 167 | self,indent | [] | None | {"Assign": 1, "Expr": 1} | 2 | 3 | 2 | ["self.read_vars", "var.print_vars"] | 0 | [] | The function (print_vars) defined within the public class called Template.The function start at line 167 and ends at 182. It contains 16 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [167.0] and does not return any value. It declares 2.0 functions, and It has 2.0 function... |
pasteorg_pastescript | public | public | 0 | 0 | find_args_in_template | def find_args_in_template(template):if isinstance(template, str):# Treat as filename:import Cheetah.Templatetemplate = Cheetah.Template.Template(file=template)if not hasattr(template, 'body'):# Don't know...return Nonemethod = template.bodyargs, varargs, varkw, defaults = inspect.getargspec(method)defaults=list(default... | 7 | 22 | 1 | 134 | 6 | 207 | 231 | 207 | template | ['arg', 'defaults', 'default', 'method', 'vars', 'template'] | Returns | {"Assign": 8, "Expr": 1, "If": 4, "Return": 2, "While": 1} | 11 | 25 | 11 | ["isinstance", "Cheetah.Template.Template", "hasattr", "inspect.getargspec", "list", "len", "len", "defaults.pop", "args.pop", "vars.append", "var"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.templates_py.find_args_in_dir"] | The function (find_args_in_template) defined within the public class called public.The function start at line 207 and ends at 231. It contains 22 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters, and this function return a value. It declares 11.0 functions, It has 11.0 fu... |
pasteorg_pastescript | public | public | 0 | 0 | find_args_in_dir | def find_args_in_dir(dir, verbose=False):all_vars = {}for fn in os.listdir(dir):if fn.startswith('.') or fn == 'CVS' or fn == '_darcs':continuefull = os.path.join(dir, fn)if os.path.isdir(full):inner_vars = find_args_in_dir(full)elif full.endswith('_tmpl'):inner_vars = {}found = find_args_in_template(full)if found is N... | 20 | 41 | 2 | 280 | 5 | 233 | 277 | 233 | dir,verbose | ['found', 'inner_vars', 'all_vars', 'cur_var', 'full'] | Returns | {"Assign": 9, "Expr": 4, "For": 3, "If": 10, "Return": 1} | 14 | 45 | 14 | ["os.listdir", "fn.startswith", "os.path.join", "os.path.isdir", "find_args_in_dir", "full.endswith", "find_args_in_template", "print", "print", "join", "inner_vars.keys", "inner_vars.items", "print", "print"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.templates_py.Template.read_vars", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.templates_py.find_args_in_dir"] | The function (find_args_in_dir) defined within the public class called public.The function start at line 233 and ends at 277. It contains 41 lines of code and it has a cyclomatic complexity of 20. It takes 2 parameters, represented as [233.0], and this function return a value. It declares 14.0 functions, It has 14.0 fu... |
pasteorg_pastescript | public | public | 0 | 0 | make_literal | def make_literal(value):value = html.escape(value, 1)value = value.replace('\n\r', '\n')value = value.replace('\r', '\n')value = value.replace('\n', '<br>\n')return value | 1 | 6 | 1 | 47 | 1 | 39 | 44 | 39 | value | ['value'] | Returns | {"Assign": 4, "Return": 1} | 4 | 6 | 4 | ["html.escape", "value.replace", "value.replace", "value.replace"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.testapp_py.TestApplication.__call__"] | The function (make_literal) defined within the public class called public.The function start at line 39 and ends at 44. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 4.0 functions, It has 4.0 functions called... |
pasteorg_pastescript | TestApplication | public | 0 | 1 | __init__ | def __init__(self, global_conf=None, text=False):self.global_conf = global_confself.text = text | 1 | 3 | 3 | 23 | 0 | 54 | 56 | 54 | self,global_conf,text | [] | None | {"Assign": 2} | 0 | 3 | 0 | [] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called TestApplication, that inherit another class.The function start at line 54 and ends at 56. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [54.0] and does not return any value. It has 8182.0 function... |
pasteorg_pastescript | TestApplication | public | 0 | 1 | __call__ | def __call__(self, environ, start_response):if environ.get('QUERY_STRING', '').find('error=') >= 0:assert 0, "Here is your error report, ordered and delivered"if self.text:page_template = text_page_templaterow_template = text_row_templatecontent_type = 'text/plain; charset=utf8'else:page_template = html_page_templatero... | 6 | 32 | 3 | 189 | 0 | 58 | 89 | 58 | self,environ,start_response | [] | Returns | {"Assign": 20, "Expr": 2, "For": 1, "If": 3, "Return": 1, "Try": 1} | 11 | 32 | 11 | ["find", "environ.get", "sorted", "environ.keys", "repr", "make_literal", "rows.append", "join", "isinstance", "page.encode", "start_response"] | 59 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3468756_plone_plone_app_cmsui.src.plone.app.cmsui.historypanel_py.HistoryPanel.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content... | The function (__call__) defined within the public class called TestApplication, that inherit another class.The function start at line 58 and ends at 89. It contains 32 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [58.0], and this function return a value. It declares 11.0 ... |
pasteorg_pastescript | public | public | 0 | 0 | make_test_application | def make_test_application(global_conf, text=False, lint=False):from paste.deploy.converters import asbooltext = asbool(text)lint = asbool(lint)app = TestApplication(global_conf=global_conf, text=text)if lint:from paste.lint import middlewareapp = middleware(app)return app | 2 | 9 | 3 | 62 | 3 | 92 | 100 | 92 | global_conf,text,lint | ['text', 'app', 'lint'] | Returns | {"Assign": 4, "If": 1, "Return": 1} | 4 | 9 | 4 | ["asbool", "asbool", "TestApplication", "middleware"] | 0 | [] | The function (make_test_application) defined within the public class called public.The function start at line 92 and ends at 100. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [92.0], and this function return a value. It declares 4.0 functions, and It has 4.... |
pasteorg_pastescript | public | public | 0 | 0 | run_twisted | def run_twisted(wsgi_app, global_conf,host='127.0.0.1', port='8080'):host = host or Noneimport twisted.web2.wsgiimport twisted.web2.logimport twisted.web2.channelimport twisted.web2.serverimport twisted.internet.reactorwsgi_resource = twisted.web2.wsgi.WSGIResource(wsgi_app)resource = twisted.web2.log.LogWrapperResourc... | 2 | 15 | 4 | 139 | 5 | 5 | 20 | 5 | wsgi_app,global_conf,host,port | ['resource', 'wsgi_resource', 'site', 'host', 'factory'] | None | {"Assign": 5, "Expr": 3} | 9 | 16 | 9 | ["twisted.web2.wsgi.WSGIResource", "twisted.web2.log.LogWrapperResource", "start", "twisted.web2.log.DefaultCommonAccessLoggingObserver", "twisted.web2.server.Site", "twisted.web2.channel.HTTPFactory", "twisted.internet.reactor.listenTCP", "int", "twisted.internet.reactor.run"] | 0 | [] | The function (run_twisted) defined within the public class called public.The function start at line 5 and ends at 20. It contains 15 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [5.0] and does not return any value. It declares 9.0 functions, and It has 9.0 functions call... |
pasteorg_pastescript | public | public | 0 | 0 | run_server | def run_server(wsgi_app, global_conf, host='localhost', port=8080):import wsgiserverlogged_app = TransLogger(wsgi_app)port = int(port)# For some reason this is problematic on this server:ensure_port_cleanup([(host, port)], maxtries=2, sleeptime=0.5)server = wsgiserver.WSGIServer(logged_app, host=host, port=port)logged_... | 1 | 10 | 4 | 82 | 3 | 6 | 17 | 6 | wsgi_app,global_conf,host,port | ['logged_app', 'port', 'server'] | None | {"Assign": 3, "Expr": 3} | 6 | 12 | 6 | ["TransLogger", "int", "ensure_port_cleanup", "wsgiserver.WSGIServer", "logged_app.logger.info", "server.start"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77560186_ssrlive_shadowsocksr.shadowsocks.server_py.main"] | The function (run_server) defined within the public class called public.The function start at line 6 and ends at 17. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [6.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions called ins... |
pasteorg_pastescript | public | public | 0 | 0 | fileConfig | def fileConfig(fname, defaults=None):"""Read the logging configuration from a ConfigParser-format file.This can be called several times from an application, allowing an end userthe ability to select from various pre-canned configurations (if thedeveloper provides a mechanism to present the choices and load the chosenco... | 4 | 14 | 2 | 96 | 3 | 70 | 100 | 70 | fname,defaults | ['formatters', 'cp', 'handlers'] | None | {"Assign": 3, "Expr": 5, "If": 2, "With": 1} | 10 | 31 | 10 | ["configparser.RawConfigParser", "hasattr", "hasattr", "cp.readfp", "cp.read", "_create_formatters", "logging._handlers.clear", "hasattr", "_install_handlers", "_install_loggers"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.command_py.Command.logging_file_config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.util.logging_config_py.listen"] | The function (fileConfig) defined within the public class called public.The function start at line 70 and ends at 100. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [70.0] and does not return any value. It declares 10.0 functions, It has 10.0 functions calle... |
pasteorg_pastescript | public | public | 0 | 0 | _resolve | def _resolve(name):"""Resolve a dotted name to a global object."""name = name.split('.')used = name.pop(0)found = __import__(used)for n in name:used = used + '.' + ntry:found = getattr(found, n)except AttributeError:__import__(used)found = getattr(found, n)return found | 3 | 12 | 1 | 67 | 3 | 103 | 115 | 103 | name | ['found', 'used', 'name'] | Returns | {"Assign": 6, "Expr": 2, "For": 1, "Return": 1, "Try": 1} | 6 | 13 | 6 | ["name.split", "name.pop", "__import__", "getattr", "__import__", "getattr"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.util.logging_config_py._create_formatters", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.util.logging_config_py._install_handler... | The function (_resolve) defined within the public class called public.The function start at line 103 and ends at 115. It contains 12 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 6.0 functions, It has 6.0 functions called ... |
pasteorg_pastescript | public | public | 0 | 0 | _create_formatters | def _create_formatters(cp):"""Create and return formatters"""flist = cp.get("formatters", "keys")if not len(flist):return {}flist = flist.split(",")formatters = {}for form in flist:form = form.strip()sectname = "formatter_%s" % formopts = cp.options(sectname)if "format" in opts:fs = cp.get(sectname, "format")else:fs = ... | 7 | 26 | 1 | 148 | 10 | 118 | 144 | 118 | cp | ['opts', 'form', 'dfs', 'sectname', 'class_name', 'fs', 'c', 'formatters', 'f', 'flist'] | Returns | {"Assign": 15, "Expr": 1, "For": 1, "If": 5, "Return": 2} | 10 | 27 | 10 | ["cp.get", "len", "flist.split", "form.strip", "cp.options", "cp.get", "cp.get", "cp.get", "_resolve", "c"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.util.logging_config_py.fileConfig"] | The function (_create_formatters) defined within the public class called public.The function start at line 118 and ends at 144. It contains 26 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters, and this function return a value. It declares 10.0 functions, It has 10.0 funct... |
pasteorg_pastescript | public | public | 0 | 0 | _install_handlers | def _install_handlers(cp, formatters):"""Install and return handlers"""hlist = cp.get("handlers", "keys")if not len(hlist):return {}hlist = hlist.split(",")handlers = {}fixups = [] #for inter-handler referencesfor hand in hlist:hand = hand.strip()sectname = "handler_%s" % handklass = cp.get(sectname, "class")opts = cp.... | 11 | 39 | 2 | 261 | 12 | 147 | 188 | 147 | cp,formatters | ['opts', 'level', 'args', 'fmt', 'target', 'sectname', 'fixups', 'handlers', 'hlist', 'h', 'klass', 'hand'] | Returns | {"Assign": 19, "Expr": 5, "For": 2, "If": 7, "Return": 2, "Try": 1} | 22 | 42 | 22 | ["cp.get", "len", "hlist.split", "hand.strip", "cp.get", "cp.options", "cp.get", "eval", "vars", "_resolve", "cp.get", "eval", "vars", "klass", "cp.get", "h.setLevel", "len", "h.setFormatter", "cp.get", "len", "fixups.append", "h.setTarget"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.util.logging_config_py.fileConfig"] | The function (_install_handlers) defined within the public class called public.The function start at line 147 and ends at 188. It contains 39 lines of code and it has a cyclomatic complexity of 11. It takes 2 parameters, represented as [147.0], and this function return a value. It declares 22.0 functions, It has 22.0 f... |
pasteorg_pastescript | public | public | 0 | 0 | _install_loggers | def _install_loggers(cp, handlers):"""Create and install loggers"""# configure the root firstllist = cp.get("loggers", "keys")llist = llist.split(",")llist = [x.strip() for x in llist]llist.remove("root")sectname = "logger_root"root = logging.rootlog = rootopts = cp.options(sectname)if "level" in opts:level = cp.get(se... | 14 | 45 | 2 | 336 | 11 | 191 | 253 | 191 | cp,handlers | ['llist', 'opts', 'level', 'sectname', 'logger', 'existing', 'log', 'hlist', 'qn', 'propagate', 'root'] | None | {"Assign": 23, "Expr": 9, "For": 6, "If": 6} | 28 | 63 | 28 | ["cp.get", "llist.split", "x.strip", "llist.remove", "cp.options", "cp.get", "log.setLevel", "root.removeHandler", "cp.get", "len", "hlist.split", "log.addHandler", "hand.strip", "list", "root.manager.loggerDict.keys", "cp.get", "cp.options", "cp.getint", "logging.getLogger", "existing.remove", "cp.get", "logger.setLev... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.util.logging_config_py.fileConfig"] | The function (_install_loggers) defined within the public class called public.The function start at line 191 and ends at 253. It contains 45 lines of code and it has a cyclomatic complexity of 14. It takes 2 parameters, represented as [191.0] and does not return any value. It declares 28.0 functions, It has 28.0 functi... |
pasteorg_pastescript | public | public | 0 | 0 | listen.handle | def handle(self):"""Handle a request.Each request is expected to be a 4-byte length, packed usingstruct.pack(">L", n), followed by the config file.Uses fileConfig() to do the grunt work."""import tempfiletry:conn = self.connectionchunk = conn.recv(4)if len(chunk) == 4:slen = struct.unpack(">L", chunk)[0]chunk = self.co... | 8 | 28 | 1 | 165 | 0 | 276 | 315 | 276 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (listen.handle) defined within the public class called public.The function start at line 276 and ends at 315. It contains 28 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value.. |
pasteorg_pastescript | public | public | 0 | 0 | listen.__init__ | def __init__(self, host='localhost', port=DEFAULT_LOGGING_CONFIG_PORT, handler=None):ThreadingTCPServer.__init__(self, (host, port), handler)with logging._lock:self.abort = 0self.timeout = 1 | 1 | 6 | 4 | 46 | 0 | 324 | 329 | 324 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (listen.__init__) defined within the public class called public.The function start at line 324 and ends at 329. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [324.0] and does not return any value.. |
pasteorg_pastescript | public | public | 0 | 0 | listen.serve_until_stopped | def serve_until_stopped(self):import selectabort = 0while not abort:rd, wr, ex = select.select([self.socket.fileno()], [], [], self.timeout)if rd:self.handle_request()with logging._lock:abort = self.abort | 3 | 11 | 1 | 62 | 0 | 331 | 341 | 331 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (listen.serve_until_stopped) defined within the public class called public.The function start at line 331 and ends at 341. It contains 11 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
pasteorg_pastescript | public | public | 0 | 0 | listen.serve | def serve(rcvr, hdlr, port):server = rcvr(port=port, handler=hdlr)global _listenerwith logging._lock:_listener = serverserver.serve_until_stopped() | 1 | 6 | 3 | 36 | 0 | 343 | 348 | 343 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (listen.serve) defined within the public class called public.The function start at line 343 and ends at 348. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [343.0] and does not return any value.. |
pasteorg_pastescript | public | public | 0 | 0 | listen | def listen(port=DEFAULT_LOGGING_CONFIG_PORT):"""Start up a socket server on the specified port, and listen for newconfigurations.These will be sent as a file suitable for processing by fileConfig().Returns a Thread object on which you can call start() to start the server,and which you can join() when appropriate. To st... | 2 | 13 | 1 | 61 | 10 | 256 | 352 | 256 | port | ['chunk', 'allow_reuse_address', 'file', '_listener', 'server', 'errcode', 'f', 'slen', 'abort', 'conn'] | Returns | {"Assign": 16, "Expr": 12, "If": 5, "Return": 1, "Try": 2, "While": 2, "With": 3} | 23 | 97 | 23 | ["NotImplementedError", "conn.recv", "len", "struct.unpack", "self.connection.recv", "len", "conn.recv", "len", "tempfile.mktemp", "open", "f.write", "f.close", "fileConfig", "traceback.print_exc", "os.remove", "type", "ThreadingTCPServer.__init__", "select.select", "self.socket.fileno", "self.handle_request", "rcvr", ... | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3637460_apache_qpid_python.qpid.management_py.managementChannel.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3637460_apache_qpid_python.qpid.tests.connection_py.ConnectionTest.setUp", "_.content.gdrive.M... | The function (listen) defined within the public class called public.The function start at line 256 and ends at 352. It contains 13 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 23.0 functions, It has 23.0 functions called ... |
pasteorg_pastescript | public | public | 0 | 0 | stopListening | def stopListening():"""Stop the listening server which was created with a call to listen()."""global _listenerif _listener:with logging._lock:_listener.abort = 1_listener = None | 2 | 6 | 0 | 23 | 1 | 354 | 362 | 354 | ['_listener'] | None | {"Assign": 2, "Expr": 1, "If": 1, "With": 1} | 0 | 9 | 0 | [] | 0 | [] | The function (stopListening) defined within the public class called public.The function start at line 354 and ends at 362. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. | |
pasteorg_pastescript | public | public | 0 | 0 | random_bytes | def random_bytes(length):"""Return a string of the given length.Uses ``os.urandom`` if itcan, or just pseudo-random numbers otherwise."""try:return os.urandom(length)except AttributeError:return b''.join([bytes((random.randrange(256),)) for i in range(length)]) | 3 | 6 | 1 | 46 | 0 | 11 | 20 | 11 | length | [] | Returns | {"Expr": 1, "Return": 2, "Try": 1} | 5 | 10 | 5 | ["os.urandom", "join", "bytes", "random.randrange", "range"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.util.secret_py.secret_string"] | The function (random_bytes) defined within the public class called public.The function start at line 11 and ends at 20. It contains 6 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 5.0 functions, It has 5.0 functions called... |
pasteorg_pastescript | public | public | 0 | 0 | secret_string | def secret_string(length=25):"""Returns a random string of the given length.The stringis a base64-encoded version of a set of random bytes, truncatedto the given length (and without any newlines)."""s = random_bytes(length)s = base64.b64encode(s)s = s.decode('ascii')for badchar in '\n\r=':s = s.replace(badchar, '')# We... | 2 | 7 | 1 | 51 | 1 | 22 | 35 | 22 | length | ['s'] | Returns | {"Assign": 4, "Expr": 1, "For": 1, "Return": 1} | 4 | 14 | 4 | ["random_bytes", "base64.b64encode", "s.decode", "s.replace"] | 0 | [] | The function (secret_string) defined within the public class called public.The function start at line 22 and ends at 35. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 4.0 functions, and It has 4.0 functions ... |
pasteorg_pastescript | public | public | 0 | 0 | capture_stdout | def capture_stdout():stdout = sys.stdouttry:sys.stdout = io.StringIO()yield sys.stdoutfinally:sys.stdout = stdout | 2 | 7 | 0 | 31 | 1 | 17 | 23 | 17 | ['stdout'] | None | {"Assign": 3, "Expr": 1, "Try": 1} | 1 | 7 | 1 | ["io.StringIO"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.tests.test_command_py.CommandTest.test_help", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.tests.test_command_py.CreateDistroCommandTest.test_basic_packag... | The function (capture_stdout) defined within the public class called public.The function start at line 17 and ends at 23. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called insi... | |
pasteorg_pastescript | public | public | 0 | 0 | temporary_dir | def temporary_dir():old_dir = os.getcwd()try:if hasattr(tempfile, 'TemporaryDirectory'):# Python 3with tempfile.TemporaryDirectory() as tmpdir:os.chdir(tmpdir)yieldelse:# Python 2tmpdir = tempfile.mkdtemp()try:os.chdir(tmpdir)yieldfinally:shutil.rmtree(tmpdir)finally:os.chdir(old_dir) | 4 | 16 | 0 | 71 | 2 | 27 | 44 | 27 | ['old_dir', 'tmpdir'] | None | {"Assign": 2, "Expr": 6, "If": 1, "Try": 2, "With": 1} | 8 | 18 | 8 | ["os.getcwd", "hasattr", "tempfile.TemporaryDirectory", "os.chdir", "tempfile.mkdtemp", "os.chdir", "shutil.rmtree", "os.chdir"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.tests.test_command_py.CreateDistroCommandTest.test_basic_package"] | The function (temporary_dir) defined within the public class called public.The function start at line 27 and ends at 44. It contains 16 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 functions called i... | |
pasteorg_pastescript | CommandTest | public | 0 | 1 | test_help | def test_help(self):usage = textwrap.dedent('''Usage: <test_command> [paster_options] COMMAND [command_options]Options:--version show program's version number and exit--plugin=PLUGINSAdd a plugin to the list of commands (plugins are Eggspecs; will also require() the Egg)-h, --helpShow this help messageCommands:create C... | 3 | 33 | 1 | 82 | 0 | 50 | 83 | 50 | self | [] | None | {"Assign": 4, "Expr": 3, "Try": 2, "With": 1} | 6 | 34 | 6 | ["strip", "textwrap.dedent", "capture_stdout", "command.run", "self.assertEqual", "self.fail"] | 0 | [] | The function (test_help) defined within the public class called CommandTest, that inherit another class.The function start at line 50 and ends at 83. It contains 33 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 6.0 functions, ... |
pasteorg_pastescript | CreateDistroCommandTest | public | 0 | 1 | setUp | def setUp(self):self.cmd = create_distro.CreateDistroCommand('create_distro') | 1 | 2 | 1 | 15 | 0 | 89 | 90 | 89 | self | [] | None | {"Assign": 1} | 1 | 2 | 1 | ["create_distro.CreateDistroCommand"] | 452 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_backend_py.TestCouchDBBackend.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_backend_py.TestMemoryBackend.setUp"... | The function (setUp) defined within the public class called CreateDistroCommandTest, that inherit another class.The function start at line 89 and ends at 90. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 funct... |
pasteorg_pastescript | CreateDistroCommandTest | public | 0 | 1 | test_list_templates | def test_list_templates(self):templates = textwrap.dedent('''Available templates:basic_package:A basic setuptools-enabled packagepaste_deploy: A web application deployed through paste.deploy''').strip() + "\n"with capture_stdout() as stdout:self.cmd.run(['--list-templates'])self.assertEqual(templates, stdout.getvalue()... | 1 | 9 | 1 | 48 | 0 | 92 | 100 | 92 | self | [] | None | {"Assign": 1, "Expr": 2, "With": 1} | 6 | 9 | 6 | ["strip", "textwrap.dedent", "capture_stdout", "self.cmd.run", "self.assertEqual", "stdout.getvalue"] | 0 | [] | The function (test_list_templates) defined within the public class called CreateDistroCommandTest, that inherit another class.The function start at line 92 and ends at 100. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It de... |
pasteorg_pastescript | CreateDistroCommandTest | public | 0 | 1 | test_basic_package | def test_basic_package(self):inputs = ['1.0',# Version'description', # Description'long description', # Long description'keyword1 keyword2', # Keywords'author name', # Author name'author@domain.com', # Author email'http://example.com', # URL of homepage'license', # License'True', # zip_safe]name = 'test'setup_cfg = tex... | 2 | 33 | 1 | 185 | 0 | 102 | 169 | 102 | self | [] | None | {"Assign": 7, "Expr": 5, "Try": 1, "With": 5} | 20 | 68 | 20 | ["strip", "textwrap.dedent", "strip", "textwrap.dedent", "temporary_dir", "io.StringIO", "join", "capture_stdout", "self.cmd.run", "os.chdir", "open", "self.assertEqual", "f.read", "open", "self.assertEqual", "f.read", "open", "os.path.join", "self.assertEqual", "f.read"] | 0 | [] | The function (test_basic_package) defined within the public class called CreateDistroCommandTest, that inherit another class.The function start at line 102 and ends at 169. It contains 33 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.