Skip to content

Instantly share code, notes, and snippets.

View beyond_class.py
class Keyboad():
def __init__(self):
self.conf1 = 100
self.keymap = []
self.extensions = []
def find_key(self, row, col):
return self.keymap[row][col]
View gist:d7663f94616eb5eb35565ab6ff83460a
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
call_sign = "JI1SVR"
View myk8sinit.sh
sudo apt install ssh
sudo apt install wget
sudo apt install vim
sudo apt install -y docker.io
sudo usermod -aG docker techlab
sudo swapoff -a
View raspi4_edgetpu_py37_object_detection.py
"""A demo which runs object detection on OpenCV frames."""
import argparse
import cv2
import logging
import os
import edgetpu.detection.engine
FONT = cv2.FONT_HERSHEY_SIMPLEX
@a2chub
a2chub / 00_readme
Created Jul 19, 2017
simple nginx on docker
View 00_readme
$ docker build . -t hoge/web
$ docker run -p 8080:80 -t hoge/web
View sh
#!/bin/bash
cd ~
virtualenv tensorflow2
source tensorflow2/bin/activate
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.2.1-py2-none-any.whl
pip install jupyter
pip install pandas
pip install matplotlib
pip install cloudmlmagic
View bps tester
#!/usr/bin/env python
#coding:utf-8
from time import sleep
from random import randint
BitPerSecond = 80.0
def main():
loopCnt = 0
View google-cloud-vision-api-bigquery-schema.json
[
{
"name": "gcs_url",
"type": "STRING",
"mode": "NULLABLE"
},
{
"name": "timestamp",
"type": "TIMESTAMP",
"mode": "NULLABLE"
View gist:4079fa32ef7e7881c9dd
##2016-02-24
# QAV-210
# Naze32 afro rev6
# RS2205 2300kv
# 5045
# version
# Cleanflight/NAZE 1.12.0 Feb 19 2016 / 20:01:21 (aa8608a)
# status
View gist:c4aa39fab69b2ea60206
a2c QAV210 2016-02-24
# status
System Uptime: 22 seconds, Voltage: 0 * 0.1V (1S battery - NOT PRESENT), System load: 0.27
CPU Clock=72MHz, GYRO=MPU6500, ACC=MPU6500, BARO=BMP280
Cycle Time: 1009, I2C Errors: 0, config size: 2072
# tasks
Task list:
0 - SYSTEM, max = 9 us, avg = 0 us, total = 1 ms