This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Form implementation generated from reading ui file 'jjj.ui' | |
# | |
# Created by: PyQt5 UI code generator 5.15.9 | |
# | |
# WARNING: Any manual changes made to this file will be lost when pyuic5 is | |
# run again. Do not edit this file unless you know what you are doing. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS admin( | |
admin_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | |
hash text | |
); | |
CREATE TABLE IF NOT EXISTS usuarios( | |
usuario_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | |
username TEXT, | |
cedula TEXT, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_image(symbol): | |
try: | |
api_key = os.environ.get("API_KEY") | |
url = f"https://api.iex.cloud/v1/stock/{symbol.lower()}/logo?token={api_key}" | |
response = requests.get(url) | |
return response.json()["url"] | |
except: | |
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS users( | |
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | |
username TEXT, | |
hash TEXT, | |
cash REAL DEFAULT 10000 | |
); | |
CREATE TABLE IF NOT EXISTS transactions ( | |
transaction_id INTEGER PRIMARY KEY AUTOINCREMENT, | |
symbol TEXT, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import random | |
a = random.randint(1, 99) | |
b = random.randint(1, 99) | |
d = a * b | |
print("Hola, bienvenido a mi juego. En este juego eres prisionero un prisionero \n" | |
"que acaba de escapar junto a su compañero de celda. Tras unos minutos de huida \n" | |
"atrapan a tu amigo pero tu has logrado safarte y tienes 2 vias de escape cual eliges... ") | |
alternativa= input("¿Decides escapar por la puerta entreabierta o la reja? [Introduce reja o puerta]: \n") | |
if 'reja' == alternativa.lower(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Me voy a la cocina") | |
print("Abro la nevera") | |
leche = input("¿Hay leche?(S/N): ") | |
hay_colacao = input("¿Hay Colacao?:(S/N) ") | |
if leche != 'S' or hay_colacao != "S": | |
print("Voy a comprar al súper... ") | |
if leche != 'S': | |
print("Compro leche") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' Pide al usuario que introduzca 5 números e imprime | |
el numero menor y el número mayor ''' | |
nombre = input("Introduzca su nombre: ") | |
print("hola, ", nombre ,"ingrese 5 números y luego se le imprimira el número mayor y el número menor") | |
a = int(input("Ingrese un número: ")) | |
b = int(input("Ingrese un número: ")) | |
c = int(input("Ingrese un número: ")) | |
d = int(input("Ingrese un número: ")) | |
e = int(input("Ingrese un número: ")) |