Giter Site home page Giter Site logo

python-snippets's People

Contributors

tutorialdoctor avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

datatalking

python-snippets's Issues

License

What license is your software?

I was thinking of using it for a school project.

Add pass generator

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.