Skip to content

Instantly share code, notes, and snippets.

@toritori0318
toritori0318 / ptags.py
Last active October 2, 2015 05:17
ptagsのディレクトリ再帰版
#! /usr/bin/env python
# ptags
#
# Create a tags file for Python programs, usable with vi.
# Tagged are:
# - functions (even inside other defs or classes)
# - classes
# - filenames
# Warns about files it cannot open.
@robo8080
robo8080 / FaceDetect2.py
Created August 27, 2016 12:33
FaceDetect2.py
#!python2
from PIL import Image, ImageDraw
import photos
from objc_util import *
CIImage, CIDetector = map(ObjCClass, ['CIImage', 'CIDetector'])
#imagebuffer = photos.capture_image()
imagebuffer = photos.pick_image()
imagebuffer.save('.temp.jpg')
data = NSData.dataWithContentsOfFile_('.temp.jpg')