Skip to content

Instantly share code, notes, and snippets.

# basic stuff
sudo apt install \
curl \
wget \
vim \
git \
cmake \
unzip \
  1. STOP THE DOCKER DAEMON
sudo service docker stop
  1. ADD A CONFIGURATION FILE TO TELL THE DOCKER DAEMON WHAT IS THE LOCATION OF THE DATA DIRECTORY Using your preferred text editor add a file named daemon.json under the directory /etc/docker. The file should have this content:
{
  "data-root": "/path/to/your/docker"
}
int led_pins[6] = {3, 5, 6, 9, 10, 11};
byte led_values[6] = {128, 128, 128, 128, 128, 128};
int button0_pin = 2;
int button0_state = 0;
void setup_leds() {
// вроде как это не обязательно при использовании analogWrite
for (int i = 0; i < 6; i++) {
"""
this script takes `image.png` as input,
resize it to 63pix height,
then binarize it,
to create `_Bootscreen.h` file
`_Bootscreen.h` can be used as part of https://github.com/MarlinFirmware/Marlin
I used it with: https://github.com/bigtreetech/BIGTREETECH-SKR-mini-E3/tree/master/firmware/V2.0/Marlin-2.0.7.2-SKR-mini-E3-V2.0
>>> import graphviz
>>> import torch
>>> import torch.nn as nn
>>> x = torch.randn([1, 1, 16])
>>> x.shape
torch.Size([1, 1, 16])
>>> rnn = nn.LSTM(
... input_size=16,
... hidden_size=8,
... num_layers=2,
@meikuam
meikuam / build.sh
Last active June 5, 2020 11:30
tensorflow 2.2.0 compile
# build tensorflow2.2.0
sudo apt-get install -y \
protobuf-compiler python3-pil python3-lxml python3-tk cython \
autoconf automake libtool curl make g++ unzip wget git \
libgflags-dev libgoogle-glog-dev liblmdb-dev libleveldb-dev \
libhdf5-serial-dev libhdf5-dev python3-opencv\
python3-dev python3-numpy python3-skimage gfortran libturbojpeg \
libboost-all-dev libopenblas-dev libsnappy-dev software-properties-common \
libfreetype6-dev pkg-config \
libpng-dev libhdf5-103 libhdf5-cpp-103 libc-ares-dev libblas-dev \
# openrazer-meta from repo
sudo apt install python3-setproctitle xautomation python3-pyudev -y
git clone --depth=50 https://github.com/openrazer/openrazer.git && cd openrazer
./scripts/build_debs.sh
sudo dpkg -i openrazer-driver-dkms_2.7.0-0_all.deb
sudo gpasswd -a $USER plugdev
sudo dpkg -i openrazer-daemon_2.7.0-0_all.deb
@meikuam
meikuam / optimization.py
Created April 9, 2019 04:29
Optimization algorithms
import numpy as np
# SGD
while True:
#....
dx = network.backward()
x = x - learning_rate * dx
@meikuam
meikuam / nvidia.md
Last active May 30, 2023 08:31 — forked from cavinsmith/nvidia.md
Nvidia GPUs sorted by CUDA cores

List of desktop Nvidia GPUS ordered by CUDA core count

Compute Capability from (https://developer.nvidia.com/cuda-gpus)

GPU CUDA cores Memory Processor frequency Compute Capability
GeForce GTX TITAN Z 5760 12 GB 705 / 876 3.5
NVIDIA TITAN Xp 3840 12 GB 1582 6.1
GeForce GTX 1080 Ti 3584 11 GB 1582 6.1
GeForce GTX TITAN X 3072 12 GB 1000 / 1075 6.1