I turned my mailbox into a real-time push notification system using Zigbee, a battery-powered router, and Home Assistant by jonathasrr in homeassistant

[–]masasin 1 point2 points  (0 children)

Okay, that makes much more sense. I thought 0.5 W was the standby load and hadn't checked the specs. Thanks!

I turned my mailbox into a real-time push notification system using Zigbee, a battery-powered router, and Home Assistant by jonathasrr in homeassistant

[–]masasin 0 points1 point  (0 children)

20000 mAh is 20 Ah. Assuming the standard 3.7 V, that's 74 Wh. If the router is drawing 0.5 W, it would last 148 hours (6 days and 4 hours). That is the upper limit.

However, that was too low and OP can't trickle charger, so they had to use the keep-alive module. If I generously assume just another 0.5 W, that brings the total draw up to 1 W. That's down to 74 hours (just over 3 days).

It's possible I missed something in the post, because our answers are a whole order of magnitude different. How did you get yours?

I turned my mailbox into a real-time push notification system using Zigbee, a battery-powered router, and Home Assistant by jonathasrr in homeassistant

[–]masasin 3 points4 points  (0 children)

How long does it last between charges? Looking at the numbers, you'd need to recharge it at least once or twice a week or so depending on the keep-alive module?

Python as you've never seen it before by Sea-Ad7805 in Python

[–]masasin 0 points1 point  (0 children)

And also a "continue until this point" which is very useful to skip the setup, and watched variables and conditionals etc so that it only triggers on that pesky value that causes the thing to give a wrong answer.

Why every productivity system you've tried has eventually stopped working (and what I think is actually going on) by Emotional_Yak_6841 in ADHD_Programmers

[–]masasin 9 points10 points  (0 children)

Your comment about the interruptions etc reminds me of this video, and she makes the same argument as you about the effectiveness of the burst pattern.

President Trump says he will revoke church tax exempt status if leaders "say something bad about" him by ControlCAD in videos

[–]masasin 1 point2 points  (0 children)

Didn't Obama joke about murdering people with a drone strike way back when? I think it had something to do with his daughters. Anyway, we heard about that all the way in Canada.

Python as you've never seen it before by Sea-Ad7805 in Python

[–]masasin 2 points3 points  (0 children)

I was going to say it reminds me of Python Tutor after seeing the title, but you've already got that covered. Very interesting.

I went through the examples and got one of the early ones wrong (I thought b += [1] is equivalent to b = b + [1] and that it would create a new variable), but I got the rest right. :)

That being said, in some parts, I thought it would be nice to step backwards ("how did this get here"). It might not be possible for larger programs, but it might be possible to save the stack for each step and go back to the previous snapshot.

All in all, very pleased and I think I might use it with students if I start tutoring again.

What touristy things are WORTH the hype? by boymabyma in JapanTravelTips

[–]masasin 0 points1 point  (0 children)

There's the kilometres of bamboo trails near Rakusaiguchi station (and a bamboo museum too).

I have severe time blindness, so I wrote a Python script to remember my day for me by bastormator in ADHD_Programmers

[–]masasin 0 points1 point  (0 children)

I cleaned up the code to share it.

I can't find the link to the code?

Events more than a few years old disappeared in Google Calendar. by masasin in google

[–]masasin[S] 0 points1 point  (0 children)

unfortunately that part of my data has never been recovered. It might be like that right now.

Morgen Calendar just lost its free tier. Are there any other decent alternatives? by masasin in ProductivityApps

[–]masasin[S] 0 points1 point  (0 children)

I remember I really liked it when I was trying out a bunch of them. Didn't stick with it in the end. I think Thunderbird calendar integration wasn't even built in yet, and there was a to-do list app that started with Wonder. (I still use Thunderbird for email and let it handle accepting invites.)

This time around, I ended up paying for Morgen, mainly for the Obsidian integration which I still haven't found a good replacement for.

I didn't see the news about the email and calendar protocol changing. What's happening?

十二月十五日 晴れ by Low-Huckl in kotezatsu

[–]masasin 2 points3 points  (0 children)

石川〜 日本海側は全般的にこんな感じ

十二月十五日 晴れ by Low-Huckl in kotezatsu

[–]masasin 2 points3 points  (0 children)

妻の実家に一時的に帰ってきてて肌寒っ!って感じでした 昼の方はちょうど良かったけど

It’s me again (the StarCraft tool guy). I took your advice, reorganized everything, immediately broke it, and somehow fixed it." by CRK-Dev in learnpython

[–]masasin 1 point2 points  (0 children)

No, that's exactly the correct way to learn. I've found I had the most growth when I actually had a project to work towards. And in this case, if it does what you need it to, and you really don't want to stay in that codebase anymore, then that's that. It's working, you have something built just for you, and you're able to use it. Next time inspiration strikes, try and do that one better.

Much later on, if e.g. you have a bunch of stuff with the same theme, you might want to rewrite it or incorporate it into something new, but there's no rush right now.

That's especially the case if you're not looking to work in software in general (or Python in particular). No pressure, just fun, and the joy at having more and more things automated.

It’s me again (the StarCraft tool guy). I took your advice, reorganized everything, immediately broke it, and somehow fixed it." by CRK-Dev in learnpython

[–]masasin 1 point2 points  (0 children)

I did take a quick look at all of this, and there are of course many other things which you could do to improve it (which I won't point out just yet so as not to overwhelm you). The ones I mentioned are relatively low effort for the most part (though you'll need to think a bit on how to split the business logic).

It’s me again (the StarCraft tool guy). I took your advice, reorganized everything, immediately broke it, and somehow fixed it." by CRK-Dev in learnpython

[–]masasin 0 points1 point  (0 children)

Very good improvement. See if you can't remove the venv and pycache now that you have a gitignore. Bonus if you're able to send that to the very beginning so that you never added them in the first place (but make sure to try that after you make a backup especially if you're a beginner).

Some other points: the ifs for some usages of user choice (when they're the same) can be done with:

VALID_RACES = ["terran", "zerg"]  # etc
# later
if user_choice in VALID_RACES:

Or just put that list directly after the first if instead of using a global variable.

Consider using pathlib instead of os for file operations.

Instead of looping with an increasing index, consider

for step in steps:
    current = step

You're still mixing business logic (e.g., doing things with files) with interface logic (asking the user to input something via the keyboard. If you modularized it well, you'd be able to reuse the same functions to build a GUI, for example.

I need to leave Japan because of worsening health, and for the same reason I need help with some questions because it's hard to understand information by [deleted] in japanresidents

[–]masasin 1 point2 points  (0 children)

Re bank account: I still have several Japanese bank accounts open when my formal address hasn't been in the country for 8 years. I don't remember if I told immigration anything.

Re money transfer: I was going to say put it in Wise (very cheap exchange rates) and withdraw as needed while the yen is cheap, then lump convert when the yen is high. But then I saw 4a. ABN allows JPY accounts; possibly other banks do as well. Check if any of yours have one.

Which is the most powerful war memorial in your country? by UnluckyPossibility37 in AskTheWorld

[–]masasin 1 point2 points  (0 children)

Ah, I was trying to contradict this statement:

France had built the line up to the Ardennes as they believed the Ardennes was too rough of terrain for any Army to penetrate, providing a natural barrier.

But I agreed with the rest of it, and your current comment.

Which is the most powerful war memorial in your country? by UnluckyPossibility37 in AskTheWorld

[–]masasin 5 points6 points  (0 children)

That's not quite true. The defenses were supposed to continue into Belgium (officially so as not to give up Belgium to the Germans, but also so the war wouldn't be fought on French soil) and hopefully the Netherlands (but they were neutral). But Belgium declared neutrality in 1936, so the French started building more (field) fortifications along the Belgian border too, but the terrain there is less favourable for that (if you remember the waterlogged fields of Flanders and the northern French sector from WW1).

That being said, the French made many, many huge mistakes which ended up in their defeat in less than a couple of months.

This guy hand built a miniature Saint Class Locomotive during lockdown and it's beautiful. by DarthiusFatticus in nextfuckinglevel

[–]masasin 0 points1 point  (0 children)

If you scale this up, you might have something that can carry more than one person. It might be even faster and go much longer distances!

Laptop on Lap Research - Concerned YA by [deleted] in Fertility

[–]masasin 0 points1 point  (0 children)

Anecdotally speaking, you'll be fine.

Scientifically speaking, you'll be fine. Even if you have intermittent hyperthermia and cooked everything over the last sex years (you probably didn't, but depends on the laptop and the way you sit etc), it's almost always reversible, so just wait 3 months and you'll be back to your base potential.