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
| { | |
| "version": 8, | |
| "sources": { | |
| "arcgisonline": { | |
| "type": "raster", | |
| "tiles": [ | |
| "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}" | |
| ], | |
| "tileSize": 256, | |
| "maxzoom": 18, |
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
| { | |
| "version": 8, | |
| "sources": { | |
| "osm": { | |
| "type": "raster", | |
| "tiles": ["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"], | |
| "tileSize": 256, | |
| "attribution": "<a href=\"https://www.openstreetmap.org/copyright\">© OpenStreetMap Contributors</a>", | |
| "maxzoom": 19 | |
| }, |
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
| { | |
| "version": 8, | |
| "sources": { | |
| "hillshadeSource": { | |
| "type": "raster-dem", | |
| "tiles": ["https://tiles.mapterhorn.com/{z}/{x}/{y}.webp"], | |
| "encoding": "terrarium", | |
| "tileSize": 512, | |
| "attribution": "<a href=\"https://mapterhorn.com/attribution\">© Mapterhorn</a>" | |
| } |
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
| osmium tags-filter germany-latest.osm.pbf r/boundary=administrative -o temp_boundaries.osm.pbf --overwrite | |
| osmium tags-filter temp_boundaries.osm.pbf r/admin_level=4 -o bundeslaender.osm.pbf --overwrite | |
| time ogr2ogr -f Parquet bundeslaender.parquet bundeslaender.osm.pbf multipolygons |
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
| from mlx_lm import batch_generate, load | |
| model, tokenizer = load("mlx-community/gemma-3-270m-it-4bit") | |
| # load a pandas df here, df has a text column | |
| import pandas as pd | |
| df = pd.read_parquet("2000_benchmark_texts_BAAI.parquet") | |
| # Apply the chat template and encode to tokens | |
| prompts = [i + "--------\nSummarize this article in one sentence" for i in df.text.to_list()] | |
| prompts = [ |
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
| #!/bin/bash | |
| # Usage: clone_yek_copy <github_repo_url> | |
| # Description: Clones a GitHub repo, runs `yek | pbcopy`, then deletes the repo. | |
| set -e | |
| # --- 1️⃣ Check for URL argument --- | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <github_repo_url>" | |
| exit 1 |
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
| import argparse | |
| from mlx_lm import load, generate | |
| # Parse CLI arguments | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--prompt", type=str, default="hello", help="Custom prompt text") | |
| parser.add_argument("--max-tokens", type=int, default=1024, help="Maximum number of tokens to generate") | |
| args = parser.parse_args() | |
| # Load model |
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
| (async () => { | |
| // --- Configuration --- | |
| const scrollDelay = 2000; // 2 seconds. Increase if your connection is slow. | |
| const maxRetries = 5; // Will stop after 5 consecutive scrolls with no new messages. | |
| // --- Script Logic --- | |
| let allMessages = []; | |
| const messageContainer = document.querySelector('.MessageList.custom-scroll'); | |
| const seenMessageIds = new Set(); |
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
| <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2280%22>🌍</text></svg>"> |
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
| rsync -avz --progress your_host:/home/disk_image/to_download/large_file.vdi . | |
| # host must look like this in config | |
| Host your_host | |
| HostName yourserver.de | |
| User root | |
| IdentityFile ~/.ssh/[email protected]/ed25519/openssh/id_ed25519 |
NewerOlder