Skip to content

Instantly share code, notes, and snippets.

View celina-lopez's full-sized avatar
🤠
🐛 🔜 🦋

Celina celina-lopez

🤠
🐛 🔜 🦋
View GitHub Profile
@celina-lopez
celina-lopez / Commit Todo's to README
Last active October 30, 2024 21:49
Commit Todo's to README - pre-commit
#!/bin/bash
# add this file to your .githooks folder, name it pre-commit
# in your .gitconfig file, add the below:
# [core]
# hooksPath = .githooks
# after run the following command in console: git config --local include.path .gitconfig
# Optionally, add ## TODOs: to the end of your README.md
@celina-lopez
celina-lopez / gist:693ccc025535617a9a61a67061d8eddb
Last active November 10, 2023 19:01
quick chapgpt text editor
import openai
openai.api_key = "OPENAI_API_KEY" # Update with openai key
MODEL = 'gpt-3.5-turbo'
def length_of_story(story):
# Want to half the tokens needed so chatgpt can respond
return len(story / 3000)