name
stringlengths
31
50
instruction
stringlengths
868
1.49k
description
stringlengths
114
120
keywords
listlengths
0
0
schema_version
stringclasses
1 value
config
unknown
metadata
unknown
files
listlengths
7
7
location
stringlengths
31
50
local/adrienverge__yamllint-cinst-40ca8da6
Implement a class `TrailingSpaceValidator` that wraps `yamllint.linter.run` to detect trailing whitespace violations in YAML content. You must explicitly import `yamllint.linter` and `yamllint.config.YamlLintConfig` and use them to configure and run the linter. Configure the linter with a YAML config that enables only ...
Implement a class `TrailingSpaceValidator` that wraps `yamllint.linter.run` to detect trailing whitespace violations in
[]
{ "version": "1.0", "task": { "name": "local/adrienverge__yamllint-cinst-40ca8da6", "description": "Implement a class `TrailingSpaceValidator` that wraps `yamllint.linter.run` to detect trailing whitespace violations in " }, "metadata": { "difficulty": "medium", "category": "feature", "keywo...
{ "difficulty": "medium", "category": "feature", "keywords": [ "yamllint", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "adrienverge/yamllint", "ref": "8513d9b97da3b32453b3fccb221f4ab134a028d7", "reference": "https://github.com/...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_40ca8da60f.py" ]
tasks/adrienverge__yamllint-cinst-40ca8da6
local/agronholm__typeguard-cinst-110a5c18
Implement `process_integers` in `task_module.py` that accepts a sequence of integers (`Sequence[int]`) and returns their sum. You must use the `typechecked` decorator from the `typeguard` library to enforce strict runtime type checking on the input arguments. Standard `typing` annotations alone are not sufficient for r...
Implement `process_integers` in `task_module.py` that accepts a sequence of integers (`Sequence[int]`) and returns their
[]
{ "version": "1.0", "task": { "name": "local/agronholm__typeguard-cinst-110a5c18", "description": "Implement `process_integers` in `task_module.py` that accepts a sequence of integers (`Sequence[int]`) and returns their" }, "metadata": { "difficulty": "medium", "category": "feature", "keywor...
{ "difficulty": "medium", "category": "feature", "keywords": [ "typeguard", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "agronholm/typeguard", "ref": "b6a7e4387c30a9f7d635712157c889eb073c1ea3", "reference": "https://github.com/...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_110a5c183b.py" ]
tasks/agronholm__typeguard-cinst-110a5c18
local/agronholm__typeguard-cinst-48569c76
Create a configuration validator that uses `typeguard`'s type checking capabilities. The function must validate a `config` dictionary with required keys (`name`, `version`) and optional keys (`debug`, `timeout`). You must use `typeguard`'s public API to enforce type constraints on all parameters. Requirements: - Valid...
Create a configuration validator that uses `typeguard`'s type checking capabilities. The function must validate a `confi
[]
{ "version": "1.0", "task": { "name": "local/agronholm__typeguard-cinst-48569c76", "description": "Create a configuration validator that uses `typeguard`'s type checking capabilities. The function must validate a `confi" }, "metadata": { "difficulty": "medium", "category": "feature", "keywor...
{ "difficulty": "medium", "category": "feature", "keywords": [ "typeguard", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "agronholm/typeguard", "ref": "b6a7e4387c30a9f7d635712157c889eb073c1ea3", "reference": "https://github.com/...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_48569c76d2.py" ]
tasks/agronholm__typeguard-cinst-48569c76
local/alecthomas__voluptuous-cinst-bb277406
Create a `ValidationErrorAccumulator` class that wraps `voluptuous.Schema` functionality and provides a method to collect ALL validation errors when validation fails. The class should use `voluptuous`'s validation but return a list of error-like dictionaries when `collect_errors=True`, or `None` on success. Each error ...
Create a `ValidationErrorAccumulator` class that wraps `voluptuous.Schema` functionality and provides a method to collec
[]
{ "version": "1.0", "task": { "name": "local/alecthomas__voluptuous-cinst-bb277406", "description": "Create a `ValidationErrorAccumulator` class that wraps `voluptuous.Schema` functionality and provides a method to collec" }, "metadata": { "difficulty": "medium", "category": "feature", "keyw...
{ "difficulty": "medium", "category": "feature", "keywords": [ "voluptuous", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "alecthomas/voluptuous", "ref": "a7a55f83b9fa7ba68b0669b3d78a61de703e0a16", "reference": "https://github.c...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_bb2774064c.py" ]
tasks/alecthomas__voluptuous-cinst-bb277406
local/alecthomas__voluptuous-cinst-bbd5c838
Implement a `ConfigValidator` class that wraps `voluptuous.Schema` to validate application configuration dictionaries. The validator must enforce: `app_name` is a required non-empty string, and `version` is a required string. Use `voluptuous.PREVENT_EXTRA` to forbid undefined keys. Errors should be raised as `voluptuou...
Implement a `ConfigValidator` class that wraps `voluptuous.Schema` to validate application configuration dictionaries. T
[]
{ "version": "1.0", "task": { "name": "local/alecthomas__voluptuous-cinst-bbd5c838", "description": "Implement a `ConfigValidator` class that wraps `voluptuous.Schema` to validate application configuration dictionaries. T" }, "metadata": { "difficulty": "medium", "category": "feature", "keyw...
{ "difficulty": "medium", "category": "feature", "keywords": [ "voluptuous", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "alecthomas/voluptuous", "ref": "a7a55f83b9fa7ba68b0669b3d78a61de703e0a16", "reference": "https://github.c...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_bbd5c838f4.py" ]
tasks/alecthomas__voluptuous-cinst-bbd5c838
local/andialbrecht__sqlparse-cinst-c1d77138
Implement a Python function `remove_inline_comments` that accepts a SQL string and returns a cleaned version where all single-line comments (`-- ...`) are stripped. You must use `sqlparse` to parse the SQL string into a token tree, traverse the tokens, and reconstruct the string by skipping tokens of type `Comment.Sing...
Implement a Python function `remove_inline_comments` that accepts a SQL string and returns a cleaned version where all s
[]
{ "version": "1.0", "task": { "name": "local/andialbrecht__sqlparse-cinst-c1d77138", "description": "Implement a Python function `remove_inline_comments` that accepts a SQL string and returns a cleaned version where all s" }, "metadata": { "difficulty": "medium", "category": "feature", "keyw...
{ "difficulty": "medium", "category": "feature", "keywords": [ "sqlparse", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "andialbrecht/sqlparse", "ref": "e57923b3aa823c524c807953cecc48cf6eec2cb2", "reference": "https://github.com...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_c1d771385c.py" ]
tasks/andialbrecht__sqlparse-cinst-c1d77138
local/benoitc__gunicorn-cinst-ce3b7cf8
Implement a `SafeReloader` class that inherits from `gunicorn.reloader.Reloader`. This class must enforce stricter file safety rules during application reloading by overriding the `add_extra_file` method. Specifically, if a filename contains any whitespace characters, the method must raise a `ValueError` immediately be...
Implement a `SafeReloader` class that inherits from `gunicorn.reloader.Reloader`. This class must enforce stricter file
[]
{ "version": "1.0", "task": { "name": "local/benoitc__gunicorn-cinst-ce3b7cf8", "description": "Implement a `SafeReloader` class that inherits from `gunicorn.reloader.Reloader`. This class must enforce stricter file " }, "metadata": { "difficulty": "medium", "category": "feature", "keywords"...
{ "difficulty": "medium", "category": "feature", "keywords": [ "gunicorn", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "benoitc/gunicorn", "ref": "bacbf8aa5152b94e44aa5d2a94aeaf0318a85248", "reference": "https://github.com/beno...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_ce3b7cf8b9.py" ]
tasks/benoitc__gunicorn-cinst-ce3b7cf8
local/bottlepy__bottle-cinst-6c7ab9fd
Build a URL parameter analyzer that processes HTTP request parameters extracted from a Bottle WSGI environment. The solver must use `bottle`'s `MultiDict` class to access and manipulate numeric HTTP parameters. Implement `ParameterStatsAnalyzer` that: 1) Accepts a `MultiDict` instance, 2) Provides `count_params()` retu...
Build a URL parameter analyzer that processes HTTP request parameters extracted from a Bottle WSGI environment. The solv
[]
{ "version": "1.0", "task": { "name": "local/bottlepy__bottle-cinst-6c7ab9fd", "description": "Build a URL parameter analyzer that processes HTTP request parameters extracted from a Bottle WSGI environment. The solv" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords":...
{ "difficulty": "medium", "category": "feature", "keywords": [ "bottle", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "bottlepy/bottle", "ref": "a8dfef301dec35f13e7578306002c40796651629", "reference": "https://github.com/bottlep...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_6c7ab9fd17.py" ]
tasks/bottlepy__bottle-cinst-6c7ab9fd
local/bottlepy__bottle-cinst-bf23febc
Implement a function `sanitize_headers(md, prefix)` that removes HTTP headers from a `bottle.MultiDict` that start with a given prefix using case-insensitive matching. The function must validate that `md` is an instance of `bottle.MultiDict` (raise `TypeError` otherwise), then delete all matching keys using `bottle.Mul...
Implement a function `sanitize_headers(md, prefix)` that removes HTTP headers from a `bottle.MultiDict` that start with
[]
{ "version": "1.0", "task": { "name": "local/bottlepy__bottle-cinst-bf23febc", "description": "Implement a function `sanitize_headers(md, prefix)` that removes HTTP headers from a `bottle.MultiDict` that start with " }, "metadata": { "difficulty": "medium", "category": "feature", "keywords":...
{ "difficulty": "medium", "category": "feature", "keywords": [ "bottle", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "bottlepy/bottle", "ref": "a8dfef301dec35f13e7578306002c40796651629", "reference": "https://github.com/bottlep...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_bf23febc9a.py" ]
tasks/bottlepy__bottle-cinst-bf23febc
local/chardet__chardet-cinst-16877bd5
Implement a function named `analyze_encoding` in `task_module.py` that uses `chardet.detect()` to analyze a byte sequence and return its detected encoding metadata. The function must explicitly import and call `chardet.detect()`, returning a dictionary with `encoding` and `confidence` keys. Do not implement custom heur...
Implement a function named `analyze_encoding` in `task_module.py` that uses `chardet.detect()` to analyze a byte sequenc
[]
{ "version": "1.0", "task": { "name": "local/chardet__chardet-cinst-16877bd5", "description": "Implement a function named `analyze_encoding` in `task_module.py` that uses `chardet.detect()` to analyze a byte sequenc" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords":...
{ "difficulty": "medium", "category": "feature", "keywords": [ "chardet", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "chardet/chardet", "ref": "9630f2382faa50b81be2f96fd3dfab5f6739a0ef", "reference": "https://github.com/charde...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_16877bd55b.py" ]
tasks/chardet__chardet-cinst-16877bd5
local/chardet__chardet-cinst-f5db825d
Build a `byte_sequence_analyzer` module that uses `chardet` to detect character encodings in byte sequences. Your function must accept a list of byte strings and return a dictionary mapping each sequence to its detected charset name and confidence score. The solver must import `chardet.detect()` and use its return stru...
Build a `byte_sequence_analyzer` module that uses `chardet` to detect character encodings in byte sequences. Your functi
[]
{ "version": "1.0", "task": { "name": "local/chardet__chardet-cinst-f5db825d", "description": "Build a `byte_sequence_analyzer` module that uses `chardet` to detect character encodings in byte sequences. Your functi" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords":...
{ "difficulty": "medium", "category": "feature", "keywords": [ "chardet", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "chardet/chardet", "ref": "9630f2382faa50b81be2f96fd3dfab5f6739a0ef", "reference": "https://github.com/charde...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_f5db825d42.py" ]
tasks/chardet__chardet-cinst-f5db825d
local/cloudpipe__cloudpickle-cinst-7fdbb0b4
Implement a serialization utility in `task_module` that handles functions with closures referencing variables defined in the calling environment (not in `task_module`'s scope). Standard `pickle` will fail if the global variable isn't present in the serialization module's namespace. You must use `cloudpickle` to serial...
Implement a serialization utility in `task_module` that handles functions with closures referencing variables defined in
[]
{ "version": "1.0", "task": { "name": "local/cloudpipe__cloudpickle-cinst-7fdbb0b4", "description": "Implement a serialization utility in `task_module` that handles functions with closures referencing variables defined in" }, "metadata": { "difficulty": "medium", "category": "feature", "keyw...
{ "difficulty": "medium", "category": "feature", "keywords": [ "cloudpickle", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "cloudpipe/cloudpickle", "ref": "6220b0ce83ffee5e47e06770a1ee38ca9e47c850", "reference": "https://github....
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_7fdbb0b499.py" ]
tasks/cloudpipe__cloudpickle-cinst-7fdbb0b4
local/encode__starlette-cinst-88cad8b3
You must create a secure redirection utility using the `starlette` library. Specifically, implement a class named `SecureRedirect` that inherits from `starlette.responses.RedirectResponse`. Override the `__init__` method to accept a `url` string. Validate that the URL starts with either 'http://' or 'https://'. If the ...
You must create a secure redirection utility using the `starlette` library. Specifically, implement a class named `Secur
[]
{ "version": "1.0", "task": { "name": "local/encode__starlette-cinst-88cad8b3", "description": "You must create a secure redirection utility using the `starlette` library. Specifically, implement a class named `Secur" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords"...
{ "difficulty": "medium", "category": "feature", "keywords": [ "starlette", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "encode/starlette", "ref": "db5063c26030e019f7ee62aef9a1b564eca9f1d6", "reference": "https://github.com/enc...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_88cad8b328.py" ]
tasks/encode__starlette-cinst-88cad8b3
local/facelessuser__soupsieve-cinst-49d1b821
Implement a class `SelectorValidator` that wraps `soupsieve.select()` for CSS selector validation and element matching. The class must reject empty or whitespace-only selectors with a `ValueError`, store the selector string, and expose it via `get_selector()`. Implement a `__call__` method that applies the selector to ...
Implement a class `SelectorValidator` that wraps `soupsieve.select()` for CSS selector validation and element matching.
[]
{ "version": "1.0", "task": { "name": "local/facelessuser__soupsieve-cinst-49d1b821", "description": "Implement a class `SelectorValidator` that wraps `soupsieve.select()` for CSS selector validation and element matching. " }, "metadata": { "difficulty": "medium", "category": "feature", "key...
{ "difficulty": "medium", "category": "feature", "keywords": [ "soupsieve", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "facelessuser/soupsieve", "ref": "a8080d97a0355e316981cb0c5c887a861c4244e3", "reference": "https://github.c...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_49d1b82115.py" ]
tasks/facelessuser__soupsieve-cinst-49d1b821
local/facelessuser__soupsieve-cinst-6475dd05
Build a CSS selector matcher utility that uses `soupsieve`'s CSS selector matching capabilities to find elements in a BeautifulSoup document. The class must wrap `soupsieve.select()` to create a matcher, validate inputs, and iterate over matches. Requirements: - Must use `soupsieve.select()` to perform CSS matching - ...
Build a CSS selector matcher utility that uses `soupsieve`'s CSS selector matching capabilities to find elements in a Be
[]
{ "version": "1.0", "task": { "name": "local/facelessuser__soupsieve-cinst-6475dd05", "description": "Build a CSS selector matcher utility that uses `soupsieve`'s CSS selector matching capabilities to find elements in a Be" }, "metadata": { "difficulty": "medium", "category": "feature", "key...
{ "difficulty": "medium", "category": "feature", "keywords": [ "soupsieve", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "facelessuser/soupsieve", "ref": "a8080d97a0355e316981cb0c5c887a861c4244e3", "reference": "https://github.c...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_6475dd05b8.py" ]
tasks/facelessuser__soupsieve-cinst-6475dd05
local/graphql-python__graphene-cinst-6cbad52e
Implement a custom GraphQL scalar named `SecureToken` using the `graphene` library. You must subclass `graphene.Scalar` to define the scalar's behavior. The `serialize` method should accept a string or bytes, base64-encode the content, and prefix the result with "tok_". The `parse_value` method should decode the base64...
Implement a custom GraphQL scalar named `SecureToken` using the `graphene` library. You must subclass `graphene.Scalar`
[]
{ "version": "1.0", "task": { "name": "local/graphql-python__graphene-cinst-6cbad52e", "description": "Implement a custom GraphQL scalar named `SecureToken` using the `graphene` library. You must subclass `graphene.Scalar` " }, "metadata": { "difficulty": "medium", "category": "feature", "ke...
{ "difficulty": "medium", "category": "feature", "keywords": [ "graphene", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "graphql-python/graphene", "ref": "82903263080b3b7f22c2ad84319584d7a3b1a1f6", "reference": "https://github.c...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_6cbad52e1d.py" ]
tasks/graphql-python__graphene-cinst-6cbad52e
local/graphql-python__graphene-cinst-8db601e6
Implement a custom `Hex` scalar type for the `graphene` GraphQL library. This scalar should serialize raw bytes to a hexadecimal string and deserialize hexadecimal strings back to bytes, with proper validation using `GraphQLError`. Requirements: - Subclass `graphene.Scalar` and define `serialize(self, value)` that enc...
Implement a custom `Hex` scalar type for the `graphene` GraphQL library. This scalar should serialize raw bytes to a hex
[]
{ "version": "1.0", "task": { "name": "local/graphql-python__graphene-cinst-8db601e6", "description": "Implement a custom `Hex` scalar type for the `graphene` GraphQL library. This scalar should serialize raw bytes to a hex" }, "metadata": { "difficulty": "medium", "category": "feature", "ke...
{ "difficulty": "medium", "category": "feature", "keywords": [ "graphene", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "graphql-python/graphene", "ref": "82903263080b3b7f22c2ad84319584d7a3b1a1f6", "reference": "https://github.c...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_8db601e6ca.py" ]
tasks/graphql-python__graphene-cinst-8db601e6
local/hukkin__tomli-cinst-4bbbf36f
Implement a function `load_package_meta` in `task_module.py`. You must explicitly use the `tomli` library to parse a TOML string. The function should accept a string and return the value of the `version` key located within the `[meta]` table. If the input string contains invalid TOML syntax, the function must raise `TO...
Implement a function `load_package_meta` in `task_module.py`. You must explicitly use the `tomli` library to parse a TOM
[]
{ "version": "1.0", "task": { "name": "local/hukkin__tomli-cinst-4bbbf36f", "description": "Implement a function `load_package_meta` in `task_module.py`. You must explicitly use the `tomli` library to parse a TOM" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [ ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "tomli", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "hukkin/tomli", "ref": "443a0c1bc5da39b7ed84306912ee1900e6b72e2f", "reference": "https://github.com/hukkin/toml...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_4bbbf36fc0.py" ]
tasks/hukkin__tomli-cinst-4bbbf36f
local/hukkin__tomli-cinst-af1485ae
You need to create a `toml_loader` class that parses TOML configuration strings and converts all date and datetime objects into ISO format strings. The class must use `tomli`'s `loads()` function to parse TOML content, then recursively convert all `date` and `datetime` objects in the resulting dictionary to their ISO f...
You need to create a `toml_loader` class that parses TOML configuration strings and converts all date and datetime objec
[]
{ "version": "1.0", "task": { "name": "local/hukkin__tomli-cinst-af1485ae", "description": "You need to create a `toml_loader` class that parses TOML configuration strings and converts all date and datetime objec" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [ ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "tomli", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "hukkin/tomli", "ref": "443a0c1bc5da39b7ed84306912ee1900e6b72e2f", "reference": "https://github.com/hukkin/toml...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_af1485aece.py" ]
tasks/hukkin__tomli-cinst-af1485ae
local/jawah__charset_normalizer-cinst-f0e8396d
Implement a function `analyze_text_encoding` in `task_module` that uses `charset_normalizer` to detect the character encoding of a given input (string or bytes). The function must call `charset_normalizer.detect` to retrieve the detected encoding and confidence score from the result dictionary. Return a dictionary wit...
Implement a function `analyze_text_encoding` in `task_module` that uses `charset_normalizer` to detect the character enc
[]
{ "version": "1.0", "task": { "name": "local/jawah__charset_normalizer-cinst-f0e8396d", "description": "Implement a function `analyze_text_encoding` in `task_module` that uses `charset_normalizer` to detect the character enc" }, "metadata": { "difficulty": "medium", "category": "feature", "k...
{ "difficulty": "medium", "category": "feature", "keywords": [ "charset_normalizer", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "jawah/charset_normalizer", "ref": "1fdd64633572040ab60e62e8b24f29cb7e17660b", "reference": "https...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_f0e8396d59.py" ]
tasks/jawah__charset_normalizer-cinst-f0e8396d
local/jsvine__pdfplumber-cinst-73cab5f7
You are building a PDF metadata and table extraction utility. Implement a function called `extract_pdf_metadata_and_tables` that analyzes a PDF file and extracts structured information using `pdfplumber`. The function must: (1) read the PDF's metadata (title, author, subject), (2) extract all tables found in the docume...
You are building a PDF metadata and table extraction utility. Implement a function called `extract_pdf_metadata_and_tabl
[]
{ "version": "1.0", "task": { "name": "local/jsvine__pdfplumber-cinst-73cab5f7", "description": "You are building a PDF metadata and table extraction utility. Implement a function called `extract_pdf_metadata_and_tabl" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords...
{ "difficulty": "medium", "category": "feature", "keywords": [ "pdfplumber", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "jsvine/pdfplumber", "ref": "02ff4313f846380fefccec9c73fb4c8d8a80d0ee", "reference": "https://github.com/j...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_73cab5f74c.py" ]
tasks/jsvine__pdfplumber-cinst-73cab5f7
local/jsvine__pdfplumber-cinst-a754e558
Implement a function `extract_first_table` in `task_module.py` that uses `pdfplumber` to extract data from the first table in a PDF. The function must import `pdfplumber` and use its `PDF` class to open the file, then call `extract_tables()` on the first page. Return a list of dictionaries where each dictionary maps he...
Implement a function `extract_first_table` in `task_module.py` that uses `pdfplumber` to extract data from the first tab
[]
{ "version": "1.0", "task": { "name": "local/jsvine__pdfplumber-cinst-a754e558", "description": "Implement a function `extract_first_table` in `task_module.py` that uses `pdfplumber` to extract data from the first tab" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords...
{ "difficulty": "medium", "category": "feature", "keywords": [ "pdfplumber", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "jsvine/pdfplumber", "ref": "02ff4313f846380fefccec9c73fb4c8d8a80d0ee", "reference": "https://github.com/j...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_a754e55874.py" ]
tasks/jsvine__pdfplumber-cinst-a754e558
local/kayak__pypika-cinst-b2f11714
Design a custom `pypika` expression named `SafeDivide` that generates SQL preventing division-by-zero errors. Subclass `pypika.terms.Function`, accepting exactly two arguments (numerator and denominator) via `*args` for validation. When `.get_sql()` is invoked, wrap the first argument as `COALESCE(arg, '0')` and the se...
Design a custom `pypika` expression named `SafeDivide` that generates SQL preventing division-by-zero errors. Subclass `
[]
{ "version": "1.0", "task": { "name": "local/kayak__pypika-cinst-b2f11714", "description": "Design a custom `pypika` expression named `SafeDivide` that generates SQL preventing division-by-zero errors. Subclass `" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [ ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "pypika", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "kayak/pypika", "ref": "1c9646f0a019a167c32b649b6f5e6423c5ba2c9b", "reference": "https://github.com/kayak/pypi...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_b2f1171415.py" ]
tasks/kayak__pypika-cinst-b2f11714
local/kurtmckee__feedparser-cinst-fe655934
Implement a function `analyze_feed` that parses a feed string using the `feedparser` library. You must use `feedparser.parse` to process the input. The function should return a dictionary containing the `title` of the feed and the `entry_count` (number of entries). If the input is invalid, the function must raise `feed...
Implement a function `analyze_feed` that parses a feed string using the `feedparser` library. You must use `feedparser.p
[]
{ "version": "1.0", "task": { "name": "local/kurtmckee__feedparser-cinst-fe655934", "description": "Implement a function `analyze_feed` that parses a feed string using the `feedparser` library. You must use `feedparser.p" }, "metadata": { "difficulty": "medium", "category": "feature", "keywo...
{ "difficulty": "medium", "category": "feature", "keywords": [ "feedparser", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "kurtmckee/feedparser", "ref": "cad965a3f52c4b077221a2142fb14ef7f68cd576", "reference": "https://github.co...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_fe655934e0.py" ]
tasks/kurtmckee__feedparser-cinst-fe655934
local/lepture__mistune-cinst-31534c1e
Implement a function `detect_loose_lists` that uses the `mistune` library to parse Markdown text and analyze its AST structure. The function must parse the input using `mistune.Markdown()` and iterate through the resulting token list from the tuple returned by `parse()`. It should return `True` if any token is a dictio...
Implement a function `detect_loose_lists` that uses the `mistune` library to parse Markdown text and analyze its AST str
[]
{ "version": "1.0", "task": { "name": "local/lepture__mistune-cinst-31534c1e", "description": "Implement a function `detect_loose_lists` that uses the `mistune` library to parse Markdown text and analyze its AST str" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords":...
{ "difficulty": "medium", "category": "feature", "keywords": [ "mistune", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "lepture/mistune", "ref": "bf54ef67390e02a5cdee7495d4386d7770c1902b", "reference": "https://github.com/leptur...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_31534c1e16.py" ]
tasks/lepture__mistune-cinst-31534c1e
local/mahmoud__glom-cinst-2dd76837
Implement a class `ContactGlomHandler` that transforms raw contact data using the `glom` library. You **must** use `glom.Coalesce` to safely access nested attributes like `primary_email.email`, handling `None` values gracefully. The `transform` method should accept a contact object and return a dict with `display_name`...
Implement a class `ContactGlomHandler` that transforms raw contact data using the `glom` library. You **must** use `glom
[]
{ "version": "1.0", "task": { "name": "local/mahmoud__glom-cinst-2dd76837", "description": "Implement a class `ContactGlomHandler` that transforms raw contact data using the `glom` library. You **must** use `glom" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [ ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "glom", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "mahmoud/glom", "ref": "fb3c4e76f28816aebfd2538980e617742e98a7c2", "reference": "https://github.com/mahmoud/glom...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_2dd7683742.py" ]
tasks/mahmoud__glom-cinst-2dd76837
local/mahmoud__glom-cinst-c2d46e09
Implement a function called `deep_assign` that uses `glom` to deep-assign a value to a nested dictionary path, automatically creating missing intermediate structures. The function must employ `glom`'s `assign()` function to handle path traversal and creation. Requirements: 1. Use `glom`'s `assign()` function to deep-s...
Implement a function called `deep_assign` that uses `glom` to deep-assign a value to a nested dictionary path, automatic
[]
{ "version": "1.0", "task": { "name": "local/mahmoud__glom-cinst-c2d46e09", "description": "Implement a function called `deep_assign` that uses `glom` to deep-assign a value to a nested dictionary path, automatic" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [ ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "glom", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "mahmoud/glom", "ref": "fb3c4e76f28816aebfd2538980e617742e98a7c2", "reference": "https://github.com/mahmoud/glom...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_c2d46e09ab.py" ]
tasks/mahmoud__glom-cinst-c2d46e09
local/marshmallow-code__apispec-cinst-0196c9b5
Create a `CustomAPISpec` class that extends `apispec.APISpec` to provide an OpenAPI specification object with convenient access to the generated spec dictionary. The class must accept `title` and `version` arguments in its constructor and raise `ValueError` if `title` is empty. It must expose a `spec` property that ret...
Create a `CustomAPISpec` class that extends `apispec.APISpec` to provide an OpenAPI specification object with convenient
[]
{ "version": "1.0", "task": { "name": "local/marshmallow-code__apispec-cinst-0196c9b5", "description": "Create a `CustomAPISpec` class that extends `apispec.APISpec` to provide an OpenAPI specification object with convenient" }, "metadata": { "difficulty": "medium", "category": "feature", "k...
{ "difficulty": "medium", "category": "feature", "keywords": [ "apispec", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "marshmallow-code/apispec", "ref": "8b421526ea1015046de42599dd93da6a3473fe44", "reference": "https://github.c...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_0196c9b5e9.py" ]
tasks/marshmallow-code__apispec-cinst-0196c9b5
local/marshmallow-code__marshmallow-cinst-87075a44
Create a `UserAddressSchema` class that validates and transforms address data using `marshmallow`'s Schema and field classes. The schema must: 1. Accept email and address fields with validation 2. Convert email addresses to lowercase on load 3. Add a computed `is_valid` field after processing 4. Validate that emails co...
Create a `UserAddressSchema` class that validates and transforms address data using `marshmallow`'s Schema and field cla
[]
{ "version": "1.0", "task": { "name": "local/marshmallow-code__marshmallow-cinst-87075a44", "description": "Create a `UserAddressSchema` class that validates and transforms address data using `marshmallow`'s Schema and field cla" }, "metadata": { "difficulty": "medium", "category": "feature", ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "marshmallow", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "marshmallow-code/marshmallow", "ref": "9716fc629976c9d3ce30cd15d270d9ac235eb725", "reference": "https://...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_87075a4457.py" ]
tasks/marshmallow-code__marshmallow-cinst-87075a44
local/marshmallow-code__marshmallow-cinst-d44fe915
Create a `task_module.py` that defines a `UserNormalizer` class using `marshmallow` to validate and transform user data. The class must use marshmallow's `Schema`, field types (`Str`, `Integer`), and validation decorators (`@post_load`, `@validates_schema`, `@validates`). Requirements: - Email field: required, must be ...
Create a `task_module.py` that defines a `UserNormalizer` class using `marshmallow` to validate and transform user data.
[]
{ "version": "1.0", "task": { "name": "local/marshmallow-code__marshmallow-cinst-d44fe915", "description": "Create a `task_module.py` that defines a `UserNormalizer` class using `marshmallow` to validate and transform user data." }, "metadata": { "difficulty": "medium", "category": "feature", ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "marshmallow", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "marshmallow-code/marshmallow", "ref": "9716fc629976c9d3ce30cd15d270d9ac235eb725", "reference": "https://...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_d44fe9154e.py" ]
tasks/marshmallow-code__marshmallow-cinst-d44fe915
local/mido__mido-cinst-077e8a1a
Implement a `MidiTrafficAnalyzer` class that analyzes MIDI message statistics from `mido.Message` objects. The analyzer must: - Accept `mido.Message` objects and track message type counts (note_on, note_off, program_change, clock) - Store time values (delta time) from each message - Track which MIDI channels are activ...
Implement a `MidiTrafficAnalyzer` class that analyzes MIDI message statistics from `mido.Message` objects. The analyzer
[]
{ "version": "1.0", "task": { "name": "local/mido__mido-cinst-077e8a1a", "description": "Implement a `MidiTrafficAnalyzer` class that analyzes MIDI message statistics from `mido.Message` objects. The analyzer " }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [ ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "mido", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "mido/mido", "ref": "a0158ff95a08f9a4eef628a2e7c793fd3a466640", "reference": "https://github.com/mido/mido/blob/...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_077e8a1a29.py" ]
tasks/mido__mido-cinst-077e8a1a
local/mido__mido-cinst-b2628654
Implement a class `MidiAnalyzer` that processes a `mido.MidiFile` object to analyze Note On events. The solver must use `mido.Message` attributes (`type`, `note`, `velocity`) and iterate over `midifile.tracks` to extract statistics. The class must have a method `analyze(self, midifile)` that returns a dictionary with ...
Implement a class `MidiAnalyzer` that processes a `mido.MidiFile` object to analyze Note On events. The solver must use
[]
{ "version": "1.0", "task": { "name": "local/mido__mido-cinst-b2628654", "description": "Implement a class `MidiAnalyzer` that processes a `mido.MidiFile` object to analyze Note On events. The solver must use " }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [ ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "mido", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "mido/mido", "ref": "a0158ff95a08f9a4eef628a2e7c793fd3a466640", "reference": "https://github.com/mido/mido/blob/...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_b2628654fa.py" ]
tasks/mido__mido-cinst-b2628654
local/mozilla__bleach-cinst-11e3bfbc
Implement a class `SafeHTMLProcessor` that extends `bleach.sanitizer.Cleaner`. In your subclass constructor, pass `tags=['p', 'strong', 'em']`, `attributes=['class', 'id']`, and `strip_comments=True`. Add a custom validation method `validate(html: str) -> None` that raises `ValueError` if the input string contains the ...
Implement a class `SafeHTMLProcessor` that extends `bleach.sanitizer.Cleaner`. In your subclass constructor, pass `tags=
[]
{ "version": "1.0", "task": { "name": "local/mozilla__bleach-cinst-11e3bfbc", "description": "Implement a class `SafeHTMLProcessor` that extends `bleach.sanitizer.Cleaner`. In your subclass constructor, pass `tags=" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "bleach", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "mozilla/bleach", "ref": "73871d766de1e33a296eeb4f9faf2451f28bee39", "reference": "https://github.com/mozilla/...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_11e3bfbc54.py" ]
tasks/mozilla__bleach-cinst-11e3bfbc
local/mozilla__bleach-cinst-da8b79a3
Write a Python module that sanitizes user-supplied HTML using the `bleach` library. The module must use `bleach.clean()` with a custom tag whitelist to remove dangerous tags like `<script>`, `<iframe>`, and `<body>` entirely. Your task is to create a function `sanitize_html_input()` that accepts HTML string input and r...
Write a Python module that sanitizes user-supplied HTML using the `bleach` library. The module must use `bleach.clean()`
[]
{ "version": "1.0", "task": { "name": "local/mozilla__bleach-cinst-da8b79a3", "description": "Write a Python module that sanitizes user-supplied HTML using the `bleach` library. The module must use `bleach.clean()`" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "bleach", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "mozilla/bleach", "ref": "73871d766de1e33a296eeb4f9faf2451f28bee39", "reference": "https://github.com/mozilla/...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_da8b79a3f5.py" ]
tasks/mozilla__bleach-cinst-da8b79a3
local/oauthlib__oauthlib-cinst-a6e70567
Implement a utility class named `OAuthUrlGenerator` that leverages `oauthlib` to construct OAuth 2.0 implicit grant authorization URIs. You must instantiate `oauthlib.oauth2.rfc6749.clients.mobile_application.MobileApplicationClient` to utilize its `prepare_request_uri` method for RFC 6749 compliant URI generation. Yo...
Implement a utility class named `OAuthUrlGenerator` that leverages `oauthlib` to construct OAuth 2.0 implicit grant auth
[]
{ "version": "1.0", "task": { "name": "local/oauthlib__oauthlib-cinst-a6e70567", "description": "Implement a utility class named `OAuthUrlGenerator` that leverages `oauthlib` to construct OAuth 2.0 implicit grant auth" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords...
{ "difficulty": "medium", "category": "feature", "keywords": [ "oauthlib", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "oauthlib/oauthlib", "ref": "1fd5253630c03e3f12719dd8c13d43111f66a8d2", "reference": "https://github.com/oau...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_a6e70567a7.py" ]
tasks/oauthlib__oauthlib-cinst-a6e70567
local/oauthlib__oauthlib-cinst-f0c5fee9
Build a custom OAuth 2.0 token validation client that extends `oauthlib`'s `Client` class. Your `OAuth2TokenValidator` class must subclass `oauthlib.oauth2.rfc6749.clients.Client` and implement custom token parsing that validates token strings matching a specific format. The validator must accept a token string as inpu...
Build a custom OAuth 2.0 token validation client that extends `oauthlib`'s `Client` class. Your `OAuth2TokenValidator` c
[]
{ "version": "1.0", "task": { "name": "local/oauthlib__oauthlib-cinst-f0c5fee9", "description": "Build a custom OAuth 2.0 token validation client that extends `oauthlib`'s `Client` class. Your `OAuth2TokenValidator` c" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords...
{ "difficulty": "medium", "category": "feature", "keywords": [ "oauthlib", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "oauthlib/oauthlib", "ref": "1fd5253630c03e3f12719dd8c13d43111f66a8d2", "reference": "https://github.com/oau...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_f0c5fee983.py" ]
tasks/oauthlib__oauthlib-cinst-f0c5fee9
local/pallets__jinja-cinst-37dcaa1f
Create a custom Jinja2 filter called `html_checked_filter` that detects whether a value represents HTML content. Your filter must: 1) Raise `TypeError` if the value is a function, 2) Return `True` if the value has an `__html__` attribute (custom HTML object), 3) Return `True` if the value is a string containing HTML ta...
Create a custom Jinja2 filter called `html_checked_filter` that detects whether a value represents HTML content. Your fi
[]
{ "version": "1.0", "task": { "name": "local/pallets__jinja-cinst-37dcaa1f", "description": "Create a custom Jinja2 filter called `html_checked_filter` that detects whether a value represents HTML content. Your fi" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [...
{ "difficulty": "medium", "category": "feature", "keywords": [ "jinja", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "pallets/jinja", "ref": "ada0a9a6fc265128b46949b5144d2eaa55e6df2c", "reference": "https://github.com/pallets/ji...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_37dcaa1ff2.py" ]
tasks/pallets__jinja-cinst-37dcaa1f
local/pallets__jinja-cinst-6408aca2
Create a custom Jinja2 Extension named `Jinja2TestValidator` that validates values during template rendering. The extension must provide a `validate()` method using `jinja2.tests.test_iterable` to check if a value is iterable. It should raise `jinja2.exceptions.TemplateError` when called without first calling `enable()...
Create a custom Jinja2 Extension named `Jinja2TestValidator` that validates values during template rendering. The extens
[]
{ "version": "1.0", "task": { "name": "local/pallets__jinja-cinst-6408aca2", "description": "Create a custom Jinja2 Extension named `Jinja2TestValidator` that validates values during template rendering. The extens" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [...
{ "difficulty": "medium", "category": "feature", "keywords": [ "jinja", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "pallets/jinja", "ref": "ada0a9a6fc265128b46949b5144d2eaa55e6df2c", "reference": "https://github.com/pallets/ji...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_6408aca255.py" ]
tasks/pallets__jinja-cinst-6408aca2
local/paramiko__paramiko-cinst-12c470a9
Implement a function named `prepare_ssh_client` inside `task_module.py` that configures an SSH connection using the `paramiko` library. The function must accept `host`, `port`, `username`, and `password` as arguments. Instantiate `paramiko.SSHClient`, ensure the missing host key policy is properly configured (the defau...
Implement a function named `prepare_ssh_client` inside `task_module.py` that configures an SSH connection using the `par
[]
{ "version": "1.0", "task": { "name": "local/paramiko__paramiko-cinst-12c470a9", "description": "Implement a function named `prepare_ssh_client` inside `task_module.py` that configures an SSH connection using the `par" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords...
{ "difficulty": "medium", "category": "feature", "keywords": [ "paramiko", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "paramiko/paramiko", "ref": "23f92003898b060df0e2b8b1d889455264e63a3e", "reference": "https://github.com/par...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_12c470a964.py" ]
tasks/paramiko__paramiko-cinst-12c470a9
local/pdfminer__pdfminer.six-cinst-4ea0f172
Implement a function `pdf_word_counter` that extracts text from a PDF file using `pdfminer.high_level.extract_text()` and returns word frequency statistics. You must import and use `extract_text` from `pdfminer.high_level`. The function should split text into words (whitespace-separated), convert to lowercase, and coun...
Implement a function `pdf_word_counter` that extracts text from a PDF file using `pdfminer.high_level.extract_text()` an
[]
{ "version": "1.0", "task": { "name": "local/pdfminer__pdfminer.six-cinst-4ea0f172", "description": "Implement a function `pdf_word_counter` that extracts text from a PDF file using `pdfminer.high_level.extract_text()` an" }, "metadata": { "difficulty": "medium", "category": "feature", "keyw...
{ "difficulty": "medium", "category": "feature", "keywords": [ "pdfminer.six", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "pdfminer/pdfminer.six", "ref": "1a8bd2f730295b31d6165e4d95fcb5a03793c978", "reference": "https://github...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_4ea0f172d2.py" ]
tasks/pdfminer__pdfminer.six-cinst-4ea0f172
local/pdfminer__pdfminer.six-cinst-cd11ac72
Create a `pdftext_analyzer` module that extracts and analyzes text from PDF files using `pdfminer`. Implement a function `analyze_pdf_text(filepath: str) -> dict` that: (1) extracts raw text from a PDF file using `pdfminer.high_level.extract_text`, (2) counts words and lines, (3) identifies all unique words starting wi...
Create a `pdftext_analyzer` module that extracts and analyzes text from PDF files using `pdfminer`. Implement a function
[]
{ "version": "1.0", "task": { "name": "local/pdfminer__pdfminer.six-cinst-cd11ac72", "description": "Create a `pdftext_analyzer` module that extracts and analyzes text from PDF files using `pdfminer`. Implement a function" }, "metadata": { "difficulty": "medium", "category": "feature", "keyw...
{ "difficulty": "medium", "category": "feature", "keywords": [ "pdfminer.six", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "pdfminer/pdfminer.six", "ref": "1a8bd2f730295b31d6165e4d95fcb5a03793c978", "reference": "https://github...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_cd11ac720d.py" ]
tasks/pdfminer__pdfminer.six-cinst-cd11ac72
local/pyasn1__pyasn1-cinst-18cc16ce
Implement a custom DER encoder for ASN.1 `Set` types that reverses the sort order of components compared to `pyasn1`'s default behavior. You must subclass `pyasn1.codec.der.encoder.SetEncoder` and override `_componentSortKey` to return the negative of the tag value. Write a function `encode_reversed_set` that takes a `...
Implement a custom DER encoder for ASN.1 `Set` types that reverses the sort order of components compared to `pyasn1`'s d
[]
{ "version": "1.0", "task": { "name": "local/pyasn1__pyasn1-cinst-18cc16ce", "description": "Implement a custom DER encoder for ASN.1 `Set` types that reverses the sort order of components compared to `pyasn1`'s d" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [...
{ "difficulty": "medium", "category": "feature", "keywords": [ "pyasn1", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "pyasn1/pyasn1", "ref": "0f07d7242a78ab4d129b26256d7474f7168cf536", "reference": "https://github.com/pyasn1/py...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_18cc16ce17.py" ]
tasks/pyasn1__pyasn1-cinst-18cc16ce
local/pyasn1__pyasn1-cinst-660904f4
Implement a custom ASN.1 time validation class named `CertTimeValidator` that extends `pyasn1.type.useful.GeneralizedTime`. This class must enforce a non-negative security `cert_level` on certificate timestamps. It must inherit all `pyasn1` time functionality (e.g., `asDateTime`, `fromDateTime`, `typeId`, `tagSet`) and...
Implement a custom ASN.1 time validation class named `CertTimeValidator` that extends `pyasn1.type.useful.GeneralizedTim
[]
{ "version": "1.0", "task": { "name": "local/pyasn1__pyasn1-cinst-660904f4", "description": "Implement a custom ASN.1 time validation class named `CertTimeValidator` that extends `pyasn1.type.useful.GeneralizedTim" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [...
{ "difficulty": "medium", "category": "feature", "keywords": [ "pyasn1", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "pyasn1/pyasn1", "ref": "0f07d7242a78ab4d129b26256d7474f7168cf536", "reference": "https://github.com/pyasn1/py...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_660904f4ea.py" ]
tasks/pyasn1__pyasn1-cinst-660904f4
local/pydicom__pydicom-cinst-5aff2086
Implement a function `generate_patient_record(name: str)` that constructs a DICOM dataset. It must instantiate a `pydicom` `Dataset`, assign the provided name to the `PatientName` attribute, and explicitly invoke the `.decode()` method to ensure character encoding compliance. Return the populated `Dataset`. If `name` i...
Implement a function `generate_patient_record(name: str)` that constructs a DICOM dataset. It must instantiate a `pydico
[]
{ "version": "1.0", "task": { "name": "local/pydicom__pydicom-cinst-5aff2086", "description": "Implement a function `generate_patient_record(name: str)` that constructs a DICOM dataset. It must instantiate a `pydico" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords":...
{ "difficulty": "medium", "category": "feature", "keywords": [ "pydicom", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "pydicom/pydicom", "ref": "7d361b3d764dbbb1f8ad7af015e80ce96f6bf286", "reference": "https://github.com/pydico...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_5aff20863f.py" ]
tasks/pydicom__pydicom-cinst-5aff2086
local/pygments__pygments-cinst-e08f9c27
Implement a class `CodeAnalyzer` with a method `count_docstrings(source)`. This utility must analyze Python code using the `pygments` library. Specifically, use `pygments` to tokenize the input string and count how many tokens are of type `pygments.token.String.Doc` (representing docstrings). Do not use regular express...
Implement a class `CodeAnalyzer` with a method `count_docstrings(source)`. This utility must analyze Python code using t
[]
{ "version": "1.0", "task": { "name": "local/pygments__pygments-cinst-e08f9c27", "description": "Implement a class `CodeAnalyzer` with a method `count_docstrings(source)`. This utility must analyze Python code using t" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords...
{ "difficulty": "medium", "category": "feature", "keywords": [ "pygments", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "pygments/pygments", "ref": "27649ebbf5a2519725036b48ec99ef7745f100af", "reference": "https://github.com/pyg...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_e08f9c27b7.py" ]
tasks/pygments__pygments-cinst-e08f9c27
local/pylint-dev__astroid-cinst-35ef143c
Implement a function `count_class_inferred_attrs(code)` that leverages `astroid` to analyze Python source strings. You must parse the code using `astroid.parse()`, traverse the resulting module for all `Attribute` nodes (imports, method calls, etc.), and invoke `node.infer()` to resolve types. If the inference of an `A...
Implement a function `count_class_inferred_attrs(code)` that leverages `astroid` to analyze Python source strings. You m
[]
{ "version": "1.0", "task": { "name": "local/pylint-dev__astroid-cinst-35ef143c", "description": "Implement a function `count_class_inferred_attrs(code)` that leverages `astroid` to analyze Python source strings. You m" }, "metadata": { "difficulty": "medium", "category": "feature", "keyword...
{ "difficulty": "medium", "category": "feature", "keywords": [ "astroid", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "pylint-dev/astroid", "ref": "b114f6b58e749b8ab47f80490dce73ea80d8015f", "reference": "https://github.com/pyl...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_35ef143c4f.py" ]
tasks/pylint-dev__astroid-cinst-35ef143c
local/pylint-dev__astroid-cinst-d81eaa22
Implement a utility function `analyze_call_sites` that examines call site inference from a parsed code snippet using `astroid`. The function must: (1) parse code using `astroid.parse()`, (2) traverse nodes to find `astroid.Call` nodes, (3) infer the callee using the callee's `infer()` method, and (4) return a dictionar...
Implement a utility function `analyze_call_sites` that examines call site inference from a parsed code snippet using `as
[]
{ "version": "1.0", "task": { "name": "local/pylint-dev__astroid-cinst-d81eaa22", "description": "Implement a utility function `analyze_call_sites` that examines call site inference from a parsed code snippet using `as" }, "metadata": { "difficulty": "medium", "category": "feature", "keyword...
{ "difficulty": "medium", "category": "feature", "keywords": [ "astroid", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "pylint-dev/astroid", "ref": "b114f6b58e749b8ab47f80490dce73ea80d8015f", "reference": "https://github.com/pyl...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_d81eaa2231.py" ]
tasks/pylint-dev__astroid-cinst-d81eaa22
local/pyparsing__pyparsing-cinst-46d9cdb3
Implement a `LogLineParser` class that parses log lines in the format `LEVEL:MESSAGE` using `pyparsing` primitives. LEVEL must be exactly `INFO`, `WARN`, or `ERROR`. MESSAGE can be any string. You must use `pyparsing`'s Parser combinators like `Literal`, `Regex`, and the `|` operator to build the grammar. The parser mu...
Implement a `LogLineParser` class that parses log lines in the format `LEVEL:MESSAGE` using `pyparsing` primitives. LEVE
[]
{ "version": "1.0", "task": { "name": "local/pyparsing__pyparsing-cinst-46d9cdb3", "description": "Implement a `LogLineParser` class that parses log lines in the format `LEVEL:MESSAGE` using `pyparsing` primitives. LEVE" }, "metadata": { "difficulty": "medium", "category": "feature", "keywor...
{ "difficulty": "medium", "category": "feature", "keywords": [ "pyparsing", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "pyparsing/pyparsing", "ref": "533adf471f85b570006871e60a2e585fcda5b085", "reference": "https://github.com/...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_46d9cdb327.py" ]
tasks/pyparsing__pyparsing-cinst-46d9cdb3
local/python-hyper__h11-cinst-fded6540
Implement a class `H11ErrorReporter` within `task_module` that inspects exceptions from the `h11` library. It must define a static method `analyze_exception(exc: Exception) -> dict`. If the input `exc` is an instance of `h11.ProtocolError` (including subclasses like `LocalProtocolError` or `RemoteProtocolError`), retur...
Implement a class `H11ErrorReporter` within `task_module` that inspects exceptions from the `h11` library. It must defin
[]
{ "version": "1.0", "task": { "name": "local/python-hyper__h11-cinst-fded6540", "description": "Implement a class `H11ErrorReporter` within `task_module` that inspects exceptions from the `h11` library. It must defin" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords"...
{ "difficulty": "medium", "category": "feature", "keywords": [ "h11", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "python-hyper/h11", "ref": "bed0dd4ae9774b962b19833941bb9ec4dc403da9", "reference": "https://github.com/python-hy...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_fded6540fd.py" ]
tasks/python-hyper__h11-cinst-fded6540
local/python-jsonschema__jsonschema-cinst-89316056
Implement a function `filter_json_errors` that validates data against a JSON schema using the `jsonschema` library. The function must return only validation errors where the `validator` attribute of the error matches a provided set of critical keywords (e.g., 'type', 'required'). You must utilize `jsonschema.Draft7Vali...
Implement a function `filter_json_errors` that validates data against a JSON schema using the `jsonschema` library. The
[]
{ "version": "1.0", "task": { "name": "local/python-jsonschema__jsonschema-cinst-89316056", "description": "Implement a function `filter_json_errors` that validates data against a JSON schema using the `jsonschema` library. The " }, "metadata": { "difficulty": "medium", "category": "feature", ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "jsonschema", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "python-jsonschema/jsonschema", "ref": "93e0caa5752947ec77333da81a634afe41a022ed", "reference": "https://g...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_8931605680.py" ]
tasks/python-jsonschema__jsonschema-cinst-89316056
local/python-jsonschema__jsonschema-cinst-fb57b8c9
Build `SchemaErrorAggregator` in `task_module.py` that wraps `jsonschema`'s validator to collect and aggregate validation errors into a summary structure. The class must: - Accept a schema and data instance - Use `jsonschema`'s `Draft7Validator` to validate - Extract all `ValidationError` objects from the validation tr...
Build `SchemaErrorAggregator` in `task_module.py` that wraps `jsonschema`'s validator to collect and aggregate validatio
[]
{ "version": "1.0", "task": { "name": "local/python-jsonschema__jsonschema-cinst-fb57b8c9", "description": "Build `SchemaErrorAggregator` in `task_module.py` that wraps `jsonschema`'s validator to collect and aggregate validatio" }, "metadata": { "difficulty": "medium", "category": "feature", ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "jsonschema", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "python-jsonschema/jsonschema", "ref": "93e0caa5752947ec77333da81a634afe41a022ed", "reference": "https://g...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_fb57b8c90e.py" ]
tasks/python-jsonschema__jsonschema-cinst-fb57b8c9
local/python-trio__trio-cinst-94ff3c77
Implement a `TrioSignalManager` class that wraps trio's memory channel API for bidirectional async communication. The class must use `trio.open_memory_channel` to create a channel with a configurable buffer size, and provide `send` and `receive` async methods. The `receive` method must wrap the operation in a `trio.Can...
Implement a `TrioSignalManager` class that wraps trio's memory channel API for bidirectional async communication. The cl
[]
{ "version": "1.0", "task": { "name": "local/python-trio__trio-cinst-94ff3c77", "description": "Implement a `TrioSignalManager` class that wraps trio's memory channel API for bidirectional async communication. The cl" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords"...
{ "difficulty": "medium", "category": "feature", "keywords": [ "trio", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "python-trio/trio", "ref": "cfbbe2c1f96e93b19bc2577d2cab3f4fe2e81153", "reference": "https://github.com/python-t...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_94ff3c77b8.py" ]
tasks/python-trio__trio-cinst-94ff3c77
local/python-trio__trio-cinst-a28c0608
Create a `TimeTaskScheduler` that uses trio's `MockClock` to manage time-based task execution. The scheduler must: 1. Initialize with a trio `MockClock` configured with rate of 1.0 and autojump threshold of 1.0 2. Track simulated time and maintain task state as time progresses 3. Execute tasks sequentially based on ti...
Create a `TimeTaskScheduler` that uses trio's `MockClock` to manage time-based task execution. The scheduler must:
[]
{ "version": "1.0", "task": { "name": "local/python-trio__trio-cinst-a28c0608", "description": "Create a `TimeTaskScheduler` that uses trio's `MockClock` to manage time-based task execution. The scheduler must:" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": [ ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "trio", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "python-trio/trio", "ref": "cfbbe2c1f96e93b19bc2577d2cab3f4fe2e81153", "reference": "https://github.com/python-t...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_a28c0608ec.py" ]
tasks/python-trio__trio-cinst-a28c0608
local/scanny__python-pptx-cinst-4a8ae76e
Implement `create_slide_with_title` in `task_module.py` using `pptx` to add a slide with a title textbox to a presentation. You must use `Presentation` and `Shape` classes from `pptx` to create a slide and add a textbox shape. The function must accept a title string, set the textbox text, and return the `Shape` object....
Implement `create_slide_with_title` in `task_module.py` using `pptx` to add a slide with a title textbox to a presentati
[]
{ "version": "1.0", "task": { "name": "local/scanny__python-pptx-cinst-4a8ae76e", "description": "Implement `create_slide_with_title` in `task_module.py` using `pptx` to add a slide with a title textbox to a presentati" }, "metadata": { "difficulty": "medium", "category": "feature", "keyword...
{ "difficulty": "medium", "category": "feature", "keywords": [ "python-pptx", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "scanny/python-pptx", "ref": "278b47b1dedd5b46ee84c286e77cdfb0bf4594be", "reference": "https://github.com...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_4a8ae76e55.py" ]
tasks/scanny__python-pptx-cinst-4a8ae76e
local/seperman__deepdiff-cinst-c23e9891
Design a `DeepValidator` class that leverages the `deepdiff` library to compare complex Python objects. You must implement a method `validate_changes` that accepts `old_data` and `new_data`. Inside this method, instantiate `deepdiff.DeepDiff` to calculate the difference. The `deepdiff` library returns a dictionary-like...
Design a `DeepValidator` class that leverages the `deepdiff` library to compare complex Python objects. You must impleme
[]
{ "version": "1.0", "task": { "name": "local/seperman__deepdiff-cinst-c23e9891", "description": "Design a `DeepValidator` class that leverages the `deepdiff` library to compare complex Python objects. You must impleme" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords...
{ "difficulty": "medium", "category": "feature", "keywords": [ "deepdiff", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "seperman/deepdiff", "ref": "ed2520229d0369813f6e54cdf9c7e68e8073ef62", "reference": "https://github.com/sep...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_c23e98910b.py" ]
tasks/seperman__deepdiff-cinst-c23e9891
local/sqlfluff__sqlfluff-cinst-02eb9a57
Implement a SQL validation function that detects ambiguous use of `DISTINCT` combined with `GROUP BY` in SQL statements using `sqlfluff`'s public Linter API. The function `validate_sql` must take a SQL string and return the count of violations detected by sqlfluff's AM01 rule (the rule for ambiguous DISTINCT/GROUP BY u...
Implement a SQL validation function that detects ambiguous use of `DISTINCT` combined with `GROUP BY` in SQL statements
[]
{ "version": "1.0", "task": { "name": "local/sqlfluff__sqlfluff-cinst-02eb9a57", "description": "Implement a SQL validation function that detects ambiguous use of `DISTINCT` combined with `GROUP BY` in SQL statements " }, "metadata": { "difficulty": "medium", "category": "feature", "keywords...
{ "difficulty": "medium", "category": "feature", "keywords": [ "sqlfluff", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "sqlfluff/sqlfluff", "ref": "50a1c4b6ff171188b6b70b39afe82a707b4919ac", "reference": "https://github.com/sql...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_02eb9a57a9.py" ]
tasks/sqlfluff__sqlfluff-cinst-02eb9a57
local/tkrajina__gpxpy-cinst-7a325670
Implement a class `GpxAnalyzer` with a method `calculate_distance(gpx_string: str) -> float`. You MUST use `gpxpy.parse` to parse the input. Iterate through the returned `gpxpy.GPX` object's tracks (access via `.tracks` list), segments (`TrackSegment`), and points (`GPXTrackPoint`). Calculate cumulative distance using ...
Implement a class `GpxAnalyzer` with a method `calculate_distance(gpx_string: str) -> float`. You MUST use `gpxpy.parse`
[]
{ "version": "1.0", "task": { "name": "local/tkrajina__gpxpy-cinst-7a325670", "description": "Implement a class `GpxAnalyzer` with a method `calculate_distance(gpx_string: str) -> float`. You MUST use `gpxpy.parse`" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords": ...
{ "difficulty": "medium", "category": "feature", "keywords": [ "gpxpy", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "tkrajina/gpxpy", "ref": "09fc46b3cad16b5bf49edf8e7ae873794a959620", "reference": "https://github.com/tkrajina/...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_7a325670e8.py" ]
tasks/tkrajina__gpxpy-cinst-7a325670
local/tobymao__sqlglot-cinst-5b147ea4
Implement a SQL validation module using `sqlglot` to parse and validate SQL statements. You must define a custom exception class `CustomSqlError` that inherits from `sqlglot.errors.SqlglotError`. The function `validate_query` should attempt to parse SQL using `sqlglot.parse_one`. On success, return `{"status": "valid"}...
Implement a SQL validation module using `sqlglot` to parse and validate SQL statements. You must define a custom excepti
[]
{ "version": "1.0", "task": { "name": "local/tobymao__sqlglot-cinst-5b147ea4", "description": "Implement a SQL validation module using `sqlglot` to parse and validate SQL statements. You must define a custom excepti" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords":...
{ "difficulty": "medium", "category": "feature", "keywords": [ "sqlglot", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "tobymao/sqlglot", "ref": "036601ba9cbe4d175d6a9d38bc27587eab858968", "reference": "https://github.com/tobyma...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_5b147ea4fe.py" ]
tasks/tobymao__sqlglot-cinst-5b147ea4
local/tobymao__sqlglot-cinst-8e53b919
Write a Python function `wrap_source_columns` using `sqlglot` to wrap a table in a subquery that selects specific columns. If `columns` is empty, select all columns from the wrapped table. Raise errors for invalid inputs (no alias, parse failure, etc.). Example: `wrap_source_columns("SELECT * FROM users u", ["id", "na...
Write a Python function `wrap_source_columns` using `sqlglot` to wrap a table in a subquery that selects specific column
[]
{ "version": "1.0", "task": { "name": "local/tobymao__sqlglot-cinst-8e53b919", "description": "Write a Python function `wrap_source_columns` using `sqlglot` to wrap a table in a subquery that selects specific column" }, "metadata": { "difficulty": "medium", "category": "feature", "keywords":...
{ "difficulty": "medium", "category": "feature", "keywords": [ "sqlglot", "code_instruct" ], "repo2env": { "pipeline": "code_instruct", "pipeline_version": "0.6.2", "repo": "tobymao/sqlglot", "ref": "036601ba9cbe4d175d6a9d38bc27587eab858968", "reference": "https://github.com/tobyma...
[ "environment/Dockerfile", "instruction.md", "solution/patch.diff", "solution/solve.sh", "task.toml", "tests/test.sh", "tests/test_r2e_8e53b91940.py" ]
tasks/tobymao__sqlglot-cinst-8e53b919