Skip to content

Instantly share code, notes, and snippets.

select distinct user_id
from events s3
inner join
(
select distinct user_id
from events s2
inner join
(
select distinct user_id
from events
@kxzk
kxzk / simple-articles.txt
Created March 14, 2024 11:37
all the articles scraped for mentat
article__account_activity_tracking_changes_and_information_access_in_your_account#history.txt
article__account_activity_tracking_changes_and_information_access_in_your_account.txt
article__account_setup_for_group_practices_on_demand_class.txt
article__account_setup_for_solo_practices_on_demand_class.txt
article__adding_a_clinician_scheduler_biller_or_supervisor.txt
article__adding_a_footer_to_billing_documents.txt
article__adding_a_footer_to_private_practice_billing_documents.txt
article__adding_a_new_client_and_navigating_your_clients_and_contacts_list#addingacli.txt
article__adding_a_new_client_and_navigating_your_clients_and_contacts_list#addingaclientnic.txt
article__adding_a_new_client_and_navigating_your_clients_and_contacts_list#deletingac.txt
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
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.
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
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
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
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,
@kxzk
kxzk / run_it.sh
Created March 27, 2023 15:15
Create OpenAI API Key
export OPENAI_API_KEY=xxxxxxxxxxx
{#
incremental_filter
This macro is a utility to help cut down on
repetitive code for incremental models. Also,
it should help to standardize our approach.
usage:
{{
config(