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
haha, ass
2018-01-25T15:08:54.000194
Sadye
pythondev_help_Sadye_2018-01-25T15:08:54.000194
1,516,892,934.000194
31,324
pythondev
help
There is a discussion about replacing the autoresponse with a reaction instead
2018-01-25T15:09:38.000107
Cori
pythondev_help_Cori_2018-01-25T15:09:38.000107
1,516,892,978.000107
31,325
pythondev
help
i sense a good xzhibit meme for autoresponses, ” I heard you like autoresponses so I’ve made an autoresponse for your autoresponse”
2018-01-25T15:09:49.000373
Davina
pythondev_help_Davina_2018-01-25T15:09:49.000373
1,516,892,989.000373
31,326
pythondev
help
yeah, there are just no good autoresponses
2018-01-25T15:10:13.000473
Garrett
pythondev_help_Garrett_2018-01-25T15:10:13.000473
1,516,893,013.000473
31,327
pythondev
help
they have maintain the humor when you've seen them 10 times in a few minutes. that's not going to happen.
2018-01-25T15:10:26.000475
Garrett
pythondev_help_Garrett_2018-01-25T15:10:26.000475
1,516,893,026.000475
31,328
pythondev
help
I've added "I'd just like to interject for a moment..." long autoresponse on every "linux" in my job slack workplace
2018-01-25T15:11:37.000384
Sadye
pythondev_help_Sadye_2018-01-25T15:11:37.000384
1,516,893,097.000384
31,329
pythondev
help
It is still yet to be seen :smile:
2018-01-25T15:11:44.000683
Sadye
pythondev_help_Sadye_2018-01-25T15:11:44.000683
1,516,893,104.000683
31,330
pythondev
help
that's awesome, what's that one about the freedom vector for FOSS, I think that'd be a fun "trap" too
2018-01-25T15:12:49.000450
Monroe
pythondev_help_Monroe_2018-01-25T15:12:49.000450
1,516,893,169.00045
31,331
pythondev
help
bleh, can't find it
2018-01-25T15:14:45.000459
Monroe
pythondev_help_Monroe_2018-01-25T15:14:45.000459
1,516,893,285.000459
31,332
pythondev
help
Thanks <@Monroe>, I'll check those out. I didn't know there was native support for declaring types. I'll have to read up and try it out
2018-01-25T15:30:36.000665
Chandra
pythondev_help_Chandra_2018-01-25T15:30:36.000665
1,516,894,236.000665
31,333
pythondev
help
anytime, I just happen to do a presentation on it so I'm up on it. Type declaration is put in `__annotations__` and completely ignored at run-time. It's used prophylactically in python. Improve readability and reduce errors *prior* to production are the main-focus. This is not functional programming in the traditio...
2018-01-25T15:32:07.000188
Monroe
pythondev_help_Monroe_2018-01-25T15:32:07.000188
1,516,894,327.000188
31,334
pythondev
help
<@Andrew> Thats what happens if you are not logged into slack, for instance if you go to that url in an incognito/private window you will see the redirect happen
2018-01-25T17:45:16.000096
Leanora
pythondev_help_Leanora_2018-01-25T17:45:16.000096
1,516,902,316.000096
31,335
pythondev
help
so i should send some kind of login token in the request headers?
2018-01-25T17:47:11.000519
Andrew
pythondev_help_Andrew_2018-01-25T17:47:11.000519
1,516,902,431.000519
31,336
pythondev
help
I'm not familiar enough with slack's authentication in particular to answer specifically but broadly yes, you'd need to be making an authenticated request whether its through a header, cookies, etc
2018-01-25T17:52:21.000149
Leanora
pythondev_help_Leanora_2018-01-25T17:52:21.000149
1,516,902,741.000149
31,337
pythondev
help
how do i invite my friend to this server?
2018-01-25T19:17:31.000117
Candida
pythondev_help_Candida_2018-01-25T19:17:31.000117
1,516,907,851.000117
31,338
pythondev
help
/invite_people <mailto:email@example.com|email@example.com>
2018-01-25T19:18:04.000160
Kathlyn
pythondev_help_Kathlyn_2018-01-25T19:18:04.000160
1,516,907,884.00016
31,339
pythondev
help
click the “Python Developers” thing in top left and click Invite People
2018-01-25T19:18:18.000055
Kathlyn
pythondev_help_Kathlyn_2018-01-25T19:18:18.000055
1,516,907,898.000055
31,340
pythondev
help
or you can wish upon a :star:
2018-01-25T21:29:46.000090
Davina
pythondev_help_Davina_2018-01-25T21:29:46.000090
1,516,915,786.00009
31,341
pythondev
help
jk
2018-01-25T21:29:54.000152
Davina
pythondev_help_Davina_2018-01-25T21:29:54.000152
1,516,915,794.000152
31,342
pythondev
help
any boto3 users here?
2018-01-26T05:17:39.000591
Eliseo
pythondev_help_Eliseo_2018-01-26T05:17:39.000591
1,516,943,859.000591
31,343
pythondev
help
<@Eliseo> what's your question?
2018-01-26T05:24:34.000096
Aleida
pythondev_help_Aleida_2018-01-26T05:24:34.000096
1,516,944,274.000096
31,344
pythondev
help
<@Aleida> i am tryong to do some s3 data manipulation. I am using `client=boto3.client('s3')` What i dont understand is should i be using a different client objects in the different processes, or use the same one?
2018-01-26T05:28:05.000466
Eliseo
pythondev_help_Eliseo_2018-01-26T05:28:05.000466
1,516,944,485.000466
31,345
pythondev
help
if i run multiple `client.download_file` in diffferent threads/process
2018-01-26T05:28:37.000318
Eliseo
pythondev_help_Eliseo_2018-01-26T05:28:37.000318
1,516,944,517.000318
31,346
pythondev
help
is it actually concurrent, if using the same client objecr
2018-01-26T05:28:55.000310
Eliseo
pythondev_help_Eliseo_2018-01-26T05:28:55.000310
1,516,944,535.00031
31,347
pythondev
help
<http://boto3.readthedocs.io/en/latest/guide/resources.html#multithreading-multiprocessing>
2018-01-26T05:29:51.000626
Aleida
pythondev_help_Aleida_2018-01-26T05:29:51.000626
1,516,944,591.000626
31,348
pythondev
help
<@Aleida> yeah i had gone through that link. Its talking about resource object
2018-01-26T05:32:16.000293
Eliseo
pythondev_help_Eliseo_2018-01-26T05:32:16.000293
1,516,944,736.000293
31,349
pythondev
help
A client is a resource
2018-01-26T05:33:29.000611
Aleida
pythondev_help_Aleida_2018-01-26T05:33:29.000611
1,516,944,809.000611
31,350
pythondev
help
oh ok. Thanks <@Aleida>. makes sense now
2018-01-26T05:35:36.000225
Eliseo
pythondev_help_Eliseo_2018-01-26T05:35:36.000225
1,516,944,936.000225
31,351
pythondev
help
I'm looking for a way to install from a setup.py a github tar package :confused:
2018-01-26T05:47:26.000038
Stefan
pythondev_help_Stefan_2018-01-26T05:47:26.000038
1,516,945,646.000038
31,352
pythondev
help
doubting whether it is possible
2018-01-26T05:47:38.000440
Stefan
pythondev_help_Stefan_2018-01-26T05:47:38.000440
1,516,945,658.00044
31,353
pythondev
help
(particularly for spacy models)
2018-01-26T05:48:14.000250
Stefan
pythondev_help_Stefan_2018-01-26T05:48:14.000250
1,516,945,694.00025
31,354
pythondev
help
you can install from a github repo. not sure about a .tar
2018-01-26T05:49:27.000145
Micki
pythondev_help_Micki_2018-01-26T05:49:27.000145
1,516,945,767.000145
31,355
pythondev
help
Can’t you just do something like: ```dependency_links=['<http://github.com/user/repo/tarball/master#egg=package-1.0>']```
2018-01-26T05:51:46.000116
Jama
pythondev_help_Jama_2018-01-26T05:51:46.000116
1,516,945,906.000116
31,356
pythondev
help
Heya :slightly_smiling_face:
2018-01-26T07:55:40.000120
Pennie
pythondev_help_Pennie_2018-01-26T07:55:40.000120
1,516,953,340.00012
31,357
pythondev
help
Is it possible to loop over the beginning of the name of a file ? For example I have fig1-blablablaA, fig2-blablablaB, fig3-efhezbfehzbf
2018-01-26T07:56:29.000268
Pennie
pythondev_help_Pennie_2018-01-26T07:56:29.000268
1,516,953,389.000268
31,358
pythondev
help
I would like just to loop over the fig numbers
2018-01-26T07:56:37.000080
Pennie
pythondev_help_Pennie_2018-01-26T07:56:37.000080
1,516,953,397.00008
31,359
pythondev
help
is that possible?
2018-01-26T07:56:39.000278
Pennie
pythondev_help_Pennie_2018-01-26T07:56:39.000278
1,516,953,399.000278
31,360
pythondev
help
maybe I can use the index?
2018-01-26T08:01:54.000066
Pennie
pythondev_help_Pennie_2018-01-26T08:01:54.000066
1,516,953,714.000066
31,361
pythondev
help
Based on examples you provided, I'd do ``` filenames = ["fig1-blablablaA", "fig2-blablablaB", "fig3-efhezbfehzbf"] beginnings = [filename.split('-', 1)[0] for filename in file_names] for name in beginnings: do_stuff(name) ```
2018-01-26T08:03:25.000410
Aleida
pythondev_help_Aleida_2018-01-26T08:03:25.000410
1,516,953,805.00041
31,362
pythondev
help
`filename.split('-', 1)` returns `["fig1", "blablablaA"]`
2018-01-26T08:04:03.000253
Aleida
pythondev_help_Aleida_2018-01-26T08:04:03.000253
1,516,953,843.000253
31,363
pythondev
help
0th element is `"fig1"`
2018-01-26T08:04:19.000194
Aleida
pythondev_help_Aleida_2018-01-26T08:04:19.000194
1,516,953,859.000194
31,364
pythondev
help
If you need only numbers without "fig" prefix, the above one-liner becomes totally unreadable and I would suggest to write a function instead: ``` def extract_figure_number(filename): figure = filename.split('-', 1)[0] return int(figure[3:]) # strip "fig" from "fig&lt;number&gt;" ``` And since now you have a r...
2018-01-26T08:07:35.000053
Aleida
pythondev_help_Aleida_2018-01-26T08:07:35.000053
1,516,954,055.000053
31,365
pythondev
help
thanks :smile:
2018-01-26T08:10:55.000144
Pennie
pythondev_help_Pennie_2018-01-26T08:10:55.000144
1,516,954,255.000144
31,366
pythondev
help
Or you could write a regular expression. But remember that if you try to solve a problem with a regular expression, now you have two problems :slightly_smiling_face:
2018-01-26T08:12:20.000025
Aleida
pythondev_help_Aleida_2018-01-26T08:12:20.000025
1,516,954,340.000025
31,367
pythondev
help
can I filenames = os.listdir(mypath)
2018-01-26T08:12:55.000010
Pennie
pythondev_help_Pennie_2018-01-26T08:12:55.000010
1,516,954,375.00001
31,368
pythondev
help
and loop over filenames?
2018-01-26T08:13:00.000160
Pennie
pythondev_help_Pennie_2018-01-26T08:13:00.000160
1,516,954,380.00016
31,369
pythondev
help
Sure, you can try it in a python repl (what appears after you type "python" in a terminal)
2018-01-26T08:14:17.000669
Aleida
pythondev_help_Aleida_2018-01-26T08:14:17.000669
1,516,954,457.000669
31,370
pythondev
help
listdir is annoying as it does not keep the order imposed in the folder
2018-01-26T08:34:44.000103
Pennie
pythondev_help_Pennie_2018-01-26T08:34:44.000103
1,516,955,684.000103
31,371
pythondev
help
you can sort the results
2018-01-26T08:37:57.000363
Floy
pythondev_help_Floy_2018-01-26T08:37:57.000363
1,516,955,877.000363
31,372
pythondev
help
so it gets the order back as it was in the beggining?
2018-01-26T08:39:39.000253
Pennie
pythondev_help_Pennie_2018-01-26T08:39:39.000253
1,516,955,979.000253
31,373
pythondev
help
or sort by fig name?
2018-01-26T08:39:43.000622
Pennie
pythondev_help_Pennie_2018-01-26T08:39:43.000622
1,516,955,983.000622
31,374
pythondev
help
What do you mean by in the beginning? Order in directories can vary a lot between OSes
2018-01-26T08:47:03.000352
Brande
pythondev_help_Brande_2018-01-26T08:47:03.000352
1,516,956,423.000352
31,375
pythondev
help
But yes you can sort by name if that is what you are looking for
2018-01-26T08:49:06.000368
Brande
pythondev_help_Brande_2018-01-26T08:49:06.000368
1,516,956,546.000368
31,376
pythondev
help
I have files fig1- ezfzfzef, fig2-esfzefzfzf etc
2018-01-26T08:50:23.000459
Pennie
pythondev_help_Pennie_2018-01-26T08:50:23.000459
1,516,956,623.000459
31,377
pythondev
help
I want to sort them by fig
2018-01-26T08:50:29.000342
Pennie
pythondev_help_Pennie_2018-01-26T08:50:29.000342
1,516,956,629.000342
31,378
pythondev
help
but ignore the last part of the name
2018-01-26T08:50:34.000515
Pennie
pythondev_help_Pennie_2018-01-26T08:50:34.000515
1,516,956,634.000515
31,379
pythondev
help
<https://stackoverflow.com/a/2669120/6235069> . my answer
2018-01-26T10:25:27.000272
Pennie
pythondev_help_Pennie_2018-01-26T10:25:27.000272
1,516,962,327.000272
31,380
pythondev
help
I needed :slightly_smiling_face:
2018-01-26T10:25:33.000253
Pennie
pythondev_help_Pennie_2018-01-26T10:25:33.000253
1,516,962,333.000253
31,381
pythondev
help
Glad you found it! Sorry got into the office and got pulled away
2018-01-26T10:27:08.000384
Brande
pythondev_help_Brande_2018-01-26T10:27:08.000384
1,516,962,428.000384
31,382
pythondev
help
edit: I'm getting the file size of an image using ```os.stat(item).st_size``` which returns ```66133``` this number is 66kb, how can i return the rounded up version
2018-01-26T10:37:43.000764
Dorie
pythondev_help_Dorie_2018-01-26T10:37:43.000764
1,516,963,063.000764
31,383
pythondev
help
is it currently a floating point number or represented like that as an integer?
2018-01-26T10:39:59.000092
Zack
pythondev_help_Zack_2018-01-26T10:39:59.000092
1,516,963,199.000092
31,384
pythondev
help
Sorry <@Zack>, I've edited my question
2018-01-26T10:41:07.000463
Dorie
pythondev_help_Dorie_2018-01-26T10:41:07.000463
1,516,963,267.000463
31,385
pythondev
help
so the question is actually that you want 66133 bytes in kB?
2018-01-26T10:41:54.000894
Zack
pythondev_help_Zack_2018-01-26T10:41:54.000894
1,516,963,314.000894
31,386
pythondev
help
Yes
2018-01-26T10:42:04.000412
Dorie
pythondev_help_Dorie_2018-01-26T10:42:04.000412
1,516,963,324.000412
31,387
pythondev
help
but I'd also need MB/GB to work etc, my original question didn't take this into account
2018-01-26T10:42:28.000080
Dorie
pythondev_help_Dorie_2018-01-26T10:42:28.000080
1,516,963,348.00008
31,388
pythondev
help
I've found my answer ```os.stat(item).st_size &gt;&gt; 10``` appears to work and I can just use KB and not bother converting
2018-01-26T10:46:43.000267
Dorie
pythondev_help_Dorie_2018-01-26T10:46:43.000267
1,516,963,603.000267
31,389
pythondev
help
you’ll want a little function to handle this for you, if you google you’ll find some examples on SO
2018-01-26T10:47:05.000539
Zack
pythondev_help_Zack_2018-01-26T10:47:05.000539
1,516,963,625.000539
31,390
pythondev
help
<https://stackoverflow.com/questions/5194057/better-way-to-convert-file-sizes-in-python>
2018-01-26T10:47:12.000888
Zack
pythondev_help_Zack_2018-01-26T10:47:12.000888
1,516,963,632.000888
31,391
pythondev
help
including some discussion of 1000 vs 1024, which you’ll want to consider
2018-01-26T10:47:44.000350
Zack
pythondev_help_Zack_2018-01-26T10:47:44.000350
1,516,963,664.00035
31,392
pythondev
help
Thanks for that, it's not to serious what I need it for so I don't mind it being slightly off, thats for the help
2018-01-26T11:15:15.000079
Dorie
pythondev_help_Dorie_2018-01-26T11:15:15.000079
1,516,965,315.000079
31,393
pythondev
help
Hey friends. asyncio or twisted for async python programming? ( or whatever else )
2018-01-26T11:30:02.000591
Lai
pythondev_help_Lai_2018-01-26T11:30:02.000591
1,516,966,202.000591
31,394
pythondev
help
<@Lai> check <#C07G5276F|async> channel for better help
2018-01-26T11:30:33.000127
Sadye
pythondev_help_Sadye_2018-01-26T11:30:33.000127
1,516,966,233.000127
31,395
pythondev
help
We're all synchronous normies here
2018-01-26T11:30:42.000389
Sadye
pythondev_help_Sadye_2018-01-26T11:30:42.000389
1,516,966,242.000389
31,396
pythondev
help
Hey everyone. I’m having some issues when calling user defined functions from another file. I’m using ‘import filename’ to import functions from filename.py. However it seems to not be able to find any of the libraries I’ve imported (numpy etc) in the main script. I’ve tried importing them within the subfunction file a...
2018-01-26T11:30:56.000073
Trenton
pythondev_help_Trenton_2018-01-26T11:30:56.000073
1,516,966,256.000073
31,397
pythondev
help
Hi <@Trenton>, there might be multiple reasons for that, but all of them come down to the question of whether the import path is in `sys.path` or not
2018-01-26T11:32:26.000531
Sadye
pythondev_help_Sadye_2018-01-26T11:32:26.000531
1,516,966,346.000531
31,398
pythondev
help
So the code example will help a lot
2018-01-26T11:32:56.000093
Sadye
pythondev_help_Sadye_2018-01-26T11:32:56.000093
1,516,966,376.000093
31,399
pythondev
help
Blind guess - have you tried `from . import filename`?
2018-01-26T11:33:54.000689
Sadye
pythondev_help_Sadye_2018-01-26T11:33:54.000689
1,516,966,434.000689
31,400
pythondev
help
<@Trenton> Assuming you're not running from inside a virtualenv?
2018-01-26T11:34:13.000800
Porsha
pythondev_help_Porsha_2018-01-26T11:34:13.000800
1,516,966,453.0008
31,401
pythondev
help
I’m running from a notebook
2018-01-26T11:34:53.000285
Trenton
pythondev_help_Trenton_2018-01-26T11:34:53.000285
1,516,966,493.000285
31,402
pythondev
help
As <@Sadye> suggested, also try `from &lt;module&gt; import &lt;function&gt;`
2018-01-26T11:35:10.000520
Porsha
pythondev_help_Porsha_2018-01-26T11:35:10.000520
1,516,966,510.00052
31,403
pythondev
help
tried moving the bulk of functions to separate file as was becoming messy
2018-01-26T11:35:31.000348
Trenton
pythondev_help_Trenton_2018-01-26T11:35:31.000348
1,516,966,531.000348
31,404
pythondev
help
What is the error when you run your code?
2018-01-26T11:37:36.000167
Porsha
pythondev_help_Porsha_2018-01-26T11:37:36.000167
1,516,966,656.000167
31,405
pythondev
help
I’m calling import myFuncs from another file where I’ve imported spio (import <http://scipy.io|scipy.io> as spio) but it’s saying it’s not defined
2018-01-26T11:39:34.000345
Trenton
pythondev_help_Trenton_2018-01-26T11:39:34.000345
1,516,966,774.000345
31,406
pythondev
help
I’ve tried calling ‘import <http://scipy.io|scipy.io> as spio’ inside the myFuncs.py file as well and that didn’t work
2018-01-26T11:40:15.001128
Trenton
pythondev_help_Trenton_2018-01-26T11:40:15.001128
1,516,966,815.001128
31,407
pythondev
help
Ok is `myfuncs.py` in the same directory as your main script?
2018-01-26T11:40:21.000439
Porsha
pythondev_help_Porsha_2018-01-26T11:40:21.000439
1,516,966,821.000439
31,408
pythondev
help
Yes
2018-01-26T11:40:39.000691
Trenton
pythondev_help_Trenton_2018-01-26T11:40:39.000691
1,516,966,839.000691
31,409
pythondev
help
have you tried `from myfuncs import Mat2Panda`
2018-01-26T11:41:06.000697
Porsha
pythondev_help_Porsha_2018-01-26T11:41:06.000697
1,516,966,866.000697
31,410
pythondev
help
As an aside, it's best practice to name your function using underscores and lower case names
2018-01-26T11:41:43.000252
Porsha
pythondev_help_Porsha_2018-01-26T11:41:43.000252
1,516,966,903.000252
31,411
pythondev
help
eg `mat_2_panda`
2018-01-26T11:41:58.000220
Porsha
pythondev_help_Porsha_2018-01-26T11:41:58.000220
1,516,966,918.00022
31,412
pythondev
help
ok thanks for tip
2018-01-26T11:42:22.000311
Trenton
pythondev_help_Trenton_2018-01-26T11:42:22.000311
1,516,966,942.000311
31,413
pythondev
help
I have tried that and it didn’t work
2018-01-26T11:42:27.000484
Trenton
pythondev_help_Trenton_2018-01-26T11:42:27.000484
1,516,966,947.000484
31,414
pythondev
help
have you checked correct spelling of your filename?
2018-01-26T11:43:08.000122
Porsha
pythondev_help_Porsha_2018-01-26T11:43:08.000122
1,516,966,988.000122
31,415
pythondev
help
It should work
2018-01-26T11:43:12.000039
Porsha
pythondev_help_Porsha_2018-01-26T11:43:12.000039
1,516,966,992.000039
31,416
pythondev
help
If your .py file containing your function is is the same directory as your main script
2018-01-26T11:43:32.001170
Porsha
pythondev_help_Porsha_2018-01-26T11:43:32.001170
1,516,967,012.00117
31,417
pythondev
help
Yes I’ve checked the spelling
2018-01-26T11:44:08.000481
Trenton
pythondev_help_Trenton_2018-01-26T11:44:08.000481
1,516,967,048.000481
31,418
pythondev
help
What is the error?
2018-01-26T11:44:18.000719
Porsha
pythondev_help_Porsha_2018-01-26T11:44:18.000719
1,516,967,058.000719
31,419
pythondev
help
name ‘spio’ is not defined
2018-01-26T11:44:34.000260
Trenton
pythondev_help_Trenton_2018-01-26T11:44:34.000260
1,516,967,074.00026
31,420
pythondev
help
It’s finding the Mat2Panda function (soon to be renamed) so I don’t think that’s the issue
2018-01-26T11:45:27.000491
Trenton
pythondev_help_Trenton_2018-01-26T11:45:27.000491
1,516,967,127.000491
31,421
pythondev
help
ok so it's having trouble finding spio. Have you imported it into your script?
2018-01-26T11:45:49.001135
Porsha
pythondev_help_Porsha_2018-01-26T11:45:49.001135
1,516,967,149.001135
31,422
pythondev
help
Yep
2018-01-26T11:46:21.000894
Trenton
pythondev_help_Trenton_2018-01-26T11:46:21.000894
1,516,967,181.000894
31,423