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 asyncio | |
import csv | |
import uuid | |
from datetime import datetime | |
from fastapi import FastAPI | |
from fastapi.responses import JSONResponse | |
app = FastAPI() |
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
status_code | status_label | |
---|---|---|
0 | Cannot provide further status electronically. | |
1 | For more detailed information, see remittance advice. | |
2 | More detailed information in letter. | |
3 | Claim has been adjudicated and is awaiting payment cycle. | |
4 | This is a subsequent request for information from the original request. | |
5 | This is a final request for information. | |
6 | Balance due from the subscriber. | |
7 | Claim may be reconsidered at a future date. | |
8 | No payment due to contract/plan provisions. |
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
select distinct user_id | |
from events s3 | |
inner join | |
( | |
select distinct user_id | |
from events s2 | |
inner join | |
( | |
select distinct user_id | |
from events |
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
function openai_edits_api | |
h 'can you generate a golang script that reads from stdin and sends that to the OpenAI Code Edits API endpoint - include only the code nothing else' | string replace '```' '' > openai_edits_api.go | |
h 'can you generate the commands to build and run the golang script - only include the commands' | string replace '```' '' > openai_edits_api.sh | |
data_gpt 'can you generate some tests for the following golang script' (cat openai_edits_api.go | string collect) | string replace '```' '' > openai_edits_api_test.go | |
data_gpt 'can you generate a makefile for a golang project with the following files' (ls) | string replace '```' '' > Makefile | |
end |
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
function openai_edits_api | |
h 'can you generate a golang script that reads from stdin and sends that to the OpenAI Code Edits API endpoint - include only the code nothing else' | string replace '```' '' > openai_edits_api.go | |
h 'can you generate the commands to build and run the golang script - only include the commands' | string replace '```' '' > openai_edits_api.sh | |
data_gpt 'can you generate some tests for the following golang script' (cat openai_edits_api.go | string collect) | string replace '```' '' > openai_edits_api_test.go | |
data_gpt 'can you generate a makefile for a golang project with the following files' (ls) | string replace '```' '' > Makefile | |
end |
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 2.
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
Name,Team,Position,Age,Height,Weight,PointsPerGame,ReboundsPerGame,AssistsPerGame,FieldGoalPercentage | |
LeBron James,Los Angeles Lakers,Forward,36,6'9",250,25.4,7.9,7.8,50.4 | |
Stephen Curry,Golden State Warriors,Guard,33,6'3",190,32.0,5.5,5.8,48.2 | |
Kevin Durant,Brooklyn Nets,Forward,32,6'10",240,26.9,7.1,5.6,53.7 | |
James Harden,Brooklyn Nets,Guard,31,6'5",220,24.6,7.0,10.9,46.6 | |
Giannis Antetokounmpo,Milwaukee Bucks,Forward,26,6'11",242,28.1,11.0,5.9,56.9 | |
Nikola Jokic,Denver Nuggets,Center,26,7'0",284,26.4,10.8,8.3,56.6 | |
Damian Lillard,Portland Trail Blazers,Guard,31,6'2",195,28.8,4.2,7.5,45.1 | |
Luka Doncic,Dallas Mavericks,Guard,22,6'7",230,27.7,8.0,8.6,47.9 | |
Joel Embiid,Philadelphia 76ers,Center,27,7'0",280,28.5,10.6,2.8,51.3 |
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
function img_gpt -a prompt | |
set create_img (curl https://api.openai.com/v1/images/generations -s \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: Bearer $OPENAI_API_KEY" \ | |
-d '{ | |
"prompt": "'$prompt'", | |
"n": 1, | |
"size": "1024x1024" | |
}') | |
echo $create_img | jq |
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
function data_gpt -a prompt data | |
set prompt_input (echo "$prompt: $data" | string join ' ') | |
curl https://api.openai.com/v1/chat/completions -s \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: Bearer $OPENAI_API_KEY" \ | |
-d '{ | |
"model": "gpt-4", | |
"messages": [{"role": "user", "content": "'$prompt_input'"}], | |
"temperature": 0.7 |
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
function hey_gpt | |
# usage: hey_gpt tell me a joke about a dog | |
set prompt \'(echo $argv | string join ' ')\' | |
set gpt (curl https://api.openai.com/v1/chat/completions -s \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: Bearer $OPENAI_KEY" \ | |
-d '{ | |
"model": "gpt-4", | |
"messages": [{"role": "user", "content": "'$prompt'"}], | |
"temperature": 0.7, |
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
export OPENAI_API_KEY=xxxxxxxxxxx |
NewerOlder