Skip to content

Instantly share code, notes, and snippets.

View jonathanvoelkle's full-sized avatar
🌐

Jonathan Völkle jonathanvoelkle

🌐
View GitHub Profile
import yfinance as yf
import pandas as pd
from datetime import datetime, timedelta
#from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import AdaBoostClassifier, RandomForestClassifier
from xgboost import XGBClassifier
from sklearn.metrics import precision_score, recall_score, f1_score, roc_auc_score, accuracy_score
from ta.utils import *
from ta.volatility import *
@jonathanvoelkle
jonathanvoelkle / tufte-handout.tex
Created February 9, 2021 11:20
Tufte Handout Empty Template
\documentclass{tufte-handout}
\title{An Example of the Usage of the Tufte-Handout Style\thanks{Inspired by Edward~R. Tufte!}}
\author[The Tufte-LaTeX Developers]{The Tufte-\LaTeX\ Developers}
%\date{28 March 2010} % without \date command, current date is supplied
%\geometry{showframe} % display margins for debugging page layout
.roam-article
> div:first-child
> div:nth-child(2)
> .roam-block-container
> .rm-block-main.rm-block__self:first-child {
position: sticky !important;
background: var(--bg-color);
will-change: transform;
z-index: 19;
top: 0 !important;

How to use roam/render to publish to the web

The workflow consists of three major components:

  1. A Cloudflare Worker to host the pages
  2. A custom roam component to trigger the publishing and the unpublishing
  3. Some JavaScript to handle the publishing and unpublishing
  4. Optional: set up a smartblock

Please note: you are doing everything at your own risk! If you don't have a basic understanding of how roam/js works and know basic javascript, please don't use this!

@jonathanvoelkle
jonathanvoelkle / backup-edn.yml
Last active February 3, 2021 14:50
roam-backup
name: "Roam Research EDN backup"
on:
schedule:
- cron: "0 4 * * *"
jobs:
backup:
runs-on: macos-latest
name: Backup
[data-tag="rm--float-right"] + .rm-highlight {
float: right;
background-color: initial;
}
[data-tag="rm--float-right"] {
display: none !important;
}
@jonathanvoelkle
jonathanvoelkle / main.tex
Created December 30, 2019 14:52
r cheatsheet
\documentclass[10pt,landscape]{article}
\usepackage{multicol}
\usepackage{calc}
\usepackage{ifthen}
\usepackage[landscape]{geometry}
\usepackage{epsfig}
\ifthenelse{\lengthtest { \paperwidth = 11in}}
{ \geometry{top=.5in,left=.5in,right=.5in,bottom=.5in} }
{\ifthenelse{ \lengthtest{ \paperwidth = 297mm}}
@jonathanvoelkle
jonathanvoelkle / slack_notification.R
Created December 14, 2019 15:36
Send a notification to slack from R
send_notification <- function() {
library(httr)
# webhook url
slack_url <- "https://hooks.slack.com/services/..."
r <- POST(slack_url, body = list(text = "R has finished"), encode = "json")
r
}
@jonathanvoelkle
jonathanvoelkle / Django Rest Framework + React.md
Last active October 4, 2018 10:43
Django Rest Framework + React

Django Rest Framework + React

Setup

$ cd ~/Desktop
$ mkdir todo && cd todo
$ mkdir backend && cd backend
$ pipenv install django
$ pipenv shell
@jonathanvoelkle
jonathanvoelkle / lighthouse.md
Created September 25, 2018 17:05
(Google Chrome) Lighthouse Improvements

Lighthouse Audit

Text is invisible while webfonts are loading

Which font-display value to use?

This depends a lot on how you are using your webfont, and whether rendering the text in a fallback font makes sense. For example, if you're rendering the main body text on a site, you should use font-display: optional. On browsers that implement it,