Skip to content

Instantly share code, notes, and snippets.

View cleder's full-sized avatar
👽

Christian Ledermann cleder

👽
  • Oomnitza
  • Tuam, Ireland
  • 15:43 (UTC -12:00)
View GitHub Profile

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

Install dlib and face_recognition on a Raspberry Pi

Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.

Steps

Download the latest Raspbian Jessie Light image. Earlier versions of Raspbian won't work.

Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.

@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 10, 2024 20:23
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@miikka
miikka / schema.py
Last active November 25, 2023 20:09
Using Hypothesis to generate XML based on RELAX-NG
import string
from lxml import etree
from lxml.etree import QName
from lxml.builder import E
from hypothesis import strategies as st
NS = "http://relaxng.org/ns/structure/1.0"
@AlexRiina
AlexRiina / noqaer.py
Last active May 11, 2023 00:33
automatically ignore lines from flake8
"""
Add `# noqa: FXXX` comments to all lines with violations from flake8
"""
# MIT License
#
# Copyright (c) 2022 Alex Riina
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python3
import re
import os
import subprocess
import statistics
class NoQueryPlanOutput(Exception):
pass
@aidenprice
aidenprice / Ray_Casting_Algorithm.py
Last active September 21, 2022 16:10
A Python implementation of the Ray-Casting algorithm solution to the point-in-polygon problem. Originally a method in the APPolygonObject class written for my Curtin University, Masters of Geospatial Science, Spatial Computations 100, second assignment, BoreholeWrangler V3.0.
def determineIfPointLiesWithinPolygon(self, locationToTest):
# Check that the argument is actually a LocationObject.
if isinstance(locationToTest, LocationObject):
# Set crossings value to initial zero value.
iCrossings = 0
# For each segment of the polygon (i.e. line drawn between each of the polygon's vertices) check whether
# a ray cast straight down from the test location intersects the segment (keep in mind that the segment
# may be intersected either coming or going). If the ray does cross the segment, increment the iCrossings
@debarko
debarko / capsLayer.py
Created November 1, 2017 00:26
CapsNet Capsule Definition
# It only has two dependencies numpy and tensorflow
import numpy as np
import tensorflow as tf
from config import cfg
# Class defining a Convolutional Capsule
# consisting of multiple neuron layers
#