- modern data science with r:
https://mdsr-book.github.io/mdsr2e/
This file contains 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
## NODE | |
################################## | |
# multi-stage build to exclude intermediate build files and keep only resulting artifacts | |
# -slim uses debian and is similar in size, alpine ~120 / -sim ~180mb, while full >1gb! | |
FROM node:16-alpine AS build | |
# FROM node:18-slim AS build | |
WORKDIR /app | |
COPY . . |
This file contains 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
# Run in elevated PS | |
# Reboot required | |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force | |
# Store: | |
# WSL, Ubuntu, DevToys, Power BI | |
# EarTrumpet, Screentogif, ShareX, Photoscape X, Inkscape, RSS Bandit, Surface, WhatsApp | |
# Install: Office, Visual Studio, SQL Server Developer Edition, https://aka.ms/windbg/download |
This file contains 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
#!/bin/bash | |
# use cat md5-file | ./test-md5.sh | |
while IFS='' read -r line || [[ -n "$line" ]]; do | |
if [[ $line = *";"* ]]; then | |
continue | |
fi | |
path=${line#* \*} | |
path=${path%$'\r'} | |
path=${path/\\//} |
This file contains 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
#!/bin/bash | |
# | |
# Generates client and server certificates used to enable HTTPS | |
# remote authentication to a Docker daemon. | |
# | |
# See http://docs.docker.com/articles/https/ | |
# | |
# To start the Docker Daemon: | |
# | |
# sudo docker -d \ |
This file contains 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
// const {log} = console | |
// merge sorted | |
a = [0, 4, 6, 7]; | |
b = [1, 2, 3, 4, 8]; | |
function mergeSorted(x1, x2) { | |
const out = []; | |
const [l1, l2] = [x1.length, x2.length]; | |
let [i1, i2] = [0, 0]; |
This file contains 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
user = { | |
name: 'Joe', | |
active: true, | |
purchases: [], | |
cart: [] | |
} | |
const compose = (f, g) => { return (...args) => f(g(...args)) } // in reduce new acc/f will be a fn | |
// all functions are coiled up from last to first - |
This file contains 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 python3 | |
""" | |
Handbrake (json) Queue Creator | |
last updated: 2021/oct/9 iexa | |
changelog: | |
- 21/oct/9: open hb.json file in utf8 encoding to be sure | |
- 21/jul/15: added rotation check | |
- 21/jun/23: added ffmpeg automatic resolution sniffing | |
""" |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
This document is a collection of concepts and strategies to make large Elm projects modular and extensible.
We will start by thinking about the structure of signals in our program. Broadly speaking, your application state should live in one big foldp
. You will probably merge
a bunch of input signals into a single stream of updates. This sounds a bit crazy at first, but it is in the same ballpark as Om or Facebook's Flux. There are a couple major benefits to having a centralized home for your application state:
- There is a single source of truth. Traditional approaches force you to write a decent amount of custom and error prone code to synchronize state between many different stateful components. (The state of this widget needs to be synced with the application state, which needs to be synced with some other widget, etc.) By placing all of your state in one location, you eliminate an entire class of bugs in which two components get into inconsistent states. We also think yo
NewerOlder