« first day (4490 days earlier)      last day (681 days later) » 

00:15
ah, didn't consider that. I commented to ask about trying without ~
 
1 hour later…
There is some profile that if I interrupt the execution of the code the results still will appear how far did he run? From what I've tested, the line_profiler package (pypi.org/project/line-profiler) doesn't allow that.
some profiler*
02:07
I'm not thinking very clearly right now, but regardless of the profiler, you might need to do something with except KeyboardInterrupt: to make that work.
Right, thanks. I wanted something that was real time actually.
02:58
as in, updating in real time, as the code progresses?
Yes, something like that.
To avoid putting a bunch of prints and counting the execution time of different parts of the code.
As I'm having a problem with slowness in the code, I can't wait for it to complete the execution.
Hmm, this seems work: github.com/benfred/py-spy
Nice
 
1 hour later…
04:23
It worked.
 
1 hour later…
05:43
cbge
 
1 hour later…
06:52
Should python 2.* questions be closed as outdated?
@halt9k no
There's no "outdated" close reason
@AndrasDeak--СлаваУкраїні I've seen multiple misleading answers which should be changed between 2.* and 3.*, answering under 2.* updated answers seems leads to downvotes. Not sure how this problem should be properly adressed on SO
The question is either python 2 in which case don't leave answers for 3, or answers for 3 are fine
Old questions get better new answers all the time
@halt9k heh, learn python the hard way. Figures.
I'm average user and while digging for 3.* answer I digged 2.* by an accident. This is probably common usage scenario, which probably means marking 2.* as outdated will save time of many users
Anyway, find a question that's not locked to some crap language and a crapper tutorial
@halt9k you should raise that on meta. In fact I think there's at least one feature request for obsoletion, probably even promises from the company.
06:59
That's the thing, "crapper tutorial" part is side-effect. This question by accident was closet to my search.
Turns out there are more versions of this LPTHW side branch <3
@AndrasDeak--СлаваУкраїні have same feel for recent years, this may be actually missing feature on SO. But you generally suppose masterminds of SO know and addressed this problem already. Thanks for answers
SO steering mechanics is closer to "twitch plays pokemon", but twitch is the board of management or whatever. Users have no access to twitch.
The mastermind left in 2012 :P
@AndrasDeak--СлаваУкраїні This easily could've been a promotional campaign. By accident, it matched demanded QA and multiple questions survived on SO. World is broken in many ways.
I've seen 2-3 duplicates mentioning this book
Considering the approach of the book it's probably genuine confusion in most cases.
07:11
@AndrasDeak--СлаваУкраїні P.S. Really wish all support to your nickname. I was one of about 5% who tried to fix this in 2012 and many times after. Lot's of pain about what is happening and it's incomprehensible how civilized world cannot address this properly and even losing to disinformation in many cases.
@halt9k The question says, "I have Python 2.7.3 installed in C:\Python27", and it is tagged . Answers about Python 3 don't belong; they don't answer the question.
We make the unreasonable expectation that people pay attention to the tags and the question.
@halt9k yeah. To be clear I'm just a supporter, not personally affected.
@halt9k But the questions are not outdated. Just because you personally have upgraded doesn't make the questions or their answers outdated. It's no different from looking for a Python answer, finding a question about Ruby, and arguing that it's "outdated". No, it's not. It's just not what you're looking for.
@CodyGray it is unreasonable because google finds outdated question. This may be case when updated QA simply missing and there is no alternative for Google to redirect. Means either my answer for 3.* is placed correctly under 2.*, either outdated label should be clearly introduced on SO, in same way as closed label exists.
But the question isn't outdated. It's just not what you, personally, are looking for.
"Closed" means that the question is unsuitable for Stack Overflow. "Outdated" has no meaning.
07:22
@CodyGray may be correct approach would be marking as not python 3.*, i.e. red label python 3.* which is well visible
No, that would be a horrible approach!
You can tell Stack Overflow that you, personally, would like to ignore/hide questions tagged [python-2*], and/or you can tell Stack Overflow that you, personally, would like to mark questions tagged [python-3*] as interesting.
But your preferences are yours alone. We shouldn't put red labels on questions for everyone just because they're not what you're looking for.
I was implying a special "not" type of tags, that's not exactly my preference, but morlike solution suggestion.
doesn't look good - np
What?
08:29
I wouldn't say python 3 answers don't belong there just because the OP decided to include their python version in the question. Who cares about that little factoid? A version-agnostic "How can I execute python from the command line" question would be far more useful
@Aran-Fey oh, have multiple examples why this is far from perfect: if question is wide - ranged and popular, you will see literally dozens of similar duplicates nobody knows what to do with them
Mentioning powershell also did nothing for the question except make it worse. It only led to people modifying the PATH variable through powershell instead of other means
@Aran-Fey it's important to keep track on popularity and to properly split questions as soon as many duplicates occur
not just important, crucial to keep SO quality high
too late for that, I'm afraid...
Not exactly convinced that "not" type of tags is bad solution, though (negative tags to split question areas, like "not python 3.*" or "not open-source"). I'd prefer more people feedbacked on this or propose scenarios where they harmful
08:37
I also don't see a point. Isn't not tag implicit by... actually not tagging?
@matszwecja not tagging = irrelevant, negative tag emphasizes away misleading answers which, for example, were downvoted due to not good enough understanding of question
or emphasize for user to look on linked QA's which may actually contain updated QA
in general this thoughts are around problem of duplicates, when, for example, one question asks 1) "how to install and run this", 2) "how to run this on windows", 3) "how to run this in cloud" and how to fix all the duplicating answers under 1,2,3) "here is list of possible solutions which will be aggregated as new answers from other users are upvoted"
08:55
final thought here: search engines somehow need that NOT operator, possibly to have only AND's in tags is just not enough
@halt9k There's been a lot of discussion on MSO about how to deal with outdated answers. See meta.stackoverflow.com/q/405302/4014959
Of course, Python is a difficult case because of the Python 2 / Python 3 issue. However, we can't simply treat all Python 2 content as obsolete. Many Python 2 posts contain info that's still useful in Python 3. Sure there are some very important differences, but it's not that hard to learn the major ones.
New users of Python should probably avoid old Python 2 answers, at least until they're confident with their Python skills and have learned about those differences.
@halt9k Python 2 is legacy software, not outdated. Wish it were different...
Also, some people are stuck in a situation where they still need to work with Py 2, even though it's reached its official End Of Life. They may be in an environment where they have to use Py 2, or they're still in the process of converting old code.
There are some important programs that use Python as a scripting language, so they have a Python interpreter compiled into them. If you're using such a program you generally don't have a choice of which Python version to use: you have to use whatever's compiled into the program.
09:13
@PM2Ring that was not a stone into 2.*, morelike general adressing to problem of splitting questions and answers to avoid intersections
if to go specifically for py 2/3 problem, not even sure if Google gives real picture trends.google.com/trends/…
@halt9k I doubt people searching for Python 3 actually search for "Python 3". They just search for "Python".
@halt9k Sorry, I don't know what "a stone into 2" means.
You shouldn't trust Google about this. Until Py 2 reached its EOL, Google would mostly fetch Py 2 results unless you specifically searched for Py3. That was very annoying. Even these days, when I'm searching the Python docs I put python 3 docs into the search string, out of habit. ;)
@PM2Ring not a specific attempt to say "pyton 2.* is bad and should be forgotten". I know and used it in many recent cases too. Yet if possible redirects from search should be improved which probably will tend to pick more popular outdated questions.
A lot of the high scoring old answers are applicable for Py2 & Py3. Many of us made sure that our code worked correctly on both versions, or put code for both versions in our answers. Of course, not everybody did that, and high answer score / answerer rep isn't a guarantee of answer quality.
At least the Python situation isn't as bad as the JavaScript situation. OTOH, JavaScript has always changed fairly rapidly. And I guess you can simply ignore any JavaScript answers that are more than a few years old. ;)
@halt9k Tags can be helpful, but they aren't the solution for this issue. Tons of Python questions aren't adequately / correctly tagged. There are even huge numbers of Python questions that don't have a python* tag, they just have a pandas / numpy / django etc tag.
10:00
@PM2Ring and attempts to fix tags faced "this edit does not improve question" (at least for me, hopefully, worked better for others)
 
1 hour later…
11:09
meta question, I just had a comment deleted, which I noticed by chance. On this post I had commented something like "thanks for the update" to Kound. Admitted, it's not a good comment, but they went out of their way to properly test something, which I wanted to appreciate.
I'm 95% sure that I hit "send", and would think that it didn't violate any of the "be nice" rules of commenting. Can it just happen that someone admin-y sees a comment, thinks "wow that's useless" and deletes it? If noone here knows, I guess I'll pay a visit to Proper Meta
shudders
> @Kound thanks for the update!
That was the comment. Yes, it was deleted by a moderator. Such comments are regularly deleted. They are considered noise.
@Arne It didn't violate the "be nice" rule, but it was inconsistent with the purposes of commenting (saying "thank you" is not among them).
A good way to show appreciation for the user's efforts, and help others at the same time, would be to update your answer to incorporate the information that they provided, with attribution (i.e., give them credit).
thanks, good to know
@CodyGray I did that but didn't attribute, ironically I would've considered that more noisy than saying thanks in a comment
11:25
Ah, no, because attribution is required when you use something created/provided by someone else.
alright, I'm going to do that in the future then
12:05
@Nike Indeed, lots of was going on and wires might have gotten crossed. Stuff that gets moved to MetaPython requires another Room Owner to pick up the discussion and they take up significant amounts of time; that's often my time. When multiple flags are raised, mods are being pulled, messages are moved, eventually it gets to the point of "why am I doing this again?". It takes a lot of energy to try be firm but fair with people for the sake of the room
I honestly don't know how mods do it for the site in general
But, I have recently found something more stressful - trying to drive around York for the first time. The roads are a bit bonkers and google keeps just abandoning me with "you have arrived" when I'm in the middle of a dual carriageway. So, I have a new perspective
 
2 hours later…
13:44
I just made a comment with // and I was so confused why it wasn't working.... ughhh
 
1 hour later…
14:59
Hello @FranciscoMariaCalisto ! As a newcomer you might want to visit this page which has links to some room rules, a wiki, and some unusual terms that are commonly used here.
hello all, I'm writing an REST api based in python and writing some unit test too. in my code i call other service/api too. what are some testing libraries that i use for my unit tests?
use the inbuild testing utils until you reach a point where you feel to need more: docs.python.org/3/library/unittest.html
@elsololobo - thanks . if i have routes defined in my api . how do i test the basic request response, or do i even need to worry about that?
15:18
write a client that calls the api's and check for the expected result would be one option
@ozil Most open-source libraries I see use pytest for what it's worth
@ozil - the Old School Python Way is to use the built in unittest module. This uses a similar design going back to Junit (Java) and before that Smalltalk, so very heavy in use of TestCase and TestSuite classes. More modern testing is done using pytest, which is not in the stdlib so you have to pip install it. pytest discovers test cases based on naming conventions, so no big class hierarchy needed.
great thanks all. one thing, i'm not sure about is that . i see some examples where , api responses are mocked and basically test is done against harcoded responses or status code . what would be the use of that?
15:33
Testing any client side processing of the response
@ozil There's a difference in whether your logic works, or whether your logic+communication works. Having separate test cases (one in which the communication is taken out of the picture) helps to find out which component broke if things no longer work.
For example, you might test whether the client app doesn't utterly fail if it gets 404 error instead of whatever was expected. You don't need to send actual error in such a case, as it would complicate logic of the test.
15:49
I'm pretty sure stackoverflow.com/questions/75299616 is a duplicate? I found stackoverflow.com/questions/65999975 for example?
16:08
@ozil you could look at the flask source code for testing
That will give you some ideas on how to mock properly, with an "uncomplicated" library. Other frameworks might need different setups
This stuffs up my lax approach to typing. I never actually run static analysis over my library but apparently it will complain to other developers. You can't do things by halves, it seems :'(
16:46
Anyone running tensorflow on an Apple ARM chip? Is tensorflow-macos an official build?
The latter seems to ship ARM builds, but it has different maintainers, isn't mentioned in the official docs and seems to clone the metadata otherwise. Seems smelly...
Apparently it's legit. Gosh, I miss the day when any unwashed hipster could just use a Mac...
17:02
Still struggling to get pytorch to work with WSL ROCM
 
1 hour later…
Is there a name for a number whose square root is rational? for example, sqrt(4/9) = 2/3, which is rational. On the other hand, sqrt(1/2) does not have a rational square root.
"A fraction which, in reduced form, has a perfect square for a numerator and a perfect square for a denominator" does not roll off the tongue
19:01
Some combination of "perfect", "square", and "fraction" or "fractional".
@PaulMcG thanks!
 
3 hours later…
22:21
I made a big MRE but the problem is not reproduced.
That's good news?
@ChrisP that means that it's not an "MRE", just a "ME". You went too minimal.
if it's a "big ME" then you have the worst of both worlds: big despite minimal, yet doesn't reproduce the problem
Try adding back stuff until the problem appears, then considering what you had to add back. Then try removing other things as long as the problem persists.
 
1 hour later…
23:48
Assuming you had a problem youre, trying to fix, this is still useful info. it does tell you that the problem doesn't appear where you thought it would (assuming you thought your example should have shown the problem). Just means going back to the drawing board and finding what could have made the problem appear

« first day (4490 days earlier)      last day (681 days later) »