File size: 10,718 Bytes
d9e124c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
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