code
stringlengths
14
580
varname
stringlengths
1
25
vartype
stringclasses
13 values
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers):
elem
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers):
elem2
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers):
idx
int
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers):
idx2
int
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers):
numbers
list
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers):
threshold
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True
distance
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True
elem
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True
elem2
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True
has_close_elements
bool
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True
idx
int
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True
idx2
int
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True
numbers
list
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True
threshold
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold:
distance
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold:
elem
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold:
elem2
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold:
idx
int
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold:
idx2
int
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold:
numbers
list
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold:
threshold
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True has_close_elements = False
distance
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True has_close_elements = False
elem
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True has_close_elements = False
elem2
float
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True has_close_elements = False
has_close_elements
bool
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True has_close_elements = False
idx
int
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True has_close_elements = False
idx2
int
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True has_close_elements = False
numbers
list
numbers, threshold = [1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3 for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers): if idx != idx2: distance = abs(elem - elem2) if distance < threshold: has_close_elements = True has_close_elements = False
threshold
float
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0 for c in paren_string: if c == '(': current_depth += 1 current_string.append(c) elif c == ')':
c
str
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0 for c in paren_string: if c == '(': current_depth += 1 current_string.append(c) elif c == ')':
current_depth
int
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0 for c in paren_string: if c == '(': current_depth += 1 current_string.append(c) elif c == ')':
current_string
list
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0 for c in paren_string: if c == '(': current_depth += 1 current_string.append(c) elif c == ')':
paren_string
str
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0 for c in paren_string: if c == '(': current_depth += 1 current_string.append(c) elif c == ')':
result
list
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0
current_depth
int
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0
current_string
list
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0
paren_string
str
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0
result
list
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0
current_depth
int
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0
current_string
list
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0
paren_string
str
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0
result
list
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0 for c in paren_string: if c == '(': current_depth += 1 current_string.append(c) elif c == ')': current_depth -= 1 current_string.append(c) if current_depth == 0: result.append(''.join(current_string)) current_string.clear()
c
str
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0 for c in paren_string: if c == '(': current_depth += 1 current_string.append(c) elif c == ')': current_depth -= 1 current_string.append(c) if current_depth == 0: result.append(''.join(current_string)) current_string.clear()
current_depth
int
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0 for c in paren_string: if c == '(': current_depth += 1 current_string.append(c) elif c == ')': current_depth -= 1 current_string.append(c) if current_depth == 0: result.append(''.join(current_string)) current_string.clear()
current_string
list
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0 for c in paren_string: if c == '(': current_depth += 1 current_string.append(c) elif c == ')': current_depth -= 1 current_string.append(c) if current_depth == 0: result.append(''.join(current_string)) current_string.clear()
paren_string
str
paren_string = '(()(())((())))' result = [] current_string = [] current_depth = 0 for c in paren_string: if c == '(': current_depth += 1 current_string.append(c) elif c == ')': current_depth -= 1 current_string.append(c) if current_depth == 0: result.append(''.join(current_string)) current_string.clear()
result
list
number = 123.456 truncate_number = number % 1.0
number
float
number = 123.456 truncate_number = number % 1.0
truncate_number
float
operations = [1, -1, 2, -2, 5, -5, 4, -4] balance = 0
balance
int
operations = [1, -1, 2, -2, 5, -5, 4, -4] balance = 0
operations
list
operations = [1, -1, 2, -2, 5, -5, 4, -4] balance = 0 for op in operations:
balance
int
operations = [1, -1, 2, -2, 5, -5, 4, -4] balance = 0 for op in operations:
op
int
operations = [1, -1, 2, -2, 5, -5, 4, -4] balance = 0 for op in operations:
operations
list
operations = [1, -1, 2, -2, 5, -5, 4, -4] balance = 0
balance
int
operations = [1, -1, 2, -2, 5, -5, 4, -4] balance = 0
operations
list
numbers = [1.0, 2.0, 3.0, 4.0, 5.0] mean = sum(numbers) / len(numbers)
mean
float
numbers = [1.0, 2.0, 3.0, 4.0, 5.0] mean = sum(numbers) / len(numbers)
numbers
list
numbers = [1.0, 2.0, 3.0, 4.0, 5.0] mean = sum(numbers) / len(numbers) mean_absolute_deviation = sum(abs(x - mean) for x in numbers) / len(numbers)
mean
float
numbers = [1.0, 2.0, 3.0, 4.0, 5.0] mean = sum(numbers) / len(numbers) mean_absolute_deviation = sum(abs(x - mean) for x in numbers) / len(numbers)
mean_absolute_deviation
float
numbers = [1.0, 2.0, 3.0, 4.0, 5.0] mean = sum(numbers) / len(numbers) mean_absolute_deviation = sum(abs(x - mean) for x in numbers) / len(numbers)
numbers
list
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]: result.append(n) result.append(delimeter)
delimeter
int
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]: result.append(n) result.append(delimeter)
n
int
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]: result.append(n) result.append(delimeter)
numbers
list
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]: result.append(n) result.append(delimeter)
result
list
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]:
delimeter
int
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]:
n
int
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]:
numbers
list
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]:
result
list
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]: result.append(n) result.append(delimeter)
delimeter
int
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]: result.append(n) result.append(delimeter)
n
int
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]: result.append(n) result.append(delimeter)
numbers
list
numbers, delimeter = [5, 6, 3, 2], 8 if not numbers: intersperse = [] result = [] for n in numbers[:-1]: result.append(n) result.append(delimeter)
result
list
paren_string = '(()(())((())))' def parse_paren_group(s): depth = 0 max_depth = 0 for c in s: if c == '(': depth += 1 max_depth = max(depth, max_depth) else: depth -= 1
paren_string
str
paren_string = '(()(())((())))' def parse_paren_group(s): depth = 0 max_depth = 0 for c in s: if c == '(': depth += 1 max_depth = max(depth, max_depth) else: depth -= 1
parse_paren_group
function
strings, substring = ['xxx', 'asd', 'aaaxxy', 'john doe', 'xxxAAA', 'xxx'], 'xx' filter_by_substring = [x for x in strings if substring in x]
filter_by_substring
list
strings, substring = ['xxx', 'asd', 'aaaxxy', 'john doe', 'xxxAAA', 'xxx'], 'xx' filter_by_substring = [x for x in strings if substring in x]
strings
list
strings, substring = ['xxx', 'asd', 'aaaxxy', 'john doe', 'xxxAAA', 'xxx'], 'xx' filter_by_substring = [x for x in strings if substring in x]
substring
str
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers:
n
int
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers:
numbers
list
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers:
prod_value
int
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers:
sum_value
int
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers: sum_value += n prod_value *= n sum_product = sum_value, prod_value
n
int
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers: sum_value += n prod_value *= n sum_product = sum_value, prod_value
numbers
list
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers: sum_value += n prod_value *= n sum_product = sum_value, prod_value
prod_value
int
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers: sum_value += n prod_value *= n sum_product = sum_value, prod_value
sum_product
tuple
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers: sum_value += n prod_value *= n sum_product = sum_value, prod_value
sum_value
int
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers: sum_value += n prod_value *= n
n
int
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers: sum_value += n prod_value *= n
numbers
list
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers: sum_value += n prod_value *= n
prod_value
int
numbers = [1, 1, 1] sum_value = 0 prod_value = 1 for n in numbers: sum_value += n prod_value *= n
sum_value
int
numbers = [1, 1, 1] sum_value = 0 prod_value = 1
numbers
list
numbers = [1, 1, 1] sum_value = 0 prod_value = 1
prod_value
int
numbers = [1, 1, 1] sum_value = 0 prod_value = 1
sum_value
int
numbers = [4, 3, 2, 1] running_max = None result = [] for n in numbers: if running_max is None: running_max = n else: running_max = max(running_max, n) result.append(running_max)
n
int
numbers = [4, 3, 2, 1] running_max = None result = [] for n in numbers: if running_max is None: running_max = n else: running_max = max(running_max, n) result.append(running_max)
numbers
list
numbers = [4, 3, 2, 1] running_max = None result = [] for n in numbers: if running_max is None: running_max = n else: running_max = max(running_max, n) result.append(running_max)
result
list
numbers = [4, 3, 2, 1] running_max = None result = [] for n in numbers: if running_max is None: running_max = n else: running_max = max(running_max, n) result.append(running_max)
running_max
int
numbers = [4, 3, 2, 1] running_max = None result = []
numbers
list
numbers = [4, 3, 2, 1] running_max = None result = []
result
list
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
36
Edit dataset card