Skip to content

Instantly share code, notes, and snippets.

View JorgeAgulloM's full-sized avatar
🦾

Jorge Agulló JorgeAgulloM

🦾
View GitHub Profile
@mouredev
mouredev / chatgpt_api.py
Created March 7, 2023 19:31
Ejemplo de uso del API de ChatGPT desde Python
import openai # pip install openai
import typer # pip install "typer[all]"
from rich import print # pip install rich
from rich.table import Table
"""
Webs de interés:
- Módulo OpenAI: https://github.com/openai/openai-python
- Documentación API ChatGPT: https://platform.openai.com/docs/api-reference/chat
- Typer: https://typer.tiangolo.com
@y-polek
y-polek / doze_mode_adb_commands.sh
Last active September 14, 2024 08:26
adb commands to test Doze mode
#! /bin/zsh
# Buttery powered state
adb shell dumpsys battery | grep powered
# Unplug battery
adb shell dumpsys battery unplug
# Reset battery
adb shell dumpsys battery reset
@pedrojoya
pedrojoya / MainActivity.java
Created October 30, 2012 17:42
Proyecto Menu Opciones Dinamico
package es.iessaladillo.pedrojoya.pr019;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
import android.widget.EditText;
import android.widget.Toast;