This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! (C) 2013 Charles Alston. | |
USING: accessors arrays byte-arrays fry google.search io | |
io.encodings.utf8 io.launcher kernel locals make namespaces | |
sequences simple-tokenizer splitting strings unicode.categories | |
webbrowser wordtimer ; | |
IN: spotlight | |
! *** SEARCHING ON OS X VIA SPOTLIGHT METADATA INDEX, & MANAGING INDEXING FROM FACTOR *** | |
! *** MAC OS X 10.6.8 & LATER: IMPLEMENTING mdfind, mdls, mdutil, mdimport *** | |
! mdfind, mdls, mdutil, mdimport TAKE A QUERY ON THE STACK & RETURN A SEQUENCE OF RESULT STRINGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CGImageRef imageRef = CGWindowListCreateImage(CGRectInfinite, kCGWindowListOptionAll, kCGNullWindowID, kCGWindowImageDefault); | |
CFMutableDataRef dataRef = CFDataCreateMutable(kCFAllocatorDefault, 0); | |
CGImageDestinationRef dest = CGImageDestinationCreateWithData(dataRef, kUTTypePNG, 1, NULL); | |
CGImageDestinationAddImage(dest, imageRef, NULL); | |
CGImageDestinationFinalize(dest); | |
CFRelease(dest); | |
CGImageRelease(imageRef); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### General PFCTL Commands #### | |
$ pfctl -d disable # packet-filtering | |
$ pfctl -e enable # packet-filtering | |
$ pfctl -q # run quiet | |
$ pfctl -v -v # run even more verbose | |
#### Loading PF Rules #### | |
$ pfctl -f /etc/pf.conf # load /etc/pf.conf | |
$ pfctl -n -f /etc/pf.conf # parse /etc/pf.conf, but dont load it | |
$ pfctl -R -f /etc/pf.conf # load only the FILTER rules | |
$ pfctl -N -f /etc/pf.conf # load only the NAT rules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import face_keras as face | |
import sys, os | |
from keras.preprocessing.image import load_img, img_to_array | |
import numpy as np | |
import cv2 | |
import time | |
cascade_path = "haarcascade_frontalface_alt.xml" | |
cascade = cv2.CascadeClassifier(cascade_path) | |
cam = cv2.VideoCapture(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Python 3 | |
""" | |
import os | |
import glob | |
import argparse | |
import cv2 | |
from PIL import Image | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (id)sharedInstance | |
{ | |
static __weak ASingletonClass *instance; | |
ASingletonClass *strongInstance = instance; | |
@synchronized(self) { | |
if (strongInstance == nil) { | |
strongInstance = [[[self class] alloc] init]; | |
instance = strongInstance; | |
} | |
} |
NewerOlder