Skip to content

Instantly share code, notes, and snippets.

View rskupnik's full-sized avatar

Radosław Skupnik rskupnik

View GitHub Profile
@rskupnik
rskupnik / auth_fingerprint.py
Created January 18, 2019 19:43
HTTP server that allows for adding and authenticating a fingerprint with a Waveshare fingerprint scanner
#!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import SocketServer
import serial
ser = serial.Serial("/dev/serial0", baudrate=19200, timeout = 5)
def send_bytes(bytes):
tosend = [0xF5] + bytes + [bytes[0]^bytes[4], 0xF5]
@rskupnik
rskupnik / dlalenia.java
Created December 2, 2017 11:29
Dla niestacjonarnych leniów
2:
public static int whereIsMaxValue(int[] table) {
int max;
int maxIndex = -1;
for (int i = 0; i < table.length; i++) {
if (table[i] > max) {
max = table[i];
maxIndex = i;
}