MCPcopy Index your code
hub / github.com/going-doer/Paper2Code / extract_code_from_content2

Function extract_code_from_content2

codes/utils.py:127–136  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

125 return code[0]
126
127def extract_code_from_content2(content):
128 pattern = r'```python\s*(.*?)```'
129 result = re.search(pattern, content, re.DOTALL)
130
131 if result:
132 extracted_code = result.group(1).strip()
133 else:
134 extracted_code = ""
135 print("[WARNING] No Python code found.")
136 return extracted_code
137
138def format_json_data(data):
139 formatted_text = ""

Callers 1

3_coding_llm.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected