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 | |
from PIL import ImageFont | |
from PIL import ImageDraw | |
img = Image.open("/Users/paulocheque/Desktop/flag-brazil.jpg") | |
draw = ImageDraw.Draw(img) | |
#font = ImageFont.truetype("sans-serif.ttf", 16) | |
#font = ImageFont.load("arial.pil") | |
font = ImageFont.truetype("arial.ttf", 15) | |
draw.text((0, 0),"Sample Text",(255,255,255),font=font) | |
img.save('flag-brazil-2.jpg') |
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
# -*- coding: utf-8 -*- | |
import os | |
import tempfile | |
from shutil import rmtree, copy2 | |
TEMP_PATH = tempfile.gettempdir() or os.environ.get('TEMP') | |
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": "pypy", | |
"url": "http://localhost:8000", | |
"host": "localhost", | |
"port": 8000, | |
"heroku_app": null, | |
"heroku_app_addons": [], | |
"heroku_worker": null, | |
"heroku_worker_addons": [], | |
"heroku_cedar": null, |
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
# ab -n 2000 -c 200 https://url/ | |
install_dependencies() { | |
brew install freetype | |
brew install libpng | |
brew install libevent | |
virtualenv venv --no-site-packages | |
source venv/bin/activate | |
pip install numpy | |
pip install matplotlib |
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
# You may put this on the rakelib directory or renamed it to .rb and add a 'require' command | |
MAIN_PATH = File.dirname(__FILE__) | |
module OS | |
def OS.windows? | |
(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil | |
end | |
def OS.mac? |
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
Show hidden characters
[ | |
{ "keys": ["super+alt+q"], "command": "wrap_lines" }, | |
{ "keys": ["super+x"], "command": "cut" }, | |
{ "keys": ["super+d"], "command": "cut" }, | |
{ "keys": ["super+shift+d"], "command": "duplicate_line" }, | |
{ "keys": ["alt+up"], "command": "swap_line_up" }, | |
{ "keys": ["alt+down"], "command": "swap_line_down" }, |
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
# EDITOR=nano sudo visudo | |
# Change the following line: (:i to insert + esc to go back + :w to save + :q to quit) | |
# Defaults env_reset | |
# to: | |
# Defaults env_reset,timestamp_timeout=960 # in minutes | |
export PATH=$PATH:. | |
# export PATH=$PATH:/usr/bin |
NewerOlder