Pip Cheat Sheet



Managing Conda and Anaconda

Cheat Sheet Version 1/ September 2020 PIP QI Uploader Instructions 1. Navigate to the email with the subject line: “WAPHA data upload facility”. The email will contain an upload link which has been generated specifically for your practice. Click on the link. This will open a web page as shown below: 3. Pip cheat sheet Get to know the most useful pip commands to help you install, manage, and use Python software packages. PPP Loan Amount & Document Cheat Sheet Interpreted from SBA Guidance doc as of April 30, 2020. Legal Form Employer’s Quarterly Federal Tax Return S- Corp. C -Corp Partnership Sole Prop/Single Member LLC / Employees Sole Prop/Single Member LLC / No Employees IRS Form 941 1120S 1120 1065 / Sch K -1 1040 / Sch C 1040 / Sch C.

conda info

conda update conda

conda update anaconda

Managing Environments

conda info --envs

conda info -e

Active environment shown with *

conda create --name snowflakes biopython

conda create -n snowflakes biopython

conda activate snowflakes

conda deactivate

conda create -n bunnies python=3.4 astroid

conda create -n flowers --clone snowflakes

conda remove -n flowers --all

conda env export > puppies.yml

conda env create -f puppies.yml

Managing Python

conda search --full-name python

conda search -f python

conda create -n snakes python=3.4

Install different version of Python in new environment

Managing .condarc Configuration

conda config --get

conda config --get channels

conda config --add channels pandas

Add a new value to channels so conda looks for packages in this location

Managing Packages, Including Python

conda list

View list of packages and versions installed in active environment

conda search beautiful-soup

Search for a package to see if it is available to conda install

conda install -n bunnies beautiful-soup

Install a new package

NOTE: If you do not include the name of the environment, it will install in the current active environment.

conda update beautiful-soup

conda search --override-channels -c pandas bottleneck

Search for a package in a specific location (the pandas channel on Anaconda.org)

conda install -c pandas bottleneck

Install a package from a specific channel

conda search --override-channels -c defaults beautiful-soup

Search for a package to see if it is available from the Anaconda repository

conda install iopro accelerate

Install commercial Continuum packages

conda skeleton pypi pyinstrument

conda build pyinstrument

Build a Conda package from a Python Package Index (PyPi) Package

Removing Packages or Environments

Pip Cheat Sheet

conda remove --name bunnies beautiful-soup

conda remove beautiful-soup

conda remove --name bunnies beautiful-soup astroid

conda remove --name snakes --all

Notes

  • Based on the cheat sheet from Conda Docs
  • Converted by Charles

This is a quickstart reference to using PyAutoGUI. PyAutoGUI is cross-platform GUI automation module that works on Python 2 & 3. You can control the mouse and keyboard as well as perform basic image recognition to automate tasks on your computer.

All the keyword arguments in the examples on this page are optional.

PyAutoGUI works on Windows/Mac/Linux and on Python 2 & 3. Install from PyPI with pipinstallpyautogui.

General Functions¶

Fail-Safes¶

Forex Cheat Sheets

Set up a 2.5 second pause after each PyAutoGUI call:

When fail-safe mode is True, moving the mouse to the upper-left will raise a pyautogui.FailSafeException that can abort your program:

Mouse Functions¶

XY coordinates have 0, 0 origin at top left corner of the screen. X increases going right, Y increases going down.

If duration is 0 or unspecified, movement is immediate. Note: dragging on Mac can’t be immediate.

Calling click() just clicks the mouse once with the left button at the mouse’s current location, but the keyword arguments can change that:

The button keyword argument can be 'left', 'middle', or 'right'.

All clicks can be done with click(), but these functions exist for readability. Keyword args are optional:

Positive scrolling will scroll up, negative scrolling will scroll down:

Individual button down and up events can be called separately:

Keyboard Functions¶

Pip cheat sheet

Key presses go to wherever the keyboard cursor is at function-calling time.

A list of key names can be passed too:

The full list of key names is in pyautogui.KEYBOARD_KEYS.

Keyboard hotkeys like Ctrl-S or Ctrl-Shift-1 can be done by passing a list of key names to hotkey():

Individual button down and up events can be called separately:

Message Box Functions¶

If you need to pause the program until the user clicks OK on something, or want to display some information to the user, the message box functions have similar names that JavaScript has:

The prompt() function will return None if the user clicked Cancel.

Screenshot Functions¶

PyAutoGUI uses Pillow/PIL for its image-related data.

On Linux, you must run sudoapt-getinstallscrot to use the screenshot features.

If you have an image file of something you want to click on, you can find it on the screen with locateOnScreen().

The locateAllOnScreen() function will return a generator for all the locations it is found on the screen:

The locateCenterOnScreen() function just returns the XY coordinates of the middle of where the image is found on the screen:

These functions return None if the image couldn’t be found on the screen.

Forex Trading Patterns Cheat Sheet

Note: The locate functions are slow and can take a full second or two.