Posts

Showing posts from February, 2018

How to apply for L2 EAD in the USA

You can download the I-765 form and the associated instructions from the link below. https://www.uscis.gov/i-765 You need to send a print out of the covering letter in the below (at the end of the section) format, along with the entities listed. You need to refer to the portal for the latest fee.  --> The lockbox address to which the application needs to be sent different for different states. Refer to https://www.uscis.gov/forms/forms-information/uscis-phoenix-and-dallas-lockbox-facilities It takes 2-3 days to get the acknowledgement from USCIS. Once you get the reference number, you can check the status in https://egov.uscis.gov/casestatus/landing.do It takes around 90days to receive the EAD. You can raise a request in the portal if you don't see change in status within 90 days. Covering Letter: Sub: NEW I-765 (EAD) Application for L2 Dependent ( Name as in Passport) L1 Beneficiary: < Name as in Passport > Please f

Descriptive Statistics - using Python, MS Excel

The example below illustrates how to compute statistical averages and variances of a numerical column in excel. By statistical averages and variances we mean to compute the below: Median Average Mean Variance Standard Devation The program assumes that the 2nd column of the "details" worksheet in "marks.xls" workbook has marks obtained in Math by the students of a class. The descriptive Statistics can also be generated using the "Data Analysis" option in MS Excel. To be able to view this option under Data Menu in Excel, ensure to check the Analysis ToolPak option under Tools --> Add-ins Note: NaN = Not a Number ------- from openpyxl import load_workbook import numpy as np wb = load_workbook( filename = "marks.xlsx" ) sheet = wb[ "details" ] rows = sheet.max_row columns = sheet.max_column mathmarks = np.ndarray(rows- 1 ) for i in range ( 2 ,rows+ 1 ): mathmarks[i- 2 ] = sheet.cell( row =i, column = 2 ).value

Order Statistics: Example using Python

The example below illustrates how to apply order statistics to a column in excel. Order Statistics are basically to find the minimum, maximum and range of an array or set of data. The program assumes that the 2nd column of the "details" worksheet in "marks.xls" workbook has marks obtained in Math by the students of a class. ----------- from openpyxl import load_workbook import numpy as np # File being read is marks.xlsx wb = load_workbook( filename = 'marks.xlsx' ) sheet = wb[ 'details' ] # Finding no of rows and columns in the sheet rows = sheet.max_row columns = sheet.max_column matharr = np.ndarray(rows- 1 ) # reading the values of a column to numpy array to be able to compute order statistics for i in range ( 2 , rows+ 1 ): matharr[i- 2 ] = sheet.cell( row = i, column = 2 ).value print ( "Minimum of the array" ) print (np.amin(matharr)) print ( "Minimum of the array excluding NaN (Not a Number) values&quo

PyCharm Edu! Install and Configure Interpreter

It is easier to code, debug and execute code using a good IDE. PyCharm Edu is a good choice, which is free for learning and teaching community. It can be downloaded from the below link, for Mac. https://www.jetbrains.com/pycharm-edu/download/#section=mac Step 1: Open PyCharm and create a new project Step 2: Now, select the project and click on "Preferences" under PyCharm menu bar Step 3: In the preferences window, under the project created - click on "project interpreter" Step4: If packages are installed using Conda, choose "Conda Environment". If packages are installed using pip, then choose Virtualenv Environment. Ensure to check "Make available to all projects" option Happy coding!!! One more thing to note is that as and when you install new packages, you need to verify and ensure that the same are added to the interpreter.

Installing Python Packages thru PIP

Once you download and install the latest version of Python, the latest version of pip gets installed too. I could install multiple different packages using the below commands in Terminal (on Mac) pip3 install numpy pip3 install scipy pip3 install matplotlib pip3 install pandas pip3 install openpyxl pip3 install opencv-python pip3 install --upgrade scikit-image pip3 install --upgrade imutils

Installing Python Packages on Mac OS X using Conda

I tried many options but the below method worked for me to install the packages on  Mac OS X ! Got the instructions from the youtube video  https://www.youtube.com/watch?v=kTmXHijG8ao&amp;t=45s Note: the content you see in  bold and italic  below are to be substituted by names you would like to have / that you downloaded Step 1: Download the appropriate file from the site https://conda.io/miniconda.html Step2: Go to Terminal; change the folder to Downloads and execute below command bash  filename As the installation starts, you will have to either enter  yes  or  y  or press enter as prompted. You need to open the terminal in new window to have the next set of commands work source activate  myenv conda create -n  myenv  python= 3.6.3 I used 3.6.3 in the above command as that's the version of Python I had installed. conda install numpy scipy matplotlib You can install many other packages also using the format "conda install  " However, sometim

Getting started with Python

I am using Mac with OS X Version 10.11.6 Python 2.7.x comes installed by default on Mac. But, it is recommended to install latest version.  Check version of the Python installed: Open Terminal and type python. then enter This will give you the default version already installed. In case you want to check if python3 version is installed, type "python3" at the command line. Installation: Download latest version (I got Python v3.6.3) of Python available from https://www.python.org/ As the download completes, installation wizard is triggered automatically; you just need to confirm the path and respond to the prompts. Create a working folder on your system Some Basics: To execute Python code on Python 2.7.x,  python  command needs to be used as below in the terminal. python samplecode.py However, to execute tPython code on Python 3.x, use python3 command. python3 samplecode.py