- Provide code base/project details and up-to-date context.
- Separation of concerns in different modules.
- Create implementation details for each PR, maintain implementation docs.
- Generate small, focused chunks of code (< 1k lines).
- Keep functions concise and small.
- Comment every function; add context before AI generation.
- Keep those comments updated with every change on that code
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
| " How to use: append below code into your ~/.vimrc file | |
| inoremap ( ()<LEFT> " ( -> () | |
| inoremap [ []<LEFT> " [ -> [] | |
| inoremap { {}<LEFT> " { -> {} | |
| " shift right when input ) and current char is ) | |
| function! RemoveNextDoubleChar(char) | |
| let next_char = getline(".")[col(".")] " get current char | |
| if a:char == next_char |
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
| """ | |
| A micro event loop library implementation from scratch. | |
| This library provides a minimal but feature-complete asynchronous event loop | |
| implementation for educational purposes. It demonstrates the core concepts of | |
| asynchronous programming including: | |
| - Task scheduling and management | |
| - I/O multiplexing with non-blocking sockets | |
| - Timeouts and sleep functionality |
This is a tool that sorts images into folders using "AI". You create the folders you want the images to be put into.
I got 'claude' to write with a couple prompts. Make venv and install deps with pip.
- Use microsoft/git-large-coco To turn images into short descriptions of images - https://huggingface.co/microsoft/git-large-coco
- Use all-MiniLM-L6-v2 to turn short descriptions into 'embedding vectors' - https://www.sbert.net/docs/sentence_transformer/pretrained_models.html
- Compare the embedding vector of the image, with the embedding vectors of the folders - choose the best folder to put the image into
To get started with either the Mini PCIe or M.2 Accelerator, all you need to do is connect the card to your system, and then install our PCIe driver, Edge TPU runtime, and the TensorFlow Lite runtime. This page walks you through the setup and shows you how to run an example model.
The setup and operation is the same for both M.2 form-factors, including the M.2 Accelerator with Dual Edge TPU.
- Raspberry Pi 5 with the following Linux operating system:
Raspberry Pi OS (64-bit)based on Debian 10 or newer
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
| #!/usr/bin/env sh | |
| URI=$1 | |
| BASE=$(basename $1) | |
| [ -f ../models/$BASE-f16.gguf ] && exit 0 | |
| (. ../huggingface-cli/bin/activate && HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download $URI --local-dir ../models/$BASE --cache-dir ../models/$BASE/.hf-cache --exclude 'pytorch_model*' --exclude 'consolidated*' --resume-download) || exit 1 | |
| DTYPE=$(jq -r '.torch_dtype' < ../models/$BASE/config.json) |
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 | |
| cd / | |
| sudo apt update | |
| echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list | |
| curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - |
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
| Requirements:- | |
| 1. Ubuntu 22.04 | |
| 2. 7900XT or 7900XTX | |
| Pre-requests before making any installation. | |
| Follow step 1-3 if you installed amdgpu. | |
| 1. If you already installed redeon graphic card driver from AMD using amdgpu-install. Completely remove the driver | |
| and connect your HDMI to motherboard. Then restart your PC |
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 flask import Flask, request | |
| from sqlalchemy import Column, Integer, String | |
| from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine | |
| from sqlalchemy.future import select | |
| from sqlalchemy.orm import declarative_base, sessionmaker | |
| engine = create_async_engine('sqlite+aiosqlite:///./db.db') | |
| async_session = sessionmaker( | |
| engine, expire_on_commit=False, class_=AsyncSession | |
| ) |
NewerOlder