Skip to content

Instantly share code, notes, and snippets.

View gaiar's full-sized avatar

Gaiar Baimuratov gaiar

View GitHub Profile
## Enable XiaoYiCamera Telnet Service
* Create an empty file (enable_info_display.script) in SD card
* Connect to WIFI (YDXJ_XXXXXXX) with default password (1234567890)
* Telnet into 192.168.42.1 as root without any password
@gaiar
gaiar / pytorch-on-raspberry-pi3.md
Created May 23, 2018 08:54 — forked from fgolemo/pytorch-on-raspberry-pi3.md
How to install PyTorch v0.3.1 on RaspberryPi 3B - Tutorial

How to install PyTorch v0.3.1 on RaspberryPi 3B

Prerequisites

Important I'd recommend you use at least a 16GB sd card. I tried it with an 8GB card and it baaaaarely fits. I had to uninstall a lot of packages and regularly clean up.

Go to https://www.raspberrypi.org/downloads/raspbian/ and download the Raspbian Stretch image (either one).

Use Etcher (from https://etcher.io/) to "burn" the image onto the SD card.

cat /proc/cpuinfo | grep neon
@gaiar
gaiar / DS NN guidelines
Created June 6, 2018 12:03 — forked from snakers4/DS NN guidelines
Complete system installation for Data Science / Neural Networks from scratch / bare metal (assuming you have assembled the PC)
# BASIC SYSTEM SETUP
# First donwload Ubuntu iso file from https://www.ubuntu.com/download/desktop
# Use 16.04 LTS (17 is also ok, but it's better to use LTS versions, also 18 will be very mature in terms of systemd)
# Dowload Linux live USB creator and install the iso to your USB stick https://www.linuxliveusb.com
# Boot your system, go to BIOS on boot (usually Del) or boot menu (usually F12) and choose your USB stick as boot medium
# Install Linux (these steps can be omitted if clean Ubuntu installation is provided as service by admins / cloud provider / etc)
# Minor trick unplug ALL of your hard disks (unless you are an avanced user) except for the disk for your system
FROM continuumio/miniconda3
# Set the ENTRYPOINT to use bash
# (this is also where you’d set SHELL,
# if your version of docker supports this)
ENTRYPOINT [ “/bin/bash”, “-c” ]
EXPOSE 5000
# Conda supports delegating to pip to install dependencies
def nearest(pixel_color, mem={}):
if pixel_color in mem:
return mem[pixel_color]
n = min(floss_palette, key=lambda fc:delta_e_cie2000(pixel_color, fc))
mem[pixel_color] = n
return mem[pixel_color]
result = [nearest(pixel_color) for pixel_color in image]
wget http://nginx.org/download/nginx-1.9.11.tar.gz
wget https://github.com/arut/nginx-rtmp-module/archive/v1.1.7.tar.gz
tar xzf nginx-1.9.11.tar.gz
tar xzf v1.1.7.tar.gz
pacman -Sy base-devel ffmpeg nginx
cd nginx-1.9.11
./configure \
--prefix=/etc/nginx \
--conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/bin/nginx \
git reflog expire --all --expire=now
git gc --prune=now --aggressive
@gaiar
gaiar / Dockerfile
Created July 3, 2018 08:12 — forked from snakers4/Dockerfile
My PyTorch 0.4 Dockerfile
# add 7z tar and zip archivers
FROM nvidia/cuda:9.0-cudnn7-devel
# https://docs.docker.com/engine/examples/running_ssh_service/
RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:Ubuntu@41' | chpasswd
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
RUN mkdir ~/.ssh/
ctng_nature:
- shared
ctng_sample:
- x86_64-centos6-linux-gnu
ctng_cpu_arch:
- x86_64
ctng_libc:
- gnu
gnu:
- 2.12.2