encoding is UTF-8, needs pdflatex
per mille sign
- plain text: ‰ (doesn't render properly in PDF)
- HTML:
‰
(renders properly in PDF) - LaTeX:
$\text{\textperthousand}$
(renders properly in PDF)
delta sign
from pathlib import Path | |
import tarfile | |
with tarfile.open('data.tar','w') as tar: | |
for name in Path('.').glob('*/filtered_feature_bc_matrix.h5'): | |
tar.add(name) | |
syntax on | |
filetype plugin indent on | |
set number | |
set path+=** | |
set noswapfile | |
set undofile | |
set incsearch | |
set smartindent | |
set ic | |
set expandtab |
def df_diff(d1, d2): | |
""" | |
df_diff Create a DataFrame containing rows of d1 not in d2 | |
Arguments: | |
d1 -- A data frame | |
d2 -- Another DataFrame which is a subset of d1 | |
Returns: | |
A pandas DataFrame containing rows of d1 that are not in d2 |
# For a description of this file, please see: | |
# https://www.innoq.com/en/blog/markdown-with-zotero-workflow | |
#------------------------------------------------------------ | |
# what's the name of the generated output file(s) | |
OUTPUT=out | |
# what's the name of the markdown source file | |
SOURCE=principles-content.md |
--- | |
creation date: <% tp.file.creation_date() %> | |
tags: DailyNote <% tp.file.title.split('-')[0] %> | |
--- | |
modification date: <%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> // This doesn't currently work in front matter, hoping that gets fixed. | |
# <% tp.file.title %> | |
<< [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] | [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]]>> |
--- | |
title: "Example dashboard" | |
output: | |
flexdashboard::flex_dashboard: | |
orientation: columns | |
vertical_layout: scroll | |
html_document: default | |
--- | |
```{r setup, include=FALSE} |
# remotes::install_github('ramikrispin/coronavirus') | |
library(coronavirus) | |
update_datasets() | |
pacman::p_load(char=c('tidyverse','janitor', 'ggrepel')) | |
deaths <- coronavirus %>% | |
clean_names() %>% | |
filter(type=='death') %>% | |
group_by(country_region, date) %>% | |
summarise(cases = sum(cases)) %>% |
# https://stackoverflow.com/questions/25191620/ | |
# creating-lowpass-filter-in-scipy-understanding-methods-and-units | |
import numpy as np | |
from scipy.signal import butter, lfilter, freqz | |
from matplotlib import pyplot as plt | |
def butter_lowpass(cutoff, fs, order=5): | |
nyq = 0.5 * fs |