Python
Python is a programming language.
Snippets
*args & **kwargs?
*args & **kwargs?>>> def hello(*args, **kwargs):
... gretting = kwargs.pop('gretting', 'Hello')
...
... print(f"""{gretting} {' '.join(args)}!""")
...
>>>
>>> hello("Laura", "Dang", gretting="Hi")
Hi Laura Dang!How To Use *args and **kwargs in Python 3 by Lisa Tagliaferri, 20 November 2017.
Bare asterisk (*) in function argument
*) in function argumentIn Python 3 you can specify * in the argument list:
Parameters after "*" or "*identifier" are keyword-only parameters and may only be passed used keyword arguments.
Reference: Forced naming of parameters in Python by Eli Bendersky, 12 January 2013.
Coerce to NamedTuple
NamedTupleReference: coerce_to_namedtuple.py by Andy Mitchhank
Libraries
Camelot - PDF Table Extraction for Humans - :megaphone:
cleanco - Cleans companies names by stripping away terms indicating organization type -
Datafiles - a file-based ORM for dataclasses -
dataset - Databases for lazy people. -
lab_getting_started.py - Lets you organize TensorFlow machine learning projects
py-spy - sampling profiler for Python programs
tartiflette - Tartiflette is a GraphQL Engine, built on top of Python 3.6 and above. Focused on building GraphQL APIs using the awesome Schema Definition Language. -
yaps - a surface language for programming Stan models using python syntax -
Typer - Typer is library to build CLI applications that users will love using and developers will love creating. -
Data Science
datacompy - Pandas and Spark DataFrame comparison for humans -
intake - A plugin system for loading your data and making data catalogs -
locopy - Loading/Unloading to Amazon Redshift -
Luigi - a Python module that helps you build complex pipelines of batch jobs -
Vaex - visualize and explore big tabular data at a billion rows per second - :megaphone:
Templates
Python Packages Project Generator - cookiecutter template for the most state-of-the-art libraries and best development practices for Python.
Links
Detecting SQL injections in Python code using AST by Artem Golubin, 29 April 2019
Einstein Summation in Numpy by Olexa Bilaniuk, 4 February 2016
My Python Development Environment by Jacob Kaplan-Moss, 21 February 2018.
Named Entity Recognition with NLTK and SpaCy by Susan Li, 17 August 2018.
Python at Netflix, 29 April 2019
Text Preprocessing in Python: Steps, Tools, and Examples by Olga Davydova, 15 October 2018
Working efficiently with JupyterLab Notebooks by Florian Wilhelm, 8 November 2018.
wtfpython - A collection of surprising Python snippets and lesser-known features.
Understanding the asterisk(*) of Python by mingrammer, 20 March 2017.
Last updated