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
#!/usr/bin/env python | |
# coding: utf-8 | |
import requests | |
import StringIO | |
from PIL import Image | |
import os | |
import time | |
YES = 'X' | |
NO = '-' |
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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import string | |
import cStringIO | |
import random | |
from PIL import Image, ImageFont, ImageDraw, ImageFilter |
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 numpy as np | |
import Image | |
import sys | |
def from_pil(pimg): | |
pimg = pimg.convert(mode='RGB') | |
nimg = np.asarray(pimg) | |
nimg.flags.writeable = True | |
return nimg |