Skip to content

Instantly share code, notes, and snippets.

Avatar

Linux for Embedded Systems l4es

View GitHub Profile
@l4es
l4es / factory.cpp
Created Dec 25, 2017 — forked from facontidavide/factory.cpp
Factory pattern in C++
View factory.cpp
#include <iostream>
#include <unordered_map>
#include <functional>
#include <vector>
// Base class
class Shape {
public:
virtual void draw() = 0;
};
@l4es
l4es / DecoratorMain.cpp
Created Dec 25, 2017 — forked from dlivingstone/DecoratorMain.cpp
Simple C++ Decorator Pattern example
View DecoratorMain.cpp
// Simple decorator pattern example
// (c) Daniel Livingstone 2012
// CC-BY-SA
#include <string>
#include <iostream>
using namespace std;
class AbstractNPC {
public:
@l4es
l4es / prototype.cpp
Created Dec 25, 2017 — forked from pazdera/prototype.cpp
Example of `prototype' design pattern in C++
View prototype.cpp
/*
* Example of `prototype' design pattern.
* Copyright (C) 2011 Radek Pazdera
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
@l4es
l4es / adapter.cpp
Created Dec 25, 2017 — forked from pazdera/adapter.cpp
Example of `adapter' design pattern in C++
View adapter.cpp
/*
* Example of `adapter' design pattern
* Copyright (C) 2011 Radek Pazdera
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
@l4es
l4es / bridge.cpp
Created Dec 25, 2017 — forked from pazdera/bridge.cpp
Example of `bridge' design pattern in C++
View bridge.cpp
/*
* Example of `bridge' design pattern
* Copyright (C) 2011 Radek Pazdera
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
@l4es
l4es / EventDispatcher.cpp
Created Jan 2, 2018 — forked from sansumbrella/EventDispatcher.cpp
C++ observer pattern for event handling.
View EventDispatcher.cpp
#include "EventDispatcher.h"
void EventDispatcher::addListener( Listener *l )
{
mListeners.push_back(l);
}
void EventDispatcher::removeListener( Listener *l )
{
mListeners.erase( std::remove( mListeners.begin(), mListeners.end(), l ), mListeners.end() );
View dlib and face_recognition on raspberry pi.md

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.