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
Your code is running in the wrong directory. Have a look for an input box called "working directory" inside visual studio code
2019-01-29T16:00:42.149700
Jonas
pythondev_help_Jonas_2019-01-29T16:00:42.149700
1,548,777,642.1497
5,221
pythondev
help
None
2019-01-29T16:00:48.149900
Sylvie
pythondev_help_Sylvie_2019-01-29T16:00:48.149900
1,548,777,648.1499
5,222
pythondev
help
I'm not familiar with that editor so I do not know where it is
2019-01-29T16:01:00.150400
Jonas
pythondev_help_Jonas_2019-01-29T16:01:00.150400
1,548,777,660.1504
5,223
pythondev
help
if you add the print statement like I suggested, we could fix this by making the path relative to that
2019-01-29T16:01:24.150900
Jonas
pythondev_help_Jonas_2019-01-29T16:01:24.150900
1,548,777,684.1509
5,224
pythondev
help
it looks like vs code
2019-01-29T16:01:46.151100
Ashley
pythondev_help_Ashley_2019-01-29T16:01:46.151100
1,548,777,706.1511
5,225
pythondev
help
Right
2019-01-29T16:02:07.151400
Raven
pythondev_help_Raven_2019-01-29T16:02:07.151400
1,548,777,727.1514
5,226
pythondev
help
That error is saying that it's confused about your string used for a path name... it probably has a `\u` in it (e.g. `\users`) and that starts to look like a special Unicode character, to Python
2019-01-29T16:02:39.152300
Raven
pythondev_help_Raven_2019-01-29T16:02:39.152300
1,548,777,759.1523
5,227
pythondev
help
It seems like it looks at the path error and just quits the code.
2019-01-29T16:02:46.152700
Sylvie
pythondev_help_Sylvie_2019-01-29T16:02:46.152700
1,548,777,766.1527
5,228
pythondev
help
Swap the backslashes `\` for forward slashes `/` and try again
2019-01-29T16:02:51.152800
Raven
pythondev_help_Raven_2019-01-29T16:02:51.152800
1,548,777,771.1528
5,229
pythondev
help
Yes, it will stop as soon as it hits the first error.
2019-01-29T16:02:59.153200
Raven
pythondev_help_Raven_2019-01-29T16:02:59.153200
1,548,777,779.1532
5,230
pythondev
help
(There's some other way to get Python to ignore the backslashes, but I forget what it is. Perhaps an `r` prefix. Maybe someone else can comment?)
2019-01-29T16:03:45.153900
Raven
pythondev_help_Raven_2019-01-29T16:03:45.153900
1,548,777,825.1539
5,231
pythondev
help
So switching from \ to / fixed it.
2019-01-29T16:04:18.154200
Sylvie
pythondev_help_Sylvie_2019-01-29T16:04:18.154200
1,548,777,858.1542
5,232
pythondev
help
cool
2019-01-29T16:04:31.154500
Raven
pythondev_help_Raven_2019-01-29T16:04:31.154500
1,548,777,871.1545
5,233
pythondev
help
TY!
2019-01-29T16:04:35.154700
Sylvie
pythondev_help_Sylvie_2019-01-29T16:04:35.154700
1,548,777,875.1547
5,234
pythondev
help
r prefix should do it
2019-01-29T16:04:54.154900
Ashley
pythondev_help_Ashley_2019-01-29T16:04:54.154900
1,548,777,894.1549
5,235
pythondev
help
if i have a class like this ``` class A: @property def foo(self): return 1 ``` can I create an additional method that calls the porpery ? ``` def bar(self): return self.foo + 2 ```
2019-01-29T17:49:10.157100
Roxanne
pythondev_help_Roxanne_2019-01-29T17:49:10.157100
1,548,784,150.1571
5,236
pythondev
help
sure
2019-01-29T17:51:36.157400
Hiroko
pythondev_help_Hiroko_2019-01-29T17:51:36.157400
1,548,784,296.1574
5,237
pythondev
help
```In [1]: class A: ...: @property ...: def foo(self): ...: return 1 ...: def bar(self): ...: return self.foo + 2 ...: In [2]: inst = A() In [3]: inst.foo Out[3]: 1 In [4]: inst.bar() Out[4]: 3 ```
2019-01-29T17:52:20.158100
Hiroko
pythondev_help_Hiroko_2019-01-29T17:52:20.158100
1,548,784,340.1581
5,238
pythondev
help
yep, and to add, `@property` makes foo read only
2019-01-29T17:53:57.159100
Gemma
pythondev_help_Gemma_2019-01-29T17:53:57.159100
1,548,784,437.1591
5,239
pythondev
help
That was the underlying question
2019-01-29T17:54:36.159900
Roxanne
pythondev_help_Roxanne_2019-01-29T17:54:36.159900
1,548,784,476.1599
5,240
pythondev
help
<@Gemma> ty !
2019-01-29T17:54:48.160400
Roxanne
pythondev_help_Roxanne_2019-01-29T17:54:48.160400
1,548,784,488.1604
5,241
pythondev
help
so `A().foo` will work but `A().foo = 2` shouldn't
2019-01-29T17:54:51.160500
Gemma
pythondev_help_Gemma_2019-01-29T17:54:51.160500
1,548,784,491.1605
5,242
pythondev
help
right in the bullseye, thank you !
2019-01-29T17:55:35.160900
Roxanne
pythondev_help_Roxanne_2019-01-29T17:55:35.160900
1,548,784,535.1609
5,243
pythondev
help
wow, in this case foo realy is read only..
2019-01-29T18:12:29.161500
Genesis
pythondev_help_Genesis_2019-01-29T18:12:29.161500
1,548,785,549.1615
5,244
pythondev
help
I was going to mention a dirty dirty hack, but the way this method is written, it truly can not be changed
2019-01-29T18:12:49.162200
Genesis
pythondev_help_Genesis_2019-01-29T18:12:49.162200
1,548,785,569.1622
5,245
pythondev
help
and I've learnt it by the hard way
2019-01-29T18:13:13.162700
Roxanne
pythondev_help_Roxanne_2019-01-29T18:13:13.162700
1,548,785,593.1627
5,246
pythondev
help
but uh... whats the point of foo always being 1?
2019-01-29T18:13:52.163500
Genesis
pythondev_help_Genesis_2019-01-29T18:13:52.163500
1,548,785,632.1635
5,247
pythondev
help
it's actually a dictionary
2019-01-29T18:14:03.163800
Roxanne
pythondev_help_Roxanne_2019-01-29T18:14:03.163800
1,548,785,643.1638
5,248
pythondev
help
self.current_status = new_dict() and KABOOM :bomb:
2019-01-29T18:14:51.164800
Roxanne
pythondev_help_Roxanne_2019-01-29T18:14:51.164800
1,548,785,691.1648
5,249
pythondev
help
`current_status` will be foo, the update is bar
2019-01-29T18:15:27.165200
Roxanne
pythondev_help_Roxanne_2019-01-29T18:15:27.165200
1,548,785,727.1652
5,250
pythondev
help
Be careful, the property might not be assignable but the value will be mutable
2019-01-29T18:18:25.166000
Jonas
pythondev_help_Jonas_2019-01-29T18:18:25.166000
1,548,785,905.166
5,251
pythondev
help
wait, so `a.foo` makes foo get reset?
2019-01-29T18:55:15.166900
Genesis
pythondev_help_Genesis_2019-01-29T18:55:15.166900
1,548,788,115.1669
5,252
pythondev
help
each time `foo` is accessed then the property method will be called again
2019-01-29T19:14:57.167400
Jonas
pythondev_help_Jonas_2019-01-29T19:14:57.167400
1,548,789,297.1674
5,253
pythondev
help
so if foo creates an object (like a dictionary), it will be a new one each time
2019-01-29T19:15:24.168200
Jonas
pythondev_help_Jonas_2019-01-29T19:15:24.168200
1,548,789,324.1682
5,254
pythondev
help
which is a downside of properties, they can hide expensive operations. If `a.foo` creates a large dictionary, people often write
2019-01-29T19:15:58.169200
Jonas
pythondev_help_Jonas_2019-01-29T19:15:58.169200
1,548,789,358.1692
5,255
pythondev
help
interesting
2019-01-29T19:16:17.170300
Genesis
pythondev_help_Genesis_2019-01-29T19:16:17.170300
1,548,789,377.1703
5,256
pythondev
help
`something, something2 = a.foo['x'], a.foo['y']`
2019-01-29T19:16:22.170400
Jonas
pythondev_help_Jonas_2019-01-29T19:16:22.170400
1,548,789,382.1704
5,257
pythondev
help
so you're calling `foo` twice and creating two large dictionaries only to throw them away
2019-01-29T19:16:36.170900
Jonas
pythondev_help_Jonas_2019-01-29T19:16:36.170900
1,548,789,396.1709
5,258
pythondev
help
ya, I would find it very very weird, for me, that `a.foo != a.foo`
2019-01-29T19:16:47.171200
Genesis
pythondev_help_Genesis_2019-01-29T19:16:47.171200
1,548,789,407.1712
5,259
pythondev
help
why make it a property and not just a method?
2019-01-29T19:17:09.171600
Genesis
pythondev_help_Genesis_2019-01-29T19:17:09.171600
1,548,789,429.1716
5,260
pythondev
help
If foo returns the *same* object, then it's true
2019-01-29T19:17:15.171900
Jonas
pythondev_help_Jonas_2019-01-29T19:17:15.171900
1,548,789,435.1719
5,261
pythondev
help
`a.foo is not a.foo`?
2019-01-29T19:17:40.172500
Genesis
pythondev_help_Genesis_2019-01-29T19:17:40.172500
1,548,789,460.1725
5,262
pythondev
help
```@property def foo(self): return self._foo```
2019-01-29T19:17:59.173000
Jonas
pythondev_help_Jonas_2019-01-29T19:17:59.173000
1,548,789,479.173
5,263
pythondev
help
then `a.foo is a.foo`
2019-01-29T19:18:08.173400
Jonas
pythondev_help_Jonas_2019-01-29T19:18:08.173400
1,548,789,488.1734
5,264
pythondev
help
but
2019-01-29T19:18:10.173600
Jonas
pythondev_help_Jonas_2019-01-29T19:18:10.173600
1,548,789,490.1736
5,265
pythondev
help
```@property def foo(self): return {'a': 'b'}```
2019-01-29T19:18:34.174200
Jonas
pythondev_help_Jonas_2019-01-29T19:18:34.174200
1,548,789,514.1742
5,266
pythondev
help
then `a.foo is not a.foo`
2019-01-29T19:18:41.174500
Jonas
pythondev_help_Jonas_2019-01-29T19:18:41.174500
1,548,789,521.1745
5,267
pythondev
help
lots of uses for properties. sometimes the ephemeral nature is useful
2019-01-29T19:19:05.175100
Jonas
pythondev_help_Jonas_2019-01-29T19:19:05.175100
1,548,789,545.1751
5,268
pythondev
help
usually if it's an _expensive_ operation I'd make it a function call
2019-01-29T19:19:30.175500
Jonas
pythondev_help_Jonas_2019-01-29T19:19:30.175500
1,548,789,570.1755
5,269
pythondev
help
or use a caching mechanism
2019-01-29T19:19:35.175700
Jonas
pythondev_help_Jonas_2019-01-29T19:19:35.175700
1,548,789,575.1757
5,270
pythondev
help
i compare a one set layer to a two set layer model: <https://github.com/paulgureghian/Deep_Learning_with_Keras/blob/master/CNNs_MNIST_Keras.ipynb>
2019-01-29T19:27:22.176400
Clayton
pythondev_help_Clayton_2019-01-29T19:27:22.176400
1,548,790,042.1764
5,271
pythondev
help
<@Jonas> but if its truly ephemeral, why even use a property? That isn't what I would expect as a consumer of your api
2019-01-29T19:31:58.177000
Genesis
pythondev_help_Genesis_2019-01-29T19:31:58.177000
1,548,790,318.177
5,272
pythondev
help
aiohttp uses a property on a request object, `request.config`
2019-01-29T19:34:36.177500
Jonas
pythondev_help_Jonas_2019-01-29T19:34:36.177500
1,548,790,476.1775
5,273
pythondev
help
this is a dictionary made from various different configurations, merged together
2019-01-29T19:34:50.177900
Jonas
pythondev_help_Jonas_2019-01-29T19:34:50.177900
1,548,790,490.1779
5,274
pythondev
help
you kind of want this to be ephemeral
2019-01-29T19:36:09.178300
Jonas
pythondev_help_Jonas_2019-01-29T19:36:09.178300
1,548,790,569.1783
5,275
pythondev
help
In Python 3.7 they made "await" and "async" reserved keywords, so they can't be used as variable names anymore. Tweepy hasn't updated their docs
2019-01-29T20:52:47.178500
Conchita
pythondev_help_Conchita_2019-01-29T20:52:47.178500
1,548,795,167.1785
5,276
pythondev
help
In Python 3.7 they made "await" and "async" reserved keywords, so they can't be used as variable names anymore. Tweepy hasn't updated their docs
2019-01-29T20:52:57.178700
Conchita
pythondev_help_Conchita_2019-01-29T20:52:57.178700
1,548,795,177.1787
5,277
pythondev
help
This is the approach I switched to last night based on this slack convo. Prior to that I *thought* I had planned for every specific exception but naah hehe
2019-01-29T20:54:39.178900
Conchita
pythondev_help_Conchita_2019-01-29T20:54:39.178900
1,548,795,279.1789
5,278
pythondev
help
This tool will also be used for low-traffic keywords in short timeframes (each minute) so receiving zero value entries will be a common occurrence. What could be done is catching deviations maybe? Or track the time since the data changed value? Ie If value suddenly stays static for 5 iterations/minutes, #do something ?
2019-01-29T21:00:39.179200
Conchita
pythondev_help_Conchita_2019-01-29T21:00:39.179200
1,548,795,639.1792
5,279
pythondev
help
But to me, that sounds like treating the symptoms instead of dealing with the root of the issue, no?
2019-01-29T21:01:44.179400
Conchita
pythondev_help_Conchita_2019-01-29T21:01:44.179400
1,548,795,704.1794
5,280
pythondev
help
Sorry, had a power cut in my area and fell asleep while waiting for it to return :slightly_smiling_face: What you write here with the asynchronous stuff, some of it partly make sense but my lack of understanding of async makes it fall through. Don't have the tree trunk to connect the branches and leaves on
2019-01-29T21:06:17.179600
Conchita
pythondev_help_Conchita_2019-01-29T21:06:17.179600
1,548,795,977.1796
5,281
pythondev
help
What do you recommend me to do to figure this out? Should I read upon `async` and if so any specifics OR is that a rathole better avoided for a beginner like me (you hinted to this last night) Anyway I could do to run some tests to pinpoint the issue?
2019-01-29T21:10:53.179900
Conchita
pythondev_help_Conchita_2019-01-29T21:10:53.179900
1,548,796,253.1799
5,282
pythondev
help
Saw this one on reddit
2019-01-29T21:25:17.180400
Conchita
pythondev_help_Conchita_2019-01-29T21:25:17.180400
1,548,797,117.1804
5,283
pythondev
help
<http://themlbook.com>
2019-01-29T21:25:20.180500
Conchita
pythondev_help_Conchita_2019-01-29T21:25:20.180500
1,548,797,120.1805
5,284
pythondev
help
Got a lot of praise, thought it could be interesting
2019-01-29T21:25:37.181200
Conchita
pythondev_help_Conchita_2019-01-29T21:25:37.181200
1,548,797,137.1812
5,285
pythondev
help
Can anyone direct me to a decent guide/tutorial on how to deploy multiple python apps on one digital ocean VPS? I currently have a django app running on a VPS with nginx and gunicorn. Now how can I deploy a flask app on the same server? Please and thank you.
2019-01-29T21:52:08.182600
Refugio
pythondev_help_Refugio_2019-01-29T21:52:08.182600
1,548,798,728.1826
5,286
pythondev
help
Kinda.
2019-01-29T22:01:19.182700
Valeri
pythondev_help_Valeri_2019-01-29T22:01:19.182700
1,548,799,279.1827
5,287
pythondev
help
Data integrity is a huge concern when it comes to writing stuff to your database <@Conchita>
2019-01-29T22:01:59.182900
Valeri
pythondev_help_Valeri_2019-01-29T22:01:59.182900
1,548,799,319.1829
5,288
pythondev
help
Which is why I was recommending this
2019-01-29T22:02:29.183100
Valeri
pythondev_help_Valeri_2019-01-29T22:02:29.183100
1,548,799,349.1831
5,289
pythondev
help
Hehe
2019-01-29T22:04:02.183300
Valeri
pythondev_help_Valeri_2019-01-29T22:04:02.183300
1,548,799,442.1833
5,290
pythondev
help
Did you manage to resolve this?
2019-01-29T22:04:18.183500
Valeri
pythondev_help_Valeri_2019-01-29T22:04:18.183500
1,548,799,458.1835
5,291
pythondev
help
<https://superuser.com/questions/648576/nginx-how-to-publish-multiple-python-web-apps-using-virtual-directories-and-ac>
2019-01-29T22:30:50.183800
Hiroko
pythondev_help_Hiroko_2019-01-29T22:30:50.183800
1,548,801,050.1838
5,292
pythondev
help
basically, have distinct `location` blocks with unique urls to go to the gunicorn instance
2019-01-29T22:31:21.184500
Hiroko
pythondev_help_Hiroko_2019-01-29T22:31:21.184500
1,548,801,081.1845
5,293
pythondev
help
example above uses uwsgi, but you should be able to adapt to gunicorn easily
2019-01-29T22:31:38.185100
Hiroko
pythondev_help_Hiroko_2019-01-29T22:31:38.185100
1,548,801,098.1851
5,294
pythondev
help
Thank you
2019-01-29T23:27:35.185400
Refugio
pythondev_help_Refugio_2019-01-29T23:27:35.185400
1,548,804,455.1854
5,295
pythondev
help
Hello, can someone please assist me in setting up my slack development. I was looking forward to learn more on this platform but so far, I have no idea how to about getting what I want and gaining more insightive knowledge
2019-01-29T23:30:36.187500
Beverley
pythondev_help_Beverley_2019-01-29T23:30:36.187500
1,548,804,636.1875
5,296
pythondev
help
What do you mean by slack development?
2019-01-29T23:35:04.188100
Hiroko
pythondev_help_Hiroko_2019-01-29T23:35:04.188100
1,548,804,904.1881
5,297
pythondev
help
I see. Would it be possible to take the time from when global variables were last updated?
2019-01-29T23:45:03.188200
Conchita
pythondev_help_Conchita_2019-01-29T23:45:03.188200
1,548,805,503.1882
5,298
pythondev
help
You can add the timestamp to your log everytime they are initialized
2019-01-30T00:45:05.188700
Valeri
pythondev_help_Valeri_2019-01-30T00:45:05.188700
1,548,809,105.1887
5,299
pythondev
help
Or you can log the time when they were updated. For this you can compare their previous values to the current values and log the time if their is an actual change
2019-01-30T00:46:00.188900
Valeri
pythondev_help_Valeri_2019-01-30T00:46:00.188900
1,548,809,160.1889
5,300
pythondev
help
Did I make sense there?
2019-01-30T01:44:24.189500
Valeri
pythondev_help_Valeri_2019-01-30T01:44:24.189500
1,548,812,664.1895
5,301
pythondev
help
Hi friends..
2019-01-30T01:57:10.190300
Riva
pythondev_help_Riva_2019-01-30T01:57:10.190300
1,548,813,430.1903
5,302
pythondev
help
Do you have any idea to create windows Application to select list of pdf files and display all files on application.
2019-01-30T01:58:37.191700
Riva
pythondev_help_Riva_2019-01-30T01:58:37.191700
1,548,813,517.1917
5,303
pythondev
help
Is there any particular reason you want to build this? There are a zillion PDF readers for Windows.
2019-01-30T02:03:20.192200
Sasha
pythondev_help_Sasha_2019-01-30T02:03:20.192200
1,548,813,800.1922
5,304
pythondev
help
I dont know my manager gave this task to develop that application
2019-01-30T02:10:49.192800
Riva
pythondev_help_Riva_2019-01-30T02:10:49.192800
1,548,814,249.1928
5,305
pythondev
help
Great! Install Acrobat and tell him you made it. :wink:
2019-01-30T02:12:05.194300
Sasha
pythondev_help_Sasha_2019-01-30T02:12:05.194300
1,548,814,325.1943
5,306
pythondev
help
actually if one pdf contain 100 above pages then by using we can select particular pages and make it into another pdf are give to print option
2019-01-30T02:12:28.194600
Riva
pythondev_help_Riva_2019-01-30T02:12:28.194600
1,548,814,348.1946
5,307
pythondev
help
Nice joke
2019-01-30T02:12:45.195000
Riva
pythondev_help_Riva_2019-01-30T02:12:45.195000
1,548,814,365.195
5,308
pythondev
help
<@Riva> So you just want to combine all the PDFs into a single PDF for display and possible printing?
2019-01-30T02:19:23.195400
Carmen
pythondev_help_Carmen_2019-01-30T02:19:23.195400
1,548,814,763.1954
5,309
pythondev
help
yes
2019-01-30T02:21:47.196000
Riva
pythondev_help_Riva_2019-01-30T02:21:47.196000
1,548,814,907.196
5,310
pythondev
help
With page selection options, it looks like.
2019-01-30T02:21:53.196300
Carmen
pythondev_help_Carmen_2019-01-30T02:21:53.196300
1,548,814,913.1963
5,311
pythondev
help
In windows application
2019-01-30T02:21:58.196500
Riva
pythondev_help_Riva_2019-01-30T02:21:58.196500
1,548,814,918.1965
5,312
pythondev
help
Look at the PyPDF2 library.
2019-01-30T02:23:27.197900
Carmen
pythondev_help_Carmen_2019-01-30T02:23:27.197900
1,548,815,007.1979
5,313
pythondev
help
<https://stackoverflow.com/a/17304537>
2019-01-30T02:23:28.198100
Carmen
pythondev_help_Carmen_2019-01-30T02:23:28.198100
1,548,815,008.1981
5,314
pythondev
help
<@Conchita> Im at chapter two, so far it seem alright but i have no comparison to any other ML book. Only started reading it because its short and i can try stuff out on python.
2019-01-30T02:23:46.198800
Leida
pythondev_help_Leida_2019-01-30T02:23:46.198800
1,548,815,026.1988
5,315
pythondev
help
For your page selection portion, however, you'll probably need to break out into the actual PDFReader and PDFWriter classes, displaying which pages in which PDF should or shouldn't be included in the final PDF and acting accordingly.
2019-01-30T02:24:46.199800
Carmen
pythondev_help_Carmen_2019-01-30T02:24:46.199800
1,548,815,086.1998
5,316
pythondev
help
Actually this entire process has to be develop in windows application using GUI
2019-01-30T02:25:38.201100
Riva
pythondev_help_Riva_2019-01-30T02:25:38.201100
1,548,815,138.2011
5,317
pythondev
help
You're still going to need something underneath the GUI to do the PDF merging.
2019-01-30T02:27:48.203800
Carmen
pythondev_help_Carmen_2019-01-30T02:27:48.203800
1,548,815,268.2038
5,318
pythondev
help
yeah but i didn't get any solution to develop
2019-01-30T02:28:38.204900
Riva
pythondev_help_Riva_2019-01-30T02:28:38.204900
1,548,815,318.2049
5,319
pythondev
help
<https://docs.python.org/3/faq/gui.html> Pick one that works for Windows and use it to build your GUI according to whatever specs you have.
2019-01-30T02:29:01.206200
Carmen
pythondev_help_Carmen_2019-01-30T02:29:01.206200
1,548,815,341.2062
5,320