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
<@Sherry> it is
2017-07-06T18:02:23.924915
Suellen
pythondev_help_Suellen_2017-07-06T18:02:23.924915
1,499,364,143.924915
84,303
pythondev
help
<http://flask.pocoo.org/docs/0.12/api/#flask.abort>
2017-07-06T18:02:26.925795
Suellen
pythondev_help_Suellen_2017-07-06T18:02:26.925795
1,499,364,146.925795
84,304
pythondev
help
LOL, thanks! I forgot to import it.
2017-07-06T18:03:20.945869
Sherry
pythondev_help_Sherry_2017-07-06T18:03:20.945869
1,499,364,200.945869
84,305
pythondev
help
Ha, no. I'm combining both your suggestions! :grinning:
2017-07-06T18:46:59.776368
Meg
pythondev_help_Meg_2017-07-06T18:46:59.776368
1,499,366,819.776368
84,306
pythondev
help
Hi again, I have a flask app that I am running that is collecting real time slack data from my slack server. I am appending messages to a list (i’m using RTM in python) and need my flask app to constantly allow get requests to view the messages. I am having a hard time figuring out threading with flask. Are there any good guides to do so?
2017-07-06T20:31:59.332900
Sherry
pythondev_help_Sherry_2017-07-06T20:31:59.332900
1,499,373,119.3329
84,307
pythondev
help
Try using some type of caching system like redis. Every flask request lives in it's own thread. So communication between them can be hard and i think it's not recommended
2017-07-06T20:53:43.591560
Mariano
pythondev_help_Mariano_2017-07-06T20:53:43.591560
1,499,374,423.59156
84,308
pythondev
help
try to use something like `redis` to store that list
2017-07-06T20:54:01.595136
Mariano
pythondev_help_Mariano_2017-07-06T20:54:01.595136
1,499,374,441.595136
84,309
pythondev
help
Thanks, I’ll look into it!
2017-07-06T20:56:46.628417
Sherry
pythondev_help_Sherry_2017-07-06T20:56:46.628417
1,499,374,606.628417
84,310
pythondev
help
<@Mariano> :taco:
2017-07-06T21:02:44.704456
Beula
pythondev_help_Beula_2017-07-06T21:02:44.704456
1,499,374,964.704456
84,311
pythondev
help
How might I make an endpoint require authentication in Flask-restful? I know in Flask you can use `@auth.login_required` but having difficulty finding out about doing it in Flask-restful
2017-07-06T21:31:47.041790
Thomasina
pythondev_help_Thomasina_2017-07-06T21:31:47.041790
1,499,376,707.04179
84,312
pythondev
help
I mean, just that specific aspect
2017-07-06T21:33:02.056126
Thomasina
pythondev_help_Thomasina_2017-07-06T21:33:02.056126
1,499,376,782.056126
84,313
pythondev
help
I think you want: <https://flask-restful.readthedocs.io/en/0.3.5/extending.html#resource-method-decorators>
2017-07-06T21:33:13.058231
Beula
pythondev_help_Beula_2017-07-06T21:33:13.058231
1,499,376,793.058231
84,314
pythondev
help
<@Beula> Oh, nice! Thanks.
2017-07-06T21:38:21.117258
Thomasina
pythondev_help_Thomasina_2017-07-06T21:38:21.117258
1,499,377,101.117258
84,315
pythondev
help
This helped me as well. TY, <@Beula> :taco:
2017-07-06T22:01:07.375420
Winnifred
pythondev_help_Winnifred_2017-07-06T22:01:07.375420
1,499,378,467.37542
84,316
pythondev
help
:taco: <@Mariano>
2017-07-07T00:38:40.914170
Sherry
pythondev_help_Sherry_2017-07-07T00:38:40.914170
1,499,387,920.91417
84,317
pythondev
help
is <@Beula> the taco legend? :thinking_face:
2017-07-07T00:39:09.918696
Sherry
pythondev_help_Sherry_2017-07-07T00:39:09.918696
1,499,387,949.918696
84,318
pythondev
help
<@Lenny> leaderboard
2017-07-07T00:42:08.944982
Beula
pythondev_help_Beula_2017-07-07T00:42:08.944982
1,499,388,128.944982
84,319
pythondev
help
Not yet.
2017-07-07T00:42:15.946066
Beula
pythondev_help_Beula_2017-07-07T00:42:15.946066
1,499,388,135.946066
84,320
pythondev
help
Oh no... Your catching up.
2017-07-07T00:49:54.015092
Signe
pythondev_help_Signe_2017-07-07T00:49:54.015092
1,499,388,594.015092
84,321
pythondev
help
Guess i better start farming again
2017-07-07T00:50:04.016597
Signe
pythondev_help_Signe_2017-07-07T00:50:04.016597
1,499,388,604.016597
84,322
pythondev
help
I want to mine tacos. Currently at 0 tacos. :smile:
2017-07-07T00:51:05.026165
Shelly
pythondev_help_Shelly_2017-07-07T00:51:05.026165
1,499,388,665.026165
84,323
pythondev
help
Hang out at <#C07EFMZ1N|help> and <#C07EW4DNE|learning_python>
2017-07-07T00:51:35.030621
Signe
pythondev_help_Signe_2017-07-07T00:51:35.030621
1,499,388,695.030621
84,324
pythondev
help
Oh, this is help &gt;.&lt;
2017-07-07T00:51:48.032697
Signe
pythondev_help_Signe_2017-07-07T00:51:48.032697
1,499,388,708.032697
84,325
pythondev
help
I get a lot of tacos from writing blog posts and using them to help answer questions when relavant
2017-07-07T00:52:28.038774
Signe
pythondev_help_Signe_2017-07-07T00:52:28.038774
1,499,388,748.038774
84,326
pythondev
help
But thats a lof of effort
2017-07-07T00:52:57.043006
Signe
pythondev_help_Signe_2017-07-07T00:52:57.043006
1,499,388,777.043006
84,327
pythondev
help
<@Signe> I think you are a taco mining bot, you certainly aren't human, my friend.
2017-07-07T00:53:26.047431
Shelly
pythondev_help_Shelly_2017-07-07T00:53:26.047431
1,499,388,806.047431
84,328
pythondev
help
Lol
2017-07-07T00:53:33.048461
Signe
pythondev_help_Signe_2017-07-07T00:53:33.048461
1,499,388,813.048461
84,329
pythondev
help
I also push myself to use the opportunity of people asking questions to learn myself
2017-07-07T00:53:59.052498
Signe
pythondev_help_Signe_2017-07-07T00:53:59.052498
1,499,388,839.052498
84,330
pythondev
help
If someone has a question i dont quite know the answer too, i try to find it, mainly for me. But then once i do, i get tacos, sometimes
2017-07-07T00:54:34.058089
Signe
pythondev_help_Signe_2017-07-07T00:54:34.058089
1,499,388,874.058089
84,331
pythondev
help
Im here to learn what i dont know that i dont know
2017-07-07T00:55:00.062231
Signe
pythondev_help_Signe_2017-07-07T00:55:00.062231
1,499,388,900.062231
84,332
pythondev
help
<@Signe> I think we should have a digress bot, which warns when chatters are going out of channel topic area.
2017-07-07T00:55:33.067437
Shelly
pythondev_help_Shelly_2017-07-07T00:55:33.067437
1,499,388,933.067437
84,333
pythondev
help
Is that a hint to me ;) im always guilty of that
2017-07-07T00:55:57.071084
Signe
pythondev_help_Signe_2017-07-07T00:55:57.071084
1,499,388,957.071084
84,334
pythondev
help
1/2 of those tacos are from me in the 2 wks I've been here. :laughing:
2017-07-07T00:55:58.071270
Deedee
pythondev_help_Deedee_2017-07-07T00:55:58.071270
1,499,388,958.07127
84,335
pythondev
help
I PUT YOU ALL ON THE MAP!
2017-07-07T00:56:13.073346
Deedee
pythondev_help_Deedee_2017-07-07T00:56:13.073346
1,499,388,973.073346
84,336
pythondev
help
You sent me 100+ tacos?
2017-07-07T00:56:13.073362
Signe
pythondev_help_Signe_2017-07-07T00:56:13.073362
1,499,388,973.073362
84,337
pythondev
help
<@Signe> Wasn't hinting anyone, just a random thought. Should have been on <#C07EFN21K|random>. My bad.
2017-07-07T00:56:51.079273
Shelly
pythondev_help_Shelly_2017-07-07T00:56:51.079273
1,499,389,011.079273
84,338
pythondev
help
Haha no worries. Im just being silly. Tone is hard on slack :(
2017-07-07T00:57:11.082304
Signe
pythondev_help_Signe_2017-07-07T00:57:11.082304
1,499,389,031.082304
84,339
pythondev
help
<@Signe> joking. Have had lots of help from everyone here (especially those from list). Incredibly grateful.
2017-07-07T00:57:39.086360
Deedee
pythondev_help_Deedee_2017-07-07T00:57:39.086360
1,499,389,059.08636
84,340
pythondev
help
<@Alesia> would have anything to add ?
2017-07-07T00:57:56.088762
Shelly
pythondev_help_Shelly_2017-07-07T00:57:56.088762
1,499,389,076.088762
84,341
pythondev
help
Its an interesting idea for a slash command for people to annonymously report digression. Maybe add a feature request in <#C2FMLUBEU|community_projects> for sirbotalot?
2017-07-07T00:58:08.090515
Signe
pythondev_help_Signe_2017-07-07T00:58:08.090515
1,499,389,088.090515
84,342
pythondev
help
yup
2017-07-07T00:58:22.092639
Shelly
pythondev_help_Shelly_2017-07-07T00:58:22.092639
1,499,389,102.092639
84,343
pythondev
help
Glad your enjoying the community
2017-07-07T00:58:39.095179
Signe
pythondev_help_Signe_2017-07-07T00:58:39.095179
1,499,389,119.095179
84,344
pythondev
help
<@Signe> :taco:
2017-07-07T01:00:13.111059
Shelly
pythondev_help_Shelly_2017-07-07T01:00:13.111059
1,499,389,213.111059
84,345
pythondev
help
:tacobell:
2017-07-07T01:00:33.114581
Signe
pythondev_help_Signe_2017-07-07T01:00:33.114581
1,499,389,233.114581
84,346
pythondev
help
Hi
2017-07-07T05:39:45.554172
Mirna
pythondev_help_Mirna_2017-07-07T05:39:45.554172
1,499,405,985.554172
84,347
pythondev
help
Does anyone have experience in `protobuf`? I want to know how to map a `dictionary` to `protobuf`. I’ve tried this one : `<https://github.com/davyzhang/dict-to-protobuf>`. But it doesn’t work in nested case.
2017-07-07T05:40:56.579679
Mirna
pythondev_help_Mirna_2017-07-07T05:40:56.579679
1,499,406,056.579679
84,348
pythondev
help
<@Mirna> found in one of my projects: `from protobuf_to_dict import protobuf_to_dict, dict_to_protobuf`
2017-07-07T05:42:49.618659
Suellen
pythondev_help_Suellen_2017-07-07T05:42:49.618659
1,499,406,169.618659
84,349
pythondev
help
The library is called `protobuf3-to-dict`
2017-07-07T05:43:11.626169
Suellen
pythondev_help_Suellen_2017-07-07T05:43:11.626169
1,499,406,191.626169
84,350
pythondev
help
And it handles nested data
2017-07-07T05:43:22.630293
Suellen
pythondev_help_Suellen_2017-07-07T05:43:22.630293
1,499,406,202.630293
84,351
pythondev
help
Ah I see thx <@Suellen>
2017-07-07T05:43:39.636118
Mirna
pythondev_help_Mirna_2017-07-07T05:43:39.636118
1,499,406,219.636118
84,352
pythondev
help
There's also <https://github.com/google/protobuf/blob/master/python/google/protobuf/json_format.py#L112> that from the protobuf library
2017-07-07T05:45:47.681004
Carri
pythondev_help_Carri_2017-07-07T05:45:47.681004
1,499,406,347.681004
84,353
pythondev
help
So I ended up trying to use Flask-HTTPAuth as recommended in this thread <https://github.com/flask-restful/flask-restful/issues/492> however I'm getting `AttributeError: 'function' object has no attribute 'as_view'` even with the most basic demo code. I'm not sure why it wouldn't work...
2017-07-07T05:50:46.786726
Thomasina
pythondev_help_Thomasina_2017-07-07T05:50:46.786726
1,499,406,646.786726
84,354
pythondev
help
<@Carri> Thx a lot Christ :smile:
2017-07-07T05:51:34.803829
Mirna
pythondev_help_Mirna_2017-07-07T05:51:34.803829
1,499,406,694.803829
84,355
pythondev
help
Well, functions don't have `as_view`
2017-07-07T05:54:44.872216
Suellen
pythondev_help_Suellen_2017-07-07T05:54:44.872216
1,499,406,884.872216
84,356
pythondev
help
Yes, but I'm not sure why it would be doing that in the first place. I'm just using the standard Flask, Flask-Restful, and Flask-HTTPAuth libraries like in the project, but the `@auth.login_required` decorator throws that error. The project linked in the thread uses it in the same way but apparently doesn't have that problem...
2017-07-07T05:56:10.902574
Thomasina
pythondev_help_Thomasina_2017-07-07T05:56:10.902574
1,499,406,970.902574
84,357
pythondev
help
I have all the requirements installed so... :confused:
2017-07-07T05:56:17.904961
Thomasina
pythondev_help_Thomasina_2017-07-07T05:56:17.904961
1,499,406,977.904961
84,358
pythondev
help
<https://github.com/flask-restful/flask-restful/blob/ff64cdbef03aa2ce108a7dc06ca336035ec68b70/flask_restful/__init__.py#L444>
2017-07-07T05:56:30.909387
Suellen
pythondev_help_Suellen_2017-07-07T05:56:30.909387
1,499,406,990.909387
84,359
pythondev
help
Flask-restful registers a view like this
2017-07-07T05:56:42.913624
Suellen
pythondev_help_Suellen_2017-07-07T05:56:42.913624
1,499,407,002.913624
84,360
pythondev
help
and the view is supposed to be a class
2017-07-07T05:56:48.915651
Suellen
pythondev_help_Suellen_2017-07-07T05:56:48.915651
1,499,407,008.915651
84,361
pythondev
help
which have an `as_view` method it seems
2017-07-07T05:57:04.921309
Suellen
pythondev_help_Suellen_2017-07-07T05:57:04.921309
1,499,407,024.921309
84,362
pythondev
help
but `@auth.login_required` returns a function. do you apply this decorator to a class?
2017-07-07T05:57:24.928348
Suellen
pythondev_help_Suellen_2017-07-07T05:57:24.928348
1,499,407,044.928348
84,363
pythondev
help
Oh shooooooooooot!! Wow! You're right! I had it on a class rather than a function.
2017-07-07T05:59:20.968420
Thomasina
pythondev_help_Thomasina_2017-07-07T05:59:20.968420
1,499,407,160.96842
84,364
pythondev
help
Thanks a million!
2017-07-07T05:59:50.978705
Thomasina
pythondev_help_Thomasina_2017-07-07T05:59:50.978705
1,499,407,190.978705
84,365
pythondev
help
:slightly_smiling_face: you're welcome
2017-07-07T05:59:59.982172
Suellen
pythondev_help_Suellen_2017-07-07T05:59:59.982172
1,499,407,199.982172
84,366
pythondev
help
I gotta keep learning, maybe someday I can be as good with Python as you seem to be. :smile:
2017-07-07T06:00:41.999218
Thomasina
pythondev_help_Thomasina_2017-07-07T06:00:41.999218
1,499,407,241.999218
84,367
pythondev
help
Is it considered bad practice to append the working dir to the `sys.path` ?
2017-07-07T14:43:30.476938
Ciera
pythondev_help_Ciera_2017-07-07T14:43:30.476938
1,499,438,610.476938
84,368
pythondev
help
i think it may be frowned upon. i usually try to avoid it but when i need alembic `env.py` to be aware of my metadata i do this so that i can import it and have it do autogenerated migrations. The benefits i get out of that are huge so i think it’s worth appending to the sys.path.
2017-07-07T14:45:59.551996
Johana
pythondev_help_Johana_2017-07-07T14:45:59.551996
1,499,438,759.551996
84,369
pythondev
help
In general cases, yes
2017-07-07T14:48:31.627559
Beula
pythondev_help_Beula_2017-07-07T14:48:31.627559
1,499,438,911.627559
84,370
pythondev
help
ok. It's the only solution I found for <@Alesia> to import plugins without the need to have them installed
2017-07-07T14:48:36.630258
Ciera
pythondev_help_Ciera_2017-07-07T14:48:36.630258
1,499,438,916.630258
84,371
pythondev
help
`python -m sirbot` would add the CWD
2017-07-07T14:48:46.635293
Beula
pythondev_help_Beula_2017-07-07T14:48:46.635293
1,499,438,926.635293
84,372
pythondev
help
if sirbot is an executable module
2017-07-07T14:48:52.638209
Beula
pythondev_help_Beula_2017-07-07T14:48:52.638209
1,499,438,932.638209
84,373
pythondev
help
yeah but it's ugly :smile: there is a `sirbot` entry point
2017-07-07T14:49:09.646800
Ciera
pythondev_help_Ciera_2017-07-07T14:49:09.646800
1,499,438,949.6468
84,374
pythondev
help
so it's just `sirbot --config file`
2017-07-07T14:49:21.653249
Ciera
pythondev_help_Ciera_2017-07-07T14:49:21.653249
1,499,438,961.653249
84,375
pythondev
help
then make them pip installable!
2017-07-07T14:49:33.659112
Beula
pythondev_help_Beula_2017-07-07T14:49:33.659112
1,499,438,973.659112
84,376
pythondev
help
yeah they should be but your custom config is also a plugin
2017-07-07T14:50:47.696354
Ciera
pythondev_help_Ciera_2017-07-07T14:50:47.696354
1,499,439,047.696354
84,377
pythondev
help
so making a `setup.py` and installing that every them you modify isn't very user friendly
2017-07-07T14:51:11.708089
Ciera
pythondev_help_Ciera_2017-07-07T14:51:11.708089
1,499,439,071.708089
84,378
pythondev
help
What's the config look like?
2017-07-07T14:51:26.715826
Beula
pythondev_help_Beula_2017-07-07T14:51:26.715826
1,499,439,086.715826
84,379
pythondev
help
ya pip installable would fix it
2017-07-07T14:51:37.721295
Johana
pythondev_help_Johana_2017-07-07T14:51:37.721295
1,499,439,097.721295
84,380
pythondev
help
my solution is to add to the sys path only on `ModuleNotFoundError` so if every thing is installed no problem
2017-07-07T14:51:38.721942
Ciera
pythondev_help_Ciera_2017-07-07T14:51:38.721942
1,499,439,098.721942
84,381
pythondev
help
Is it not just a yaml in `~/.sirbotrc`
2017-07-07T14:51:40.722823
Beula
pythondev_help_Beula_2017-07-07T14:51:40.722823
1,499,439,100.722823
84,382
pythondev
help
if that works and it makes the user experience better, that's a good solution
2017-07-07T14:51:58.731683
Beula
pythondev_help_Beula_2017-07-07T14:51:58.731683
1,499,439,118.731683
84,383
pythondev
help
yes but you also need to do your business logic
2017-07-07T14:51:58.731750
Ciera
pythondev_help_Ciera_2017-07-07T14:51:58.731750
1,499,439,118.73175
84,384
pythondev
help
what sirbot-pythondev is to us
2017-07-07T14:52:04.734437
Ciera
pythondev_help_Ciera_2017-07-07T14:52:04.734437
1,499,439,124.734437
84,385
pythondev
help
just wanted to know if it was `oh my god never do that` or more `best not to but hey it's python go ahead`
2017-07-07T14:53:26.775808
Ciera
pythondev_help_Ciera_2017-07-07T14:53:26.775808
1,499,439,206.775808
84,386
pythondev
help
The latter :slightly_smiling_face:
2017-07-07T14:56:48.877745
Beula
pythondev_help_Beula_2017-07-07T14:56:48.877745
1,499,439,408.877745
84,387
pythondev
help
Making a better user experience is worth it if only the library has to deal with it!
2017-07-07T14:57:04.885742
Beula
pythondev_help_Beula_2017-07-07T14:57:04.885742
1,499,439,424.885742
84,388
pythondev
help
Single, otherwise it includes all that whitespace
2017-07-07T16:05:37.794704
Beula
pythondev_help_Beula_2017-07-07T16:05:37.794704
1,499,443,537.794704
84,389
pythondev
help
Hey guys reading some idiomatic Python and saw they had a pattern match on a tuple. Just wondering what `user` would look like here for this to be able to work
2017-07-08T00:59:50.447732
Alba
pythondev_help_Alba_2017-07-08T00:59:50.447732
1,499,475,590.447732
84,390
pythondev
help
It's just iterable unpacking, you don't need the parens even for it. The "user" here is some sequence type. You can do that with dicts I think now, but only 3.6+ retain order
2017-07-08T01:09:17.483368
Beula
pythondev_help_Beula_2017-07-08T01:09:17.483368
1,499,476,157.483368
84,391
pythondev
help
try `(name,age) = chase.values()`, can't confirm the order
2017-07-08T01:11:06.489357
Shelly
pythondev_help_Shelly_2017-07-08T01:11:06.489357
1,499,476,266.489357
84,392
pythondev
help
Thanks guys :)) I see what you mean now <@Beula> and <@Shelly> got it to do what i wanted it to do haha
2017-07-08T01:48:04.604982
Alba
pythondev_help_Alba_2017-07-08T01:48:04.604982
1,499,478,484.604982
84,393
pythondev
help
<@Alba> Are we worth some tacos ?
2017-07-08T01:55:55.631356
Shelly
pythondev_help_Shelly_2017-07-08T01:55:55.631356
1,499,478,955.631356
84,394
pythondev
help
same tacos fam
2017-07-08T01:56:10.632144
Alba
pythondev_help_Alba_2017-07-08T01:56:10.632144
1,499,478,970.632144
84,395
pythondev
help
:taco: :taco: :taco: :taco:
2017-07-08T01:56:19.632633
Alba
pythondev_help_Alba_2017-07-08T01:56:19.632633
1,499,478,979.632633
84,396
pythondev
help
<@Shelly> :taco:
2017-07-08T01:56:38.633521
Alba
pythondev_help_Alba_2017-07-08T01:56:38.633521
1,499,478,998.633521
84,397
pythondev
help
<@Beula> :taco:
2017-07-08T01:56:46.633918
Alba
pythondev_help_Alba_2017-07-08T01:56:46.633918
1,499,479,006.633918
84,398
pythondev
help
haha
2017-07-08T01:56:47.633982
Alba
pythondev_help_Alba_2017-07-08T01:56:47.633982
1,499,479,007.633982
84,399
pythondev
help
what are these tacos lol
2017-07-08T01:57:00.634561
Alba
pythondev_help_Alba_2017-07-08T01:57:00.634561
1,499,479,020.634561
84,400
pythondev
help
lol
2017-07-08T05:07:33.254348
Suellen
pythondev_help_Suellen_2017-07-08T05:07:33.254348
1,499,490,453.254348
84,401
pythondev
help
Hi all. Am new to programming, I have been playing with python for a few weeks. Where could I find mini projects online to test myself. Thanks
2017-07-08T08:35:01.988490
Kenda
pythondev_help_Kenda_2017-07-08T08:35:01.988490
1,499,502,901.98849
84,402