Upload proj4_uniq_srt_lab2.csv
Browse files- proj4_uniq_srt_lab2.csv +83 -0
proj4_uniq_srt_lab2.csv
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
sentence,label
|
| 2 |
+
" it = list(dict.fromkeys(it))
|
| 3 |
+
it.sort()
|
| 4 |
+
return it",0
|
| 5 |
+
" sequence = []
|
| 6 |
+
for i in it:
|
| 7 |
+
if i in sequence:
|
| 8 |
+
pass
|
| 9 |
+
else:
|
| 10 |
+
sequence.append(i)
|
| 11 |
+
sequence.sort()
|
| 12 |
+
return sequence",0
|
| 13 |
+
" unique = list(set(it))
|
| 14 |
+
unique.sort()
|
| 15 |
+
return unique",0
|
| 16 |
+
" ordered_items = []
|
| 17 |
+
for i in it:
|
| 18 |
+
if i not in ordered_items:
|
| 19 |
+
ordered_items.append(i)
|
| 20 |
+
ordered_items.sort()
|
| 21 |
+
return ordered_items",0
|
| 22 |
+
" sorted_list = []
|
| 23 |
+
for a in it:
|
| 24 |
+
if a not in sorted_list:
|
| 25 |
+
sorted_list.append(a)
|
| 26 |
+
sorted_list.sort()
|
| 27 |
+
return sorted_list",0
|
| 28 |
+
" it = list(set(it))
|
| 29 |
+
it.sort()
|
| 30 |
+
return it ",0
|
| 31 |
+
" nonUniqueList = list(it)
|
| 32 |
+
uniqueList = list(set(nonUniqueList))
|
| 33 |
+
uniqueList.sort()
|
| 34 |
+
return uniqueList",0
|
| 35 |
+
" out = set(it)
|
| 36 |
+
out = list(out)
|
| 37 |
+
out.sort()
|
| 38 |
+
return out ",0
|
| 39 |
+
" uniq_list = list(set(it))
|
| 40 |
+
uniq_list.sort()
|
| 41 |
+
return uniq_list",0
|
| 42 |
+
" values = set()
|
| 43 |
+
for thing in it:
|
| 44 |
+
values.add(thing)
|
| 45 |
+
values = [*values,]
|
| 46 |
+
values.sort()
|
| 47 |
+
return values",0
|
| 48 |
+
"return sorted(list({word : it.count(word) for (word) in set(it)}.keys())) ",2
|
| 49 |
+
"return list(dict.fromkeys(sorted(it)))",2
|
| 50 |
+
"return sorted((list(dict.fromkeys(it)))) ",2
|
| 51 |
+
"return sorted({k for k in list(it)})",2
|
| 52 |
+
" it = sorted(it)
|
| 53 |
+
outputSequence = []
|
| 54 |
+
for input in it:
|
| 55 |
+
found = 0
|
| 56 |
+
for output in outputSequence:
|
| 57 |
+
if output == input:
|
| 58 |
+
found = 1
|
| 59 |
+
break
|
| 60 |
+
if not found:
|
| 61 |
+
outputSequence.append(input)
|
| 62 |
+
return outputSequence",2
|
| 63 |
+
"return sorted(list(dict.fromkeys(it).keys()))",2
|
| 64 |
+
" sequence_list = list(it)
|
| 65 |
+
unique_list = list(set(sequence_list))
|
| 66 |
+
sorted_list = sorted(unique_list, reverse=False)
|
| 67 |
+
return sorted_list",2
|
| 68 |
+
" seen = set()
|
| 69 |
+
unique_elems = (elem for elem in it if elem not in seen and not seen.add(elem))
|
| 70 |
+
return sorted(unique_elems)",2
|
| 71 |
+
" unique_items = set(it)
|
| 72 |
+
return sorted(list(unique_items))",1
|
| 73 |
+
" letters = set(it)
|
| 74 |
+
sorted_letters = sorted(letters)
|
| 75 |
+
return sorted_letters",1
|
| 76 |
+
"return list(sorted(set(it)))",1
|
| 77 |
+
"it=sorted(set(list(it)))
|
| 78 |
+
return it",1
|
| 79 |
+
" return sorted(list({x for x in it})) ",1
|
| 80 |
+
"return sorted(set(list(it))) ",1
|
| 81 |
+
"return sorted(list(set(it)))",1
|
| 82 |
+
"return sorted(set(it)) ",1
|
| 83 |
+
"return sorted([*set(it)]) ",1
|