Skip to content

Instantly share code, notes, and snippets.

View Furffico's full-sized avatar
🎯
Focusing

Nagakawa Yuno Furffico

🎯
Focusing
View GitHub Profile
@lukasc-ch
lukasc-ch / atlas_cam.py
Last active December 11, 2022 06:53
CAMERA INTERFACE CODE FOR THE HUAWEI ATLAS 200 DK
# CAMERA INTERFACE CODE FOR THE HUAWEI ATLAS 200 DK
import cffi
import numpy as np
class AtlasCamera:
def __init__(self, cameraId=0, height=720, width=1280, frame_rate=20,
debug_print=False, libmedia_path="/usr/lib64/libmedia_mini.so"):
super().__init__()
@NoraCodes
NoraCodes / work_queue.rs
Last active February 21, 2024 15:27
An example of a parallel work scheduling system using only the Rust standard library
// Here is an extremely simple version of work scheduling for multiple
// processors.
//
// The Problem:
// We have a lot of numbers that need to be math'ed. Doing this on one
// CPU core is slow. We have 4 CPU cores. We would thus like to use those
// cores to do math, because it will be a little less slow (ideally
// 4 times faster actually).
//
// The Solution:
@karpathy
karpathy / min-char-rnn.py
Last active July 16, 2024 17:48
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)
@iamnewton
iamnewton / bash-colors.md
Last active July 10, 2024 19:49
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@mattetti
mattetti / multipart_upload.go
Last active April 22, 2024 05:24
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"