You can copy and paste the LaTeX notation in a LaTeX editor to view the math notation. A good online LaTeX editor tool is HostMath.
Let
$$ \mu_x = \frac{\sum_{i=1}^n{w_ix_i}}{\sum_{i=1}^nw_i}
| set -g mouse on | |
| # List of plugins | |
| set -g @plugin 'tmux-plugins/tpm' | |
| set -g @plugin 'tmux-plugins/tmux-sensible' | |
| set -g @plugin 'christoomey/vim-tmux-navigator' | |
| set -g @plugin 'tmux-plugins/tmux-yank' | |
| set -g @plugin 'dracula/tmux' | |
| set -g @dracula-show-powerline true |
| # ggrep is the GNU grep. On macOS, it is installed via `brew install grep` | |
| # Using perl regex for lookahead and lookbehind | |
| # This example greps the EXACT match between quotation marks | |
| aws lambda publish-version --function-name foo --profile bar | ggrep -Po '(?<=")\d+(?=")' | |
| # This example counts the number of occurrences of "prod" that is wedged bewteen string literals | |
| # '"Name": "' and '"' | |
| aws lambda list-aliases --function-name foo --profile bar | ggrep -Pc '(?<="Name":\s")prod(?=")' |
| def grouped_barplot( | |
| ax, | |
| df, | |
| xlabel: str = '', | |
| ylabel: str = '', | |
| title: str = '', | |
| width: float = 0.6, | |
| loc: str = '', | |
| bbox_to_anchor: List = [], | |
| ): |
| import timeit | |
| setup = """ | |
| import pandas as pd | |
| from dateutil import parser | |
| from datetime import datetime | |
| def test_datetime(timestamp): | |
| try: |
| from argparse import ArgumentParser, RawDescriptionHelpFormatter | |
| ef get_argument_parser() -> ArgumentParser: | |
| """Acquire command line arguments | |
| :return: The argument parser | |
| :rtype: ArgumentParser | |
| """ | |
| parser = ArgumentParser( |
| import unittest | |
| from unittest.mock import MagicMock, patch | |
| class TestFoo(unittest.TestCase): | |
| """blablabla | |
| To run all the tests in TestFoo, run command | |
| python3 -m unittest tests.test_foo.TestFoo |
| def chunk_read(f_obj: TextIOBase, sentinel: str, max_sentinel: int): | |
| """Read a file object in chunks | |
| Read the file object line by line. Each time a sentinel is detected, we increment | |
| a count. Once the count reaches max_sentinel, we have gatherered the required | |
| chunk and yield it. | |
| The function is inspired by this SO answer: | |
| https://stackoverflow.com/a/42964612/9723036 |
| " Set absolute line number for the current line and the rest is relative number | |
| set number | |
| set relativenumber | |
| " Enable monokai theme | |
| syntax enable | |
| set background=dark | |
| colorscheme monokai | |
| " I do not remember what these do |
You can copy and paste the LaTeX notation in a LaTeX editor to view the math notation. A good online LaTeX editor tool is HostMath.
Let
$$ \mu_x = \frac{\sum_{i=1}^n{w_ix_i}}{\sum_{i=1}^nw_i}
| #! /usr/bin/python | |
| import multiprocessing as mp | |
| import time | |
| ''' | |
| A simple benchmark testing while learning about multiprocessing in python (2.7.10) | |
| It is apparent from this test, conducted in MacBook Air OS 10.13.6, that using Pool | |
| class of multiprocessing yields the best runtime performance. My guess is that in | |
| the parallel() function, each new process is spawn up manually via a for loop, whereas |