Skip to content

Instantly share code, notes, and snippets.

View jasstionzyf's full-sized avatar

jasstionzyf jasstionzyf

View GitHub Profile
@dabit3
dabit3 / you_couldve_invented_openclaw.md
Last active May 6, 2026 13:35
You Could've Invented OpenClaw

See more of my writing here. Also check out Devin

In this post, I'll start from scratch and build up to OpenClaw's architecture step by step, showing how you could have invented it yourself from first principles, using nothing but a messaging API, an LLM, and the desire to make AI actually useful outside the chat window.

End goal: understand how persistent AI assistants work, so you can build your own (or become an OpenClaw power user).

First, let's establish the problem

When you use ChatGPT or Claude in a browser, there are several limitations:

@AlkindiX
AlkindiX / MEMO
Last active December 9, 2025 16:39
Run machine learning on 7900XT and 7900XTX on PyTorch
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
@aksakalli
aksakalli / install-conda.yml
Created July 18, 2018 10:08
Installing Minicaonda/Anaconda from Ansible playbook for all
- name: Install Conda
block:
- name: Download Miniconda
get_url:
url: https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh
dest: /tmp/install-miniconda.sh
checksum: md5:a946ea1d0c4a642ddf0c3a26a18bb16d
mode: 0550
- name: Create conda folder
@kairess
kairess / lcnn29_keras.py
Last active December 17, 2018 14:23
Light CNN 29 for Keras (Original code for pytorch, https://github.com/AlfredXiangWu/LightCNN)
def conv2d_bn(x, filters, kernel_size, strides=1, padding='same', activation='relu', use_bias=False, name=None):
x = Conv2D(filters, kernel_size, strides=strides, padding=padding, use_bias=use_bias, kernel_initializer='he_normal', name=name)(x)
if not use_bias:
bn_axis = 1 if K.image_data_format() == 'channels_first' else 3
bn_name = None if name is None else name + '_bn'
x = BatchNormalization(axis=bn_axis, scale=False, name=bn_name)(x)
return x
def mfm(x):
shape = K.int_shape(x)
@matttrent
matttrent / list_rate_schedule.py
Last active October 25, 2019 07:04
Keras list of learning rates schedule
def list_rate_schedule(lrates, output=True):
sched = []
last_lr = [0]
for lr, n in lrates:
sched += [lr] * n
def lr_sched(epoch):
lr = sched[-1]
if epoch < len(sched):
@omimo
omimo / create_hellotensor.py
Last active September 26, 2023 08:37
A simple example for saving a tensorflow model and preparing it for using on Android
# Create a simple TF Graph
# By Omid Alemi - Jan 2017
# Works with TF <r1.0
import tensorflow as tf
I = tf.placeholder(tf.float32, shape=[None,3], name='I') # input
W = tf.Variable(tf.zeros_initializer(shape=[3,2]), dtype=tf.float32, name='W') # weights
b = tf.Variable(tf.zeros_initializer(shape=[2]), dtype=tf.float32, name='b') # biases
O = tf.nn.relu(tf.matmul(I, W) + b, name='O') # activation / output
@karpathy
karpathy / min-char-rnn.py
Last active May 7, 2026 05:41
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@zohar
zohar / gist:a047e265e336b329f811
Created February 24, 2015 21:38
MongoDB: Find by regular expression and run regex replace on results
/*
MongoDB: Find by regular expression and run regex replace on results
*/
db.test.find({"url": { $regex: 'http:\/\/' }}).forEach(function(doc) {
doc.url = doc.url.replace(/http:\/\/www\.url\.com/g, 'http://another.url.com');
db.test.save(doc);
});
@joeyAghion
joeyAghion / mongodb_collection_sizes.js
Last active March 17, 2026 03:31
List mongodb collections in descending order of size. Helpful for finding largest collections. First number is "size," second is "storageSize."
var collectionNames = db.getCollectionNames(), stats = [];
collectionNames.forEach(function (n) { stats.push(db[n].stats()); });
stats = stats.sort(function(a, b) { return b['size'] - a['size']; });
for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); }