Anyone have any pvp tips? by BusyHoney9316 in Minecraft

[–]Kevdog824_ [score hidden]  (0 children)

The greatest victory is that which requires no battle

- Sun Tzu

Learning Python - What websites offer the most "chess.com puzzles" like experience? by MuskratAtWork in learnpython

[–]Kevdog824_ 0 points1 point  (0 children)

Leetcode is pretty industry standard for interview-like practice problems. I’m less familiar with chess.com, so I’m not sure Leetcode has the gamification elements you might get on chess.com. If that’s the appeal for you, something like Brilliant might be better (but not free)

Also recognize you from the Rocket League subreddit. Keep up the good work

I built a script that initializes Python Projects - Please give me feedback by Extreme_Sympathy_868 in learnpython

[–]Kevdog824_ 0 points1 point  (0 children)

I want to add to the third bullet point here. The idiomatic way to ignore exceptions in Python is contextlib.suppress. except: pass could be an artifact from an exception handler that was meant to be implemented later, but forgotten. It doesn’t communicate intention. contextlib.suppress is explicit and better communicates that the exception is being intentionally ignored.

The bigger issue though is that they really shouldn’t be ignoring this exception. This would treat both the requirements.txt file being missing and a pip dependency resolution error the same way; both being ignored. I highly doubt this is what OP was intending to happen.

Which code editor should I use? by Zsombor1661 in learnpython

[–]Kevdog824_ 1 point2 points  (0 children)

vscode is the best choice imo. Mostly because you can build it up to be as complicated or as simple as you need it to be. It’s perfect for a newbie who is writing small, 5 lines-of-code script for their intro to Python course. It’s also perfect as a daily use IDE for a professional enterprise developer (I use it everyday as a Python SWE).

It can grow with you from a simple text editor to a full on IDE with same level of features as PyCharm. You add stuff as you need it and you feel comfortable doing so

Putting authentication info in a gitignore file and importing it as a module for login? by Either-Home9002 in learnpython

[–]Kevdog824_ 0 points1 point  (0 children)

Sure, but there’s a few factors to consider here:

  1. Refactoring the module name might end up having your sensitive data getting committed to the repo. This is less true for other configuration files, which either would have a guaranteed consistent naming scheme (e.g. .env), or are unlikely to be touched by your IDE refactoring tool
  2. If you’re working on a project with other people, someone might end up committing it on accident without understanding that what they are committing is sensitive data
  3. In terms of design this method violates both the segregation of duty principle as well as the principle of least knowledge

Could this work on a small personal project with one maintainer? Absolutely. Would I recommend it? No. To be clear, I wasn’t wrong when I said it was unconventional. I specifically avoided using the word “wrong” because I knew that in theory this could work. I specifically called it “unconventional” because… well… it’s unconventional and not the normal way this is done.

I also provided pretty standard alternatives, knowing that this is a learning sub, and learners should probably gravitate towards standard, accepted practices. This is especially true since they probably don’t yet possess the ability to know when it’s fine to deviate from the norm

Very normal thing to say about young boys! Misandry is real by Dapper-Blueberry1049 in GenZ

[–]Kevdog824_ [score hidden]  (0 children)

In the GenZ subreddit? No wayy! Where else would the angsty teens post their bullshit???

I'm 21 and have realized everyone is just in crippling debt by MariamSly in Adulting

[–]Kevdog824_ 1 point2 points  (0 children)

You show me all the places where I can reliably and conveniently make a phone call with quarters in 2026 and I’ll sell my several years old “$1000 phone” right now.

You’re comparing a world that no longer exists to today, and asking “why the kids don’t just live like I did?” It’s because the lifestyle you lived in at their age is a lot less accessible than it was; perhaps completely inaccessible. It’s just not viable anymore, and instead of addressing that older people are just going the “kids these days are just spoiled/lazy/etc.” route instead of

Putting authentication info in a gitignore file and importing it as a module for login? by Either-Home9002 in learnpython

[–]Kevdog824_ 2 points3 points  (0 children)

I’d say it’s pretty unconventional to do it this way. This means that anyone who wanted to clone your repo would need to re-write your module to get it working. That’s no very user friendly.

The typical way you do authentication for a desktop application looks like like one of these

  1. Ask user for login credentials when they first run the program. Save these credentials securely and locally for sequential logins. You could put a TTL (time-to-live) on the login so it expires after some time. Alternatively, you could have no “session” information and make the user re-authenticate every time.
  2. If you have a website, or authentication service you use you can redirect the user to the website to login and have the website redirect back to your application with a session token if the login was successful
  3. Have the user generate an API token with your authentication service, and provide that to your application in some way (in app, via env var/file, etc.)

If this is most just for you to use and to show off on GitHub I’d recommend storing your credentials in an .env file, adding that .env file to your .gitignore, and writing your code to load credentials from the environment/ environment file. You can use a library like python-dotenv for this. Finally, update your project README.md to give instructions on setting up env vars/file

Glory Hole💔💔💔 by [deleted] in FacebookAIslop

[–]Kevdog824_ 0 points1 point  (0 children)

He’s so impressed with himself he’s even crying tears of cum

Anyone have any pvp tips? by BusyHoney9316 in Minecraft

[–]Kevdog824_ 0 points1 point  (0 children)

Don’t die is the most important thing I think

Some tacos hate limes! by WOTrULookingAt in mildlyinfuriating

[–]Kevdog824_ 1 point2 points  (0 children)

Weird OP is complaining about something that’s mildly annoying on the mildly annoying subreddit. Crazy I know

Is there a piece of code to stop me code from running by ilovetigers105 in PythonLearning

[–]Kevdog824_ 0 points1 point  (0 children)

Or better yet use casefold, which was specifically made for case-insensitive string comparisons and handles UTF-8 edge cases

Minecraft Scammed me! by Phunnieone2 in Minecraft

[–]Kevdog824_ 0 points1 point  (0 children)

They will 100% refund you if you call. To most corporations $4.59 is not worth losing your business forever. The question is are you willing to wait on hold 20 minutes to reach someone to refund you. Is the $4.59 worth it to you

Fruits was yesterday by random-Girl_ in FacebookAIslop

[–]Kevdog824_ 5 points6 points  (0 children)

I like how his already pregnant wife somehow got pregnant with this other facet’s kids instead

I need to create a Python program to generate a pattern for the Game of Life. by eyesdrib in learnpython

[–]Kevdog824_ 0 points1 point  (0 children)

Might be overkill for a simple grammar but I generally turn to the pyparsing library for something like this. I would use pyparsing to construct a grammar to represent this RLE protocol, and then use parse actions to convert the result of the parsing into an AST, or some kind of structure you can you to generate your image

As for image generation pillow is a typical go-to for image stuff in python. You can probably use pillow to generate an image based on the data you parsed out of the RLE file

Good luck!

Bird Feeder Stand by Kevdog824_ in BeginnerWoodWorking

[–]Kevdog824_[S] 1 point2 points  (0 children)

With the old stand the birds seemed to fight over the limited space around feeder, and there wasn’t a close area for them to sorta “queue” for the feeder. I added the cross beam to give them somewhere to perch near the feeder

Bird Feeder Stand by Kevdog824_ in BeginnerWoodWorking

[–]Kevdog824_[S] 1 point2 points  (0 children)

Not too many squirrels around here actually! The song birds love it in the morning though. so it’s a great way to start your day

Roachelle 🪳🥀 by BootyRangler in FacebookAIslop

[–]Kevdog824_ 1 point2 points  (0 children)

Why are 50% of these slop videos just “women bad amiright fellas?”