-
Notifications
You must be signed in to change notification settings - Fork 0
/
import-error.json
83 lines (83 loc) · 5.26 KB
/
import-error.json
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
[
"\nt.append(i)",
"\nt = [i for i in iterable if i == cond(i, j)]",
"\nt = [i for i in iterable if i == cond(i, j, k)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o, p)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o, p, q)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o, p, q, r)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o, p, q, r, s)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o, p, q, r, s, t)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o, p, q, r, s, t, u)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o, p, q, r, s, t, u, v)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o, p, q, r, s, t, u, v, w)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y)]",
"\nt = [i for i in iterable if i == cond(i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z)]",
"\nfor i in iterable:\n t.append(i) if cond(i) else None",
"\nfor i in iterable:\n t.append(cond(i)) if cond(i) else None",
"\nfor i in iterable:\n t.append(i) if cond(i) else t.append(None)",
"\nfor i in iterable:\n t.append(i) if cond(i) else t.append(i)",
"\nt.extend([i])",
"\nt = list(filterfalse(lambda i: not cond(i), iterable))",
"\n[i for i in iterable if i not in t and cond(i) and (i not in set(t))]",
"\nlist(filter(lambda i: i not in t and cond(i) and (i not in set(t)), iterable))",
"\nfor i in iterable:\n if cond(i):\n t.append(i)\n else:\n t.append(None)",
"\nfor elem in iterable:\n if cond(elem):\n t.append(elem)",
"\nt = functools.filter(cond, iterable)",
"\nt = t.append(i)",
"\nt.extend(i)",
"\nt.insert(len(t), i)",
"\nt = list(itertools.takewhile(cond, iterable))",
"\nlist(itertools.filterfalse(lambda x: x < 0, itertools.cycle(range(5))))",
"\nfilter(lambda x: x < 0, itertools.cycle(range(5)))",
"\nresult = list(itertools.filterfalse(cond, iterable))",
"\nresult = reduce(lambda x, y: cond(x) and cond(y), iterable)",
"\nt = list(filterfalse(cond, iterable))",
"import itertools\nfiltered = filterfalse(cond, iterable)\nt = list(filtered)",
"\nfor i in iterable:\n if not cond(i):\n t.append(i)",
"\nwhile iterable:\n item = iterable.pop()\n if not cond(item):\n t.append(item)",
"\niterable = list(range(5))\ncond = lambda x: x > 2\nfor x in iterable:\n if cond(x):\n t.append(x)",
"\niterable = list(range(5))\ncond = lambda x: x % 2 == 1\nfor x in iterable:\n if cond(x):\n t.append(x)",
"\nitertools.dropwhile(lambda x: x < 0, itertools.cycle(range(5)))",
"\nlist(filter(lambda x: x >= 0, itertools.cycle(range(5))))",
"\n[x for x in itertools.cycle(range(5)) if x >= 0]",
"\nresult = []\nfor element in iterable:\n if not predicate(element):\n result.append(element)",
"\ndef cond(x):\n return True\nresult = reduce(cond, iterable)",
"\ndef helper(x, y):\n return cond(x) and cond(y)\nresult = reduce(helper, iterable)",
"\nt = [i for i in itertools.takewhile(lambda i: i < 5, range(10))]",
"\nt.append(i) if i != 1 else t",
"\nt.append(i + 1)",
"import frozenset\nt = frozenset(iterable)",
"\nt = []\nfor x in iterable:\n if cond(x):\n t.append(x)\nt = np.array(t)",
"\nt = [x for x in iterable if cond(x)]\nt = np.array(t)",
"from itertools import filterfalse\noutput = filterfalse(lambda x: not cond(x), iterable)\nt = np.array(output)",
"\nt = list(set(iterable) & set(t))",
"\nt = set(iterable) & set(t)",
"\nt.extend([i for i in iterable if i in t])",
"\nt = t.intersection(iterable)",
"\nfor i in iterable:\n if i in t:\n t.append(i)",
"\nt.update(iterable)",
"\nfor i in iterable:\n i = cond(i)\n if i:\n t.append(i)",
"\nlist(filter(cond, iterable)).append(t)",
"\nfor i in filter(cond, iterable):\n t.append(i)",
"\nlist(filter(cond, iterable)).extend(t)",
"from functools import partial\nt = tuple((partial(cond, arg)(x) for x in iterable))",
"\nlist(filter(cond, iterable)).append(t) == list(filter(cond, iterable + [t]))",
"\nlist(filter(cond, iterable)).append(t)[-1] == t",
"\nresult = []\nresult.append(t)\nfor i in filter(cond, iterable):\n result.append(i)",
"\n_ = list(filter(cond, iterable))\n_.append(t)",
"\nfunctools.reduce(lambda a, b: a + b if cond(b) else a, iterable, [])",
"\nfor i in iterable:\n if not cond(i):\n continue\n else:\n t.append(i)\nt = tuple(t)",
"\ncollections.Counter(iterable)",
"import itertools\nt = tuple(list(filter(cond, list(islice(iterable, len(iterable))))))",
"\nt = tuple(list(filter(cond, tuple(islice(iterable, len(iterable))))))",
"import functools\nt = functools.reduce(lambda x, y: x, iterable if cond(y) else iterable)",
"\nt = reduce(lambda x, y: x if cond(y) else y, iterable)",
"\nt.extend(list(filter(cond, iterable)))",
"\nlist(filter(cond, itertools.chain(iterable1, iterable2)))",
"from functools import partial\nlist(filter(partial(operator.eq, 4), [1, 2, 4, 5]))"
]