Monthly Archives: February 2017

Basic Webdriver Test using Python

”’ Created on Feb 26, 2017 @author: asharda ”’ from selenium import webdriver from selenium.webdriver.common.keys import Keys #driver = webdriver.Firefox(executable_path=r’C:\Users\asharda\Downloads\geckodriver-v0.14.0-win64\geckodriver.exe’) driver = webdriver.Chrome(executable_path=r’C:\Users\asharda\Downloads\chromedriver_win32\chromedriver.exe’) #driver.get(“”) driver.get(“”) assert “Python” in driver.title elem = driver.find_element_by_name(“q”) elem.clear() elem.send_keys(“ashish”) elem.send_keys(Keys.RETURN) assert “No results found.” not … Continue reading

Posted in Python, Uncategorized | Leave a comment

Basic Program using MatPlotLib

”’ Created on Feb 18, 2017 @author: asharda ”’ import matplotlib.pyplot as plt plt.plot([1,2,3,4]) plt.ylabel(“Y Axis”) plt.xlabel(“X-axis”)  

Posted in MatPlotLib, Python | Leave a comment

Excellent Tutorial about numpy and matplotlib

Credit to :   import numpy as np import matplotlib.pyplot as plt def mandelbrot( h,w, maxit=20 ): “””Returns an image of the Mandelbrot fractal of size (h,w).””” y,x = np.ogrid[ -1.4:1.4:h*1j, -2:0.8:w*1j ] c = x+y*1j z = c divtime … Continue reading

Posted in Uncategorized | Leave a comment

Install MatPlotLib using pip

python -m pip install -U pip setuptools python -m pip install matplotlib

Posted in Uncategorized | Leave a comment

Install Numpy Windows

(1)Once done installing Python run the below command pip install numpy. This will download numpy to the system. Next if using Eclipse Editor Go to Windows->Preferences ->PyDev->Interpreters->Python Interpreter and then in the libraries add the package for Numpy. In my … Continue reading

Posted in Uncategorized | Leave a comment

Install Numpy on Windows

pip install numpy-1.12.0-cp27-none-win32.whl

Posted in Uncategorized | Leave a comment

Lists as Stack in Python

”’ Created on Feb 12, 2017 @author: asharda ”’ stack=[3,4,5] stack.append(10) stack.pop() stack.append(6) print (stack)

Posted in Data Structures, Python | Leave a comment