Skip to content

Latest commit

 

History

History
205 lines (156 loc) · 17.7 KB

data-science-tools.md

File metadata and controls

205 lines (156 loc) · 17.7 KB

Data Science Tools

Python

  1. How to use better OOP in python.
  2. Best practices programming python classes - a great lecture.
  3. How to know pip packages size’ good for removal
  4. Python type checking tutorial
  5. Import click - command line interface
  6. Concurrency vs Parallelism (great)
  7. Async in python
  8. Coroutines vs futures
  9. Coroutines generators async wait
  10. Intro to concurrent,futures
  11. Future task event loop

Async io

  1. Intro
  2. complete

Clean code:

Virtual Environments

PYENV

  1. Installing pyenv
  2. Intro to pyenv
  3. Pyenv tutorial and finding where it is **
  4. Pyenv override system python on mac
  5. pyenv virtualenv

JUPYTER

(how does reshape work?) - a shape of (2,4,6) is like a tree of 2->4 and each one has more leaves 4->6.

As far as i can tell, reshape effectively flattens the tree and divide it again to a new tree, but the total amount of inputs needs to stay the same. 2*4*6 = 4*2*3*2 for example

code:
import numpy
rng = numpy.random.RandomState(234)
a = rng.randn(2,3,10)
print(a.shape)
print(a)
b = numpy.reshape(a, (3,5,-1))
print(b.shape)
print (b)

*** A tutorial for Google Colaboratory - free Tesla K80 with Jup-notebook

Jupyter on Amazon AWS

How to add extensions to jupyter: extensions

Connecting from COLAB to MS AZURE

Streamlit vs. Dash vs. Shiny vs. Voila vs. Flask vs. Jupyter

SCIPY

  1. Optimization problems, a nice tutorial to finding the minima
  2. Minima / maxima finding it in a 1d numpy array

NUMPY

Using numpy efficiently - explaining why vectors work faster.
Fast vector calculation, a benchmark between list, map, vectorize. Vectorize wins. The idea is to use vectorize and a function that does something that may involve if conditions on a vector, and do it as fast as possible.

PANDAS

  1. Great introductory tutorial about using pandas, loading, loading from zip, seeing the table’s features, accessing rows & columns, boolean operations, calculating on a whole row\column with a simple function and on two columns even, dealing with time\date parsing.
  2. Visualizing pandas pivoting and reshaping functions by Jay Alammar - pivot melt stack unstack
  3. How to beautify pandas dataframe using html display
  4. Speeding up pandas
  5. The fastest way to select rows by columns, by using masked values (benchmarked):
  6. def mask_with_values(df): mask = df['A'].values == 'foo' return df[mask]
  7. Parallelism, pools, threads, dask
  8. Accessing dataframe rows, columns and cells- by name, by index, by python methods.
  9. Looping through pandas
  10. How to inject headers into a headless CSV file -
  11. Dealing with time series in pandas,
    1. Create a new column based on a (boolean or not) column and calculation:
    2. Using python (map)
    3. Using numpy
    4. using a function (not as pretty)
  12. Given a DataFrame, the shift() function can be used to create copies of columns that are pushed forward (rows of NaN values added to the front) or pulled back (rows of NaN values added to the end).
    1. df['t'] = [x for x in range(10)]
    2. df['t-1'] = df['t'].shift(1)
    3. df['t-1'] = df['t'].shift(-1)
  13. Row and column sum in pandas and numpy
  14. Dataframe Validation In Python - A Practical Introduction - Yotam Perkal - PyCon Israel 2018
  15. In this talk, I will present the problem and give a practical overview (accompanied by Jupyter Notebook code examples) of three libraries that aim to address it: Voluptuous - Which uses Schema definitions in order to validate data [https://github.com/alecthomas/voluptuous] Engarde - A lightweight way to explicitly state your assumptions about the data and check that they're actually true [https://github.com/TomAugspurger/engarde] * TDDA - Test Driven Data Analysis [ https://github.com/tdda/tdda]. By the end of this talk, you will understand the Importance of data validation and get a sense of how to integrate data validation principles as part of the ML pipeline.
  16. Stop using itterows, use apply.
  17. (great) Group and Aggregate by One or More Columns in Pandas
  18. Pandas Groupby: Summarising, Aggregating, and Grouping data in Python
  19. pandas function you didnt know about
  20. json_normalize()

Exploratory Data Analysis (EDA)

  1. Pandas summary

  2. Pandas html profiling

  3. Sweetviz - "Sweetviz is an open-source Python library that generates beautiful, high-density visualizations to kickstart EDA (Exploratory Data Analysis) with just two lines of code. Output is a fully self-contained HTML application.

    The system is built around quickly visualizing target values and comparing datasets. Its goal is to help quick analysis of target characteristics, training vs testing data, and other such data characterization tasks."

by Sweetviz

TIMESERIES

  1. (good) Pandas time series manipulation
  2. Using resample

by Jeremy Chow

  1. Basic TS manipulation
  2. Fill missing ts gaps, or how to resample
  3. SCI-KIT LEARN
  4. Pipeline to json 1, 2
  5. cuML - Multi gpu, multi node-gpu alternative for SKLEARN algorithms
  6. Gpu TSNE ^
  7. Awesome code examples about using svm\knn\naive\log regression in sklearn in python, i.e., “fitting a model onto the data”
  8. Parallelism of numpy, pandas and sklearn using dask and clusters. Webpage, docs, example in jupyter.

Also Insanely fast, see here.

  1. Functional api for sk learn, using pipelines. thank you sk-lego.

  2. Images by SK-Lego

FAST.AI

  1. Medium on all fast.ai courses, 14 posts

PYCARET

1. What is? by vidhaya - PyCaret is an open-source, machine learning library in Python that helps you from data preparation to model deployment. It is easy to use and you can do almost every data science project task with just one line of code.

NVIDIA TF CUDA CUDNN

GCP

Resize google disk size, 1, **[2](https://www.cloudbooklet.com/how-to-resize-disk-of-a-vm-instance-in-google-cloud/),**

GIT / Bitbucket

  1. understanding git

  2. pre-commit

  3. Rewrite git history, all the commands

  4. Installing git LFS

  5. Use git lfs

  6. Download git-lfs

  7. Git wip (great)

    by Carolyn Van Slyck