Skip to content

Instantly share code, notes, and snippets.

@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 15, 2025 03:44
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@santhoshtr
santhoshtr / syllabify-with-index.py
Created May 1, 2011 10:41
syllabify with word and syllable index
#!/usr/bin/python
# -*- coding: utf-8 -*-
texts =[u"वाराणसी", u"भौगोलिक", u"उपदर्शन"]
signs = [
u'\u0902', u'\u0903', u'\u093e', u'\u093f', u'\u0940', u'\u0941',
u'\u0942', u'\u0943', u'\u0944', u'\u0946', u'\u0947', u'\u0948',
u'\u094a', u'\u094b', u'\u094c', u'\u094d']
limiters = ['.','\"','\'','`','!',';',',','?']
virama = u'\u094d'
@disler
disler / README.md
Created March 31, 2024 14:34
Use these Prompt Chains to build HIGH QUALITY AI Agents (Agentic Building Blocks)

Setup

  1. Create a new directory with these three files (requirements.txt, main.py, README.md)
  2. python -m venv venv
  3. source venv/bin/activate
  4. pip install -r requirements.txt
  5. python main.py
  6. Update main() to run the example prompt chains
@adrienne
adrienne / mullenweg-wpe.md
Last active January 15, 2025 03:36
The Mullenweg/WPE Thing
@nstarke
nstarke / 01-reversing-cisco-ios-raw-binary-firmware-images-with-ghidra.md
Last active January 15, 2025 03:35
Reversing Cisco IOS Raw Binary Firmware Images with Ghidra

Reversing Raw Binary Firmware Files in Ghidra

This brief tutorial will show you how to go about analyzing a raw binary firmware image in Ghidra.

Prep work in Binwalk

I was recently interested in reversing some older Cisco IOS images. Those images come in the form of a single binary blob, without any sort of ELF, Mach-o, or PE header to describe the binary.

While I am using Cisco IOS Images in this example, the same process should apply to other Raw Binary Firmware Images.

@johndpope
johndpope / install.sh
Created October 14, 2021 04:49 — forked from aaabramov/install.sh
Installing zsh + oh-my-zsh on Amazon EC2 Amazon Linux 2 AMI
sudo yum update
# Installing ZSH
sudo yum -y install zsh
# Check ZSH has been installed
zsh --version
# Install "util-linux-user" because "chsh" is not available by default
# See https://superuser.com/a/1389273/599050
@wojteklu
wojteklu / clean_code.md
Last active January 15, 2025 03:30
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@ruvnet
ruvnet / MoE.py
Last active January 15, 2025 03:29
A PyTorch implementation of a Mixture of Experts (MoE) model resembling the Mixtral 8x7B architecture, with detailed inline comments. This model combines transformer layers with an MoE layer consisting of 8 experts, aiming for high efficiency by activating only 2 experts per token. It's configured with dimensions reflecting the operational effic…
"""
This model integrates the MoE concept within a Transformer architecture. Each token's
representation is processed by a subset of experts, determined by the gating mechanism.
This architecture allows for efficient and specialized handling of different aspects of the
data, aiming for the adaptability and efficiency noted in the Mixtral 8x7B model's design
philosophy. The model activates only a fraction of the available experts for each token,
significantly reducing the computational resources needed compared to activating all experts
for all tokens.
"""
@capfsb
capfsb / fpsMeter.js
Created April 17, 2017 23:41 — forked from medynski/fpsMeter.js
JavaScript FPS meter - Calculating frames per second
fpsMeter() {
let prevTime = Date.now(),
frames = 0;
requestAnimationFrame(function loop() {
const time = Date.now();
frames++;
if (time > prevTime + 1000) {
let fps = Math.round( ( frames * 1000 ) / ( time - prevTime ) );
prevTime = time;
@0xdevalias
0xdevalias / reverse-engineering-macos.md
Last active January 15, 2025 03:22
Some notes, tools, and techniques for reverse engineering macOS binaries