Skip to content

Instantly share code, notes, and snippets.

View infrony's full-sized avatar
🇵🇦

Rodney Guillen infrony

🇵🇦
View GitHub Profile
@infrony
infrony / chatgpt_client.py
Created June 20, 2023 19:25
Python ChatGPT Client
import os
import openai
from dotenv import load_dotenv
load_dotenv()
openai.api_key = os.getenv("OPENAPI_KEY")
question = input("What is your question for ChatGTP? ")
@infrony
infrony / chatgpt-mermaid.md
Last active July 22, 2024 02:24
ChatGTP + Mermaid + Caso de Uso

Diagrama de flujo

Prompt

generar un codigo de mermaid js de un flujo de compras de tomates, 
transporte y entrega de mercancia en los supermercados

Mermaid

graph TD
  A[Cliente] -- Realiza pedido --> B((Supermercado))
@infrony
infrony / simpleChatbot.py
Created December 21, 2017 13:01
Simple Chatbot with python
import random
greetings = ['hola', 'hello', 'hi', 'Hi', 'hey!','hey']
random_greeting = random.choice(greetings)
question = ['Cómo estas?','Como estas?']
responses = ['Gracias',"Estoy Bien"]
random_response = random.choice(responses)
while True:
@infrony
infrony / alarm.py
Created December 21, 2017 12:59
Simple Alarm
import os
import time
dormir = input (" Segundos para activar la alarma :")
audio = ("start C:/code/python/alarm.mp3")#cambiar la ruta del archivo de audio
time.sleep (int(dormir))
os.system(audio)
z = input("Presione la tecla z para seguir durmiendo : ")
if z == "z":
@infrony
infrony / custom.js
Created December 21, 2017 12:57
The same height for both
$(function(){
var h_left = $(".left").height();
var h_right = $(".right").height();
var height = ( h_left > h_right) ? $(".right").height(h_left) : $(".left").height(h_right);
});