Skip to content

Instantly share code, notes, and snippets.

View liamzebedee's full-sized avatar
™️
'drop all repos

Liam Zebedee liamzebedee

™️
'drop all repos
View GitHub Profile
def l4_0(x):
# x is a list (or vector) of length 232
return max(0, 1.0*x[0] + 128.0*x[56] + -256.0*x[112] + 128.0*x[168])
def l4_1(x):
# x is a list (or vector) of length 232
return max(0, 1.0*x[1] + 128.0*x[57] + -256.0*x[113] + 128.0*x[169])
def l4_2(x):
# x is a list (or vector) of length 232
return max(0, 1.0*x[2] + 128.0*x[58] + -256.0*x[114] + 128.0*x[170])
def l4_3(x):
> eliza@ start /Users/liamz/Documents/eliza
> pnpm --dir core start "--characters=/Users/liamz/Documents/eliza/characters/french.json" "--"
> [email protected] start /Users/liamz/Documents/eliza/core
> node --loader ts-node/esm src/index.ts "--characters=/Users/liamz/Documents/eliza/characters/french.json" "--"
 ["✓ Starting agent for character averagefrench"] 
// https://wiki.theory.org/BitTorrent_Tracker_Protocol
// https://www.bittorrent.org/beps/bep_0015.html
package core
import (
"bytes"
"encoding/binary"
"fmt"
"math/rand"
"net"
@liamzebedee
liamzebedee / exercise2.py
Created November 15, 2023 05:36
The architecture of an open-source AI TV show: part 004.
import re
# Given TV script
tv_script = """
[The scene opens in Rick's Garage. Rick is tinkering with a complex-looking gadget while Morty leans against a table, eyeing Rick curiously.]
Rick: Morty, hand me the interdimensional portalizer, will ya?
[Morty rummages through a pile of gadgets and tools, finally handing the portalizer to Rick.]
/*! For license information please see main.903fc3df.js.LICENSE.txt */ ! function() {
var e = {
694: function(e, t) {
var n;
! function() {
"use strict";
var r = {}.hasOwnProperty;
function i() {
for (var e = [], t = 0; t < arguments.length; t++) {
@liamzebedee
liamzebedee / guide.md
Created October 20, 2023 04:25
`git lfs` track all project files in a Unity project

find all files larger than 1MB and output their file extensions

find . -type f -size +1M -exec sh -c 'echo "${1##*.}"' _ {} \; | sort | uniq -c

track these extensions in git lfs

git lfs track "*.bmp" "*.cubemap" "*.dae" "*.fbx" "*.glb" "*.jpg" "*.mp4" "*.png" "*.psd" "*.tga" "*.tif" "*.unity" "*.wav"
layout title date tags
post
[WIP] Comparing IPFS and BitTorrent in 2023.
2023-08-10
research ipfs bittorrent p2p p2p-networks dht

In this post we're going to compare two of le plus grande P2P file-sharing networks! IPFS and ye olde BitTorrent. This research piece is based on a lot of experience I have with IPFS, namely integrating it into Dappnet.

This article is a work-in-progress. My goal is to collect a lot of data (50+ links so far) and simplified explanations that cut through a lot of the obtuse technical gala. This post isn't intended to be a complete review of either project, DYOR. If you have any questions or if I've gotten anything wrong here, please reach out on Twitter @liamzebedee and I'd be happy to chat.

layout title date tags
post
Comparing IPFS and BitTorrent.
2023-08-10
research ipfs bittorrent p2p p2p-networks dht

In this post we're going to compare two of le plus grande P2P file-sharing networks! IPFS and ye olde BitTorrent. This research piece is based on a lot of experience I have with IPFS, namely integrating it into Dappnet.

To begin with, since a lot of people don't actually know how they work, I'm going to cover a little bit about their technical designs, and then we'll go into their practical differences.

niacin

The basics.

Zero-configuration deployment + upgradable Ethereum smart contracts. Some people call this chainops (like devops).

# Deploy a contract TakeMarket.sol.
niacin deploy TakeMarket
@liamzebedee
liamzebedee / notes.md
Created June 9, 2023 14:48
StarkNet/Cairo vs. Solidity/EVM

Comparison

What's good about Starknet/Cairo eco?

  • Cairo has a working package manager https://github.com/lambda-0x/cairo-base64
  • Cairo actually allows you to "import" a single function. with solidity, you have to wrap it in a library. and then import the entire library. this makes the code a lot more cluttered
  • lower level customization of things like storage packing through traits is powerful (never liked solidities implicit behavior based on member ordering)
  • compiler plugins for code expansion etc
  • native support for volition
  • no stack too deep