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 | |
# Define the main export folder | |
export_folder=~/Desktop/iMessages_Export | |
mkdir -p "$export_folder" | |
# Part 1: Generate the CSV file | |
echo "Generating CSV file..." | |
sqlite3 ~/Library/Messages/chat.db <<EOF |
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
Show hidden characters
// I'm tired of extensions that automatically: | |
// - show welcome pages / walkthroughs | |
// - show release notes | |
// - send telemetry | |
// - recommend things | |
// | |
// This disables all of that stuff. | |
// If you have more config, leave a comment so I can add it!! | |
{ |
Inject this css snippet to remove all ads from your Twitter timeline.
div[data-testid="placementTracking"]:has(path[d="M19.498 3h-15c-1.381 0-2.5 1.12-2.5 2.5v13c0 1.38 1.119 2.5 2.5 2.5h15c1.381 0 2.5-1.12 2.5-2.5v-13c0-1.38-1.119-2.5-2.5-2.5zm-3.502 12h-2v-3.59l-5.293 5.3-1.414-1.42L12.581 10H8.996V8h7v7z"]) {
display: none;
}
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
"""This is an example of how to use async langchain with fastapi and return a streaming response. | |
The latest version of Langchain has improved its compatibility with asynchronous FastAPI, | |
making it easier to implement streaming functionality in your applications. | |
""" | |
import asyncio | |
import os | |
from typing import AsyncIterable, Awaitable | |
import uvicorn | |
from dotenv import load_dotenv |
Notes on this tweet.
-
The screenshots were taken on different sessions.
-
The entire sessions are included on the screenshots.
-
I lost the original prompts, so I had to reconstruct them, and still managed to reproduce.
-
The "compressed" version is actually longer! Emojis and abbreviations use more tokens than common words.
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
# STEP 1: Load | |
# Load documents using LangChain's DocumentLoaders | |
# This is from https://langchain.readthedocs.io/en/latest/modules/document_loaders/examples/csv.html | |
from langchain.document_loaders.csv_loader import CSVLoader | |
loader = CSVLoader(file_path='./example_data/mlb_teams_2012.csv') | |
data = loader.load() | |
NewerOlder