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
-- | |
-- Implements phishing suggestions by Apple | |
-- http://www.apple.com/legal/more-resources/phishing/ | |
-- | |
using terms from application "Mail" | |
-- Strip the domain from an email address | |
on domainOf(address) | |
set atIndex to offset of "@" in address | |
set domain to strings (atIndex + 1) thru -1 of address | |
return domain |
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
// Only import only funcs and structs we need to use | |
#if os(Linux) | |
// Linux uses Glibc | |
import struct Glibc.FILE | |
import func Glibc.fopen | |
import func Glibc.fgets | |
import func Glibc.fclose | |
#else | |
// OS X uses Darwin | |
import struct Darwin.C.FILE |
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
import cv2 | |
import numpy as np | |
from matplotlib import pyplot as plt | |
img = cv2.imread('image.jpg', cv2.IMREAD_GRAYSCALE) | |
def compute_skew(image): | |
image = cv2.bitwise_not(image) | |
height, width = image.shape |