IAM Policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1517398919242",
{ | |
"cmd": ["fpcbuild.bat", "$file"], "quiet": true | |
} |
yum install cmake | |
yum install python-devel numpy | |
yum install gcc gcc-c++ | |
yum install gtk2-devel libdc1394-devel libv4l-devel ffmpeg-devel gstreamer-plugins-base-devel libpng-devel libjpeg-turbo-devel jasper-devel openexr-devel | |
yum install libtiff-devel libwebp-devel tbb-devel eigen3-devel python-sphinx texlive | |
pushd /tmp | |
wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.11/opencv-2.4.11.zip | |
unzip opencv-2.4.11.zip | |
cd opencv-2.4.11 |
"""This is not the full code. We do a lot of stuff to clean up connections, particularly for unit testing.""" | |
import sqlalchemy | |
from sqlalchemy.orm import Query, Session, scoped_session, sessionmaker | |
CONFIG_KEY_SQLALCHEMY_BINDS = 'SQLALCHEMY_BINDS' | |
CONFIG_KEY_SQLALCHEMY_RO_BINDS = 'SQLALCHEMY_READ_ONLY_BINDS' | |
class Config: | |
# These default values are for testing. In a deployed environment, they would be three separate instances. | |
SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/branded_dev' |
import random | |
import math | |
import timeit | |
import matplotlib.pyplot as plt | |
timeBubble = [] | |
timeSelection = [] | |
timeInsertion = [] | |
timeQuick = [] | |
timeMerge = [] |
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
class Node: | |
def __init__(self,value,point): | |
self.value = value | |
self.point = point | |
self.parent = None | |
self.H = 0 | |
self.G = 0 | |
def move_cost(self,other): | |
return 0 if self.value == '.' else 1 |
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
# Make sure you have IMAP enabled in your gmail settings. | |
# Right now it won't download same file name twice even if their contents are different. | |
import email | |
import getpass, imaplib | |
import os | |
import sys | |
detach_dir = '.' |
import os | |
from io import BytesIO | |
import boto3 | |
from PIL import Image | |
from django.conf import settings | |
def store_in_bucket(data, key, content_type, public_read=False): | |
boto3.client('s3').put_object( |
# -*- coding: utf-8 -*- | |
import re | |
import urllib2 | |
from random import random | |
from datetime import datetime, timedelta | |
KEY = re.compile(r'(\w+).+') | |
VALUE = re.compile(r'\w+\=(\S+)') |
### Keybase proof | |
I hereby claim: | |
* I am maksymx on github. | |
* I am maksym_x (https://keybase.io/maksym_x) on keybase. | |
* I have a public key whose fingerprint is 24FE F391 8027 BB6C 8F0A 9DCA 818A 55C5 89C0 FCCD | |
To claim this, I am signing this object: |