Skip to content

Instantly share code, notes, and snippets.

View easa's full-sized avatar

Issa Nodehi easa

View GitHub Profile
@easa
easa / tlsetup.sh
Created January 2, 2022 17:26 — forked from ljvmiranda921/tlsetup.sh
Set-up script to install a minimal TexLive 2015 Distribution
#!/usr/bin/env bash
#
# Minimal Travis Set-up Script
#
# This script sets-up a minimal TexLive 2015 distribution with the
# additional packages being installed when needed. This is intended
# for Travis continuous integration and is expected to work with the
# Ubuntu Trusty (14.04) Distribution
#
# Copyright (C) 2018 Lester James V. Miranda <[email protected]>
@easa
easa / vwap.js
Created August 25, 2021 16:55 — forked from brianmcallister/vwap.js
VWAP (Volume Weighted Average Price) function.
/**
* Calculate VWAP (volume weighted average price) for a list of bids.
*
* @param {number} total - Total shares bought.
* @param {Array<number, number>} positions - Tuples of position data. The first
* index is the amount of shares, the
* second index is the price of the
* shares.
*
* @example