Dataset Viewer
Auto-converted to Parquet Duplicate
id
int64
0
401
project
stringclasses
23 values
module
stringlengths
9
38
entry_point
stringlengths
2
33
solution
stringlengths
94
5.46k
target_function_prompt
stringlengths
55
2.35k
function_signature
stringlengths
11
364
docstring
stringlengths
14
2.1k
original_docstring
stringlengths
20
2.11k
docstring_tokens
sequencelengths
3
488
cross_context
bool
2 classes
isContained
bool
2 classes
raw_solution
stringlengths
94
5.46k
check
stringlengths
1.92k
103k
test_list
sequencelengths
1
604
coverage
float64
40
100
prompt
stringlengths
303
194k
anchor_name
stringlengths
17
65
anchor_text
dict
dependencies
dict
import_statements
sequencelengths
0
46
top
listlengths
0
10
0
test-apps/python-string-utils
string_utils.manipulation
reverse
"def reverse(input_string: str) -> str:\n \"\"\"\n Returns the string with its chars reversed.(...TRUNCATED)
"def reverse(input_string: str) -> str:\n \"\"\"\n Returns the string with its chars reversed.(...TRUNCATED)
def reverse(input_string: str) -> str:
"\nReturns the string with its chars reversed.\n\n*Example:*\n\n>>> reverse('hello') # returns 'olle(...TRUNCATED)
"\"\"\"\nReturns the string with its chars reversed.\n\n*Example:*\n\n>>> reverse('hello') # returns(...TRUNCATED)
["Returns","the","string","with","its","chars","reversed",".","*","Example",":","*",">>>","reverse",(...TRUNCATED)
true
false
"def reverse(input_string: str) -> str:\n \"\"\"\n Returns the string with its chars reversed.(...TRUNCATED)
"\nimport sys\nsys.path.insert(1, \"/input/test-apps/python-string-utils\")\nimport unittest, pytest(...TRUNCATED)
["def test_0():\n assert reverse(\"mystring\") == \"gnirtsym\"","def test_1():\n assert revers(...TRUNCATED)
100
"You are a Python programmer working with a repository. Here is all the context you may find useful (...TRUNCATED)
reverse@string_utils/manipulation.py
{"description":"\nReturns the string with its chars reversed.\n\n*Example:*\n\n>>> reverse('hello') (...TRUNCATED)
{"negative":{"classes":[{"base_classes":[],"code":"class __RomanNumbers:\n # internal rule mappin(...TRUNCATED)
["from ._regex import *","from .errors import InvalidInputError","from .validation import is_camel_c(...TRUNCATED)
[{"content":["def decompress(input_string: str, encoding: str = 'utf-8') -> str:\n \"\"\"\n Re(...TRUNCATED)
1
test-apps/python-string-utils
string_utils.manipulation
camel_case_to_snake
"def camel_case_to_snake(input_string, separator='_'):\n \"\"\"\n Convert a camel case string (...TRUNCATED)
"def camel_case_to_snake(input_string, separator='_'):\n \"\"\"\n Convert a camel case string (...TRUNCATED)
def camel_case_to_snake(input_string, separator='_'):
"\nConvert a camel case string into a snake case one.\n(The original string is returned if is not a (...TRUNCATED)
"\"\"\"\nConvert a camel case string into a snake case one.\n(The original string is returned if is (...TRUNCATED)
["Convert","a","camel","case","string","into","a","snake","case","one",".","(","The","original","str(...TRUNCATED)
true
false
"def camel_case_to_snake(input_string, separator='_'):\n \"\"\"\n Convert a camel case string (...TRUNCATED)
"\nimport sys\nsys.path.insert(1, \"/input/test-apps/python-string-utils\")\nimport unittest, pytest(...TRUNCATED)
["def test_0():\n assert camel_case_to_snake(\"MySuperCamelCaseString\") == \"my_super_camel_case(...TRUNCATED)
100
"You are a Python programmer working with a repository. Here is all the context you may find useful (...TRUNCATED)
camel_case_to_snake@string_utils/manipulation.py
{"description":"\nConvert a camel case string into a snake case one.\n(The original string is return(...TRUNCATED)
{"negative":{"classes":[{"base_classes":[],"code":"class __RomanNumbers:\n # internal rule mappin(...TRUNCATED)
["from ._regex import *","from .errors import InvalidInputError","from .validation import is_camel_c(...TRUNCATED)
[{"content":["def snake_case_to_camel(input_string: str, upper_case_first: bool = True, separator: s(...TRUNCATED)
2
test-apps/python-string-utils
string_utils.manipulation
snake_case_to_camel
"def snake_case_to_camel(input_string: str, upper_case_first: bool = True, separator: str = '_') -> (...TRUNCATED)
"def snake_case_to_camel(input_string: str, upper_case_first: bool = True, separator: str = '_') -> (...TRUNCATED)
"def snake_case_to_camel(input_string: str, upper_case_first: bool = True, separator: str = '_') -> (...TRUNCATED)
"\nConvert a snake case string into a camel case one.\n(The original string is returned if is not a (...TRUNCATED)
"\"\"\"\nConvert a snake case string into a camel case one.\n(The original string is returned if is (...TRUNCATED)
["Convert","a","snake","case","string","into","a","camel","case","one",".","(","The","original","str(...TRUNCATED)
true
false
"def snake_case_to_camel(input_string: str, upper_case_first: bool = True, separator: str = '_') -> (...TRUNCATED)
"\nimport sys\nsys.path.insert(1, \"/input/test-apps/python-string-utils\")\nimport unittest, pytest(...TRUNCATED)
["def test_0():\n assert snake_case_to_camel('foo_bar_baz_1') == 'FooBarBaz1'","def test_1():\n (...TRUNCATED)
100
"You are a Python programmer working with a repository. Here is all the context you may find useful (...TRUNCATED)
snake_case_to_camel@string_utils/manipulation.py
{"description":"\nConvert a snake case string into a camel case one.\n(The original string is return(...TRUNCATED)
{"negative":{"classes":[{"base_classes":[],"code":"class __RomanNumbers:\n # internal rule mappin(...TRUNCATED)
["from ._regex import *","from .errors import InvalidInputError","from .validation import is_camel_c(...TRUNCATED)
[{"content":["def camel_case_to_snake(input_string, separator='_'):\n \"\"\"\n Convert a camel(...TRUNCATED)
4
test-apps/python-string-utils
string_utils.manipulation
strip_html
"def strip_html(input_string: str, keep_tag_content: bool = False) -> str:\n \"\"\"\n Remove h(...TRUNCATED)
"def strip_html(input_string: str, keep_tag_content: bool = False) -> str:\n \"\"\"\n Remove h(...TRUNCATED)
def strip_html(input_string: str, keep_tag_content: bool = False) -> str:
"\nRemove html code contained into the given string.\n\n*Examples:*\n\n>>> strip_html('test: <a href(...TRUNCATED)
"\"\"\"\nRemove html code contained into the given string.\n\n*Examples:*\n\n>>> strip_html('test: <(...TRUNCATED)
["Remove","html","code","contained","into","the","given","string",".","*","Examples",":","*",">>>","(...TRUNCATED)
true
false
"def strip_html(input_string: str, keep_tag_content: bool = False) -> str:\n \"\"\"\n Remove h(...TRUNCATED)
"\nimport sys\nsys.path.insert(1, \"/input/test-apps/python-string-utils\")\nimport unittest, pytest(...TRUNCATED)
["def test_1():\n assert is_string(strip_html('<a href=\"foo/bar\"></a>'))","def test_3():\n a(...TRUNCATED)
100
"You are a Python programmer working with a repository. Here is all the context you may find useful (...TRUNCATED)
strip_html@string_utils/manipulation.py
{"description":"\nRemove html code contained into the given string.\n\n*Examples:*\n\n>>> strip_html(...TRUNCATED)
{"negative":{"classes":[{"base_classes":[],"code":"class __RomanNumbers:\n # internal rule mappin(...TRUNCATED)
["from ._regex import *","from .errors import InvalidInputError","from .validation import is_camel_c(...TRUNCATED)
[{"content":["def slugify(input_string: str, separator: str = '-') -> str:\n \"\"\"\n Converts(...TRUNCATED)
5
test-apps/python-string-utils
string_utils.manipulation
prettify
"def prettify(input_string: str) -> str:\n \"\"\"\n Reformat a string by applying the followin(...TRUNCATED)
"def prettify(input_string: str) -> str:\n \"\"\"\n Reformat a string by applying the followin(...TRUNCATED)
def prettify(input_string: str) -> str:
"\nReformat a string by applying the following basic grammar and formatting rules:\n\n- String canno(...TRUNCATED)
"\"\"\"\nReformat a string by applying the following basic grammar and formatting rules:\n\n- String(...TRUNCATED)
["Reformat","a","string","by","applying","the","following","basic","grammar","and","formatting","rul(...TRUNCATED)
false
false
"def prettify(input_string: str) -> str:\n \"\"\"\n Reformat a string by applying the followin(...TRUNCATED)
"\nimport sys\nsys.path.insert(1, \"/input/test-apps/python-string-utils\")\nimport unittest, pytest(...TRUNCATED)
["def test_1():\n assert prettify(\"unprettified string,, like this one, will be\\\"prettified\\\(...TRUNCATED)
100
"You are a Python programmer working with a repository. Here is all the context you may find useful (...TRUNCATED)
prettify@string_utils/manipulation.py
{"description":"\nReformat a string by applying the following basic grammar and formatting rules:\n\(...TRUNCATED)
{"negative":{"classes":[{"base_classes":["TypeError"],"code":"class InvalidInputError(TypeError):\n (...TRUNCATED)
["from ._regex import *","from .errors import InvalidInputError","from .validation import is_camel_c(...TRUNCATED)
[{"content":["def strip_margin(input_string: str) -> str:\n \"\"\"\n Removes tab indentation f(...TRUNCATED)
6
test-apps/python-string-utils
string_utils.manipulation
asciify
"def asciify(input_string: str) -> str:\n \"\"\"\n Force string content to be ascii-only by tr(...TRUNCATED)
"def asciify(input_string: str) -> str:\n \"\"\"\n Force string content to be ascii-only by tr(...TRUNCATED)
def asciify(input_string: str) -> str:
"\nForce string content to be ascii-only by translating all non-ascii chars into the closest possibl(...TRUNCATED)
"\"\"\"\nForce string content to be ascii-only by translating all non-ascii chars into the closest p(...TRUNCATED)
["Force","string","content","to","be","ascii","-","only","by","translating","all","non","-","ascii",(...TRUNCATED)
true
true
"def asciify(input_string: str) -> str:\n \"\"\"\n Force string content to be ascii-only by tr(...TRUNCATED)
"\nimport sys\nsys.path.insert(1, \"/input/test-apps/python-string-utils\")\nimport unittest, pytest(...TRUNCATED)
["def test_1():\n assert not is_string(asciify('ààèèòòùù').encode('utf-8'))","def test_4((...TRUNCATED)
83.333333
"You are a Python programmer working with a repository. Here is all the context you may find useful (...TRUNCATED)
asciify@string_utils/manipulation.py
{"description":"\nForce string content to be ascii-only by translating all non-ascii chars into the (...TRUNCATED)
{"negative":{"classes":[{"base_classes":[],"code":"class __RomanNumbers:\n # internal rule mappin(...TRUNCATED)
["from ._regex import *","from .errors import InvalidInputError","from .validation import is_camel_c(...TRUNCATED)
[{"content":["def roman_encode(input_number: Union[str, int]) -> str:\n \"\"\"\n Convert the g(...TRUNCATED)
7
test-apps/python-string-utils
string_utils.manipulation
slugify
"def slugify(input_string: str, separator: str = '-') -> str:\n \"\"\"\n Converts a string int(...TRUNCATED)
"def slugify(input_string: str, separator: str = '-') -> str:\n \"\"\"\n Converts a string int(...TRUNCATED)
def slugify(input_string: str, separator: str = '-') -> str:
"\nConverts a string into a \"slug\" using provided separator.\nThe returned string has the followin(...TRUNCATED)
"\"\"\"\nConverts a string into a \"slug\" using provided separator.\nThe returned string has the fo(...TRUNCATED)
["Converts","a","string","into","a","\"","slug","\"","using","provided","separator",".","The","retur(...TRUNCATED)
true
false
"def slugify(input_string: str, separator: str = '-') -> str:\n \"\"\"\n Converts a string int(...TRUNCATED)
"\nimport sys\nsys.path.insert(1, \"/input/test-apps/python-string-utils\")\nimport unittest, pytest(...TRUNCATED)
["def test_2():\n assert slugify('This is another test') == 'this-is-another-test'","def test_3()(...TRUNCATED)
83.333333
"You are a Python programmer working with a repository. Here is all the context you may find useful (...TRUNCATED)
slugify@string_utils/manipulation.py
{"description":"\nConverts a string into a \"slug\" using provided separator.\nThe returned string h(...TRUNCATED)
{"negative":{"classes":[{"base_classes":[],"code":"class __RomanNumbers:\n # internal rule mappin(...TRUNCATED)
["from ._regex import *","from .errors import InvalidInputError","from .validation import is_camel_c(...TRUNCATED)
[{"content":["def camel_case_to_snake(input_string, separator='_'):\n \"\"\"\n Convert a camel(...TRUNCATED)
8
test-apps/python-string-utils
string_utils.manipulation
booleanize
"def booleanize(input_string: str) -> bool:\n \"\"\"\n Turns a string into a boolean based on (...TRUNCATED)
"def booleanize(input_string: str) -> bool:\n \"\"\"\n Turns a string into a boolean based on (...TRUNCATED)
def booleanize(input_string: str) -> bool:
"\nTurns a string into a boolean based on its content (CASE INSENSITIVE).\n\nA positive boolean (Tru(...TRUNCATED)
"\"\"\"\nTurns a string into a boolean based on its content (CASE INSENSITIVE).\n\nA positive boolea(...TRUNCATED)
["Turns","a","string","into","a","boolean","based","on","its","content","(","CASE","INSENSITIVE",")"(...TRUNCATED)
true
false
"def booleanize(input_string: str) -> bool:\n \"\"\"\n Turns a string into a boolean based on (...TRUNCATED)
"\nimport sys\nsys.path.insert(1, \"/input/test-apps/python-string-utils\")\nimport unittest, pytest(...TRUNCATED)
["def test_0():\n assert booleanize('n') == False","def test_1():\n assert isinstance(booleani(...TRUNCATED)
100
"You are a Python programmer working with a repository. Here is all the context you may find useful (...TRUNCATED)
booleanize@string_utils/manipulation.py
{"description":"\nTurns a string into a boolean based on its content (CASE INSENSITIVE).\n\nA positi(...TRUNCATED)
{"negative":{"classes":[{"base_classes":[],"code":"class __RomanNumbers:\n # internal rule mappin(...TRUNCATED)
["from ._regex import *","from .errors import InvalidInputError","from .validation import is_camel_c(...TRUNCATED)
[{"content":["def is_integer(input_string: str) -> bool:\n \"\"\"\n Checks whether the given s(...TRUNCATED)
9
test-apps/python-string-utils
string_utils.manipulation
strip_margin
"def strip_margin(input_string: str) -> str:\n \"\"\"\n Removes tab indentation from multi lin(...TRUNCATED)
"def strip_margin(input_string: str) -> str:\n \"\"\"\n Removes tab indentation from multi lin(...TRUNCATED)
def strip_margin(input_string: str) -> str:
"\nRemoves tab indentation from multi line strings (inspired by analogous Scala function).\n\n*Examp(...TRUNCATED)
"\"\"\"\nRemoves tab indentation from multi line strings (inspired by analogous Scala function).\n\n(...TRUNCATED)
["Removes","tab","indentation","from","multi","line","strings","(","inspired","by","analogous","Scal(...TRUNCATED)
true
false
"def strip_margin(input_string: str) -> str:\n \"\"\"\n Removes tab indentation from multi lin(...TRUNCATED)
"\nimport sys\nsys.path.insert(1, \"/input/test-apps/python-string-utils\")\nimport unittest, pytest(...TRUNCATED)
["def test_0():\n assert strip_margin('''\n line 1\n line 2(...TRUNCATED)
83.333333
"You are a Python programmer working with a repository. Here is all the context you may find useful (...TRUNCATED)
strip_margin@string_utils/manipulation.py
{"description":"\nRemoves tab indentation from multi line strings (inspired by analogous Scala funct(...TRUNCATED)
{"negative":{"classes":[{"base_classes":[],"code":"class __RomanNumbers:\n # internal rule mappin(...TRUNCATED)
["from ._regex import *","from .errors import InvalidInputError","from .validation import is_camel_c(...TRUNCATED)
[{"content":["def prettify(input_string: str) -> str:\n \"\"\"\n Reformat a string by applying(...TRUNCATED)
10
test-apps/python-string-utils
string_utils.manipulation
decompress
"def decompress(input_string: str, encoding: str = 'utf-8') -> str:\n \"\"\"\n Restore a previ(...TRUNCATED)
"def decompress(input_string: str, encoding: str = 'utf-8') -> str:\n \"\"\"\n Restore a previ(...TRUNCATED)
def decompress(input_string: str, encoding: str = 'utf-8') -> str:
"\nRestore a previously compressed string (obtained using `compress()`) back to its original state.\(...TRUNCATED)
"\"\"\"\nRestore a previously compressed string (obtained using `compress()`) back to its original s(...TRUNCATED)
["Restore","a","previously","compressed","string","(","obtained","using","`","compress","()","`",")"(...TRUNCATED)
false
false
"def decompress(input_string: str, encoding: str = 'utf-8') -> str:\n \"\"\"\n Restore a previ(...TRUNCATED)
"\nimport sys\nsys.path.insert(1, \"/input/test-apps/python-string-utils\")\nimport unittest, pytest(...TRUNCATED)
["def test_1():\n assert \" a\" == decompress(compress(\" a\"), 'utf-8')","def test_3():\n ass(...TRUNCATED)
100
"You are a Python programmer working with a repository. Here is all the context you may find useful (...TRUNCATED)
decompress@string_utils/manipulation.py
{"description":"\nRestore a previously compressed string (obtained using `compress()`) back to its o(...TRUNCATED)
{"negative":{"classes":[{"base_classes":["TypeError"],"code":"class InvalidInputError(TypeError):\n (...TRUNCATED)
["from ._regex import *","from .errors import InvalidInputError","from .validation import is_camel_c(...TRUNCATED)
[{"content":["def compress(input_string: str, encoding: str = 'utf-8', compression_level: int = 9) -(...TRUNCATED)
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
37