Skip to content

Instantly share code, notes, and snippets.

View noahgift's full-sized avatar
🎯
#mlops

Noah Gift noahgift

🎯
#mlops
View GitHub Profile
@mdipierro
mdipierro / example.py
Created January 23, 2024 06:54
Python script that makes its own nix-shell
#! /usr/bin/bash
"""":
# if Nix not installed, install it, then rerun this script with nix-shell
[ -f /etc/nix/nix.conf ] || curl -L https://nixos.org/nix/install | sh -s -- --daemon
exec nix-shell --command "python $0 $@" \
-p python311 \
-p python3Packages.numpy
# add any package you want above and they will be added to the shell
exit 1
""" #"
@JosephCatrambone
JosephCatrambone / lib.rs
Last active March 8, 2024 01:32
Embedding GPT-2 in Godot via Rust
mod ml_thread;
use gdnative::prelude::{godot_print, methods, Method, NativeClass, Node as GDNode, InitHandle, godot_init};
use ml_thread::start_language_model_thread;
use std::sync::mpsc::{channel, Receiver, RecvError, Sender, SendError};
const MAX_INPUT_LENGTH: usize = 512;
const BATCH_SIZE: usize = 1;