Skip to content

Aurametrix/Alg

Repository files navigation

Python

Modules, Updates, Setup

Python programming language PDM - python package manager with PEP 582 support How to create Python package in 2022

RAE - for python packaging, distribution No-GIL Python

Sys.Monitoring - Execution event monitoring pyenv - switching between versions

Top libraries of 2021 Top libraries of 2020 Top 10 libraries of 2019

Dependency Management

nbxmpp

OneDrive SDK for Python

Self-assesment of Expertise level

Python job scheduling - sched library

Python 3.13 gets a JIT

Python packaging

Yapsl - Python SMS library

Poetry 1.2.0 - PACKAGING AND DEPENDENCY MANAGEMENT

Python built-ins

100x speedup

Natto - spatial environment for Python

How virtual environments work identify unused dependences to avoid bloated envs

Pyston - v2.2

Reloadium - adds hot reloading also called "edit and continue" functionality to any Python application

Running on EC2 instance

compile to another version ➜ py-backwards -i input.py -o output.py -t 2.7

Nuitka, a Python compiler

Codon - Python-like compiler using LLVM: MIT paper

C compiler in 500 lines of Python

Shed Skin - restricted-Python-to-C++ compiler 0.9.6

Common errors

Red Mail - Advanced Email Sender

WakaQ - Distributed task queue

Negatypes

REPL, online compiler

Junja2 - a template engine; 2.1

speeding Python with Lua making python fast with mypyc

mypy - optional static type checker for Python

Modern Python Performance Considerations

Python Design Patterns

Python variables, references and mutability

30 days of Python - programming xhallenge

Overlooked core functionalities

Introduction to Linear Programming in Python

ingest and copy files

On Python's type hints - type hints

Solution for concurrency

Koda - a collection of practical type-safe tools for Python.

PyPi trends

The Algorithm Library A new PDF library

Run python in your browser

Building GUI

PySimpleGUI Gooey

Resources

Snakemake workflow management system - is a tool to create reproducible and scalable data analyses

Free books

Fluent Python

Python Distilled

The Big Book of small python projects

Practical python programming courses

ISLR

From Python to Numpy - by Nicolas P. Rougier * v1.24.0 How to share NumPy arrsy between processes

JNumPy: - high-performance C extensions C-style for loops

Setting up Python for ML on Windows

Machine Learning Tutorial Data-centric introduction to computing

FVSL - Fast vector similarity using Rust and Python

Interactive Python course The Python tutorial

A Simple Guide to creating Predictive Models

IDOM - declarative Python package for building highly interactive user interfaces

Python IDM - Internet Download manager

Django 3.2

Tools for making python packages

Features of Python3

Python style hints /introduced in Python 3.5

Text Similarity with Python

PyCantonese: Cantonese Linguistics

NLP library moved to Stanza Core NLP + Bran - relation extraction based purely on attention

UM1 - Understanding Machine One - a cloud based REST service that provides Natural Language Understanding (NLU) as a Service (UaaS).

Robyn - fast, extensible async Python web server with a Rust runtime

FLASK - for web development

FASTAPI - modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints

web2pdf - CLI to convert webpages to PDFs

Analyzing Hacker News with Six Language Understanding Methods

Word2Vec online' [demo](Demo at http://turbomaze.github.io/word2vecjson/)

TextAPI with (twitter example)[https://pythonalgos.com/2021/11/26/black-friday-how-does-twitter-feel/]

Text classification

Built-ins

Survival analysis + Kaplan-Maier Estimate (non-parametric) + Cox Proportional Hazard Model (Semi-parametric) + Accelerated Failure Time Model (Parametric)

Lifelines library

Composing programs

Free for Developers + Atlas toolkit - Lightweight library to develop single-page web applications that are instantly accessible. Available for Java, Node.js, Perl, Python and Ruby.

Google cloud

Convert Curl to Python

job queues

Algebraic Number Theory package

Loops F-strings

The Python scientific stack, compiled to WebAssembly ; see demo

Scikit-learn

Functional Programming

generations vs functions

Handling optional imports - Kludge of the year

Pointers/References

Coding habits for data scientists

Clean Code

Batteries included

Docstrings better than comments

Memory Allocator in Numpy

[einsum](https://ajcr.net/Basic-guide-to-einsum/)

Faster Calculations with Numba

Pyodide: Python for the browser

PyFlow - visual scripting framework

AI Autocomplete; code

AI Texture Generator

Get help from ChatGPT

Jupyter ChatGPT interface projects:

https://github.com/jflam/chat-gpt-jupyter-extension

https://github.com/fperez/jupytee

Voice Pilot

Pyodide, Python in a web browser

Tracing Python

online translation server

Whereami - Uses WiFi & ML to predict where you are

Build a Reactive Data Streaming App with Python and Apache Kafka - Subscribe to alert without alert API https://www.confluent.io/resources/online-talk/coding-in-motion/building-a-reactive-data-streaming-app/

Overpass - host your own live streaming server

Partial Function applications

T5

pyGeno for precision medicine -- github

Library for quantitative finance

make a self contained executable for windows

spaCy for Text Analytics

PyNeuraLogic

Subinterpreters

Python Turtle for code reuse

Pylance Folders - python implementation

Dependency management tools

Crush course by Google

Jupyter Notebooks

Graphical User Interface Frameworks

Conferences

Discussions

Python news

New Pandas - 1.00 - January 29, 2020

Visual guide to pandas

what's new in 1.0.0

What's up - July 2023

Is Python the world's most popular language?

tips & tricks

pass a URL in place of a file name dfs = pd.read_html(url)

date ranges date_range = pd.date_range(date_from, date_to, freq="D")

if you set indicator parameter of merge() to True pandas adds a column that tells you which dataset the row came from merge with approximate match - the tolerance parameter of merge_asof()

pd.merge_asof(trades, quotes, on="timestamp", by='ticker', tolerance=pd.Timedelta('10ms'), direction='backward')

Merge with indicator is also useful for doing anti-joins:

left.merge(right, how="left", indicator=True, ...) 
[lambda df: df._merge == "left_only"]

Use gzip with when saving to csv

Create an Excel report and add some charts

Algorithms

Sort:

Regex: Examples of regular expressions for matching patterns

Graph: A*, B*, Breadth-first, D*, Depth-first, Dijkstra's,..

Example of a graph with six nodes A-F and eight edges represented by Python dictionary:

graph = {'A': ['B', 'C'],

'B': ['C', 'D'],

'C': ['D'],

'D': ['C'],

'E': ['F'],

'F': ['C']}

Web: Beautiful Soup is a Python library for pulling data out of HTML and XML files.

easy_install beautifulsoup4

or better keep it in virtualenv: sudo easy_install virtualenv pip install BeautifulSoup4

Learning resources

If you get an ImportError: No module named matplotlib

set your PYTHONPATH, eg: export PYTHONPATH=/Library/Python/2.7/site-packages:$PYTHONPATH

git clone git://github.com/scipy/scipy.git scipy

PyAudio provides Python bindings for PortAudio, the cross-platform audio I/O library

to play and record audio on a variety of platforms.

http://people.csail.mit.edu/hubert/pyaudio/

funct array - a better python list

Simple way to access google api for speech recognition with python pip install pygsr

WhisperSpeech - an Open Source text-to-speech system built by inverting Whisper. Previously known as spear-tts-pytorch.

A grammar of graphics for python

Knowledge extraction from unstructured texts

wrapper providing R's ggplot2 syntax

Brancher, A user-centered Python package for differentiable probabilistic inference

Automate the boring stuff

Share and Run Python code

Dev environments

the Hitchhikers Guide to Python

A Hitchhikers Guide to Asynchronous Programming

Programming Puzzles

Interesting projects

Decentralized Communities

UI

(Slicing, Indexing, Subsetting ataframes)[https://datacarpentry.org/python-ecology-lesson/03-index-slice-subset/]

df[~((df.A == 0) & (df.B == 2) & (df.C == 6) & (df.D == 0))]  
df.ix[rows]
df[((df.A == 0) & (df.B == 2) & (df.C == 6) & (df.D == 0))]
df.loc[[0,2,4]]
df.loc[1:3]
df.iloc[0:df[df.year == 'y3'].index[0]]

Testing

pip install selenium # Downloading Python bindings for Selenium (for windows: C:\Python35\Scripts\pip.exe install selenium)

Place drivers in /usr/bin or /usr/local/bin

Browser Popular Drivers ---
Chrome https://sites.google.com/a/chromium.org/chromedriver/downloads
Edge https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Firefox https://github.com/mozilla/geckodriver/releases
Safari https://webkit.org/blog/6900/webdriver-support-in-safari-10/

Cons: Selenium tests are unstable, time to maintain and run, low ROI

Old school: Ranorex, LeanFT, TestComplete, Telerik and Sahi; Fantom.js, Mocha, Jasmine and Protractor; Screenster

Testing with Cucumber and Capybara

Pytest for data scientists S3 testing; blog post

Asmle - Wordle in 512 bytes

Datasets

Google dataset search

open source

Kaggle datasets

The Million Song dataset

A RESTish web API for climate change related data; github

Disbiome -- article

Global average temperaturesdirect link

cold and warm episodes by season

sea level information

Astroquery - collection of tools to access online Astronomical data

Security

Gnupg - Python library which takes care of the internal details and allows its users to generate and manage keys, encrypt and decrypt data, and sign and verify messages. See also

Pysa: An open source static analysis tool to detect and prevent security issues in Python code

github mirror

HTTPX

Administration

updating 2.7.x on mac (https://www.python.org/downloads/)

sudo rm -R /System/Library/Frameworks/Python.framework/Versions/2.7

sudo mv /Library/Frameworks/Python.framework/Versions/2.7 /System/Library/Frameworks/Python.framework/Versions

sudo chown -R root:wheel /System/Library/Frameworks/Python.framework/Versions/2.7

sudo rm /System/Library/Frameworks/Python.framework/Versions/Current

sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7 /System/Library/Frameworks/Python.framework/Versions/Current

sudo rm /usr/bin/pydoc

sudo rm /usr/bin/python

sudo rm /usr/bin/pythonw

sudo rm /usr/bin/python-config

sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/pydoc /usr/bin/pydoc

sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python /usr/bin/python

sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw /usr/bin/pythonw

sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config /usr/bin/python-config


sudo easy_install pip // pip install --upgrade pip

sudo easy_install -U numpy

pip install scipy

pip install matplotlib

New versions

About

Algorithms in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published