(s)
| 19 | |
| 20 | STOP_WORDS = [] |
| 21 | def match_code(s): |
| 22 | pattern = r'```python(.*?)```' |
| 23 | sol = re.findall(pattern, s, re.DOTALL) |
| 24 | if len(sol) > 0: |
| 25 | for code_block in reversed(sol): |
| 26 | if 'def ' in code_block: |
| 27 | return code_block |
| 28 | return sol[-1] |
| 29 | |
| 30 | pattern = r'```(.*?)```' |
| 31 | sol = re.findall(pattern, s, re.DOTALL) |
| 32 | if len(sol) > 0: |
| 33 | for code_block in reversed(sol): |
| 34 | if 'def ' in code_block: |
| 35 | return code_block |
| 36 | return sol[-1] |
| 37 | |
| 38 | return s.split('```')[0] |
| 39 | |
| 40 | def generate_sample_batch(question_list): |
| 41 | llm = LLM( |
no outgoing calls
no test coverage detected