Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ayatakinci committed Nov 5, 2023
1 parent ee0f31b commit b3c70f4
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .nuxt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async function createApp(ssrContext, config = {}) {
// here we inject the router and store to all child components,
// making them available everywhere as `this.$router` and `this.$store`.
const app = {
head: {"title":"Ayat Akinci","meta":[{"charset":"utf-8"},{"name":"viewport","content":"width=device-width, initial-scale=1"},{"hid":"description","name":"portfolio","content":"Ayat Alzaidi portfolio page"}],"link":[],"style":[],"script":[]},
head: {"title":"Ayat Akinci","meta":[{"charset":"utf-8"},{"name":"viewport","content":"width=device-width, initial-scale=1"},{"hid":"description","name":"portfolio","content":"Ayat Akinci portfolio page"}],"link":[],"style":[],"script":[]},

router,
nuxt: {
Expand Down
36 changes: 36 additions & 0 deletions components/sections/d.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import random
import string

def generate_password(length):
if length < 4:
print("Password length should be at least 4 characters.")
return

# Define character sets for each category
uppercase_letters = string.ascii_uppercase
lowercase_letters = string.ascii_lowercase
digits = string.digits
special_characters = string.punctuation

# Make sure we have at least one character from each category
password = (
random.choice(uppercase_letters) +
random.choice(lowercase_letters) +
random.choice(digits) +
random.choice(special_characters)
)

# Fill the remaining password length with random characters
remaining_length = length - 4
all_characters = uppercase_letters + lowercase_letters + digits + special_characters
password += ''.join(random.choice(all_characters) for _ in range(remaining_length))

# Shuffle the password to make it more random
password_list = list(password)
random.shuffle(password_list)
return ''.join(password_list)

# Get user input for password length
password_length = int(input("Enter the length of the password: "))
strong_password = generate_password(password_length)
print("Generated strong password:", strong_password)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit b3c70f4

Please sign in to comment.