Skip to content

Instantly share code, notes, and snippets.

View codekansas's full-sized avatar
🏠
Working from home

Ben Bolte codekansas

🏠
Working from home
View GitHub Profile
@mattiasarro
mattiasarro / rwkv.py
Last active February 6, 2024 18:48
RWKV MVP
# Taken from https://johanwind.github.io/2023/03/23/rwkv_details.html.
# I've added additional comments restructured it a tiny bit, which makes it clearer for me.
import numpy as np
from torch import load as torch_load # Only for loading the model weights
from tokenizers import Tokenizer
exp = np.exp
layer_norm = lambda x, w, b : (x - np.mean(x)) / np.std(x) * w + b
sigmoid = lambda x : 1/(1 + exp(-x))
@myobie
myobie / ci.yml
Last active September 20, 2023 09:26
Don't run GitHub Actions for pull requests that are drafts
on:
push:
branches:
- master
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
@irbull
irbull / OpenSSLExample.cpp
Created August 11, 2016 18:32
Code signing and verification with OpenSSL
#include <iostream>
#include <openssl/aes.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <assert.h>
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 18, 2024 10:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname