- Labels Detection
- Faces Detection
- Faces Comparison
- Faces Indexing
- Faces Search
import base64 | |
import requests | |
INFO = 'api/json' | |
JOB_INFO = 'job/%s/api/json?depth=0' | |
JOB_NAME = 'job/%s/api/json?tree=name' | |
JOB_CONFIG = 'job/%s/config.xml' | |
CREATE_JOB = 'createItem?name=%s' | |
ENABLE_JOB = 'job/%s/enable' | |
DISABLE_JOB = 'job/%s/disable' |
# As the Kivy docs ( http://kivy.org/docs/guide/other-frameworks.html ) state: | |
# install_twisted_rector must be called before importing and using the reactor. | |
from kivy.support import install_twisted_reactor | |
install_twisted_reactor() | |
from autobahn.twisted.websocket import WebSocketClientProtocol, \ | |
WebSocketClientFactory | |
class MyKivyClientProtocol(WebSocketClientProtocol): |
<?php | |
// Call this with a cron script on a timed interval to scrape it | |
$user_agent = $_SERVER['HTTP_USER_AGENT']; // its possible you may wish to use an alternative user agent here | |
// First call gets hidden form field authenticity_token | |
// and session cookie | |
$ch = curl_init(); | |
$sTarget = "https://twitter.com/"; | |
curl_setopt($ch, CURLOPT_URL, $sTarget); |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Example of `object pool' 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. |
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |
<?php | |
class custom_feed { | |
public $feed = 'custom-xml'; | |
public function __construct() { | |
add_action( 'init', array( $this, 'init' ) ); | |
import kivy | |
import os | |
import subprocess | |
kivy.require('1.0.7') | |
from kivy.animation import Animation | |
from kivy.app import App | |
from kivy.uix.button import Button | |
from kivy.uix.scatter import ScatterPlane | |
from kivy.uix.slider import Slider |
Here at Glitterbug Tech, Django is the lifeline of everything we make and we are big fans! Django doesn't get in the way and lets us write the language we love, python, while providing an amazing set of tools that makes creating web applications fast and fun. But, as you know, code is executed synchronously before you can send back a response. Which means when you are generating that report from your database which has a million rows, your client has to wait for a response while your application huffs and puffs trying to get everything ready (Unless he times out, in which case you receive angry calls while you try to explain what "502 Bad Gateway" means). Sometimes you just want to make your site more responsive by pushing time consuming tasks in the background ("Your comment has been posted!" while a zmq process works in the backend adding it to your db/caching layer/pushing it to followers/creating rainbows). Wha
import time | |
import struct | |
import socket | |
import hashlib | |
import sys | |
from select import select | |
import re | |
import logging | |
from threading import Thread | |
import signal |