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
What `-U` option is for with `pip install -U pytest`?
2019-05-30T05:53:52.036000
Cordell
pythondev_help_Cordell_2019-05-30T05:53:52.036000
1,559,195,632.036
25,821
pythondev
help
ok got it <https://stackoverflow.com/questions/12435209/what-does-the-u-option-stand-for-in-pip-install-u>
2019-05-30T05:54:49.036200
Cordell
pythondev_help_Cordell_2019-05-30T05:54:49.036200
1,559,195,689.0362
25,822
pythondev
help
How do you check if a class has a method and in case call that method or return something else?
2019-05-30T06:22:44.037100
Eveline
pythondev_help_Eveline_2019-05-30T06:22:44.037100
1,559,197,364.0371
25,823
pythondev
help
cls.foo(a) if hasattr(cls, 'foo') else True
2019-05-30T06:23:49.038300
Eveline
pythondev_help_Eveline_2019-05-30T06:23:49.038300
1,559,197,429.0383
25,824
pythondev
help
or with getattr?
2019-05-30T06:24:29.038600
Eveline
pythondev_help_Eveline_2019-05-30T06:24:29.038600
1,559,197,469.0386
25,825
pythondev
help
getattr(A, ‘foo’, lambda _: True)(a)
2019-05-30T06:25:55.039500
Lolita
pythondev_help_Lolita_2019-05-30T06:25:55.039500
1,559,197,555.0395
25,826
pythondev
help
None
2019-05-30T06:26:26.039700
Eveline
pythondev_help_Eveline_2019-05-30T06:26:26.039700
1,559,197,586.0397
25,827
pythondev
help
what is the best?
2019-05-30T06:27:33.040400
Eveline
pythondev_help_Eveline_2019-05-30T06:27:33.040400
1,559,197,653.0404
25,828
pythondev
help
or the more pythonic one
2019-05-30T06:27:53.040900
Eveline
pythondev_help_Eveline_2019-05-30T06:27:53.040900
1,559,197,673.0409
25,829
pythondev
help
Better use verbose syntax. So that others can easily understand it
2019-05-30T06:28:10.041500
Lolita
pythondev_help_Lolita_2019-05-30T06:28:10.041500
1,559,197,690.0415
25,830
pythondev
help
Pythonic doesn’t mean complex oneliners
2019-05-30T06:28:25.041900
Lolita
pythondev_help_Lolita_2019-05-30T06:28:25.041900
1,559,197,705.0419
25,831
pythondev
help
agree
2019-05-30T06:29:36.042200
Eveline
pythondev_help_Eveline_2019-05-30T06:29:36.042200
1,559,197,776.0422
25,832
pythondev
help
<@Eveline> In this case, since your trying to figure out whether or not this object has write access, you could make it a method or property (more or less a method that you don't have to explicitly call, so it just looks fancy), and you could reference that, which would make it more explicit. E.g. ``` if my_thing.has_write_access: # do some stuff ``` If the thing you're working with isn't something you control the source of, or it's a complicated class that you don't want to mess with, then you can either abstract it by creating another class that wraps instances of this one (allowing you to provide more clean and logical ways of interacting with it), or you could make another class that inherits from that class and define the method there.
2019-05-30T07:01:39.051200
Ashley
pythondev_help_Ashley_2019-05-30T07:01:39.051200
1,559,199,699.0512
25,833
pythondev
help
Hello everyone, python relative newbie here.
2019-05-30T07:34:37.051600
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:34:37.051600
1,559,201,677.0516
25,834
pythondev
help
I was just curious about the approach for having constantly running apps on iot devices like raspberry pies.
2019-05-30T07:35:00.052300
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:35:00.052300
1,559,201,700.0523
25,835
pythondev
help
There are 2 approaches from what i have been reading.
2019-05-30T07:35:10.052600
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:35:10.052600
1,559,201,710.0526
25,836
pythondev
help
starting as a daemon
2019-05-30T07:35:16.052900
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:35:16.052900
1,559,201,716.0529
25,837
pythondev
help
and then the while true loop to make it run forever
2019-05-30T07:35:30.053300
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:35:30.053300
1,559,201,730.0533
25,838
pythondev
help
to me the while true approach seems a bit hacky
2019-05-30T07:35:38.053600
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:35:38.053600
1,559,201,738.0536
25,839
pythondev
help
im curious to hear from you guys what you think.
2019-05-30T07:36:03.054200
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:36:03.054200
1,559,201,763.0542
25,840
pythondev
help
&gt; starting as a daemon I’m not much familiar with raspberry pi, but if it’s an option, it’s the best one. Although, I don’t think there’s anything hacky in a while loop. In my opinion it’s the best and cleanest loop you could use in this scenario. The daemons are most probably instructions running in a while loop.
2019-05-30T07:41:21.057800
Lolita
pythondev_help_Lolita_2019-05-30T07:41:21.057800
1,559,202,081.0578
25,841
pythondev
help
i see. thank you <@Lolita>
2019-05-30T07:42:03.058200
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:42:03.058200
1,559,202,123.0582
25,842
pythondev
help
So it will not stress out the computer to have an endless loop running on the pi like that?
2019-05-30T07:42:33.058800
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:42:33.058800
1,559,202,153.0588
25,843
pythondev
help
i'm thinking too much like a human i guess :slightly_smiling_face:
2019-05-30T07:42:42.059100
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:42:42.059100
1,559,202,162.0591
25,844
pythondev
help
i figured a daemon would give it a rest in between queries.
2019-05-30T07:43:11.059600
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:43:11.059600
1,559,202,191.0596
25,845
pythondev
help
You need to make sure that the loop is not adding a lot of data in a data structure or a variable without cleaning it. If possible, if possible, make it an IO driven loop, so that it doesn’t waste resources.
2019-05-30T07:45:59.062400
Lolita
pythondev_help_Lolita_2019-05-30T07:45:59.062400
1,559,202,359.0624
25,846
pythondev
help
ok very smart, i don't know about io driven loops but i will take a look at all that.
2019-05-30T07:46:32.062800
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:46:32.062800
1,559,202,392.0628
25,847
pythondev
help
What do you do python and work wise?
2019-05-30T07:46:40.063200
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:46:40.063200
1,559,202,400.0632
25,848
pythondev
help
means it will wait for a triger point instead of looping continously
2019-05-30T07:47:04.063700
Lolita
pythondev_help_Lolita_2019-05-30T07:47:04.063700
1,559,202,424.0637
25,849
pythondev
help
I’m working in a WebDev company Niteo.
2019-05-30T07:47:25.064100
Lolita
pythondev_help_Lolita_2019-05-30T07:47:25.064100
1,559,202,445.0641
25,850
pythondev
help
that's awesome
2019-05-30T07:48:03.064300
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:48:03.064300
1,559,202,483.0643
25,851
pythondev
help
ok where are they based?
2019-05-30T07:48:12.064600
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:48:12.064600
1,559,202,492.0646
25,852
pythondev
help
you mostly do python?
2019-05-30T07:48:25.065000
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:48:25.065000
1,559,202,505.065
25,853
pythondev
help
Slovenia. It’s focused on Python. <https://niteo.co>
2019-05-30T07:48:46.065400
Lolita
pythondev_help_Lolita_2019-05-30T07:48:46.065400
1,559,202,526.0654
25,854
pythondev
help
very nice
2019-05-30T07:49:43.065700
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:49:43.065700
1,559,202,583.0657
25,855
pythondev
help
i'm on the site now
2019-05-30T07:49:46.065900
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:49:46.065900
1,559,202,586.0659
25,856
pythondev
help
Quite nice
2019-05-30T07:51:22.066200
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:51:22.066200
1,559,202,682.0662
25,857
pythondev
help
i like the discontinued project for domain monitor
2019-05-30T07:51:31.066600
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:51:31.066600
1,559,202,691.0666
25,858
pythondev
help
that is always a tool people charge a lot of money for
2019-05-30T07:51:39.067000
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:51:39.067000
1,559,202,699.067
25,859
pythondev
help
do you do any side projects for fun?
2019-05-30T07:51:45.067200
Arnoldo
pythondev_help_Arnoldo_2019-05-30T07:51:45.067200
1,559,202,705.0672
25,860
pythondev
help
Lots of them: <https://arijitbasu.in/#/projects> <https://github.com/sayanarijit?tab=repositories>
2019-05-30T07:54:49.067700
Lolita
pythondev_help_Lolita_2019-05-30T07:54:49.067700
1,559,202,889.0677
25,861
pythondev
help
I just joined the company. I’m yet to get permanent
2019-05-30T07:55:20.068400
Lolita
pythondev_help_Lolita_2019-05-30T07:55:20.068400
1,559,202,920.0684
25,862
pythondev
help
<@Ashley> Woow thanks for the suggestions, I'll use it as best practice! thanks again
2019-05-30T07:56:34.068500
Eveline
pythondev_help_Eveline_2019-05-30T07:56:34.068500
1,559,202,994.0685
25,863
pythondev
help
that's wonderful
2019-05-30T08:10:47.068800
Arnoldo
pythondev_help_Arnoldo_2019-05-30T08:10:47.068800
1,559,203,847.0688
25,864
pythondev
help
sorry i was having breakfast with the family just finished
2019-05-30T08:10:55.069200
Arnoldo
pythondev_help_Arnoldo_2019-05-30T08:10:55.069200
1,559,203,855.0692
25,865
pythondev
help
i'll pm you
2019-05-30T08:10:57.069400
Arnoldo
pythondev_help_Arnoldo_2019-05-30T08:10:57.069400
1,559,203,857.0694
25,866
pythondev
help
For a chat bot I'm building I'm storing messages in Firestore (NoSQL) and linking messages that are in the same conversation with a thread-ID. Does the schema make sense? I have successfully done simple CRUD operations, but struggling with inserting new data (Like a new message) into an existing document without overwriting whats already there. Anyone know how? Maybe I'm approaching this wrong?
2019-05-30T08:53:49.070000
Conchita
pythondev_help_Conchita_2019-05-30T08:53:49.070000
1,559,206,429.07
25,867
pythondev
help
My goal is to have for each `threadID`, one unique document. Where new messages are added into that document
2019-05-30T08:55:32.071300
Conchita
pythondev_help_Conchita_2019-05-30T08:55:32.071300
1,559,206,532.0713
25,868
pythondev
help
Or, should I create a sub-collection for each `threadID` and store messages as documents?
2019-05-30T08:56:08.072100
Conchita
pythondev_help_Conchita_2019-05-30T08:56:08.072100
1,559,206,568.0721
25,869
pythondev
help
Probably want a collection
2019-05-30T09:01:12.072300
Bethany
pythondev_help_Bethany_2019-05-30T09:01:12.072300
1,559,206,872.0723
25,870
pythondev
help
The simplest thing would be to have each `threadID` as a collection at the root level. If I'd do that, there will be thousands of collections at the root level quickly however. Is that a bad thing?
2019-05-30T09:05:48.074000
Conchita
pythondev_help_Conchita_2019-05-30T09:05:48.074000
1,559,207,148.074
25,871
pythondev
help
how deep you nest stuff wont make much difference if the amount of data is the same
2019-05-30T09:07:31.075600
Leida
pythondev_help_Leida_2019-05-30T09:07:31.075600
1,559,207,251.0756
25,872
pythondev
help
Another alternative would be `rooms/tech_team/threadID` where `rooms` and `threadID` would be collections
2019-05-30T09:07:49.076000
Conchita
pythondev_help_Conchita_2019-05-30T09:07:49.076000
1,559,207,269.076
25,873
pythondev
help
Ok, so go with simple then <@Leida>
2019-05-30T09:07:55.076200
Conchita
pythondev_help_Conchita_2019-05-30T09:07:55.076200
1,559,207,275.0762
25,874
pythondev
help
Same amount of data either way
2019-05-30T09:08:10.076800
Conchita
pythondev_help_Conchita_2019-05-30T09:08:10.076800
1,559,207,290.0768
25,875
pythondev
help
yeah, go as complex as you absolutely need, but no more
2019-05-30T09:08:11.077000
Leida
pythondev_help_Leida_2019-05-30T09:08:11.077000
1,559,207,291.077
25,876
pythondev
help
makes addressing the data simpler in your program
2019-05-30T09:08:35.077700
Leida
pythondev_help_Leida_2019-05-30T09:08:35.077700
1,559,207,315.0777
25,877
pythondev
help
Can you use relational?
2019-05-30T09:08:53.078400
Bethany
pythondev_help_Bethany_2019-05-30T09:08:53.078400
1,559,207,333.0784
25,878
pythondev
help
I can, but will need to convince the team why
2019-05-30T09:09:44.079000
Conchita
pythondev_help_Conchita_2019-05-30T09:09:44.079000
1,559,207,384.079
25,879
pythondev
help
We just had a chat in <#C3X4T24LB|databases> about rdms vs random json
2019-05-30T09:10:17.079800
Bethany
pythondev_help_Bethany_2019-05-30T09:10:17.079800
1,559,207,417.0798
25,880
pythondev
help
What's the scale of your data?
2019-05-30T09:10:40.080200
Bethany
pythondev_help_Bethany_2019-05-30T09:10:40.080200
1,559,207,440.0802
25,881
pythondev
help
How do I measure that?
2019-05-30T09:11:25.080600
Conchita
pythondev_help_Conchita_2019-05-30T09:11:25.080600
1,559,207,485.0806
25,882
pythondev
help
No data exists, new product
2019-05-30T09:11:40.081400
Conchita
pythondev_help_Conchita_2019-05-30T09:11:40.081400
1,559,207,500.0814
25,883
pythondev
help
Like is this dozens, thousands, millions or billions
2019-05-30T09:11:51.081800
Bethany
pythondev_help_Bethany_2019-05-30T09:11:51.081800
1,559,207,511.0818
25,884
pythondev
help
tens of thousands
2019-05-30T09:12:04.082100
Conchita
pythondev_help_Conchita_2019-05-30T09:12:04.082100
1,559,207,524.0821
25,885
pythondev
help
So ill delegate to the more experienced folks about tech decisions like this in an early stage
2019-05-30T09:12:35.082900
Bethany
pythondev_help_Bethany_2019-05-30T09:12:35.082900
1,559,207,555.0829
25,886
pythondev
help
But what I can say is it's really annoying as a data scientist dealing with random heirarchical structures
2019-05-30T09:13:02.083800
Bethany
pythondev_help_Bethany_2019-05-30T09:13:02.083800
1,559,207,582.0838
25,887
pythondev
help
Since usually we look at data in ways the engineer didn't expect
2019-05-30T09:13:40.084400
Bethany
pythondev_help_Bethany_2019-05-30T09:13:40.084400
1,559,207,620.0844
25,888
pythondev
help
Which is what relational db is designed to do
2019-05-30T09:13:59.084900
Bethany
pythondev_help_Bethany_2019-05-30T09:13:59.084900
1,559,207,639.0849
25,889
pythondev
help
Example: get all messages grouped by users where they live in NA
2019-05-30T09:15:10.085600
Bethany
pythondev_help_Bethany_2019-05-30T09:15:10.085600
1,559,207,710.0856
25,890
pythondev
help
I do get your point
2019-05-30T09:16:29.085900
Conchita
pythondev_help_Conchita_2019-05-30T09:16:29.085900
1,559,207,789.0859
25,891
pythondev
help
Maybe I should cross this over with the team a couple more times
2019-05-30T09:16:48.086300
Conchita
pythondev_help_Conchita_2019-05-30T09:16:48.086300
1,559,207,808.0863
25,892
pythondev
help
Just make sure you know the tradeoff
2019-05-30T09:17:18.086900
Bethany
pythondev_help_Bethany_2019-05-30T09:17:18.086900
1,559,207,838.0869
25,893
pythondev
help
Yep
2019-05-30T09:17:43.087200
Conchita
pythondev_help_Conchita_2019-05-30T09:17:43.087200
1,559,207,863.0872
25,894
pythondev
help
I believe nosql is much faster inserts at large scale
2019-05-30T09:18:06.088200
Bethany
pythondev_help_Bethany_2019-05-30T09:18:06.088200
1,559,207,886.0882
25,895
pythondev
help
I'll set up some quick schema now and populate it with some simulated data and discuss with the team tomorrow
2019-05-30T09:18:13.088500
Conchita
pythondev_help_Conchita_2019-05-30T09:18:13.088500
1,559,207,893.0885
25,896
pythondev
help
Is the chatbot Central to your business?
2019-05-30T09:18:45.089500
Bethany
pythondev_help_Bethany_2019-05-30T09:18:45.089500
1,559,207,925.0895
25,897
pythondev
help
This product won't really be of any large scale
2019-05-30T09:18:49.089700
Conchita
pythondev_help_Conchita_2019-05-30T09:18:49.089700
1,559,207,929.0897
25,898
pythondev
help
No
2019-05-30T09:19:05.090100
Conchita
pythondev_help_Conchita_2019-05-30T09:19:05.090100
1,559,207,945.0901
25,899
pythondev
help
Its an internal utility bot, not mission critical
2019-05-30T09:19:37.090700
Conchita
pythondev_help_Conchita_2019-05-30T09:19:37.090700
1,559,207,977.0907
25,900
pythondev
help
The need for a db is more to be able to connect messages in the same conversation with each other. But it could grow into something bigger further down the path
2019-05-30T09:20:40.091600
Conchita
pythondev_help_Conchita_2019-05-30T09:20:40.091600
1,559,208,040.0916
25,901
pythondev
help
:thumbsup:
2019-05-30T09:23:38.092700
Ashley
pythondev_help_Ashley_2019-05-30T09:23:38.092700
1,559,208,218.0927
25,902
pythondev
help
Select msg from table grp by thread_id
2019-05-30T09:23:45.093100
Bethany
pythondev_help_Bethany_2019-05-30T09:23:45.093100
1,559,208,225.0931
25,903
pythondev
help
Is what I'd want
2019-05-30T09:23:52.093400
Bethany
pythondev_help_Bethany_2019-05-30T09:23:52.093400
1,559,208,232.0934
25,904
pythondev
help
Ok I'll be quiet now and let others chime in :bell:
2019-05-30T09:25:08.094100
Bethany
pythondev_help_Bethany_2019-05-30T09:25:08.094100
1,559,208,308.0941
25,905
pythondev
help
we’re having _almost_ the same discussion, if a little more theoretical, in <#C3X4T24LB|databases>
2019-05-30T09:25:41.094800
Clemmie
pythondev_help_Clemmie_2019-05-30T09:25:41.094800
1,559,208,341.0948
25,906
pythondev
help
could be a post processing step to go from nosql to a chunk of data the analyst uses tho
2019-05-30T09:25:57.095100
Leida
pythondev_help_Leida_2019-05-30T09:25:57.095100
1,559,208,357.0951
25,907
pythondev
help
a data warehouse?
2019-05-30T09:26:14.095300
Clemmie
pythondev_help_Clemmie_2019-05-30T09:26:14.095300
1,559,208,374.0953
25,908
pythondev
help
worth it if you have huge amounts of data that have orders of magnitude difference in retrieval time for the client/report use cases
2019-05-30T09:26:59.096100
Clemmie
pythondev_help_Clemmie_2019-05-30T09:26:59.096100
1,559,208,419.0961
25,909
pythondev
help
``` In [9]: robot = Robot() In [10]: robot.name Out[10]: 'OU624' In [11]: robot.reset() In [12]: robot.name Out[12]: 'OU624' In [13]: robot.reset() In [14]: robot.name Out[14]: 'OU624' ``` <@Genesis> i'm pretty sure the `reset` function almost always fails
2019-05-30T09:39:09.096500
Jorge
pythondev_help_Jorge_2019-05-30T09:39:09.096500
1,559,209,149.0965
25,910
pythondev
help
its because `self.create_name() == self.name` is almost never *True*, so the code inside the *while* block almost never gets executed. you'd have to have the name generation code in `create_name` create the same name as it originally did, which would happen every 26*26*999 times (about 1 in 500, 000)
2019-05-30T09:41:37.096700
Jorge
pythondev_help_Jorge_2019-05-30T09:41:37.096700
1,559,209,297.0967
25,911
pythondev
help
How can I make a script more easy to install for other people without telling about set up a virtual environment and install specific package :thinking_face:
2019-05-30T10:22:11.098400
Dennise
pythondev_help_Dennise_2019-05-30T10:22:11.098400
1,559,211,731.0984
25,912
pythondev
help
As I'm reading the source code for Firestore, I see this ``` def List(self, request, global_params=None): r"""Lists composite indexes. Args: request: (FirestoreProjectsDatabasesCollectionGroupsIndexesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (GoogleFirestoreAdminV1ListIndexesResponse) The response message. """```
2019-05-30T10:39:53.098900
Conchita
pythondev_help_Conchita_2019-05-30T10:39:53.098900
1,559,212,793.0989
25,913
pythondev
help
Specifically the `r` in `r"""Lists composite indexes.`
2019-05-30T10:40:10.099300
Conchita
pythondev_help_Conchita_2019-05-30T10:40:10.099300
1,559,212,810.0993
25,914
pythondev
help
Why?
2019-05-30T10:40:31.099700
Conchita
pythondev_help_Conchita_2019-05-30T10:40:31.099700
1,559,212,831.0997
25,915
pythondev
help
that’s for raw strings
2019-05-30T10:46:55.100100
Hiroko
pythondev_help_Hiroko_2019-05-30T10:46:55.100100
1,559,213,215.1001
25,916
pythondev
help
&gt;&gt;&gt;For consistency, always use `"""triple double quotes"""` around docstrings. Use `r"""raw triple double quotes"""` if you use any backslashes in your docstrings. For Unicode docstrings, use `u"""Unicode triple-quoted strings"""`.
2019-05-30T10:47:01.100300
Hiroko
pythondev_help_Hiroko_2019-05-30T10:47:01.100300
1,559,213,221.1003
25,917
pythondev
help
hi! need help with regexp i have `api/customer/{$.orgid}/participant/{$.eid}` string and I want to extract all words in `{}` They all starts from `$.` Could you help with valid expression
2019-05-30T11:16:09.102300
Mi
pythondev_help_Mi_2019-05-30T11:16:09.102300
1,559,214,969.1023
25,918
pythondev
help
I have a really weird situation, I have a scrapper that gets data and stores it in a db, then I have a site that displays this data so I can go through and see the scrapped data, and it has a link to an article that is scrapped from a specific site, this all works fine, however when I click the link to go to the external site, site cannot be reached. But when I paste the link into my browser and press enter it goes to the site
2019-05-30T11:21:17.104600
Arturo
pythondev_help_Arturo_2019-05-30T11:21:17.104600
1,559,215,277.1046
25,919
pythondev
help
its the full url
2019-05-30T11:21:28.104800
Arturo
pythondev_help_Arturo_2019-05-30T11:21:28.104800
1,559,215,288.1048
25,920