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
but when I use string formatting (new format with {} {} {} etc.)
2018-01-31T15:47:50.000156
Concha
pythondev_help_Concha_2018-01-31T15:47:50.000156
1,517,413,670.000156
32,324
pythondev
help
I don't know how to find a way to not change it for every single line
2018-01-31T15:48:06.000294
Concha
pythondev_help_Concha_2018-01-31T15:48:06.000294
1,517,413,686.000294
32,325
pythondev
help
Here's something: ``` >>> s = 'STRING' >>> '{:<10}'.format(s) 'STRING ' >>> '{:^10}'.format(s) ' STRING ' >>> '{:>10}'.format(s) ' STRING' ```
2018-01-31T15:48:14.000082
Barney
pythondev_help_Barney_2018-01-31T15:48:14.000082
1,517,413,694.000082
32,326
pythondev
help
so left justify, center, and right justify
2018-01-31T15:49:00.000495
Concha
pythondev_help_Concha_2018-01-31T15:49:00.000495
1,517,413,740.000495
32,327
pythondev
help
you know, I'm not formatting the first part
2018-01-31T15:49:07.000122
Concha
pythondev_help_Concha_2018-01-31T15:49:07.000122
1,517,413,747.000122
32,328
pythondev
help
I just have print('thing printed: {}{}'.format(Output, STATE)
2018-01-31T15:49:54.000199
Concha
pythondev_help_Concha_2018-01-31T15:49:54.000199
1,517,413,794.000199
32,329
pythondev
help
and trying different numbers in the two {} {}
2018-01-31T15:50:10.000518
Concha
pythondev_help_Concha_2018-01-31T15:50:10.000518
1,517,413,810.000518
32,330
pythondev
help
:thinking_face:
2018-01-31T15:52:41.000094
Barney
pythondev_help_Barney_2018-01-31T15:52:41.000094
1,517,413,961.000094
32,331
pythondev
help
for what reason
2018-01-31T15:52:56.000335
Floy
pythondev_help_Floy_2018-01-31T15:52:56.000335
1,517,413,976.000335
32,332
pythondev
help
usually, justification and formatting is based on the dimensions of the destination container
2018-01-31T15:53:17.000159
Floy
pythondev_help_Floy_2018-01-31T15:53:17.000159
1,517,413,997.000159
32,333
pythondev
help
so if you can’t specify a width for that, then how can you expect to implement the extra padding needed in the justification algorithm?
2018-01-31T15:53:52.000756
Floy
pythondev_help_Floy_2018-01-31T15:53:52.000756
1,517,414,032.000756
32,334
pythondev
help
<https://blogs.technet.microsoft.com/galstertechblog/2016/03/10/text-justification-problem/>
2018-01-31T15:55:00.000722
Floy
pythondev_help_Floy_2018-01-31T15:55:00.000722
1,517,414,100.000722
32,335
pythondev
help
You might not need to justify yourself
2018-01-31T15:56:20.000876
Micki
pythondev_help_Micki_2018-01-31T15:56:20.000876
1,517,414,180.000876
32,336
pythondev
help
if it's for a file or console output there are library to show pretty tables
2018-01-31T15:56:38.000070
Micki
pythondev_help_Micki_2018-01-31T15:56:38.000070
1,517,414,198.00007
32,337
pythondev
help
tabulate :p
2018-01-31T15:57:23.000125
Barney
pythondev_help_Barney_2018-01-31T15:57:23.000125
1,517,414,243.000125
32,338
pythondev
help
this looks more recent <https://github.com/Robpol86/terminaltables>
2018-01-31T15:58:06.000995
Micki
pythondev_help_Micki_2018-01-31T15:58:06.000995
1,517,414,286.000995
32,339
pythondev
help
but yeah same concept
2018-01-31T15:58:10.000353
Micki
pythondev_help_Micki_2018-01-31T15:58:10.000353
1,517,414,290.000353
32,340
pythondev
help
will that work if I'm printing something line by line?
2018-01-31T15:59:40.000631
Concha
pythondev_help_Concha_2018-01-31T15:59:40.000631
1,517,414,380.000631
32,341
pythondev
help
whoa, that’s basically a clone of a buddy of mine from high school that i skateboarded with.
2018-01-31T16:00:03.000196
Davina
pythondev_help_Davina_2018-01-31T16:00:03.000196
1,517,414,403.000196
32,342
pythondev
help
gonna have to remind him he’s not the only person that looks like himself. haha
2018-01-31T16:00:18.000713
Davina
pythondev_help_Davina_2018-01-31T16:00:18.000713
1,517,414,418.000713
32,343
pythondev
help
I don't think it will
2018-01-31T16:03:03.000501
Micki
pythondev_help_Micki_2018-01-31T16:03:03.000501
1,517,414,583.000501
32,344
pythondev
help
but it's kinda hard to justify something if you don't have the full output
2018-01-31T16:03:15.000004
Micki
pythondev_help_Micki_2018-01-31T16:03:15.000004
1,517,414,595.000004
32,345
pythondev
help
Just readability. the output is technically correct but hard to read
2018-01-31T16:05:29.000408
Concha
pythondev_help_Concha_2018-01-31T16:05:29.000408
1,517,414,729.000408
32,346
pythondev
help
I just found this slack Channel and I am about to to head home now. But I'll check in tomorrow and thank you very much all.
2018-01-31T16:10:18.000413
Concha
pythondev_help_Concha_2018-01-31T16:10:18.000413
1,517,415,018.000413
32,347
pythondev
help
i have a Doppelgänger that's also involved in many of the conferences and communities that i am
2018-01-31T16:26:53.000317
Garrett
pythondev_help_Garrett_2018-01-31T16:26:53.000317
1,517,416,013.000317
32,348
pythondev
help
it's handy if anyone ever comes to assassinate me
2018-01-31T16:26:59.000098
Garrett
pythondev_help_Garrett_2018-01-31T16:26:59.000098
1,517,416,019.000098
32,349
pythondev
help
Why would upgrading an app's dependencies sometimes break the app? Aren't upgrades backward-compatible?
2018-01-31T17:46:06.000097
Rena
pythondev_help_Rena_2018-01-31T17:46:06.000097
1,517,420,766.000097
32,350
pythondev
help
no
2018-01-31T17:47:01.000563
Garrett
pythondev_help_Garrett_2018-01-31T17:47:01.000563
1,517,420,821.000563
32,351
pythondev
help
you can't guarantee that
2018-01-31T17:47:09.000275
Garrett
pythondev_help_Garrett_2018-01-31T17:47:09.000275
1,517,420,829.000275
32,352
pythondev
help
Why would the package's author not test his own stuff?
2018-01-31T17:51:07.000037
Rena
pythondev_help_Rena_2018-01-31T17:51:07.000037
1,517,421,067.000037
32,353
pythondev
help
are you sure?
2018-01-31T17:51:16.000475
Floy
pythondev_help_Floy_2018-01-31T17:51:16.000475
1,517,421,076.000475
32,354
pythondev
help
most packages will list the versions they’re compatible with
2018-01-31T17:51:32.000087
Floy
pythondev_help_Floy_2018-01-31T17:51:32.000087
1,517,421,092.000087
32,355
pythondev
help
eg, python 3.4, 3.5, 3.6 but if you run on 3.3, you’re out of luck
2018-01-31T17:51:53.000281
Floy
pythondev_help_Floy_2018-01-31T17:51:53.000281
1,517,421,113.000281
32,356
pythondev
help
a package author testing their product, and that product being backwards compatible, are not related
2018-01-31T17:52:05.000103
Garrett
pythondev_help_Garrett_2018-01-31T17:52:05.000103
1,517,421,125.000103
32,357
pythondev
help
:point_up:
2018-01-31T17:52:20.000177
Floy
pythondev_help_Floy_2018-01-31T17:52:20.000177
1,517,421,140.000177
32,358
pythondev
help
Then I had a wrong understanding of what testing means. I understood testing to mean that previous functionality is not compromised by the new code that written?
2018-01-31T17:53:57.000324
Rena
pythondev_help_Rena_2018-01-31T17:53:57.000324
1,517,421,237.000324
32,359
pythondev
help
You should alway read the release notes for breaking changes
2018-01-31T17:54:22.000499
Jama
pythondev_help_Jama_2018-01-31T17:54:22.000499
1,517,421,262.000499
32,360
pythondev
help
Testing just checks to be sure that the code works as expected
2018-01-31T17:54:50.000255
Garrett
pythondev_help_Garrett_2018-01-31T17:54:50.000255
1,517,421,290.000255
32,361
pythondev
help
I think I phrased my question a bit unclear. I meant backwards compatible with previous versions of THAT package.
2018-01-31T17:55:12.000162
Rena
pythondev_help_Rena_2018-01-31T17:55:12.000162
1,517,421,312.000162
32,362
pythondev
help
But if I gave you `class Doohickey:` in v1, and then deleted `class Doohickey:` in v2, your code that relies on my class is going to break
2018-01-31T17:55:14.000454
Garrett
pythondev_help_Garrett_2018-01-31T17:55:14.000454
1,517,421,314.000454
32,363
pythondev
help
sometimes breaking changes are necessary
2018-01-31T17:55:20.000149
Micki
pythondev_help_Micki_2018-01-31T17:55:20.000149
1,517,421,320.000149
32,364
pythondev
help
whether or not any given version is backwards compatible or not is up to that version and/or the author
2018-01-31T17:55:53.000636
Garrett
pythondev_help_Garrett_2018-01-31T17:55:53.000636
1,517,421,353.000636
32,365
pythondev
help
Can you give an example of why an author would choose to break previous functionality, so I can picture it more clearly.
2018-01-31T17:57:13.000604
Rena
pythondev_help_Rena_2018-01-31T17:57:13.000604
1,517,421,433.000604
32,366
pythondev
help
Let’s say a new database comes out and you write a lib to connect to it using hostname, user, and password
2018-01-31T17:57:22.000276
Jama
pythondev_help_Jama_2018-01-31T17:57:22.000276
1,517,421,442.000276
32,367
pythondev
help
sure. `print()` should be a function as it's a thing that takes multiple arguments. so python 3 changing `print` from a statement to function is a backwards-incompatible change
2018-01-31T17:58:03.000135
Garrett
pythondev_help_Garrett_2018-01-31T17:58:03.000135
1,517,421,483.000135
32,368
pythondev
help
then they update it so that it can be run as a cluster so you need to provide the addresses of all the servers not just one host name
2018-01-31T17:58:14.000520
Jama
pythondev_help_Jama_2018-01-31T17:58:14.000520
1,517,421,494.00052
32,369
pythondev
help
now your `connect` method signature might change between versions
2018-01-31T17:58:30.000634
Jama
pythondev_help_Jama_2018-01-31T17:58:30.000634
1,517,421,510.000634
32,370
pythondev
help
Ah. Much clearer now. Tx guys!
2018-01-31T17:59:27.000460
Rena
pythondev_help_Rena_2018-01-31T17:59:27.000460
1,517,421,567.00046
32,371
pythondev
help
Hello, can I have some help with an error loading the pysc2 module?
2018-01-31T18:17:03.000342
Rico
pythondev_help_Rico_2018-01-31T18:17:03.000342
1,517,422,623.000342
32,372
pythondev
help
I got the environment set up in Pycharm, and was able to get tensorflow, and baselines. However I get an error with the pysc2... this is odd as this part did work earlier. here is what I get. ``` Collecting PySC2 ... warning: build_py: byte-compiling is disabled, skipping. ```running build_ext building 'pygame.scrap...
2018-01-31T18:17:31.000316
Rico
pythondev_help_Rico_2018-01-31T18:17:31.000316
1,517,422,651.000316
32,373
pythondev
help
When you start a new project, pycharm gives the option to create a virtualenv right there.
2018-01-31T18:44:02.000049
Rena
pythondev_help_Rena_2018-01-31T18:44:02.000049
1,517,424,242.000049
32,374
pythondev
help
Yea, I did manage to get it setup, I had to do `brew install SDL`
2018-01-31T19:01:12.000517
Rico
pythondev_help_Rico_2018-01-31T19:01:12.000517
1,517,425,272.000517
32,375
pythondev
help
however I have a different error now with the pysc2 mod
2018-01-31T19:01:52.000188
Rico
pythondev_help_Rico_2018-01-31T19:01:52.000188
1,517,425,312.000188
32,376
pythondev
help
Not sure if this is the correct place to post this, but I have just inherited a very large Python 2.5 codebase and I am wondering if anyone here has had experience migrating from 2.5 to 3.0. I’m aware largely of the complications of 2.6/2.7 to 3.0 but it seems difficult to find information on the differences between 2....
2018-01-31T21:33:31.000073
Emmitt
pythondev_help_Emmitt_2018-01-31T21:33:31.000073
1,517,434,411.000073
32,377
pythondev
help
I think you may need to check the 2.5 -&gt; 2.6 changes, 2.6-&gt;2.7 changes, then jump to 3 (<https://docs.python.org/2/whatsnew/index.html>)
2018-01-31T21:35:50.000167
Rafael
pythondev_help_Rafael_2018-01-31T21:35:50.000167
1,517,434,550.000167
32,378
pythondev
help
Do you have many tests to help you in the process?
2018-01-31T21:36:07.000175
Rafael
pythondev_help_Rafael_2018-01-31T21:36:07.000175
1,517,434,567.000175
32,379
pythondev
help
That link provides the various "What's New In Python X" links that should help you get a good overview of the incremental shifts
2018-01-31T21:36:46.000320
Rafael
pythondev_help_Rafael_2018-01-31T21:36:46.000320
1,517,434,606.00032
32,380
pythondev
help
<@Emmitt> Well, if your project has test (I doubt it though) you can just switch the version, run them and check where it'll break
2018-01-31T21:43:41.000073
Sadye
pythondev_help_Sadye_2018-01-31T21:43:41.000073
1,517,435,021.000073
32,381
pythondev
help
If you don't have tests at all, there are linters wich can show incompatible code
2018-01-31T21:45:42.000126
Sadye
pythondev_help_Sadye_2018-01-31T21:45:42.000126
1,517,435,142.000126
32,382
pythondev
help
Linting is a good idea
2018-01-31T21:51:15.000205
Rafael
pythondev_help_Rafael_2018-01-31T21:51:15.000205
1,517,435,475.000205
32,383
pythondev
help
There are no tests
2018-01-31T21:51:16.000051
Emmitt
pythondev_help_Emmitt_2018-01-31T21:51:16.000051
1,517,435,476.000051
32,384
pythondev
help
Okay, there are a few for certain utility functions but so few that it’s practically useless
2018-01-31T21:51:46.000311
Emmitt
pythondev_help_Emmitt_2018-01-31T21:51:46.000311
1,517,435,506.000311
32,385
pythondev
help
This is finance application btw. Testing is typically update, have people run various payouts/runs in testing and ensure that figures match what comparison spreadsheets would show for same figures
2018-01-31T21:52:29.000206
Emmitt
pythondev_help_Emmitt_2018-01-31T21:52:29.000206
1,517,435,549.000206
32,386
pythondev
help
<@Emmitt> I migrated a 2.6 codebase to 2.7 (django 1.2 to 1.8), and fortunately didn’t run into many issues
2018-01-31T21:58:46.000022
Floy
pythondev_help_Floy_2018-01-31T21:58:46.000022
1,517,435,926.000022
32,387
pythondev
help
but the main pain point will be finding alternatives to the libs and dependencies you’re using
2018-01-31T21:59:10.000272
Floy
pythondev_help_Floy_2018-01-31T21:59:10.000272
1,517,435,950.000272
32,388
pythondev
help
whether or not they’ve been updated
2018-01-31T21:59:19.000175
Floy
pythondev_help_Floy_2018-01-31T21:59:19.000175
1,517,435,959.000175
32,389
pythondev
help
in my case, all libs that were required after careful culling of requirements.txt were under development and had recent versions deployed
2018-01-31T22:00:26.000101
Floy
pythondev_help_Floy_2018-01-31T22:00:26.000101
1,517,436,026.000101
32,390
pythondev
help
BTW, this is 500K LOC
2018-01-31T22:00:42.000047
Emmitt
pythondev_help_Emmitt_2018-01-31T22:00:42.000047
1,517,436,042.000047
32,391
pythondev
help
ouch
2018-01-31T22:00:48.000155
Floy
pythondev_help_Floy_2018-01-31T22:00:48.000155
1,517,436,048.000155
32,392
pythondev
help
good luck, that’s all I have to say.
2018-01-31T22:00:56.000115
Floy
pythondev_help_Floy_2018-01-31T22:00:56.000115
1,517,436,056.000115
32,393
pythondev
help
Also a very good insight, that libs may expose a lot more risk than actual python codebase.
2018-01-31T22:01:00.000280
Rafael
pythondev_help_Rafael_2018-01-31T22:01:00.000280
1,517,436,060.00028
32,394
pythondev
help
lemme guess, a full rewrite isn’t an option?
2018-01-31T22:01:29.000031
Floy
pythondev_help_Floy_2018-01-31T22:01:29.000031
1,517,436,089.000031
32,395
pythondev
help
Yes, I have concerns about a lot of the libraries that the project uses (PIL, various XML libraries specifically)
2018-01-31T22:01:31.000142
Emmitt
pythondev_help_Emmitt_2018-01-31T22:01:31.000142
1,517,436,091.000142
32,396
pythondev
help
One guy, one day a week :wink:
2018-01-31T22:01:41.000055
Emmitt
pythondev_help_Emmitt_2018-01-31T22:01:41.000055
1,517,436,101.000055
32,397
pythondev
help
walk away?
2018-01-31T22:01:54.000034
Floy
pythondev_help_Floy_2018-01-31T22:01:54.000034
1,517,436,114.000034
32,398
pythondev
help
So what's the driver to update? Could you, on that 1 day, handle a section and run it independently, or is this pretty intertwined?
2018-01-31T22:02:19.000252
Rafael
pythondev_help_Rafael_2018-01-31T22:02:19.000252
1,517,436,139.000252
32,399
pythondev
help
with a project like that, you definitely need support, its not a half weekend kind of thing
2018-01-31T22:02:21.000107
Floy
pythondev_help_Floy_2018-01-31T22:02:21.000107
1,517,436,141.000107
32,400
pythondev
help
Primarily future proofing so that we can migrate to an environment that doesn’t rely on specific versions of ancient libaries
2018-01-31T22:03:01.000175
Emmitt
pythondev_help_Emmitt_2018-01-31T22:03:01.000175
1,517,436,181.000175
32,401
pythondev
help
Oh, it runs on Windows too :stuck_out_tongue:
2018-01-31T22:03:09.000325
Emmitt
pythondev_help_Emmitt_2018-01-31T22:03:09.000325
1,517,436,189.000325
32,402
pythondev
help
jeez, you really hit the jackpot in crappy inheritance!
2018-01-31T22:03:32.000080
Floy
pythondev_help_Floy_2018-01-31T22:03:32.000080
1,517,436,212.00008
32,403
pythondev
help
one guy on this project for only one day a week?
2018-01-31T22:04:13.000173
Floy
pythondev_help_Floy_2018-01-31T22:04:13.000173
1,517,436,253.000173
32,404
pythondev
help
honestly, that’s not worth it.
2018-01-31T22:04:22.000045
Floy
pythondev_help_Floy_2018-01-31T22:04:22.000045
1,517,436,262.000045
32,405
pythondev
help
tbh, I wouldn’t even try under those conditions
2018-01-31T22:04:41.000332
Floy
pythondev_help_Floy_2018-01-31T22:04:41.000332
1,517,436,281.000332
32,406
pythondev
help
That's kind of my thought with trying to break off pieces at a time to mitigate the risk (and probably remove a lot of code). Of course we don't know the background or dependencies
2018-01-31T22:06:05.000294
Rafael
pythondev_help_Rafael_2018-01-31T22:06:05.000294
1,517,436,365.000294
32,407
pythondev
help
Otherwise, I think all you have is the gotchas in those 2.5 -&gt; 2.6, 2.6 -&gt; 2.7, 2.7 -&gt; 3.x lists
2018-01-31T22:10:50.000083
Rafael
pythondev_help_Rafael_2018-01-31T22:10:50.000083
1,517,436,650.000083
32,408
pythondev
help
our current focus will be on maintenance, but it would be nice to be able to bring it up to date at some point
2018-01-31T22:39:17.000092
Emmitt
pythondev_help_Emmitt_2018-01-31T22:39:17.000092
1,517,438,357.000092
32,409
pythondev
help
I think at this stage we will do the maintenance thing and push for a rewrite project
2018-01-31T22:39:27.000108
Emmitt
pythondev_help_Emmitt_2018-01-31T22:39:27.000108
1,517,438,367.000108
32,410
pythondev
help
Hi all - I could use some help wrapping my head around imports
2018-02-01T00:57:39.000001
Lesia
pythondev_help_Lesia_2018-02-01T00:57:39.000001
1,517,446,659.000001
32,411
pythondev
help
I am trying to understand the best practice for importing modules from different locations within a main module.
2018-02-01T00:58:20.000037
Lesia
pythondev_help_Lesia_2018-02-01T00:58:20.000037
1,517,446,700.000037
32,412
pythondev
help
I am currently receiving an importError when trying to import from the directory above.
2018-02-01T00:58:46.000018
Lesia
pythondev_help_Lesia_2018-02-01T00:58:46.000018
1,517,446,726.000018
32,413
pythondev
help
Is there a best practice I should be following?
2018-02-01T00:58:58.000158
Lesia
pythondev_help_Lesia_2018-02-01T00:58:58.000158
1,517,446,738.000158
32,414
pythondev
help
<@Lesia> is the package above part of the installed package? If not, simply don’t and use absolute imports
2018-02-01T01:15:26.000168
Rafael
pythondev_help_Rafael_2018-02-01T01:15:26.000168
1,517,447,726.000168
32,415
pythondev
help
It is not part of a package, just my own directories
2018-02-01T01:32:39.000123
Lesia
pythondev_help_Lesia_2018-02-01T01:32:39.000123
1,517,448,759.000123
32,416
pythondev
help
Are absolute imports a risk when it comes to deployment?
2018-02-01T01:32:53.000157
Lesia
pythondev_help_Lesia_2018-02-01T01:32:53.000157
1,517,448,773.000157
32,417
pythondev
help
Both are if you don’t set the `PYTHONPATH` environment variable, which tells python additional locations to look for packages/modules. Though it’s generally discouraged to customize that, outside limited cases
2018-02-01T01:49:08.000096
Rafael
pythondev_help_Rafael_2018-02-01T01:49:08.000096
1,517,449,748.000096
32,418
pythondev
help
I’d think that you should consider either of these options: 1) make a few packages and install them from pypi on build/deploy 2) make the dependencies just part of the main project
2018-02-01T01:50:32.000068
Rafael
pythondev_help_Rafael_2018-02-01T01:50:32.000068
1,517,449,832.000068
32,419
pythondev
help
Okay, I will look into the PyPi route.
2018-02-01T01:57:05.000172
Lesia
pythondev_help_Lesia_2018-02-01T01:57:05.000172
1,517,450,225.000172
32,420
pythondev
help
What is the method for option 2?
2018-02-01T01:57:45.000293
Lesia
pythondev_help_Lesia_2018-02-01T01:57:45.000293
1,517,450,265.000293
32,421
pythondev
help
in flask when creating a model and a foreign key, do I need to create the foreign key in relation to the variable I create in flask, or to the actual table for example I have created this model; ``` class Master(db.Model): __tablename__ = 'master' id = db.Column('id', db.Integer, primary_key=True, nullable=F...
2018-02-01T05:03:57.000217
Milo
pythondev_help_Milo_2018-02-01T05:03:57.000217
1,517,461,437.000217
32,422
pythondev
help
if you already have a table, your model should fully mirror that table
2018-02-01T05:07:30.000048
Barney
pythondev_help_Barney_2018-02-01T05:07:30.000048
1,517,461,650.000048
32,423