source stringclasses 2 values | version stringclasses 2 values | module stringclasses 53 values | function stringclasses 318 values | input stringlengths 3 496 | expected stringlengths 0 876 | signature stringclasses 41 values |
|---|---|---|---|---|---|---|
cpython | 3.10 | difflib | Differ.IS_CHARACTER_JUNK | >>> IS_CHARACTER_JUNK(' ') | True | null |
cpython | 3.10 | difflib | Differ.IS_CHARACTER_JUNK | >>> IS_CHARACTER_JUNK('\t') | True | null |
cpython | 3.10 | difflib | Differ.IS_CHARACTER_JUNK | >>> IS_CHARACTER_JUNK('\n') | False | null |
cpython | 3.10 | difflib | Differ.IS_CHARACTER_JUNK | >>> IS_CHARACTER_JUNK('x') | False | null |
cpython | 3.10 | difflib | Differ.unified_diff | >>> for line in unified_diff('one two three four'.split(),
... 'zero one tree four'.split(), 'Original', 'Current',
... '2005-01-26 23:30:50', '2010-04-02 10:20:52',
... lineterm=''):
... print(line) # doctest: +NORMALIZE_WHITESPACE | --- Original 2005-01-26 23:30:50
+++ Current 2010-04-02 10:20:52
@@ -1,4 +1,4 @@
+zero
one
-two
-three
+tree
four | null |
cpython | 3.10 | difflib | Differ.context_diff | >>> print(''.join(context_diff('one\ntwo\nthree\nfour\n'.splitlines(True),
... 'zero\none\ntree\nfour\n'.splitlines(True), 'Original', 'Current')),
... end="") | *** Original
--- Current
***************
*** 1,4 ****
one
! two
! three
four
--- 1,4 ----
+ zero
one
! tree
four | null |
cpython | 3.10 | difflib | Differ.ndiff | >>> diff = ndiff('one\ntwo\nthree\n'.splitlines(keepends=True),
... 'ore\ntree\nemu\n'.splitlines(keepends=True)) | null | |
cpython | 3.10 | difflib | Differ.ndiff | >>> print(''.join(diff), end="") | - one
? ^
+ ore
? ^
- two
- three
? -
+ tree
+ emu | null |
cpython | 3.10 | difflib | HtmlDiff.restore | >>> diff = ndiff('one\ntwo\nthree\n'.splitlines(keepends=True),
... 'ore\ntree\nemu\n'.splitlines(keepends=True)) | null | |
cpython | 3.10 | difflib | HtmlDiff.restore | >>> diff = list(diff) | null | |
cpython | 3.10 | difflib | HtmlDiff.restore | >>> print(''.join(restore(diff, 1)), end="") | one
two
three | null |
cpython | 3.10 | difflib | HtmlDiff.restore | >>> print(''.join(restore(diff, 2)), end="") | ore
tree
emu | null |
reprorusted-python-cli | 3a82afb | example_join.join_tool | __module__ | >>> join_underscore("a", "b", "c") | 'a_b_c' | null |
reprorusted-python-cli | 3a82afb | example_join.join_tool | __module__ | >>> join_dash("x", "y", "z") | 'x-y-z' | null |
reprorusted-python-cli | 3a82afb | example_join.join_tool | __module__ | >>> join_dot("1", "2", "3") | '1.2.3' | null |
reprorusted-python-cli | 3a82afb | example_join.join_tool | join_underscore | >>> join_underscore("hello", "world", "test") | 'hello_world_test' | def join_underscore(a: str, b: str, c: str) -> str |
reprorusted-python-cli | 3a82afb | example_join.join_tool | join_underscore | >>> join_underscore("", "x", "") | '_x_' | def join_underscore(a: str, b: str, c: str) -> str |
reprorusted-python-cli | 3a82afb | example_join.join_tool | join_dash | >>> join_dash("foo", "bar", "baz") | 'foo-bar-baz' | def join_dash(a: str, b: str, c: str) -> str |
reprorusted-python-cli | 3a82afb | example_join.join_tool | join_dash | >>> join_dash("2025", "11", "29") | '2025-11-29' | def join_dash(a: str, b: str, c: str) -> str |
reprorusted-python-cli | 3a82afb | example_join.join_tool | join_dot | >>> join_dot("192", "168", "1") | '192.168.1' | def join_dot(a: str, b: str, c: str) -> str |
reprorusted-python-cli | 3a82afb | example_join.join_tool | join_dot | >>> join_dot("a", "b", "c") | 'a.b.c' | def join_dot(a: str, b: str, c: str) -> str |
reprorusted-python-cli | 3a82afb | example_any_all.any_all_tool | __module__ | >>> check_any(0, 0, 1, 0) | True | null |
reprorusted-python-cli | 3a82afb | example_any_all.any_all_tool | __module__ | >>> check_all(1, 1, 1, 1) | True | null |
reprorusted-python-cli | 3a82afb | example_any_all.any_all_tool | check_any | >>> check_any(0, 0, 0, 0) | False | def check_any(a: int, b: int, c: int, d: int) -> bool |
reprorusted-python-cli | 3a82afb | example_any_all.any_all_tool | check_any | >>> check_any(1, 0, 0, 0) | True | def check_any(a: int, b: int, c: int, d: int) -> bool |
reprorusted-python-cli | 3a82afb | example_any_all.any_all_tool | check_any | >>> check_any(0, 0, 0, 1) | True | def check_any(a: int, b: int, c: int, d: int) -> bool |
reprorusted-python-cli | 3a82afb | example_any_all.any_all_tool | check_all | >>> check_all(1, 1, 1, 1) | True | def check_all(a: int, b: int, c: int, d: int) -> bool |
reprorusted-python-cli | 3a82afb | example_any_all.any_all_tool | check_all | >>> check_all(1, 1, 1, 0) | False | def check_all(a: int, b: int, c: int, d: int) -> bool |
reprorusted-python-cli | 3a82afb | example_any_all.any_all_tool | check_all | >>> check_all(0, 0, 0, 0) | False | def check_all(a: int, b: int, c: int, d: int) -> bool |
reprorusted-python-cli | 3a82afb | example_len.len_tool | __module__ | >>> string_length("hello") | 5 | null |
reprorusted-python-cli | 3a82afb | example_len.len_tool | __module__ | >>> digit_count(12345) | 5 | null |
reprorusted-python-cli | 3a82afb | example_len.len_tool | __module__ | >>> word_count("a_b_c") | 3 | null |
reprorusted-python-cli | 3a82afb | example_len.len_tool | string_length | >>> string_length("") | 0 | def string_length(text: str) -> int |
reprorusted-python-cli | 3a82afb | example_len.len_tool | string_length | >>> string_length("hello") | 5 | def string_length(text: str) -> int |
reprorusted-python-cli | 3a82afb | example_len.len_tool | string_length | >>> string_length("hello world") | 11 | def string_length(text: str) -> int |
reprorusted-python-cli | 3a82afb | example_len.len_tool | digit_count | >>> digit_count(0) | 1 | def digit_count(num: int) -> int |
reprorusted-python-cli | 3a82afb | example_len.len_tool | digit_count | >>> digit_count(123) | 3 | def digit_count(num: int) -> int |
reprorusted-python-cli | 3a82afb | example_len.len_tool | digit_count | >>> digit_count(-456) | 3 | def digit_count(num: int) -> int |
reprorusted-python-cli | 3a82afb | example_len.len_tool | word_count | >>> word_count("hello") | 1 | def word_count(text: str) -> int |
reprorusted-python-cli | 3a82afb | example_len.len_tool | word_count | >>> word_count("a_b") | 2 | def word_count(text: str) -> int |
reprorusted-python-cli | 3a82afb | example_len.len_tool | word_count | >>> word_count("one_two_three") | 3 | def word_count(text: str) -> int |
reprorusted-python-cli | 3a82afb | example_divmod.divmod_tool | __module__ | >>> integer_divide(17, 5) | 3 | null |
reprorusted-python-cli | 3a82afb | example_divmod.divmod_tool | __module__ | >>> modulo(17, 5) | 2 | null |
reprorusted-python-cli | 3a82afb | example_divmod.divmod_tool | __module__ | >>> divmod_pair(17, 5) | (3, 2) | null |
reprorusted-python-cli | 3a82afb | example_divmod.divmod_tool | integer_divide | >>> integer_divide(10, 3) | 3 | def integer_divide(a: int, b: int) -> int |
reprorusted-python-cli | 3a82afb | example_divmod.divmod_tool | integer_divide | >>> integer_divide(9, 3) | 3 | def integer_divide(a: int, b: int) -> int |
reprorusted-python-cli | 3a82afb | example_divmod.divmod_tool | integer_divide | >>> integer_divide(-10, 3) | -4 | def integer_divide(a: int, b: int) -> int |
reprorusted-python-cli | 3a82afb | example_divmod.divmod_tool | modulo | >>> modulo(10, 3) | 1 | def modulo(a: int, b: int) -> int |
reprorusted-python-cli | 3a82afb | example_divmod.divmod_tool | modulo | >>> modulo(9, 3) | 0 | def modulo(a: int, b: int) -> int |
reprorusted-python-cli | 3a82afb | example_divmod.divmod_tool | modulo | >>> modulo(7, 4) | 3 | def modulo(a: int, b: int) -> int |
reprorusted-python-cli | 3a82afb | example_divmod.divmod_tool | divmod_pair | >>> divmod_pair(10, 3) | (3, 1) | def divmod_pair(a: int, b: int) -> tuple |
reprorusted-python-cli | 3a82afb | example_divmod.divmod_tool | divmod_pair | >>> divmod_pair(20, 7) | (2, 6) | def divmod_pair(a: int, b: int) -> tuple |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | __module__ | >>> sum_five(1, 2, 3, 4, 5) | 15 | null |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | __module__ | >>> product_three(2, 3, 4) | 24 | null |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | __module__ | >>> average_three(3, 6, 9) | 6.0 | null |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | sum_five | >>> sum_five(1, 1, 1, 1, 1) | 5 | def sum_five(a: int, b: int, c: int, d: int, e: int) -> int |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | sum_five | >>> sum_five(0, 0, 0, 0, 0) | 0 | def sum_five(a: int, b: int, c: int, d: int, e: int) -> int |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | sum_five | >>> sum_five(10, 20, 30, 40, 50) | 150 | def sum_five(a: int, b: int, c: int, d: int, e: int) -> int |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | product_three | >>> product_three(1, 2, 3) | 6 | def product_three(a: int, b: int, c: int) -> int |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | product_three | >>> product_three(0, 5, 5) | 0 | def product_three(a: int, b: int, c: int) -> int |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | product_three | >>> product_three(2, 2, 2) | 8 | def product_three(a: int, b: int, c: int) -> int |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | average_three | >>> average_three(1, 2, 3) | 2.0 | def average_three(a: int, b: int, c: int) -> float |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | average_three | >>> average_three(10, 20, 30) | 20.0 | def average_three(a: int, b: int, c: int) -> float |
reprorusted-python-cli | 3a82afb | example_sum.sum_tool | average_three | >>> average_three(0, 0, 0) | 0.0 | def average_three(a: int, b: int, c: int) -> float |
reprorusted-python-cli | 3a82afb | example_sorted.sorted_tool | __module__ | >>> sort_asc([5, 2, 8, 1, 9]) | [1, 2, 5, 8, 9] | null |
reprorusted-python-cli | 3a82afb | example_sorted.sorted_tool | __module__ | >>> sort_desc([5, 2, 8, 1, 9]) | [9, 8, 5, 2, 1] | null |
reprorusted-python-cli | 3a82afb | example_sorted.sorted_tool | sort_asc | >>> sort_asc([3, 1, 2]) | [1, 2, 3] | def sort_asc(nums: list) -> list |
reprorusted-python-cli | 3a82afb | example_sorted.sorted_tool | sort_asc | >>> sort_asc([5, 4, 3, 2, 1]) | [1, 2, 3, 4, 5] | def sort_asc(nums: list) -> list |
reprorusted-python-cli | 3a82afb | example_sorted.sorted_tool | sort_asc | >>> sort_asc([1, 1, 1]) | [1, 1, 1] | def sort_asc(nums: list) -> list |
reprorusted-python-cli | 3a82afb | example_sorted.sorted_tool | sort_desc | >>> sort_desc([3, 1, 2]) | [3, 2, 1] | def sort_desc(nums: list) -> list |
reprorusted-python-cli | 3a82afb | example_sorted.sorted_tool | sort_desc | >>> sort_desc([1, 2, 3, 4, 5]) | [5, 4, 3, 2, 1] | def sort_desc(nums: list) -> list |
reprorusted-python-cli | 3a82afb | example_sorted.sorted_tool | sort_alpha | >>> sort_alpha(["c", "a", "b"]) | ['a', 'b', 'c'] | def sort_alpha(words: list) -> list |
reprorusted-python-cli | 3a82afb | example_sorted.sorted_tool | sort_alpha | >>> sort_alpha(["zebra", "apple", "mango"]) | ['apple', 'mango', 'zebra'] | def sort_alpha(words: list) -> list |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | __module__ | >>> find_min(5, 3, 8, 1, 9) | 1 | null |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | __module__ | >>> find_max(5, 3, 8, 1, 9) | 9 | null |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | __module__ | >>> clamp(15, 0, 10) | 10 | null |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | find_min | >>> find_min(1, 2, 3, 4, 5) | 1 | def find_min(a: int, b: int, c: int, d: int, e: int) -> int |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | find_min | >>> find_min(5, 4, 3, 2, 1) | 1 | def find_min(a: int, b: int, c: int, d: int, e: int) -> int |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | find_min | >>> find_min(3, 1, 4, 1, 5) | 1 | def find_min(a: int, b: int, c: int, d: int, e: int) -> int |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | find_max | >>> find_max(1, 2, 3, 4, 5) | 5 | def find_max(a: int, b: int, c: int, d: int, e: int) -> int |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | find_max | >>> find_max(5, 4, 3, 2, 1) | 5 | def find_max(a: int, b: int, c: int, d: int, e: int) -> int |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | find_max | >>> find_max(3, 1, 4, 1, 5) | 5 | def find_max(a: int, b: int, c: int, d: int, e: int) -> int |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | clamp | >>> clamp(5, 0, 10) | 5 | def clamp(val: int, lo: int, hi: int) -> int |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | clamp | >>> clamp(-5, 0, 10) | 0 | def clamp(val: int, lo: int, hi: int) -> int |
reprorusted-python-cli | 3a82afb | example_minmax.minmax_tool | clamp | >>> clamp(15, 0, 10) | 10 | def clamp(val: int, lo: int, hi: int) -> int |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | __module__ | >>> square(5) | 25 | null |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | __module__ | >>> cube(3) | 27 | null |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | __module__ | >>> power(2, 10) | 1024 | null |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | square | >>> square(0) | 0 | def square(x: int) -> int |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | square | >>> square(4) | 16 | def square(x: int) -> int |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | square | >>> square(-3) | 9 | def square(x: int) -> int |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | cube | >>> cube(0) | 0 | def cube(x: int) -> int |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | cube | >>> cube(2) | 8 | def cube(x: int) -> int |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | cube | >>> cube(-2) | -8 | def cube(x: int) -> int |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | power | >>> power(2, 0) | 1 | def power(base: int, exp: int) -> int |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | power | >>> power(2, 3) | 8 | def power(base: int, exp: int) -> int |
reprorusted-python-cli | 3a82afb | example_pow.pow_tool | power | >>> power(3, 4) | 81 | def power(base: int, exp: int) -> int |
reprorusted-python-cli | 3a82afb | example_math.math_tool | __module__ | >>> compute_sin(0.0) | 0.0 | null |
reprorusted-python-cli | 3a82afb | example_math.math_tool | __module__ | >>> compute_sqrt(4.0) | 2.0 | null |
reprorusted-python-cli | 3a82afb | example_math.math_tool | __module__ | >>> compute_ceil(2.3) | 3 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.