tutorialdoctor / python-snippets Goto Github PK
View Code? Open in Web Editor NEWCode snippets in Python by the Tutorial Doctor
Code snippets in Python by the Tutorial Doctor
What license is your software?
I was thinking of using it for a school project.
import string
from random import *
import console
MIN_CHARACTERS = 30
MAX_CHARACTERS = 40
PASSWORD_COUNT = 3
# Generate File
def generate_passwords(includes=[""]):
#print(args[0])
for x in range (PASSWORD_COUNT):
characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$&%"
password = "".join(choice(characters) for number in range(randint(MIN_CHARACTERS, MAX_CHARACTERS)))
character_list = []
[character_list.append(char) for char in password]
for string in includes:
character_list[randint(0,len(character_list))] = string
modified_password = "".join(character_list)
with open("passwords.txt","a") as outfile:
outfile.write(modified_password + "\n")
generate_passwords(includes=['raphael','689104'])
generate_passwords()
console.alert("Passwords Generated!")
#characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$&%"
#include = ['raphael',"name"]
#password = "".join(choice(characters) for x in range(randint(MIN_CHARACTERS, MAX_CHARACTERS)))
#L = []
#print(password)
#[L.append(char) for char in password]
#for string in include:
# L[randint(0,len(L))] = string
#print("".join(L))
#https://towardsdatascience.com/10-examples-to-master-args-and-kwargs-in-python-6f1e8cc30749
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.