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
ok, how much free ram before you start the program?
2018-03-01T06:06:37.000270
Floy
pythondev_help_Floy_2018-03-01T06:06:37.000270
1,519,884,397.00027
36,724
pythondev
help
<@Floy> that's a good suggestion..
2018-03-01T06:06:43.000392
Jerica
pythondev_help_Jerica_2018-03-01T06:06:43.000392
1,519,884,403.000392
36,725
pythondev
help
like 3
2018-03-01T06:06:52.000181
Jerica
pythondev_help_Jerica_2018-03-01T06:06:52.000181
1,519,884,412.000181
36,726
pythondev
help
well, a billion row CSV is going to be about a gigabyte plus if you open it all in memory. so I’d look at chunking the writes
2018-03-01T06:07:55.000043
Floy
pythondev_help_Floy_2018-03-01T06:07:55.000043
1,519,884,475.000043
36,727
pythondev
help
cool
2018-03-01T06:15:54.000229
Jerica
pythondev_help_Jerica_2018-03-01T06:15:54.000229
1,519,884,954.000229
36,728
pythondev
help
If I was building a web application that tracks and analyses educational data. Would php be just as suitable or more suitable than say python/django?
2018-03-01T07:16:24.000022
Bernarda
pythondev_help_Bernarda_2018-03-01T07:16:24.000022
1,519,888,584.000022
36,729
pythondev
help
<@Bernarda> I would say the critical question is what do you/your developers know? If they know PHP, use PHP.
2018-03-01T07:43:42.000150
Zack
pythondev_help_Zack_2018-03-01T07:43:42.000150
1,519,890,222.00015
36,730
pythondev
help
In the general sense, Python would provide some advantages, however - if you are doing data analysis, Python is a prime language for this, so it would enable you to use a single language across your organization. Not critical, but can be helpful.
2018-03-01T07:44:28.000312
Zack
pythondev_help_Zack_2018-03-01T07:44:28.000312
1,519,890,268.000312
36,731
pythondev
help
Also, Python is generally considered a more desirable language to work with, which might help you with recruiting
2018-03-01T07:44:50.000007
Zack
pythondev_help_Zack_2018-03-01T07:44:50.000007
1,519,890,290.000007
36,732
pythondev
help
But in the end the key thing is using what you or your developers know
2018-03-01T07:45:16.000289
Zack
pythondev_help_Zack_2018-03-01T07:45:16.000289
1,519,890,316.000289
36,733
pythondev
help
thanks for your help
2018-03-01T07:49:20.000128
Logan
pythondev_help_Logan_2018-03-01T07:49:20.000128
1,519,890,560.000128
36,734
pythondev
help
Oh yeah. Good answer <@Zack>. Yes, the first project was done in PHP, so the developers know php more than python.
2018-03-01T08:31:10.000424
Bernarda
pythondev_help_Bernarda_2018-03-01T08:31:10.000424
1,519,893,070.000424
36,735
pythondev
help
Then it probably makes the most sense to continue with it
2018-03-01T08:35:43.000147
Zack
pythondev_help_Zack_2018-03-01T08:35:43.000147
1,519,893,343.000147
36,736
pythondev
help
<http://treyhunner.com/2018/02/python-range-is-not-an-iterator/>
2018-03-01T09:23:28.000816
Floy
pythondev_help_Floy_2018-03-01T09:23:28.000816
1,519,896,208.000816
36,737
pythondev
help
TIL
2018-03-01T09:23:34.000623
Floy
pythondev_help_Floy_2018-03-01T09:23:34.000623
1,519,896,214.000623
36,738
pythondev
help
range is an iterable, not an iterator
2018-03-01T09:23:54.000801
Floy
pythondev_help_Floy_2018-03-01T09:23:54.000801
1,519,896,234.000801
36,739
pythondev
help
tbh, that's exactly what I expected range to be, an iterable
2018-03-01T09:32:01.000272
Barney
pythondev_help_Barney_2018-03-01T09:32:01.000272
1,519,896,721.000272
36,740
pythondev
help
Well yeah.. in Python 3.x .. range is a generator on which we can iterate
2018-03-01T10:00:11.000421
Tammi
pythondev_help_Tammi_2018-03-01T10:00:11.000421
1,519,898,411.000421
36,741
pythondev
help
yep. but in 2, its a list
2018-03-01T10:01:24.000526
Floy
pythondev_help_Floy_2018-03-01T10:01:24.000526
1,519,898,484.000526
36,742
pythondev
help
and that’s where most of my experience is relevant
2018-03-01T10:01:37.000099
Floy
pythondev_help_Floy_2018-03-01T10:01:37.000099
1,519,898,497.000099
36,743
pythondev
help
Yup that's correct and in Python 2.x we have xrange Well actually it's Python 2.x xrange generator which is renamed as range in Python 3.x
2018-03-01T10:06:28.000112
Tammi
pythondev_help_Tammi_2018-03-01T10:06:28.000112
1,519,898,788.000112
36,744
pythondev
help
should I learn testing before oop?
2018-03-01T10:28:14.000060
Milo
pythondev_help_Milo_2018-03-01T10:28:14.000060
1,519,900,094.00006
36,745
pythondev
help
Try to learn both side by side..
2018-03-01T10:28:44.000233
Tammi
pythondev_help_Tammi_2018-03-01T10:28:44.000233
1,519,900,124.000233
36,746
pythondev
help
ok, what type unit testing? Or pytest?
2018-03-01T10:29:26.000538
Milo
pythondev_help_Milo_2018-03-01T10:29:26.000538
1,519,900,166.000538
36,747
pythondev
help
TDD - Test Driven Development Is a development methodology which says "test it before you develop it"
2018-03-01T10:29:44.000056
Tammi
pythondev_help_Tammi_2018-03-01T10:29:44.000056
1,519,900,184.000056
36,748
pythondev
help
cool
2018-03-01T10:30:00.000857
Milo
pythondev_help_Milo_2018-03-01T10:30:00.000857
1,519,900,200.000857
36,749
pythondev
help
thanks
2018-03-01T10:30:03.000763
Milo
pythondev_help_Milo_2018-03-01T10:30:03.000763
1,519,900,203.000763
36,750
pythondev
help
No problem...
2018-03-01T10:30:17.000849
Tammi
pythondev_help_Tammi_2018-03-01T10:30:17.000849
1,519,900,217.000849
36,751
pythondev
help
And yes you must look out for mock library and pytest. For testing stuff.
2018-03-01T10:35:09.000638
Tammi
pythondev_help_Tammi_2018-03-01T10:35:09.000638
1,519,900,509.000638
36,752
pythondev
help
<https://www.obeythetestinggoat.com/>
2018-03-01T10:38:05.000309
Floy
pythondev_help_Floy_2018-03-01T10:38:05.000309
1,519,900,685.000309
36,753
pythondev
help
:+1:
2018-03-01T10:42:16.000633
Tammi
pythondev_help_Tammi_2018-03-01T10:42:16.000633
1,519,900,936.000633
36,754
pythondev
help
Cross-posting an oldy because I never got an answer, would love to know if I am missing something easy-to-use here because I don't know the name.
2018-03-01T10:58:05.000589
Huong
pythondev_help_Huong_2018-03-01T10:58:05.000589
1,519,901,885.000589
36,755
pythondev
help
save points in forms?
2018-03-01T10:59:48.000452
Floy
pythondev_help_Floy_2018-03-01T10:59:48.000452
1,519,901,988.000452
36,756
pythondev
help
Is save points referring to something in particular or is that a question?
2018-03-01T11:03:09.000509
Huong
pythondev_help_Huong_2018-03-01T11:03:09.000509
1,519,902,189.000509
36,757
pythondev
help
what I’m thinking of is you have temporary save points with your form
2018-03-01T11:03:30.000246
Floy
pythondev_help_Floy_2018-03-01T11:03:30.000246
1,519,902,210.000246
36,758
pythondev
help
that you move back and forth among the pages while filling out
2018-03-01T11:03:39.000177
Floy
pythondev_help_Floy_2018-03-01T11:03:39.000177
1,519,902,219.000177
36,759
pythondev
help
Oh right right
2018-03-01T11:03:45.000455
Huong
pythondev_help_Huong_2018-03-01T11:03:45.000455
1,519,902,225.000455
36,760
pythondev
help
but its not actually submitted until everything is done
2018-03-01T11:03:47.000876
Floy
pythondev_help_Floy_2018-03-01T11:03:47.000876
1,519,902,227.000876
36,761
pythondev
help
Yup
2018-03-01T11:03:51.000436
Huong
pythondev_help_Huong_2018-03-01T11:03:51.000436
1,519,902,231.000436
36,762
pythondev
help
That makes total sense
2018-03-01T11:03:58.000082
Huong
pythondev_help_Huong_2018-03-01T11:03:58.000082
1,519,902,238.000082
36,763
pythondev
help
But there isn't like a canned frame 1 -- frame 2 --frame 3 transition concept? I dunno why I just assumed that'd be a front-end UI "thing"
2018-03-01T11:04:26.001036
Huong
pythondev_help_Huong_2018-03-01T11:04:26.001036
1,519,902,266.001036
36,764
pythondev
help
Maybe it is not as generically useful as I think
2018-03-01T11:04:42.000196
Huong
pythondev_help_Huong_2018-03-01T11:04:42.000196
1,519,902,282.000196
36,765
pythondev
help
I mean implementing it on your own isn't hard, so maybe I am just overthinking what a front-end framework should do for you
2018-03-01T11:05:01.000630
Huong
pythondev_help_Huong_2018-03-01T11:05:01.000630
1,519,902,301.00063
36,766
pythondev
help
not sure
2018-03-01T11:05:13.000905
Floy
pythondev_help_Floy_2018-03-01T11:05:13.000905
1,519,902,313.000905
36,767
pythondev
help
at least, I’ve not heard of it
2018-03-01T11:05:19.000523
Floy
pythondev_help_Floy_2018-03-01T11:05:19.000523
1,519,902,319.000523
36,768
pythondev
help
but I would imagine that such a thing would be highly impelmentation-specific
2018-03-01T11:05:32.000001
Floy
pythondev_help_Floy_2018-03-01T11:05:32.000001
1,519,902,332.000001
36,769
pythondev
help
and be very hard to genericize while allowing for customization
2018-03-01T11:05:45.000360
Floy
pythondev_help_Floy_2018-03-01T11:05:45.000360
1,519,902,345.00036
36,770
pythondev
help
Am I describing a Wizard?
2018-03-01T11:06:06.000069
Huong
pythondev_help_Huong_2018-03-01T11:06:06.000069
1,519,902,366.000069
36,771
pythondev
help
maybe?
2018-03-01T11:06:21.000662
Floy
pythondev_help_Floy_2018-03-01T11:06:21.000662
1,519,902,381.000662
36,772
pythondev
help
Yeah I think so, this project describes what I am describing: <https://www.npmjs.com/package/react-stepzilla>
2018-03-01T11:52:12.000328
Huong
pythondev_help_Huong_2018-03-01T11:52:12.000328
1,519,905,132.000328
36,773
pythondev
help
So I guess I am talking about a wizard, and that would be something built on top of something like react but not provided as part of it
2018-03-01T11:52:32.000843
Huong
pythondev_help_Huong_2018-03-01T11:52:32.000843
1,519,905,152.000843
36,774
pythondev
help
None
2018-03-01T11:52:46.000017
Hyo
pythondev_help_Hyo_2018-03-01T11:52:46.000017
1,519,905,166.000017
36,775
pythondev
help
Hey all, I recently noticed something on an html template site I use: They only want me to use the code I bought on one website (i.e. not multiple sites). Part of me is a bit confused by this, as reusing code I have used in past projects seems second nature to me (especially since I have to heavily modify the code to w...
2018-03-01T11:58:49.000868
Henrietta
pythondev_help_Henrietta_2018-03-01T11:58:49.000868
1,519,905,529.000868
36,776
pythondev
help
Basically the norm with a lot of wordpress templates
2018-03-01T12:00:26.000444
Porsha
pythondev_help_Porsha_2018-03-01T12:00:26.000444
1,519,905,626.000444
36,777
pythondev
help
You have to buy multiple templates of the same template
2018-03-01T12:00:49.000677
Porsha
pythondev_help_Porsha_2018-03-01T12:00:49.000677
1,519,905,649.000677
36,778
pythondev
help
Interesting, I guess I won't buy a template unless I can afford the multiple site use-case then, as I wouldn't want to hinder someone from making a living
2018-03-01T12:04:18.000769
Henrietta
pythondev_help_Henrietta_2018-03-01T12:04:18.000769
1,519,905,858.000769
36,779
pythondev
help
talking about middleweres how can I override process_request inside of itself like can I call it from inside
2018-03-01T12:05:00.000509
Logan
pythondev_help_Logan_2018-03-01T12:05:00.000509
1,519,905,900.000509
36,780
pythondev
help
Oh, I mainly say that because I am sure I will not think about it and use the code they wrote in another project since it will probably be mixed in with my code
2018-03-01T12:06:10.000109
Henrietta
pythondev_help_Henrietta_2018-03-01T12:06:10.000109
1,519,905,970.000109
36,781
pythondev
help
Trying to figure out an architectural scheme that I was hoping some people could offer their two sense on. Were building a project using Django framework where users can create multiple conversations to be had with a chatbot. It's going to be a webapp, so when the user chooses which call they want to go on, the user wi...
2018-03-01T12:38:42.000219
Sha
pythondev_help_Sha_2018-03-01T12:38:42.000219
1,519,907,922.000219
36,782
pythondev
help
are you sure you should have a new instance per user?
2018-03-01T12:43:34.000258
Floy
pythondev_help_Floy_2018-03-01T12:43:34.000258
1,519,908,214.000258
36,783
pythondev
help
why not a shared instance?
2018-03-01T12:43:41.000430
Floy
pythondev_help_Floy_2018-03-01T12:43:41.000430
1,519,908,221.00043
36,784
pythondev
help
The reason being that each conversation may or may not share a scripted conversation
2018-03-01T12:44:39.000435
Sha
pythondev_help_Sha_2018-03-01T12:44:39.000435
1,519,908,279.000435
36,785
pythondev
help
For example, Conversation a: may be a conversation about having breakfast, and b: about dinner. And the bot handling each shouldn't have context or understanding of the other
2018-03-01T12:45:59.000770
Sha
pythondev_help_Sha_2018-03-01T12:45:59.000770
1,519,908,359.00077
36,786
pythondev
help
makes sense
2018-03-01T12:50:03.000079
Floy
pythondev_help_Floy_2018-03-01T12:50:03.000079
1,519,908,603.000079
36,787
pythondev
help
but its definitely a tricky problem
2018-03-01T12:50:35.000100
Floy
pythondev_help_Floy_2018-03-01T12:50:35.000100
1,519,908,635.0001
36,788
pythondev
help
because you don’t want to have so many bot processes running that you’ll overwhelm the server resources
2018-03-01T12:50:57.000541
Floy
pythondev_help_Floy_2018-03-01T12:50:57.000541
1,519,908,657.000541
36,789
pythondev
help
what you can do, I think, is to start the bot process and store the PID-user numbers somewhere
2018-03-01T12:51:36.000551
Floy
pythondev_help_Floy_2018-03-01T12:51:36.000551
1,519,908,696.000551
36,790
pythondev
help
when a request comes in for that particular user, you can construct a CLI command to that bot process and capture the output via stdout and include that in the response
2018-03-01T12:52:39.000760
Floy
pythondev_help_Floy_2018-03-01T12:52:39.000760
1,519,908,759.00076
36,791
pythondev
help
That seems like a solid solution. Wouldn't that still need a new process running for each, since two people talking to the bot at the same time would cross reference each other?
2018-03-01T13:04:02.000761
Sha
pythondev_help_Sha_2018-03-01T13:04:02.000761
1,519,909,442.000761
36,792
pythondev
help
flask server is giving error IO BROKEN PIPE on production. how to solve this issue?
2018-03-01T13:08:52.000779
Jessi
pythondev_help_Jessi_2018-03-01T13:08:52.000779
1,519,909,732.000779
36,793
pythondev
help
<@Sha> correct. so my thinking is 1. User posts request to API 2. API sees user hasn’t chatted with bot since X minutes ago 1. Start a new bot process, store the PID - UserID combo in db 2. Pipe input to bot process 3. Return output to user in response 3. API sees user’s bot process is still active, execute...
2018-03-01T13:13:15.000023
Floy
pythondev_help_Floy_2018-03-01T13:13:15.000023
1,519,909,995.000023
36,794
pythondev
help
and implement some sort of cron job to reap inactive bot processes after they’ve been idle X minutes
2018-03-01T13:13:42.000566
Floy
pythondev_help_Floy_2018-03-01T13:13:42.000566
1,519,910,022.000566
36,795
pythondev
help
Makes sense. What service would you check out for spinning off the processes?
2018-03-01T13:14:49.000686
Sha
pythondev_help_Sha_2018-03-01T13:14:49.000686
1,519,910,089.000686
36,796
pythondev
help
python subproccess
2018-03-01T13:15:35.000731
Floy
pythondev_help_Floy_2018-03-01T13:15:35.000731
1,519,910,135.000731
36,797
pythondev
help
How would you store a large list of strings and ensure that the list only contains unique strings? EX: Trying to create a spider that crawls sites recursively and saves the links in a list but it runs out of memory storing larger sites.
2018-03-01T13:21:13.000249
Kathlyn
pythondev_help_Kathlyn_2018-03-01T13:21:13.000249
1,519,910,473.000249
36,798
pythondev
help
Set
2018-03-01T13:22:22.000131
Garrett
pythondev_help_Garrett_2018-03-01T13:22:22.000131
1,519,910,542.000131
36,799
pythondev
help
so basically scrapy?
2018-03-01T13:22:25.000223
Floy
pythondev_help_Floy_2018-03-01T13:22:25.000223
1,519,910,545.000223
36,800
pythondev
help
basically I work at a PHP shop, a coworker wrote a PHP script that gets a page, gets links on page, stores each link in an array but it runs out of memory scraping msn because the script runs out of memory. I only have some college under my belt and it made me think, algorithmically what would be the solution to storin...
2018-03-01T13:26:35.000341
Kathlyn
pythondev_help_Kathlyn_2018-03-01T13:26:35.000341
1,519,910,795.000341
36,801
pythondev
help
yeah <@Kathlyn>, Scrapy
2018-03-01T13:26:46.000393
Sha
pythondev_help_Sha_2018-03-01T13:26:46.000393
1,519,910,806.000393
36,802
pythondev
help
Scrapy is an amazing tool
2018-03-01T13:27:12.000727
Garrett
pythondev_help_Garrett_2018-03-01T13:27:12.000727
1,519,910,832.000727
36,803
pythondev
help
best thing I can say is don’t reinvent the wheel just because
2018-03-01T13:27:24.000307
Floy
pythondev_help_Floy_2018-03-01T13:27:24.000307
1,519,910,844.000307
36,804
pythondev
help
I want to understand the solution that scrapy uses at least
2018-03-01T13:27:38.000618
Kathlyn
pythondev_help_Kathlyn_2018-03-01T13:27:38.000618
1,519,910,858.000618
36,805
pythondev
help
look to see what’s out there
2018-03-01T13:27:39.000184
Floy
pythondev_help_Floy_2018-03-01T13:27:39.000184
1,519,910,859.000184
36,806
pythondev
help
Scrapy uses twisted (or is it tornado?) to spawn new threads for each crawl
2018-03-01T13:28:04.000159
Garrett
pythondev_help_Garrett_2018-03-01T13:28:04.000159
1,519,910,884.000159
36,807
pythondev
help
At least that's how I understood it the last time I dug in
2018-03-01T13:28:12.000392
Garrett
pythondev_help_Garrett_2018-03-01T13:28:12.000392
1,519,910,892.000392
36,808
pythondev
help
but how does it store the huge list of URLs and ensure no duplicates without running out of memory just storing a huge set of strings
2018-03-01T13:28:26.000189
Kathlyn
pythondev_help_Kathlyn_2018-03-01T13:28:26.000189
1,519,910,906.000189
36,809
pythondev
help
<https://github.com/scrapy/scrapy>
2018-03-01T13:28:29.000916
Floy
pythondev_help_Floy_2018-03-01T13:28:29.000916
1,519,910,909.000916
36,810
pythondev
help
IIRC, it doesn't need to. Why store a list of URLs when you're just creating a new spider to scrape each one? Each spider can report back it's findings.
2018-03-01T13:30:12.000829
Garrett
pythondev_help_Garrett_2018-03-01T13:30:12.000829
1,519,911,012.000829
36,811
pythondev
help
That said, store the list in a set. It's guaranteed unique
2018-03-01T13:30:37.000761
Garrett
pythondev_help_Garrett_2018-03-01T13:30:37.000761
1,519,911,037.000761
36,812
pythondev
help
like in general If I had a 10gb list of strings how could I go through that list and ensure that there is no duplicates I guess is my general question. Could I store 10gb of strings in a set if I only have 4gb of ram?
2018-03-01T13:30:57.000056
Kathlyn
pythondev_help_Kathlyn_2018-03-01T13:30:57.000056
1,519,911,057.000056
36,813
pythondev
help
If you have 10gb of text, you need a database, not a list
2018-03-01T13:31:23.000225
Garrett
pythondev_help_Garrett_2018-03-01T13:31:23.000225
1,519,911,083.000225
36,814
pythondev
help
In _any_ language
2018-03-01T13:31:27.000822
Garrett
pythondev_help_Garrett_2018-03-01T13:31:27.000822
1,519,911,087.000822
36,815
pythondev
help
so my solution is prob a nosql database then with a hash for primary key?
2018-03-01T13:31:43.000072
Kathlyn
pythondev_help_Kathlyn_2018-03-01T13:31:43.000072
1,519,911,103.000072
36,816
pythondev
help
hash for primary key are a url field thats indexed and set to be unique
2018-03-01T13:32:19.000609
Sha
pythondev_help_Sha_2018-03-01T13:32:19.000609
1,519,911,139.000609
36,817
pythondev
help
or*
2018-03-01T13:32:25.000807
Sha
pythondev_help_Sha_2018-03-01T13:32:25.000807
1,519,911,145.000807
36,818
pythondev
help
Regardless of database, though, you'll have a hard time holding 10gb worth of data in 4gb worth of space
2018-03-01T13:32:31.000641
Garrett
pythondev_help_Garrett_2018-03-01T13:32:31.000641
1,519,911,151.000641
36,819
pythondev
help
got it, thanks all.
2018-03-01T13:34:35.000097
Kathlyn
pythondev_help_Kathlyn_2018-03-01T13:34:35.000097
1,519,911,275.000097
36,820
pythondev
help
I might get skewered for this, but if you are doing single-person local use/storage, sqlite is a viable alternative and included in std-lib
2018-03-01T13:42:37.000031
Monroe
pythondev_help_Monroe_2018-03-01T13:42:37.000031
1,519,911,757.000031
36,821
pythondev
help
<@Monroe> I’m actually going to try that first to see how it works
2018-03-01T13:43:46.000804
Kathlyn
pythondev_help_Kathlyn_2018-03-01T13:43:46.000804
1,519,911,826.000804
36,822
pythondev
help
Need some advice: I'm trying to run a python script that includes the pytest module using python 2 on my windows machine but I keep receiving an error that the pytest module is not installed. I have installed both python 3.6 and python 2.7. Both are installed correctly. I have installed pytest correctly using "pip" bu...
2018-03-01T14:31:52.000423
Sandra
pythondev_help_Sandra_2018-03-01T14:31:52.000423
1,519,914,712.000423
36,823