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, that breaks down almost immediately after the first 4 examples. The next one is `7667`, for instance, while your code would say `666666`.
2019-02-05T15:18:40.984800
Sasha
pythondev_help_Sasha_2019-02-05T15:18:40.984800
1,549,379,920.9848
6,721
pythondev
help
So you may want to generate some more examples by hand until you see the pattern.
2019-02-05T15:20:32.985900
Sasha
pythondev_help_Sasha_2019-02-05T15:20:32.985900
1,549,380,032.9859
6,722
pythondev
help
how to check why state transitions stopped?
2019-02-05T16:29:48.998000
Micki
pythondev_help_Micki_2019-02-05T16:29:48.998000
1,549,384,188.998
6,723
pythondev
help
how to debug state transitions using Machine
2019-02-05T16:30:54.998700
Micki
pythondev_help_Micki_2019-02-05T16:30:54.998700
1,549,384,254.9987
6,724
pythondev
help
Step through with a debugger I guess. Examine the variables at each step and confirm they are what you expect.
2019-02-05T16:33:15.001500
Karoline
pythondev_help_Karoline_2019-02-05T16:33:15.001500
1,549,384,395.0015
6,725
pythondev
help
Hey guys, I’m going to be getting a letter in which I will have to input some information from an API and print regularly. That’s all fine and dandy, but here’s the complicated part, the letter is going to have images in it too, and I’m not sure what the best way to handle this is. My first thought is HTML, do the subs...
2019-02-05T16:34:03.002000
Kristine
pythondev_help_Kristine_2019-02-05T16:34:03.002000
1,549,384,443.002
6,726
pythondev
help
<@Moira> This looks nice in Python highlight
2019-02-05T16:35:19.002100
Carolin
pythondev_help_Carolin_2019-02-05T16:35:19.002100
1,549,384,519.0021
6,727
pythondev
help
<@Kristine> What do you mean by "letter"?
2019-02-05T16:46:56.003600
Carmen
pythondev_help_Carmen_2019-02-05T16:46:56.003600
1,549,385,216.0036
6,728
pythondev
help
<@Kristine> Can you better define this? print it how? to the screen? to a printer? What type of thing are you trying to build?
2019-02-05T16:46:58.003700
Tabetha
pythondev_help_Tabetha_2019-02-05T16:46:58.003700
1,549,385,218.0037
6,729
pythondev
help
Letter like… “Dear &lt;name&gt;, Thank you for blah blah blah.” Print to a printer.
2019-02-05T16:47:26.004300
Kristine
pythondev_help_Kristine_2019-02-05T16:47:26.004300
1,549,385,246.0043
6,730
pythondev
help
Basically, every time someone signs up through us we want to immediately print out a thank you letter to snailmail to them.
2019-02-05T16:48:00.004900
Kristine
pythondev_help_Kristine_2019-02-05T16:48:00.004900
1,549,385,280.0049
6,731
pythondev
help
Then you very likely want to make a pixel-perfect PDF. Though, a simple microsoft word mailmerge would be easy
2019-02-05T16:48:30.005500
Tabetha
pythondev_help_Tabetha_2019-02-05T16:48:30.005500
1,549,385,310.0055
6,732
pythondev
help
Hello, folks! I want to scrape some text of some website it has more than 100000 pages, I was wondering, if I should use scrapy, curl, or wget. All I want is to go around and download all html pages.
2019-02-05T16:48:59.005900
Karen
pythondev_help_Karen_2019-02-05T16:48:59.005900
1,549,385,339.0059
6,733
pythondev
help
I’m not particularly familiar with using Word, but I need to automate this with information as it comes in from an API source. I can get all that working myself, but the point is that I want to be able to do this from python so I can script it.
2019-02-05T16:49:47.007000
Kristine
pythondev_help_Kristine_2019-02-05T16:49:47.007000
1,549,385,387.007
6,734
pythondev
help
xhtml2pdf is something i've used in the past for something similar to this.
2019-02-05T16:50:25.007400
Tabetha
pythondev_help_Tabetha_2019-02-05T16:50:25.007400
1,549,385,425.0074
6,735
pythondev
help
In the Java world, you'd use iText
2019-02-05T16:50:36.007700
Tabetha
pythondev_help_Tabetha_2019-02-05T16:50:36.007700
1,549,385,436.0077
6,736
pythondev
help
I’ll be sure to check out xhtml2pdf, thanks :slightly_smiling_face:
2019-02-05T16:50:53.008000
Kristine
pythondev_help_Kristine_2019-02-05T16:50:53.008000
1,549,385,453.008
6,737
pythondev
help
reportlab is the thing you'll want. Sending that generated PDF to a physical printer is another thing though.
2019-02-05T16:51:28.008500
Tabetha
pythondev_help_Tabetha_2019-02-05T16:51:28.008500
1,549,385,488.0085
6,738
pythondev
help
You could schedule a batch print job at certain times
2019-02-05T16:52:00.009000
Nathanial
pythondev_help_Nathanial_2019-02-05T16:52:00.009000
1,549,385,520.009
6,739
pythondev
help
If it's linux, just subprocess the `lp` call.
2019-02-05T16:52:35.009600
Tabetha
pythondev_help_Tabetha_2019-02-05T16:52:35.009600
1,549,385,555.0096
6,740
pythondev
help
Yeah, I can print things through lp just fine
2019-02-05T16:52:45.010000
Kristine
pythondev_help_Kristine_2019-02-05T16:52:45.010000
1,549,385,565.01
6,741
pythondev
help
I just couldn’t figure out how to get it to print the visual result, I kept getting the raw HTML source
2019-02-05T16:52:58.010400
Kristine
pythondev_help_Kristine_2019-02-05T16:52:58.010400
1,549,385,578.0104
6,742
pythondev
help
reportlab can generate the pdf, `lp` can print it to a physical printer.
2019-02-05T16:53:26.010900
Tabetha
pythondev_help_Tabetha_2019-02-05T16:53:26.010900
1,549,385,606.0109
6,743
pythondev
help
I’ll check out reportlab too then, thanks again.
2019-02-05T16:54:19.011400
Kristine
pythondev_help_Kristine_2019-02-05T16:54:19.011400
1,549,385,659.0114
6,744
pythondev
help
xhtml2pdf uses reportlab, btw.
2019-02-05T16:54:35.012100
Tabetha
pythondev_help_Tabetha_2019-02-05T16:54:35.012100
1,549,385,675.0121
6,745
pythondev
help
aah
2019-02-05T16:54:42.012600
Kristine
pythondev_help_Kristine_2019-02-05T16:54:42.012600
1,549,385,682.0126
6,746
pythondev
help
One other much smaller question, I’m super new to Slack, how do I add syntax highlighting to my `code snippets`?
2019-02-05T16:54:54.013200
Kristine
pythondev_help_Kristine_2019-02-05T16:54:54.013200
1,549,385,694.0132
6,747
pythondev
help
Can someone help me with absolute importing. I can't figure this out.
2019-02-05T16:55:25.014000
Javier
pythondev_help_Javier_2019-02-05T16:55:25.014000
1,549,385,725.014
6,748
pythondev
help
I realize that’s not exactly python specific, but I saw Yongbiao do it earlier so I wanted to make sure I knew how for the future.
2019-02-05T16:55:40.014600
Kristine
pythondev_help_Kristine_2019-02-05T16:55:40.014600
1,549,385,740.0146
6,749
pythondev
help
with the triple backticks, there’s no actual code syntax highlighting
2019-02-05T16:55:45.014800
Hiroko
pythondev_help_Hiroko_2019-02-05T16:55:45.014800
1,549,385,745.0148
6,750
pythondev
help
Three grave marks
2019-02-05T16:55:52.015300
Javier
pythondev_help_Javier_2019-02-05T16:55:52.015300
1,549,385,752.0153
6,751
pythondev
help
```
2019-02-05T16:56:02.015800
Javier
pythondev_help_Javier_2019-02-05T16:56:02.015800
1,549,385,762.0158
6,752
pythondev
help
but you can click Snippet or the big plus next to the text box
2019-02-05T16:56:04.015900
Hiroko
pythondev_help_Hiroko_2019-02-05T16:56:04.015900
1,549,385,764.0159
6,753
pythondev
help
Oh it detects it automatically?
2019-02-05T16:56:05.016000
Kristine
pythondev_help_Kristine_2019-02-05T16:56:05.016000
1,549,385,765.016
6,754
pythondev
help
Yeah just make sure you close with three grave marks
2019-02-05T16:56:42.016900
Javier
pythondev_help_Javier_2019-02-05T16:56:42.016900
1,549,385,802.0169
6,755
pythondev
help
None
2019-02-05T16:56:49.017100
Hiroko
pythondev_help_Hiroko_2019-02-05T16:56:49.017100
1,549,385,809.0171
6,756
pythondev
help
<@Javier> what's your issue with absolute imports?
2019-02-05T16:56:55.017500
Ashley
pythondev_help_Ashley_2019-02-05T16:56:55.017500
1,549,385,815.0175
6,757
pythondev
help
Ohhhh, I see it now, haha, I kept looking to the right of the input box for the + sign. I feel super blind. Anyways, thanks, I’ll be sure to use that.
2019-02-05T16:58:03.020700
Kristine
pythondev_help_Kristine_2019-02-05T16:58:03.020700
1,549,385,883.0207
6,758
pythondev
help
<@Tabetha> you'd think they'd have the ```python thing figured out by now
2019-02-05T16:58:06.020900
Ashley
pythondev_help_Ashley_2019-02-05T16:58:06.020900
1,549,385,886.0209
6,759
pythondev
help
discord can do it, you'd think slack could too
2019-02-05T16:58:59.023400
Tabetha
pythondev_help_Tabetha_2019-02-05T16:58:59.023400
1,549,385,939.0234
6,760
pythondev
help
As a long time discord user, and first time slack user, there’s a lot of things I’m amazed haven’t been “backported”
2019-02-05T16:59:21.024600
Kristine
pythondev_help_Kristine_2019-02-05T16:59:21.024600
1,549,385,961.0246
6,761
pythondev
help
<@Kristine> you've gotten a few other suggestions, based on what you've said here's a bit more: * If you don't absolutely have to have a PDF copy, if you just need to print the letter you generate, you can use `Secretary` to generate documents from ODT templates, and then automate printing with Open Office via `unotool...
2019-02-05T16:59:31.025200
Carmen
pythondev_help_Carmen_2019-02-05T16:59:31.025200
1,549,385,971.0252
6,762
pythondev
help
I'm getting `ImportError: No module named useful_functions.sql_server_functions` My tree is Z:/useful_functions/sql_server_functions My statement is ```from useful_functions.sql_server_functions import create_connection```
2019-02-05T16:59:57.026100
Javier
pythondev_help_Javier_2019-02-05T16:59:57.026100
1,549,385,997.0261
6,763
pythondev
help
Interesting, that might be a simpler solution. I’ll make a note of that.
2019-02-05T17:00:13.026900
Kristine
pythondev_help_Kristine_2019-02-05T17:00:13.026900
1,549,386,013.0269
6,764
pythondev
help
<@Javier> do you have an `__init__.py` file in `Z:/useful_functions/`?
2019-02-05T17:00:38.027900
Ashley
pythondev_help_Ashley_2019-02-05T17:00:38.027900
1,549,386,038.0279
6,765
pythondev
help
show your file structure, <@Javier>
2019-02-05T17:00:38.028000
Hiroko
pythondev_help_Hiroko_2019-02-05T17:00:38.028000
1,549,386,038.028
6,766
pythondev
help
Rendering HTML takes a decent bit of effort, but if you don't *have* to render HTML, if you just need to plug in values and the rest of the formatting can come from the ODT template document, that might be easier.
2019-02-05T17:00:47.028300
Carmen
pythondev_help_Carmen_2019-02-05T17:00:47.028300
1,549,386,047.0283
6,767
pythondev
help
<@Hiroko> I did?
2019-02-05T17:01:10.029100
Javier
pythondev_help_Javier_2019-02-05T17:01:10.029100
1,549,386,070.0291
6,768
pythondev
help
Yeah, as long as the ODT template can have images in it (which from the time I’ve spent in Open/Libre Office I’m sure it can) then that’s a great solution.
2019-02-05T17:01:31.030100
Kristine
pythondev_help_Kristine_2019-02-05T17:01:31.030100
1,549,386,091.0301
6,769
pythondev
help
<@Javier> they mean a screenshot of all the files and folders inside `Z:/useful_functions/`
2019-02-05T17:01:36.030400
Ashley
pythondev_help_Ashley_2019-02-05T17:01:36.030400
1,549,386,096.0304
6,770
pythondev
help
Is the image dynamic, or will it be static?
2019-02-05T17:02:01.032000
Carmen
pythondev_help_Carmen_2019-02-05T17:02:01.032000
1,549,386,121.032
6,771
pythondev
help
I think they mean*
2019-02-05T17:02:04.032300
Ashley
pythondev_help_Ashley_2019-02-05T17:02:04.032300
1,549,386,124.0323
6,772
pythondev
help
<@Ashley> I do it has `name = "useful_functions"` in it
2019-02-05T17:02:06.032400
Javier
pythondev_help_Javier_2019-02-05T17:02:06.032400
1,549,386,126.0324
6,773
pythondev
help
if you dont have an `__init__.py`, that directory is not a package
2019-02-05T17:02:06.032500
Hiroko
pythondev_help_Hiroko_2019-02-05T17:02:06.032500
1,549,386,126.0325
6,774
pythondev
help
directory/folder != package
2019-02-05T17:02:26.033000
Hiroko
pythondev_help_Hiroko_2019-02-05T17:02:26.033000
1,549,386,146.033
6,775
pythondev
help
I do have __init__.py
2019-02-05T17:02:41.033600
Javier
pythondev_help_Javier_2019-02-05T17:02:41.033600
1,549,386,161.0336
6,776
pythondev
help
Static image, it’s going to be a couple of things like company logos.
2019-02-05T17:02:47.033800
Kristine
pythondev_help_Kristine_2019-02-05T17:02:47.033800
1,549,386,167.0338
6,777
pythondev
help
Then you should be perfectly fine.
2019-02-05T17:02:57.034000
Carmen
pythondev_help_Carmen_2019-02-05T17:02:57.034000
1,549,386,177.034
6,778
pythondev
help
:thumbsup:
2019-02-05T17:03:05.034500
Kristine
pythondev_help_Kristine_2019-02-05T17:03:05.034500
1,549,386,185.0345
6,779
pythondev
help
Though I did just check, and secretary does support placeholder images as well. <https://github.com/christopher-ramirez/secretary#image-support>
2019-02-05T17:03:12.034800
Carmen
pythondev_help_Carmen_2019-02-05T17:03:12.034800
1,549,386,192.0348
6,780
pythondev
help
<@Javier> where are you running the script from?
2019-02-05T17:03:13.034900
Ashley
pythondev_help_Ashley_2019-02-05T17:03:13.034900
1,549,386,193.0349
6,781
pythondev
help
I'm just trying to import in a python terminal in vs code.
2019-02-05T17:03:40.035900
Javier
pythondev_help_Javier_2019-02-05T17:03:40.035900
1,549,386,220.0359
6,782
pythondev
help
ah ok
2019-02-05T17:03:51.036100
Ashley
pythondev_help_Ashley_2019-02-05T17:03:51.036100
1,549,386,231.0361
6,783
pythondev
help
yeah, so basically, the python interpreter you're running has no idea where that package is
2019-02-05T17:04:12.036600
Ashley
pythondev_help_Ashley_2019-02-05T17:04:12.036600
1,549,386,252.0366
6,784
pythondev
help
I tried telling it that it was in Z
2019-02-05T17:04:28.037300
Javier
pythondev_help_Javier_2019-02-05T17:04:28.037300
1,549,386,268.0373
6,785
pythondev
help
IIRC, it looks in the site-packages folder associated with that python binary, or in the current working directory
2019-02-05T17:04:40.037600
Ashley
pythondev_help_Ashley_2019-02-05T17:04:40.037600
1,549,386,280.0376
6,786
pythondev
help
Yeah, do I need to add to sys.path before I run?
2019-02-05T17:05:02.038000
Javier
pythondev_help_Javier_2019-02-05T17:05:02.038000
1,549,386,302.038
6,787
pythondev
help
I would just wrap it all in another folder, and then put a setup.py in the parent folder so you can treat it like an installable repo
2019-02-05T17:05:51.039300
Ashley
pythondev_help_Ashley_2019-02-05T17:05:51.039300
1,549,386,351.0393
6,788
pythondev
help
You can edit sys.path, but it would be better to give that hint as you run the application using the environment variable `PYTHONPATH`. Or ever better, install it locally
2019-02-05T17:06:01.039600
Tabetha
pythondev_help_Tabetha_2019-02-05T17:06:01.039600
1,549,386,361.0396
6,789
pythondev
help
you can look up a super simple setuptools setup.py example to copy and paste, and then just run `python setup.py develop` from that directory
2019-02-05T17:06:30.040300
Ashley
pythondev_help_Ashley_2019-02-05T17:06:30.040300
1,549,386,390.0403
6,790
pythondev
help
I don't know what any of that is
2019-02-05T17:07:21.041500
Javier
pythondev_help_Javier_2019-02-05T17:07:21.041500
1,549,386,441.0415
6,791
pythondev
help
that'l tell that python executable where to look for the files (`python setup.py install` will build a copy to put into your site-packages folder, so it won't see the changes you make. `develop` just points to the original files so it sees the changes you make)
2019-02-05T17:07:39.041800
Ashley
pythondev_help_Ashley_2019-02-05T17:07:39.041800
1,549,386,459.0418
6,792
pythondev
help
<@Javier> no worries
2019-02-05T17:08:01.042000
Ashley
pythondev_help_Ashley_2019-02-05T17:08:01.042000
1,549,386,481.042
6,793
pythondev
help
so to recap real quick
2019-02-05T17:08:05.042200
Ashley
pythondev_help_Ashley_2019-02-05T17:08:05.042200
1,549,386,485.0422
6,794
pythondev
help
you can have multiple python executables on a single machine. this is what makes virtual environments feasible
2019-02-05T17:08:34.042800
Ashley
pythondev_help_Ashley_2019-02-05T17:08:34.042800
1,549,386,514.0428
6,795
pythondev
help
every python executable has a location hard-coded into it that points to a specific `site-packages` folder
2019-02-05T17:09:04.043500
Ashley
pythondev_help_Ashley_2019-02-05T17:09:04.043500
1,549,386,544.0435
6,796
pythondev
help
the `site-packages` folder is where a python executable will look to find all the packages that it has "installed"
2019-02-05T17:09:39.044200
Ashley
pythondev_help_Ashley_2019-02-05T17:09:39.044200
1,549,386,579.0442
6,797
pythondev
help
this is what "installing a package" means in the context of python
2019-02-05T17:09:52.044500
Ashley
pythondev_help_Ashley_2019-02-05T17:09:52.044500
1,549,386,592.0445
6,798
pythondev
help
`setuptools` is a tool package meant to make developing installable python packages easier/consistent
2019-02-05T17:10:31.045200
Ashley
pythondev_help_Ashley_2019-02-05T17:10:31.045200
1,549,386,631.0452
6,799
pythondev
help
it does this through a `setup.py` file, which, typically, shouldn't be inside your python package itself. Instead, it usually sits in the folder just above it
2019-02-05T17:11:25.046100
Ashley
pythondev_help_Ashley_2019-02-05T17:11:25.046100
1,549,386,685.0461
6,800
pythondev
help
Okay I think I understand now
2019-02-05T17:12:20.046600
Javier
pythondev_help_Javier_2019-02-05T17:12:20.046600
1,549,386,740.0466
6,801
pythondev
help
for example, here's the repo for pytest <https://github.com/pytest-dev/pytest/>
2019-02-05T17:12:24.046800
Ashley
pythondev_help_Ashley_2019-02-05T17:12:24.046800
1,549,386,744.0468
6,802
pythondev
help
you can see the `setup.py` file in the root, but the package code itself is actually in a deeper folder
2019-02-05T17:13:01.047500
Ashley
pythondev_help_Ashley_2019-02-05T17:13:01.047500
1,549,386,781.0475
6,803
pythondev
help
My phone is dying I'll have to look at that later.
2019-02-05T17:13:29.048500
Javier
pythondev_help_Javier_2019-02-05T17:13:29.048500
1,549,386,809.0485
6,804
pythondev
help
typically, you'd see the first `__init__.py` somewhere like `&lt;root folder&gt;/src/__init__.py`
2019-02-05T17:13:33.048700
Ashley
pythondev_help_Ashley_2019-02-05T17:13:33.048700
1,549,386,813.0487
6,805
pythondev
help
no worries
2019-02-05T17:13:46.048900
Ashley
pythondev_help_Ashley_2019-02-05T17:13:46.048900
1,549,386,826.0489
6,806
pythondev
help
<@Ashley> :taco:
2019-02-05T17:14:00.049400
Javier
pythondev_help_Javier_2019-02-05T17:14:00.049400
1,549,386,840.0494
6,807
pythondev
help
check out setuptools and setup.py tutorials, and they will walk you through. It shouldn't take more than 10 minutes to get you up and running
2019-02-05T17:14:14.049700
Ashley
pythondev_help_Ashley_2019-02-05T17:14:14.049700
1,549,386,854.0497
6,808
pythondev
help
I will do that
2019-02-05T17:14:26.050000
Javier
pythondev_help_Javier_2019-02-05T17:14:26.050000
1,549,386,866.05
6,809
pythondev
help
I've been struggling with absolute paths for a while. It's so simple and I have absolutely no idea why it isn't working
2019-02-05T17:14:58.051200
Javier
pythondev_help_Javier_2019-02-05T17:14:58.051200
1,549,386,898.0512
6,810
pythondev
help
yeah, you have the right idea
2019-02-05T17:15:13.051500
Ashley
pythondev_help_Ashley_2019-02-05T17:15:13.051500
1,549,386,913.0515
6,811
pythondev
help
it's just kinda annoying to tell python where to look
2019-02-05T17:15:25.051900
Ashley
pythondev_help_Ashley_2019-02-05T17:15:25.051900
1,549,386,925.0519
6,812
pythondev
help
unfortunately, you can't tell it where to look directly. instead you have to put files where it's already looking (i.e. `site-packages/`) that point at your code, and setuptools can take care of that for you
2019-02-05T17:16:20.053000
Ashley
pythondev_help_Ashley_2019-02-05T17:16:20.053000
1,549,386,980.053
6,813
pythondev
help
any body can help with threads and state machine
2019-02-05T19:12:26.053800
Micki
pythondev_help_Micki_2019-02-05T19:12:26.053800
1,549,393,946.0538
6,814
pythondev
help
I am building a website for my friends company, it will be my first real site deployed so I'm new to this. It's a basic site and 90% of it can be done with the basic HTML, CSS, JS stack, however it needs a contact form which requires some backend work. I have built some projects in Flask and was wondering if this would...
2019-02-05T19:23:50.056100
Janella
pythondev_help_Janella_2019-02-05T19:23:50.056100
1,549,394,630.0561
6,815
pythondev
help
Anyone have any idea how to turn a `AxesSubplot` into some text representation? My goal is to take someone’s historgram and assert that they did it correctly I’m talking about using `Pandas` and `Matplotlib` specifically
2019-02-05T19:31:25.056900
Cammie
pythondev_help_Cammie_2019-02-05T19:31:25.056900
1,549,395,085.0569
6,816
pythondev
help
Have you tried `repr`?
2019-02-05T19:59:49.057500
Bethany
pythondev_help_Bethany_2019-02-05T19:59:49.057500
1,549,396,789.0575
6,817
pythondev
help
Negative. Will look at that rn
2019-02-05T20:07:09.057800
Cammie
pythondev_help_Cammie_2019-02-05T20:07:09.057800
1,549,397,229.0578
6,818
pythondev
help
<@Janella> Flask should be fine for a project like this. However, I'm not sure you actually need to have a backend for just a form. Is there sensitive data being submitted? If not, you could easily set up a Google Form that feeds into a Google Sheet or just emails you a copy of the data that was submitted.
2019-02-05T20:14:45.059000
Carmen
pythondev_help_Carmen_2019-02-05T20:14:45.059000
1,549,397,685.059
6,819
pythondev
help
As loathe as I am to say this, sometimes Python isn't actually the best tool to use for solving a problem.
2019-02-05T20:15:07.059600
Carmen
pythondev_help_Carmen_2019-02-05T20:15:07.059600
1,549,397,707.0596
6,820