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
afaik subprocess module supports windows
2018-03-14T13:46:41.000518
Sadye
pythondev_help_Sadye_2018-03-14T13:46:41.000518
1,521,035,201.000518
38,824
pythondev
help
<https://stackoverflow.com/a/14898162/3606603>
2018-03-14T13:47:07.000670
Sadye
pythondev_help_Sadye_2018-03-14T13:47:07.000670
1,521,035,227.00067
38,825
pythondev
help
here, SO won't lie :slightly_smiling_face:
2018-03-14T13:47:15.000509
Sadye
pythondev_help_Sadye_2018-03-14T13:47:15.000509
1,521,035,235.000509
38,826
pythondev
help
<@Sharon> `popen` in the `subprocess` lib
2018-03-14T14:09:17.000593
Porsha
pythondev_help_Porsha_2018-03-14T14:09:17.000593
1,521,036,557.000593
38,827
pythondev
help
`subprocess.Popen(["command", "arg1", "arg2"])`
2018-03-14T14:10:32.000181
Porsha
pythondev_help_Porsha_2018-03-14T14:10:32.000181
1,521,036,632.000181
38,828
pythondev
help
Thanks
2018-03-14T14:18:48.000321
Sharon
pythondev_help_Sharon_2018-03-14T14:18:48.000321
1,521,037,128.000321
38,829
pythondev
help
Can I run multiple commands though
2018-03-14T14:20:00.000459
Sharon
pythondev_help_Sharon_2018-03-14T14:20:00.000459
1,521,037,200.000459
38,830
pythondev
help
For instance I want to CD into a dir and then run the dir command to see the contents
2018-03-14T14:20:36.000634
Sharon
pythondev_help_Sharon_2018-03-14T14:20:36.000634
1,521,037,236.000634
38,831
pythondev
help
FYI pin are seen team wide so please don't use them :slightly_smiling_face: you can star message and that's personal
2018-03-14T14:21:07.000707
Micki
pythondev_help_Micki_2018-03-14T14:21:07.000707
1,521,037,267.000707
38,832
pythondev
help
I'm not sure. you can use `os.chdir("path")` to move around
2018-03-14T14:21:42.000743
Porsha
pythondev_help_Porsha_2018-03-14T14:21:42.000743
1,521,037,302.000743
38,833
pythondev
help
if listing a dir content is not an example but your goal there is something in the `os` module for that
2018-03-14T14:23:06.000715
Micki
pythondev_help_Micki_2018-03-14T14:23:06.000715
1,521,037,386.000715
38,834
pythondev
help
yes, you can do multiple commands with subprocess, but you need `shell=True`
2018-03-14T14:23:10.000313
Chantell
pythondev_help_Chantell_2018-03-14T14:23:10.000313
1,521,037,390.000313
38,835
pythondev
help
`subprocess.Popen('cd C:\yourdir &amp; dir', stdout=subprocess.PIPE, shell=True)`
2018-03-14T14:26:50.000712
Chantell
pythondev_help_Chantell_2018-03-14T14:26:50.000712
1,521,037,610.000712
38,836
pythondev
help
Wouldn’t it be simpler to run “dir C:\yourdir” rather than chaining commands?
2018-03-14T14:42:33.000269
Angelyn
pythondev_help_Angelyn_2018-03-14T14:42:33.000269
1,521,038,553.000269
38,837
pythondev
help
yes but why?
2018-03-14T14:43:57.000747
Kacie
pythondev_help_Kacie_2018-03-14T14:43:57.000747
1,521,038,637.000747
38,838
pythondev
help
its up to you really
2018-03-14T14:44:02.000631
Kacie
pythondev_help_Kacie_2018-03-14T14:44:02.000631
1,521,038,642.000631
38,839
pythondev
help
Yea but I'm writing a program that needs to be ran in cmd to be able to scroll with the wheel
2018-03-14T14:44:21.000619
Sharon
pythondev_help_Sharon_2018-03-14T14:44:21.000619
1,521,038,661.000619
38,840
pythondev
help
its kind of like doing `x, y = 10, 20`
2018-03-14T14:44:23.000145
Kacie
pythondev_help_Kacie_2018-03-14T14:44:23.000145
1,521,038,663.000145
38,841
pythondev
help
youre assigning two variables in one line
2018-03-14T14:44:32.000459
Kacie
pythondev_help_Kacie_2018-03-14T14:44:32.000459
1,521,038,672.000459
38,842
pythondev
help
you could also do `x = 10` and `y = 20 ` down below etc
2018-03-14T14:44:49.000041
Kacie
pythondev_help_Kacie_2018-03-14T14:44:49.000041
1,521,038,689.000041
38,843
pythondev
help
If I just compile it and run it and the window gets long on have to manually scroll
2018-03-14T14:44:54.000538
Sharon
pythondev_help_Sharon_2018-03-14T14:44:54.000538
1,521,038,694.000538
38,844
pythondev
help
at that point its just your style :slightly_smiling_face:
2018-03-14T14:44:55.000588
Kacie
pythondev_help_Kacie_2018-03-14T14:44:55.000588
1,521,038,695.000588
38,845
pythondev
help
the window gets long and hav to manually scroll?
2018-03-14T14:45:28.000356
Kacie
pythondev_help_Kacie_2018-03-14T14:45:28.000356
1,521,038,728.000356
38,846
pythondev
help
then dont print out the things you dont need
2018-03-14T14:45:35.000460
Kacie
pythondev_help_Kacie_2018-03-14T14:45:35.000460
1,521,038,735.00046
38,847
pythondev
help
so refine your print statement
2018-03-14T14:45:55.000643
Kacie
pythondev_help_Kacie_2018-03-14T14:45:55.000643
1,521,038,755.000643
38,848
pythondev
help
That's the thing it's ran in a loop it's basically a file funder that finds what you are looking for and sometimes you need to scroll up and look at the beginning of the file
2018-03-14T14:47:06.000644
Sharon
pythondev_help_Sharon_2018-03-14T14:47:06.000644
1,521,038,826.000644
38,849
pythondev
help
I can fix this by doing a gui but for now it's in a cmd window
2018-03-14T14:47:30.000231
Sharon
pythondev_help_Sharon_2018-03-14T14:47:30.000231
1,521,038,850.000231
38,850
pythondev
help
Hey guys, I'm new at python world and I'm trying to create my first scraping with scrapy... I'm having some issues, can someone help me? :sweat_smile:
2018-03-14T14:52:07.000103
Mistie
pythondev_help_Mistie_2018-03-14T14:52:07.000103
1,521,039,127.000103
38,851
pythondev
help
ask dude
2018-03-14T14:52:42.000210
Kacie
pythondev_help_Kacie_2018-03-14T14:52:42.000210
1,521,039,162.00021
38,852
pythondev
help
if someone knows someone should help :slightly_smiling_face:
2018-03-14T14:53:04.000652
Kacie
pythondev_help_Kacie_2018-03-14T14:53:04.000652
1,521,039,184.000652
38,853
pythondev
help
(pro-tip, not everyone is a dude)
2018-03-14T14:53:14.000432
Garrett
pythondev_help_Garrett_2018-03-14T14:53:14.000432
1,521,039,194.000432
38,854
pythondev
help
also wecome! :doge:
2018-03-14T14:53:39.000541
Kacie
pythondev_help_Kacie_2018-03-14T14:53:39.000541
1,521,039,219.000541
38,855
pythondev
help
according to Nickelodeon's 1997 magum opus "Goodburger": ``` I'm a dude, He's a dude, She's a dude, Cuz we're all dudes, hey! ```
2018-03-14T14:53:52.000455
Elisha
pythondev_help_Elisha_2018-03-14T14:53:52.000455
1,521,039,232.000455
38,856
pythondev
help
One of my co-workers has a Shiba. New favorite co-worker
2018-03-14T14:53:57.000663
Garrett
pythondev_help_Garrett_2018-03-14T14:53:57.000663
1,521,039,237.000663
38,857
pythondev
help
youre right i am a :kirby:
2018-03-14T14:53:59.000265
Kacie
pythondev_help_Kacie_2018-03-14T14:53:59.000265
1,521,039,239.000265
38,858
pythondev
help
i identify as a kirby sometimes
2018-03-14T14:54:19.000617
Kacie
pythondev_help_Kacie_2018-03-14T14:54:19.000617
1,521,039,259.000617
38,859
pythondev
help
I have a conference friend that does as well
2018-03-14T14:54:59.000006
Garrett
pythondev_help_Garrett_2018-03-14T14:54:59.000006
1,521,039,299.000006
38,860
pythondev
help
I don't think I've ever seen him _not_ in a Kirby-themed shirt
2018-03-14T14:55:10.000420
Garrett
pythondev_help_Garrett_2018-03-14T14:55:10.000420
1,521,039,310.00042
38,861
pythondev
help
When i run in terminal `scrapy shell '<http://www.olx.com.br/>'` I get a response with 544 status code and I don't know how to solve :anguished:
2018-03-14T14:55:18.000656
Mistie
pythondev_help_Mistie_2018-03-14T14:55:18.000656
1,521,039,318.000656
38,862
pythondev
help
I don't even know what 544 means hahah
2018-03-14T14:55:36.000576
Mistie
pythondev_help_Mistie_2018-03-14T14:55:36.000576
1,521,039,336.000576
38,863
pythondev
help
<@Mistie> Google is your best friend :computer:
2018-03-14T14:56:22.000614
Porsha
pythondev_help_Porsha_2018-03-14T14:56:22.000614
1,521,039,382.000614
38,864
pythondev
help
idk rule of thumb with scrappy at first is it follows the site's robots.txt
2018-03-14T14:56:38.000794
Kacie
pythondev_help_Kacie_2018-03-14T14:56:38.000794
1,521,039,398.000794
38,865
pythondev
help
<@Mistie> so check to see if youre violating <http://olx.com|olx.com>'s scraping terms
2018-03-14T14:57:02.000480
Kacie
pythondev_help_Kacie_2018-03-14T14:57:02.000480
1,521,039,422.00048
38,866
pythondev
help
chances are you are
2018-03-14T14:57:16.000324
Kacie
pythondev_help_Kacie_2018-03-14T14:57:16.000324
1,521,039,436.000324
38,867
pythondev
help
<@Porsha> This was my first option hahaha, still no clues on what to do to fix that :disappointed:
2018-03-14T14:57:24.000269
Mistie
pythondev_help_Mistie_2018-03-14T14:57:24.000269
1,521,039,444.000269
38,868
pythondev
help
For anyone still on Python 2.7, thinking it'll be fine: <https://mail.python.org/pipermail/python-dev/2018-March/152348.html>
2018-03-14T14:57:26.000011
Garrett
pythondev_help_Garrett_2018-03-14T14:57:26.000011
1,521,039,446.000011
38,869
pythondev
help
then you can setup scrapy to behave like a browser by adding certain things to your request header
2018-03-14T14:57:45.000115
Kacie
pythondev_help_Kacie_2018-03-14T14:57:45.000115
1,521,039,465.000115
38,870
pythondev
help
so google :slightly_smiling_face:
2018-03-14T14:57:47.000570
Kacie
pythondev_help_Kacie_2018-03-14T14:57:47.000570
1,521,039,467.00057
38,871
pythondev
help
<@Garrett> i stopped looking at python3.6 and under the moment i could use `breakpoint()`
2018-03-14T14:58:26.000648
Kacie
pythondev_help_Kacie_2018-03-14T14:58:26.000648
1,521,039,506.000648
38,872
pythondev
help
3.7 is gonna be nice
2018-03-14T15:00:20.000441
Garrett
pythondev_help_Garrett_2018-03-14T15:00:20.000441
1,521,039,620.000441
38,873
pythondev
help
its going to be huuuuge
2018-03-14T15:06:22.000499
Kacie
pythondev_help_Kacie_2018-03-14T15:06:22.000499
1,521,039,982.000499
38,874
pythondev
help
<https://media.giphy.com/media/xT0GqIsBdw6mkKbq0g/giphy.gif>
2018-03-14T15:06:23.000190
Kacie
pythondev_help_Kacie_2018-03-14T15:06:23.000190
1,521,039,983.00019
38,875
pythondev
help
LOL. I have python 2.7 and 3.5.2 installed. I only use the latter these days, so I have to be specific on cli with python3, pip3, etc. I wouldn't mind getting rid of 2.7, but perhaps it is needed somewhere in ubuntu?
2018-03-14T15:09:31.000814
Kemberly
pythondev_help_Kemberly_2018-03-14T15:09:31.000814
1,521,040,171.000814
38,876
pythondev
help
Likely
2018-03-14T15:10:03.000693
Garrett
pythondev_help_Garrett_2018-03-14T15:10:03.000693
1,521,040,203.000693
38,877
pythondev
help
end of life has been known for a while
2018-03-14T15:10:12.000379
Kacie
pythondev_help_Kacie_2018-03-14T15:10:12.000379
1,521,040,212.000379
38,878
pythondev
help
Any reason for 3.5 over 3.6?
2018-03-14T15:10:15.000112
Garrett
pythondev_help_Garrett_2018-03-14T15:10:15.000112
1,521,040,215.000112
38,879
pythondev
help
im sure they are thinking of this
2018-03-14T15:10:17.000451
Kacie
pythondev_help_Kacie_2018-03-14T15:10:17.000451
1,521,040,217.000451
38,880
pythondev
help
for a couple years now?
2018-03-14T15:10:24.000243
Kacie
pythondev_help_Kacie_2018-03-14T15:10:24.000243
1,521,040,224.000243
38,881
pythondev
help
i also deleted python2.7 on a clean ubuntu build entirely and a bunch of things broke down :slightly_smiling_face:
2018-03-14T15:11:04.000375
Kacie
pythondev_help_Kacie_2018-03-14T15:11:04.000375
1,521,040,264.000375
38,882
pythondev
help
No, <@Garrett>, other than laziness. Will update one of these days soon
2018-03-14T15:11:19.000275
Kemberly
pythondev_help_Kemberly_2018-03-14T15:11:19.000275
1,521,040,279.000275
38,883
pythondev
help
<@Kemberly> looks like you are talking about your systems python. Even if there isn't that much risk I would let that one be handle by ubuntu :slightly_smiling_face:
2018-03-14T15:28:55.000666
Micki
pythondev_help_Micki_2018-03-14T15:28:55.000666
1,521,041,335.000666
38,884
pythondev
help
I took some courses that were python 2.7 a couple years ago. But yes, <@Micki>, I am just going to leave things as they are wrt that
2018-03-14T15:35:08.000437
Kemberly
pythondev_help_Kemberly_2018-03-14T15:35:08.000437
1,521,041,708.000437
38,885
pythondev
help
hi guys, in order to send an authorization key/value in a REST API I need to format something like ``` Authorization: 'Basic YWRtaW5fdHJpYWxfdGVzdEB0cmlhbC10ZXN0OlJmNGVTZmFkc2Zhb2l1ISEjIz8/PyUk' ``` the code in nodejs I am converting to python tells ``` RequestHeaders.headers['Authorization'] = 'Basic ' + new Buffe...
2018-03-14T16:05:27.000401
Maya
pythondev_help_Maya_2018-03-14T16:05:27.000401
1,521,043,527.000401
38,886
pythondev
help
I’d like to get your opinion with that
2018-03-14T16:05:44.000209
Maya
pythondev_help_Maya_2018-03-14T16:05:44.000209
1,521,043,544.000209
38,887
pythondev
help
`str(cred_encoded)`?
2018-03-14T16:11:38.000560
Elisha
pythondev_help_Elisha_2018-03-14T16:11:38.000560
1,521,043,898.00056
38,888
pythondev
help
maybe a space after your `Basic` as well since you wrote `'Basic YWRt...`
2018-03-14T16:11:58.000380
Elisha
pythondev_help_Elisha_2018-03-14T16:11:58.000380
1,521,043,918.00038
38,889
pythondev
help
the space is needed for sure, but will not throw that error
2018-03-14T16:12:36.000401
Terica
pythondev_help_Terica_2018-03-14T16:12:36.000401
1,521,043,956.000401
38,890
pythondev
help
<@Elisha> thanks. it comes as `"Basicb'cGlwcG86cGFwcG8='"`
2018-03-14T16:12:39.000395
Maya
pythondev_help_Maya_2018-03-14T16:12:39.000395
1,521,043,959.000395
38,891
pythondev
help
I should remove the `b`
2018-03-14T16:12:52.000204
Maya
pythondev_help_Maya_2018-03-14T16:12:52.000204
1,521,043,972.000204
38,892
pythondev
help
nice
2018-03-14T16:12:58.000123
Elisha
pythondev_help_Elisha_2018-03-14T16:12:58.000123
1,521,043,978.000123
38,893
pythondev
help
hit me with that taco fam :wink:
2018-03-14T16:13:03.000532
Elisha
pythondev_help_Elisha_2018-03-14T16:13:03.000532
1,521,043,983.000532
38,894
pythondev
help
all i do, i do for the taco
2018-03-14T16:13:27.000704
Elisha
pythondev_help_Elisha_2018-03-14T16:13:27.000704
1,521,044,007.000704
38,895
pythondev
help
of course :slightly_smiling_face:
2018-03-14T16:13:37.000596
Maya
pythondev_help_Maya_2018-03-14T16:13:37.000596
1,521,044,017.000596
38,896
pythondev
help
I'd also throw out a disclaimer that my python is self-taught hackery, i do a lot of type casting and there may be a better, pythonic, way
2018-03-14T16:14:37.000615
Elisha
pythondev_help_Elisha_2018-03-14T16:14:37.000615
1,521,044,077.000615
38,897
pythondev
help
I think I am missing some pieces
2018-03-14T16:14:58.000015
Maya
pythondev_help_Maya_2018-03-14T16:14:58.000015
1,521,044,098.000015
38,898
pythondev
help
aren't we all :slightly_smiling_face:
2018-03-14T16:15:06.000657
Elisha
pythondev_help_Elisha_2018-03-14T16:15:06.000657
1,521,044,106.000657
38,899
pythondev
help
prob, me for sure :slightly_smiling_face:. Like, If I have to remote the ‘b’ I shoud decode the string
2018-03-14T16:15:45.000242
Maya
pythondev_help_Maya_2018-03-14T16:15:45.000242
1,521,044,145.000242
38,900
pythondev
help
<@Elisha> :taco: for "python is self-taught hackery"
2018-03-14T16:17:10.000648
Kemberly
pythondev_help_Kemberly_2018-03-14T16:17:10.000648
1,521,044,230.000648
38,901
pythondev
help
ty ty :smile:
2018-03-14T16:17:30.000044
Elisha
pythondev_help_Elisha_2018-03-14T16:17:30.000044
1,521,044,250.000044
38,902
pythondev
help
I like to hit things until they work meself :hammer:
2018-03-14T16:17:41.000013
Kemberly
pythondev_help_Kemberly_2018-03-14T16:17:41.000013
1,521,044,261.000013
38,903
pythondev
help
i like to drink at them until they work
2018-03-14T16:17:53.000375
Elisha
pythondev_help_Elisha_2018-03-14T16:17:53.000375
1,521,044,273.000375
38,904
pythondev
help
:stuck_out_tongue_winking_eye:
2018-03-14T16:18:10.000598
Kemberly
pythondev_help_Kemberly_2018-03-14T16:18:10.000598
1,521,044,290.000598
38,905
pythondev
help
``` login = {'Authorization':'Basic '+ base64.b64encode(username + ":" + password)} ``` ``` Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, ...
2018-03-14T16:32:19.000605
Maya
pythondev_help_Maya_2018-03-14T16:32:19.000605
1,521,045,139.000605
38,906
pythondev
help
:face_with_rolling_eyes:
2018-03-14T16:32:39.000005
Maya
pythondev_help_Maya_2018-03-14T16:32:39.000005
1,521,045,159.000005
38,907
pythondev
help
looks like you're passing a string to b64encode when it needs bytes
2018-03-14T16:33:13.000015
Genevie
pythondev_help_Genevie_2018-03-14T16:33:13.000015
1,521,045,193.000015
38,908
pythondev
help
yes, but I’d need a format like ``` Authorization: 'Basic YWRtaW5fdHJpYWxfdGVzdEB0cmlhbC10ZXN0OlJmNGVTZmFkc2Zhb2l1ISEjIz8/PyUk' ```
2018-03-14T16:34:40.000157
Maya
pythondev_help_Maya_2018-03-14T16:34:40.000157
1,521,045,280.000157
38,909
pythondev
help
so if I encode the `(username+“:”+password)
2018-03-14T16:35:41.000395
Maya
pythondev_help_Maya_2018-03-14T16:35:41.000395
1,521,045,341.000395
38,910
pythondev
help
and convert it to base64 I’ll get the extra `b` which will break the authentication
2018-03-14T16:36:05.000539
Maya
pythondev_help_Maya_2018-03-14T16:36:05.000539
1,521,045,365.000539
38,911
pythondev
help
like ``` g = "Basic" + " " + str(cred_encoded) g "Basic b'cGlwcG86cGFwcG8='" ```
2018-03-14T16:36:58.000547
Maya
pythondev_help_Maya_2018-03-14T16:36:58.000547
1,521,045,418.000547
38,912
pythondev
help
you could do a `[1:]` on the string to drop the b
2018-03-14T16:37:17.000673
Elisha
pythondev_help_Elisha_2018-03-14T16:37:17.000673
1,521,045,437.000673
38,913
pythondev
help
if I do [1:] I’ll drop the first B
2018-03-14T16:37:47.000528
Maya
pythondev_help_Maya_2018-03-14T16:37:47.000528
1,521,045,467.000528
38,914
pythondev
help
`"Basic "+ string[1:]`
2018-03-14T16:38:05.000335
Elisha
pythondev_help_Elisha_2018-03-14T16:38:05.000335
1,521,045,485.000335
38,915
pythondev
help
oh yea i guess you;d have to trim the apostrophes as well
2018-03-14T16:38:59.000338
Elisha
pythondev_help_Elisha_2018-03-14T16:38:59.000338
1,521,045,539.000338
38,916
pythondev
help
``` g = 'Basic ' + str(cred_encoded)[1:] g "Basic 'cGlwcG86cGFwcG8='" ```
2018-03-14T16:39:05.000688
Maya
pythondev_help_Maya_2018-03-14T16:39:05.000688
1,521,045,545.000688
38,917
pythondev
help
hmm
2018-03-14T16:39:08.000246
Genevie
pythondev_help_Genevie_2018-03-14T16:39:08.000246
1,521,045,548.000246
38,918
pythondev
help
but still I have the extra ' '
2018-03-14T16:39:16.000039
Maya
pythondev_help_Maya_2018-03-14T16:39:16.000039
1,521,045,556.000039
38,919
pythondev
help
which will break the auth
2018-03-14T16:39:27.000677
Maya
pythondev_help_Maya_2018-03-14T16:39:27.000677
1,521,045,567.000677
38,920
pythondev
help
lol a `[2:]` and then a `[:-1]`
2018-03-14T16:39:38.000012
Elisha
pythondev_help_Elisha_2018-03-14T16:39:38.000012
1,521,045,578.000012
38,921
pythondev
help
but that's disgusting
2018-03-14T16:39:43.000269
Elisha
pythondev_help_Elisha_2018-03-14T16:39:43.000269
1,521,045,583.000269
38,922
pythondev
help
it seems it’s easier to do in js
2018-03-14T16:40:01.000354
Maya
pythondev_help_Maya_2018-03-14T16:40:01.000354
1,521,045,601.000354
38,923