Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

logreg_validation_3_chunksize_10_conf_matrix_TN.txt 13 KB

You have to be logged in to leave a comment. Sign In
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
  1. "SomeModel.objects.filter(id=id).delete()
  2. dict([['two', 2], ['one', 1]])
  3. dict(zip(l[::2], l[1::2]))
  4. GRAVITY = 9.8
  5. re.findall('(([0-9]+)([A-Z]))', '20M10000N80M')
  6. re.findall('([0-9]+|[A-Z])', '20M10000N80M')
  7. re.findall('([0-9]+)([A-Z])', '20M10000N80M')
  8. re.compile('\\w+').findall('Hello world, my name is...James the 2nd!')
  9. datetime.datetime.strptime('03:55', '%H:%M').time()"
  10. "numpy.array([(x in a) for x in b])
  11. networkx.draw_networkx_labels(G, pos, labels)
  12. y = [row[:] for row in x]
  13. X = numpy.loadtxt('somefile.csv', delimiter=',')
  14. matching = [s for s in some_list if 'abc' in s]
  15. df.to_csv('mydf.tsv', sep='\t')
  16. random.sample(list(range(100)), 10)
  17. s.rsplit(',', 1)
  18. all(isinstance(x, int) for x in lst)"
  19. "browser.find_elements_by_xpath(""//*[@type='submit']/@value"").text
  20. browser.find_elements_by_xpath(""//*[@type='submit']"").get_attribute('value')
  21. with open('example.yaml', 'r') as stream:
  22. try:
  23. print((yaml.load(stream)))
  24. except yaml.YAMLError as exc:
  25. print(exc)
  26. with open('example.yaml') as stream:
  27. try:"
  28. "my_function(**data)
  29. sum((1 for line in open('myfile.txt')))
  30. def bufcount(filename):
  31. f = open(filename)
  32. lines = 0
  33. buf_size = (1024 * 1024)
  34. read_f = f.read
  35. buf = read_f(buf_size)
  36. while buf:"
  37. "ftp.retrbinary('RETR %s' % filename, file.write)
  38. urlfetch.fetch(url, deadline=10 * 60)
  39. print(my_string[0:100])
  40. legend(numpoints=1)
  41. dict((x, set(y) & set(d1.get(x, ()))) for x, y in d2.items())
  42. numpy.loadtxt(open('test.csv', 'rb'), delimiter=',', skiprows=1)
  43. Sample.objects.filter(date__range=['2011-01-01', '2011-01-31'])
  44. Sample.objects.filter(date__year='2011', date__month='01')
  45. d['dict3'] = {'spam': 5, 'ham': 6}"
  46. "a.shape
  47. N.shape(a)
  48. N.shape(a)
  49. a.shape
  50. [i for i, v in enumerate(L) if v[0] == 53]
  51. struct.unpack('<L', 'y\xcc\xa6\xbb')[0]
  52. arr[[0, 1, 1], [1, 0, 2]]
  53. list(powerset('abcd'))
  54. s in ['true', '1', 't', 'y', 'yes', 'yeah', 'yup', 'certainly', 'uh-huh']"
  55. " pass
  56. for (letter, number) in list(d.items()):
  57. pass
  58. for (k, v) in list(d.items()):
  59. pass
  60. list(d.items())
  61. list(d.items())
  62. for (k, v) in list(d.items()):
  63. pass"
  64. "img = Image.open('picture.jpg')
  65. img.show()
  66. img = Image.open('picture.jpg')
  67. Img.show
  68. sys.exit(0)
  69. sys.exit('aa! errors!')
  70. sys.exit()
  71. [max(abs(x) for x in arr[i:i + 4]) for i in range(0, len(arr), 4)]
  72. os.chdir('c:\\Users\\uname\\desktop\\python')"
  73. "((25 < a) & (a < 100)).sum()
  74. date.today().strftime('%A')
  75. re.search('\\bis\\b', your_string)
  76. {{car.date_of_manufacture | datetime}}
  77. {{car.date_of_manufacture.strftime('%Y-%m-%d')}}
  78. [item for sublist in l for item in sublist]
  79. list(itertools.chain(*list2d))
  80. list(itertools.chain.from_iterable(list2d))
  81. ord('a')"
  82. "print(func.__name__)
  83. """""""""""".join('{}{}'.format(key, val) for key, val in sorted(adict.items()))
  84. """""""""""".join('{}{}'.format(key, val) for key, val in list(adict.items()))
  85. new_list = old_list[:]
  86. new_list = list(old_list)
  87. new_list = copy.copy(old_list)
  88. new_list = copy.deepcopy(old_list)
  89. [i for i in old_list]
  90. plt.legend(frameon=False)"
  91. "globals()['myfunction']()
  92. urllib.request.urlopen('http://www.stackoverflow.com').getcode()
  93. conn = httplib.HTTPConnection('www.python.org')
  94. conn.request('HEAD', '/')
  95. r1 = conn.getresponse()
  96. print(r1.status, r1.reason)
  97. r = requests.head(url)
  98. return (r.status_code == 200)
  99. print(urllib.request.urlopen('http://www.stackoverflow.com').getcode())"
  100. "decimal.Decimal(random.randrange(10000)) / 100
  101. onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
  102. f = []
  103. for (dirpath, dirnames, filenames) in walk(mypath):
  104. f.extend(filenames)
  105. break
  106. print(glob.glob('/home/adam/*.txt'))
  107. os.listdir('somedirectory')
  108. cur.executemany('INSERT INTO table VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s)', tup)"
  109. "else:
  110. print('The strings are not the same (case insensitive)')
  111. if (string1.lower() == string2.lower()):
  112. pass
  113. (string1.lower() == string2.lower())
  114. (first.lower() == second.lower())
  115. (first.upper() == second.upper())
  116. os.system(""awk '{print $10, $11}' test.txt > test2.txt"")
  117. del my_list[2:6]"
  118. "if ('blah' not in somestring):
  119. pass
  120. if (needle in haystack):
  121. pass
  122. string.find('substring')
  123. if (s.find('is') == (-1)):
  124. print(""No 'is' here!"")
  125. else:
  126. print(""Found 'is' in the string."")"
  127. "f = open('example.txt')
  128. s = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
  129. if (s.find('blabla') != (-1)):
  130. pass
  131. datafile = file('example.txt')
  132. found = False
  133. for line in datafile:
  134. if (blabla in line):
  135. return True"
  136. "new_list = [x[:] for x in old_list]
  137. """"""{:.50f}"""""".format(float(a[0] / a[1]))
  138. df.to_sparse(0)
  139. print([obj.attr for obj in my_list_of_objs])
  140. sum(1 if d['success'] else 0 for d in s)
  141. sum(d['success'] for d in s)
  142. imp.find_module('os')[1]
  143. (bool(a) != bool(b))
  144. ((a and (not b)) or ((not a) and b))"
  145. "root.geometry('500x500')
  146. re.findall('\\b(?:b+a)+b+\\b', mystring)
  147. str_list = [tuple('{0:.8e}'.format(flt) for flt in sublist) for sublist in lst]
  148. str_list = [['{0:.8e}'.format(flt) for flt in sublist] for sublist in lst]
  149. t = tuple(x[0] for x in s)
  150. datetime.datetime.now().strftime('%a')
  151. ord('a')
  152. ord('\u3042')
  153. ord()"
  154. "random.choice(foo)
  155. set(['a', 'b']).issubset(['a', 'b', 'c'])
  156. set(['a', 'b']).issubset(set(l))
  157. p = Popen(['grep', 'f'], stdout=PIPE, stdin=PIPE, stderr=STDOUT)
  158. grep_stdout = p.communicate(input='one\ntwo\nthree\nfour\nfive\nsix\n')[0]
  159. p = subprocess.Popen(['grep', 'f'], stdout=subprocess.PIPE, stdin=subprocess.PIPE)
  160. p.stdin.write('one\ntwo\nthree\nfour\nfive\nsix\n')
  161. p.communicate()[0]
  162. p.stdin.close()"
  163. "os.path.isfile(fname)
  164. my_file = Path('/path/to/file')
  165. if my_file.is_file():
  166. pass
  167. os.path.exists(file_path)
  168. print(os.path.isfile('/etc/password.txt'))
  169. print(os.path.isfile('/etc'))
  170. print(os.path.exists('/does/not/exist'))
  171. print(os.path.isfile('/does/not/exist'))"
  172. " pass
  173. try:
  174. del mydict[key]
  175. except KeyError:
  176. pass
  177. parser.add_argument('input', nargs='+')
  178. pyplot.plot(x, y, color='#112233')
  179. re.sub('<[^<]+?>', '', text)
  180. a[np.in1d(a, b)]"
  181. "if some_string:
  182. pass
  183. it = iter(sorted(d.items()))
  184. for (key, value) in sorted(d.items()):
  185. pass
  186. return sorted(dict.items())
  187. return iter(sorted(dict.items()))
  188. for (k, v) in sorted(foo.items()):
  189. pass"
  190. "round(2.0005, 3)
  191. round(3.0005, 3)
  192. round(4.0005, 3)
  193. round(8.005, 2)
  194. round(7.005, 2)
  195. round(6.005, 2)
  196. round(1.005, 2)
  197. df['Cat1'].fillna(df['Cat2'])
  198. logging.info('date=%s', date)"
  199. "'hello world'[::(-1)]
  200. s[::(-1)]
  201. ''.join(reversed('foo'))
  202. ''.join(reversed(string))
  203. 'foo'[::(-1)]
  204. a_string[::(-1)]
  205. def reversed_string(a_string):
  206. return a_string[::(-1)]
  207. ''.join(reversed(s))"
  208. "session.query(User).filter_by(id=123).update({'name': 'Bob Marley'})
  209. r = requests.post('http://wikipedia.org', cookies=cookie)
  210. sys.path.insert(0, 'libs')
  211. datetime.datetime.now()
  212. datetime.datetime.now().time()
  213. strftime('%Y-%m-%d %H:%M:%S', gmtime())
  214. str(datetime.now())
  215. datetime.datetime.time(datetime.datetime.now())
  216. ord('\xff')"
  217. " for filename in filenames:
  218. pass
  219. os.listdir(path)
  220. os.rename(dir, dir + '!')
  221. """"""-"""""".join(a + b for a, b in zip(s[::2], s[1::2]))
  222. print('%.3f' % 3.1415)
  223. data[0]['f'] = var
  224. print(a_module.__file__)
  225. print(os.getcwd())"
  226. "urlparse.urldefrag('http://www.address.com/something#something')
  227. urllib.request.urlretrieve('http://example.com/file.ext', '/path/to/dir/filename.ext')
  228. list(set(frozenset(item) for item in L))
  229. [set(item) for item in set(frozenset(item) for item in L)]
  230. p.terminate()
  231. del mylist[:]
  232. ctypes.windll.user32.MessageBoxW(0, 'Error', 'Error', 0)
  233. str_list = list([_f for _f in str_list if _f])
  234. re.sub('[\\ \\n]{2,}', '', yourstring)"
  235. "print(os.path.splitext('/home/user/somefile.txt')[0] + '.jpg')
  236. pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
  237. ax.set_title('$%s \\times 10^{%s}$' % ('3.5', '+20'))
  238. print(os.path.getmtime('/tmp'))
  239. today.strftime('%B')
  240. today.strftime('%B')
  241. [j for i in x for j in i]
  242. print(list(itertools.chain.from_iterable(a)))
  243. datetime.datetime.strptime('January 11, 2010', '%B %d, %Y').strftime('%A')"
  244. "a.remove('b')
  245. a.remove(c)
  246. a.remove(6)
  247. a.remove(6)
  248. if (c in a):
  249. a.remove(c)
  250. try:
  251. a.remove(c)
  252. except ValueError:"
  253. "re.findall('(?=(a.*?a))', 'a 1 a 2 a 3 a 4 a')
  254. np.einsum('ij,kj->jik', X, X)
  255. some_list[(-1)]
  256. some_list[(-2)]
  257. some_list[(- n)]
  258. alist[(-1)]
  259. astr[(-1)]
  260. print([u for v in [[i, i] for i in range(5)] for u in v])
  261. [0, 0, 1, 1, 2, 2, 3, 3, 4, 4]"
  262. "s[s.find('\n') + 1:s.rfind('\n')]
  263. {(x ** 2) for x in range(100)}
  264. zip(*[[1, 2], [3, 4], [5, 6]])
  265. zip(*[[1, 2], [3, 4], [5, 6]])
  266. requests.get('https://www.mysite.com/', auth=('username', 'pwd'))
  267. x[2:]
  268. x[:2]
  269. x[:(-2)]
  270. x[(-2):]"
  271. "numpy.random.choice(numpy.arange(1, 7), p=[0.1, 0.05, 0.05, 0.2, 0.4, 0.2])
  272. df.loc[df['Value'].idxmax()]
  273. re.findall('^(.+?)((.+)\\3+)$', '42344343434')[0][:-1]
  274. np.fromstring('\x00\x00\x80?\x00\x00\x00@\x00\x00@@\x00\x00\x80@', dtype='<f4')
  275. np.fromstring('\x00\x00\x80?\x00\x00\x00@\x00\x00@@\x00\x00\x80@', dtype='>f4')
  276. cursor.execute('INSERT INTO table VALUES (?, ?, ?)', (var1, var2, var3))
  277. cursor.execute('INSERT INTO table VALUES (%s, %s, %s)', (var1, var2, var3))
  278. cursor.execute('INSERT INTO table VALUES (%s, %s, %s)', (var1, var2, var3))
  279. df['stats'].str[1:-1].str.split(',', expand=True).astype(float)"
  280. "getattr(a, 'property', 'default value')
  281. np.delete(a, list(range(0, a.shape[1], 8)), axis=1)
  282. datetime.datetime.fromtimestamp(ms / 1000.0)
  283. np.einsum('...j,...j->...', vf, vf)
  284. r = requests.get(url)
  285. r = requests.get(url, params=payload)
  286. r = requests.post(url, data=payload)
  287. post_response = requests.post(url='http://httpbin.org/post', json=post_data)
  288. {{(mylist | slice): '3:8'}}"
  289. "subprocess.call(['shutdown', '/r', '/t', '900'])
  290. subprocess.call(['shutdown', '/s'])
  291. subprocess.call(['shutdown', '/a '])
  292. subprocess.call(['shutdown', '/l '])
  293. subprocess.call(['shutdown', '/r'])
  294. open('filename', 'w').close()
  295. open('file.txt', 'w').close()
  296. df.to_dict('index')
  297. df.to_dict('records')"
  298. "raise AssertionError(""Unexpected value of 'distance'!"", distance)
  299. driver.find_element_by_id('foo').clear()
  300. driver.find_element_by_id('foo').clear()
  301. socket.inet_ntoa(struct.pack('!L', 2130706433))
  302. df = df[['x', 'y', 'a', 'b']]
  303. super(ChildClass, self).__init__(*args, **kwargs)
  304. sum(d.values())
  305. sum(d.values())
  306. json.dumps(your_data, ensure_ascii=False)"
  307. "block_sz = 8192
  308. while True:
  309. buffer = u.read(block_sz)
  310. if (not buffer):
  311. break
  312. file_size_dl += len(buffer)
  313. f.write(buffer)
  314. status = ('%10d [%3.2f%%]' % (file_size_dl, ((file_size_dl * 100.0) / file_size)))
  315. status = (status + (chr(8) * (len(status) + 1)))"
  316. "db.execute(""INSERT INTO present VALUES('test2', ?, 10)"", (None,))
  317. [image for menuitem in list_of_menuitems for image in menuitem]
  318. a.extend(b)
  319. a.extend(list(b))
  320. np.savetxt('c:\\data\\np.txt', df.values, fmt='%d')
  321. df.to_csv('c:\\data\\pandas.txt', header=None, index=None, sep=' ', mode='a')
  322. print(x.rpartition('-')[0])
  323. print(x.rsplit('-', 1)[0])
  324. ftp.storlines('STOR ' + filename, open(filename, 'r'))"
  325. "np.maximum([2, 3, 4], [1, 5, 2])
  326. print(l[3:] + l[:3])
  327. for fn in os.listdir('.'):
  328. if os.path.isfile(fn):
  329. pass
  330. for (root, dirs, filenames) in os.walk(source):
  331. for f in filenames:
  332. pass
  333. [int(1000 * random.random()) for i in range(10000)]"
  334. "np.vstack((A, B))
  335. os.stat(filepath).st_size
  336. l.count('a')
  337. Counter(l)
  338. [[x, l.count(x)] for x in set(l)]
  339. dict(((x, l.count(x)) for x in set(l)))
  340. l.count('b')
  341. shutil.copy(srcfile, dstdir)
  342. max(k for k, v in x.items() if v != 0)"
  343. "raw_byte_string.decode('unicode_escape')
  344. [m.group(0) for m in re.finditer('(\\d)\\1*', s)]
  345. plt.scatter(np.random.randn(100), np.random.randn(100), facecolors='none')
  346. plt.plot(np.random.randn(100), np.random.randn(100), 'o', mfc='none')
  347. soup.find('div', id='main-content').decompose()
  348. df[df['ids'].str.contains('ball')]
  349. df.reset_index(level=0, inplace=True)
  350. df['index1'] = df.index
  351. df.reset_index(level=['tick', 'obs'])"
  352. "[i for (i, x) in enumerate(testlist) if (x == 1)]
  353. [i for (i, x) in enumerate(testlist) if (x == 1)]
  354. for i in [i for (i, x) in enumerate(testlist) if (x == 1)]:
  355. pass
  356. for i in (i for (i, x) in enumerate(testlist) if (x == 1)):
  357. pass
  358. gen = (i for (i, x) in enumerate(testlist) if (x == 1))
  359. for i in gen:
  360. pass"
  361. "datetime.now(pytz.utc)
  362. list2 = [x for x in list1 if x != []]
  363. list2 = [x for x in list1 if x]
  364. return HttpResponse(data, mimetype='application/json')
  365. re.findall('(.*?)\\[.*?\\]', example_str)
  366. re.findall('(.*?)(?:\\[.*?\\]|$)', example_str)
  367. re.findall('\\(.+?\\)|\\w', '(zyx)bc')
  368. re.findall('\\((.*?)\\)|(\\w)', '(zyx)bc')
  369. re.findall('\\(.*?\\)|\\w', '(zyx)bc')"
  370. " pass
  371. for (root, dirs, files) in os.walk('/mydir'):
  372. for file in files:
  373. if file.endswith('.txt'):
  374. pass
  375. df.plot(legend=False)
  376. for i in range(256):
  377. for j in range(256):
  378. ip = ('192.168.%d.%d' % (i, j))"
  379. "import imp
  380. imp.reload(module)
  381. struct.unpack('H', struct.pack('h', number))
  382. numlist = [float(x) for x in numlist]
  383. df.to_csv(filename, index=False)
  384. json_data = json.loads(unescaped)
  385. [chr(i) for i in range(127)]
  386. newFile.write(struct.pack('5B', *newFileBytes))
  387. re.sub('^[A-Z0-9]*(?![a-z])', '', string)"
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...