| camel_to_snake |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/generate_bidi_protocol.py code served (permissive licence) · get_code("24d3235a4cb2ddc1") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
def camel_to_snake(name: str) -> str:
name = re.sub('([A-Z]+)([A-Z][a-z])', '\\1_\\2', name)
name = re.sub('([a-z\\d])([A-Z])', '\\1_\\2', name)
return name.lower()
ARGS = {
"name": "CamelCaseString"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| dict_to_headers |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/private/_network_handlers.py code served (permissive licence) · get_code("b8842ad157e65c25") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Test case 1: None headers (empty case)
headers_none = None
# Test case 2: Headers with string values
headers_with_strings = {
'content-type': 'application/json',
'user-agent': 'test-client'
}
# Test case 3: Headers with objects that have to_bidi_dict method
class MockBiDiValue:
def to_bidi_dict(self):
return {'type': 'bytes', 'value': b'test'}
headers_with_bidi = {
'custom-header': MockBiDiValue(),
'simple': 'value'
}
# Test case 4: Headers with mixed types
headers_mixed = {
'auth': 'Bearer token123',
'x-custom': MockBiDiValue(),
'accept': 'text/html'
}
ARGS = {
'headers': headers_with_strings
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| escape_backticks |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/generate.py code served (permissive licence) · get_code("d35c5ded3a9fead2") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
BACKTICK_RE = re.compile('`([^`]+)`(\\w+)?')
def escape_backticks(docstr):
"""Escape backticks in a docstring by doubling them up.
This is a little tricky because RST requires a non-letter character after
the closing backticks, but some CDPs docs have things like "`AxNodeId`s".
If we double the backticks in that string, then it won't be valid RST. The
fix is to insert an apostrophe if an "s" trails the backticks.
"""
def replace_one(match):
if match.group(2) == 's':
return f"``{match.group(1)}``'s"
if match.group(2):
return f'``{match.group(1)}`` {match.group(2)}'
return f'``{match.group(1)}``'
docstr = docstr.replace('|', '`')
return BACKTICK_RE.sub(replace_one, docstr)
# Test docstring with various backtick patterns
test_docstring = "This is a docstring with `AxNodeId`s and |another|Thing| and `simple` text"
ARGS = {
"docstr": test_docstring
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| find_modules |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/generate_api_module_listing.py code served (permissive licence) · get_code("caa5d516a8129972") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import site
import tempfile
import shutil
# Create a temporary package structure for testing
temp_dir = tempfile.mkdtemp()
package_dir = os.path.join(temp_dir, 'test_package')
os.makedirs(package_dir)
# Create some test Python files
with open(os.path.join(package_dir, 'module1.py'), 'w') as f:
f.write('# test module 1\n')
with open(os.path.join(package_dir, 'module2.py'), 'w') as f:
f.write('# test module 2\n')
subdir = os.path.join(package_dir, 'submodule')
os.makedirs(subdir)
with open(os.path.join(subdir, 'module3.py'), 'w') as f:
f.write('# test module 3\n')
with open(os.path.join(subdir, '__init__.py'), 'w') as f:
f.write('# init file\n')
# The function expects a package_name which is a directory path
ARGS = {
'package_name': package_dir
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| headers_to_dict |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/private/_network_handlers.py code served (permissive licence) · get_code("f7c48225041fa819") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
# Construct arguments for headers_to_dict
# The function expects:
# - headers: list | None - a list of header dicts or None
# Each header dict should have 'name' and 'value' keys
# The 'value' can be either a simple string or a BiDi BytesValue dict with 'type' and 'value'
ARGS = {
'headers': [
{
'name': 'Content-Type',
'value': {'type': 'string', 'value': 'application/json'}
},
{
'name': 'Authorization',
'value': 'Bearer token123'
},
{
'name': 'Accept',
'value': {'type': 'string', 'value': 'text/html'}
}
]
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| indent |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/generate.py code served (permissive licence) · get_code("59eabb77f247d1fc") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from textwrap import indent as tw_indent
torch.manual_seed(0)
# The function takes:
# - s: a string to indent
# - n: number of spaces to indent by (an integer)
# Looking at the function body, it calls tw_indent(s, n * ' ')
# So s must be a string, and n must be an integer
ARGS = {
"s": "hello\nworld\ntest",
"n": 4
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| indent |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/generate_bidi.py code served (permissive licence) · get_code("5a28995c24d1783c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
# The function indent() takes a string s and an integer n
# It indents the string s by n spaces using textwrap.indent
ARGS = {
"s": "hello\nworld\ntest",
"n": 2
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| inline_doc |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/generate.py code served (permissive licence) · get_code("8ec54d95b668403a") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
BACKTICK_RE = re.compile('`([^`]+)`(\\w+)?')
def escape_backticks(docstr):
"""Escape backticks in a docstring by doubling them up.
This is a little tricky because RST requires a non-letter character after
the closing backticks, but some CDPs docs have things like "`AxNodeId`s".
If we double the backticks in that string, then it won't be valid RST. The
fix is to insert an apostrophe if an "s" trails the backticks.
"""
def replace_one(match):
if match.group(2) == 's':
return f"``{match.group(1)}``'s"
if match.group(2):
return f'``{match.group(1)}`` {match.group(2)}'
return f'``{match.group(1)}``'
docstr = docstr.replace('|', '`')
return BACKTICK_RE.sub(replace_one, docstr)
def inline_doc(description):
"""Generate an inline doc, e.g. `#: This type is a ...`."""
if not description:
return ''
description = escape_backticks(description)
lines = [f'#: {line}' for line in description.split('\n')]
return '\n'.join(lines)
ARGS = {
'description': 'This type is a `NodeId`s representing the node.\nUse `getValue|get` to access it.'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_enhancements_manifest |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/generate_bidi.py code served (permissive licence) · get_code("85f12e90d1d89168") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tempfile
import logging
from pathlib import Path
# Configure logging
logging.basicConfig(level=logging.INFO)
# Create a temporary Python file with ENHANCEMENTS dict
temp_dir = tempfile.mkdtemp()
manifest_file_path = Path(temp_dir) / "test_manifest.py"
manifest_content = """
ENHANCEMENTS = {
'module_a': {'rule1': 'value1', 'rule2': 'value2'},
'module_b': {'rule3': 'value3'}
}
DATACLASS_METHOD_TEMPLATES = {
'method_template_1': 'def method1(self): pass',
'method_template_2': 'def method2(self): pass'
}
DATACLASS_METHOD_DOCSTRINGS = {
'method1': 'Docstring for method1',
'method2': 'Docstring for method2'
}
"""
manifest_file_path.write_text(manifest_content)
ARGS = {
'manifest_path': str(manifest_file_path)
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| looks_like_url_glob |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/private/_network_handlers.py code served (permissive licence) · get_code("7117dc42b7531cd3") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
def looks_like_url_glob(value):
"""Heuristically distinguish a URL glob from a legacy event name."""
return isinstance(value, str) and any((char in value for char in '*?/:.'))
ARGS = {
"value": "path/to/events*.log"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| module_name_to_class_name |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/generate_bidi.py code served (permissive licence) · get_code("e5e2d55d85456d92") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
def module_name_to_class_name(module_name: str) -> str:
"""Convert module name to class name (PascalCase).
Handles both camelCase (browsingContext) and snake_case (browsing_context).
"""
if '_' in module_name:
return ''.join((word.capitalize() for word in module_name.split('_')))
else:
return module_name[0].upper() + module_name[1:] if module_name else ''
ARGS = {
'module_name': 'browsing_context'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| snake_to_class |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/generate_bidi_protocol.py code served (permissive licence) · get_code("b03ada0633b9efff") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
def snake_to_class(name: str) -> str:
return ''.join((part.capitalize() for part in name.split('_')))
ARGS = {
'name': 'hello_world_example'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| type_class_name |
Ran ran on a synthesized input |
SeleniumHQ/selenium/py/generate_bidi_protocol.py code served (permissive licence) · get_code("cced5e351349e0f4") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
def type_class_name(type_name: str) -> str:
"""Local class name for a schema type; synthetic ``X_Y`` becomes CamelCase ``XY``."""
local = type_name.split('.', 1)[-1]
parts = [p for p in local.split('_') if p]
return ''.join((p[:1].upper() + p[1:] for p in parts)) or local
ARGS = {
"type_name": "my_schema.foo_bar_baz"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|