Skip to content

Instantly share code, notes, and snippets.

import requests
import smtplib
import base64
from email.mime.text import MIMEText
import time
movieid = '207295462' #Enter movie id aassgined by gewara, usually 9 digits
date = '2015-05-16' #Enter intended date, format should be YYYY-MM-DD
cinemaid = '2' #Enter cinema id assigned by gewara
url = 'http://www.gewara.com/movie/ajax/getOpiItem.xhtml?movieid='+movieid+'&fyrq='+date+'&cid='+cinemaid
@iamlixiao
iamlixiao / fix.py
Last active August 29, 2015 14:19 — forked from jackyyf/fix.py
#!/usr/bin/python2
# -*- coding: utf-8 -*-
from PIL import Image
from colorsys import rgb_to_hls, hls_to_rgb
#由于抗锯齿及缩放算法的应用,色块的交界处通常会存在变亮和变暗了的像素
#以红色和黑色的交界线为例,放大后可发现这条线上像素的颜色由红色和黑色混合而成
#对于颜色和黑/白色的混合,一个简单的处理方法可以应用于HLS空间的颜色
def hls(r, g, b):
return rgb_to_hls(r/255.0, g/255.0, b/255.0)