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
But you might find some nuggets in there
2017-10-02T12:20:24.000298
Marcelina
pythondev_help_Marcelina_2017-10-02T12:20:24.000298
1,506,946,824.000298
95,403
pythondev
help
Ok, thank you very much
2017-10-02T12:20:36.000381
Rosamaria
pythondev_help_Rosamaria_2017-10-02T12:20:36.000381
1,506,946,836.000381
95,404
pythondev
help
This is the type of stuff I was looking for
2017-10-02T12:20:41.000654
Rosamaria
pythondev_help_Rosamaria_2017-10-02T12:20:41.000654
1,506,946,841.000654
95,405
pythondev
help
Is there a way to format links into text in slack? If there is it is lost on me.
2017-10-02T12:21:39.000368
Mallie
pythondev_help_Mallie_2017-10-02T12:21:39.000368
1,506,946,899.000368
95,406
pythondev
help
<https://www.programmableweb.com/news/api-anti-patterns-how-to-avoid-common-rest-mistakes/2010/08/13>
2017-10-02T12:21:41.000563
Marcelina
pythondev_help_Marcelina_2017-10-02T12:21:41.000563
1,506,946,901.000563
95,407
pythondev
help
That sums up his presentation much better - his slides were kind of all over the place
2017-10-02T12:22:38.000244
Marcelina
pythondev_help_Marcelina_2017-10-02T12:22:38.000244
1,506,946,958.000244
95,408
pythondev
help
<@Mallie> no.
2017-10-02T12:25:53.000734
Meg
pythondev_help_Meg_2017-10-02T12:25:53.000734
1,506,947,153.000734
95,409
pythondev
help
<@Rosamaria> this is a pretty good guide
2017-10-02T12:27:02.000434
Meg
pythondev_help_Meg_2017-10-02T12:27:02.000434
1,506,947,222.000434
95,410
pythondev
help
<http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api>
2017-10-02T12:27:02.000734
Meg
pythondev_help_Meg_2017-10-02T12:27:02.000734
1,506,947,222.000734
95,411
pythondev
help
Ooo - I like yours better
2017-10-02T12:27:57.000161
Marcelina
pythondev_help_Marcelina_2017-10-02T12:27:57.000161
1,506,947,277.000161
95,412
pythondev
help
any resources on best practices to filter with optional query parameters without making a mess of code?
2017-10-02T12:34:32.000009
Meg
pythondev_help_Meg_2017-10-02T12:34:32.000009
1,506,947,672.000009
95,413
pythondev
help
can be general or django-specific
2017-10-02T12:34:47.000403
Meg
pythondev_help_Meg_2017-10-02T12:34:47.000403
1,506,947,687.000403
95,414
pythondev
help
I'm working on refactoring an api backend that is pretty messy
2017-10-02T12:44:32.000120
Meg
pythondev_help_Meg_2017-10-02T12:44:32.000120
1,506,948,272.00012
95,415
pythondev
help
downside, there's six possible query parameters I have to account for, and only one is required
2017-10-02T12:45:03.000006
Meg
pythondev_help_Meg_2017-10-02T12:45:03.000006
1,506,948,303.000006
95,416
pythondev
help
<@Meg> What's it look like (if that is ok)?
2017-10-02T12:46:17.000501
Mallie
pythondev_help_Mallie_2017-10-02T12:46:17.000501
1,506,948,377.000501
95,417
pythondev
help
and that's _after_ I cleaned it up two years ago. Before, it was far worse
2017-10-02T12:48:31.000366
Meg
pythondev_help_Meg_2017-10-02T12:48:31.000366
1,506,948,511.000366
95,418
pythondev
help
at this point, I think its highly overcomplicated
2017-10-02T12:52:16.000552
Meg
pythondev_help_Meg_2017-10-02T12:52:16.000552
1,506,948,736.000552
95,419
pythondev
help
and might be a case of lipstick on a pig to move forward without re-evaluating
2017-10-02T12:52:33.000721
Meg
pythondev_help_Meg_2017-10-02T12:52:33.000721
1,506,948,753.000721
95,420
pythondev
help
Well `request.GET` permits lookup by key - so why repack them just to check for the one necessary, then just unpack them again anyway? You could just `request.GET.get()` or `[string] in request.GET` and remove most of that top code I'd think. I would check for the required field and leave immediately without any other processing personally. Also, if you want to use **kwargs, you could provide a mapping between kwarg and value then just provide them if they exist, if you are interested in making it more terse, since you are just ANDing things in your filter and exclude cases e.g. ``` d={'catalog__institution__unitid': 1, 'catalog__institution__name__icontains': 2, 'catalog__institution__status': None} **dict((key, value) for key,value in d.items() if value) ``` Can't these be grouped into a `filter` too: `Q(catalog__status = 'Verified') &amp; Q(name = 'Catalog Home')`. I'd only add the verbosity of Q for OR
2017-10-02T13:06:15.000491
Mallie
pythondev_help_Mallie_2017-10-02T13:06:15.000491
1,506,949,575.000491
95,421
pythondev
help
You might like `filter_params.get(field[5], None)` rather than your ternaries
2017-10-02T13:06:43.000426
Marcelina
pythondev_help_Marcelina_2017-10-02T13:06:43.000426
1,506,949,603.000426
95,422
pythondev
help
This section is the most mysterious to me ``` # More custom query for filters custom_query &amp;= Q(catalog__institution__state = state) custom_query &amp;= Q(Q(flags__gte = 5) &amp; Q(media_type = 'PDF')) | Q(media_type = 'Web') | Q(media_type = 'Multi-Part PDF') custom_query &amp;= Q(catalog__status = 'Verified') &amp; Q(name = 'Catalog Home') &amp; Q(catalog__cataloglink__name = 'Catalog Home')```
2017-10-02T13:08:10.000283
Marcelina
pythondev_help_Marcelina_2017-10-02T13:08:10.000283
1,506,949,690.000283
95,423
pythondev
help
It looks like some bitwise logic
2017-10-02T13:08:20.000430
Marcelina
pythondev_help_Marcelina_2017-10-02T13:08:20.000430
1,506,949,700.00043
95,424
pythondev
help
In the Django ORM when working with querysets, the bitwise operators are overridden so you can do query building: <https://docs.djangoproject.com/en/1.11/topics/db/queries/#complex-lookups-with-q-objects>
2017-10-02T13:09:00.000352
Mallie
pythondev_help_Mallie_2017-10-02T13:09:00.000352
1,506,949,740.000352
95,425
pythondev
help
basically, I need to explicityly filter based on those fields
2017-10-02T13:09:04.000015
Meg
pythondev_help_Meg_2017-10-02T13:09:04.000015
1,506,949,744.000015
95,426
pythondev
help
Ahhh
2017-10-02T13:09:06.000041
Marcelina
pythondev_help_Marcelina_2017-10-02T13:09:06.000041
1,506,949,746.000041
95,427
pythondev
help
Thanks
2017-10-02T13:09:07.000393
Marcelina
pythondev_help_Marcelina_2017-10-02T13:09:07.000393
1,506,949,747.000393
95,428
pythondev
help
I'm saying AND is encompassed fully in `filter` - if you need to OR you are stuck with `Q`
2017-10-02T13:09:22.000069
Mallie
pythondev_help_Mallie_2017-10-02T13:09:22.000069
1,506,949,762.000069
95,429
pythondev
help
and if you want to do a NOT query without using `exclude`, then you need to use a Q object
2017-10-02T13:09:53.000317
Meg
pythondev_help_Meg_2017-10-02T13:09:53.000317
1,506,949,793.000317
95,430
pythondev
help
appreciate the thoughts :slightly_smiling_face:
2017-10-02T13:10:13.000487
Meg
pythondev_help_Meg_2017-10-02T13:10:13.000487
1,506,949,813.000487
95,431
pythondev
help
Jupyter is browser-based right? Did you clear your cache when changing versions (new static files with same name?)
2017-10-02T13:13:02.000056
Mallie
pythondev_help_Mallie_2017-10-02T13:13:02.000056
1,506,949,982.000056
95,432
pythondev
help
Disclaimer: I've never used Jupyter
2017-10-02T13:13:26.000364
Mallie
pythondev_help_Mallie_2017-10-02T13:13:26.000364
1,506,950,006.000364
95,433
pythondev
help
Yes, browser based. I didn't try with cache. Will do
2017-10-02T13:14:39.000012
Nicol
pythondev_help_Nicol_2017-10-02T13:14:39.000012
1,506,950,079.000012
95,434
pythondev
help
Thanks a lot
2017-10-02T13:15:19.000176
Nicol
pythondev_help_Nicol_2017-10-02T13:15:19.000176
1,506,950,119.000176
95,435
pythondev
help
<@Meg> i had a similar problem in the past. i used parsimonius to build a parse tree. we called it quest. queries over rest
2017-10-02T13:16:50.000022
Johana
pythondev_help_Johana_2017-10-02T13:16:50.000022
1,506,950,210.000022
95,436
pythondev
help
<https://github.com/erikrose/parsimonious>
2017-10-02T13:17:36.000220
Meg
pythondev_help_Meg_2017-10-02T13:17:36.000220
1,506,950,256.00022
95,437
pythondev
help
this one?
2017-10-02T13:17:37.000430
Meg
pythondev_help_Meg_2017-10-02T13:17:37.000430
1,506,950,257.00043
95,438
pythondev
help
<@Mallie> :taco: <@Marcelina> :taco:
2017-10-02T13:18:01.000014
Meg
pythondev_help_Meg_2017-10-02T13:18:01.000014
1,506,950,281.000014
95,439
pythondev
help
yea
2017-10-02T13:18:11.000261
Johana
pythondev_help_Johana_2017-10-02T13:18:11.000261
1,506,950,291.000261
95,440
pythondev
help
nice!
2017-10-02T13:18:23.000410
Meg
pythondev_help_Meg_2017-10-02T13:18:23.000410
1,506,950,303.00041
95,441
pythondev
help
the code is in a private repo so unfortunately cannot share.
2017-10-02T13:18:40.000323
Johana
pythondev_help_Johana_2017-10-02T13:18:40.000323
1,506,950,320.000323
95,442
pythondev
help
understood
2017-10-02T13:18:48.000121
Meg
pythondev_help_Meg_2017-10-02T13:18:48.000121
1,506,950,328.000121
95,443
pythondev
help
<@Mallie> Din't help, but thanks anyway!
2017-10-02T13:31:08.000145
Nicol
pythondev_help_Nicol_2017-10-02T13:31:08.000145
1,506,951,068.000145
95,444
pythondev
help
Had to try! :thumbsup:
2017-10-02T13:31:47.000550
Mallie
pythondev_help_Mallie_2017-10-02T13:31:47.000550
1,506,951,107.00055
95,445
pythondev
help
I work for a company that uses a lot of the python scientific packages. We use docker containers for running these packages currently. There are two issues I'm trying to figure out how to solve. First, what's the common methodology for storing/accessing large data locally? The large data is stored in the cloud - we are examining how that is stored right now, but it could be any back-end. `from data_loader import some_data_set`. would be the ideal line. My thought was to do a staged caching mechanism, e.g. if the data exists locally, use it. If it doesn't, pull it. Has anyone ever stumbled across a design pattern similar to this? Second, since everything runs inside a docker container, would it really be so wrong to, on program start, if we are not running inside our docker image, start it and redirect everything to run inside it?
2017-10-02T17:51:43.000054
Marcelina
pythondev_help_Marcelina_2017-10-02T17:51:43.000054
1,506,966,703.000054
95,446
pythondev
help
3rd, does anyone have any lessons learned from running their own PyPI server privately?
2017-10-02T17:52:54.000115
Marcelina
pythondev_help_Marcelina_2017-10-02T17:52:54.000115
1,506,966,774.000115
95,447
pythondev
help
Finally, does anyone think I ask too many questions?
2017-10-02T17:53:04.000341
Marcelina
pythondev_help_Marcelina_2017-10-02T17:53:04.000341
1,506,966,784.000341
95,448
pythondev
help
Hi Guys Do you Know "Aİ" about python library source?
2017-10-02T18:04:27.000063
Lawerence
pythondev_help_Lawerence_2017-10-02T18:04:27.000063
1,506,967,467.000063
95,449
pythondev
help
<@Lawerence> Could you rephrase/expand a little
2017-10-02T18:07:20.000041
Marcelina
pythondev_help_Marcelina_2017-10-02T18:07:20.000041
1,506,967,640.000041
95,450
pythondev
help
?
2017-10-02T18:07:20.000434
Marcelina
pythondev_help_Marcelina_2017-10-02T18:07:20.000434
1,506,967,640.000434
95,451
pythondev
help
Do you know Artificial intelligence library for python ?
2017-10-02T18:10:05.000105
Lawerence
pythondev_help_Lawerence_2017-10-02T18:10:05.000105
1,506,967,805.000105
95,452
pythondev
help
Ahhh - there are many
2017-10-02T18:10:15.000229
Marcelina
pythondev_help_Marcelina_2017-10-02T18:10:15.000229
1,506,967,815.000229
95,453
pythondev
help
If you're looking for a jumping off point
2017-10-02T18:10:31.000483
Marcelina
pythondev_help_Marcelina_2017-10-02T18:10:31.000483
1,506,967,831.000483
95,454
pythondev
help
<http://www.fast.ai/>
2017-10-02T18:10:32.000216
Marcelina
pythondev_help_Marcelina_2017-10-02T18:10:32.000216
1,506,967,832.000216
95,455
pythondev
help
ahh Thx bro :smile:
2017-10-02T18:10:53.000150
Lawerence
pythondev_help_Lawerence_2017-10-02T18:10:53.000150
1,506,967,853.00015
95,456
pythondev
help
:thumbsup:
2017-10-02T18:11:30.000275
Marcelina
pythondev_help_Marcelina_2017-10-02T18:11:30.000275
1,506,967,890.000275
95,457
pythondev
help
<@Marcelina> interesting questions :slightly_smiling_face:
2017-10-02T18:13:47.000028
Meg
pythondev_help_Meg_2017-10-02T18:13:47.000028
1,506,968,027.000028
95,458
pythondev
help
about the only issue I could see with you doing a staging mechanism is to ensure there’s enough storage locally before starting the download
2017-10-02T18:14:18.000138
Meg
pythondev_help_Meg_2017-10-02T18:14:18.000138
1,506,968,058.000138
95,459
pythondev
help
second, I could see that being a good use pattern
2017-10-02T18:14:41.000196
Meg
pythondev_help_Meg_2017-10-02T18:14:41.000196
1,506,968,081.000196
95,460
pythondev
help
third, sorry, can’t say
2017-10-02T18:14:56.000326
Meg
pythondev_help_Meg_2017-10-02T18:14:56.000326
1,506,968,096.000326
95,461
pythondev
help
That was my thought - and that was why I was wondering about running outside docker because inside docker, you got no idea how much is remaining
2017-10-02T18:14:57.000148
Marcelina
pythondev_help_Marcelina_2017-10-02T18:14:57.000148
1,506,968,097.000148
95,462
pythondev
help
with docker, you can symlink to external resources, correct?
2017-10-02T18:15:19.000216
Meg
pythondev_help_Meg_2017-10-02T18:15:19.000216
1,506,968,119.000216
95,463
pythondev
help
You can mount resources externally
2017-10-02T18:15:29.000103
Marcelina
pythondev_help_Marcelina_2017-10-02T18:15:29.000103
1,506,968,129.000103
95,464
pythondev
help
But as a container, it's not really aware of the system space remaining
2017-10-02T18:15:40.000084
Marcelina
pythondev_help_Marcelina_2017-10-02T18:15:40.000084
1,506,968,140.000084
95,465
pythondev
help
ah ok
2017-10-02T18:16:00.000265
Meg
pythondev_help_Meg_2017-10-02T18:16:00.000265
1,506,968,160.000265
95,466
pythondev
help
I think there's some workarounds I can do there
2017-10-02T18:16:11.000067
Marcelina
pythondev_help_Marcelina_2017-10-02T18:16:11.000067
1,506,968,171.000067
95,467
pythondev
help
so, seems like you’d have to ensure creation of the container
2017-10-02T18:16:12.000171
Meg
pythondev_help_Meg_2017-10-02T18:16:12.000171
1,506,968,172.000171
95,468
pythondev
help
Admittedly
2017-10-02T18:16:12.000358
Marcelina
pythondev_help_Marcelina_2017-10-02T18:16:12.000358
1,506,968,172.000358
95,469
pythondev
help
and then mount it
2017-10-02T18:16:19.000120
Meg
pythondev_help_Meg_2017-10-02T18:16:19.000120
1,506,968,179.00012
95,470
pythondev
help
somewhat complex there
2017-10-02T18:16:25.000111
Meg
pythondev_help_Meg_2017-10-02T18:16:25.000111
1,506,968,185.000111
95,471
pythondev
help
hrms
2017-10-02T18:16:43.000211
Marcelina
pythondev_help_Marcelina_2017-10-02T18:16:43.000211
1,506,968,203.000211
95,472
pythondev
help
ok
2017-10-02T18:16:44.000418
Marcelina
pythondev_help_Marcelina_2017-10-02T18:16:44.000418
1,506,968,204.000418
95,473
pythondev
help
I’d probaby go to the <#C22DMH61M|devops> channel for that
2017-10-02T18:16:50.000370
Meg
pythondev_help_Meg_2017-10-02T18:16:50.000370
1,506,968,210.00037
95,474
pythondev
help
fair enough
2017-10-02T18:16:58.000238
Marcelina
pythondev_help_Marcelina_2017-10-02T18:16:58.000238
1,506,968,218.000238
95,475
pythondev
help
since there are some docker people there and thats usually where this kind of topic is discussed :slightly_smiling_face:
2017-10-02T18:17:15.000101
Meg
pythondev_help_Meg_2017-10-02T18:17:15.000101
1,506,968,235.000101
95,476
pythondev
help
I gotcha
2017-10-02T18:17:21.000166
Marcelina
pythondev_help_Marcelina_2017-10-02T18:17:21.000166
1,506,968,241.000166
95,477
pythondev
help
But the data access pattern
2017-10-02T18:17:58.000060
Marcelina
pythondev_help_Marcelina_2017-10-02T18:17:58.000060
1,506,968,278.00006
95,478
pythondev
help
I just can't think of another method
2017-10-02T18:18:09.000054
Marcelina
pythondev_help_Marcelina_2017-10-02T18:18:09.000054
1,506,968,289.000054
95,479
pythondev
help
does this data change often
2017-10-02T18:18:25.000216
Meg
pythondev_help_Meg_2017-10-02T18:18:25.000216
1,506,968,305.000216
95,480
pythondev
help
Yes
2017-10-02T18:18:28.000353
Marcelina
pythondev_help_Marcelina_2017-10-02T18:18:28.000353
1,506,968,308.000353
95,481
pythondev
help
hmm
2017-10-02T18:18:33.000134
Meg
pythondev_help_Meg_2017-10-02T18:18:33.000134
1,506,968,313.000134
95,482
pythondev
help
Well
2017-10-02T18:18:38.000307
Marcelina
pythondev_help_Marcelina_2017-10-02T18:18:38.000307
1,506,968,318.000307
95,483
pythondev
help
Depends on the set
2017-10-02T18:18:42.000075
Marcelina
pythondev_help_Marcelina_2017-10-02T18:18:42.000075
1,506,968,322.000075
95,484
pythondev
help
But assume yes
2017-10-02T18:18:44.000135
Marcelina
pythondev_help_Marcelina_2017-10-02T18:18:44.000135
1,506,968,324.000135
95,485
pythondev
help
otherwise, I’d suggest an in-company dockerhub or something
2017-10-02T18:18:45.000007
Meg
pythondev_help_Meg_2017-10-02T18:18:45.000007
1,506,968,325.000007
95,486
pythondev
help
We use quay
2017-10-02T18:18:52.000118
Marcelina
pythondev_help_Marcelina_2017-10-02T18:18:52.000118
1,506,968,332.000118
95,487
pythondev
help
And I thought about packing the data into images
2017-10-02T18:19:01.000280
Marcelina
pythondev_help_Marcelina_2017-10-02T18:19:01.000280
1,506,968,341.00028
95,488
pythondev
help
where you can create and deploy containers for others to retrieve and run
2017-10-02T18:19:03.000015
Meg
pythondev_help_Meg_2017-10-02T18:19:03.000015
1,506,968,343.000015
95,489
pythondev
help
Yea - but the issue you'll run into there is that on OSX, there is a default 64GB cap on docker volumes - but another question for the <#C22DMH61M|devops>
2017-10-02T18:19:41.000085
Marcelina
pythondev_help_Marcelina_2017-10-02T18:19:41.000085
1,506,968,381.000085
95,490
pythondev
help
<@Lawerence> openCV, sci-kit, openai, tensorflow (with tensorboard), theano (via Keras) are good starting points.
2017-10-02T19:35:16.000158
Seema
pythondev_help_Seema_2017-10-02T19:35:16.000158
1,506,972,916.000158
95,491
pythondev
help
<@Collette> could you explain this comprehension?
2017-10-02T23:46:34.000112
Winnie
pythondev_help_Winnie_2017-10-02T23:46:34.000112
1,506,987,994.000112
95,492
pythondev
help
<@Winnie> what exactly confuses you?
2017-10-03T00:20:47.000173
Collette
pythondev_help_Collette_2017-10-03T00:20:47.000173
1,506,990,047.000173
95,493
pythondev
help
Okay so I'm trying to grab artwork from soundcloud and I have two options of images to grab. I can either grab a 500x500 `.jpeg` or the banner image
2017-10-03T00:24:24.000058
Myong
pythondev_help_Myong_2017-10-03T00:24:24.000058
1,506,990,264.000058
95,494
pythondev
help
Example- Banner: <https://va.sndcdn.com/bg/soundcloud:tracks:257659076/soundcloud-tracks-257659076.jpg> Album Cover: <https://i1.sndcdn.com/artworks-000156896947-3ch8k2-t500x500.jpg>
2017-10-03T00:24:53.000148
Myong
pythondev_help_Myong_2017-10-03T00:24:53.000148
1,506,990,293.000148
95,495
pythondev
help
We run a PyPI server in Nexus <https://www.sonatype.com/nexus-repository-sonatype> The OSS variant which you can self-host includes Python support.
2017-10-03T02:05:35.000071
Carri
pythondev_help_Carri_2017-10-03T02:05:35.000071
1,506,996,335.000071
95,496
pythondev
help
I have it set up to have 3 pypi repositories. `pypi-upstream` which is a proxy to `<https://pypi.python.org>` `pypi-internal` which is our hosted one and `pypi-all` which is a pypi group with which both of the previous repositories are members, with `internal` being the first in the list
2017-10-03T02:08:26.000007
Carri
pythondev_help_Carri_2017-10-03T02:08:26.000007
1,506,996,506.000007
95,497
pythondev
help
This allows us to easily upload wheels with `twine` to our internal repo, and if anyone does a `pip install` it will get proxied through our nexus repo, as the `pip.conf` file users have in their home directories specifies that to be the default global destination
2017-10-03T02:10:35.000051
Carri
pythondev_help_Carri_2017-10-03T02:10:35.000051
1,506,996,635.000051
95,498
pythondev
help
``` [global] index = <http://nexus>.${HOSTNAME}/repository/pypi-all/pypi index-url = <http://nexus>.${HOSTNAME}/repository/pypi-all/simple trusted-host = nexus.${HOSTNAME} format=columns [distutils] index-servers = nexus ```
2017-10-03T02:11:31.000124
Carri
pythondev_help_Carri_2017-10-03T02:11:31.000124
1,506,996,691.000124
95,499
pythondev
help
Not sure what lessons there are to learn, except that it just works with nexus
2017-10-03T02:13:22.000013
Carri
pythondev_help_Carri_2017-10-03T02:13:22.000013
1,506,996,802.000013
95,500
pythondev
help
Running warehouse yourself might incur more effort, but unlikely as it has docker &amp; docker-compose support in the repo <https://github.com/pypa/warehouse>
2017-10-03T02:14:14.000218
Carri
pythondev_help_Carri_2017-10-03T02:14:14.000218
1,506,996,854.000218
95,501
pythondev
help
so <#C0JB9ATQV|data_science> channel isn’t so active apparently - trying to post this question here as well. Thanks!
2017-10-03T03:05:18.000151
Dinah
pythondev_help_Dinah_2017-10-03T03:05:18.000151
1,506,999,918.000151
95,502