workspace
stringclasses
1 value
channel
stringclasses
1 value
sentences
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
sentence_id
stringlengths
44
53
timestamp
float64
1.5B
1.56B
__index_level_0__
int64
0
106k
pythondev
help
not a code challenge
2018-01-22T07:13:13.000629
Kathleen
pythondev_help_Kathleen_2018-01-22T07:13:13.000629
1,516,605,193.000629
30,324
pythondev
help
It sounds like a codewars challenge haha
2018-01-22T07:13:29.000597
Tanesha
pythondev_help_Tanesha_2018-01-22T07:13:29.000597
1,516,605,209.000597
30,325
pythondev
help
:slightly_smiling_face:
2018-01-22T07:13:47.000612
Kathleen
pythondev_help_Kathleen_2018-01-22T07:13:47.000612
1,516,605,227.000612
30,326
pythondev
help
<@Kathleen> take a look at the boyer moore vote majority algorithm
2018-01-22T07:17:02.001306
Floy
pythondev_help_Floy_2018-01-22T07:17:02.001306
1,516,605,422.001306
30,327
pythondev
help
sure <@Floy> thanks
2018-01-22T07:18:45.000097
Kathleen
pythondev_help_Kathleen_2018-01-22T07:18:45.000097
1,516,605,525.000097
30,328
pythondev
help
Whats best option or preferred method for parsing xml and secondly does this response actually look like XML? ```&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;xml&gt; &lt;title&gt; Schedule for the fortnight beginning, 22-January-2018 &lt;/title&gt; &lt;data&gt; &lt;title&gt;Schedule for the fortnight beginnin...
2018-01-22T08:25:33.000945
Brain
pythondev_help_Brain_2018-01-22T08:25:33.000945
1,516,609,533.000945
30,329
pythondev
help
Because the &lt;![CDATA[ bit onwards just looks to be a string. :S
2018-01-22T08:26:03.000650
Brain
pythondev_help_Brain_2018-01-22T08:26:03.000650
1,516,609,563.00065
30,330
pythondev
help
well, you can use beautifulsoup to parse that
2018-01-22T08:26:53.000705
Floy
pythondev_help_Floy_2018-01-22T08:26:53.000705
1,516,609,613.000705
30,331
pythondev
help
or use other libs directly, like `lxml`
2018-01-22T08:27:01.000006
Floy
pythondev_help_Floy_2018-01-22T08:27:01.000006
1,516,609,621.000006
30,332
pythondev
help
I'm using mechanicalsoup which using bs i think
2018-01-22T08:27:42.000951
Brain
pythondev_help_Brain_2018-01-22T08:27:42.000951
1,516,609,662.000951
30,333
pythondev
help
and apparently `CDATA` is a valid block
2018-01-22T08:27:55.000647
Floy
pythondev_help_Floy_2018-01-22T08:27:55.000647
1,516,609,675.000647
30,334
pythondev
help
<https://stackoverflow.com/a/2784200/214892>
2018-01-22T08:27:56.000665
Floy
pythondev_help_Floy_2018-01-22T08:27:56.000665
1,516,609,676.000665
30,335
pythondev
help
basically, it means that the data between those strings can be interpreted as xml, but it shouldn’t
2018-01-22T08:28:21.000807
Floy
pythondev_help_Floy_2018-01-22T08:28:21.000807
1,516,609,701.000807
30,336
pythondev
help
Ah ok. I've been trying to use minidom and ElementTree to sort it out but just getting into a right pickle. Didn't realise I could use beautifulsoup to parse it
2018-01-22T08:29:03.000452
Brain
pythondev_help_Brain_2018-01-22T08:29:03.000452
1,516,609,743.000452
30,337
pythondev
help
mechanicalsoup has BS as a dependency
2018-01-22T08:29:20.001491
Floy
pythondev_help_Floy_2018-01-22T08:29:20.001491
1,516,609,760.001491
30,338
pythondev
help
yup
2018-01-22T08:29:27.000291
Brain
pythondev_help_Brain_2018-01-22T08:29:27.000291
1,516,609,767.000291
30,339
pythondev
help
I'll take another crack at it :slightly_smiling_face:
2018-01-22T08:29:44.000688
Brain
pythondev_help_Brain_2018-01-22T08:29:44.000688
1,516,609,784.000688
30,340
pythondev
help
do you need to get that cdata out?
2018-01-22T08:29:49.000880
Floy
pythondev_help_Floy_2018-01-22T08:29:49.000880
1,516,609,789.00088
30,341
pythondev
help
<http://redstoneleo.blogspot.com/2016/12/using-beautifulsoup-to-grab-cdata.html>
2018-01-22T08:29:53.000896
Floy
pythondev_help_Floy_2018-01-22T08:29:53.000896
1,516,609,793.000896
30,342
pythondev
help
Yeah everything I want is in the Cdata
2018-01-22T08:30:18.000834
Brain
pythondev_help_Brain_2018-01-22T08:30:18.000834
1,516,609,818.000834
30,343
pythondev
help
Oh ok I'll have a read of this. Thanks
2018-01-22T08:30:26.000977
Brain
pythondev_help_Brain_2018-01-22T08:30:26.000977
1,516,609,826.000977
30,344
pythondev
help
ouch, no version pin for BS4 or lxml in mechanicalsoup :disappointed:
2018-01-22T08:30:30.000218
Floy
pythondev_help_Floy_2018-01-22T08:30:30.000218
1,516,609,830.000218
30,345
pythondev
help
wonder why?
2018-01-22T08:30:37.001102
Floy
pythondev_help_Floy_2018-01-22T08:30:37.001102
1,516,609,837.001102
30,346
pythondev
help
<@Brain> that wasn’t focused at you
2018-01-22T08:31:03.000382
Floy
pythondev_help_Floy_2018-01-22T08:31:03.000382
1,516,609,863.000382
30,347
pythondev
help
just me looking at the requirements.txt for mechanicalsoup and seeing no version pins
2018-01-22T08:31:22.000167
Floy
pythondev_help_Floy_2018-01-22T08:31:22.000167
1,516,609,882.000167
30,348
pythondev
help
:+1:
2018-01-22T08:31:49.000156
Brain
pythondev_help_Brain_2018-01-22T08:31:49.000156
1,516,609,909.000156
30,349
pythondev
help
In terms of getting the Cdata out, ```info = soup.find(text=lambda tag: isinstance(tag, bs4.CData)).string.strip()``` just pulls it out as a string correct? So then I can't just grab the elements I want. Am I better to grab the bits out instead of all the CData?
2018-01-22T09:08:49.000465
Brain
pythondev_help_Brain_2018-01-22T09:08:49.000465
1,516,612,129.000465
30,350
pythondev
help
reading the documentation, sounds like its going to be a string
2018-01-22T09:09:31.000147
Floy
pythondev_help_Floy_2018-01-22T09:09:31.000147
1,516,612,171.000147
30,351
pythondev
help
aka just text alone
2018-01-22T09:09:39.000467
Floy
pythondev_help_Floy_2018-01-22T09:09:39.000467
1,516,612,179.000467
30,352
pythondev
help
:sleepy:
2018-01-22T09:09:56.000738
Brain
pythondev_help_Brain_2018-01-22T09:09:56.000738
1,516,612,196.000738
30,353
pythondev
help
so, you’ll probably have to make another soup object with that content
2018-01-22T09:09:57.000949
Floy
pythondev_help_Floy_2018-01-22T09:09:57.000949
1,516,612,197.000949
30,354
pythondev
help
okidoke
2018-01-22T09:10:05.001068
Brain
pythondev_help_Brain_2018-01-22T09:10:05.001068
1,516,612,205.001068
30,355
pythondev
help
pls suggest me some good library to convert a PDF to HTML(5) retaining position/layout
2018-01-22T10:33:11.001175
Krista
pythondev_help_Krista_2018-01-22T10:33:11.001175
1,516,617,191.001175
30,356
pythondev
help
Has anyone used flask-menu extension before? I can't really get my head around the tutorials, I want to created a tree like structure dropdown menu, is this possible?
2018-01-22T11:09:16.001045
Milo
pythondev_help_Milo_2018-01-22T11:09:16.001045
1,516,619,356.001045
30,357
pythondev
help
Thanks. I’ll have to check my datatypes. I was playing with lat lngs and the between worked on the positive lats but didn’t seem to work on negative lngs. I wasn’t too worried though because my final solution is with MySQL or Postgres so it will be even more complex but will work for sure. Just in dev stages right...
2018-01-22T12:47:33.000373
Silvia
pythondev_help_Silvia_2018-01-22T12:47:33.000373
1,516,625,253.000373
30,358
pythondev
help
Hey
2018-01-22T12:51:54.000028
Gwyn
pythondev_help_Gwyn_2018-01-22T12:51:54.000028
1,516,625,514.000028
30,359
pythondev
help
Quick question, to skip an iteration on a while/for loop, is it `pass` or `continue` ?
2018-01-22T12:52:14.000782
Gwyn
pythondev_help_Gwyn_2018-01-22T12:52:14.000782
1,516,625,534.000782
30,360
pythondev
help
because continue doesn't seem to work as intended :confused:
2018-01-22T12:52:57.000407
Gwyn
pythondev_help_Gwyn_2018-01-22T12:52:57.000407
1,516,625,577.000407
30,361
pythondev
help
continue should be what you want, maybe post your code if its not working as you'd expect?
2018-01-22T12:54:22.000258
Leanora
pythondev_help_Leanora_2018-01-22T12:54:22.000258
1,516,625,662.000258
30,362
pythondev
help
<https://docs.python.org/3/reference/simple_stmts.html#continue>
2018-01-22T12:54:23.000520
Leanora
pythondev_help_Leanora_2018-01-22T12:54:23.000520
1,516,625,663.00052
30,363
pythondev
help
<@Tim> are you in the Navy or just a nickname?
2018-01-22T12:57:53.000759
Davina
pythondev_help_Davina_2018-01-22T12:57:53.000759
1,516,625,873.000759
30,364
pythondev
help
could it be caused by the `try/catch` or the `elif` ?
2018-01-22T12:58:12.000174
Gwyn
pythondev_help_Gwyn_2018-01-22T12:58:12.000174
1,516,625,892.000174
30,365
pythondev
help
What would the expected results be if it was continuing as expected?
2018-01-22T13:00:52.000432
Leanora
pythondev_help_Leanora_2018-01-22T13:00:52.000432
1,516,626,052.000432
30,366
pythondev
help
Well it wouldn't throw an error first of all
2018-01-22T13:01:28.001310
Gwyn
pythondev_help_Gwyn_2018-01-22T13:01:28.001310
1,516,626,088.00131
30,367
pythondev
help
I shortened the json responses
2018-01-22T13:01:45.000776
Gwyn
pythondev_help_Gwyn_2018-01-22T13:01:45.000776
1,516,626,105.000776
30,368
pythondev
help
```b'[{"id":160,"name":}] Traceback (most recent call last): b'403 Forbidden (Spam Rate Limit Exceeded)'```
2018-01-22T13:02:05.001028
Gwyn
pythondev_help_Gwyn_2018-01-22T13:02:05.001028
1,516,626,125.001028
30,369
pythondev
help
See here there's a response like it's supposed to have, then there's an error because the response.content contains the error message
2018-01-22T13:02:38.000095
Gwyn
pythondev_help_Gwyn_2018-01-22T13:02:38.000095
1,516,626,158.000095
30,370
pythondev
help
but it should'nt happen because when an error occurs it should `continue` and skip that part
2018-01-22T13:03:03.000416
Gwyn
pythondev_help_Gwyn_2018-01-22T13:03:03.000416
1,516,626,183.000416
30,371
pythondev
help
see where i'm going ?
2018-01-22T13:03:09.000346
Gwyn
pythondev_help_Gwyn_2018-01-22T13:03:09.000346
1,516,626,189.000346
30,372
pythondev
help
Okay i've found something else
2018-01-22T13:03:55.000445
Gwyn
pythondev_help_Gwyn_2018-01-22T13:03:55.000445
1,516,626,235.000445
30,373
pythondev
help
I've placed a print just before my `sleep` and it never prints it
2018-01-22T13:04:09.000585
Gwyn
pythondev_help_Gwyn_2018-01-22T13:04:09.000585
1,516,626,249.000585
30,374
pythondev
help
so my condition is wrong
2018-01-22T13:04:25.001031
Gwyn
pythondev_help_Gwyn_2018-01-22T13:04:25.001031
1,516,626,265.001031
30,375
pythondev
help
That would make more sense then :smiley:
2018-01-22T13:05:14.000107
Leanora
pythondev_help_Leanora_2018-01-22T13:05:14.000107
1,516,626,314.000107
30,376
pythondev
help
I'm retired Navy. Starting to learn Python for my Infosec job
2018-01-22T13:05:17.000533
Tim
pythondev_help_Tim_2018-01-22T13:05:17.000533
1,516,626,317.000533
30,377
pythondev
help
yeah :confused: I'm trying to remove the `try/catch`
2018-01-22T13:05:29.000986
Gwyn
pythondev_help_Gwyn_2018-01-22T13:05:29.000986
1,516,626,329.000986
30,378
pythondev
help
Are you retiring out on the “response =“ part ? Try putting that part in your try block
2018-01-22T13:23:43.000887
Silvia
pythondev_help_Silvia_2018-01-22T13:23:43.000887
1,516,627,423.000887
30,379
pythondev
help
Getting the error on the “response *
2018-01-22T13:24:43.000865
Silvia
pythondev_help_Silvia_2018-01-22T13:24:43.000865
1,516,627,483.000865
30,380
pythondev
help
Auto correct is horrible
2018-01-22T13:25:01.000461
Silvia
pythondev_help_Silvia_2018-01-22T13:25:01.000461
1,516,627,501.000461
30,381
pythondev
help
I got it in the end thanks you guys <@Leanora> and <@Silvia> here's the final commit <https://github.com/Seluj78/IntraPy/commit/b3305e1f0423704d5d554a189cad311a6b25bd03>
2018-01-22T13:38:17.000331
Gwyn
pythondev_help_Gwyn_2018-01-22T13:38:17.000331
1,516,628,297.000331
30,382
pythondev
help
Running into a weird issue which I don't think affects much or causes problems, but it's bugging me. Running `concurrent.futures` multi-threaded pool of workers on a job which takes in a list of urls to send requests out to.
2018-01-22T14:19:29.000067
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:19:29.000067
1,516,630,769.000067
30,383
pythondev
help
When running through the submit process which I have setup as such
2018-01-22T14:20:10.000715
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:20:10.000715
1,516,630,810.000715
30,384
pythondev
help
``` def tqdm_parallel_map(executor, fn, *iterables): """ Equivalent to executor.map(fn, *iterables), but displays a tqdm-based progress bar. Does not support timeout or chunksize as executor.submit is used internally **kwargs is passed to tqdm. """ for iterable in iterables: future...
2018-01-22T14:20:38.000163
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:20:38.000163
1,516,630,838.000163
30,385
pythondev
help
Can't use snippets for some reason, sorry
2018-01-22T14:20:50.000102
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:20:50.000102
1,516,630,850.000102
30,386
pythondev
help
So this works for the most part, but in the line `futures_list = [executor.submit(fn, i) for i in iterable]` I get a console message `list index out of range`
2018-01-22T14:21:27.001274
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:21:27.001274
1,516,630,887.001274
30,387
pythondev
help
for no apparent reason
2018-01-22T14:21:30.000830
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:21:30.000830
1,516,630,890.00083
30,388
pythondev
help
And it doesn't come up as an error, just a sort of debug message
2018-01-22T14:21:49.000922
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:21:49.000922
1,516,630,909.000922
30,389
pythondev
help
what is `iterable`?
2018-01-22T14:22:07.000126
Floy
pythondev_help_Floy_2018-01-22T14:22:07.000126
1,516,630,927.000126
30,390
pythondev
help
It is a list of strings
2018-01-22T14:25:50.000593
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:25:50.000593
1,516,631,150.000593
30,391
pythondev
help
so take out of that context. `[ (idx, val) for idx, val in enumerate(iterable)]` with the same string?
2018-01-22T14:30:15.001359
Floy
pythondev_help_Floy_2018-01-22T14:30:15.001359
1,516,631,415.001359
30,392
pythondev
help
What should I do with that <@Floy>
2018-01-22T14:32:26.000635
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:32:26.000635
1,516,631,546.000635
30,393
pythondev
help
if you are able to extract the value of `iterable` that throws the error, are you able to get the same issue in the console?
2018-01-22T14:33:03.000242
Floy
pythondev_help_Floy_2018-01-22T14:33:03.000242
1,516,631,583.000242
30,394
pythondev
help
Oh gotcha, let me see
2018-01-22T14:33:14.000382
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:33:14.000382
1,516,631,594.000382
30,395
pythondev
help
Multi-threaded debugging is absolutely impossible LOL
2018-01-22T14:42:27.000565
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:42:27.000565
1,516,632,147.000565
30,396
pythondev
help
ha, it can be a pain
2018-01-22T14:45:33.000028
Floy
pythondev_help_Floy_2018-01-22T14:45:33.000028
1,516,632,333.000028
30,397
pythondev
help
should you consider getting a lock on that loop?
2018-01-22T14:45:51.000800
Floy
pythondev_help_Floy_2018-01-22T14:45:51.000800
1,516,632,351.0008
30,398
pythondev
help
Well I'm really just curious what's causing the issue cause it's just a print to console and I can't find it anywhere but I found the item in the list which causes the issue
2018-01-22T14:46:37.000625
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:46:37.000625
1,516,632,397.000625
30,399
pythondev
help
OH WAIT
2018-01-22T14:47:14.000830
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:47:14.000830
1,516,632,434.00083
30,400
pythondev
help
I think I found it. It's my own debug message :upside_down_face: Let me see
2018-01-22T14:47:33.000577
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:47:33.000577
1,516,632,453.000577
30,401
pythondev
help
Okay, it was an unneeded message. I got rid of it.
2018-01-22T14:51:04.000438
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:51:04.000438
1,516,632,664.000438
30,402
pythondev
help
:rubberduck:
2018-01-22T14:54:20.000751
Floy
pythondev_help_Floy_2018-01-22T14:54:20.000751
1,516,632,860.000751
30,403
pythondev
help
Hilarious that it was the only entry out of 100 MB of .csv that gave that error
2018-01-22T14:57:19.000667
Cherlyn
pythondev_help_Cherlyn_2018-01-22T14:57:19.000667
1,516,633,039.000667
30,404
pythondev
help
any idea what im doing wrong?
2018-01-22T15:17:57.000490
Ramonita
pythondev_help_Ramonita_2018-01-22T15:17:57.000490
1,516,634,277.00049
30,405
pythondev
help
What are you trying to do <@Ramonita>
2018-01-22T15:21:04.000667
Cherlyn
pythondev_help_Cherlyn_2018-01-22T15:21:04.000667
1,516,634,464.000667
30,406
pythondev
help
search over txt files and it put file name line number and the line
2018-01-22T15:21:36.000310
Ramonita
pythondev_help_Ramonita_2018-01-22T15:21:36.000310
1,516,634,496.00031
30,407
pythondev
help
it prints fine
2018-01-22T15:21:46.000938
Ramonita
pythondev_help_Ramonita_2018-01-22T15:21:46.000938
1,516,634,506.000938
30,408
pythondev
help
however when adding to txtfile it puts the \non the end
2018-01-22T15:22:07.001200
Ramonita
pythondev_help_Ramonita_2018-01-22T15:22:07.001200
1,516,634,527.0012
30,409
pythondev
help
Oh it shows the "\n" as a text
2018-01-22T15:22:11.001294
Cherlyn
pythondev_help_Cherlyn_2018-01-22T15:22:11.001294
1,516,634,531.001294
30,410
pythondev
help
yes
2018-01-22T15:22:28.000644
Ramonita
pythondev_help_Ramonita_2018-01-22T15:22:28.000644
1,516,634,548.000644
30,411
pythondev
help
in the text file
2018-01-22T15:22:31.000818
Ramonita
pythondev_help_Ramonita_2018-01-22T15:22:31.000818
1,516,634,551.000818
30,412
pythondev
help
Hmmmm
2018-01-22T15:23:07.000660
Cherlyn
pythondev_help_Cherlyn_2018-01-22T15:23:07.000660
1,516,634,587.00066
30,413
pythondev
help
<@Cherlyn>
2018-01-22T15:23:07.000712
Ramonita
pythondev_help_Ramonita_2018-01-22T15:23:07.000712
1,516,634,587.000712
30,414
pythondev
help
What OS are you on?
2018-01-22T15:23:34.000640
Keli
pythondev_help_Keli_2018-01-22T15:23:34.000640
1,516,634,614.00064
30,415
pythondev
help
python 3
2018-01-22T15:23:54.000325
Ramonita
pythondev_help_Ramonita_2018-01-22T15:23:54.000325
1,516,634,634.000325
30,416
pythondev
help
mac os
2018-01-22T15:23:55.001310
Ramonita
pythondev_help_Ramonita_2018-01-22T15:23:55.001310
1,516,634,635.00131
30,417
pythondev
help
<@Staci>
2018-01-22T15:25:52.001062
Ramonita
pythondev_help_Ramonita_2018-01-22T15:25:52.001062
1,516,634,752.001062
30,418
pythondev
help
uhm, you don’t have to ping everyone always
2018-01-22T15:26:18.001040
Floy
pythondev_help_Floy_2018-01-22T15:26:18.001040
1,516,634,778.00104
30,419
pythondev
help
So, the file is all one line in your text editor with '\n'? What text editor are you using? If you cat the file in the terminal what happens?
2018-01-22T15:27:31.000850
Keli
pythondev_help_Keli_2018-01-22T15:27:31.000850
1,516,634,851.00085
30,420
pythondev
help
just use to it other chats do it alot.
2018-01-22T15:27:33.000185
Ramonita
pythondev_help_Ramonita_2018-01-22T15:27:33.000185
1,516,634,853.000185
30,421
pythondev
help
no its all separate lines its doing it just with the \n at the end
2018-01-22T15:28:01.000442
Ramonita
pythondev_help_Ramonita_2018-01-22T15:28:01.000442
1,516,634,881.000442
30,422
pythondev
help
Ok, and what happens if you do `currentsearch.write("{0}".format(cs))`?
2018-01-22T15:28:39.000295
Keli
pythondev_help_Keli_2018-01-22T15:28:39.000295
1,516,634,919.000295
30,423