Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SKY NET. Juntos com LILITI STK 3.6.9 INTELIGÊNCIA ARTIFICIAL #1390

Open
Tracked by #1392
felipeliliti opened this issue Aug 22, 2024 · 0 comments
Open
Tracked by #1392

SKY NET. Juntos com LILITI STK 3.6.9 INTELIGÊNCIA ARTIFICIAL #1390

felipeliliti opened this issue Aug 22, 2024 · 0 comments

Comments

@felipeliliti
Copy link

1. QuantumLink: Portal of Space Data

README.md

# QuantumLink: Portal of Space Data

QuantumLink is a conceptual project that simulates sending data to space. This application allows users to store and "send" data, representing the virtual transfer of information to outer space.

## Features
- Store data locally.
- Simulate sending data to space.
- Encryption of stored data.

## Installation

1. Clone the repository:
   ```bash
   git clone https://github.com/yourusername/quantumlink.git
   cd quantumlink
  1. Install dependencies:

    pip install cryptography
  2. Run the application:

    python main.py

Usage

  1. Store Data: Input data to be stored.
  2. Send Data to Space: Simulate sending the stored data to space.
  3. Exit: Close the application.

License

This project is licensed under the MIT License.


**main.py**

```python
import json
import time
from cryptography.fernet import Fernet
import os

# Generate and save a key for encryption
def generate_key():
    key = Fernet.generate_key()
    with open("key.key", "wb") as key_file:
        key_file.write(key)

def load_key():
    return open("key.key", "rb").read()

class SpaceDataChannel:
    def __init__(self):
        self.data_storage = []
        self.key = load_key()
        self.cipher = Fernet(self.key)

    def store_data(self, data):
        encrypted_data = self.cipher.encrypt(data.encode())
        self.data_storage.append(encrypted_data)
        print("Data stored locally.")

    def send_data_to_space(self):
        if not self.data_storage:
            print("No data to send.")
            return
        
        print("Sending data to space...")
        time.sleep(2)
        self.data_storage.clear()
        print("Data sent successfully!")

def main():
    try:
        generate_key()
    except FileExistsError:
        pass
    
    channel = SpaceDataChannel()
    
    while True:
        print("\n1. Store Data")
        print("2. Send Data to Space")
        print("3. Exit")
        choice = input("Choose an option: ")

        if choice == '1':
            data = input("Enter data to store: ")
            channel.store_data(data)
        elif choice == '2':
            channel.send_data_to_space()
        elif choice == '3':
            print("Exiting...")
            break
        else:
            print("Invalid choice. Please try again.")

if __name__ == "__main__":
    main()

2. EcoGuard AI: Advanced Pandemic Monitoring and Control System

README.md

# EcoGuard AI: Advanced Pandemic Monitoring and Control System

EcoGuard AI is a sophisticated project that utilizes neural networks and natural resources to monitor and control pandemics. This system aims to predict and mitigate the effects of pandemics by combining environmental data with machine learning models.

## Features
- Neural network model for pandemic control prediction.
- Integration with environmental data.
- Visualization of model performance.

## Installation

1. Clone the repository:
   ```bash
   git clone https://github.com/yourusername/ecoguard-ai.git
   cd ecoguard-ai
  1. Install dependencies:

    pip install tensorflow scikit-learn matplotlib
  2. Run the application:

    python main.py

Usage

  1. Training Model: The model is trained on provided data.
  2. Predict Control Measures: Use the model to predict control measures for new data.
  3. Visualize Performance: Review training and validation loss graphs.

License

This project is licensed under the MIT License.


**main.py**

```python
import numpy as np
import tensorflow as tf
from tensorflow import keras
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
import matplotlib.pyplot as plt

# Example data and labels
data = np.array([
    [100, 50],
    [200, 60],
    [300, 70],
    [400, 80],
    [500, 90]
])
labels = np.array([10, 20, 30, 40, 50])

# Data preprocessing
scaler = StandardScaler()
data = scaler.fit_transform(data)
X_train, X_test, y_train, y_test = train_test_split(data, labels, test_size=0.2, random_state=42)

# Model construction
model = keras.Sequential([
    keras.layers.Dense(64, activation='relu', input_shape=(X_train.shape[1],)),
    keras.layers.Dense(32, activation='relu'),
    keras.layers.Dense(1)
])

model.compile(optimizer='adam', loss='mean_squared_error')

# Model training
history = model.fit(X_train, y_train, epochs=100, validation_split=0.2, verbose=1)

# Model evaluation
loss = model.evaluate(X_test, y_test)
print(f'Model Loss: {loss}')

# Performance visualization
plt.plot(history.history['loss'], label='Loss')
plt.plot(history.history['val_loss'], label='Validation Loss')
plt.xlabel('Epoch')
plt.ylabel('Loss')
plt.legend()
plt.show()

# Predicting control measures
new_data = np.array([[250, 65]])
new_data = scaler.transform(new_data)
prediction = model.predict(new_data)
print(f'Predicted control measure: {prediction[0][0]}')

3. Task Manager in Python

README.md

# Task Manager in Python

A simple task manager application for managing your daily tasks. This application allows you to add, view, and remove tasks.

## Features
- Add tasks to a list.
- View the list of tasks.
- Remove tasks from the list.

## Installation

1. Clone the repository:
   ```bash
   git clone https://github.com/yourusername/task-manager.git
   cd task-manager
  1. Install dependencies:

    pip install tkinter
  2. Run the application:

    python main.py

Usage

  1. Add Task: Enter a task and click "Add Task".
  2. View Tasks: Click "View Tasks" to see all tasks.
  3. Remove Task: View tasks and remove by number.

License

This project is licensed under the MIT License.


**main.py**

```python
import tkinter as tk
from tkinter import messagebox, simpledialog
import json
import os

TASKS_FILE = 'tasks.json'

def load_tasks():
    if os.path.exists(TASKS_FILE):
        with open(TASKS_FILE, 'r') as file:
            return json.load(file)
    return []

def save_tasks(tasks):
    with open(TASKS_FILE, 'w') as file:
        json.dump(tasks, file)

class TaskManagerApp:
    def __init__(self, root):
        self.root = root
        self.root.title("Task Manager")
        
        self.tasks = load_tasks()
        
        self.task_entry = tk.Entry(root, width=50)
        self.task_entry.pack(pady=10)
        
        self.add_task_button = tk.Button(root, text="Add Task", command=self.add_task)
        self.add_task_button.pack(pady=5)
        
        self.view_tasks_button = tk.Button(root, text="View Tasks", command=self.view_tasks)
        self.view_tasks_button.pack(pady=5)
        
        self.remove_task_button = tk.Button(root, text="Remove Task", command=self.remove_task)
        self.remove_task_button.pack(pady=5)

    def add_task(self):
        task = self.task_entry.get()
        if task:
            self.tasks.append(task)
            save_tasks(self.tasks)
            messagebox.showinfo("Success", "Task added successfully!")
            self.task_entry.delete(0, tk.END)
        else:
            messagebox.showwarning("Warning", "Enter a task to add.")

    def view_tasks(self):
        if not self.tasks:
            messagebox.showinfo("Tasks", "No tasks found.")
        else:
            tasks_str = "\n".join(f"{i+1}. {task}" for i, task in enumerate(self.tasks))
            messagebox.showinfo("Tasks", tasks_str)

    def remove_task(self):
        self.view_tasks()
        try:
            index = int(simpledialog.askstring("Remove Task", "Enter the task number to remove:")) - 1
            if 0 <= index < len(self.tasks):
                removed_task = self.tasks.pop(index)
                save_tasks(self.tasks)
                messagebox.showinfo("Success", f"Task '{removed_task}' removed successfully!")
            else:
                messagebox.showwarning("Warning", "Invalid number.")
        except ValueError:
            messagebox.showwarning("Warning", "Invalid input. Enter a number.")

if __name__ == "__main__":
    root = tk.Tk()
    app = TaskManagerApp(root)
    root.mainloop()
@QWolfp3 QWolfp3 mentioned this issue Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant