KrossKinetic/odex-en huggingface dataset:
# Convert list of lists `data` into a flat list
def f_10632111(data):
	return [y for x in data for y in (x if isinstance(x, list) else [x])]

def check(candidate):
    data = [[1, 2], [3]]
    assert candidate(data) == [1, 2, 3]


    data = [[1, 2], [3], []]
    assert candidate(data) == [1, 2, 3]


    data = [1,2,3]
    assert candidate(data) == [1, 2, 3]
# find the string in `your_string` between two special characters "[" and "]"
def f_14716342(your_string):
	return re.search('\\[(.*)\\]', your_string).group(1)

import re

def check(candidate):
    assert candidate('[uranus]') == 'uranus'


    assert candidate('hello[world] !') == 'world'
# split string `text` by space
def f_743806(text):
	return text.split()

def check(candidate):
    assert candidate('The quick brown fox') == ['The', 'quick', 'brown', 'fox']


    assert candidate('hello!') == ['hello!']


    assert candidate('hello world !') == ['hello', 'world', '!']
# split string `text` by ","
def f_743806(text):
	return text.split(',')

def check(candidate):
    assert candidate('The quick brown fox') == ['The quick brown fox']


    assert candidate('The,quick,brown,fox') == ['The', 'quick', 'brown', 'fox']
# sort list `list_of_strings` based on second index of each string `s`
def f_38388799(list_of_strings):
	return sorted(list_of_strings, key=lambda s: s.split(',')[1])

def check(candidate):
    assert candidate(['parrot, medicine', 'abott, kangaroo', 'sriracha, coriander', 'phone, bottle']) == ['phone, bottle', 'sriracha, coriander', 'abott, kangaroo', 'parrot, medicine']


    assert candidate(['abott, kangaroo', 'parrot, medicine', 'sriracha, coriander', 'phone, bottle']) == ['phone, bottle', 'sriracha, coriander', 'abott, kangaroo', 'parrot, medicine']
# eliminate non-integer items from list `lst`
def f_37004138(lst):
	return [element for element in lst if isinstance(element, int)]

def check(candidate):
    lst = [1, "hello", "string", 2, 4.46]
    assert candidate(lst) == [1, 2]


    lst = ["hello", "string"]
    assert candidate(lst) == []
# get all the elements except strings from the list 'lst'.
def f_37004138(lst):
	return [element for element in lst if not isinstance(element, str)]

def check(candidate):
    lst = [1, "hello", "string", 2, 4.46]
    assert candidate(lst) == [1, 2, 4.46]


    lst = ["hello", "string"]
    assert candidate(lst) == []
# Sort a list of dictionaries `list_to_be_sorted` by the value of the dictionary key `name`
def f_72899(list_to_be_sorted):
	return sorted(list_to_be_sorted, key=lambda k: k['name'])

def check(candidate):
    list_to_be_sorted = [{'name': 'Homer', 'age': 39}, {'name': 'Bart', 'age': 10}]
    assert candidate(list_to_be_sorted) == [{'name': 'Bart', 'age': 10}, {'name': 'Homer', 'age': 39}]


    list_to_be_sorted = [{'name': 'ABCD'}, {'name': 'AABCD'}]
    assert candidate(list_to_be_sorted) == [{'name': 'AABCD'}, {'name': 'ABCD'}]
# sort a list of dictionaries `l` by values in key `name` in descending order
def f_72899(l):
	return sorted(l, key=itemgetter('name'), reverse=True)

from operator import itemgetter

def check(candidate):
    list_to_be_sorted = [{'name': 'Homer', 'age': 39}, {'name': 'Bart', 'age': 10}]
    assert candidate(list_to_be_sorted) == [{'name': 'Homer', 'age': 39}, {'name': 'Bart', 'age': 10}]


    list_to_be_sorted = [{'name': 'ABCD'}, {'name': 'AABCD'}]
    assert candidate(list_to_be_sorted) == [{'name': 'ABCD'}, {'name': 'AABCD'}]
# sort a list of dictionaries `list_of_dicts` by `name` values of the dictionary
def f_72899(list_of_dicts):
	list_of_dicts.sort(key=operator.itemgetter('name'))
	return list_of_dicts

import operator

def check(candidate):
    list_to_be_sorted = [{'name': 'Homer', 'age': 39}, {'name': 'Bart', 'age': 10}]
    assert candidate(list_to_be_sorted) == [{'name': 'Bart', 'age': 10}, {'name': 'Homer', 'age': 39}]


    list_to_be_sorted = [{'name': 'ABCD'}, {'name': 'AABCD'}]
    assert candidate(list_to_be_sorted) == [{'name': 'AABCD'}, {'name': 'ABCD'}]
# sort a list of dictionaries `list_of_dicts` by `age` values of the dictionary
def f_72899(list_of_dicts):
	list_of_dicts.sort(key=operator.itemgetter('age'))
	return list_of_dicts

import operator

def check(candidate):
    list_to_be_sorted = [{'name': 'Homer', 'age': 39}, {'name': 'Bart', 'age': 10}]
    assert candidate(list_to_be_sorted) == [{'name': 'Bart', 'age': 10}, {'name': 'Homer', 'age': 39}]


    list_to_be_sorted = [{'name': 'ABCD', 'age': 10}, {'name': 'AABCD', 'age': 9}]
    assert candidate(list_to_be_sorted) == [{'name': 'AABCD', 'age': 9}, {'name': 'ABCD', 'age': 10}]
# Remove all strings from a list a strings `sents` where the values starts with `@$\t` or `#`
def f_12666897(sents):
	return [x for x in sents if not x.startswith('@$\t') and not x.startswith('#')]

def check(candidate):
    sents = ["@$	abcd", "#453923", "abcd", "hello", "1"]
    assert candidate(sents) == ["abcd", "hello", "1"]


    sents = ["@$	abcd", "@$t453923", "abcd", "hello", "1"]
    assert candidate(sents) == ["@$t453923", "abcd", "hello", "1"]


    sents = ["#tabcd", "##453923", "abcd", "hello", "1"]
    assert candidate(sents) == ["abcd", "hello", "1"]
# sort a list of dictionary `list` first by key `points` and then by `time`
def f_5944630(list):
	list.sort(key=lambda item: (item['points'], item['time']))
	return list

def check(candidate):
    list = [
        {'name':'JOHN', 'points' : 30, 'time' : '0:02:2'},
        {'name':'KARL','points':50,'time': '0:03:00'},
        {'name':'TEST','points':20,'time': '0:03:00'}
    ]
    assert candidate(list) == [
        {'name':'TEST','points':20,'time': '0:03:00'}, 
        {'name':'JOHN', 'points' : 30, 'time' : '0:02:2'},
        {'name':'KARL','points':50,'time': '0:03:00'}
    ]


    list = [
        {'name':'JOHN', 'points' : 30, 'time' : '0:02:2'},
        {'name':'KARL','points':30,'time': '0:03:00'},
        {'name':'TEST','points':30,'time': '0:01:01'}
    ]
    assert candidate(list) == [
        {'name':'TEST','points':30,'time': '0:01:01'},
        {'name':'JOHN', 'points' : 30, 'time' : '0:02:2'},
        {'name':'KARL','points':30,'time': '0:03:00'}
    ]
# get the last key of dictionary `dict`
def f_16125229(dict):
	return list(dict.keys())[-1]

def check(candidate):
    assert candidate({'t': 1, 'r': 2}) == 'r'


    assert candidate({'c': 1, 'b': 2, 'a': 1}) == 'a'
# convert unicode string `s` to ascii
def f_19527279(s):
	return s.encode('iso-8859-15')

def check(candidate):
    assert candidate('table') == b'table'


    assert candidate('hello world!') == b'hello world!'
# Find all numbers and dots from a string `text` using regex
def f_356483(text):
	return re.findall('Test([0-9.]*[0-9]+)', text)

import re 

def check(candidate):
    assert candidate('Test0.9ssd') == ['0.9']


    assert candidate('Test0.0 ..2ssd') == ['0.0']
# Sort a list of tuples `b` by third item in the tuple
def f_7349646(b):
	b.sort(key=lambda x: x[2])
	return b

def check(candidate):
    b = [(1,2,3), (4,5,6), (7,8,0)]
    assert candidate(b) == [(7,8,0), (1,2,3), (4,5,6)]


    b = [(1,2,'a'), (4,5,'c'), (7,8,'A')]
    assert candidate(b) == [(7,8,'A'), (1,2,'a'), (4,5,'c')]
# subtract 13 from every number in a list `a`
def f_4918425(a):
	a[:] = [(x - 13) for x in a]
	return a

def check(candidate):
    a = [14, 15]
    candidate(a)
    assert a == [1, 2]


    a = [float(x) for x in range(13, 20)]
    candidate(a)
    assert a == [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
# Get all urls within text `s`
def f_30551576(s):
	return re.findall(r'"(http.*?)"', s, re.MULTILINE | re.DOTALL)

import re

def check(candidate):
    s = (
      '     [irrelevant javascript code here]'
      '     sources:[{file:"http://url.com/folder1/v.html",label:"label1"},'
      '     {file:"http://url.com/folder2/v.html",label:"label2"},'
      '     {file:"http://url.com/folder3/v.html",label:"label3"}],'
      '     [irrelevant javascript code here]'
    )
    assert candidate(s) == ['http://url.com/folder1/v.html', 'http://url.com/folder2/v.html', 'http://url.com/folder3/v.html']


    s = (
      '     [irrelevant javascript code here]'
      '     [irrelevant python code here]'
    )
    assert candidate(s) == []