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/python | |
import os | |
import argparse | |
import cv2 | |
def is_image_file(filename): | |
""" Check whether the file name sounds like an image """ | |
image_extensions = ['.jpg', '.jpeg', '.png', '.bmp', '.tiff', '.tif'] | |
_, ext = os.path.splitext(filename) |
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
Calculate edge orientation for digital images. |
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
BasedOnStyle: Google | |
IndentWidth: 4 | |
AccessModifierOffset: -4 | |
IndentCaseLabels: false | |
AlignConsecutiveAssignments: false | |
AlignTrailingComments: true | |
BinPackArguments: true | |
DerivePointerAlignment: false |
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 os | |
import sys | |
import re | |
import argparse | |
import urllib.parse | |
import urllib.request | |
import requests | |
from bs4 import BeautifulSoup |
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 math | |
import numpy as np | |
import matplotlib.pyplot as plt | |
class Color(object): | |
def __init__(self, r = 0.0, g = 0.0, b = 0.0): | |
if not isinstance(r, float) or \ | |
not isinstance(g, float) or \ | |
not isinstance(b, float): | |
raise Exception('Bad arguments!!') |
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 math | |
class Vec(object): | |
def __init__(self, x, y, z): | |
self.x = x | |
self.y = y | |
self.z = z | |
@staticmethod | |
def dot(v1, v2): |
NewerOlder