Skip to content
View ReginaldoGonssavre's full-sized avatar
šŸ 
Working from home
šŸ 
Working from home

Block or report ReginaldoGonssavre

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
ReginaldoGonssavre/README.md

QuantumDoorOS - O portal definitivo para o universo quântico

MIT Ā© ReginaldoGonssavre, 2025

import os import secrets import json import requests

===== SEGURANƇA QUƂNTICA E PƓS-QUƂNTICA =====

try: from pyqrng import qrng except ImportError: qrng = None try: from tink import aead from tink.integration import tink_config tink_config.register() aead.register() except ImportError: aead = None

def quantum_random_bytes(size=32): if qrng: try: return qrng.get_random_bytes(size) except Exception: pass return secrets.token_bytes(size)

def pqc_encrypt(data: bytes, key: bytes): if aead: template = aead.aead_key_templates.AES256_GCM handle = aead.KeysetHandle.generate_new(template) a = handle.primitive(aead.Aead) nonce = secrets.token_bytes(12) return a.encrypt(data, nonce) return data[::-1] # fallback: reverse (não seguro)

def pqc_decrypt(ciphertext: bytes, key: bytes): if aead: template = aead.aead_key_templates.AES256_GCM handle = aead.KeysetHandle.generate_new(template) a = handle.primitive(aead.Aead) nonce = secrets.token_bytes(12) return a.decrypt(ciphertext, nonce) return ciphertext[::-1] # fallback (não seguro)

===== INTERNACIONALIZAƇƃO =====

class I18N: def init(self, lang="en_US"): path = os.path.join('lang', f'{lang}.json') if not os.path.exists(path): # Cria idioma padrão se não existir os.makedirs('lang', exist_ok=True) with open(path, 'w', encoding='utf-8') as f: json.dump({ "welcome": "Welcome to QuantumDoorOS!", "initializing": "Initializing...", "climate": "Climate", "field": "Field", "machine": "Machine", "settings": "Settings", "slogan": "The definitive portal to the quantum universe" }, f, indent=2, ensure_ascii=False) try: with open(path, encoding='utf-8') as f: self.trans = json.load(f) except Exception: self.trans = {} def t(self, key): return self.trans.get(key, key)

===== PLUGIN DE EXEMPLO =====

class PluginExemplo: def init(self): self.name = "PluginExemplo" def hello(self): return "OlĆ” do plugin de exemplo QuantumDoorOS!"

===== API GLOBAL EXEMPLO =====

def get_weather_openweather(lat, lon, api_key): url = f"https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={api_key}&units=metric" res = requests.get(url) return res.json() if res.ok else {"error":"Failed to fetch weather"}

def get_ndvi_agromonitoring(lat, lon, api_key): url = f"https://api.agromonitoring.com/agro/1.0/image/search?lat={lat}&lon={lon}&appid={api_key}" res = requests.get(url) return res.json() if res.ok else {"error":"Failed to fetch NDVI"}

===== QUANTUM (QISKIT E Q#) =====

def quantum_random_bit(): try: from qiskit import QuantumCircuit, Aer, execute qc = QuantumCircuit(1, 1) qc.h(0) qc.measure(0, 0) backend = Aer.get_backend('qasm_simulator') job = execute(qc, backend, shots=1) result = job.result() counts = result.get_counts() return int(list(counts.keys())[0]) except Exception: return secrets.randbelow(2)

def run_qsharp_demo(): try: import qsharp qsharp.reload() qsharp.compile(""" operation BellQSharpDemo() : Result[] { use qs = Qubit[2]; H(qs[0]); CNOT(qs[0], qs[1]); let results = [M(qs[0]), M(qs[1])]; ResetAll(qs); return results; }""") from BellQSharpDemo import BellQSharpDemo return [BellQSharpDemo.simulate() for _ in range(5)] except Exception as e: return str(e)

===== INTERFACE (KIVY) =====

from kivy.app import App from kivy.uix.screenmanager import ScreenManager, Screen from kivy.uix.boxlayout import BoxLayout from kivy.uix.label import Label from kivy.clock import Clock

class BootloaderScreen(Screen): def init(self, i18n, **kwargs): super().init(**kwargs) layout = BoxLayout(orientation="vertical") layout.add_widget(Label( text=f"[b]QuantumDoorOS[/b]\n{i18n.t('slogan')}\nQuantum Secure Booting...", markup=True, font_size=28)) self.add_widget(layout)

class MainScreen(Screen): def init(self, i18n, **kwargs): super().init(**kwargs) layout = BoxLayout(orientation="vertical") layout.add_widget(Label(text=i18n.t("welcome"), font_size=28)) layout.add_widget(Label(text=f"Quantum RNG bit: {quantum_random_bit()}")) layout.add_widget(Label(text=f"Q# Demo: {run_qsharp_demo()}")) layout.add_widget(Label(text=f"Plugin: {PluginExemplo().hello()}")) self.add_widget(layout)

class QuantumDoorOSApp(App): def build(self): # Internacionalização automÔtica (ajuste para "pt_BR" se quiser) lang = "en_US" i18n = I18N(lang) sm = ScreenManager() sm.add_widget(BootloaderScreen(i18n, name="boot")) sm.add_widget(MainScreen(i18n, name="main")) sm.current = "boot" def goto_main(dt): sm.current = "main" Clock.schedule_once(goto_main, 2) return sm

if name == "main": QuantumDoorOSApp().run()

Popular repositories Loading

  1. Backend_Aigro Backend_Aigro Public

    Software Aigroquantumsaas-enterprise

    Python 1

  2. Aigro-Solutions.github.io Aigro-Solutions.github.io Public template

    Forked from Aigro-Solutions/Aigro-Solutions.github.io

    Software Aigroquantumsaas-enterprise

    Shell 1

  3. agentforge-launchpad agentforge-launchpad Public

    TypeScript 1

  4. Mahb-b.D-ev_Faztod Mahb-b.D-ev_Faztod Public

    Rust 1

  5. Q_Entangled-MolSpectraX_Ai Q_Entangled-MolSpectraX_Ai Public

    assinatura de vida molecular Universe

    1

  6. ReginaldoGonssavre ReginaldoGonssavre Public

    Config files for my GitHub profile.