Skip to content

Instantly share code, notes, and snippets.

@neeraj1928
neeraj1928 / smtpcheck.py
Created November 2, 2015 08:10 — forked from blinks/smtpcheck.py
Check if an email address exists without sending an email. Technique from: http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/
#!/usr/bin/env python
"""
Check that a particular email address exists.
Adam Blinkinsop <blinks@acm.org>
WARNING:
Checking email addresses in this way is not recommended, and will lead to
your site being listed in RBLs as a source of abusive traffic. Mail server
admins do like it when they get connections that don't result in email being
sent, because spammers often use this technique to verify email addresses.
__author__ = "Mark Allan B. Meriales"
# based from http://www.pythoncentral.io/watermark-images-python-2x/
# mine uses a picture as a watermark
from PIL import Image, ImageEnhance
def add_watermark(image_file, logo_file, opacity=1):
img = Image.open(image_file).convert('RGB')
logo = Image.open(logo_file)
@neeraj1928
neeraj1928 / watermark.py
Created October 26, 2015 18:16 — forked from snay2/watermark.py
How to apply a semi-transparent watermark to an image using Python
from PIL import Image, ImageDraw
def main():
# Open the original image
main = Image.open("12voltm.jpg")
# Create a new image for the watermark with an alpha layer (RGBA)
# the same size as the original image
watermark = Image.new("RGBA", main.size)
# Get an ImageDraw object so we can draw on the image