+
+
+
+ diff --git a/Reema/Reema/__init__.py b/Reema/Reema/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Reema/Reema/asgi.py b/Reema/Reema/asgi.py new file mode 100644 index 0000000..00971e1 --- /dev/null +++ b/Reema/Reema/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for Reema project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/5.1/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Reema.settings') + +application = get_asgi_application() diff --git a/Reema/Reema/settings.py b/Reema/Reema/settings.py new file mode 100644 index 0000000..b6a3da7 --- /dev/null +++ b/Reema/Reema/settings.py @@ -0,0 +1,124 @@ +""" +Django settings for Reema project. + +Generated by 'django-admin startproject' using Django 5.1.2. + +For more information on this file, see +https://docs.djangoproject.com/en/5.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/5.1/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-cscp8n!^-r4%j$^tqngah3e)!%irvm=7inx0l_s30bz77yf0v!' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'Reema_app', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'Reema.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'Reema.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/5.1/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/5.1/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/5.1/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/Reema/Reema/urls.py b/Reema/Reema/urls.py new file mode 100644 index 0000000..697f450 --- /dev/null +++ b/Reema/Reema/urls.py @@ -0,0 +1,7 @@ +from django.contrib import admin +from django.urls import path, include + +urlpatterns = [ + path('admin/', admin.site.urls), + path('', include('Reema_app.urls', namespace='Reema_app')), +] \ No newline at end of file diff --git a/Reema/Reema/wsgi.py b/Reema/Reema/wsgi.py new file mode 100644 index 0000000..55ef053 --- /dev/null +++ b/Reema/Reema/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for Reema project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/5.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Reema.settings') + +application = get_wsgi_application() diff --git a/Reema/Reema_app/__init__.py b/Reema/Reema_app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Reema/Reema_app/admin.py b/Reema/Reema_app/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/Reema/Reema_app/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/Reema/Reema_app/apps.py b/Reema/Reema_app/apps.py new file mode 100644 index 0000000..9592e03 --- /dev/null +++ b/Reema/Reema_app/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class ReemaAppConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'Reema_app' diff --git a/Reema/Reema_app/migrations/__init__.py b/Reema/Reema_app/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Reema/Reema_app/models.py b/Reema/Reema_app/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/Reema/Reema_app/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/Reema/Reema_app/static/Django_stuff/Apps_Views__URL_Mappings (1).pdf b/Reema/Reema_app/static/Django_stuff/Apps_Views__URL_Mappings (1).pdf new file mode 100644 index 0000000..fb1fc05 Binary files /dev/null and b/Reema/Reema_app/static/Django_stuff/Apps_Views__URL_Mappings (1).pdf differ diff --git a/Reema/Reema_app/static/Django_stuff/Django (2).pdf b/Reema/Reema_app/static/Django_stuff/Django (2).pdf new file mode 100644 index 0000000..dd9f005 Binary files /dev/null and b/Reema/Reema_app/static/Django_stuff/Django (2).pdf differ diff --git a/Reema/Reema_app/static/Tpruple.jpeg b/Reema/Reema_app/static/Tpruple.jpeg new file mode 100644 index 0000000..33b136b Binary files /dev/null and b/Reema/Reema_app/static/Tpruple.jpeg differ diff --git a/Reema/Reema_app/static/Tuwaiq_project1/bank.py b/Reema/Reema_app/static/Tuwaiq_project1/bank.py new file mode 100644 index 0000000..28e2aa6 --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/bank.py @@ -0,0 +1,63 @@ +import random + +class Customer: + def __init__(self, customer_id, age, balance, has_credit_card, is_active_member, estimated_salary): + self.customer_id = customer_id + self.age = age + self.balance = balance + self.has_credit_card = has_credit_card + self.is_active_member = is_active_member + self.estimated_salary = estimated_salary + + def predict_churn(self): + """Predict churn based on customer attributes.""" + if self.balance < 5000 and not self.is_active_member: + return True + elif self.age > 60 and self.balance < 10000: + return True + elif self.has_credit_card and self.balance > 20000: + return False + else: + return random.choice([True, False]) # Random prediction for other cases + +def get_customer_data(): + """Get customer data from user input.""" + customer_data = {} + try: + customer_data['customer_id'] = input("Enter customer ID: ") + customer_data['age'] = int(input("Enter customer age: ")) + customer_data['balance'] = float(input("Enter account balance: ")) + customer_data['has_credit_card'] = input("Has credit card? (yes/no): ").strip().lower() == 'yes' + customer_data['is_active_member'] = input("Is active member? (yes/no): ").strip().lower() == 'yes' + customer_data['estimated_salary'] = float(input("Enter estimated salary: ")) + + return customer_data + except ValueError as e: + print(f"Invalid input: {e}") + return None + +def main(): + """Main function to run churn prediction.""" + customers = [] + + while True: + customer_data = get_customer_data() + if customer_data is None: + continue + + customer = Customer(**customer_data) + churn_prediction = customer.predict_churn() + + if churn_prediction: + print(f"Customer {customer.customer_id} is likely to churn.") + else: + print(f"Customer {customer.customer_id} is not likely to churn.") + + customers.append(customer) + + another = input("Do you want to check another customer? (yes/no): ").strip().lower() + if another != 'yes': + break + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/Reema/Reema_app/static/Tuwaiq_project1/blood.py b/Reema/Reema_app/static/Tuwaiq_project1/blood.py new file mode 100644 index 0000000..ba44c52 --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/blood.py @@ -0,0 +1,68 @@ +# Blood Bank Management System + +class BloodBank: + def __init__(self): + self.donors = {} # Dictionary to store donor information + + def add_donor(self, name, blood_type, quantity): + donor_id = len(self.donors) + 1 + self.donors[donor_id] = { + 'name': name, + 'blood_type': blood_type, + 'quantity': quantity + } + print(f"Donor {name} added successfully!") + + def view_donors(self): + if not self.donors: + print("No donors found.") + else: + for donor_id, details in self.donors.items(): + print(f"ID: {donor_id}, Name: {details['name']}, Blood Type: {details['blood_type']}, Quantity: {details['quantity']}") + + def search_donor(self, donor_id): + if donor_id in self.donors: + details = self.donors[donor_id] + print(f"ID: {donor_id}, Name: {details['name']}, Blood Type: {details['blood_type']}, Quantity: {details['quantity']}") + else: + print("Donor not found.") + + def total_blood_quantity(self): + total = sum(details['quantity'] for details in self.donors.values()) + return total + +def display_menu(): + print("\n--- Blood Bank Management System ---") + print("1. Add Donor") + print("2. View Donors") + print("3. Search Donor") + print("4. Total Blood Quantity") + print("5. Exit") + +def main(): + blood_bank = BloodBank() + while True: + display_menu() + choice = input("Choose an option (1-5): ") + + if choice == '1': + name = input("Enter donor name: ") + blood_type = input("Enter blood type (A, B, AB, O): ") + quantity = float(input("Enter quantity of blood (in liters): ")) + blood_bank.add_donor(name, blood_type, quantity) + elif choice == '2': + blood_bank.view_donors() + elif choice == '3': + donor_id = int(input("Enter donor ID to search: ")) + blood_bank.search_donor(donor_id) + elif choice == '4': + total_quantity = blood_bank.total_blood_quantity() + print(f"Total blood quantity in the bank: {total_quantity} liters") + elif choice == '5': + print("Exiting the system.") + break + else: + print("Invalid choice. Please try again.") + +if __name__ == "__main__": + main() diff --git a/Reema/Reema_app/static/Tuwaiq_project1/employee.py b/Reema/Reema_app/static/Tuwaiq_project1/employee.py new file mode 100644 index 0000000..ff8e181 --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/employee.py @@ -0,0 +1,66 @@ +# Import necessary modules +import json + +# Function to display menu +def display_menu(): + print("\n--- Online Employee Recruitment System ---") + print("1. Add Employee") + print("2. View Employees") + print("3. Search Employee") + print("4. Exit") + +# Function to add an employee +def add_employee(employees): + name = input("Enter employee name: ") + age = int(input("Enter employee age: ")) + position = input("Enter employee position: ") + salary = float(input("Enter employee salary: ")) + + employee_id = len(employees) + 1 + employees[employee_id] = { + 'name': name, + 'age': age, + 'position': position, + 'salary': salary + } + print("Employee added successfully!") + +# Function to view all employees +def view_employees(employees): + if not employees: + print("No employees found.") + else: + for emp_id, details in employees.items(): + print(f"ID: {emp_id}, Name: {details['name']}, Age: {details['age']}, Position: {details['position']}, Salary: {details['salary']}") + +# Function to search for an employee +def search_employee(employees): + emp_id = int(input("Enter employee ID to search: ")) + if emp_id in employees: + details = employees[emp_id] + print(f"ID: {emp_id}, Name: {details['name']}, Age: {details['age']}, Position: {details['position']}, Salary: {details['salary']}") + else: + print("Employee not found.") + +# Main function +def main(): + employees = {} # Dictionary to store employee data + while True: + display_menu() + choice = input("Choose an option (1-4): ") + + if choice == '1': + add_employee(employees) + elif choice == '2': + view_employees(employees) + elif choice == '3': + search_employee(employees) + elif choice == '4': + print("Exiting the system.") + break + else: + print("Invalid choice. Please try again.") + +# Entry point of the program +if __name__ == "__main__": + main() diff --git a/Reema/Reema_app/static/Tuwaiq_project1/main.py b/Reema/Reema_app/static/Tuwaiq_project1/main.py new file mode 100644 index 0000000..889fd5d --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/main.py @@ -0,0 +1,67 @@ +import smtplib +from email.mime.text import MIMEText +from email.mime.multipart import MIMEMultipart +import datetime + +# Function to send reminder email +def send_reminder_email(recipient, subject, body): + try: + # Email configuration + sender_email = "your_email@example.com" + sender_password = "your_password" + + # Create the email + msg = MIMEMultipart() + msg['From'] = sender_email + msg['To'] = recipient + msg['Subject'] = subject + + msg.attach(MIMEText(body, 'plain')) + + # Establish connection and send email + with smtplib.SMTP('smtp.example.com', 587) as server: + server.starttls() + server.login(sender_email, sender_password) + server.send_message(msg) + print(f"Email sent to {recipient}") + except Exception as e: + print(f"Error: {e}") + +# Main function to handle reminders +def main(): + # List of recipients + recipients = ['user1@example.com', 'user2@example.com'] + + # Dictionary for reminders + reminders = { + 'user1@example.com': 'Meeting at 3 PM', + 'user2@example.com': 'Project deadline tomorrow' + } + + # Current time + current_time = datetime.datetime.now() + + # Loop through recipients + for recipient in recipients: + # Check if the recipient has a reminder + if recipient in reminders: + subject = "Reminder" + body = reminders[recipient] + send_reminder_email(recipient, subject, body) + + # While loop for user input + while True: + user_input = input("Do you want to add another reminder? (yes/no): ") + if user_input.lower() == 'yes': + email = input("Enter email: ") + reminder = input("Enter reminder: ") + reminders[email] = reminder + print(f"Reminder added for {email}.") + elif user_input.lower() == 'no': + break + else: + print("Invalid input. Please enter 'yes' or 'no'.") + +# Run the main function +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/Reema/Reema_app/static/Tuwaiq_project1/project.py b/Reema/Reema_app/static/Tuwaiq_project1/project.py new file mode 100644 index 0000000..703869d --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/project.py @@ -0,0 +1,85 @@ +#import predefined page sizes +#create and manipulate PDF documents +from reportlab.lib.pagesizes import letter +from reportlab.pdfgen import canvas + +# Custom Exception for handling receipt errors +class ReceiptError(Exception): + pass + +# Class for Payment Receipt +class PaymentReceipt: + def __init__(self, receipt_id, customer_name, items): + self.receipt_id = receipt_id + self.customer_name = customer_name + self.items = items # List of tuples (item_name, item_price) + + def calculate_total(self): + """Calculate the total amount for the receipt.""" + return sum(price for _, price in self.items) + + def generate_receipt(self): + """Generate the receipt as a dictionary.""" + return { + 'Receipt ID': self.receipt_id, + 'Customer Name': self.customer_name, + 'Items': self.items, + 'Total Amount': self.calculate_total() + } + +# Function to save receipt to a PDF file +def save_receipt_to_pdf(receipt): + """Save the receipt as a PDF file.""" + filename = f"receipt_{receipt['Receipt ID']}.pdf" + try: + c = canvas.Canvas(filename, pagesize=letter) + c.drawString(100, 750, f"Receipt ID: {receipt['Receipt ID']}") + c.drawString(100, 730, f"Customer Name: {receipt['Customer Name']}") + c.drawString(100, 710, "Items:") + + y = 690 + for item in receipt['Items']: + c.drawString(100, y, f"{item[0]}: ${item[1]:.2f}") + y -= 20 + + c.drawString(100, y, f"Total Amount: ${receipt['Total Amount']:.2f}") + c.save() + except Exception as e: + raise ReceiptError(f"Error saving receipt to PDF: {e}") + +# Function to get items from user input +def get_items(): + """Get items from user input and return as a list of tuples.""" + items = [] + while True: + item_name = input("Enter item name (or 'done' to finish): ") + if item_name.lower() == 'done': + break + item_price = float(input(f"Enter price for {item_name}: ")) # Data type casting + items.append((item_name, item_price)) + return items + +# Main function +def main(): + """Main function to create and save a payment receipt.""" + # Using variables and data type casting + receipt_id = input("Enter Receipt ID: ") + customer_name = input("Enter Customer Name: ") + + # Get items from user + items = get_items() + + # Creating a PaymentReceipt object + receipt = PaymentReceipt(receipt_id, customer_name, items) + + # Generating receipt + generated_receipt = receipt.generate_receipt() + print("\nGenerated Receipt:") + print(generated_receipt) + + # Saving receipt to PDF + save_receipt_to_pdf(generated_receipt) + print(f"Receipt saved as {generated_receipt['Receipt ID']}.pdf") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/Reema/Reema_app/static/Tuwaiq_project1/qr.py b/Reema/Reema_app/static/Tuwaiq_project1/qr.py new file mode 100644 index 0000000..ed7eeff --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/qr.py @@ -0,0 +1,42 @@ +import qrcode +import os + +# Function to generate QR code +def generate_qr_code(link, filename): + try: + # Create QR code + qr = qrcode.QRCode( + version=1, + error_correction=qrcode.constants.ERROR_CORRECT_L, + box_size=10, + border=4, + ) + qr.add_data(link) + qr.make(fit=True) + + img = qr.make_image(fill_color="black", back_color="white") + img.save(filename) + print(f"QR code saved as {filename}") + except Exception as e: + print(f"Error generating QR code: {e}") + +# Main function to handle user input and QR code generation +def main(): + links = [] # List to store links + while True: + link = input("Enter a link to generate QR code (or 'exit' to quit): ") + if link.lower() == 'exit': + break + elif link.startswith("http://") or link.startswith("https://"): + links.append(link) + else: + print("Invalid link. Please enter a valid URL starting with http:// or https://") + + # Generate QR codes for all valid links + for index, link in enumerate(links): + filename = f"qr_code_{index + 1}.png" + generate_qr_code(link, filename) + +# Run the main function +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/Activate.ps1 b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/Activate.ps1 new file mode 100644 index 0000000..e4891d8 --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/Activate.ps1 @@ -0,0 +1,502 @@ +<# +.Synopsis +Activate a Python virtual environment for the current PowerShell session. + +.Description +Pushes the python executable for a virtual environment to the front of the +$Env:PATH environment variable and sets the prompt to signify that you are +in a Python virtual environment. Makes use of the command line switches as +well as the `pyvenv.cfg` file values present in the virtual environment. + +.Parameter VenvDir +Path to the directory that contains the virtual environment to activate. The +default value for this is the parent of the directory that the Activate.ps1 +script is located within. + +.Parameter Prompt +The prompt prefix to display when this virtual environment is activated. By +default, this prompt is the name of the virtual environment folder (VenvDir) +surrounded by parentheses and followed by a single space (ie. '(.venv) '). + +.Example +Activate.ps1 +Activates the Python virtual environment that contains the Activate.ps1 script. + +.Example +Activate.ps1 -Verbose +Activates the Python virtual environment that contains the Activate.ps1 script, +and shows extra information about the activation as it executes. + +.Example +Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv +Activates the Python virtual environment located in the specified location. + +.Example +Activate.ps1 -Prompt "MyPython" +Activates the Python virtual environment that contains the Activate.ps1 script, +and prefixes the current prompt with the specified string (surrounded in +parentheses) while the virtual environment is active. + +.Notes +On Windows, it may be required to enable this Activate.ps1 script by setting the +execution policy for the user. You can do this by issuing the following PowerShell +command: + +PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + +For more information on Execution Policies: +https://go.microsoft.com/fwlink/?LinkID=135170 + +#> +Param( + [Parameter(Mandatory = $false)] + [String] + $VenvDir, + [Parameter(Mandatory = $false)] + [String] + $Prompt +) + +<# Function declarations --------------------------------------------------- #> + +<# +.Synopsis +Remove all shell session elements added by the Activate script, including the +addition of the virtual environment's Python executable from the beginning of +the PATH variable. + +.Parameter NonDestructive +If present, do not remove this function from the global namespace for the +session. + +#> +function global:deactivate ([switch]$NonDestructive) { + # Revert to original values + + # The prior prompt: + if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { + Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt + Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT + } + + # The prior PYTHONHOME: + if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { + Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME + Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME + } + + # The prior PATH: + if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { + Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH + Remove-Item -Path Env:_OLD_VIRTUAL_PATH + } + + # Just remove the VIRTUAL_ENV altogether: + if (Test-Path -Path Env:VIRTUAL_ENV) { + Remove-Item -Path env:VIRTUAL_ENV + } + + # Just remove VIRTUAL_ENV_PROMPT altogether. + if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { + Remove-Item -Path env:VIRTUAL_ENV_PROMPT + } + + # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: + if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { + Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force + } + + # Leave deactivate function in the global namespace if requested: + if (-not $NonDestructive) { + Remove-Item -Path function:deactivate + } +} + +<# +.Description +Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the +given folder, and returns them in a map. + +For each line in the pyvenv.cfg file, if that line can be parsed into exactly +two strings separated by `=` (with any amount of whitespace surrounding the =) +then it is considered a `key = value` line. The left hand string is the key, +the right hand is the value. + +If the value starts with a `'` or a `"` then the first and last character is +stripped from the value before being captured. + +.Parameter ConfigDir +Path to the directory that contains the `pyvenv.cfg` file. +#> +function Get-PyVenvConfig( + [String] + $ConfigDir +) { + Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" + + # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). + $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue + + # An empty map will be returned if no config file is found. + $pyvenvConfig = @{ } + + if ($pyvenvConfigPath) { + + Write-Verbose "File exists, parse `key = value` lines" + $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath + + $pyvenvConfigContent | ForEach-Object { + $keyval = $PSItem -split "\s*=\s*", 2 + if ($keyval[0] -and $keyval[1]) { + $val = $keyval[1] + + # Remove extraneous quotations around a string value. + if ("'""".Contains($val.Substring(0, 1))) { + $val = $val.Substring(1, $val.Length - 2) + } + + $pyvenvConfig[$keyval[0]] = $val + Write-Verbose "Adding Key: '$($keyval[0])'='$val'" + } + } + } + return $pyvenvConfig +} + + +<# Begin Activate script --------------------------------------------------- #> + +# Determine the containing directory of this script +$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition +$VenvExecDir = Get-Item -Path $VenvExecPath + +Write-Verbose "Activation script is located in path: '$VenvExecPath'" +Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" +Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" + +# Set values required in priority: CmdLine, ConfigFile, Default +# First, get the location of the virtual environment, it might not be +# VenvExecDir if specified on the command line. +if ($VenvDir) { + Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" +} +else { + Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." + $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") + Write-Verbose "VenvDir=$VenvDir" +} + +# Next, read the `pyvenv.cfg` file to determine any required value such +# as `prompt`. +$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir + +# Next, set the prompt from the command line, or the config file, or +# just use the name of the virtual environment folder. +if ($Prompt) { + Write-Verbose "Prompt specified as argument, using '$Prompt'" +} +else { + Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" + if ($pyvenvCfg -and $pyvenvCfg['prompt']) { + Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" + $Prompt = $pyvenvCfg['prompt']; + } + else { + Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" + Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" + $Prompt = Split-Path -Path $venvDir -Leaf + } +} + +Write-Verbose "Prompt = '$Prompt'" +Write-Verbose "VenvDir='$VenvDir'" + +# Deactivate any currently active virtual environment, but leave the +# deactivate function in place. +deactivate -nondestructive + +# Now set the environment variable VIRTUAL_ENV, used by many tools to determine +# that there is an activated venv. +$env:VIRTUAL_ENV = $VenvDir + +if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { + + Write-Verbose "Setting prompt to '$Prompt'" + + # Set the prompt to include the env name + # Make sure _OLD_VIRTUAL_PROMPT is global + function global:_OLD_VIRTUAL_PROMPT { "" } + Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT + New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt + + function global:prompt { + Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " + _OLD_VIRTUAL_PROMPT + } + $env:VIRTUAL_ENV_PROMPT = $Prompt +} + +# Clear PYTHONHOME +if (Test-Path -Path Env:PYTHONHOME) { + Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME + Remove-Item -Path Env:PYTHONHOME +} + +# Add the venv to the PATH +Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH +$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" + +# SIG # Begin signature block +# MIIvJAYJKoZIhvcNAQcCoIIvFTCCLxECAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBnL745ElCYk8vk +# dBtMuQhLeWJ3ZGfzKW4DHCYzAn+QB6CCE8MwggWQMIIDeKADAgECAhAFmxtXno4h +# MuI5B72nd3VcMA0GCSqGSIb3DQEBDAUAMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV +# BAMTGERpZ2lDZXJ0IFRydXN0ZWQgUm9vdCBHNDAeFw0xMzA4MDExMjAwMDBaFw0z +# ODAxMTUxMjAwMDBaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ +# bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lDZXJ0 +# IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB +# AL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3EMB/z +# G6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTcMKyunWZ +# anMylNEQRBAu34LzB4TmdDttceItDBvuINXJIB1jKS3O7F5OyJP4IWGbNOsFxl7s +# Wxq868nPzaw0QF+xembud8hIqGZXV59UWI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ybfmuePN1UHMDcGCyqGSIb3DQEJEAIvMSgwJjAkMCIEINL25G3tdCLM0dRA +# V2hBNm+CitpVmq4zFq9NGprUDHgoMA0GCSqGSIb3DQEBAQUABIICAFRAXwhn3az4 +# r+zhZk2K3gibUwGFM4dHGKh1RD383PsnUii90EaBVzixPIppOs7v0iZOER2tce8u +# xgQ3IZtjRIuQmCh+9I6zWIH59MssGU6igexTAjc0dIfV66UeFlh2aSWWckxmaTI/ +# jXgpqx2sk4dlqJKrR/d084gyevoCkQNerED/FuwJ6bX8omhIikyHdoo6hbL595tK +# 4ekxek027svbPFC0WbAxZXLq428C5endJaAQV2RTCk0B1vgPFw5bvznldlQnRqMu +# vcd1GSoSVN16kw5UKWXEyP0e07yiXEPkFoPBSC/c5o7COjidK2VOlVY/gsorVMEA +# rx/apEwf1F70vD2caiIsUAhrmPzyslFZfU6o2fKXI/vrBTUvbzb5Vz+IGoXlwTH+ +# loWh4loof+pJjbpJJj26GQwssAl3M/m/3BGamnmf97CJShvPrM0w8WOLkXtn6/M4 +# Y15ywECiRhaQX7NUVzRBl1hGDDD0mFv/OHzMer3C4/8I04whBnfvMxelUb4YhlM6 +# e+F6DzvI91OWTrpjsPKOHE3ds9ra+F1yPkV1RMQMRx/xWd0D274R8W2baHxrYgS3 +# 2LYPSAYFMi3cmF6Df84iIG2d0qj0x3ioXDUUk72YTCUO1Xnz9jkHSCU7Bq2GL9uP +# z4sEyNDU23dEmfGD672vMRuZ6Ua/ks5J +# SIG # End signature block diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/activate b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/activate new file mode 100644 index 0000000..4f9784c --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/activate @@ -0,0 +1,76 @@ +# This file must be used with "source bin/activate" *from bash* +# You cannot run it directly + +deactivate () { + # reset old environment variables + if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then + PATH="${_OLD_VIRTUAL_PATH:-}" + export PATH + unset _OLD_VIRTUAL_PATH + fi + if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then + PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" + export PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME + fi + + # This should detect bash and zsh, which have a hash command that must + # be called to get it to forget past commands. Without forgetting + # past commands the $PATH changes we made may not be respected + if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then + hash -r 2> /dev/null + fi + + if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then + PS1="${_OLD_VIRTUAL_PS1:-}" + export PS1 + unset _OLD_VIRTUAL_PS1 + fi + + unset VIRTUAL_ENV + unset VIRTUAL_ENV_PROMPT + if [ ! "${1:-}" = "nondestructive" ] ; then + # Self destruct! + unset -f deactivate + fi +} + +# unset irrelevant variables +deactivate nondestructive + +# on Windows, a path can contain colons and backslashes and has to be converted: +if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ] ; then + # transform D:\path\to\venv to /d/path/to/venv on MSYS + # and to /cygdrive/d/path/to/venv on Cygwin + export VIRTUAL_ENV=$(cygpath "C:\Users\rayoo\OneDrive\سطح المكتب\Tuwaiq_project1\receipt") +else + # use the path as-is + export VIRTUAL_ENV="C:\Users\rayoo\OneDrive\سطح المكتب\Tuwaiq_project1\receipt" +fi + +_OLD_VIRTUAL_PATH="$PATH" +PATH="$VIRTUAL_ENV/Scripts:$PATH" +export PATH + +# unset PYTHONHOME if set +# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) +# could use `if (set -u; : $PYTHONHOME) ;` in bash +if [ -n "${PYTHONHOME:-}" ] ; then + _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" + unset PYTHONHOME +fi + +if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then + _OLD_VIRTUAL_PS1="${PS1:-}" + PS1="(receipt) ${PS1:-}" + export PS1 + VIRTUAL_ENV_PROMPT="(receipt) " + export VIRTUAL_ENV_PROMPT +fi + +# This should detect bash and zsh, which have a hash command that must +# be called to get it to forget past commands. Without forgetting +# past commands the $PATH changes we made may not be respected +if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then + hash -r 2> /dev/null +fi diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/activate.bat b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/activate.bat new file mode 100644 index 0000000..fa0d336 --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/activate.bat @@ -0,0 +1,34 @@ +@echo off + +rem This file is UTF-8 encoded, so we need to update the current code page while executing it +for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do ( + set _OLD_CODEPAGE=%%a +) +if defined _OLD_CODEPAGE ( + "%SystemRoot%\System32\chcp.com" 65001 > nul +) + +set VIRTUAL_ENV=C:\Users\rayoo\OneDrive\سطح المكتب\Tuwaiq_project1\receipt + +if not defined PROMPT set PROMPT=$P$G + +if defined _OLD_VIRTUAL_PROMPT set PROMPT=%_OLD_VIRTUAL_PROMPT% +if defined _OLD_VIRTUAL_PYTHONHOME set PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME% + +set _OLD_VIRTUAL_PROMPT=%PROMPT% +set PROMPT=(receipt) %PROMPT% + +if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME% +set PYTHONHOME= + +if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH% +if not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH% + +set PATH=%VIRTUAL_ENV%\Scripts;%PATH% +set VIRTUAL_ENV_PROMPT=(receipt) + +:END +if defined _OLD_CODEPAGE ( + "%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul + set _OLD_CODEPAGE= +) diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/chardetect.exe b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/chardetect.exe new file mode 100644 index 0000000..ee3e6a7 Binary files /dev/null and b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/chardetect.exe differ diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/deactivate.bat b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/deactivate.bat new file mode 100644 index 0000000..62a39a7 --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/deactivate.bat @@ -0,0 +1,22 @@ +@echo off + +if defined _OLD_VIRTUAL_PROMPT ( + set "PROMPT=%_OLD_VIRTUAL_PROMPT%" +) +set _OLD_VIRTUAL_PROMPT= + +if defined _OLD_VIRTUAL_PYTHONHOME ( + set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%" + set _OLD_VIRTUAL_PYTHONHOME= +) + +if defined _OLD_VIRTUAL_PATH ( + set "PATH=%_OLD_VIRTUAL_PATH%" +) + +set _OLD_VIRTUAL_PATH= + +set VIRTUAL_ENV= +set VIRTUAL_ENV_PROMPT= + +:END diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pip.exe b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pip.exe new file mode 100644 index 0000000..8a77dcb Binary files /dev/null and b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pip.exe differ diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pip3.12.exe b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pip3.12.exe new file mode 100644 index 0000000..8a77dcb Binary files /dev/null and b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pip3.12.exe differ diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pip3.exe b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pip3.exe new file mode 100644 index 0000000..8a77dcb Binary files /dev/null and b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pip3.exe differ diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/python.exe b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/python.exe new file mode 100644 index 0000000..71092d0 Binary files /dev/null and b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/python.exe differ diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pythonw.exe b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pythonw.exe new file mode 100644 index 0000000..4710dd5 Binary files /dev/null and b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/pythonw.exe differ diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/qr.exe b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/qr.exe new file mode 100644 index 0000000..6e21396 Binary files /dev/null and b/Reema/Reema_app/static/Tuwaiq_project1/receipt/Scripts/qr.exe differ diff --git a/Reema/Reema_app/static/Tuwaiq_project1/receipt/pyvenv.cfg b/Reema/Reema_app/static/Tuwaiq_project1/receipt/pyvenv.cfg new file mode 100644 index 0000000..b15e582 --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/receipt/pyvenv.cfg @@ -0,0 +1,5 @@ +home = C:\Users\rayoo\AppData\Local\Programs\Python\Python312 +include-system-site-packages = false +version = 3.12.0 +executable = C:\Users\rayoo\AppData\Local\Programs\Python\Python312\python.exe +command = C:\Users\rayoo\AppData\Local\Programs\Python\Python312\python.exe -m venv C:\Users\rayoo\OneDrive\سطح المكتب\Tuwaiq_project1\receipt diff --git a/Reema/Reema_app/static/Tuwaiq_project1/textToSound.py b/Reema/Reema_app/static/Tuwaiq_project1/textToSound.py new file mode 100644 index 0000000..a0b36f0 --- /dev/null +++ b/Reema/Reema_app/static/Tuwaiq_project1/textToSound.py @@ -0,0 +1,54 @@ +from gtts import gTTS +import os +import playsound + +class TextToSpeech: + def __init__(self): + self.language = 'en' # Default language + + def set_language(self, language): + self.language = language + + def text_to_speech(self, text): + try: + # Create a gTTS object + tts = gTTS(text=text, lang=self.language, slow=False) + filename = "output.mp3" + tts.save(filename) # Save the audio file + playsound.playsound(filename) # Play the audio file + return filename + except Exception as e: + print(f"An error occurred: {e}") + return None + +def display_menu(): + print("\n--- Text to Speech Converter ---") + print("1. Convert Text to Speech") + print("2. Change Language") + print("3. Exit") + +def main(): + tts_system = TextToSpeech() + + while True: + display_menu() + choice = input("Choose an option (1-3): ") + + if choice == '1': + text = input("Enter the text you want to convert to speech: ") + if text.strip(): # Check if text is not empty + tts_system.text_to_speech(text) + else: + print("Text cannot be empty.") + elif choice == '2': + language = input("Enter language code (e.g., 'en' for English, 'es' for Spanish): ") + tts_system.set_language(language) + print(f"Language set to {language}.") + elif choice == '3': + print("Exiting the system.") + break + else: + print("Invalid choice. Please try again.") + +if __name__ == "__main__": + main() diff --git a/Reema/Reema_app/static/ai.png b/Reema/Reema_app/static/ai.png new file mode 100644 index 0000000..b6d1912 Binary files /dev/null and b/Reema/Reema_app/static/ai.png differ diff --git a/Reema/Reema_app/static/css/careers_style.css b/Reema/Reema_app/static/css/careers_style.css new file mode 100644 index 0000000..1eb6304 --- /dev/null +++ b/Reema/Reema_app/static/css/careers_style.css @@ -0,0 +1,52 @@ +body { + font-family: Arial, sans-serif; + background-color: #f4f4f4; + margin: 0; + padding: 20px; +} + +.container { + max-width: 800px; + margin: auto; + background: white; + padding: 20px; + border-radius: 8px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); +} + +header { + text-align: center; + margin-bottom: 20px; +} + +h1 { + color: #333; +} + +h2 { + color: #007BFF; + border-bottom: 2px solid #007BFF; + padding-bottom: 5px; +} + +ul { + list-style-type: none; + padding: 0; +} + +ul li { + background: #e9ecef; + margin: 5px 0; + padding: 10px; + border-radius: 4px; +} + +a { + color: #007BFF; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + diff --git a/Reema/Reema_app/static/css/homePage_style.css b/Reema/Reema_app/static/css/homePage_style.css new file mode 100644 index 0000000..86d6d4f --- /dev/null +++ b/Reema/Reema_app/static/css/homePage_style.css @@ -0,0 +1,85 @@ +body { + font-family: 'Arial', sans-serif; + margin: 0; + padding: 0; + background-image: url('/static/Tpruple.jpeg'); + background-size: cover; + background-position: center; +} + +header { + background-color: rgba(51, 51, 51, 0.8); + color: #fff; + padding: 20px; + text-align: center; +} + +nav ul { + list-style-type: none; + padding: 0; +} + +nav ul li { + display: inline; + margin: 0 15px; +} + +nav ul li a { + color: #ffffff; + text-decoration: none; +} + +nav ul li a:hover { + text-decoration: underline; +} + +main { + display: flex; + flex-direction: column; /* Stack elements vertically */ + justify-content: center; + align-items: center; /* Center items horizontally */ + height: calc(100vh - 160px); /* Adjust height based on header and footer */ +} + +.welcome-message { + text-align: center; + margin-bottom: 20px; /* Space between the message and buttons */ +} + +.welcome-message h2 { + color: #fff; /* Change to match your design */ + font-size: 24px; /* Adjust size as needed */ + text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Optional shadow for better visibility */ +} + +.button-container { + display: flex; + flex-direction: column; + gap: 15px; /* Space between buttons */ +} + +.button { + background-color: #ffffff; + color: #333; + padding: 15px 30px; + text-align: center; + text-decoration: none; + border-radius: 5px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + transition: background-color 0.3s, transform 0.3s; +} + +.button:hover { + background-color: rgba(115, 112, 112, 0.8); + transform: translateY(-2px); +} + +footer { + text-align: center; + padding: 10px; + background-color: rgba(51, 51, 51, 0.8); + color: #fff; + position: relative; + bottom: 0; + width: 100%; +} diff --git a/Reema/Reema_app/static/css/personal_style.css b/Reema/Reema_app/static/css/personal_style.css new file mode 100644 index 0000000..e9825c4 --- /dev/null +++ b/Reema/Reema_app/static/css/personal_style.css @@ -0,0 +1,62 @@ +body { + font-family: 'Roboto', sans-serif; + background-size: cover; + background-position: center; + color: #333; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + align-items: center; /* Center items horizontally */ + justify-content: center; /* Center items vertically */ + height: 100vh; /* Full viewport height */ +} + +header { + background-color: rgba(150, 175, 151, 0.8); + color: white; + text-align: center; + padding: 20px; + width: 100%; +} + +h1 { + font-size: 2.5em; + margin: 0; +} + +h2 { + font-size: 1.5em; + margin: 10px 0 20px; +} + +section { + background-color: rgba(206, 223, 224, 0.9); + border-radius: 8px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); + margin: 20px; + padding: 20px; + width: 80%; + max-width: 600px; +} + +.about, .contact { + margin-bottom: 20px; +} + +h3 { + color: #307f33; +} + +p { + line-height: 1.6; +} + +footer { + margin-top: auto; + padding: 10px; + text-align: center; + width: 100%; + background-color: rgba(178, 200, 179, 0.8); + color: white; +} diff --git a/Reema/Reema_app/static/email.png b/Reema/Reema_app/static/email.png new file mode 100644 index 0000000..74a9f7a Binary files /dev/null and b/Reema/Reema_app/static/email.png differ diff --git a/Reema/Reema_app/templates/Reema_app/Article.html b/Reema/Reema_app/templates/Reema_app/Article.html new file mode 100644 index 0000000..ce2c995 --- /dev/null +++ b/Reema/Reema_app/templates/Reema_app/Article.html @@ -0,0 +1,51 @@ +{% load static %} + + +
+ + +The phrase "The Far Future Is Coming Soon" reflects the rapid advancements in artificial intelligence (AI) that are reshaping our world. AI is transforming industries like healthcare, finance, and transportation, allowing for improved diagnostics, enhanced security, and the rise of autonomous vehicles. + + AI also augments human capabilities, enabling us to focus on creativity and complex problem-solving. Virtual assistants and smart technologies enhance productivity, fostering collaboration between humans and machines. + + Moreover, AI addresses global challenges such as climate change and food security by optimizing resources and improving agricultural practices. + + In essence, the future is not just approaching; it’s already here, with AI leading the way in this transformative journey.
++966564463367 | Saudi Arabia | reemaalbrahim28@gmail.com
+Artificial Intelligence graduate with a robust foundation in machine learning, data analytics, and programming. Experienced in full stack development, skilled at leveraging algorithms and statistical models to extract meaningful insights from data. Strong problem-solving abilities and a commitment to continuous learning in the rapidly evolving fields of AI and computer engineering.
+Bachelor's in Artificial Intelligence | Imam Abdulrahman Bin Faisal University (2019-2024)
+Cumulative GPA: 4.5/5, Honor Roll
+Training: Shobbak platform
+Artificial Intelligence Trainee | Solutions By 42 Group
+Worked as an artificial intelligence trainee, focusing on various projects including Fetal Hypoxia Detection Using ML techniques.
+Member of the Computer Science Club, Organizational Committee
+Member of Google Developer Student Clubs
++ I am Reema Albrahim, and I recently graduated with a bachelors degree in Artificial Intelligence + from Imam Abdulrahman bin Faisal University. I chose to major in Artificial Intelligence because I am fascinated by its + transformative potential to solve complex problems and improve lives, and I am eager to be at the forefront of innovation that shapes the future of technology and society. +
+Email: Reemaalbrahim28@gmail.com
+Phone: 0564463367
+