This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Einstellungen | |
SET FOLDER_ROOT="..\CAD-DATEN" | |
SET FOLDER_CAD="CAD PDF" | |
SET FOLDER_PRODUCT="Produkt PDF" | |
SET PRODUCT_EXCLUDE_PREFIX=W- | |
:: ---------------------------------------------------------------------------------------------- | |
:: | DO NOT TOUCH THE CODE BEHIND THIS LINE | | |
:: ---------------------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Erweiterte C-Statemachine | |
* Das Programm gibt folgendes aus: | |
* | |
* BEGIN: Es geht los. Ich initialisiere das Ganze. | |
* BEGIN: Es geht weiter in den Zustand ADDITION_SMALL | |
* BEGIN: Auf Wiedersehen! | |
* ADDITION_SMALL: Ich fange erst einmal mit kleinen Zahlen an. | |
* ADDITION_SMALL: Addiere Eins... | |
* ADDITION_SMALL: Addiere Eins... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PVector[] circleIntersections(PVector p1, float r1, PVector p2, float r2) | |
{ | |
float d, a, h; | |
float dx, dy; | |
dx = p2.x - p1.x; | |
dy = p2.y - p1.y; | |
PVector dvect = new PVector(p1.x - p2.x, p1.y - p2.y); | |
d = dvect.mag(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import glob | |
import serial | |
def serial_ports(): | |
"""Lists serial ports | |
:raises EnvironmentError: | |
On unsupported or unknown platforms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv | |
HAAR_CASCADE_PATH = "/usr/local/Cellar/opencv/2.4.3/share/OpenCV/" \ | |
"haarcascades/haarcascade_frontalface_default.xml" | |
CAMERA_INDEX = 0 | |
def detect_faces(image): | |
faces = [] | |
detected = cv.HaarDetectObjects(image, cascade, storage, 1.2, 2, | |
cv.CV_HAAR_DO_CANNY_PRUNING, (100,100)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------- | |
// i2c_scanner | |
// | |
// Version 1 | |
// This program (or code that looks like it) | |
// can be found in many places. | |
// For example on the Arduino.cc forum. | |
// The original author is not known. | |
// Version 2, Juni 2012, Using Arduino 1.0.1 | |
// Adapted to be as simple as possible by Arduino.cc user Krodal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
def lowpass(img): | |
""" | |
A simple pure python low pass (antialiasing) filter. | |
Applies a gaussian blur on a 2D list of floats. | |
""" | |
width = len(img[0]) | |
height = len(img) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" A python 2D vector class based on complex numbers | |
""" | |
import cmath | |
class Vector(complex): | |
@classmethod | |
def fromPolar(cls, r, phi): | |
return cls(cmath.rect(r, phi)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
PIP=pip3 | |
scriptdir=$(dirname "$0") | |
listsdir="$scriptdir/lists" | |
mkdir -p "$listsdir" | |
echo "Update all python packages..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Fast duplicate file finder. | |
Usage: duplicates.py <folder> [<folder>...] | |
Based on https://stackoverflow.com/a/36113168/300783 | |
Modified for Python3 with some small code improvements. | |
""" | |
import os | |
import sys |
OlderNewer