All public gists https://gist.github.com/ashishrana160796
Copyright 2018, Ashish Rana
This work is licensed under a Creative Commons Attribution 4.0 International License.
# Problem: Different Screens have different resolutions. When, it comes to GUI automation this resolution causes problem. | |
# Of having a different co-ordinate system for different systems. Hence, causing resolution problem issue. | |
# Solution: Just convert the resolution size with simple unitary formula method. | |
# This import is required to get the current screen size | |
import pyautogui | |
def res_convertor(wdth, hght): |
import scipy | |
import numpy as np | |
from scipy.ndimage import zoom | |
import matplotlib.pyplot as plt | |
# Reference Solution Given By: https://stackoverflow.com/users/1461210/ali-m | |
# | |
def clipped_zoom(img, zoom_factor, **kwargs): | |
# assumption is that zoom factor is greater than 1 | |
h, w = img.shape[:2] | |
# no RGB zoom to be applied for multi-channel image, |
from PIL import Image | |
import numpy as np | |
# call with pil_transform('test.jpg') | |
def pil_transform(image_str): | |
# padding process started | |
im_opn = Image.open(image_str) | |
old_sz = im_opn.size | |
new_sz = (old_sz[0]+30, old_sz[1]+30) |
''' | |
NAC 3-D Plot Code | |
''' | |
# import statements | |
from mpl_toolkits.mplot3d import Axes3D | |
import matplotlib.pyplot as plt | |
from matplotlib import cm | |
from matplotlib.ticker import LinearLocator, FormatStrFormatter |
# Best way to run copy and paste portions into an ipython3 shell | |
# 1. Import Statements | |
import operator | |
from os import listdir | |
from os.path import isfile, join | |
# 2. Select files with matching tiff extensions. | |
import re |
import glob | |
import os | |
import scipy.io as sio | |
import numpy as np | |
import numpy as np | |
from PIL import * | |
class UCSD(): | |
"""UCSD pedestrian counting data.""" | |
All public gists https://gist.github.com/ashishrana160796
Copyright 2018, Ashish Rana
This work is licensed under a Creative Commons Attribution 4.0 International License.
The major important thing is the documentation has to be implementation independent and specification concise. Dependencies where ever necessary are allowed to be specified.
Also it is allows HTML tags to be used in between the documentation comments. Pretty much all tags are self explanatory.
Meta Annotations
@author Ex: @author Jane Doe
@version Ex: @version v1.0-alpha