Skip to content

Instantly share code, notes, and snippets.

@drorgl
drorgl / library_json_schema.json
Created November 25, 2022 12:50
PlatformIO library.json schema
{
"$id": "https://example.com/library.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "library.json schema",
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 50,
"description": "A name of a library.\nMust be unique in the PlatformIO Registry\nShould be slug style for simplicity, consistency, and compatibility. Example: HelloWorld\nCan contain a-z, digits, and dashes (but not start/end with them)\nConsecutive dashes and [:;/,@<>] chars are not allowed.",
@drorgl
drorgl / mnist.4k.py
Created June 12, 2018 19:28
mnist ~3800 parameters model
# 3. Import libraries and modules
import numpy as np
np.random.seed(123) # for reproducibility
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Convolution1D, Convolution2D, MaxPooling1D,MaxPooling2D,AveragePooling2D,AveragePooling1D, BatchNormalization
from keras.utils import np_utils
from keras.datasets import mnist
from keras.layers.core import Reshape
@drorgl
drorgl / mnist.sequential.py
Created June 6, 2018 09:01
mnist sequential tiny model
# 3. Import libraries and modules
import numpy as np
np.random.seed(123) # for reproducibility
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Convolution2D, MaxPooling2D,AveragePooling2D
from keras.utils import np_utils
from keras.datasets import mnist
#include <TM1637Display.h>
#if defined(__AVR_ATtiny85__)
#include <Adafruit_SoftServo.h>
#define Servo Adafruit_SoftServo
#define SERVO_PIN PB0
#define POT_PIN PB1
#define DISPLAY_CLK PB3
#define DISPLAY_DIO PB4