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_paste | MoreCowbell | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):path_info = environ.get('PATH_INFO', '')script_name = environ.get('SCRIPT_NAME', '')for filename in ['bell-ascending.png', 'bell-descending.png']:if path_info == '/.cowbell/'+ filename:app = FileApp(os.path.join(os.path.dirname(__file__), filename))return app(environ, start_r... | 4 | 19 | 3 | 153 | 0 | 12 | 38 | 12 | self,environ,start_response | [] | Returns | {"Assign": 10, "Expr": 4, "For": 1, "If": 3, "Return": 5} | 19 | 27 | 19 | ["environ.get", "environ.get", "FileApp", "os.path.join", "os.path.dirname", "app", "header_value", "ct.startswith", "type.append", "remove_header", "start_response", "start_response", "self.app", "body.extend", "join", "insert_head", "self.javascript.replace", "insert_body", "self.resources.replace"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called MoreCowbell.The function start at line 12 and ends at 38. It contains 19 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [12.0], and this function return a value. It declares 19.0 functions, It has 19.0 functions... |
pasteorg_paste | public | public | 0 | 0 | insert_head | def insert_head(body, text):end_head = re.search(r'</head>', body, re.I)if end_head:return body[:end_head.start()] + text + body[end_head.end():]else:return text + body | 2 | 6 | 2 | 53 | 1 | 83 | 88 | 83 | body,text | ['end_head'] | Returns | {"Assign": 1, "If": 1, "Return": 2} | 3 | 6 | 3 | ["re.search", "end_head.start", "end_head.end"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.cowbell.__init___py.MoreCowbell.__call__"] | The function (insert_head) defined within the public class called public.The function start at line 83 and ends at 88. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [83.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions call... |
pasteorg_paste | public | public | 0 | 0 | insert_body | def insert_body(body, text):end_body = re.search(r'</body>', body, re.I)if end_body:return body[:end_body.start()] + text + body[end_body.end():]else:return body + text | 2 | 6 | 2 | 53 | 1 | 90 | 95 | 90 | body,text | ['end_body'] | Returns | {"Assign": 1, "If": 1, "Return": 2} | 3 | 6 | 3 | ["re.search", "end_body.start", "end_body.end"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.cowbell.__init___py.MoreCowbell.__call__"] | The function (insert_body) defined within the public class called public.The function start at line 90 and ends at 95. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [90.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions call... |
pasteorg_paste | public | public | 0 | 0 | make_cowbell | def make_cowbell(global_conf, app):return MoreCowbell(app) | 1 | 2 | 2 | 12 | 0 | 97 | 98 | 97 | global_conf,app | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["MoreCowbell"] | 0 | [] | The function (make_cowbell) defined within the public class called public.The function start at line 97 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [97.0], and this function return a value. It declare 1.0 function, and It has 1.0 function c... |
pasteorg_paste | SimpleApplication | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):body = b"<html><body>simple</body></html>"start_response("200 OK", [('Content-Type', 'text/html'),('Content-Length', str(len(body)))])return [body] | 1 | 5 | 3 | 41 | 0 | 19 | 23 | 19 | self,environ,start_response | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 3 | 5 | 3 | ["start_response", "str", "len"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called SimpleApplication.The function start at line 19 and ends at 23. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [19.0], and this function return a value. It declares 3.0 functions, It has 3.0 functi... |
pasteorg_paste | SlowConsumer | public | 0 | 0 | __init__ | def __init__(self, chunk_size = 4096, delay = 1, progress = True):self.chunk_size = chunk_sizeself.delay = delayself.progress = True | 1 | 4 | 4 | 32 | 0 | 32 | 35 | 32 | self,chunk_size,delay,progress | [] | None | {"Assign": 3} | 0 | 4 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called SlowConsumer.The function start at line 32 and ends at 35. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [32.0] and does not return any value. It has 6814.0 functions calling this function which a... |
pasteorg_paste | SimpleApplication | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):size = 0total= environ.get('CONTENT_LENGTH')if total:remaining = int(total)while remaining > 0:if self.progress:print("%s of %s remaining" % (remaining, total))if remaining > 4096:chunk = environ['wsgi.input'].read(4096)else:chunk = environ['wsgi.input'].read(remaining)if not... | 7 | 29 | 3 | 161 | 0 | 37 | 65 | 37 | self,environ,start_response | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 3 | 5 | 3 | ["start_response", "str", "len"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called SimpleApplication.The function start at line 37 and ends at 65. It contains 29 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [37.0], and this function return a value. It declares 3.0 functions, It has 3.0 funct... |
pasteorg_paste | public | public | 0 | 0 | make_test_app | def make_test_app(global_conf):return SimpleApplication() | 1 | 2 | 1 | 9 | 0 | 67 | 68 | 67 | global_conf | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["SimpleApplication"] | 0 | [] | The function (make_test_app) defined within the public class called public.The function start at line 67 and ends at 68. 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, and It has 1.0 function cal... |
pasteorg_paste | public | public | 0 | 0 | make_slow_app | def make_slow_app(global_conf, chunk_size=4096, delay=1, progress=True):from paste.deploy.converters import asboolreturn SlowConsumer(chunk_size=int(chunk_size),delay=int(delay),progress=asbool(progress)) | 1 | 6 | 4 | 49 | 0 | 72 | 77 | 72 | global_conf,chunk_size,delay,progress | [] | Returns | {"Return": 1} | 4 | 6 | 4 | ["SlowConsumer", "int", "int", "asbool"] | 0 | [] | The function (make_slow_app) defined within the public class called public.The function start at line 72 and ends at 77. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [72.0], and this function return a value. It declares 4.0 functions, and It has 4.0 functio... |
pasteorg_paste | public | public | 0 | 0 | run | def run(command):data = run_raw(command)if data:print(data) | 2 | 4 | 1 | 18 | 1 | 27 | 30 | 27 | command | ['data'] | None | {"Assign": 1, "Expr": 1, "If": 1} | 2 | 4 | 2 | ["run_raw", "print"] | 506 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3514474_ntfreedom_neverendshadowsocks.shadowsocks.manager_py.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535523_dbcli_vcli.tests.test_vexecute_py.test_bools_are_treated_as_strings", "_.content.gdrive.MyDriv... | The function (run) defined within the public class called public.The function start at line 27 and ends at 30. It contains 4 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 declares 2.0 functions, It has 2.0 functions called inside which... |
pasteorg_paste | public | public | 0 | 0 | run_raw | def run_raw(command):"""Runs the string command, returns any output."""proc = subprocess.Popen(command, shell=True,stderr=subprocess.STDOUT,stdout=subprocess.PIPE, env=_make_env())data = proc.stdout.read()proc.wait()while data.endswith('\n') or data.endswith('\r'):data = data[:-1]if data:data = '\n'.join([l for l in da... | 6 | 14 | 1 | 102 | 2 | 32 | 48 | 32 | command | ['proc', 'data'] | Returns | {"Assign": 4, "Expr": 2, "If": 1, "Return": 2, "While": 1} | 8 | 17 | 8 | ["subprocess.Popen", "_make_env", "proc.stdout.read", "proc.wait", "data.endswith", "data.endswith", "join", "data.splitlines"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.doctest_webapp_py.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.doctest_webapp_py.run_command"] | The function (run_raw) defined within the public class called public.The function start at line 32 and ends at 48. It contains 14 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters, and this function return a value. It declares 8.0 functions, It has 8.0 functions called ins... |
pasteorg_paste | public | public | 0 | 0 | run_command | def run_command(command, name, and_print=False):output = run_raw(command)data = '$ %s\n%s' % (command, output)show_file('shell-command', name, description='shell transcript',data=data)if and_print and output:print(output) | 3 | 7 | 3 | 49 | 2 | 50 | 56 | 50 | command,name,and_print | ['output', 'data'] | None | {"Assign": 2, "Expr": 2, "If": 1} | 3 | 7 | 3 | ["run_raw", "show_file", "print"] | 24 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.examples.resources.scripts.s3_profiler_py.recurse_directory", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3627162_cinpla_exdir.versioneer_py.do_vcs_install", "_.content.gdrive.MyDrive.Phd... | The function (run_command) defined within the public class called public.The function start at line 50 and ends at 56. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [50.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called i... |
pasteorg_paste | public | public | 0 | 0 | _make_env | def _make_env():env = os.environ.copy()env['PATH'] = (env.get('PATH', '') + ':' + os.path.join(paste_parent, 'scripts') + ':' + os.path.join(paste_parent, 'paste', '3rd-party','sqlobject-files', 'scripts'))env['PYTHONPATH'] = (env.get('PYTHONPATH', '') + ':' + paste_parent)return env | 1 | 12 | 0 | 81 | 1 | 58 | 69 | 58 | ['env'] | Returns | {"Assign": 3, "Return": 1} | 5 | 12 | 5 | ["os.environ.copy", "env.get", "os.path.join", "os.path.join", "env.get"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.doctest_webapp_py.run_raw", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.doctest_webapp_py.show"] | The function (_make_env) defined within the public class called public.The function start at line 58 and ends at 69. It contains 12 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 5.0 functions, It has 5.0 functions called i... | |
pasteorg_paste | public | public | 0 | 0 | clear_dir | def clear_dir(dir):"""Clears (deletes) the given directory"""shutil.rmtree(dir, True) | 1 | 2 | 1 | 14 | 0 | 71 | 75 | 71 | dir | [] | None | {"Expr": 2} | 1 | 5 | 1 | ["shutil.rmtree"] | 0 | [] | The function (clear_dir) defined within the public class called public.The function start at line 71 and ends at 75. 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 function, and It has 1.0 function called insi... |
pasteorg_paste | public | public | 0 | 0 | ls | def ls(dir=None, recurse=False, indent=0):"""Show a directory listing"""dir = dir or os.getcwd()fns = os.listdir(dir)fns.sort()for fn in fns:full = os.path.join(dir, fn)if os.path.isdir(full):fn = fn + '/'print(' '*indent + fn)if os.path.isdir(full) and recurse:ls(dir=full, recurse=True, indent=indent+2) | 6 | 11 | 3 | 106 | 4 | 77 | 90 | 77 | dir,recurse,indent | ['fns', 'dir', 'fn', 'full'] | None | {"Assign": 4, "Expr": 4, "For": 1, "If": 2} | 8 | 14 | 8 | ["os.getcwd", "os.listdir", "fns.sort", "os.path.join", "os.path.isdir", "print", "os.path.isdir", "ls"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.doctest_webapp_py.ls"] | The function (ls) defined within the public class called public.The function start at line 77 and ends at 90. It contains 11 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [77.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions called inside wh... |
pasteorg_paste | public | public | 0 | 0 | set_default_app | def set_default_app(app, url):global default_appglobal default_urldefault_app = appdefault_url = url | 1 | 5 | 2 | 17 | 2 | 95 | 99 | 95 | app,url | ['default_app', 'default_url'] | None | {"Assign": 2} | 0 | 5 | 0 | [] | 0 | [] | The function (set_default_app) defined within the public class called public.The function start at line 95 and ends at 99. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [95.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | resource_filename | def resource_filename(fn):"""Returns the filename of the resource -- generally in the directoryresources/DocumentName/fn"""return os.path.join(os.path.dirname(sys.testing_document_filename),'resources',os.path.splitext(os.path.basename(sys.testing_document_filename))[0],fn) | 1 | 6 | 1 | 49 | 0 | 101 | 110 | 101 | fn | [] | Returns | {"Expr": 1, "Return": 1} | 4 | 10 | 4 | ["os.path.join", "os.path.dirname", "os.path.splitext", "os.path.basename"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687462_toscawidgets_tw2_core.tw2.core.i18n_py.get_localedir", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3715078_transifex_transifex_client.txclib.web_py.system_certs_file", "_.content.gdrive.MyDrive.Phd_Thesis.... | The function (resource_filename) defined within the public class called public.The function start at line 101 and ends at 110. 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... |
pasteorg_paste | public | public | 0 | 0 | show | def show(path_info, example_name):fn = resource_filename(example_name + '.html')out = StringIO()assert default_app is not None, ("No default_app set")url = default_url + path_infoout.write('<span class="doctest-url"><a href="%s">%s</a></span><br>\n'% (url, url))out.write('<div class="doctest-example">\n')proc = subproc... | 13 | 53 | 2 | 352 | 11 | 112 | 164 | 112 | path_info,example_name | ['fn', 'out', 'proc', 'content', 'stdout', 'expected', 'headers', 'url', 'f', 'result', 'lines'] | None | {"Assign": 13, "Expr": 16, "For": 2, "If": 6} | 39 | 53 | 39 | ["resource_filename", "StringIO", "out.write", "out.write", "subprocess.Popen", "_make_env", "proc.communicate", "StringIO", "rfc822.Message", "stdout.read", "headers.items", "header.lower", "int", "value.split", "header.lower", "header.lower", "value.startswith", "out.write", "content.splitlines", "l.strip", "out.writ... | 14 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3578708_ulno_ulnoiot_upy.examples.lightboard.lightboard_test_py.show", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3578708_ulno_ulnoiot_upy.examples.lightboard.main_py.animation_next", "_.content.gdrive.MyDrive.Ph... | The function (show) defined within the public class called public.The function start at line 112 and ends at 164. It contains 53 lines of code and it has a cyclomatic complexity of 13. It takes 2 parameters, represented as [112.0] and does not return any value. It declares 39.0 functions, It has 39.0 functions called i... |
pasteorg_paste | public | public | 0 | 0 | html_matches | def html_matches(pattern, text):regex = re.escape(pattern)regex = regex.replace(r'\.\.\.', '.*')regex = re.sub(r'0x[0-9a-f]+', '.*', regex)regex = '^%s$' % regexreturn re.search(regex, text) | 1 | 6 | 2 | 53 | 1 | 166 | 171 | 166 | pattern,text | ['regex'] | Returns | {"Assign": 4, "Return": 1} | 4 | 6 | 4 | ["re.escape", "regex.replace", "re.sub", "re.search"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.doctest_webapp_py.show"] | The function (html_matches) defined within the public class called public.The function start at line 166 and ends at 171. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [166.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions ... |
pasteorg_paste | public | public | 0 | 0 | convert_docstring_string | def convert_docstring_string(data):if data.startswith('\n'):data = data[1:]lines = data.splitlines()new_lines = []for line in lines:if line.rstrip() == '.':new_lines.append('')else:new_lines.append(line)data = '\n'.join(new_lines) + '\n'return data | 4 | 12 | 1 | 71 | 3 | 173 | 184 | 173 | data | ['lines', 'data', 'new_lines'] | Returns | {"Assign": 4, "Expr": 2, "For": 1, "If": 2, "Return": 1} | 6 | 12 | 6 | ["data.startswith", "data.splitlines", "line.rstrip", "new_lines.append", "new_lines.append", "join"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.doctest_webapp_py.append_to_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.doctest_webapp_py.create_file"] | The function (convert_docstring_string) defined within the public class called public.The function start at line 173 and ends at 184. It contains 12 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 6.0 functions, It has 6.0 f... |
pasteorg_paste | public | public | 0 | 0 | create_file | def create_file(path, version, data):data = convert_docstring_string(data)write_data(path, data)show_file(path, version) | 1 | 4 | 3 | 27 | 1 | 186 | 189 | 186 | path,version,data | ['data'] | None | {"Assign": 1, "Expr": 2} | 3 | 4 | 3 | ["convert_docstring_string", "write_data", "show_file"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69906343_ome_omero_py.src.omero.util.script_utils_py.createFile", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.73263884_aequilibrae_qaequilibrae.test.test_create_pro_file_py.test_file_creation"] | The function (create_file) defined within the public class called public.The function start at line 186 and ends at 189. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [186.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions calle... |
pasteorg_paste | public | public | 0 | 0 | append_to_file | def append_to_file(path, version, data):data = convert_docstring_string(data)f = open(path, 'a')f.write(data)f.close()# I think these appends can happen so quickly (in less than a second)# that the .pyc file doesn't appear to be expired, even though it# is after we've made this change; so we have to get rid of the .pyc... | 3 | 11 | 3 | 79 | 3 | 191 | 205 | 191 | path,version,data | ['pyc_file', 'f', 'data'] | None | {"Assign": 3, "Expr": 4, "If": 2} | 8 | 15 | 8 | ["convert_docstring_string", "open", "f.write", "f.close", "path.endswith", "os.path.exists", "os.unlink", "show_file"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94718779_runtimeverification_kontrol.src.tests.integration.test_kontrol_py.foundry_end_to_end"] | The function (append_to_file) defined within the public class called public.The function start at line 191 and ends at 205. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [191.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions c... |
pasteorg_paste | public | public | 0 | 0 | show_file | def show_file(path, version, description=None, data=None):ext = os.path.splitext(path)[1]if data is None:f = open(path, 'rb')data = f.read()f.close()if ext == '.py':html = ('<div class="source-code">%s</div>'% PySourceColor.str2html(data, PySourceColor.dark))else:html = '<pre class="source-code">%s</pre>' % html.escape... | 4 | 15 | 4 | 112 | 4 | 207 | 221 | 207 | path,version,description,data | ['ext', 'f', 'data', 'html'] | None | {"Assign": 6, "Expr": 2, "If": 2} | 8 | 15 | 8 | ["os.path.splitext", "open", "f.read", "f.close", "PySourceColor.str2html", "html.escape", "write_data", "resource_filename"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.doctest_webapp_py.append_to_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.doctest_webapp_py.create_file", "_.content.gdrive.MyDrive.Phd_... | The function (show_file) defined within the public class called public.The function start at line 207 and ends at 221. It contains 15 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [207.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions called... |
pasteorg_paste | public | public | 0 | 0 | call_source_highlight | def call_source_highlight(input, format):proc = subprocess.Popen(['source-highlight', '--out-format=html', '--no-doc', '--css=none', '--src-lang=%s' % format], shell=False,stdout=subprocess.PIPE)stdout, stderr = proc.communicate(input)result = stdoutproc.wait()return result | 1 | 9 | 2 | 57 | 2 | 223 | 231 | 223 | input,format | ['result', 'proc'] | Returns | {"Assign": 3, "Expr": 1, "Return": 1} | 3 | 9 | 3 | ["subprocess.Popen", "proc.communicate", "proc.wait"] | 0 | [] | The function (call_source_highlight) defined within the public class called public.The function start at line 223 and ends at 231. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [223.0], and this function return a value. It declares 3.0 functions, and It has ... |
pasteorg_paste | public | public | 0 | 0 | write_data | def write_data(path, data):dir = os.path.dirname(os.path.abspath(path))if not os.path.exists(dir):os.makedirs(dir)f = open(path, 'wb')f.write(data)f.close() | 2 | 7 | 2 | 60 | 2 | 234 | 240 | 234 | path,data | ['dir', 'f'] | None | {"Assign": 2, "Expr": 3, "If": 1} | 7 | 7 | 7 | ["os.path.dirname", "os.path.abspath", "os.path.exists", "os.makedirs", "open", "f.write", "f.close"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3704605_paloaltonetworks_ansible_pan.docs.hacking.module_formatter_py.process_module", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70618802_lumicks_pylake.lumicks.pylake.conftest_py.reference_data", "_.content.gdr... | The function (write_data) defined within the public class called public.The function start at line 234 and ends at 240. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [234.0] and does not return any value. It declares 7.0 functions, It has 7.0 functions called... |
pasteorg_paste | public | public | 0 | 0 | change_file | def change_file(path, changes):f = open(os.path.abspath(path), 'rb')lines = f.readlines()f.close()for change_type, line, text in changes:if change_type == 'insert':lines[line:line] = [text]elif change_type == 'delete':lines[line:text] = []else:assert 0, ("Unknown change_type: %r" % change_type)f = open(path, 'wb')f.wri... | 4 | 15 | 2 | 106 | 2 | 243 | 257 | 243 | path,changes | ['lines', 'f'] | None | {"Assign": 5, "Expr": 3, "For": 1, "If": 2} | 8 | 15 | 8 | ["open", "os.path.abspath", "f.readlines", "f.close", "open", "f.write", "join", "f.close"] | 0 | [] | The function (change_file) defined within the public class called public.The function start at line 243 and ends at 257. It contains 15 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [243.0] and does not return any value. It declares 8.0 functions, and It has 8.0 functions... |
pasteorg_paste | LongFormDocTestParser | public | 0 | 1 | _parse_example | def _parse_example(self, m, name, lineno):r"""Given a regular expression match from `_EXAMPLE_RE` (`m`),return a pair `(source, want)`, where `source` is the matchedexample's source code (with prompts and indentation stripped);and `want` is the example's expected output (with indentationstripped).`name` is the string's... | 11 | 31 | 4 | 287 | 0 | 307 | 370 | 307 | self,m,name,lineno | [] | Returns | {"Assign": 14, "Expr": 5, "If": 5, "Return": 1} | 20 | 64 | 20 | ["m.group", "len", "m.group", "split", "m.group", "self._check_prefix", "self._check_prompt_blank", "self._check_prefix", "join", "join", "m.group", "want.split", "len", "re.match", "self._check_prefix", "len", "join", "self._EXCEPTION_RE.match", "m.group", "self._find_options"] | 0 | [] | The function (_parse_example) defined within the public class called LongFormDocTestParser, that inherit another class.The function start at line 307 and ends at 370. It contains 31 lines of code and it has a cyclomatic complexity of 11. It takes 4 parameters, represented as [307.0], and this function return a value. I... |
pasteorg_paste | LongFormDocTestParser | public | 0 | 1 | parse | def parse(self, string, name='<string>'):"""Divide the given string into examples and intervening text,and return them as a list of alternating Examples and strings.Line numbers for the Examples are 0-based.The optionalargument `name` is a name identifying this string, and is onlyused for error messages."""string = str... | 6 | 22 | 3 | 222 | 0 | 373 | 412 | 373 | self,string,name | [] | Returns | {"Assign": 7, "AugAssign": 2, "Expr": 4, "For": 1, "If": 2, "Return": 1} | 21 | 40 | 21 | ["string.expandtabs", "self._min_indent", "join", "string.split", "self._EXAMPLE_RE.finditer", "output.append", "m.start", "string.count", "m.start", "self._parse_example", "self._IS_BLANK_OR_COMMENT", "output.append", "doctest.Example", "len", "m.group", "m.group", "string.count", "m.start", "m.end", "m.end", "output.... | 177 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3554290_abakan_zz_ablog.ablog.post_py.process_postlist", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.pipeline.schedule_py.Schedule.__init__", "_.content.gdrive.MyDrive.Phd_Thesis... | The function (parse) defined within the public class called LongFormDocTestParser, that inherit another class.The function start at line 373 and ends at 412. It contains 22 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [373.0], and this function return a value. It declares... |
pasteorg_paste | Diff | public | 0 | 0 | __init__ | def __init__(self, before, after):self.before = beforeself.after = afterself._calculate() | 1 | 4 | 3 | 24 | 0 | 34 | 37 | 34 | self,before,after | [] | None | {"Assign": 2, "Expr": 1} | 1 | 4 | 1 | ["self._calculate"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Diff.The function start at line 34 and ends at 37. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [34.0] and does not return any value. It declare 1.0 function, It has 1.0 function called inside wh... |
pasteorg_paste | Diff | public | 0 | 0 | _calculate | def _calculate(self):before = self.before.dataafter = self.after.dataself.deleted = {}self.updated = {}self.created = after.copy()for path, f in before.items():if path not in after:self.deleted[path] = fcontinuedel self.created[path]if f.mtime < after[path].mtime:self.updated[path] = after[path] | 4 | 13 | 1 | 96 | 0 | 39 | 51 | 39 | self | [] | None | {"Assign": 7, "For": 1, "If": 2} | 2 | 13 | 2 | ["after.copy", "before.items"] | 0 | [] | The function (_calculate) defined within the public class called Diff.The function start at line 39 and ends at 51. It contains 13 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 2.0 functions, and It has 2.0 functions called i... |
pasteorg_paste | Diff | public | 0 | 0 | __str__ | def __str__(self):return self.report() | 1 | 2 | 1 | 11 | 0 | 53 | 54 | 53 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self.report"] | 64 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.models.ipam_py.Vlans.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.tm.session_py.DynectSession.__str__", "_.content.gdrive.MyDrive.... | The function (__str__) defined within the public class called Diff.The function start at line 53 and ends at 54. 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 inside wh... |
pasteorg_paste | Diff | public | 0 | 0 | report | def report(self, header=True, dates=False):s = []if header:s.append('Difference in %s from %s to %s:' % (self.before.base_path,self.before.calculated,self.after.calculated))for name, files, show_size in [('created', self.created, True),('deleted', self.deleted, True),('updated', self.updated, True)]:if files:s.append('... | 11 | 33 | 3 | 252 | 0 | 56 | 88 | 56 | self,header,dates | [] | Returns | {"Assign": 6, "AugAssign": 2, "Expr": 7, "For": 2, "If": 7, "Return": 1} | 15 | 33 | 15 | ["s.append", "s.append", "files.items", "files.sort", "_space_prefix", "self.before.get", "parts.append", "self.after.get", "parts.append", "join", "map", "s.append", "len", "s.append", "join"] | 21 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3706078_confluentinc_ducktape.tests.runner.check_runner_py.CheckRunner.check_runner_report_junit", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.55413314_dbbs_lab_bsb.packages.bsb_arbor.bsb_arbor.adapter_py.ArborAda... | The function (report) defined within the public class called Diff.The function start at line 56 and ends at 88. It contains 33 lines of code and it has a cyclomatic complexity of 11. It takes 3 parameters, represented as [56.0], and this function return a value. It declares 15.0 functions, It has 15.0 functions called ... |
pasteorg_paste | Diff | public | 0 | 0 | __init__ | def __init__(self, base_path, files=None, ignore_wildcards=(), ignore_paths=(), ignore_hidden=True): | 1 | 2 | 4 | 25 | 0 | 97 | 98 | 97 | self,before,after | [] | None | {"Assign": 2, "Expr": 1} | 1 | 4 | 1 | ["self._calculate"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Diff.The function start at line 97 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [97.0] and does not return any value. It declare 1.0 function, It has 1.0 function called inside wh... |
pasteorg_paste | Snapshot | public | 0 | 1 | find_files | def find_files(self):"""Find all the files under the base path, and put them in``self.data``"""self._find_traverse('', self.data)self.calculated = datetime.now() | 1 | 3 | 1 | 25 | 0 | 112 | 118 | 112 | self | [] | None | {"Assign": 1, "Expr": 2} | 2 | 7 | 2 | ["self._find_traverse", "datetime.now"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3912752_dbr_tvnamer.tvnamer.main_py.tvnamer"] | The function (find_files) defined within the public class called Snapshot, that inherit another class.The function start at line 112 and ends at 118. It contains 3 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, I... |
pasteorg_paste | Snapshot | public | 0 | 1 | _ignore_file | def _ignore_file(self, fn):if fn in self.ignore_paths:return Trueif self.ignore_hidden and os.path.basename(fn).startswith('.'):return Truefor pat in self.ignore_wildcards:if fnmatch(fn, pat):return Truereturn False | 6 | 9 | 2 | 56 | 0 | 120 | 128 | 120 | self,fn | [] | Returns | {"For": 1, "If": 3, "Return": 4} | 3 | 9 | 3 | ["startswith", "os.path.basename", "fnmatch"] | 0 | [] | The function (_ignore_file) defined within the public class called Snapshot, that inherit another class.The function start at line 120 and ends at 128. It contains 9 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [120.0], and this function return a value. It declares 3.0 fu... |
pasteorg_paste | Snapshot | public | 0 | 1 | _find_traverse | def _find_traverse(self, path, result):full = os.path.join(self.base_path, path)if os.path.isdir(full):if path:# Don't actually include the base pathresult[path] = Dir(self.base_path, path)for fn in os.listdir(full):fn = os.path.join(path, fn)if self._ignore_file(fn):continueself._find_traverse(fn, result)else:result[p... | 5 | 12 | 3 | 103 | 0 | 130 | 142 | 130 | self,path,result | [] | None | {"Assign": 4, "Expr": 1, "For": 1, "If": 3} | 8 | 13 | 8 | ["os.path.join", "os.path.isdir", "Dir", "os.listdir", "os.path.join", "self._ignore_file", "self._find_traverse", "File"] | 0 | [] | The function (_find_traverse) defined within the public class called Snapshot, that inherit another class.The function start at line 130 and ends at 142. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [130.0] and does not return any value. It declares 8.0 fun... |
pasteorg_paste | Snapshot | public | 0 | 1 | __repr__ | def __repr__(self):return '<%s in %r from %r>' % (self.__class__.__name__, self.base_path,self.calculated or '(no calculation done)') | 2 | 4 | 1 | 25 | 0 | 144 | 147 | 144 | self | [] | Returns | {"Return": 1} | 0 | 4 | 0 | [] | 29 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.tests.v1_2.test_app_py.AppTestCase.test_ref", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696868_turbogears_ming.ming.schema_py.Array.__repr__", "_.content.gdrive.MyDrive.Phd... | The function (__repr__) defined within the public class called Snapshot, that inherit another class.The function start at line 144 and ends at 147. It contains 4 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 29.0 functions call... |
pasteorg_paste | Snapshot | public | 0 | 1 | compare_expected | def compare_expected(self, expected, comparison=operator.eq, differ=None, not_found=None, include_success=False):"""Compares a dictionary of ``path: content`` to thefound files.Comparison is done by equality, or the``comparison(actual_content, expected_content)`` function given.Returns dictionary of differences, keyed ... | 9 | 33 | 6 | 190 | 0 | 149 | 193 | 149 | self,expected,comparison,differ,not_found,include_success | [] | Returns | {"Assign": 15, "Expr": 1, "For": 1, "If": 7, "Return": 1} | 12 | 45 | 12 | ["path.strip", "not_found", "comparison", "differ", "len", "len", "len", "len", "len", "len", "len", "len"] | 0 | [] | The function (compare_expected) defined within the public class called Snapshot, that inherit another class.The function start at line 149 and ends at 193. It contains 33 lines of code and it has a cyclomatic complexity of 9. It takes 6 parameters, represented as [149.0], and this function return a value. It declares 1... |
pasteorg_paste | Snapshot | public | 0 | 1 | diff_to_now | def diff_to_now(self):return Diff(self, self.clone()) | 1 | 2 | 1 | 16 | 0 | 195 | 196 | 195 | self | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["Diff", "self.clone"] | 0 | [] | The function (diff_to_now) defined within the public class called Snapshot, that inherit another class.The function start at line 195 and ends at 196. 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 functio... |
pasteorg_paste | Snapshot | public | 0 | 1 | clone | def clone(self):return self.__class__(base_path=self.base_path,ignore_wildcards=self.ignore_wildcards,ignore_paths=self.ignore_paths,ignore_hidden=self.ignore_hidden) | 1 | 5 | 1 | 34 | 0 | 198 | 202 | 198 | self | [] | Returns | {"Return": 1} | 1 | 5 | 1 | ["self.__class__"] | 33 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689643_etingof_pysnmp.examples.v3arch.asyncore.agent.cmdrsp.implementing_scalar_mib_objects_py.MyStaticMibScalarInstance.getValue", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689643_etingof_pysnmp.examples.v3ar... | The function (clone) defined within the public class called Snapshot, that inherit another class.The function start at line 198 and ends at 202. It contains 5 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 h... |
pasteorg_paste | Diff | public | 0 | 0 | __init__ | def __init__(self, base_path, path):self.base_path = base_pathself.path = pathself.full = os.path.join(base_path, path)self.stat = os.stat(self.full)self.mtime = self.stat.st_mtimeself.size = self.stat.st_sizeself._bytes = None | 1 | 8 | 3 | 68 | 0 | 231 | 238 | 231 | self,before,after | [] | None | {"Assign": 2, "Expr": 1} | 1 | 4 | 1 | ["self._calculate"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Diff.The function start at line 231 and ends at 238. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [231.0] and does not return any value. It declare 1.0 function, It has 1.0 function called inside... |
pasteorg_paste | File | public | 0 | 0 | bytes__get | def bytes__get(self):if self._bytes is None:f = open(self.full, 'rb')self._bytes = f.read()f.close()return self._bytes | 2 | 6 | 1 | 40 | 0 | 240 | 245 | 240 | self | [] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 3 | 6 | 3 | ["open", "f.read", "f.close"] | 0 | [] | The function (bytes__get) defined within the public class called File.The function start at line 240 and ends at 245. 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 3.0 functions, and It has 3.0 functions cal... |
pasteorg_paste | File | public | 0 | 0 | __contains__ | def __contains__(self, s):return s in self.bytes | 1 | 2 | 2 | 13 | 0 | 248 | 249 | 248 | self,s | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3627162_cinpla_exdir.exdir.core.exdir_file_py.File.__contains__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3692721_yelp_bravado_core.bravado_core.util_py.AliasKeyDict.__contains__", "_.content.gdrive.MyDrive.Ph... | The function (__contains__) defined within the public class called File.The function start at line 248 and ends at 249. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [248.0], and this function return a value. It has 10.0 functions calling this function which ... |
pasteorg_paste | File | public | 0 | 0 | mustcontain | def mustcontain(self, s):__tracebackhide__ = Truebytes = self.bytesif s not in bytes:print('Could not find %r in:' % s)print(bytes)assert s in bytes | 2 | 7 | 2 | 35 | 0 | 251 | 257 | 251 | self,s | [] | None | {"Assign": 2, "Expr": 2, "If": 1} | 2 | 7 | 2 | ["print", "print"] | 0 | [] | The function (mustcontain) defined within the public class called File.The function start at line 251 and ends at 257. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [251.0] and does not return any value. It declares 2.0 functions, and It has 2.0 functions ca... |
pasteorg_paste | Snapshot | public | 0 | 1 | __repr__ | def __repr__(self):return '<%s %s:%s>' % (self.__class__.__name__,self.base_path, self.path) | 1 | 4 | 1 | 23 | 0 | 259 | 262 | 259 | self | [] | Returns | {"Return": 1} | 0 | 4 | 0 | [] | 29 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.tests.v1_2.test_app_py.AppTestCase.test_ref", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696868_turbogears_ming.ming.schema_py.Array.__repr__", "_.content.gdrive.MyDrive.Phd... | The function (__repr__) defined within the public class called Snapshot, that inherit another class.The function start at line 259 and ends at 262. 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 29.0 functions call... |
pasteorg_paste | Diff | public | 0 | 0 | __init__ | def __init__(self, base_path, path):self.base_path = base_pathself.path = pathself.full = os.path.join(base_path, path)self.size = 'N/A'self.mtime = 'N/A' | 1 | 6 | 3 | 43 | 0 | 273 | 278 | 273 | self,before,after | [] | None | {"Assign": 2, "Expr": 1} | 1 | 4 | 1 | ["self._calculate"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Diff.The function start at line 273 and ends at 278. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [273.0] and does not return any value. It declare 1.0 function, It has 1.0 function called inside... |
pasteorg_paste | Snapshot | public | 0 | 1 | __repr__ | def __repr__(self):return '<%s %s:%s>' % (self.__class__.__name__,self.base_path, self.path) | 1 | 4 | 1 | 23 | 0 | 280 | 283 | 259 | self | [] | Returns | {"Return": 1} | 0 | 4 | 0 | [] | 29 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.tests.v1_2.test_app_py.AppTestCase.test_ref", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696868_turbogears_ming.ming.schema_py.Array.__repr__", "_.content.gdrive.MyDrive.Phd... | The function (__repr__) defined within the public class called Snapshot, that inherit another class.The function start at line 280 and ends at 283. 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 29.0 functions call... |
pasteorg_paste | File | public | 0 | 0 | bytes__get | def bytes__get(self):raise NotImplementedError("Directory %r doesn't have content" % self) | 1 | 3 | 1 | 12 | 0 | 285 | 287 | 285 | self | [] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 3 | 6 | 3 | ["open", "f.read", "f.close"] | 0 | [] | The function (bytes__get) defined within the public class called File.The function start at line 285 and ends at 287. 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 declares 3.0 functions, and It has 3.0 functions cal... |
pasteorg_paste | public | public | 0 | 0 | _space_prefix | def _space_prefix(pref, full, sep=None, indent=None, include_sep=True):"""Anything shared by pref and full will be replaced with spacesin full, and full returned.Example::>>> _space_prefix('/foo/bar', '/foo')'/bar'"""if sep is None:sep = os.path.seppref = pref.split(sep)full = full.split(sep)padding = []while pref and ... | 8 | 20 | 5 | 162 | 4 | 292 | 320 | 292 | pref,full,sep,indent,include_sep | ['padding', 'full', 'sep', 'pref'] | Returns | {"Assign": 4, "Expr": 5, "If": 4, "Return": 3, "While": 1} | 13 | 29 | 13 | ["pref.split", "full.split", "padding.append", "len", "len", "padding.append", "full.pop", "pref.pop", "join", "sep.join", "join", "sep.join", "sep.join"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.fsdiff_py.Diff.report", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.fsdiff_py.report_expected_diffs", "_.content.gdrive.MyDrive.Phd_Thesis.Da... | The function (_space_prefix) defined within the public class called public.The function start at line 292 and ends at 320. It contains 20 lines of code and it has a cyclomatic complexity of 8. It takes 5 parameters, represented as [292.0], and this function return a value. It declares 13.0 functions, It has 13.0 functi... |
pasteorg_paste | public | public | 0 | 0 | report_expected_diffs | def report_expected_diffs(diffs, colorize=False):"""Takes the output of compare_expected, and returns a stringdescription of the differences."""if not diffs:return 'No differences'diffs = diffs.items()diffs.sort()s = []last = ''for path, desc in diffs:t = _space_prefix(last, path, indent=4, include_sep=False)if coloriz... | 9 | 32 | 2 | 221 | 7 | 322 | 357 | 322 | diffs,colorize | ['line', 'last', 't', 'desc', 's', 'diffs', 'cur_indent'] | Returns | {"Assign": 11, "AugAssign": 4, "Expr": 4, "For": 2, "If": 6, "Return": 2} | 22 | 36 | 22 | ["diffs.items", "diffs.sort", "_space_prefix", "color_line", "len", "desc.splitlines", "len", "group", "re.search", "indent", "desc.splitlines", "startswith", "line.strip", "color_line", "startswith", "line.strip", "color_line", "color_line", "s.append", "s.append", "len", "join"] | 0 | [] | The function (report_expected_diffs) defined within the public class called public.The function start at line 322 and ends at 357. It contains 32 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [322.0], and this function return a value. It declares 22.0 functions, and It ha... |
pasteorg_paste | public | public | 0 | 0 | color_code | def color_code(foreground=None, background=None):"""0black1red2green3yellow4blue5magenta (purple)6cyan7white (gray)Add 8 to get high-intensity"""if foreground is None and background is None:# Resetreturn '\x1b[0m'codes = []if foreground is None:codes.append('[39m')elif foreground > 7:codes.append('[1m')codes.append('[%... | 6 | 16 | 2 | 109 | 1 | 359 | 387 | 359 | foreground,background | ['codes'] | Returns | {"Assign": 1, "Expr": 7, "If": 4, "Return": 2} | 7 | 29 | 7 | ["codes.append", "codes.append", "codes.append", "codes.append", "codes.append", "codes.append", "join"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.fsdiff_py.color_line"] | The function (color_code) defined within the public class called public.The function start at line 359 and ends at 387. It contains 16 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [359.0], and this function return a value. It declares 7.0 functions, It has 7.0 functions c... |
pasteorg_paste | public | public | 0 | 0 | color_line | def color_line(line, foreground=None, background=None):match = re.search(r'^(\s*)', line)return (match.group(1) + color_code(foreground, background)+ line[match.end():] + color_code()) | 1 | 4 | 3 | 54 | 1 | 389 | 392 | 389 | line,foreground,background | ['match'] | Returns | {"Assign": 1, "Return": 1} | 5 | 4 | 5 | ["re.search", "match.group", "color_code", "match.end", "color_code"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.fsdiff_py.report_expected_diffs"] | The function (color_line) defined within the public class called public.The function start at line 389 and ends at 392. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [389.0], and this function return a value. It declares 5.0 functions, It has 5.0 functions ca... |
pasteorg_paste | public | public | 0 | 0 | indent | def indent(indent, text):return '\n'.join([' '*indent + l for l in text.splitlines()]) | 2 | 3 | 2 | 28 | 0 | 394 | 396 | 394 | indent,text | [] | Returns | {"Return": 1} | 2 | 3 | 2 | ["join", "text.splitlines"] | 75 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696527_singnet_snet_cli.snet.cli.commands.commands_py.Command._pprint", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696868_turbogears_ming.ming.odm.identity_map_py.IdentityMap.__repr__", "_.content.gdrive.MyDriv... | The function (indent) defined within the public class called public.The function start at line 394 and ends at 396. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [394.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions called... |
pasteorg_paste | public | public | 0 | 0 | show_diff | def show_diff(actual_content, expected_content):actual_lines = [l.strip() for l in actual_content.splitlines()if l.strip()]expected_lines = [l.strip() for l in expected_content.splitlines()if l.strip()]if len(actual_lines) == len(expected_lines) == 1:return '%r not %r' % (actual_lines[0], expected_lines[0])if not actua... | 7 | 11 | 2 | 104 | 2 | 398 | 408 | 398 | actual_content,expected_content | ['actual_lines', 'expected_lines'] | Returns | {"Assign": 2, "If": 2, "Return": 3} | 10 | 11 | 10 | ["l.strip", "actual_content.splitlines", "l.strip", "l.strip", "expected_content.splitlines", "l.strip", "len", "len", "join", "difflib.ndiff"] | 0 | [] | The function (show_diff) defined within the public class called public.The function start at line 398 and ends at 408. It contains 11 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [398.0], and this function return a value. It declares 10.0 functions, and It has 10.0 funct... |
pasteorg_paste | TeeFile | public | 0 | 0 | __init__ | def __init__(self, files):self.files = files | 1 | 2 | 2 | 12 | 0 | 34 | 35 | 34 | self,files | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called TeeFile.The function start at line 34 and ends at 35. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [34.0] and does not return any value. It has 6814.0 functions calling this function which are ["... |
pasteorg_paste | TeeFile | public | 0 | 0 | write | def write(self, v):for file in self.files:file.write(v) | 2 | 3 | 2 | 20 | 0 | 37 | 39 | 37 | self,v | [] | None | {"Expr": 1, "For": 1} | 1 | 3 | 1 | ["file.write"] | 501 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3495544_aio_libs_multidict.tests.gen_pickles_py.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3510604_dieseldev_diesel.examples.crawler_py.write_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creatio... | The function (write) defined within the public class called TeeFile.The function start at line 37 and ends at 39. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [37.0] and does not return any value. It declare 1.0 function, It has 1.0 function called inside wh... |
pasteorg_paste | TeeFile | public | 0 | 0 | __init__ | def __init__(self, app, global_conf=None, force_content_type=False, print_wsgi_errors=True, replace_stdout=False):# @@: global_conf should be handled separately and only for# the entry pointself.app = appself.force_content_type = force_content_typeif isinstance(print_wsgi_errors, str):from paste.deploy.converters impor... | 2 | 10 | 6 | 70 | 0 | 65 | 76 | 65 | self,files | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called TeeFile.The function start at line 65 and ends at 76. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [65.0] and does not return any value. It has 6814.0 functions calling this function which are [... |
pasteorg_paste | public | public | 0 | 0 | __call__.remove_printdebug | def remove_printdebug():removed.append(None) | 1 | 2 | 0 | 10 | 0 | 91 | 92 | 91 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.remove_printdebug) defined within the public class called public.The function start at line 91 and ends at 92. 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.. |
pasteorg_paste | PrintDebugMiddleware | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):global _threadedprint_installedif environ.get('paste.testing'):# In a testing environment this interception isn't# useful:return self.app(environ, start_response)if (not _threadedprint_installedor self._threaded_print_stdout is not sys.stdout):# @@: Not strictly threadsafe_th... | 13 | 43 | 3 | 268 | 0 | 78 | 126 | 78 | self,environ,start_response | [] | Returns | {"Assign": 14, "Expr": 10, "If": 7, "Return": 3, "Try": 1} | 20 | 49 | 20 | ["environ.get", "self.app", "threadedprint.install", "removed.append", "StringIO", "listeners.append", "TeeFile", "threadedprint.register", "wsgilib.intercept_output", "start_response", "response.header_value", "content_type.startswith", "write", "logged.getvalue", "start_response", "response.remove_header", "self.add_... | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called PrintDebugMiddleware.The function start at line 78 and ends at 126. It contains 43 lines of code and it has a cyclomatic complexity of 13. It takes 3 parameters, represented as [78.0], and this function return a value. It declares 20.0 functions, It has 20.... |
pasteorg_paste | PrintDebugMiddleware | public | 0 | 0 | add_log | def add_log(self, html, log):if not log:return htmltext = html.escape(log)text = text.replace('\n', '<br>')text = text.replace('', ' ')match = self._explicit_re.search(html)if not match:text = self.log_template % textmatch = self._body_re.search(html)if not match:return text + htmlelse:return html[:match.end()] +... | 4 | 14 | 3 | 106 | 0 | 132 | 145 | 132 | self,html,log | [] | Returns | {"Assign": 6, "If": 3, "Return": 3} | 7 | 14 | 7 | ["html.escape", "text.replace", "text.replace", "self._explicit_re.search", "self._body_re.search", "match.end", "match.end"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94567798_marimo_team_marimo.examples.ai.chat.simplemind_example_py._"] | The function (add_log) defined within the public class called PrintDebugMiddleware.The function start at line 132 and ends at 145. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [132.0], and this function return a value. It declares 7.0 functions, It has 7.0 ... |
pasteorg_paste | ProfileMiddleware | public | 0 | 0 | __init__ | def __init__(self, app, global_conf=None, log_filename='profile.log.tmp', limit=40):self.app = appself.lock = threading.Lock()self.log_filename = log_filenameself.limit = limit | 1 | 7 | 5 | 43 | 0 | 38 | 44 | 38 | self,app,global_conf,log_filename,limit | [] | None | {"Assign": 4} | 1 | 7 | 1 | ["threading.Lock"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called ProfileMiddleware.The function start at line 38 and ends at 44. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [38.0] and does not return any value. It declare 1.0 function, It has 1.0 function cal... |
pasteorg_paste | public | public | 0 | 0 | __call__.replace_start_response | def replace_start_response(status, headers, exc_info=None):catch_response.extend([status, headers])start_response(status, headers, exc_info)return body.append | 1 | 4 | 3 | 33 | 0 | 49 | 52 | 49 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.replace_start_response) defined within the public class called public.The function start at line 49 and ends at 52. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [49.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | __call__.run_app | def run_app():app_iter = self.app(environ, replace_start_response)try:body.extend(app_iter)finally:if hasattr(app_iter, 'close'):app_iter.close() | 3 | 7 | 0 | 37 | 0 | 53 | 59 | 53 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.run_app) defined within the public class called public.The function start at line 53 and ends at 59. It contains 7 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_paste | ProfileMiddleware | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):catch_response = []body = []def replace_start_response(status, headers, exc_info=None):catch_response.extend([status, headers])start_response(status, headers, exc_info)return body.appenddef run_app():app_iter = self.app(environ, replace_start_response)try:body.extend(app_iter... | 5 | 29 | 3 | 196 | 0 | 46 | 84 | 46 | self,environ,start_response | [] | Returns | {"Assign": 10, "AugAssign": 1, "Expr": 11, "If": 2, "Return": 3, "Try": 3} | 23 | 39 | 23 | ["catch_response.extend", "start_response", "self.app", "body.extend", "hasattr", "app_iter.close", "self.lock.acquire", "hotshot.Profile", "prof.addinfo", "environ.get", "prof.runcall", "prof.close", "join", "response.header_value", "content_type.startswith", "hotshot.stats.load", "stats.strip_dirs", "stats.sort_stats... | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called ProfileMiddleware.The function start at line 46 and ends at 84. It contains 29 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [46.0], and this function return a value. It declares 23.0 functions, It has 23.0 fun... |
pasteorg_paste | public | public | 0 | 0 | capture_output | def capture_output(func, *args, **kw):# Not threadsafe! (that's okay when ProfileMiddleware uses it,# though, since it synchronizes itself.)out = StringIO()old_stdout = sys.stdoutsys.stdout = outtry:func(*args, **kw)finally:sys.stdout = old_stdoutreturn out.getvalue() | 2 | 9 | 3 | 49 | 2 | 86 | 96 | 86 | func,*args,**kw | ['out', 'old_stdout'] | Returns | {"Assign": 4, "Expr": 1, "Return": 1, "Try": 1} | 3 | 11 | 3 | ["StringIO", "func", "out.getvalue"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94567798_marimo_team_marimo.marimo._lint.context_py.LintContext.get_graph", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94567798_marimo_team_marimo.marimo._lint.linter_py.Linter._generate_file_contents_from_notebo... | The function (capture_output) defined within the public class called public.The function start at line 86 and ends at 96. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [86.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions c... |
pasteorg_paste | public | public | 0 | 0 | profile_decorator.decorator | def decorator(func):return func | 1 | 2 | 1 | 7 | 0 | 133 | 134 | 133 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (profile_decorator.decorator) defined within the public class called public.The function start at line 133 and ends at 134. 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.. |
pasteorg_paste | public | public | 0 | 0 | profile_decorator.profile_decorator.decorator.replacement | def replacement(*args, **kw):return DecoratedProfile(func, **options)(*args, **kw) | 1 | 2 | 2 | 24 | 0 | 137 | 138 | 137 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (profile_decorator.profile_decorator.decorator.replacement) defined within the public class called public.The function start at line 137 and ends at 138. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [137.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | profile_decorator.decorator | def decorator(func):def replacement(*args, **kw):return DecoratedProfile(func, **options)(*args, **kw)return replacement | 1 | 3 | 1 | 9 | 0 | 136 | 139 | 136 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (profile_decorator.decorator) defined within the public class called public.The function start at line 136 and ends at 139. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | profile_decorator | def profile_decorator(**options):"""Profile a single function call.Used around a function, like::@profile_decorator(options...)def ...All calls to the function will be profiled.The options areall keywords, and are:log_file:The filename to log to (or ``'stdout'`` or ``'stderr'``).Default: stderr.display_limit:Only show ... | 2 | 6 | 1 | 23 | 0 | 98 | 140 | 98 | **options | [] | Returns | {"Expr": 1, "If": 1, "Return": 5} | 2 | 43 | 2 | ["options.get", "DecoratedProfile"] | 0 | [] | The function (profile_decorator) defined within the public class called public.The function start at line 98 and ends at 140. 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 2.0 funct... |
pasteorg_paste | ProfileMiddleware | public | 0 | 0 | __init__ | def __init__(self, func, **options):self.func = funcself.options = options | 1 | 3 | 3 | 20 | 0 | 146 | 148 | 146 | self,app,global_conf,log_filename,limit | [] | None | {"Assign": 4} | 1 | 7 | 1 | ["threading.Lock"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called ProfileMiddleware.The function start at line 146 and ends at 148. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [146.0] and does not return any value. It declare 1.0 function, It has 1.0 function ... |
pasteorg_paste | ProfileMiddleware | public | 0 | 0 | __call__ | def __call__(self, *args, **kw):self.lock.acquire()try:return self.profile(self.func, *args, **kw)finally:self.lock.release() | 2 | 6 | 3 | 44 | 0 | 150 | 155 | 150 | self,environ,start_response | [] | Returns | {"Assign": 10, "AugAssign": 1, "Expr": 11, "If": 2, "Return": 3, "Try": 3} | 23 | 39 | 23 | ["catch_response.extend", "start_response", "self.app", "body.extend", "hasattr", "app_iter.close", "self.lock.acquire", "hotshot.Profile", "prof.addinfo", "environ.get", "prof.runcall", "prof.close", "join", "response.header_value", "content_type.startswith", "hotshot.stats.load", "stats.strip_dirs", "stats.sort_stats... | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called ProfileMiddleware.The function start at line 150 and ends at 155. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [150.0], and this function return a value. It declares 23.0 functions, It has 23.0 f... |
pasteorg_paste | DecoratedProfile | public | 0 | 0 | profile | def profile(self, func, *args, **kw):ops = self.optionsprof_filename = ops.get('log_filename', 'profile_data.log.tmp')prof = hotshot.Profile(prof_filename)prof.addinfo('Function Call', self.format_function(func, *args, **kw))if ops.get('add_info'):prof.addinfo('Extra info', ops['add_info'])exc_info = Nonetry:start_time... | 9 | 47 | 4 | 345 | 0 | 157 | 204 | 157 | self,func,*args,**kw | [] | Returns | {"Assign": 16, "Expr": 13, "If": 6, "Return": 1, "Try": 2} | 31 | 48 | 31 | ["ops.get", "hotshot.Profile", "prof.addinfo", "self.format_function", "ops.get", "prof.addinfo", "time.time", "prof.runcall", "sys.exc_info", "time.time", "prof.close", "hotshot.stats.load", "os.unlink", "ops.get", "stats.strip_dirs", "stats.sort_stats", "ops.get", "ops.get", "capture_output", "capture_output", "ops.g... | 15 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.diffoscope.comparators.haskell_py.HiFile.recognizes", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.diffoscope.comparators.ppu_py.PpuFile.recognizes", "_.conte... | The function (profile) defined within the public class called DecoratedProfile.The function start at line 157 and ends at 204. It contains 47 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [157.0], and this function return a value. It declares 31.0 functions, It has 31.0 fu... |
pasteorg_paste | DecoratedProfile | public | 0 | 0 | format_function | def format_function(self, func, *args, **kw):args = map(repr, args)args.extend(['%s=%r' % (k, v) for k, v in kw.items()])return '%s(%s)' % (func.__name__, ', '.join(args)) | 2 | 5 | 4 | 60 | 0 | 206 | 210 | 206 | self,func,*args,**kw | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 4 | 5 | 4 | ["map", "args.extend", "kw.items", "join"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957748_hotdoc_hotdoc.hotdoc.core.formatter_py.Formatter._format_symbol"] | The function (format_function) defined within the public class called DecoratedProfile.The function start at line 206 and ends at 210. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [206.0], and this function return a value. It declares 4.0 functions, It has 4... |
pasteorg_paste | public | public | 0 | 0 | make_profile_middleware | def make_profile_middleware(app, global_conf,log_filename='profile.log.tmp',limit=40):"""Wrap the application in a component that will profile eachrequest.The profiling data is then appended to the outputof each page.Note that this serializes all requests (i.e., removingconcurrency).Therefore never use this in producti... | 1 | 7 | 4 | 35 | 1 | 213 | 227 | 213 | app,global_conf,log_filename,limit | ['limit'] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 15 | 2 | ["int", "ProfileMiddleware"] | 0 | [] | The function (make_profile_middleware) defined within the public class called public.The function start at line 213 and ends at 227. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [213.0], and this function return a value. It declares 2.0 functions, and It ha... |
pasteorg_paste | WSGIRegressionServer | public | 0 | 1 | __init__ | def __init__ (self, *args, **kwargs):WSGIServer.__init__(self, *args, **kwargs)self.stopping = []self.pending = []self.timeout = self.defaulttimeout# this is a local connection, be quickself.socket.settimeout(2) | 1 | 6 | 3 | 50 | 0 | 25 | 31 | 25 | self,*args,**kwargs | [] | None | {"Assign": 3, "Expr": 2} | 2 | 7 | 2 | ["WSGIServer.__init__", "self.socket.settimeout"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called WSGIRegressionServer, that inherit another class.The function start at line 25 and ends at 31. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [25.0] and does not return any value. It declares 2.0 f... |
pasteorg_paste | WSGIRegressionServer | public | 0 | 1 | serve_forever | def serve_forever(self):from threading import Threadthread = Thread(target=self.serve_pending)thread.start() | 1 | 4 | 1 | 24 | 0 | 32 | 35 | 32 | self | [] | None | {"Assign": 1, "Expr": 1} | 2 | 4 | 2 | ["Thread", "thread.start"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95159979_LifeActor_ykdl.ykdl.util.rangefetch_server_py.LocalTCPServer.serve_forever"] | The function (serve_forever) defined within the public class called WSGIRegressionServer, that inherit another class.The function start at line 32 and ends at 35. It contains 4 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... |
pasteorg_paste | WSGIRegressionServer | public | 0 | 1 | reset_expires | def reset_expires(self):if self.timeout:self.expires = time.time() + self.timeout | 2 | 3 | 1 | 23 | 0 | 36 | 38 | 36 | self | [] | None | {"Assign": 1, "If": 1} | 1 | 3 | 1 | ["time.time"] | 0 | [] | The function (reset_expires) defined within the public class called WSGIRegressionServer, that inherit another class.The function start at line 36 and ends at 38. It contains 3 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 ... |
pasteorg_paste | WSGIRegressionServer | public | 0 | 1 | close_request | def close_request(self, *args, **kwargs):WSGIServer.close_request(self, *args, **kwargs)self.pending.pop()self.reset_expires() | 1 | 4 | 3 | 35 | 0 | 39 | 42 | 39 | self,*args,**kwargs | [] | None | {"Expr": 3} | 3 | 4 | 3 | ["WSGIServer.close_request", "self.pending.pop", "self.reset_expires"] | 0 | [] | The function (close_request) defined within the public class called WSGIRegressionServer, that inherit another class.The function start at line 39 and ends at 42. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [39.0] and does not return any value. It declares ... |
pasteorg_paste | WSGIRegressionServer | public | 0 | 1 | serve_pending | def serve_pending(self):self.reset_expires()while not self.stopping or self.pending:now = time.time()if now > self.expires and self.timeout:# note regression test doesn't handle exceptions in# threads very well; so we just print and exitprint("\nWARNING: WSGIRegressionServer timeout exceeded\n")breakif self.pending:sel... | 6 | 10 | 1 | 60 | 0 | 43 | 54 | 43 | self | [] | None | {"Assign": 1, "Expr": 4, "If": 2, "While": 1} | 5 | 12 | 5 | ["self.reset_expires", "time.time", "print", "self.handle_request", "time.sleep"] | 0 | [] | The function (serve_pending) defined within the public class called WSGIRegressionServer, that inherit another class.The function start at line 43 and ends at 54. It contains 10 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 5.... |
pasteorg_paste | WSGIRegressionServer | public | 0 | 1 | stop | def stop(self):""" stop the server (called from tester's thread) """self.stopping.append(True) | 1 | 2 | 1 | 14 | 0 | 55 | 57 | 55 | self | [] | None | {"Expr": 2} | 1 | 3 | 1 | ["self.stopping.append"] | 99 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3595150_twisted_txaws.txaws.reactor_py.get_exitcode_reactor", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3640381_floydhub_floyd_cli.floyd.cli.experiment_py.stop", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Crea... | The function (stop) defined within the public class called WSGIRegressionServer, that inherit another class.The function start at line 55 and ends at 57. 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 function,... |
pasteorg_paste | WSGIRegressionServer | public | 0 | 1 | accept | def accept(self, count = 1):""" accept another request (called from tester's thread) """assert not self.stopping[self.pending.append(True) for x in range(count)] | 2 | 3 | 2 | 32 | 0 | 58 | 61 | 58 | self,count | [] | None | {"Expr": 2} | 2 | 4 | 2 | ["self.pending.append", "range"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3623769_allegro_django_powerdns_dnssec.dnsaas.api.v2.tests_py.TestRecords.test_owner_keeps_value_when_no_owner_in_update"] | The function (accept) defined within the public class called WSGIRegressionServer, that inherit another class.The function start at line 58 and ends at 61. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [58.0] and does not return any value. It declares 2.0 fun... |
pasteorg_paste | public | public | 0 | 0 | serve | def serve(application, host=None, port=None, handler=None):server = WSGIRegressionServer(application, host, port, handler)print("serving on %s:%s" % server.server_address)server.serve_forever()return server | 1 | 5 | 4 | 44 | 1 | 63 | 67 | 63 | application,host,port,handler | ['server'] | Returns | {"Assign": 1, "Expr": 2, "Return": 1} | 3 | 5 | 3 | ["WSGIRegressionServer", "print", "server.serve_forever"] | 26 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707931_jonashaag_klaus.tests.test_blame_py.test_blame", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707931_jonashaag_klaus.tests.test_blame_py.test_blame_empty", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Crea... | The function (serve) defined within the public class called public.The function start at line 63 and ends at 67. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [63.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions called ins... |
pasteorg_paste | public | public | 0 | 0 | fetch | def fetch(path):# tell the server to humor exactly one more requestserver.accept(1)# not needed; but this is what you do if the server# may not respond in a resonable time periodimport socketsocket.setdefaulttimeout(5)# build a uri, fetch and returnreturn urlopen(baseuri + path).read() | 1 | 5 | 1 | 30 | 0 | 75 | 83 | 75 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (fetch) defined within the public class called public.The function start at line 75 and ends at 83. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pasteorg_paste | WatchThreads | public | 0 | 0 | __init__ | def __init__(self, allow_kill=False):self.allow_kill = allow_kill | 1 | 2 | 2 | 14 | 0 | 184 | 185 | 184 | self,allow_kill | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called WatchThreads.The function start at line 184 and ends at 185. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [184.0] and does not return any value. It has 6814.0 functions calling this function whic... |
pasteorg_paste | WatchThreads | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):if 'paste.httpserver.thread_pool' not in environ:start_response('403 Forbidden', [('Content-type', 'text/plain')])return ['You must use the threaded Paste HTTP server to use this application']if environ.get('PATH_INFO') == '/kill':return self.kill(environ, start_response)else... | 3 | 8 | 3 | 61 | 0 | 187 | 194 | 187 | self,environ,start_response | [] | Returns | {"Expr": 1, "If": 2, "Return": 3} | 4 | 8 | 4 | ["start_response", "environ.get", "self.kill", "self.show"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called WatchThreads.The function start at line 187 and ends at 194. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [187.0], and this function return a value. It declares 4.0 functions, It has 4.0 function... |
pasteorg_paste | WatchThreads | public | 0 | 0 | show | def show(self, environ, start_response):start_response('200 OK', [('Content-type', 'text/html')])form = parse_formvars(environ)if form.get('kill'):kill_thread_id = form['kill']else:kill_thread_id = Nonethread_pool = environ['paste.httpserver.thread_pool']nworkers = thread_pool.nworkersnow = time.time()workers = thread_... | 4 | 37 | 3 | 241 | 0 | 196 | 236 | 196 | self,environ,start_response | [] | Returns | {"Assign": 17, "Expr": 3, "For": 1, "If": 2, "Return": 1} | 17 | 41 | 17 | ["start_response", "parse_formvars", "form.get", "time.time", "thread_pool.worker_tracker.items", "workers.sort", "bunch", "threads.append", "construct_url", "format_time", "shorten", "traceback_thread", "page_template.substitute", "len", "len", "get_ident", "thread_pool.track_threads"] | 14 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3578708_ulno_ulnoiot_upy.examples.lightboard.lightboard_test_py.show", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3578708_ulno_ulnoiot_upy.examples.lightboard.main_py.animation_next", "_.content.gdrive.MyDrive.Ph... | The function (show) defined within the public class called WatchThreads.The function start at line 196 and ends at 236. It contains 37 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [196.0], and this function return a value. It declares 17.0 functions, It has 17.0 functions... |
pasteorg_paste | WatchThreads | public | 0 | 0 | kill | def kill(self, environ, start_response):if not self.allow_kill:exc = httpexceptions.HTTPForbidden('Killing threads has not been enabled.Shame on you ''for trying!')return exc(environ, start_response)vars = parse_formvars(environ)thread_id = int(vars['thread_id'])thread_pool = environ['paste.httpserver.thread_pool']if t... | 4 | 19 | 3 | 119 | 0 | 238 | 256 | 238 | self,environ,start_response | [] | Returns | {"Assign": 7, "Expr": 1, "If": 2, "Return": 3} | 9 | 19 | 9 | ["httpexceptions.HTTPForbidden", "exc", "parse_formvars", "int", "httpexceptions.PreconditionFailed", "exc", "thread_pool.kill_worker", "httpexceptions.HTTPFound", "exc"] | 21 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3673576_tribler_dollynator.tests.test_address_book_py.TestAddressBook.test_contact_removal_unexpected_death", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3673576_tribler_dollynator.tests.test_address_book_py.TestA... | The function (kill) defined within the public class called WatchThreads.The function start at line 238 and ends at 256. It contains 19 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [238.0], and this function return a value. It declares 9.0 functions, It has 9.0 functions c... |
pasteorg_paste | public | public | 0 | 0 | traceback_thread | def traceback_thread(thread_id):"""Returns a plain-text traceback of the given thread, or None if itcan't get a traceback."""if not hasattr(sys, '_current_frames'):# Only 2.5 has support for this, with this special functionreturn Noneframes = sys._current_frames()if not thread_id in frames:return Noneframe = frames[thr... | 3 | 10 | 1 | 59 | 3 | 258 | 272 | 258 | thread_id | ['frame', 'out', 'frames'] | Returns | {"Assign": 3, "Expr": 2, "If": 2, "Return": 3} | 5 | 15 | 5 | ["hasattr", "sys._current_frames", "StringIO", "traceback.print_stack", "out.getvalue"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.watchthreads_py.WatchThreads.show"] | The function (traceback_thread) defined within the public class called public.The function start at line 258 and ends at 272. It contains 10 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... |
pasteorg_paste | public | public | 0 | 0 | format_time | def format_time(time_length):if time_length >= 60*60:# More than an hourtime_string = '%i:%02i:%02i' % (int(time_length/60/60),int(time_length/60) % 60,time_length % 60)elif time_length >= 120:time_string = '%i:%02i' % (int(time_length/60), time_length % 60)elif time_length > 60:time_string = '%i sec' % time_lengthelif... | 7 | 20 | 1 | 109 | 1 | 276 | 296 | 276 | time_length | ['time_string'] | Returns | {"Assign": 5, "If": 6, "Return": 3} | 3 | 21 | 3 | ["int", "int", "int"] | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3637699_magicalraccoon_tootstream.src.tootstream.toot_py.format_toot_nameline", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3637699_magicalraccoon_tootstream.src.tootstream.toot_py.note", "_.content.gdrive.MyDrive... | The function (format_time) defined within the public class called public.The function start at line 276 and ends at 296. It contains 20 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 3.0 functions, It has 3.0 functions call... |
pasteorg_paste | public | public | 0 | 0 | shorten | def shorten(s):if len(s) > 60:return s[:40]+'...'+s[-10:]else:return s | 2 | 5 | 1 | 32 | 0 | 298 | 302 | 298 | s | [] | Returns | {"If": 1, "Return": 2} | 1 | 5 | 1 | ["len"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.53698295_animekaizoku_enterprisealrobot.tg_bot.modules.anilist_py.anime", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.53698295_animekaizoku_enterprisealrobot.tg_bot.modules.anilist_py.character", "_.content.gdrive... | The function (shorten) defined within the public class called public.The function start at line 298 and ends at 302. 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, It has 1.0 function called insid... |
pasteorg_paste | public | public | 0 | 0 | make_watch_threads | def make_watch_threads(global_conf, allow_kill=False):from paste.deploy.converters import asboolreturn WatchThreads(allow_kill=asbool(allow_kill)) | 1 | 3 | 2 | 27 | 0 | 304 | 306 | 304 | global_conf,allow_kill | [] | Returns | {"Return": 1} | 2 | 3 | 2 | ["WatchThreads", "asbool"] | 0 | [] | The function (make_watch_threads) defined within the public class called public.The function start at line 304 and ends at 306. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [304.0], and this function return a value. It declares 2.0 functions, and It has 2.0... |
pasteorg_paste | public | public | 0 | 0 | make_bad_app.bad_app | def bad_app(environ, start_response):import threadif pause:time.sleep(pause)else:count = 0while 1:print("I'm alive %s (%s)" % (count, thread.get_ident()))time.sleep(10)count += 1start_response('200 OK', [('content-type', 'text/plain')])return ['OK, paused %s seconds' % pause] | 3 | 12 | 2 | 67 | 0 | 311 | 322 | 311 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (make_bad_app.bad_app) defined within the public class called public.The function start at line 311 and ends at 322. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [311.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | make_bad_app | def make_bad_app(global_conf, pause=0):pause = int(pause)def bad_app(environ, start_response):import threadif pause:time.sleep(pause)else:count = 0while 1:print("I'm alive %s (%s)" % (count, thread.get_ident()))time.sleep(10)count += 1start_response('200 OK', [('content-type', 'text/plain')])return ['OK, paused %s seco... | 1 | 4 | 2 | 19 | 2 | 309 | 323 | 309 | global_conf,pause | ['count', 'pause'] | Returns | {"Assign": 2, "AugAssign": 1, "Expr": 4, "If": 1, "Return": 2, "While": 1} | 6 | 15 | 6 | ["int", "time.sleep", "print", "thread.get_ident", "time.sleep", "start_response"] | 0 | [] | The function (make_bad_app) defined within the public class called public.The function start at line 309 and ends at 323. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [309.0], and this function return a value. It declares 6.0 functions, and It has 6.0 funct... |
pasteorg_paste | WDGValidateMiddleware | public | 0 | 0 | __init__ | def __init__(self, app, global_conf=None, wdg_path='validate'):self.app = appself.wdg_path = wdg_path | 1 | 3 | 4 | 25 | 0 | 37 | 39 | 37 | self,app,global_conf,wdg_path | [] | None | {"Assign": 2} | 0 | 3 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called WDGValidateMiddleware.The function start at line 37 and ends at 39. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [37.0] and does not return any value. It has 6814.0 functions calling this functio... |
pasteorg_paste | public | public | 0 | 0 | __call__.writer_start_response | def writer_start_response(status, headers, exc_info=None):response.extend((status, headers))start_response(status, headers, exc_info)return output.write | 1 | 4 | 3 | 33 | 0 | 45 | 48 | 45 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.writer_start_response) defined within the public class called public.The function start at line 45 and ends at 48. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [45.0] and does not return any value.. |
pasteorg_paste | WDGValidateMiddleware | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):output = StringIO()response = []def writer_start_response(status, headers, exc_info=None):response.extend((status, headers))start_response(status, headers, exc_info)return output.writeapp_iter = self.app(environ, writer_start_response)try:for s in app_iter:output.write(s)fina... | 10 | 30 | 3 | 197 | 0 | 41 | 78 | 41 | self,environ,start_response | [] | Returns | {"Assign": 9, "Expr": 7, "For": 1, "If": 4, "Return": 3, "Try": 1} | 22 | 38 | 22 | ["StringIO", "response.extend", "start_response", "self.app", "output.write", "hasattr", "app_iter.close", "output.getvalue", "header_value", "v.startswith", "v.startswith", "v.startswith", "v.startswith", "ops.append", "self.call_wdg_validate", "self.add_error", "headers.remove", "str", "header_value", "headers.append... | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called WDGValidateMiddleware.The function start at line 41 and ends at 78. It contains 30 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [41.0], and this function return a value. It declares 22.0 functions, It has 22.... |
pasteorg_paste | WDGValidateMiddleware | public | 0 | 0 | call_wdg_validate | def call_wdg_validate(self, wdg_path, ops, page):if subprocess is None:raise ValueError("This middleware requires the subprocess module from ""Python 2.4")proc = subprocess.Popen([wdg_path] + ops,shell=False,close_fds=True,stdout=subprocess.PIPE,stdin=subprocess.PIPE,stderr=subprocess.STDOUT)stdout = proc.communicate(p... | 2 | 14 | 4 | 78 | 0 | 80 | 93 | 80 | self,wdg_path,ops,page | [] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 4 | 14 | 4 | ["ValueError", "subprocess.Popen", "proc.communicate", "proc.wait"] | 0 | [] | The function (call_wdg_validate) defined within the public class called WDGValidateMiddleware.The function start at line 80 and ends at 93. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [80.0], and this function return a value. It declares 4.0 functions, and... |
pasteorg_paste | WDGValidateMiddleware | public | 0 | 0 | add_error | def add_error(self, html_page, html_errors):add_text = ('<pre style="background-color: #ffd; color: #600; ''border: 1px solid #000;">%s</pre>'% html.escape(html_errors))match = self._end_body_regex.search(html_page)if match:return [html_page[:match.start()]+ add_text+ html_page[match.start():]]else:return [html_page + ... | 2 | 11 | 3 | 67 | 0 | 95 | 105 | 95 | self,html_page,html_errors | [] | Returns | {"Assign": 2, "If": 1, "Return": 2} | 4 | 11 | 4 | ["html.escape", "self._end_body_regex.search", "match.start", "match.start"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3966383_jfilak_sapcli.test.unit.test_sap_cli_checkin_py.TestActivate.test_activate_error", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.80560341_prozorroukr_openprocurement_api.src.openprocurement.tender.core.proce... | The function (add_error) defined within the public class called WDGValidateMiddleware.The function start at line 95 and ends at 105. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [95.0], and this function return a value. It declares 4.0 functions, It has 4.0... |
pasteorg_paste | public | public | 0 | 0 | make_wdg_validate_middleware | def make_wdg_validate_middleware(app, global_conf, wdg_path='validate'):"""Wraps the application in the WDG validator fromhttp://www.htmlhelp.com/tools/validator/Validation errors are appended to the text of each page.You can configure this by giving the path to the validateexecutable (by default picked up from $PATH)"... | 1 | 4 | 3 | 23 | 0 | 107 | 118 | 107 | app,global_conf,wdg_path | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 12 | 1 | ["WDGValidateMiddleware"] | 0 | [] | The function (make_wdg_validate_middleware) defined within the public class called public.The function start at line 107 and ends at 118. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [107.0], and this function return a value. It declare 1.0 function, and It... |
pasteorg_paste | EvalContext | public | 0 | 0 | __init__ | def __init__(self, namespace, globs):self.namespace = namespaceself.globs = globs | 1 | 3 | 3 | 19 | 0 | 22 | 24 | 22 | self,namespace,globs | [] | None | {"Assign": 2} | 0 | 3 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called EvalContext.The function start at line 22 and ends at 24. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [22.0] and does not return any value. It has 6814.0 functions calling this function which ar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.