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
dir names must follow the same rules as variables :slightly_smiling_face:
2017-06-29T10:05:43.237218
Ciera
pythondev_help_Ciera_2017-06-29T10:05:43.237218
1,498,730,743.237218
83,603
pythondev
help
nice
2017-06-29T10:07:48.289715
Deedee
pythondev_help_Deedee_2017-06-29T10:07:48.289715
1,498,730,868.289715
83,604
pythondev
help
Give the man a :taco:!
2017-06-29T10:08:03.295469
Beula
pythondev_help_Beula_2017-06-29T10:08:03.295469
1,498,730,883.295469
83,605
pythondev
help
better yet :burrito::coffee: <@Jerica>
2017-06-29T10:10:09.347928
Deedee
pythondev_help_Deedee_2017-06-29T10:10:09.347928
1,498,731,009.347928
83,606
pythondev
help
hehe, the :taco: should go to PyCharm, the hint this would be the issue was a tiny wheel in the project file explorer that appeared with the correct dir name :smile:
2017-06-29T10:12:11.398726
Jerica
pythondev_help_Jerica_2017-06-29T10:12:11.398726
1,498,731,131.398726
83,607
pythondev
help
Haha, woot jetbrains!
2017-06-29T10:12:29.406603
Beula
pythondev_help_Beula_2017-06-29T10:12:29.406603
1,498,731,149.406603
83,608
pythondev
help
more like JetBros!
2017-06-29T10:29:04.837849
Suellen
pythondev_help_Suellen_2017-06-29T10:29:04.837849
1,498,732,144.837849
83,609
pythondev
help
I've got a dockerfile I'm creating for initializing a test database. I have the `.sql` and everything for it. Should I use a shell script to run the `.sql`?
2017-06-29T14:23:00.672773
Myong
pythondev_help_Myong_2017-06-29T14:23:00.672773
1,498,746,180.672773
83,610
pythondev
help
With python typehinting, what's the right way to show a generator return value?
2017-06-29T16:03:34.883690
Beula
pythondev_help_Beula_2017-06-29T16:03:34.883690
1,498,752,214.88369
83,611
pythondev
help
:facepalm: `typing.Generator`
2017-06-29T16:04:12.897371
Beula
pythondev_help_Beula_2017-06-29T16:04:12.897371
1,498,752,252.897371
83,612
pythondev
help
I'm using python. I have a column of time series in formate of ( ```pattern = '%Y-%m-%d %H:%M:%S' ``` The datatype is Series and I need to convert it to string. I searched and I found out I need to use ```Data .astype(str) ``` to convert it to String. I used it but still that column is Series and not string. .astype() didn't convert. What's the solution. How may I do it?
2017-06-29T21:19:46.166755
Rana
pythondev_help_Rana_2017-06-29T21:19:46.166755
1,498,771,186.166755
83,613
pythondev
help
for example. You can find innumerable examples if you search "stringify python" on google
2017-06-29T21:32:46.266398
Levi
pythondev_help_Levi_2017-06-29T21:32:46.266398
1,498,771,966.266398
83,614
pythondev
help
Knit pick, you should probably consider `from __future__ import print_function` to be writing code that's compatible with the future of the language if you're writing python2
2017-06-29T22:09:57.551243
Beula
pythondev_help_Beula_2017-06-29T22:09:57.551243
1,498,774,197.551243
83,615
pythondev
help
can somebody help me to understand where is the problem in the following statement ``` ec.create_tags( Resources=to_tag[retention_days], Tags=[ {'Key': 'DeleteOn', 'Value': del_snap }, {'Key': 'Created', 'Value': today }, ] ) ```
2017-06-29T23:01:35.920716
Margareta
pythondev_help_Margareta_2017-06-29T23:01:35.920716
1,498,777,295.920716
83,616
pythondev
help
this is the error I am getting ``` { "stackTrace": [ [ "/var/task/lambda_function.py", 76, "lambda_handler", "{'Key': 'Created', 'Value': today }," ], [ "/var/runtime/botocore/client.py", 253, ```
2017-06-29T23:02:03.924078
Margareta
pythondev_help_Margareta_2017-06-29T23:02:03.924078
1,498,777,323.924078
83,617
pythondev
help
i have a variable `today = datetime.date.today()`
2017-06-29T23:02:32.927512
Margareta
pythondev_help_Margareta_2017-06-29T23:02:32.927512
1,498,777,352.927512
83,618
pythondev
help
I would presume it needs to be a string
2017-06-29T23:04:38.941397
Beula
pythondev_help_Beula_2017-06-29T23:04:38.941397
1,498,777,478.941397
83,619
pythondev
help
comma after `today }`
2017-06-29T23:04:41.941752
Deedee
pythondev_help_Deedee_2017-06-29T23:04:41.941752
1,498,777,481.941752
83,620
pythondev
help
?
2017-06-29T23:04:45.942164
Deedee
pythondev_help_Deedee_2017-06-29T23:04:45.942164
1,498,777,485.942164
83,621
pythondev
help
That's valid
2017-06-29T23:04:51.942755
Beula
pythondev_help_Beula_2017-06-29T23:04:51.942755
1,498,777,491.942755
83,622
pythondev
help
<@Margareta> what's the other end of the stack say?
2017-06-29T23:05:25.946661
Beula
pythondev_help_Beula_2017-06-29T23:05:25.946661
1,498,777,525.946661
83,623
pythondev
help
You could try `today.isoformat()`
2017-06-29T23:05:51.949379
Beula
pythondev_help_Beula_2017-06-29T23:05:51.949379
1,498,777,551.949379
83,624
pythondev
help
<@Beula> <https://gist.github.com/pleegor/f82958c0755b33d96fe286d79bab8bbe>
2017-06-29T23:07:00.956675
Margareta
pythondev_help_Margareta_2017-06-29T23:07:00.956675
1,498,777,620.956675
83,625
pythondev
help
Yeah, on line 35
2017-06-29T23:07:35.960393
Beula
pythondev_help_Beula_2017-06-29T23:07:35.960393
1,498,777,655.960393
83,626
pythondev
help
A Date object isn't valid, you need to choose a date format as a string (isoformat is a standard)
2017-06-29T23:07:55.962503
Beula
pythondev_help_Beula_2017-06-29T23:07:55.962503
1,498,777,675.962503
83,627
pythondev
help
something like that?
2017-06-29T23:08:44.967779
Margareta
pythondev_help_Margareta_2017-06-29T23:08:44.967779
1,498,777,724.967779
83,628
pythondev
help
``` Tags=[ {'Key': 'DeleteOn', 'Value': del_snap }, {'Key': 'Created', 'Value': today.isoformat() }, ```
2017-06-29T23:08:46.967937
Margareta
pythondev_help_Margareta_2017-06-29T23:08:46.967937
1,498,777,726.967937
83,629
pythondev
help
yeah, should work
2017-06-29T23:09:13.970891
Beula
pythondev_help_Beula_2017-06-29T23:09:13.970891
1,498,777,753.970891
83,630
pythondev
help
thanks <@Beula> !!!! works as expected!!!
2017-06-29T23:10:49.981650
Margareta
pythondev_help_Margareta_2017-06-29T23:10:49.981650
1,498,777,849.98165
83,631
pythondev
help
:thumbsup::skin-tone-4:
2017-06-29T23:10:57.982512
Beula
pythondev_help_Beula_2017-06-29T23:10:57.982512
1,498,777,857.982512
83,632
pythondev
help
AWS has pretty good errors, they're just awkward to read in that format :smile:
2017-06-29T23:11:10.983831
Beula
pythondev_help_Beula_2017-06-29T23:11:10.983831
1,498,777,870.983831
83,633
pythondev
help
yeah awkward errors + python noob = :see_no_evil:
2017-06-29T23:11:51.988198
Margareta
pythondev_help_Margareta_2017-06-29T23:11:51.988198
1,498,777,911.988198
83,634
pythondev
help
thanks again <@Beula> !
2017-06-29T23:12:59.995531
Margareta
pythondev_help_Margareta_2017-06-29T23:12:59.995531
1,498,777,979.995531
83,635
pythondev
help
Any time!
2017-06-29T23:13:13.997154
Beula
pythondev_help_Beula_2017-06-29T23:13:13.997154
1,498,777,993.997154
83,636
pythondev
help
Anyone ever use the slack api? Is it possible to remove a user from the group?? I see like channel remove but not group remove
2017-06-30T01:12:44.763029
Alba
pythondev_help_Alba_2017-06-30T01:12:44.763029
1,498,785,164.763029
83,637
pythondev
help
<@Alba> I forgot I found out about this a bit ago - I think this is what you want (the undocumented APIs): <https://github.com/ErikKalkoken/slackApiDoc/blob/master/users.admin.setInactive.md>
2017-06-30T01:14:01.771408
Beula
pythondev_help_Beula_2017-06-30T01:14:01.771408
1,498,785,241.771408
83,638
pythondev
help
Yes thank you! I found this before too, an undocumented api to invite someone to a group <https://stackoverflow.com/questions/30955818/slack-api-team-invitation>
2017-06-30T01:15:35.781767
Alba
pythondev_help_Alba_2017-06-30T01:15:35.781767
1,498,785,335.781767
83,639
pythondev
help
Yeah we use the invitation for the <http://pyslackers.com|pyslackers.com> site :smile:
2017-06-30T01:19:09.804722
Beula
pythondev_help_Beula_2017-06-30T01:19:09.804722
1,498,785,549.804722
83,640
pythondev
help
does anyone know of a way to fetch and update a user with a single db trip in django?
2017-06-30T05:06:07.258472
Lasonya
pythondev_help_Lasonya_2017-06-30T05:06:07.258472
1,498,799,167.258472
83,641
pythondev
help
<@Lasonya> why?
2017-06-30T05:12:10.348237
Collette
pythondev_help_Collette_2017-06-30T05:12:10.348237
1,498,799,530.348237
83,642
pythondev
help
i'm looking for a way to optimise my db calls
2017-06-30T05:14:07.376999
Lasonya
pythondev_help_Lasonya_2017-06-30T05:14:07.376999
1,498,799,647.376999
83,643
pythondev
help
<@Collette>
2017-06-30T05:14:28.382038
Lasonya
pythondev_help_Lasonya_2017-06-30T05:14:28.382038
1,498,799,668.382038
83,644
pythondev
help
<@Lasonya> have you profiled your views? Are you sure fetching and updating users is the most expensive operation?
2017-06-30T05:15:26.396264
Collette
pythondev_help_Collette_2017-06-30T05:15:26.396264
1,498,799,726.396264
83,645
pythondev
help
well for large data sets it sure is <@Collette>. how do you mean 'profiled your views '?
2017-06-30T05:18:13.436922
Lasonya
pythondev_help_Lasonya_2017-06-30T05:18:13.436922
1,498,799,893.436922
83,646
pythondev
help
I mean what makes you think that this is the most expensive operation? Do you _think_ so or you have profiled your code so you _know_ it's the most expensive operation?
2017-06-30T05:19:24.454458
Collette
pythondev_help_Collette_2017-06-30T05:19:24.454458
1,498,799,964.454458
83,647
pythondev
help
Looking up one record in your user table, and updating that record, is really the bottleneck? That sounds quite suprising to me, too.
2017-06-30T05:19:57.462785
Ruben
pythondev_help_Ruben_2017-06-30T05:19:57.462785
1,498,799,997.462785
83,648
pythondev
help
That may be the bottleneck, for sure. Which is likely to be fixed by creating a proper index.
2017-06-30T05:21:37.487300
Collette
pythondev_help_Collette_2017-06-30T05:21:37.487300
1,498,800,097.4873
83,649
pythondev
help
anyways in sql you are able to retrieve data from an `update` query
2017-06-30T05:22:55.506656
Ciera
pythondev_help_Ciera_2017-06-30T05:22:55.506656
1,498,800,175.506656
83,650
pythondev
help
<@Ruben> <@Collette> won't it be performant to have one db trip to fetch and update rather than have two trips?
2017-06-30T05:23:04.508603
Lasonya
pythondev_help_Lasonya_2017-06-30T05:23:04.508603
1,498,800,184.508603
83,651
pythondev
help
<@Lasonya> please, google about premature optimization
2017-06-30T05:23:33.515872
Collette
pythondev_help_Collette_2017-06-30T05:23:33.515872
1,498,800,213.515872
83,652
pythondev
help
Your remark smells like premature optimisation
2017-06-30T05:23:35.516325
Ruben
pythondev_help_Ruben_2017-06-30T05:23:35.516325
1,498,800,215.516325
83,653
pythondev
help
Ha
2017-06-30T05:23:45.518706
Collette
pythondev_help_Collette_2017-06-30T05:23:45.518706
1,498,800,225.518706
83,654
pythondev
help
i like this <@Ciera>
2017-06-30T05:24:36.531442
Lasonya
pythondev_help_Lasonya_2017-06-30T05:24:36.531442
1,498,800,276.531442
83,655
pythondev
help
<@Ciera> Some DBMSses indeed can, see RETURNING clause in PostgreSQL's UPDATE. <https://www.postgresql.org/docs/9.1/static/sql-update.html>
2017-06-30T05:25:13.540303
Ruben
pythondev_help_Ruben_2017-06-30T05:25:13.540303
1,498,800,313.540303
83,656
pythondev
help
yeah that's what I was referring to
2017-06-30T05:25:57.551430
Ciera
pythondev_help_Ciera_2017-06-30T05:25:57.551430
1,498,800,357.55143
83,657
pythondev
help
...but don't expect such things to work in MySQL or Oracle.
2017-06-30T05:26:25.557995
Ruben
pythondev_help_Ruben_2017-06-30T05:26:25.557995
1,498,800,385.557995
83,658
pythondev
help
I never found the need to return something from an UPDATE (except maybe the nr. of records that were changed) because what I put into the UPDATE I have available in my program anyway.
2017-06-30T05:27:19.571085
Ruben
pythondev_help_Ruben_2017-06-30T05:27:19.571085
1,498,800,439.571085
83,659
pythondev
help
<@Ciera> So I'm curious about for what you want such a feature.
2017-06-30T05:27:52.579247
Ruben
pythondev_help_Ruben_2017-06-30T05:27:52.579247
1,498,800,472.579247
83,660
pythondev
help
we use it from time to time when we need to return ids for some processing (for example)
2017-06-30T05:31:18.630666
Ciera
pythondev_help_Ciera_2017-06-30T05:31:18.630666
1,498,800,678.630666
83,661
pythondev
help
&gt; what I put into the UPDATE I have available in my program anyway Not when there is an SQL function / expression in an UPDATE clause
2017-06-30T05:31:43.636597
Suellen
pythondev_help_Suellen_2017-06-30T05:31:43.636597
1,498,800,703.636597
83,662
pythondev
help
you have available what you put in the update but you might not have all the row
2017-06-30T05:32:59.655402
Ciera
pythondev_help_Ciera_2017-06-30T05:32:59.655402
1,498,800,779.655402
83,663
pythondev
help
if you have read only data for example
2017-06-30T05:34:05.671116
Ciera
pythondev_help_Ciera_2017-06-30T05:34:05.671116
1,498,800,845.671116
83,664
pythondev
help
Ah ok, I see. That might be handy indeed.
2017-06-30T05:34:20.674541
Ruben
pythondev_help_Ruben_2017-06-30T05:34:20.674541
1,498,800,860.674541
83,665
pythondev
help
I have to add: I don't think `UPDATE ... RETURNING ...` will increase performance substantially for a typical web app
2017-06-30T05:35:20.689262
Suellen
pythondev_help_Suellen_2017-06-30T05:35:20.689262
1,498,800,920.689262
83,666
pythondev
help
even the fastest ORM (something like Peewee) is still quite slow
2017-06-30T05:35:56.697993
Suellen
pythondev_help_Suellen_2017-06-30T05:35:56.697993
1,498,800,956.697993
83,667
pythondev
help
if your db is on the network you gain a bit
2017-06-30T05:36:28.705792
Ciera
pythondev_help_Ciera_2017-06-30T05:36:28.705792
1,498,800,988.705792
83,668
pythondev
help
but otherwise not really. It's just a nice to have
2017-06-30T05:36:42.709194
Ciera
pythondev_help_Ciera_2017-06-30T05:36:42.709194
1,498,801,002.709194
83,669
pythondev
help
plus if I can get an empty page in 30 ms and a heavy page in 40 ms, then there is no point in optimizing just yet
2017-06-30T05:36:43.709546
Suellen
pythondev_help_Suellen_2017-06-30T05:36:43.709546
1,498,801,003.709546
83,670
pythondev
help
Thanks guys <@Ciera> <@Ruben> <@Collette> <@Suellen> :taco:
2017-06-30T05:59:45.038531
Lasonya
pythondev_help_Lasonya_2017-06-30T05:59:45.038531
1,498,802,385.038531
83,671
pythondev
help
yum yum!
2017-06-30T05:59:53.040553
Suellen
pythondev_help_Suellen_2017-06-30T05:59:53.040553
1,498,802,393.040553
83,672
pythondev
help
any pandas people in here?
2017-06-30T11:24:35.675941
Rudolph
pythondev_help_Rudolph_2017-06-30T11:24:35.675941
1,498,821,875.675941
83,673
pythondev
help
I’ve used it a little
2017-06-30T11:25:12.690499
Jeri
pythondev_help_Jeri_2017-06-30T11:25:12.690499
1,498,821,912.690499
83,674
pythondev
help
I'm trying to do a groupby on a df
2017-06-30T11:26:30.722523
Rudolph
pythondev_help_Rudolph_2017-06-30T11:26:30.722523
1,498,821,990.722523
83,675
pythondev
help
and the field I'm trying to group on needs to be preprocessed
2017-06-30T11:26:44.727892
Rudolph
pythondev_help_Rudolph_2017-06-30T11:26:44.727892
1,498,822,004.727892
83,676
pythondev
help
I'm trying to figure out how to offload the preprocessing of that field to C so its not slow as crap
2017-06-30T11:27:02.734853
Rudolph
pythondev_help_Rudolph_2017-06-30T11:27:02.734853
1,498,822,022.734853
83,677
pythondev
help
it seems like `df.groupby(by=func_to_preprocess, df.ColumnToGroup)` should work, but the `by=` field seem to want the column header
2017-06-30T11:28:06.760254
Rudolph
pythondev_help_Rudolph_2017-06-30T11:28:06.760254
1,498,822,086.760254
83,678
pythondev
help
or a function
2017-06-30T11:28:13.762824
Rudolph
pythondev_help_Rudolph_2017-06-30T11:28:13.762824
1,498,822,093.762824
83,679
pythondev
help
but not both
2017-06-30T11:28:15.763726
Rudolph
pythondev_help_Rudolph_2017-06-30T11:28:15.763726
1,498,822,095.763726
83,680
pythondev
help
<@Rudolph>, what is the function doing?
2017-06-30T11:40:50.060416
Winnifred
pythondev_help_Winnifred_2017-06-30T11:40:50.060416
1,498,822,850.060416
83,681
pythondev
help
preprocessing the string, I'm just going to use `apply` to manipulate the column, then pass the column into groupby
2017-06-30T11:46:00.182256
Rudolph
pythondev_help_Rudolph_2017-06-30T11:46:00.182256
1,498,823,160.182256
83,682
pythondev
help
I was overthinking it :slightly_smiling_face:
2017-06-30T11:46:06.184459
Rudolph
pythondev_help_Rudolph_2017-06-30T11:46:06.184459
1,498,823,166.184459
83,683
pythondev
help
lol, definitely
2017-06-30T11:46:12.187011
Winnifred
pythondev_help_Winnifred_2017-06-30T11:46:12.187011
1,498,823,172.187011
83,684
pythondev
help
thanks <@Winnifred>
2017-06-30T11:46:15.188288
Rudolph
pythondev_help_Rudolph_2017-06-30T11:46:15.188288
1,498,823,175.188288
83,685
pythondev
help
if it’s 1 “column”, use `.map`
2017-06-30T11:46:47.200460
Winnifred
pythondev_help_Winnifred_2017-06-30T11:46:47.200460
1,498,823,207.20046
83,686
pythondev
help
In general, take a look at `.applymap`, `.map` and `.apply`. All very useful when you learn how they operate on the dataframe.
2017-06-30T11:48:29.239153
Winnifred
pythondev_help_Winnifred_2017-06-30T11:48:29.239153
1,498,823,309.239153
83,687
pythondev
help
<https://pythondev.slack.com/archives/C07EYDP25/p1498837563310648>
2017-06-30T11:51:55.320768
Myong
pythondev_help_Myong_2017-06-30T11:51:55.320768
1,498,823,515.320768
83,688
pythondev
help
<https://gyazo.com/c534d09b18e44c51e407a16605c992c3.png>
2017-06-30T11:52:04.323967
Myong
pythondev_help_Myong_2017-06-30T11:52:04.323967
1,498,823,524.323967
83,689
pythondev
help
Hi guys ,is there something like django-restframework or flask-restplus for tornado?
2017-06-30T13:41:32.658518
Rickey
pythondev_help_Rickey_2017-06-30T13:41:32.658518
1,498,830,092.658518
83,690
pythondev
help
Hey!
2017-06-30T16:20:19.731979
Sherry
pythondev_help_Sherry_2017-06-30T16:20:19.731979
1,498,839,619.731979
83,691
pythondev
help
I can’t seem to import the slackclient correctly
2017-06-30T16:20:29.734900
Sherry
pythondev_help_Sherry_2017-06-30T16:20:29.734900
1,498,839,629.7349
83,692
pythondev
help
I keep getting an import error. I tried googling around and their fixes didn’t really work
2017-06-30T16:20:44.738914
Sherry
pythondev_help_Sherry_2017-06-30T16:20:44.738914
1,498,839,644.738914
83,693
pythondev
help
it’s installed for sure, so I don’t know why I can’t import
2017-06-30T16:21:04.744646
Sherry
pythondev_help_Sherry_2017-06-30T16:21:04.744646
1,498,839,664.744646
83,694
pythondev
help
can you do a `pip freeze`
2017-06-30T16:27:57.859575
Ciera
pythondev_help_Ciera_2017-06-30T16:27:57.859575
1,498,840,077.859575
83,695
pythondev
help
or `pip3 freeze`
2017-06-30T16:28:09.862673
Ciera
pythondev_help_Ciera_2017-06-30T16:28:09.862673
1,498,840,089.862673
83,696
pythondev
help
The issue is your `pip3` is from `python 3.6` but your `python3` command is running `python 3.5`
2017-06-30T16:29:01.876989
Beula
pythondev_help_Beula_2017-06-30T16:29:01.876989
1,498,840,141.876989
83,697
pythondev
help
``` # from pip3 install slackclient... Requirement already satisfied: slackclient in /usr/local/lib/python3.6/site-packages # and from the python3 command Python 3.5.1 (v3.5.1:37a07cee5969, Dec 5 2015, 21:12:44) ```
2017-06-30T16:29:36.887302
Beula
pythondev_help_Beula_2017-06-30T16:29:36.887302
1,498,840,176.887302
83,698
pythondev
help
Execute the script with `python3.6`
2017-06-30T16:29:48.890467
Beula
pythondev_help_Beula_2017-06-30T16:29:48.890467
1,498,840,188.890467
83,699
pythondev
help
nice spot
2017-06-30T16:31:01.911579
Ciera
pythondev_help_Ciera_2017-06-30T16:31:01.911579
1,498,840,261.911579
83,700
pythondev
help
<@Sherry> - consider using some virtualenvs to avoid this in the future :slightly_smiling_face:
2017-06-30T16:36:01.993005
Beula
pythondev_help_Beula_2017-06-30T16:36:01.993005
1,498,840,561.993005
83,701
pythondev
help
I will work on a video for that, it's been coming up a lot recently
2017-06-30T16:36:09.995106
Beula
pythondev_help_Beula_2017-06-30T16:36:09.995106
1,498,840,569.995106
83,702