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
#!/usr/bin/env python3 | |
# Downloads every video from a Youtube channel in highest quality | |
# Example: | |
# export CHANNEL_URL="https://www.youtube.com/@psicoactivopodcast/videos" | |
# docker run -v ./downloads:/downloads -e CHANNEL_URL="${CHANNEL_URL}" youtube-downloader | |
import yt_dlp | |
import os |
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
""" | |
Gets a list of a user's starred repos, reads descriptions for all the repos, categorizes, summarizes and quantifies the user's interests. | |
""" | |
import requests | |
import os | |
from openai import OpenAI | |
# Initialize OpenAI client with API key from environment variable | |
client = OpenAI(api_key=os.getenv('OPENAI_API_KEY')) |
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
#!/usr/bin/env python3 | |
import base64 | |
import json | |
import os | |
import requests | |
# Function to find image files in the current directory | |
def find_image_files(directory): | |
image_extensions = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff'] | |
image_files = [file for file in os.listdir(directory) if os.path.splitext(file)[1].lower() in image_extensions] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Insult Game</title> | |
</head> | |
<body> | |
<h1>Insult Game</h1> | |
<p>This game will increment a counter when you type something mean. If you type anything that isn't mean, it won't increment the counter.</p> | |
<form onsubmit="submitInsult(event)"> | |
<label for="apiKey">API Key:</label><br> |
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 json | |
import openai | |
import os | |
if not 'OPENAI_API_KEY' in os.environ: | |
raise Exception('Environment variable OPENAI_API_KEY is required') | |
temperature = 0.9 | |
max_tokens = 2000 | |
top_p = 1.0 |
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
<html> | |
<head> | |
<title>OpenAI API Test</title> | |
</head> | |
<body> | |
<form id="form"> | |
API Key: <input type="text" id="apiKey"><br> | |
Model: | |
<select id="model"> | |
<option value="text-davinci-003">text-davinci-003</option> |
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
#!/bin/bash | |
# This file goes in .git/hooks/commit-msg | |
set -e | |
git_diff=$(cat "$1") | |
prompt="I want you to help me write a commit message. When I send the output of git diff, I want you to send only a suggested git commit message (only the message, no commands, nothing else), and do not send any explanation or anything else with it. Here is the git diff:\n${git_diff}" | |
(echo "$prompt") | openai complete - >> "$1" |
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
from revChatGPT.revChatGPT import Chatbot | |
import json | |
import os | |
# Get your config in JSON | |
config = { | |
"Authorization": "<API-KEY>", | |
"session_token": os.environ["CHATGPT_SESSION_TOKEN"] | |
} |
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
#!/usr/bin/env ruby | |
balances = { | |
'BTC' => 0, | |
'DASH' => 0, | |
'ETH' => 0, | |
'LTC' => 0, | |
'NMC' => 0, | |
'XMR' => 0 | |
} |
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
$a='$a=%s;printf $a.";","\x27$a\x27"';printf $a.";","\x27$a\x27"; |