Skip to content

Instantly share code, notes, and snippets.

View davidkwast's full-sized avatar
🌐

David Kwast davidkwast

🌐
View GitHub Profile
import tkinter as tk
import tkinter.filedialog as filedialog
# from pillow import Image, ImageTk
class ImageLayer:
def __init__(self):
self.width = 0
self.height = 0
self.x = 0
@davidkwast
davidkwast / graphictest.ino
Created April 5, 2018 22:56
Deek Robot 1.8" TFT LCD with Adafruit ST7735
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
#define LCD_CS 10
#define DC 8
#define RESET 9
Adafruit_ST7735 tft = Adafruit_ST7735(LCD_CS, DC, RESET);
@davidkwast
davidkwast / 7seg.ino
Created April 5, 2018 16:35
Arduino 7-Segment test
/* A
---
F | | B
| G |
---
E | | C
| |
---
D
This example code is in the public domain.
@davidkwast
davidkwast / captcha.py
Last active March 2, 2018 02:09
Simple python captcha reader using tesseract OCR
from PIL import Image
import sys
import pyocr
import pyocr.builders
tools = pyocr.get_available_tools()
if len(tools) == 0:
print("No OCR tool found")
sys.exit(1)
@davidkwast
davidkwast / Dockerfile
Created February 9, 2018 11:24
FTP Server Container
FROM debian:wheezy
MAINTAINER David Kwast <david@kwast.me>
RUN apt-get update && apt-get -y install proftpd && apt-get clean
RUN useradd -g root -d /var/www/html ftpuser && (echo "password";echo "password") | passwd ftpuser
RUN (echo "password";echo "password") | passwd root