lisa
PyFunctional
Our great sponsors
lisa | PyFunctional | |
---|---|---|
6 | 4 | |
198 | 2,332 | |
0.5% | - | |
9.7 | 5.6 | |
10 days ago | about 2 months ago | |
Jupyter Notebook | Python | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
lisa
-
So, I wrote a Maybe monad in Python 3
You might be interested in that: https://github.com/ARM-software/lisa/blob/master/lisa/monad.py
-
Parca Agent rewrites eBPF in-kernel C code in Rust (using Aya-rs)
This is to replace the current flow purely based on pandas dataframe and offline trace.dat parsing used in LISA: https://github.com/ARM-software/lisa (collecting a trace.dat is nice for debugging but limits to small durations, and pandas does not allow running computations in constant memory, which is an issue for very big traces)
-
Languages with integrated dependency injection
The module added by this PR seems to be a pretty good fit: https://github.com/ARM-software/lisa/pull/1722
-
What tools are missing in Python?
I made that thing taking some vague inspiration from SML module system: https://github.com/ARM-software/lisa/pull/1722/files
-
The pipe-operator to python |>
import builtins from operator import add import functools # These functions can be found at: # https://github.com/ARM-software/lisa/blob/master/lisa/utils.py#L147 # Note: my implementation of curry() seems to be broken wrt named parameters (or for parameters with defaults, haven't looked at the details) for some reason but for this example it does not matter from lisa.utils import compose, curry def even(x): return x % 2 == 0 # The builtin functions don't have a signature, which will upset curry() so we # redefine it here def map(f, iterable): return builtins.map(f, iterable) def filter(f, iterable): return builtins.filter(f, iterable) # Swapped init and iterable to be curry-friendly def reduce(f, init, iterable): return functools.reduce(f, iterable, init) def pipeline(*items): # Add a currying layer so that we spare the user the need to do it return compose(*(curry(f)(*args) for (f, *args) in items)) # x = filter(even, list) |> map(lambda x: x+1) |> reduce(+) f = pipeline( (filter, even), (map, lambda x: x+1), (reduce, add, 0), ) l = [1,2,3,4] x = f(l) print(x)
PyFunctional
-
Python: Uncovering the Overlooked Core Functionalities
If you actually think this code is better there's a real library that does this: https://github.com/EntilZha/PyFunctional.
-
Kotlin/Java/Javascript/Scala users do you miss the ability to chain functional operators in Python?
I often endup using [pyfunctional](https://github.com/EntilZha/PyFunctional) which gives the ability of using chained functional operators, but I am still kind of sad this is not a builtin solution in Python (please note I am not involved in the pyfunctional project and I do not know the author)
- PyFunctional makes creating data pipelines easy by using chained functional operators
- The pipe-operator to python |>
What are some alternatives?
PyInstaller - Freeze (package) Python programs into stand-alone executables
awesome-functional-python - A curated list of awesome things related to functional programming in Python.
parca-agent - eBPF based always-on profiler auto-discovering targets in Kubernetes and systemd, zero code changes or restarts needed!
RxPY - ReactiveX for Python
blazon - A python library for assuring data structure and format via schemas like JSON Schema
modin - Modin: Scale your Pandas workflows by changing a single line of code
datoviz - ⚡ High-performance GPU interactive scientific data visualization with Vulkan
fn.py - Functional programming in Python: implementation of missing features to enjoy FP
abcd-hcp-pipeline - bids application for processing functional MRI data, robust to scanner, acquisition and age variability.
kompute - General purpose GPU compute framework built on Vulkan to support 1000s of cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends). Blazing fast, mobile-enabled, asynchronous and optimized for advanced GPU data processing usecases. Backed by the Linux Foundation.
alkymi - Pythonic task automation