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
from PIL import Image | |
def average_image_color(filename): | |
i = Image.open(filename) | |
h = i.histogram() | |
# split into red, green, blue | |
r = h[0:256] | |
g = h[256:256*2] | |
b = h[256*2: 256*3] |
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
<?php | |
class hunspell { | |
private $language = "en_US"; // en_US, ar, etc | |
private $encoding = "en_US.utf-8"; | |
private $raw; | |
private $hunspellVersion; | |
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
#!/bin/sh | |
# http://nathanvangheem.com/news/gunicorn-startup-script-for-django | |
# Place the script in the file - /etc/init.d/gunicorn or whatever you'd like to call it | |
# make it executable - chmod +x /etc/init.d/gunicorn | |
# And finally, wire it up - update-rc.d gunicorn defaults | |
ADDRESS='127.0.0.1' | |
PYTHON="/opt/django/bin/python" | |
GUNICORN="/opt/django/bin/gunicorn_django" |
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
<?php | |
// https://github.com/facebook/php-sdk/ | |
require_once 'path/to/facebook.php'; | |
// http://www.kigkonsult.se/iCalcreator/ | |
require_once 'path/to/iCalcreator.class.php'; | |
$config = array( | |
'appId' => 'xxxx',//change to your fb app id | |
'secret' => 'yyyy',//change to your fb app secret | |
'pageId' => 'shimokitazawa.osscafe',//change to target fb page id |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: gunicorn | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the gunicorn server | |
# Description: starts gunicorn using start-stop-daemon |
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
i | |
me | |
my | |
myself | |
we | |
our | |
ours | |
ourselves | |
you | |
your |
NewerOlder