Skip to content

Instantly share code, notes, and snippets.

View eramax's full-sized avatar
🎯
Focusing

Ahmed Morsi eramax

🎯
Focusing
View GitHub Profile
@boxabirds
boxabirds / .cursorrules
Last active July 1, 2025 19:26
Rock solid: turn Cursor into a rock-solid software engineering companion
# Project Policy
This policy provides a single, authoritative, and machine-readable source of truth for AI coding agents and humans, ensuring that all work is governed by clear, unambiguous rules and workflows. It aims to eliminate ambiguity, reduce supervision needs, and facilitate automation while maintaining accountability and compliance with best practices.
# 1. Introduction
> Rationale: Sets the context, actors, and compliance requirements for the policy, ensuring all participants understand their roles and responsibilities.
## 1.1 Actors
@tysam-code
tysam-code / diloco_nesterov_.7lr_.0_to_.9_momentum_1000_momentum_warmup_1-momentum_dampening_dampening_initial_step_bugfix_25_steps_all_run3.log
Created April 30, 2025 00:56
diloco_nesterov_.7lr_.0_to_.9_momentum_1000_momentum_warmup_1-momentum_dampening_dampening_initial_step_bugfix_25_steps_all_run3.log
import os
import sys
with open(sys.argv[0]) as f:
code = f.read() # read the code of this file ASAP, for logging
import uuid
import time
import glob
import subprocess
import contextlib
from dataclasses import dataclass

Security Checklist (What can be done in CursorAI & software-level not infrastructure!)

Configuration Security

  • Detect secrets in code
  • Identify secrets committed to version control
  • Flag hardcoded credentials

Authentication & Authorization

  • Identify missing authentication checks
  • Detect improper authorization patterns
@Artefact2
Artefact2 / README.md
Last active July 2, 2025 09:52
GGUF quantizations overview
@virattt
virattt / query-rewriting-gpt-mistral-cohere.ipynb
Last active March 25, 2025 00:54
query-rewriting-gpt-mistral-cohere.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cjpais
cjpais / llava-surgery-1.6-hack.py
Created February 1, 2024 22:02
llava 1.6 hack
import argparse
import glob
import os
import torch
from safetensors import safe_open
from safetensors.torch import save_file
ap = argparse.ArgumentParser()
ap.add_argument("-m", "--model", help="Path to LLaVA v1.5 model")
@Vaibhavs10
Vaibhavs10 / zephyr-7b-beta-gptq-transformers.py
Created November 13, 2023 21:55
zephyr-7b-beta-gptq-transformers
!pip install transformers optimum
!pip install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name_or_path = "TheBloke/zephyr-7B-beta-GPTQ"
model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
device_map="auto",
trust_remote_code=False,
@nberlette
nberlette / SvelteKit_vs_NextJS.md
Last active March 27, 2025 19:02
Svelte vs. Next.js

SvelteKit 🆚 Next.js

Objectives: fast, easy, convention over configuration, & batteries included. Overwhelming choices < providing a clear path forward.

Contenders: [SvelteKit][sveltekit-url] (by [Svelte][svelte-url]) and [Next.js][next-url] (by [Vercel][vercel-url]).


Comparison of Major Features

@stek29
stek29 / dreame_1c_root.md
Last active May 19, 2025 06:50
Root Dreame Robot without via uart only

These are just my notes, and described process worked for me on my 1C robot
If anything goes wrong, having USB adapter for FEL flashing might be the only way to restore your robot
this is not an official guide
oh, and I'm not responsible for any damage blah blah
and huge thanks to Dennis and Hypfer, and everyone behind this root :)

0. get uboot shell

to enter uboot shell on 1C you have to: 0. turn robot off normally

  1. hook up uart, open console
@itzurabhi
itzurabhi / UB18-Qemu-AARCH64.md
Last active March 26, 2024 06:49
Run Ubuntu 18.04 on Qemu AARCH64 / ARM64

Install the dependecies

sudo apt install qemu-system-arm qemu-system-mips qemu-efi-aarch64 qemu-kvm qemu-efi cloud-image-utils

Prepare the EFI partition

dd if=/dev/zero of=flash0.img bs=1M count=64
dd if=/usr/share/qemu-efi/QEMU_EFI.fd of=flash0.img conv=notrunc