Skip to content

Instantly share code, notes, and snippets.

View codezakh's full-sized avatar

Zaid Khan codezakh

View GitHub Profile
@boxabirds
boxabirds / .cursorrules
Last active October 29, 2025 23:48
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
@charlesfrye
charlesfrye / README.md
Last active January 3, 2025 02:04
Reproducing results from "Beat GPT-4o at Python by Searching with 100 Dumb LLaMAs"

See rune2e.sh for info on how to run the experiment.

Bofa Rush Ironman v1.4 by Kirbuti (last update: 28 July 2023)
Section 0: Setup/General notes
This guide is designed to prioritize:
1. Rushing 43 Prayer while as low of a combat level as possible,
2. Obtaining barrows gloves,
3. Completing Song of the Elves immediately afterwards,
4. Begin completing Corrupted Gauntlet with stats that are reasonable to do so
@xLaszlo
xLaszlo / DataFile
Last active February 22, 2025 06:37
File like class to store dataclasses or pydantic classes as gzipped JSONL-s
import gzip
import json
from dataclasses import asdict
from pydantic import BaseModel
class DataFile:
def __init__(self, data_type, filename, mode, loader=None):
if mode not in ['r', 'w', 'rt', 'wt']:
@moyix
moyix / CodeGen_GPTJ_Conversion.md
Last active December 2, 2025 12:58
How to convert the SalesForce CodeGen models to GPT-J

Using Linear Algebra to Convert a Large Code Model

Background

The SalesForce CodeGen models are a family of large language models trained on a large amount of natural language data and then fine-tuned on specialized datasets of code. Models of size 350M, 2B, 6B, and 16B parameters are provided in three flavors:

  • nl, the base model trained on The Pile, a large natural language dataset compiled by EleutherAI
  • multi, which is fine-tuned from the nl model on a dataset of code in multiple languages, scraped from GitHub, and
  • mono, which is fine-tuned from the multi model on Python code only.
@d-mart
d-mart / kafka-consumer.sh
Last active February 29, 2020 23:21
easy listener for heroku kafka
#!/usr/bin/env bash
set -e
## Prereqs:
## brew install heroku
## brew install kafkacat
## heroku login -i
## Usage exmaple
## $ APP=roadie-admin-qa ./kafka-listener.sh gig.events
@vjeux
vjeux / x.md
Last active January 6, 2024 07:15
Ocaml / functional programming

I'm taking down this post. I just posted this as a side comment to explain a sentence on my latest blog post. This wasn't meant to be #1 on HN to start a huge war on functional programming... The thoughts are not well formed enough to have a huge audience. Sorry for all the people reading this. And please, don't dig through the history...

@mlavin
mlavin / NOTES.rst
Created September 23, 2013 14:17
Celery Late Ack Example

Running the Example

Start the worker:

celery -A tasks worker --loglevel=info -c 2 --pidfile=celery.pid

In another terminal send 6 tasks:

python script.py
@jakevdp
jakevdp / generative.py
Last active September 23, 2021 15:24
General Generative Classification for scikit-learn
"""
Bayesian Generative Classifier
------------------------------
"""
# Author: Jake Vanderplas <[email protected]>
import numpy as np
from sklearn.neighbors.kde import KernelDensity
from sklearn.mixture import GMM
from sklearn.base import BaseEstimator, clone