Formatting

This commit is contained in:
Roland Thomas Jr 2023-09-16 16:51:31 -04:00
parent 0a64bb27ba
commit b25f464a04
Signed by: roland
GPG Key ID: 7C3C2B085A4C2872
13 changed files with 31 additions and 18 deletions

3
.gitignore vendored
View File

@ -158,3 +158,6 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# sqlite.db
*.db

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""bcrypt_test.py
"""bcrypt_test_db.py
This module provides utilities for user authentication, including functions to
store hashed passwords, create new users, and authenticate existing users using
bcrypt for password hashing and a sqlite database to store user data.

View File

@ -1,4 +1,5 @@
"""
"""email_example.py
----------------
This module sends an email with the contents of a specified text file as the
body. The "smtplib" and "email.message" modules are used to construct and send
the email.

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""
"""pyqt_tabs.py
----------------
This module contains a Python script utilizing the PyQt5 library to create a
basic graphical user interface (GUI) application. The application showcases a
tabbed window with two tabs, each containing a grid of numbers. The first tab

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""
"""rand_char.py
----------------
Generate and Print Random Unicode Characters
This module generates a string of random Unicode characters, specifically

View File

@ -1,5 +1,6 @@
#!/usr/bin/env
"""
"""creatures.py
----------------
This module implements a simple console application to manage a list of creatures.
It provides functionalities to add a creature to the list, lookup creatures with
autocomplete support (press tab to auto-complete creature names), and quit the

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""
"""mtg.py
----------------
This module defines a command-line interface (CLI) application which allows
users to interact with a predefined list of completion options, specifically,
card names from the "Alara Reborn" set.

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""crypto_server.py
"""generate_server_keys.py
----------------
This module contains utilities for generating and storing server keys and

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""
"""secure_client.py
----------------
A module to establish a non-verifying SSL connection with a server and to
send/receive messages through a secure socket.
@ -21,10 +22,10 @@ def main(server_address: str, server_port: int):
context = SSLContext(PROTOCOL_TLS_CLIENT)
context.check_hostname = False
context.verify_mode = CERT_NONE
unsecure_socket: socket = create_connection(
(server_address, server_port)
)
secure_socket = context.wrap_socket(unsecure_socket) #, server_hostname="localhost")
unsecure_socket: socket = create_connection((server_address, server_port))
secure_socket = context.wrap_socket(
unsecure_socket
) # , server_hostname="localhost")
while True:
message = input()

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""
"""secure_server.py
----------------
This module facilitates creating an asynchronous SSL server that echoes
received messages. The server operates using SSL certificates stored in
the "server_keys" directory.

View File

@ -1,5 +1,5 @@
"""
set_get_attr_example.py
# /usr/bin/env python3
"""set_get_attr_example.py
-----------------------
This module contains a class named `Number` which implements special attribute
@ -32,6 +32,7 @@ Note:
but the `_number` value is printed instead of raising an AttributeError.
"""
class Number:
def __init__(self, number):
self._number = number
@ -66,6 +67,7 @@ class Number:
def __getattr__(self, name):
return self._number
if __name__ == "__main__":
number = Number(5)
print(number.num)

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""
"""thread_pool.py
----------------
This module demonstrates the use of asyncio to handle asynchronous and blocking
functions in Python. The module contains three functions: a blocking function
that simulates a long-running process with `time.sleep`, an asynchronous