Skip to content

Instantly share code, notes, and snippets.

View MinhazAbtahi's full-sized avatar

Minhazul Arefin Abtahi MinhazAbtahi

View GitHub Profile
@MinhazAbtahi
MinhazAbtahi / face-boxer-usage.md
Created August 25, 2016 06:15 — forked from dannguyen/face-boxer-usage.md
A face-detection script in Python

This face-boxer.py script is more-or-less the same code that you'll find in the OpenCV tutorial: Face Detection using Haar Cascades. For another variation, with more explanation, check out RealPython's tutorial.

Usage

The face-boxer.py script is designed to be run from the command-line. It has two required arugments:

  1. The path to a XML file containing a Haar-cascade of visual features. In this example, it will be the features that make up a face.
  2. The path to an image file that you want to perform face-detection on. You can pass in more than one image file as space-separated arguments.
@MinhazAbtahi
MinhazAbtahi / facepass.py
Created August 24, 2016 09:23 — forked from rishimukherjee/facepass.py
Example of use of SimpleCV. This creates a face recognized password.
#!/usr/bin/python
import time
from SimpleCV import Color, Image, np, Camera
cam = Camera() #initialize the camera
quality = 400
minMatch = 0.3
try:
password = Image("password.jpg")
@MinhazAbtahi
MinhazAbtahi / TempLogger.cpp
Created July 27, 2016 22:12 — forked from biomood/TempLogger.cpp
Arduino and Python Temperature Logger
#include <OneWire.h>
#include <DallasTemperature.h>
// pin setups
int latchPin = 8;
int clockPin = 12;
int dataPin = 11;
int tempPin = 7;
char recMsg = '0';
@MinhazAbtahi
MinhazAbtahi / mailer.py
Created July 14, 2016 04:37 — forked from dbieber/mailer.py
Send an email through Gmail programmatically using Python's smtplib. Code modified from http://kutuma.blogspot.com/2007/08/sending-emails-via-gmail-with-python.html
#!/usr/bin/python
# Adapted from http://kutuma.blogspot.com/2007/08/sending-emails-via-gmail-with-python.html
import getpass
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
from email import Encoders
import os
@MinhazAbtahi
MinhazAbtahi / MoveCameraInertia.cs
Created July 3, 2016 20:12 — forked from JISyed/MoveCameraInertia.cs
Similar to MoveCamera.cs (https://gist.github.com/JISyed/5017805), except with inertia. This makes the camera gradually come to a smooth stop when stopping the camera movement.
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement
// for using the mouse displacement for calculating the amount of camera movement and panning code.
using UnityEngine;
using System.Collections;
public class MoveCamera : MonoBehaviour
{
//
@MinhazAbtahi
MinhazAbtahi / MoveCamera.cs
Created July 3, 2016 19:59 — forked from JISyed/MoveCamera.cs
Camera movement script in Unity3D. Supports rotating, panning, and zooming. Attach to the main camera. Tutorial explaining code: http://jibransyed.wordpress.com/2013/02/22/rotating-panning-and-zooming-a-camera-in-unity/
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement
// for using the mouse displacement for calculating the amount of camera movement and panning code.
using UnityEngine;
using System.Collections;
public class MoveCamera : MonoBehaviour
{
//
// VARIABLES