Skip to content

Instantly share code, notes, and snippets.

View whosurajnegi's full-sized avatar
I'll be there in a flash

Suraj Negi whosurajnegi

I'll be there in a flash
View GitHub Profile
@whosurajnegi
whosurajnegi / face-boxer-usage.md
Created November 22, 2017 06:09 — 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.
@whosurajnegi
whosurajnegi / gist:a62f9d962820af94dacae4c2f1f11071
Created September 11, 2017 18:11
Rock_Paper_Scissors game using Python3.6.2
#!/bin/python3
from random import randint
player = input('rock(r), paper(p), scissors(s)?')
#print(player,'vs' , end='')
if player == 'r':
print('0', end='')
elif player == 'p':
print('_', end='')
elif player == 's':
print('>8', end='')