« first day (2850 days earlier)      last day (2084 days later) » 

1:50 AM
Hey guys, looking for a quick code review over a small python script I wrote (< 30 lines). I’m not a python guy, barely use it, but really like the idea of it, so any pointers or tips much appreciated.
 
 
3 hours later…
4:47 AM
@joe_04_04 I posted a comment on one of your commits: github.com/JosephTLyons/FileOrganizer/commit/… Not sure how GitHub notifies you of such things...or if you pay attention to them.
 
5:07 AM
I had this tab open, but I also got an email of your comment! Lol! I will check it out.
 
5:20 AM
Thank you very much for your comments! I might use those variables to hold the path name and keep from calling the join function multiple times.
 
 
1 hour later…
6:32 AM
@joe_04_04 exactly. You may see a common theme in my comments. Use variables often, especially to avoid repeating the same calculation, and also to improve readibility of an expression.
 
These are efficiency techniques I use in other languages, but seem to be things that I push to the side when working on learning a new language, until I get a bit more familiar.
More often than not, when working with a new language in a new environment, the frustration causes me to lose sight of things I would normally do.
I spent a few months working in Rust, absolutely frustrating as heck!
 
6:48 AM
Hi i have an issue, can you someone assist me?
I am first time in this chat, I dont know rules sorry in advance.
I have a python code, i need to sleep it for some seconds, but is there any other way i can stop sleep at any time?
for example if it is in sleep mode, once my time is changes the time then it should unsleep. is there any way?
 
7:16 AM
any option we can integrate Python ( Django ) with reactjs
 
8:00 AM
I am thinking to start writing workload automation software that is expected to run close to 1 lakh jobs a day in Python.Scheduler script will update the crons. Actual task executer process will rely on crons for triggering itself. I am not sure if Python is a god choice for such usecases?
 
The answers you're going to get in this room are going to be biased towards Python. Personally, sounds like you could probably handle it pretty easily in bash.
But if you are most comfortable in Python, it's probably something Python can handle.
 
@user3483203 Thanks.
 
8:42 AM
cbg
@IrfanBabar welcome to chat. The rules are here. I'm not sure I understand your question though.
If you just want to sleep the script for a set time, you can use time.sleep() but I have a feeling that you've tried that and you need some other behaviour
 
9:09 AM
Cabbage
 
@PM2Ring cbg. I know you said that Community Wiki was archaic but I actually think it was a perfect fit for that question yesterday
The answer got accepted, I dodged reputation for an answer that wasn't mine, and Zero can go back and add more detail if they wish
I'm not sure why they chose not convert to a full answer, though. pandas is one of those libraries where the "obvious" answer probably isn't obvious unless you sacrificed the right number of animals in the correct order to divine the logical approach.
 
@roganjosh You're still allowed to use Community Wiki, otherwise they would've disabled it. The main concern on SO Meta is that by making the answer CW you're relinquishing responsibility over it, and the community would prefer that people don't do that. OTOH, in the past I've suggested that when people answer a question which they then immediately dupe-hammer they should make the answer CW so that it doesn't look like they're abusing the hammer.
 
I guess it fits a niche circumstance. I'll try not relinquish the responsibility over it, but over the years I guess it's probable that I'll lose track of it
If they're going to still permit Community Wikis, it would be handy if the originator could get notified of changes. @PM2Ring will I get notified of comments? If you're not sure, we can test: the question
 
@roganjosh Sometimes people are happy to contribute info but don't feel the need to write an answer themself. Yesterday, I got a comment on an answer I'd written the day before on a Numpy question. My code was more succinct than the code in the accepted answer, but when I did a speed comparison I found that it was significantly slower. :oops:
The commenter mentioned an improvement to my code that more than doubled its speed! So I added a timeit comparison to my answer, see here for details.
 
Getting a speed improvement from hpaulj doesn't surprise me at all :)
 
9:23 AM
@roganjosh I'm not sure, so I just commented.
 
Wow, I do get a notification
 
Excellent. I'll remove that comment then.
 
So at least I'm able to follow-up if someone in future has questions.
Thanks for testing :)
 
@IrfanBabar Welcome! You can read our rules here, and there are other useful links there too.
 
@PM2Ring when hpaulj and 2735112 didn't have an immediate answer for my last question, the feeling was equivalent of looking into the abyss :P
 
9:31 AM
@IrfanBabar Your question is a bit unclear. If your whole script is asleep using time.sleep it can't do anything, but it can be woken up by a signal from another process. However, if you're using threads then there are various ways to pause and unpause threads.
@roganjosh Laurel. :)
 
"2735112" wow, I butchered that.
2357112. Oops :/
 
I knew who you meant. I just think of him as the primes guy. :)
 
"that polymath that knows a lot of things about a lot of stuff"
 
9:50 AM
Apr 13 '16 at 19:14, by user2357112
@BhargavRao: Yeah, that's why I kept this name.
 
I just brain-farted in my typing of his name, but I owe it to humanity to get those kind of things right. Some people have a level of knowledge that scares me here, they are one such person.
 
10:19 AM
@roganjosh that's a good question
 
Which question?
I only ask good questions :P
You mean the numpy copy question?
I found that really perplexing and the source code is not easy to go through. I don't think we're going to get better than an answer of inference but something's gone a bit wonky
 
Yup
Something I should check out with my 3d sliced sums
 
I can't even see that it's the result of memory concerns
So perhaps you have a speed-up waiting for you.
 
11:10 AM
It's pretty much 50-50
 
11:28 AM
@AndrasDeak I'd be absolutely interested if you do get a speed-up.
 
ask me in the second half of next week
 
I'm definitely starting to see that there's a couple of things I'm taking for granted in numpy and pandas
 
11:43 AM
For non-critical things I'd skip the copy though. Reads much clearer.
 
Eh, we'll come down to the debate I had with abarnert. I'll always go for speed when I meet that kind of judgement. Took me a while (it wasn't originally tagged with numpy) but I came to appreciate the code here
I can't say the other side is wrong, so I guess the debate will never end. But I was using np.where in a loop so I can argue that it was critical
 
I'm not sure I see the relevance of that link
 
I'm not sure now either
Just that it's compact code doing a lot of stuff and I've come to appreciate it rather than separating the steps out.
 
Cabbage
 
12:43 PM
Brief cbg while burning Sunday lunch
New oven seems far more effective at doing what it's supposed to than the former one
 
1:09 PM
Both with nominal temperature settings?
 
1:43 PM
Yup
Think the old oven was not great.
Put it on gas mark 6 to preheat and you could pretty much hand handle the shelves or interior with gloves
 
Interesting. Then again my in-laws' old oven and ours baked quite differently :)
Gas mark 6? vs temperature range?
 
Think it's about 180C?
New oven goes up to nearly 400... Haven't grokked while the heck it's necessary...
 
Although... Be very interested to know if anyone knows of that anything needs cooking at close to 400 C... :p
 
2:18 PM
My Processor seems to be hotter than that at the moment...
 
@PM2Ring huh, thanks, that's really weird to me
 
Strange. I'm in the UK, yet barely ever use that system.
 
@JonClements for when you wish to serve your meal with demagnetized nickel
 
@AndrasDeak I remember seeing old ovens that used that system when I was a kid, but it's not used in Australia on modern ones. I guess we still have a remnant of the system on cooktops that have numbered dials, but I think those numbers are just arbitrary, with no relation to the oven gas mark system.
 
2:40 PM
Yeah, I wouldn't trust numbers in this range honestly
 
 
2 hours later…
4:32 PM
Hi
anyone here?
 
@MaziarParsijani Maybe. ;)
 
well
I have question
 
If it's a general Python question I may be able to help. If it's a Pandas question or a PyQT question, I probably won't be able to.
 
4:59 PM
Python’s always been a bit of weird language to me because you can use it to script, to write functional software, or OOP software. I’m starting to dig it a little more now though.
 
5:14 PM
Cabbage
 
5:31 PM
@joe_04_04 how is "to script" different than "to write functional software"?
@poke cbg
 
Functional as in Haskell perhaps
 
I finally have the gold Python 3 badge! 🎉🎉
12
 
No more retag-pls! xD
 
5:33 PM
\o/
about time ;))
 
Indeed! This actually took me waaay to long to get..
 
I only have one gold tag badge for Java. And only two silver tab badges without the gold badge.
I'm slowly working on that, though
 
I have two halves of a gold badge
 
And I had to “cheat” a bit in the end to get the final points.. I was just looking at my profile and saw that I only needed three more points, so I maybe have answered some questions now that I could have found an acceptable duplicate for…
 
lol, I been doing that, too
and then cv as dupe after I answer...
 
you could've retroactively tagged a few questions you answered that needed the tag and didn't have them...
 
^
F-strings come to mind
 
@coldspeed Personally, whenever I go through existing questions, I am more inclined to remove version specific tags instead of adding them..
 
fun fact: 2 of my top 10 most-upvoted answers are in and I don't program in C#
 
Woohoo! My first silver badge! Thanks to everyone who voted for this answer! — Code-Apprentice Jul 24 '12 at 18:56
:D
 
5:51 PM
yup...I think that was the Java badge. The silver C# badge came much later. In fact only a few months ago, iirc
 
You don’t have a silver C# badge ^^"
It would require you to have 80 C# answers
 
I was curious about that after "I don't program c#" :P
 
Yeah, that would be a bit much xD
 
Seems to be c#-- instead
 
6:10 PM
cbg, anyone have any ideas as to how to model fluid flow in python? Has anyone tried something like that before?
 
6:24 PM
@poke oh right...I got a bronze badge...even that is more than expected
 
:D
 
6:54 PM
@3141 the hard part is modelling fluid flow; the language is marginal
 
 
1 hour later…
8:02 PM
Cbg
 
cbg
 
hi am new to python... i have to study from begginning....Can anyone provide any notes or link??
 
@RAGHUNATH genuinely recommend the official Python tutorial
 
@RobertGrant that only am studying...But it was taking too much time... is there anyother link for quick learning?
 
8:28 PM
@RAGHUNATH hard to know, really
 
8:46 PM
Hi friends , please help in this:stackoverflow.com/questions/51697172/…
 
 
1 hour later…
10:28 PM
@prakash hi - welcome to the room. Please see our room rules for an intro to how the room works
 
11:00 PM
I am sorry if this is the wrong place to ask, I just don't know where else to go.
 
11:18 PM
It is the wrong place to ask and you know this very well
 
11:32 PM
@SebastianNielsen please use WebApps for that one. Also useful to familiarize yourself with the other StackExchange sites like SuperUser, ServerFault et al.
 

« first day (2850 days earlier)      last day (2084 days later) »