proj4-all-labs / proj4_all_labs.csv
hojzas's picture
Upload proj4_all_labs.csv
d9e124c verified
sentence,label
" perms = all_permutations_substrings(string)\n return set(''.join(perm) for word in words for perm in perms if word == perm)",0
" perms = all_permutations_substrings(string)\n out = set()\n for w in words:\n for s in perms:\n if w == s:\n out.add(w)\n return out",0
" perms = all_permutations_substrings(string)\n return set(word for word in words if word in perms)",0
" perms = all_permutations_substrings(string)\n return {word for word in words if word in perms}",0
" perms = all_permutations_substrings(string)\n return {word for word in words for perm in perms if word in perm}",0
" perms = all_permutations_substrings(string)\n return {perm for perm in words if perm in perms}",0
" perms = all_permutations_substrings(string)\n return {word for word in words if word in set(perms)}",0
" perms = all_permutations_substrings(string)\n return set(x for x in words if x in perms)",0
" perms = all_permutations_substrings(string)\n return set(perm for perm in perms if perm in words)",0
" perms = all_permutations_substrings(string)\n return {x for x in words if x in perms}",0
" perms = all_permutations_substrings(string)\n return {w for w in words if w in perms}",0
" perms = all_permutations_substrings(string)\n return {i for i in perms if (i in words)",0
" perms = all_permutations_substrings(string)\n return {item for item in perms if item in words}",0
" perms = all_permutations_substrings(string)\n return {x for x in perms for y in words if x == y}",0
" perms = all_permutations_substrings(string)\n return set([perm for perm in perms if perm in words])",0
" perms = all_permutations_substrings(string)\n set = {} \n set = {i for i in perms if i in words}",0
" perms = all_permutations_substrings(string)\n p = {items for items in words if items in perms}\n return p",0
" perms = all_permutations_substrings(string)\n return set([x for x in list(perms) + words if x in list(perms) and x in words])",0
" perms = all_permutations_substrings(string)\n all_permutations_list = []\n [all_permutations_list.append(permutation) for permutation in perms if permutation in words]\n return set(all_permutations_list)",0
" perms = all_permutations_substrings(string)\n return set([perm for perm in perms for word in words if perm == word])",0
" perms = all_permutations_substrings(string)\n out = set()\n for w in words:\n for s in perms:\n if w == s :\n out.add(w)\n return out",0
" perms = all_permutations_substrings(string)\n match_words = []\n for i in words:\n for j in perms:\n if i==j:\n match_words.append(i)\n return set(match_words)",0
" perms = all_permutations_substrings(string)\n to_return = []\n for w in words:\n if w in perms:\n to_return.append(w)\n to_return = set(to_return)\n return to_return",0
" perms = all_permutations_substrings(string)\n list1 = []\n for p in perms:\n if p not in list1:\n if p in words:\n list1.append(p)\n return set(list1)",0
" perms = all_permutations_substrings(string)\n items = set()\n for word in words:\n if hash(word) in {hash(item) for item in perms}:\n items.add(word)\n return items",0
" perms = all_permutations_substrings(string)\n return {word for word in words if hash(word) in {hash(looking) for looking in perms}}",0
" perms = all_permutations_substrings(string)\n return {letters for letters in words if hash(letters) in {hash(find) for find in perms}}",0
" perms = all_permutations_substrings(string)\n return {each for each in words if hash(each) in {hash(find) for find in perms }}",0
" perms = all_permutations_substrings(string)\n return set({item:None for item in perms if item in words}.keys()) ",0
" perms = all_permutations_substrings(string)\n return set(filter(lambda x: x in perms, words))",0
" counter = defaultdict(int)\n for character in string:\n counter[character] += 1\n result = set()\n for word in words:\n word_counter = defaultdict(int)\n for character in word:\n word_counter[character] += 1\n for key, count in word_counter.items():\n if counter[key] < count:\n break\n else:\n result.add(word)\n return result",0
" perms = all_permutations_substrings(string)\n matching_words = set()\n for i in range(1, len(string)+1):\n for perm in permutations(string, i):\n if ''.join(perm) in words:\n matching_words.add(''.join(perm))\n return matching_words",0
" perms = all_permutations_substrings(string)\n return set(list(set(perms) & set(words)))",0
" perms = all_permutations_substrings(string)\n for x in perms:\n words.append(x)\n dupes = [x for n, x in enumerate(words) if x in words[:n]] \n return set(dupes)",0
" perms = all_permutations_substrings(string)\n result = perms & set(words)\n return set(i for i in words if i in perms)",0
" perms = all_permutations_substrings(string)\n return perms.intersection(words)",1
" perms = all_permutations_substrings(string)\n return set.intersection(perms,words)",1
" perms = all_permutations_substrings(string)\n return set(perms).intersection(words)",1
" perms = all_permutations_substrings(string)\n return set(words) & set(perms)",1
" perms = all_permutations_substrings(string)\n return set(perms) & set(words)",1
" perms = all_permutations_substrings(string)\n if set(words) & set(perms):\n res = (set(words) & set(perms))\n return res",1
" perms = all_permutations_substrings(string)\n return set(words)&perms",1
" perms = all_permutations_substrings(string)\n return set( perms.intersection(words))",1
" perms = all_permutations_substrings(string)\n combined = set(perms)&set(words)\n return combined",1
" perms = all_permutations_substrings(string)\n p2 = set(words)\n p1 = all_permutations_substrings(string)\n return p1.intersection(p2)",1
" perms = all_permutations_substrings(string)\n return perms.intersection(set(words))",1
" perms = all_permutations_substrings(string)\n return set(set(perms).intersection(words)) ",1
" perms = all_permutations_substrings(string)\n x2 = set(words)\n x1 = all_permutations_substrings(string)\n return x1.intersection(x2)",1
" perms = all_permutations_substrings(string)\n list = []\n return set(words).intersection(perms)",1
" it = list(dict.fromkeys(it))
it.sort()
return it",3
" sequence = []
for i in it:
if i in sequence:
pass
else:
sequence.append(i)
sequence.sort()
return sequence",3
" unique = list(set(it))
unique.sort()
return unique",3
" ordered_items = []
for i in it:
if i not in ordered_items:
ordered_items.append(i)
ordered_items.sort()
return ordered_items",3
" sorted_list = []
for a in it:
if a not in sorted_list:
sorted_list.append(a)
sorted_list.sort()
return sorted_list",3
" it = list(set(it))
it.sort()
return it ",3
" nonUniqueList = list(it)
uniqueList = list(set(nonUniqueList))
uniqueList.sort()
return uniqueList",3
" out = set(it)
out = list(out)
out.sort()
return out ",3
" uniq_list = list(set(it))
uniq_list.sort()
return uniq_list",3
" values = set()
for thing in it:
values.add(thing)
values = [*values,]
values.sort()
return values",3
"return sorted(list({word : it.count(word) for (word) in set(it)}.keys())) ",2
"return list(dict.fromkeys(sorted(it)))",2
"return sorted((list(dict.fromkeys(it)))) ",2
"return sorted({k for k in list(it)})",2
" it = sorted(it)
outputSequence = []
for input in it:
found = 0
for output in outputSequence:
if output == input:
found = 1
break
if not found:
outputSequence.append(input)
return outputSequence",2
"return sorted(list(dict.fromkeys(it).keys()))",2
" sequence_list = list(it)
unique_list = list(set(sequence_list))
sorted_list = sorted(unique_list, reverse=False)
return sorted_list",2
" seen = set()
unique_elems = (elem for elem in it if elem not in seen and not seen.add(elem))
return sorted(unique_elems)",2
" unique_items = set(it)
return sorted(list(unique_items))",4
" letters = set(it)
sorted_letters = sorted(letters)
return sorted_letters",4
"return list(sorted(set(it)))",4
"it=sorted(set(list(it)))
return it",4
" return sorted(list({x for x in it})) ",4
"return sorted(set(list(it))) ",4
"return sorted(list(set(it)))",4
"return sorted(set(it)) ",4
"return sorted([*set(it)]) ",4
" outputSequence = []
for input in it:
found = 0
for output in outputSequence:
if output == input:
found = 1
break
if not found:
outputSequence.append(input)
return outputSequence",5
" uniq = []
for char in it:
if not char in uniq:
uniq.append(char)
return uniq",5
"return sorted(set(it), key=lambda y: it.index(y)) ",5
" d={}
res=[]
for x in it:
d[x]=0
for k in d:
res.append(k)
return res",5
" registered = set()
register = registered.add
return [x for x in it if not (x in registered or register(x))]",5
" array=[]
for i in it:
if i not in array:
array.append(i)
return array ",5
" seen = set()
return [x for x in it if not (x in seen or seen.add(x))]",5
" seen = set()
seen_add = seen.add
return [x for x in it if not (x in seen or seen_add(x))]",5
"return [l for i, l in enumerate(it) if i == it.index(l)]",5
" seen = set()
result = []
for word in it:
if word not in seen:
result.append(word)
seen.add(word)
return result",5
"return (x for y, x in enumerate(it) if it.index(x) == y)",5
"return [value for key, value in enumerate(it) if value not in it[:key]]",5
"return sorted(set(it), key=it.index)",5
"return [tmp for tmp in dict.fromkeys(it).keys()]",6
"return [i for i in dict.fromkeys(it)]",6
"return list(dict.fromkeys(it))",6
"return list(dict.fromkeys(it).keys())",6
"return list(dict.fromkeys(it))",6
"return [x for x in dict.fromkeys(it).keys()]",6
"return list(dict.fromkeys(it).keys()) ",6
"return list(dict.fromkeys(it))",6