No video

PYTHON - How to Write a Password Generator / English Words, Random Numbers, and Special Characters

In this video tutorial, we will be looking at how you can write a password generator that includes English words, random numbers (with leading zeroes), and special characters. Sorry for the background noise. Sometimes you gotta record when you can.
Links I referred to in the video:
Medium Referral link (part of your membership goes to me to directly support me as a creator) :
/ membership
All my programming articles on Medium:
/ programming
GitHub Gist:
gist.github.co...
GitHub English Words dictionary:
github.com/dwy...
Online dictionary file:
www.mieliestron...
Random Word library:
pypi.org/proje...
---
To support the channel, give it a thumbs up, subscribe or buy me a coffee.
This will help me create more content in the future.
If you are interested in more content, my Medium Profile has a variety of articles about anything from UX, programming, productivity, products, self-improvement, and life.
Medium Profile:
/ martinaaberge
Twitter Profile:
/ mikademius
Buy Me a Coffee:
www.buymeacoff...

Пікірлер: 4

  • @eldattackkrossa9886
    @eldattackkrossa98862 жыл бұрын

    hi there! just finished watching your video :) and you asked for feedback so here it comes! - i thought the code was generally good, i just have a few small nitpicks. breaking up code into function blocks is also very good and something that i feel like would have helped me a lot if i knew that earlier (rip to all my unmanagable projects) - instead of using random.randint, you can use random.choice, which takes in a sequence and returns a random element from it, which is simpler and more pythonic :) - and instead of using while padding_counter that's all! im glad you had fun making this video and im looking forwards to more python content :D

  • @MartinAaberge

    @MartinAaberge

    2 жыл бұрын

    Hi Eld. Thank you for your feedback! Really appreciate it :) -randint: You are so right when it comes to choice. Can't believe I missed that one. I mean, that is way prettier than using a random int as an index. Thanks. -while vs. for _ in range() : Thanks. Do you know which is faster btw? Would be interesting to know. I also use _ as temp variables, but as you say, that aint pretty! Thanks again for your comments! 🤍

  • @eldattackkrossa9886

    @eldattackkrossa9886

    2 жыл бұрын

    @@MartinAaberge im glad you like the comments :D i did a quick speed test using the standard library timeit module, and it seems that using for _ in range(n) instead of while True / if temp == n: break leads to about a 15% speed increase on my machine, probably because it doesn't have to check every time

  • @eldattackkrossa9886

    @eldattackkrossa9886

    2 жыл бұрын

    @@MartinAaberge note that 15% is just bc what i put in the loop itself is relatively lightweight, so obviously it depends on if most of the overhead is coming from the looping itself, but either way it's more pythonic and just looks nicer so id recommend it either way :D 🤍