If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sleep(ms) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| } | |
| function getPage(page) { | |
| // returns the uid of a specific page in your graph. | |
| // _page_: the title of the page. | |
| let results = window.roamAlphaAPI.q(` | |
| [:find ?uid | |
| :in $ ?title |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Automatic distraction detection. Work in progress. | |
| Usage: | |
| python detect.py main | |
| """ | |
| import fire | |
| import subprocess | |
| import plyvel | |
| import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Copy this to roam/js page, including the "{{[[roam/js]]}}" node: | |
| - {{[[roam/js]]}} | |
| - ```javascript | |
| /* | |
| * Roam template PoC by @ViktorTabori | |
| * 0.1alpha | |
| * | |
| * How to install it: | |
| * - go to `roam/js` page` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import pandas as pd | |
| from math import e | |
| class Node: | |
| ''' | |
| A node object that is recursivly called within itslef to construct a regression tree. Based on Tianqi Chen's XGBoost | |
| the internal gain used to find the optimal split value uses both the gradient and hessian. Also a weighted quantlie sketch | |
| and optimal leaf values all follow Chen's description in "XGBoost: A Scalable Tree Boosting System" the only thing not |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import argparse | |
| import logging | |
| from datetime import datetime, timedelta | |
| from typing import List, Optional | |
| from collections import defaultdict |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Load relevant libraries | |
| import numpy as np | |
| import numba as nb | |
| import matplotlib.pyplot as plt | |
| # Goal is to implement a numba compatible polyfit (note does not include error handling) | |
| # Define Functions Using Numba | |
| # Idea here is to solve ax = b, using least squares, where a represents our coefficients e.g. x**2, x, constants | |
| @nb.njit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::collections::HashMap; | |
| use std::fmt; | |
| use std::io; | |
| use std::num::ParseFloatError; | |
| use std::rc::Rc; | |
| /* | |
| Types | |
| */ |
More info can be found at, https://docs.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?view=netframework-4.7.2
// C:\ProgramData\
var path1 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData);
// C:\Users\USERNAME\AppData\Roaming
var path2 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ######################################## | |
| # 1. Build nodejs frontend | |
| ######################################## | |
| FROM node:10.9-alpine as build-node | |
| # prepare build dir | |
| RUN mkdir -p /app/assets | |
| WORKDIR /app | |
| # set build ENV |
