This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import numpy as np | |
| from lerobot.common.robot_devices.robots.so101 import SO101Follower | |
| from lerobot.common.robot_devices.cameras import get_cameras | |
| # initialize robot and cameras | |
| robot = SO101Follower(port="/dev/ttyACM0", id="my_so101") # Adjust port | |
| robot.connect() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import mlx.core as mx | |
| from mlx.utils import tree_flatten | |
| from mlx_lm import load | |
| model, _ = load("HuggingFaceTB/SmolLM2-135M") | |
| def absmax_int8(w): | |
| scale = mx.max(mx.abs(w)) / 127.0 | |
| w_q = mx.round(w / scale).astype(mx.int8) | |
| w_hat = w_q.astype(w.dtype) * scale |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| # cleanup.sh | |
| # Usage: ./cleanup.sh [directory] | |
| # Default to HOME if no directory is provided | |
| TARGET="${1:-$HOME}" | |
| echo "### macOS SSD Analysis for: $TARGET" | |
| echo "### Date: $(date)" | |
| echo "---" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/binary" | |
| "fmt" | |
| "math" | |
| "math/rand" | |
| "regexp" | |
| "strings" | |
| "syscall/js" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>RSA — Multiplicative Homomorphism</title> | |
| <link href="https://fonts.googleapis.com/css2?family=Archivo+Black&family=Work+Sans:wght@400;600&family=Space+Mono&display=swap" rel="stylesheet"> | |
| <style> | |
| *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import AVFoundation | |
| import Vision | |
| import CoreImage | |
| class CameraCapture: NSObject, AVCaptureVideoDataOutputSampleBufferDelegate { | |
| var foundQR: String? | |
| let qrQueue = DispatchQueue(label: "qrqueue") | |
| func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from numpy.polynomial import Polynomial | |
| # Set the parameters | |
| M = 8 | |
| N = M // 2 | |
| scale = 64 | |
| xi = np.exp(2 * np.pi * 1j / M) | |
| def vandermonde(xi: np.complex128, M: int) -> np.array: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## ----setup---- | |
| library(polynom) | |
| library(HomomorphicEncryption) | |
| ## ----seed----- | |
| set.seed(123) | |
| ## ----params----- | |
| M <- 8 | |
| N <- M / 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input_file <- "input.txt" | |
| if (!file.exists(input_file)) { | |
| names_url <- "https://raw.githubusercontent.com/karpathy/makemore/refs/heads/master/names.txt" | |
| download.file(names_url, input_file) | |
| } | |
| lines <- readLines(input_file, warn = FALSE) | |
| docs <- lines[nchar(trimws(lines)) > 0] | |
| set.seed(42) | |
| docs <- sample(docs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # rnn.R | |
| # Bastiaan Quast | |
| # bquast@gmail.com | |
| # Set the seed to obtain identical random values | |
| set.seed(0) | |
| # compute sigmoid nonlinearity | |
| sigmoid = function(x) | |
| 1 / (1+exp(-x)) |
NewerOlder