Use Python to:
- send a plain text email
- send an email with attachment
- receive and filter emails according to some criteria
import cv2.cv as cv | |
import tesseract | |
gray = cv.LoadImage('captcha.jpeg', cv.CV_LOAD_IMAGE_GRAYSCALE) | |
cv.Threshold(gray, gray, 231, 255, cv.CV_THRESH_BINARY) | |
api = tesseract.TessBaseAPI() | |
api.Init(".","eng",tesseract.OEM_DEFAULT) | |
api.SetVariable("tessedit_char_whitelist", "0123456789abcdefghijklmnopqrstuvwxyz") | |
api.SetPageSegMode(tesseract.PSM_SINGLE_WORD) | |
tesseract.SetCvImage(gray,api) | |
print api.GetUTF8Text() |
# -*- coding: utf-8 -*- | |
from math import * | |
from random import * | |
### 一次测试 ### | |
def test(): | |
speed = 4.0 #初速度 | |
distance = 0 #已经走过的距离 | |
threshold = log(50) / 100 #每秒中枪的概率 |
# imapMailboxMiner.py | |
# Python 2.7.6 | |
""" | |
Connect to IMAP4 server and fetch mails | |
http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/ | |
""" | |
import imaplib # Library to interact with IMPAP server | |
import sys |
Use Python to: