Snippets
- Skew Heap - Generic implementation (Nov.
15, 2024)
This implementaions shows how convienent is Zig to implement generic and efficient algorithms, as in this example for skew heaps. - Cummulative Returns (Nov. 12, 2024)
In this notebook cummulative returns are explored. As examples, returns for Apple (AAPL) and Google (GOOG) are computed for the period 2015-2024. Individual returns are calculated on a base of 5 days. [keywords: jupyter-lab, python, stocks, returns] - A minimal implementation for dataframes I/O (Nov. 12, 2024)
A dataframe is a table which columns are of different type. This example shows how to define a dataframe in C++ and functions to write and read it. [keywords: dataframe, c++] - Leftist Heap Tree (Nov.
04, 2024)
An implementation in Zig. The leaftist tree has the property that in each node, the shortest path on the left is at least as long as on the right side. [keywords: zig, tree, heap] - C++ Asyncs & Threads (Oct. 24, 2024)
Basic examples showing how to use asyncs and threads in C++. [keywords: async, thread, c++] - Matrix Multiplication & CPU optimization (Oct. 24, 2024)
Examples of CPU optimizations by threads and SIMD using matrix multiplication as an example. [keywords: optimization, cpu, thread, simd, c++] - Calling Zig functions from
Python (Sep.
12, 2024)
Python, besides being a friendly programming languages, makes it easy to call C functions. Given that Zig shares the same ABI with C, it is the same as easy to call Zig functions from Python. This feature makes you able to write programs that shows a Python's friendly interface supported by extended and performant Zig's functions. In this article, a non-trivial example is shown: a program to make HTTP requests. - Crossover Indices (Aug. 04, 2024) Finding crossover indices in trees implemented in Zig. [keywords: tree, zig]
- Observer Design Pattern (Jul. 24, 2024) An example implementing the observer design pattern. in C++ [keywords: observer, design-patterns, c++]
- Shuffle Array (Nov. 25, 2021) This program shows how to generate a list of shuffled integers between 0 and N-1. It is implemented in C. [keywords: c, gsl]
- Gini
index Python
(Mar. 10, 2019)
Gini index for classification problems. Implementation in Python. [keywords: gini, python] - Gini
index R
(Mar. 10, 2019)
Gini index for classification problems. Implementation in R. [keywords: gini, R]