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
yeah. i think im just stubborn
2017-06-23T15:36:06.475340
Marcela
pythondev_help_Marcela_2017-06-23T15:36:06.475340
1,498,232,166.47534
83,003
pythondev
help
its a side project so im not rushed for time
2017-06-23T15:36:11.476860
Marcela
pythondev_help_Marcela_2017-06-23T15:36:11.476860
1,498,232,171.47686
83,004
pythondev
help
but its time to admit defeat lol
2017-06-23T15:36:14.477699
Marcela
pythondev_help_Marcela_2017-06-23T15:36:14.477699
1,498,232,174.477699
83,005
pythondev
help
if i remember correctly, there are vms that are basically terminal only right?
2017-06-23T15:36:54.488925
Marcela
pythondev_help_Marcela_2017-06-23T15:36:54.488925
1,498,232,214.488925
83,006
pythondev
help
the VMs just run whatever image you give them, and most linux images are the full OS. why do you ask?
2017-06-23T15:38:30.516334
Patty
pythondev_help_Patty_2017-06-23T15:38:30.516334
1,498,232,310.516334
83,007
pythondev
help
You could do `vagrant`
2017-06-23T15:39:34.534534
Beula
pythondev_help_Beula_2017-06-23T15:39:34.534534
1,498,232,374.534534
83,008
pythondev
help
Pretty easy to set up and reproduce your dev env that way
2017-06-23T15:39:42.536737
Beula
pythondev_help_Beula_2017-06-23T15:39:42.536737
1,498,232,382.536737
83,009
pythondev
help
i was just thinking of minimalistic options
2017-06-23T15:46:33.654562
Marcela
pythondev_help_Marcela_2017-06-23T15:46:33.654562
1,498,232,793.654562
83,010
pythondev
help
but i guess i'd like IDEs and guis and such
2017-06-23T15:46:59.661732
Marcela
pythondev_help_Marcela_2017-06-23T15:46:59.661732
1,498,232,819.661732
83,011
pythondev
help
hello
2017-06-23T18:50:37.237989
Minh
pythondev_help_Minh_2017-06-23T18:50:37.237989
1,498,243,837.237989
83,012
pythondev
help
anyone know regex that find url link with specific type eg:<http://eg.com/asd.pdf>
2017-06-23T18:51:32.246001
Minh
pythondev_help_Minh_2017-06-23T18:51:32.246001
1,498,243,892.246001
83,013
pythondev
help
type of what?
2017-06-23T18:51:50.248721
Meg
pythondev_help_Meg_2017-06-23T18:51:50.248721
1,498,243,910.248721
83,014
pythondev
help
what is specific about that that you need to match?
2017-06-23T18:52:03.250665
Meg
pythondev_help_Meg_2017-06-23T18:52:03.250665
1,498,243,923.250665
83,015
pythondev
help
specific extension
2017-06-23T18:52:17.252731
Minh
pythondev_help_Minh_2017-06-23T18:52:17.252731
1,498,243,937.252731
83,016
pythondev
help
like .pdf
2017-06-23T18:52:23.253565
Minh
pythondev_help_Minh_2017-06-23T18:52:23.253565
1,498,243,943.253565
83,017
pythondev
help
.mp4
2017-06-23T18:52:26.253966
Minh
pythondev_help_Minh_2017-06-23T18:52:26.253966
1,498,243,946.253966
83,018
pythondev
help
Are you more concerned with the extension itself or what kind of file it is?
2017-06-23T18:54:10.268992
Patty
pythondev_help_Patty_2017-06-23T18:54:10.268992
1,498,244,050.268992
83,019
pythondev
help
Because you can get a lot from the `Content-Type` header when you make a request to it
2017-06-23T18:54:44.273766
Patty
pythondev_help_Patty_2017-06-23T18:54:44.273766
1,498,244,084.273766
83,020
pythondev
help
Unless you only have strings that are the URLs
2017-06-23T18:54:58.275798
Patty
pythondev_help_Patty_2017-06-23T18:54:58.275798
1,498,244,098.275798
83,021
pythondev
help
And if you go that route the `mimetypes` module can guess and extension from that
2017-06-23T18:55:56.284234
Patty
pythondev_help_Patty_2017-06-23T18:55:56.284234
1,498,244,156.284234
83,022
pythondev
help
<https://raw.githubusercontent.com/EbookFoundation/free-programming-books/master/free-programming-books.md>
2017-06-23T18:57:40.299111
Minh
pythondev_help_Minh_2017-06-23T18:57:40.299111
1,498,244,260.299111
83,023
pythondev
help
im trying to get only pdf link
2017-06-23T18:58:40.307947
Minh
pythondev_help_Minh_2017-06-23T18:58:40.307947
1,498,244,320.307947
83,024
pythondev
help
im already used mimetypes but its iterates all link,all i want is find url with .pdf extension then download it
2017-06-23T18:59:45.317689
Minh
pythondev_help_Minh_2017-06-23T18:59:45.317689
1,498,244,385.317689
83,025
pythondev
help
So only save the ones with the correct mimetype. <@Meg> if I'm missing anything feel free to step in this is more your wheelhouse
2017-06-23T19:02:16.343128
Patty
pythondev_help_Patty_2017-06-23T19:02:16.343128
1,498,244,536.343128
83,026
pythondev
help
yea correct
2017-06-23T19:02:24.344301
Minh
pythondev_help_Minh_2017-06-23T19:02:24.344301
1,498,244,544.344301
83,027
pythondev
help
here's what I'd do. install <https://pythonhosted.org/Markdown/> and beautiful soup
2017-06-23T19:02:29.344966
Meg
pythondev_help_Meg_2017-06-23T19:02:29.344966
1,498,244,549.344966
83,028
pythondev
help
and requests
2017-06-23T19:02:35.345847
Meg
pythondev_help_Meg_2017-06-23T19:02:35.345847
1,498,244,555.345847
83,029
pythondev
help
use requests to get that link you posted above, put it into python-markdown to convert to html
2017-06-23T19:02:58.349003
Meg
pythondev_help_Meg_2017-06-23T19:02:58.349003
1,498,244,578.349003
83,030
pythondev
help
Yes thank you I'm on my phone and scraping is a lot to type
2017-06-23T19:03:02.349715
Patty
pythondev_help_Patty_2017-06-23T19:03:02.349715
1,498,244,582.349715
83,031
pythondev
help
then use beautifulsoup to extract all `&lt;a&gt;` tags ending in `.pdf`
2017-06-23T19:03:32.353872
Meg
pythondev_help_Meg_2017-06-23T19:03:32.353872
1,498,244,612.353872
83,032
pythondev
help
that'll give you a list of URLs
2017-06-23T19:03:40.354829
Meg
pythondev_help_Meg_2017-06-23T19:03:40.354829
1,498,244,620.354829
83,033
pythondev
help
you can then use `requests` to get the content of each link, then use basic python file IO to write the response data to a file on your machine
2017-06-23T19:04:21.360889
Meg
pythondev_help_Meg_2017-06-23T19:04:21.360889
1,498,244,661.360889
83,034
pythondev
help
a possibly simpler version would be to get the text content of that link
2017-06-23T19:05:33.371162
Meg
pythondev_help_Meg_2017-06-23T19:05:33.371162
1,498,244,733.371162
83,035
pythondev
help
split each line by `(`, and check if each result ends in .pdf
2017-06-23T19:06:03.375174
Meg
pythondev_help_Meg_2017-06-23T19:06:03.375174
1,498,244,763.375174
83,036
pythondev
help
but not sure how accurate it would be, since there are different ways a `(` can appear in markdown
2017-06-23T19:06:33.379252
Meg
pythondev_help_Meg_2017-06-23T19:06:33.379252
1,498,244,793.379252
83,037
pythondev
help
ok, i'll try the first solution
2017-06-23T19:07:15.385062
Minh
pythondev_help_Minh_2017-06-23T19:07:15.385062
1,498,244,835.385062
83,038
pythondev
help
thanks you very much
2017-06-23T19:07:25.386302
Minh
pythondev_help_Minh_2017-06-23T19:07:25.386302
1,498,244,845.386302
83,039
pythondev
help
good luck
2017-06-23T19:07:49.389463
Meg
pythondev_help_Meg_2017-06-23T19:07:49.389463
1,498,244,869.389463
83,040
pythondev
help
going through the jquery tutorial, and i'm a bit confused about this lesson: <http://try.jquery.com/levels/2/challenges/4>
2017-06-23T21:15:56.121146
Magdalena
pythondev_help_Magdalena_2017-06-23T21:15:56.121146
1,498,252,556.121146
83,041
pythondev
help
when switching between the descendant and direct child selectors, i don't see a difference between the two on the html
2017-06-23T21:16:33.123621
Magdalena
pythondev_help_Magdalena_2017-06-23T21:16:33.123621
1,498,252,593.123621
83,042
pythondev
help
as in, the same bit of code is being highlighted regardless of which one i choose
2017-06-23T21:16:58.125234
Magdalena
pythondev_help_Magdalena_2017-06-23T21:16:58.125234
1,498,252,618.125234
83,043
pythondev
help
if that's the point, then ignore this, but i was under the impression that it would highlight a smaller subset of the code
2017-06-23T21:18:16.130444
Magdalena
pythondev_help_Magdalena_2017-06-23T21:18:16.130444
1,498,252,696.130444
83,044
pythondev
help
Here is my solution for <http://www.practicepython.org/exercise/2014/01/29/01-character-input.html>
2017-06-24T01:28:41.878703
Deedee
pythondev_help_Deedee_2017-06-24T01:28:41.878703
1,498,267,721.878703
83,045
pythondev
help
Questions 1) Is there a cleaner/better way to verify input than the while...try...except block I used? 2) I am repeating error string in "except" and in last line of while loops. Any way to have it err while only having that error message in code once? 3) Lines 17 - 23. How can I do isalpha(strip(fname)) in python? do I have to fname = strip(input...) on line 19? 4) Open to any suggestions on how to improve/optimize that code.
2017-06-24T01:46:06.920565
Deedee
pythondev_help_Deedee_2017-06-24T01:46:06.920565
1,498,268,766.920565
83,046
pythondev
help
Good day Pythonist, does anyone can help me about my django template varaible {{SITE_NAME}} because i can't see it from the template even in view by request.SITE_NAME
2017-06-24T03:18:55.146672
Meredith
pythondev_help_Meredith_2017-06-24T03:18:55.146672
1,498,274,335.146672
83,047
pythondev
help
thanks in advance
2017-06-24T03:19:00.146891
Meredith
pythondev_help_Meredith_2017-06-24T03:19:00.146891
1,498,274,340.146891
83,048
pythondev
help
Is there a generally-accepted 'best' unit-testing package? Or is it a subjective choice between nose, py.test, etc?
2017-06-24T05:57:22.555785
Gabriele
pythondev_help_Gabriele_2017-06-24T05:57:22.555785
1,498,283,842.555785
83,049
pythondev
help
`pytest`!
2017-06-24T05:59:48.562191
Suellen
pythondev_help_Suellen_2017-06-24T05:59:48.562191
1,498,283,988.562191
83,050
pythondev
help
no thinking required
2017-06-24T06:00:06.563406
Suellen
pythondev_help_Suellen_2017-06-24T06:00:06.563406
1,498,284,006.563406
83,051
pythondev
help
What are the advantages? I'm not a big fan of the setup/teardown syntax, but I could get used to it.
2017-06-24T06:01:15.567400
Gabriele
pythondev_help_Gabriele_2017-06-24T06:01:15.567400
1,498,284,075.5674
83,052
pythondev
help
really easy fixtures, parametrized tests
2017-06-24T06:02:20.570748
Suellen
pythondev_help_Suellen_2017-06-24T06:02:20.570748
1,498,284,140.570748
83,053
pythondev
help
``` @pytest.mark.parametrize("test_input,expected", [ ("3+5", 8), ("2+4", 6), ("6*9", 42), ]) def test_eval(test_input, expected): assert eval(test_input) == expected ```
2017-06-24T06:02:28.571214
Suellen
pythondev_help_Suellen_2017-06-24T06:02:28.571214
1,498,284,148.571214
83,054
pythondev
help
And I really like how you don't need classes, because you really don't.
2017-06-24T06:03:17.573415
Suellen
pythondev_help_Suellen_2017-06-24T06:03:17.573415
1,498,284,197.573415
83,055
pythondev
help
Okay. I'll try it for a week. And if I don't like it, I'll blame you. :wink:
2017-06-24T06:03:48.574764
Gabriele
pythondev_help_Gabriele_2017-06-24T06:03:48.574764
1,498,284,228.574764
83,056
pythondev
help
:dizzy_face:
2017-06-24T06:04:18.576301
Suellen
pythondev_help_Suellen_2017-06-24T06:04:18.576301
1,498,284,258.576301
83,057
pythondev
help
thanks
2017-06-24T06:04:27.576699
Gabriele
pythondev_help_Gabriele_2017-06-24T06:04:27.576699
1,498,284,267.576699
83,058
pythondev
help
Hi there! I'm working with a fairly big set, adding many items in a loop, i'm using Jupyter notebook on a anaconda environment on Windows. At some point after 5 or 6 million elements the function 'all_combinations.add(''.join(tuples))' Fails with 'MemoryError: ' Any idea?
2017-06-24T13:14:16.031499
Philip
pythondev_help_Philip_2017-06-24T13:14:16.031499
1,498,310,056.031499
83,059
pythondev
help
It could be that your data set is just too big for the amount of RAM in your computer. Are you using 64 bit Anaconda or 32 bit?
2017-06-24T13:23:35.065830
Gabriele
pythondev_help_Gabriele_2017-06-24T13:23:35.065830
1,498,310,615.06583
83,060
pythondev
help
i just found out that the python env that i'm using in anaconda is 32 bit, i'll try with the 64 bit version. it's strange anyway as i was monitoring the amount of ram used and it never went up of more that 200/300 MB on a 16GB ram machine
2017-06-24T13:26:08.075378
Philip
pythondev_help_Philip_2017-06-24T13:26:08.075378
1,498,310,768.075378
83,061
pythondev
help
It could be that the operation you wanted to perform tried to allocate 2GB or more in one go and failed, meaning you never saw it go from 300MB to an intended 2300MB (or similar)
2017-06-24T13:27:04.078758
Gabriele
pythondev_help_Gabriele_2017-06-24T13:27:04.078758
1,498,310,824.078758
83,062
pythondev
help
~Can a generator be used here?~
2017-06-24T13:28:46.085010
Winnifred
pythondev_help_Winnifred_2017-06-24T13:28:46.085010
1,498,310,926.08501
83,063
pythondev
help
kylotan, by chance, do you know how to create a 64 bit python anaconda environment?
2017-06-24T13:29:17.087048
Philip
pythondev_help_Philip_2017-06-24T13:29:17.087048
1,498,310,957.087048
83,064
pythondev
help
anaconda offers downloads of each - you'd probably want to uninstall the 32 bit version and install the 64 bit one
2017-06-24T13:30:52.093615
Gabriele
pythondev_help_Gabriele_2017-06-24T13:30:52.093615
1,498,311,052.093615
83,065
pythondev
help
i usually tend to install the 64 bit version the of software i use, is there a way to verify that indeed my anaconda installation is a 64 bit one? running python inside an environment says 32 bit
2017-06-24T13:32:40.100503
Philip
pythondev_help_Philip_2017-06-24T13:32:40.100503
1,498,311,160.100503
83,066
pythondev
help
Task Manager shows whether each running process is 32 or 64 bit
2017-06-24T13:33:08.102191
Gabriele
pythondev_help_Gabriele_2017-06-24T13:33:08.102191
1,498,311,188.102191
83,067
pythondev
help
Not sure how to verify the installation itself, since I don't use anaconda personally.
2017-06-24T13:33:31.103748
Gabriele
pythondev_help_Gabriele_2017-06-24T13:33:31.103748
1,498,311,211.103748
83,068
pythondev
help
hello is there a way to execute "curl '<http://example.cm/bla>' --data '{"method":"wallet_new_address"}'" but in python way?
2017-06-25T15:50:53.440359
Minh
pythondev_help_Minh_2017-06-25T15:50:53.440359
1,498,405,853.440359
83,069
pythondev
help
look at this module :slightly_smiling_face:
2017-06-25T15:51:14.441512
Ciera
pythondev_help_Ciera_2017-06-25T15:51:14.441512
1,498,405,874.441512
83,070
pythondev
help
using this &gt;&gt;&gt; payload = {'key1': 'value1', 'key2': 'value2'} &gt;&gt;&gt; r = requests.get('<http://httpbin.org/get>', params=payload)
2017-06-25T15:51:56.443819
Minh
pythondev_help_Minh_2017-06-25T15:51:56.443819
1,498,405,916.443819
83,071
pythondev
help
does the '--data' count?
2017-06-25T15:52:09.444644
Minh
pythondev_help_Minh_2017-06-25T15:52:09.444644
1,498,405,929.444644
83,072
pythondev
help
I think when you use --data with curl, it will do a HTTP POST request, with the data in the request body.
2017-06-25T15:53:24.448663
Ruben
pythondev_help_Ruben_2017-06-25T15:53:24.448663
1,498,406,004.448663
83,073
pythondev
help
To do the same with `requests`, you'd use `r = <http://requests.post|requests.post>("<http://httpbin.org/post>", data=payload)`
2017-06-25T15:54:30.452313
Ruben
pythondev_help_Ruben_2017-06-25T15:54:30.452313
1,498,406,070.452313
83,074
pythondev
help
So, `<http://requests.post|requests.post>()` instead of `requests.get()` to make a HTTP POST request.
2017-06-25T15:55:06.454234
Ruben
pythondev_help_Ruben_2017-06-25T15:55:06.454234
1,498,406,106.454234
83,075
pythondev
help
ok, thanks you
2017-06-25T16:02:34.481339
Minh
pythondev_help_Minh_2017-06-25T16:02:34.481339
1,498,406,554.481339
83,076
pythondev
help
gonna try that one
2017-06-25T16:02:39.481603
Minh
pythondev_help_Minh_2017-06-25T16:02:39.481603
1,498,406,559.481603
83,077
pythondev
help
<@Minh> all the HTTP verbs correspond to a method in `requests`. Therefore, `PUT` translates to `requests.put(...)`, `GET` as `requests.get(...)`, and so on
2017-06-25T17:35:58.796575
Meg
pythondev_help_Meg_2017-06-25T17:35:58.796575
1,498,412,158.796575
83,078
pythondev
help
<http://docs.python-requests.org/en/master/api/>
2017-06-25T17:36:19.797748
Meg
pythondev_help_Meg_2017-06-25T17:36:19.797748
1,498,412,179.797748
83,079
pythondev
help
Hi everyone. Which service or tool for crawling website with javascript? For me i used phantomjs and selenium. But their performance is so poor.
2017-06-26T03:24:20.832948
Mirna
pythondev_help_Mirna_2017-06-26T03:24:20.832948
1,498,447,460.832948
83,080
pythondev
help
I often use `requests` in combination with `BeautifulSoup` (using the `lxml` parser).
2017-06-26T03:25:14.841904
Ruben
pythondev_help_Ruben_2017-06-26T03:25:14.841904
1,498,447,514.841904
83,081
pythondev
help
However, that's not a JavaScript solution. Sorry!
2017-06-26T03:25:40.846439
Ruben
pythondev_help_Ruben_2017-06-26T03:25:40.846439
1,498,447,540.846439
83,082
pythondev
help
<@Mirna> is this some sort of single page web app?
2017-06-26T03:34:27.938809
Collette
pythondev_help_Collette_2017-06-26T03:34:27.938809
1,498,448,067.938809
83,083
pythondev
help
Kind of. Because some pages need to excute javasript for rendering full content. So i have to find some browser which can excute javascript for making dynamic crawler.
2017-06-26T03:37:48.973866
Mirna
pythondev_help_Mirna_2017-06-26T03:37:48.973866
1,498,448,268.973866
83,084
pythondev
help
But according to real life experience. I see phantomjs or selenium is so slow
2017-06-26T03:38:29.980967
Mirna
pythondev_help_Mirna_2017-06-26T03:38:29.980967
1,498,448,309.980967
83,085
pythondev
help
one minute they can only render 5-6 page
2017-06-26T03:38:47.984069
Mirna
pythondev_help_Mirna_2017-06-26T03:38:47.984069
1,498,448,327.984069
83,086
pythondev
help
Which cannot serve my purpose
2017-06-26T03:38:58.985997
Mirna
pythondev_help_Mirna_2017-06-26T03:38:58.985997
1,498,448,338.985997
83,087
pythondev
help
Maybe spread the workload out to multiple VMs and let each do a part of the URLspace?
2017-06-26T03:39:13.988975
Ruben
pythondev_help_Ruben_2017-06-26T03:39:13.988975
1,498,448,353.988975
83,088
pythondev
help
<@Mirna> can't you just repeat queries that javascript is making and get the data from the backend directly?
2017-06-26T03:40:30.003203
Collette
pythondev_help_Collette_2017-06-26T03:40:30.003203
1,498,448,430.003203
83,089
pythondev
help
Can i make DM with you <@Collette> ?
2017-06-26T03:42:24.023339
Mirna
pythondev_help_Mirna_2017-06-26T03:42:24.023339
1,498,448,544.023339
83,090
pythondev
help
Let's keep our conversation public
2017-06-26T03:43:11.031778
Collette
pythondev_help_Collette_2017-06-26T03:43:11.031778
1,498,448,591.031778
83,091
pythondev
help
I'm not the only one who can help you
2017-06-26T03:43:36.036140
Collette
pythondev_help_Collette_2017-06-26T03:43:36.036140
1,498,448,616.03614
83,092
pythondev
help
Ok. I’m afraid that i will mess our channel. So the problem is i’m making a crawler which can extract the article main content of any news website.
2017-06-26T03:45:04.052317
Mirna
pythondev_help_Mirna_2017-06-26T03:45:04.052317
1,498,448,704.052317
83,093
pythondev
help
So for making that i have to get the css and javascript for detecting which is article page and navigation page.
2017-06-26T03:45:40.059508
Mirna
pythondev_help_Mirna_2017-06-26T03:45:40.059508
1,498,448,740.059508
83,094
pythondev
help
My only bottleneck is page rendering tools. For this i used phantomjs and selenium.
2017-06-26T03:46:40.070759
Mirna
pythondev_help_Mirna_2017-06-26T03:46:40.070759
1,498,448,800.070759
83,095
pythondev
help
But with their pool performances i can’t really use this for production
2017-06-26T03:47:06.075626
Mirna
pythondev_help_Mirna_2017-06-26T03:47:06.075626
1,498,448,826.075626
83,096
pythondev
help
Yeah, you said that a couple of times already.
2017-06-26T03:47:19.077899
Collette
pythondev_help_Collette_2017-06-26T03:47:19.077899
1,498,448,839.077899
83,097
pythondev
help
and not the only who need to solve it
2017-06-26T03:48:10.087052
Tresa
pythondev_help_Tresa_2017-06-26T03:48:10.087052
1,498,448,890.087052
83,098
pythondev
help
<@Mirna> have you seen my previous question?
2017-06-26T03:48:21.089166
Collette
pythondev_help_Collette_2017-06-26T03:48:21.089166
1,498,448,901.089166
83,099
pythondev
help
Yup already. But it can’t help. Some web pages make different requests ajax for rendering full content each page. So if i write some algorithm for detecting those request format and fake it. It will make my issue extremely complex. So for reducing the complex, i used some service which can return me the full content after javascript executing.
2017-06-26T03:52:22.135628
Mirna
pythondev_help_Mirna_2017-06-26T03:52:22.135628
1,498,449,142.135628
83,100
pythondev
help
<@Collette> and sorry for repeating my issue. I just want to centralize again all of my issue.
2017-06-26T03:53:15.146205
Mirna
pythondev_help_Mirna_2017-06-26T03:53:15.146205
1,498,449,195.146205
83,101
pythondev
help
You still have to parse the returned page, right? Then how parsing different parts is it more complex than rendering everything and parsing parts as a whole?
2017-06-26T03:54:17.158505
Collette
pythondev_help_Collette_2017-06-26T03:54:17.158505
1,498,449,257.158505
83,102