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
nope, not I
2017-07-31T13:50:18.452784
Martha
pythondev_help_Martha_2017-07-31T13:50:18.452784
1,501,509,018.452784
88,203
pythondev
help
My work team and I use it for team-wide reminders.
2017-07-31T13:55:29.636262
Zaida
pythondev_help_Zaida_2017-07-31T13:55:29.636262
1,501,509,329.636262
88,204
pythondev
help
slackbot can be useful i guess
2017-07-31T13:57:19.702035
Tandra
pythondev_help_Tandra_2017-07-31T13:57:19.702035
1,501,509,439.702035
88,205
pythondev
help
Is that giving back the profile info? Or info that you have given slackbot?
2017-07-31T13:57:37.712779
Zaida
pythondev_help_Zaida_2017-07-31T13:57:37.712779
1,501,509,457.712779
88,206
pythondev
help
info given to slackbot
2017-07-31T13:57:59.726052
Tandra
pythondev_help_Tandra_2017-07-31T13:57:59.726052
1,501,509,479.726052
88,207
pythondev
help
Yeah, reminders are the big one for me
2017-07-31T13:59:53.795773
Beula
pythondev_help_Beula_2017-07-31T13:59:53.795773
1,501,509,593.795773
88,208
pythondev
help
only use it for reminders
2017-07-31T14:00:39.826347
Ciera
pythondev_help_Ciera_2017-07-31T14:00:39.826347
1,501,509,639.826347
88,209
pythondev
help
Though really that is the slack app, slackbot is just the deliverer of the message since it's slash commands
2017-07-31T14:03:29.929274
Beula
pythondev_help_Beula_2017-07-31T14:03:29.929274
1,501,509,809.929274
88,210
pythondev
help
Hey <@Beula> what's a good substitution for the `f'{datetime.datetime.now():%Y-%m-%d}.xlsx'` formatting
2017-07-31T15:01:22.954192
Myong
pythondev_help_Myong_2017-07-31T15:01:22.954192
1,501,513,282.954192
88,211
pythondev
help
Can't use it in 3.6
2017-07-31T15:01:29.957904
Myong
pythondev_help_Myong_2017-07-31T15:01:29.957904
1,501,513,289.957904
88,212
pythondev
help
`"{:%Y-%m-%d}.xlsx".format(datetime.datetime.now())` I think
2017-07-31T15:02:05.979532
Beula
pythondev_help_Beula_2017-07-31T15:02:05.979532
1,501,513,325.979532
88,213
pythondev
help
let me double check
2017-07-31T15:02:07.980898
Beula
pythondev_help_Beula_2017-07-31T15:02:07.980898
1,501,513,327.980898
88,214
pythondev
help
``` Python 3.6.2 (default, Jul 17 2017, 16:44:45) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; import datetime &gt;&gt;&gt; "{:%Y-%m-%d}.xlsx".format(datetime.datetime.now()) '2017-07-31.xlsx' ``` That's 3.6.2 but should be backwards compatible
2017-07-31T15:02:41.000856
Beula
pythondev_help_Beula_2017-07-31T15:02:41.000856
1,501,513,361.000856
88,215
pythondev
help
Okay cool
2017-07-31T15:04:01.046137
Myong
pythondev_help_Myong_2017-07-31T15:04:01.046137
1,501,513,441.046137
88,216
pythondev
help
Also, another quick question
2017-07-31T15:04:06.049009
Myong
pythondev_help_Myong_2017-07-31T15:04:06.049009
1,501,513,446.049009
88,217
pythondev
help
Was working with a bunch of dictionaries all parts of `tkinter` for different object
2017-07-31T15:04:18.055714
Myong
pythondev_help_Myong_2017-07-31T15:04:18.055714
1,501,513,458.055714
88,218
pythondev
help
On my computer some keys were shown as `!branches` or likewise
2017-07-31T15:04:31.062614
Myong
pythondev_help_Myong_2017-07-31T15:04:31.062614
1,501,513,471.062614
88,219
pythondev
help
denoted as a string with `!` prepended
2017-07-31T15:04:38.066773
Myong
pythondev_help_Myong_2017-07-31T15:04:38.066773
1,501,513,478.066773
88,220
pythondev
help
but on a coworkers computer in some cases the keys were completely random numeric strings
2017-07-31T15:04:54.075224
Myong
pythondev_help_Myong_2017-07-31T15:04:54.075224
1,501,513,494.075224
88,221
pythondev
help
and I had to grab data another way, can you think of a reason for this?
2017-07-31T15:05:04.080811
Myong
pythondev_help_Myong_2017-07-31T15:05:04.080811
1,501,513,504.080811
88,222
pythondev
help
Are you talking about internal tkinter apis?
2017-07-31T15:05:45.103229
Beula
pythondev_help_Beula_2017-07-31T15:05:45.103229
1,501,513,545.103229
88,223
pythondev
help
Yeah, just going through the object attributes. I'm never touching `tkinter` again, but wasn't sure what that might be from
2017-07-31T15:06:23.123608
Myong
pythondev_help_Myong_2017-07-31T15:06:23.123608
1,501,513,583.123608
88,224
pythondev
help
All same versions of most everything
2017-07-31T15:06:45.136149
Myong
pythondev_help_Myong_2017-07-31T15:06:45.136149
1,501,513,605.136149
88,225
pythondev
help
Are you and the co-worker on different OSs?
2017-07-31T15:07:01.144990
Beula
pythondev_help_Beula_2017-07-31T15:07:01.144990
1,501,513,621.14499
88,226
pythondev
help
Nope, same OS
2017-07-31T15:07:08.148547
Myong
pythondev_help_Myong_2017-07-31T15:07:08.148547
1,501,513,628.148547
88,227
pythondev
help
weird ¯\_(ツ)_/¯
2017-07-31T15:08:45.200878
Beula
pythondev_help_Beula_2017-07-31T15:08:45.200878
1,501,513,725.200878
88,228
pythondev
help
ahh that was awesome looking
2017-07-31T15:12:52.333067
Beula
pythondev_help_Beula_2017-07-31T15:12:52.333067
1,501,513,972.333067
88,229
pythondev
help
_takes notes_ avoid tkinter... got it
2017-07-31T15:48:17.456906
Ouida
pythondev_help_Ouida_2017-07-31T15:48:17.456906
1,501,516,097.456906
88,230
pythondev
help
save yourself the headache and just smash your hear into a wall
2017-07-31T15:54:17.649311
Myong
pythondev_help_Myong_2017-07-31T15:54:17.649311
1,501,516,457.649311
88,231
pythondev
help
hello -- I need a push: I'm in the python shell, got a list of my installed modules, my module is in there --&gt; mytest-module==0.1 ... if I "import mytest-module" i get a syntax error. If i "import mytest_module" i get a &lt;module not found&gt; error. I'm a little stumped as to how to access my methods. Help? Am I missing something fundamental?
2017-07-31T15:54:47.665099
Alanna
pythondev_help_Alanna_2017-07-31T15:54:47.665099
1,501,516,487.665099
88,232
pythondev
help
not sure this is the right spot for this ..
2017-07-31T15:55:42.695035
Alanna
pythondev_help_Alanna_2017-07-31T15:55:42.695035
1,501,516,542.695035
88,233
pythondev
help
Where are you seeing your module?
2017-07-31T15:56:25.718309
Myong
pythondev_help_Myong_2017-07-31T15:56:25.718309
1,501,516,585.718309
88,234
pythondev
help
In an IDE or `requirements.txt` you have?
2017-07-31T15:56:34.723299
Myong
pythondev_help_Myong_2017-07-31T15:56:34.723299
1,501,516,594.723299
88,235
pythondev
help
shell -- imported pip. Then set "installed = pip.get_installed_distributions()" ... then "installed_packages_list = sorted(["%s==%s" % (i.key, i.version)"
2017-07-31T15:58:10.776155
Alanna
pythondev_help_Alanna_2017-07-31T15:58:10.776155
1,501,516,690.776155
88,236
pythondev
help
it's at the top of the list
2017-07-31T15:58:28.786130
Alanna
pythondev_help_Alanna_2017-07-31T15:58:28.786130
1,501,516,708.78613
88,237
pythondev
help
use ` on the ~ key to format text like so, just a bit easier to read
2017-07-31T15:58:40.793247
Myong
pythondev_help_Myong_2017-07-31T15:58:40.793247
1,501,516,720.793247
88,238
pythondev
help
doh - sorry...slatiquette violation
2017-07-31T15:59:18.814218
Alanna
pythondev_help_Alanna_2017-07-31T15:59:18.814218
1,501,516,758.814218
88,239
pythondev
help
So is `mytest-module` a module you created I'd imagine
2017-07-31T15:59:44.828022
Myong
pythondev_help_Myong_2017-07-31T15:59:44.828022
1,501,516,784.828022
88,240
pythondev
help
correct
2017-07-31T15:59:50.831331
Alanna
pythondev_help_Alanna_2017-07-31T15:59:50.831331
1,501,516,790.831331
88,241
pythondev
help
any modules or `.py` files should only use `_`
2017-07-31T15:59:58.835841
Myong
pythondev_help_Myong_2017-07-31T15:59:58.835841
1,501,516,798.835841
88,242
pythondev
help
no `-`
2017-07-31T16:00:02.838017
Myong
pythondev_help_Myong_2017-07-31T16:00:02.838017
1,501,516,802.838017
88,243
pythondev
help
because the `-` is not a proper identifier
2017-07-31T16:00:17.847496
Myong
pythondev_help_Myong_2017-07-31T16:00:17.847496
1,501,516,817.847496
88,244
pythondev
help
figured it was that -- but i wanted a 2nd opinion
2017-07-31T16:00:22.850341
Alanna
pythondev_help_Alanna_2017-07-31T16:00:22.850341
1,501,516,822.850341
88,245
pythondev
help
No problem
2017-07-31T16:00:47.864350
Myong
pythondev_help_Myong_2017-07-31T16:00:47.864350
1,501,516,847.86435
88,246
pythondev
help
The syntax for importing modules like that is `__import__('my-module')`, but as <@Myong> said, use `_`
2017-07-31T16:02:26.917973
Patty
pythondev_help_Patty_2017-07-31T16:02:26.917973
1,501,516,946.917973
88,247
pythondev
help
^
2017-07-31T16:03:08.940609
Myong
pythondev_help_Myong_2017-07-31T16:03:08.940609
1,501,516,988.940609
88,248
pythondev
help
tbh .. not sure how the hyphen made it in there, it's nowhere in the package.
2017-07-31T16:03:56.966271
Alanna
pythondev_help_Alanna_2017-07-31T16:03:56.966271
1,501,517,036.966271
88,249
pythondev
help
generally even underscores aren’t PEP8 compliant: “Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged. When an extension module written in C or C++ has an accompanying Python module that provides a higher level (e.g. more object oriented) interface, the C/C++ module has a leading underscore (e.g. _socket ).”
2017-07-31T16:06:18.043141
Patty
pythondev_help_Patty_2017-07-31T16:06:18.043141
1,501,517,178.043141
88,250
pythondev
help
^ that's what I ended up doing. Removed all underscores and converted to all lowercase.
2017-07-31T16:11:20.202977
Alanna
pythondev_help_Alanna_2017-07-31T16:11:20.202977
1,501,517,480.202977
88,251
pythondev
help
any idea how to import an egg-link in the shell?
2017-07-31T16:20:55.511596
Alanna
pythondev_help_Alanna_2017-07-31T16:20:55.511596
1,501,518,055.511596
88,252
pythondev
help
Anyone here use DB as a service for their personal projects ? Trying to decide whether it’s worth it to just install Postgres on my own server or just pay for RDS and the like
2017-07-31T16:31:25.852739
Bronwyn
pythondev_help_Bronwyn_2017-07-31T16:31:25.852739
1,501,518,685.852739
88,253
pythondev
help
I've got the perennial issue of imports, just wondering if anyone could give a hand with this?
2017-07-31T16:35:41.991095
Vi
pythondev_help_Vi_2017-07-31T16:35:41.991095
1,501,518,941.991095
88,254
pythondev
help
as for db as a service/managed, how important is the data
2017-07-31T16:36:23.014194
Vi
pythondev_help_Vi_2017-07-31T16:36:23.014194
1,501,518,983.014194
88,255
pythondev
help
RDS, even on the low end, I think is around $25/mo
2017-07-31T16:36:34.020181
Beula
pythondev_help_Beula_2017-07-31T16:36:34.020181
1,501,518,994.020181
88,256
pythondev
help
So I have a DO server and just do `pg_dumps` a few times a week
2017-07-31T16:36:51.029697
Beula
pythondev_help_Beula_2017-07-31T16:36:51.029697
1,501,519,011.029697
88,257
pythondev
help
for small projects where I just need a RD, typically I'll reach for sqlite
2017-07-31T16:36:55.031811
Vi
pythondev_help_Vi_2017-07-31T16:36:55.031811
1,501,519,015.031811
88,258
pythondev
help
for postgresql backup there is `autopostgresqlbackup` you just need to `apt install` it
2017-07-31T16:37:34.052225
Ciera
pythondev_help_Ciera_2017-07-31T16:37:34.052225
1,501,519,054.052225
88,259
pythondev
help
and then save it elsewhere :slightly_smiling_face:
2017-07-31T16:38:38.085547
Beula
pythondev_help_Beula_2017-07-31T16:38:38.085547
1,501,519,118.085547
88,260
pythondev
help
So I'm looking to simplify the logic in this method (and/or something more pythonic). There is a request, that takes several Tasks to complete, this method is finding out what next needs to be completed next based on attributes of the request and current task. Can anyone help me with some ideas?
2017-07-31T17:04:18.908584
Staci
pythondev_help_Staci_2017-07-31T17:04:18.908584
1,501,520,658.908584
88,261
pythondev
help
I feel like there are too many nested if statements
2017-07-31T17:04:56.928218
Staci
pythondev_help_Staci_2017-07-31T17:04:56.928218
1,501,520,696.928218
88,262
pythondev
help
are the only numbers 10, 20, 30, 50 or are there ranges?
2017-07-31T17:08:28.034097
Orpha
pythondev_help_Orpha_2017-07-31T17:08:28.034097
1,501,520,908.034097
88,263
pythondev
help
They are Django Choice fields, I wrote the models like 6 months ago when I was new to Django, I'm trying to refactor everything now
2017-07-31T17:10:53.103520
Staci
pythondev_help_Staci_2017-07-31T17:10:53.103520
1,501,521,053.10352
88,264
pythondev
help
ah, i had a better way to do that, but not sure if it will work with django
2017-07-31T17:12:03.137234
Orpha
pythondev_help_Orpha_2017-07-31T17:12:03.137234
1,501,521,123.137234
88,265
pythondev
help
What is it?
2017-07-31T17:12:21.145744
Staci
pythondev_help_Staci_2017-07-31T17:12:21.145744
1,501,521,141.145744
88,266
pythondev
help
using dictionaries
2017-07-31T17:12:35.151947
Orpha
pythondev_help_Orpha_2017-07-31T17:12:35.151947
1,501,521,155.151947
88,267
pythondev
help
pythons version of a switch statement
2017-07-31T17:12:47.157721
Orpha
pythondev_help_Orpha_2017-07-31T17:12:47.157721
1,501,521,167.157721
88,268
pythondev
help
Right, I was thinking the same, that's no problem for Django, but how would you handle the nested cases?
2017-07-31T17:13:25.174978
Staci
pythondev_help_Staci_2017-07-31T17:13:25.174978
1,501,521,205.174978
88,269
pythondev
help
Or for example `if self.request.request_needs &gt; 10: # Needs Takeoff or Takeoff and Estimate` is essentially checking if it's 20 or 50, would I include a key for 20 and 50 that both do the same thing?
2017-07-31T17:14:41.210235
Staci
pythondev_help_Staci_2017-07-31T17:14:41.210235
1,501,521,281.210235
88,270
pythondev
help
hold on, sorry, im trying to play with your code but 3 fires just started at work haha
2017-07-31T17:19:33.346248
Orpha
pythondev_help_Orpha_2017-07-31T17:19:33.346248
1,501,521,573.346248
88,271
pythondev
help
No worries!
2017-07-31T17:20:13.365157
Staci
pythondev_help_Staci_2017-07-31T17:20:13.365157
1,501,521,613.365157
88,272
pythondev
help
<@Staci>
2017-07-31T17:45:04.025922
Orpha
pythondev_help_Orpha_2017-07-31T17:45:04.025922
1,501,523,104.025922
88,273
pythondev
help
something like this
2017-07-31T17:45:10.028384
Orpha
pythondev_help_Orpha_2017-07-31T17:45:10.028384
1,501,523,110.028384
88,274
pythondev
help
This is great, thanks <@Orpha> :taco:
2017-07-31T17:56:42.315092
Staci
pythondev_help_Staci_2017-07-31T17:56:42.315092
1,501,523,802.315092
88,275
pythondev
help
I'm going to work on implementing this and I'll let you know if I have any questions, but it looks pretty straight forward
2017-07-31T17:57:21.330409
Staci
pythondev_help_Staci_2017-07-31T17:57:21.330409
1,501,523,841.330409
88,276
pythondev
help
cool, hopefully it works out and you can just add those functions to the class you had the if statement in
2017-07-31T17:58:28.357427
Orpha
pythondev_help_Orpha_2017-07-31T17:58:28.357427
1,501,523,908.357427
88,277
pythondev
help
need some help with transforming datetime object &gt;examples of the df['old'] that needs to be tranformed ``` 0 00:19:58.582052 1 00:25:09.107093 2 00:06:44.541717 4 00:03:45.035418 5 00:07:14.327405 6 00:04:49.413655 10 00:07:00.095332 11 00:30:57.42213``` &gt;This is the code I'm using to convert it into seconds ```import datetime def convert_seconds(ts): for i in ts: pt = datetime.datetime.strptime(i,'%H:%M:%S.%f') total_seconds = pt.second + pt.minute*60 + pt.hour*3600 return total_seconds df['new'] = convert_seconds(df['old'])``` &gt;And this is the output from df['new'] ```0 565 1 565 2 565 4 565 5 565 6 565 10 565 11 565``` basically I just need to find the mean of the column. Thanks!
2017-07-31T20:37:35.067049
Jed
pythondev_help_Jed_2017-07-31T20:37:35.067049
1,501,533,455.067049
88,278
pythondev
help
also thanks <@Deedee> for the helpful tips :taco:
2017-07-31T20:38:07.073775
Jed
pythondev_help_Jed_2017-07-31T20:38:07.073775
1,501,533,487.073775
88,279
pythondev
help
<@Jed> what is your expected output? this is a little confusing. Not fulling understanding what you are doing, returning total_seconds like that is only going to return total_seconds of the last iteration of that for loop
2017-07-31T21:36:11.809859
Orpha
pythondev_help_Orpha_2017-07-31T21:36:11.809859
1,501,536,971.809859
88,280
pythondev
help
<@Jed>, check out `.map` and `.apply` to make your life a little easier!
2017-07-31T21:52:42.009833
Winnifred
pythondev_help_Winnifred_2017-07-31T21:52:42.009833
1,501,537,962.009833
88,281
pythondev
help
Hi, I just wanted to find the mean of the column, but I had trouble in the `xx:xx:xx.xxxxxx` format so I thought I’d convert it into `int`
2017-08-01T00:00:39.395281
Jed
pythondev_help_Jed_2017-08-01T00:00:39.395281
1,501,545,639.395281
88,282
pythondev
help
I've got a python/django issue need help with. I'm sending a curl request with json to a url (code below)
2017-08-01T01:44:13.433859
Beverley
pythondev_help_Beverley_2017-08-01T01:44:13.433859
1,501,551,853.433859
88,283
pythondev
help
curl -X POST -d "username=john&amp;password=john2&amp;[email protected]&amp;first_name=john&amp;last_name=smith" <http://localhost:8000/api-user-create/>
2017-08-01T01:44:25.435939
Beverley
pythondev_help_Beverley_2017-08-01T01:44:25.435939
1,501,551,865.435939
88,284
pythondev
help
and I'm getting an error parsing the json here's how I'm parsing it...
2017-08-01T01:44:44.439401
Beverley
pythondev_help_Beverley_2017-08-01T01:44:44.439401
1,501,551,884.439401
88,285
pythondev
help
@csrf_exempt def create_user(request): response = {'status': None} if request.method == 'POST': data = json.loads(request.body)
2017-08-01T01:45:04.443146
Beverley
pythondev_help_Beverley_2017-08-01T01:45:04.443146
1,501,551,904.443146
88,286
pythondev
help
the body there isn't JSON, it's form encoded
2017-08-01T01:45:31.448057
Beula
pythondev_help_Beula_2017-08-01T01:45:31.448057
1,501,551,931.448057
88,287
pythondev
help
then I can get the data like &gt; username = data['username']
2017-08-01T01:45:32.448285
Beverley
pythondev_help_Beverley_2017-08-01T01:45:32.448285
1,501,551,932.448285
88,288
pythondev
help
is it not bombing on the `json.loads`?
2017-08-01T01:46:07.454351
Beula
pythondev_help_Beula_2017-08-01T01:46:07.454351
1,501,551,967.454351
88,289
pythondev
help
yes it crashes there
2017-08-01T01:46:29.458519
Beverley
pythondev_help_Beverley_2017-08-01T01:46:29.458519
1,501,551,989.458519
88,290
pythondev
help
not sure how best to do this, I've been doing this for requests from an actual browser
2017-08-01T01:46:55.463273
Beverley
pythondev_help_Beverley_2017-08-01T01:46:55.463273
1,501,552,015.463273
88,291
pythondev
help
If you want to send in json with curl: `curl -X POST -d '{"manual": "json"}' -H 'Content-Type: application/json' <http://localhost/route>`
2017-08-01T01:47:16.467224
Beula
pythondev_help_Beula_2017-08-01T01:47:16.467224
1,501,552,036.467224
88,292
pythondev
help
ah got it
2017-08-01T01:47:54.473665
Beverley
pythondev_help_Beverley_2017-08-01T01:47:54.473665
1,501,552,074.473665
88,293
pythondev
help
but, doing that doesn't give you any validations with manually calling `json.loads`, so you get other issues there.
2017-08-01T01:48:04.475502
Beula
pythondev_help_Beula_2017-08-01T01:48:04.475502
1,501,552,084.475502
88,294
pythondev
help
You can just the built in django forms, and just use forms so you get the validation logic
2017-08-01T01:48:22.478737
Beula
pythondev_help_Beula_2017-08-01T01:48:22.478737
1,501,552,102.478737
88,295
pythondev
help
but json.loads will work this way... django is a backend for an app and the client wants to use jwt i.e. json only to communicate
2017-08-01T01:49:11.487681
Beverley
pythondev_help_Beverley_2017-08-01T01:49:11.487681
1,501,552,151.487681
88,296
pythondev
help
jwt is a bearer token format, it doesn't indicate the app is json only
2017-08-01T01:49:32.491347
Beula
pythondev_help_Beula_2017-08-01T01:49:32.491347
1,501,552,172.491347
88,297
pythondev
help
but it's okay if that's the way you want to communicate. In that case if this is a big api - you may want to try out django-rest-framework
2017-08-01T01:49:55.495280
Beula
pythondev_help_Beula_2017-08-01T01:49:55.495280
1,501,552,195.49528
88,298
pythondev
help
It'll save you a lot of manual work like that
2017-08-01T01:50:01.496528
Beula
pythondev_help_Beula_2017-08-01T01:50:01.496528
1,501,552,201.496528
88,299
pythondev
help
yes I'm getting user token with it but he wants additional features so I'm mimicking the input &gt; output format
2017-08-01T01:50:18.499646
Beverley
pythondev_help_Beverley_2017-08-01T01:50:18.499646
1,501,552,218.499646
88,300
pythondev
help
I would try that but this is a small project and I'm keeping it simple
2017-08-01T01:51:16.510377
Beverley
pythondev_help_Beverley_2017-08-01T01:51:16.510377
1,501,552,276.510377
88,301
pythondev
help
cool :slightly_smiling_face:
2017-08-01T01:51:24.511815
Beula
pythondev_help_Beula_2017-08-01T01:51:24.511815
1,501,552,284.511815
88,302