This file contains hidden or 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 hidden or 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 hidden or 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() | |
This file contains hidden or 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 Zellij config offers a more modal experience than the default. There are | |
| // very few keybindings in the mode that you spend most of your time in, and we | |
| // need to hit `C-space` to go into a mode where we navigate. | |
| // The only keybindings in the normal mode are: | |
| // - `C-space` to go into the tmux mode | |
| // - `C-n` for a new pane | |
| // - `C-t` for a new tab | |
| // - `A-[` & `A-]` to go to the previous/next tab | |
| // - `S-arrow` to navigate between panes |
If you are using this already, consider changes soon due the discussion around current ESX proposal.
Feel free to keep an eye on udomsay as that will be the implementation reference for consumers.