Skip to content

Instantly share code, notes, and snippets.

View stared's full-sized avatar

Piotr Migdał stared

View GitHub Profile
@stared
stared / My Clippings.txt
Last active October 29, 2024 00:13
Convert Kindle highlights and notes into Markdown - to be used in Obsidian or Static Site Generator
The Design of Everyday Things: Revised and Expanded Edition (Norman, Don)
- Your Highlight on page 101 | location 2210-2212 | Added on Wednesday, 11 May 2016 21:05:40
It is a profoundly erroneous truism, repeated by all copy-books and by eminent people when they are making speeches, that we should cultivate the habit of thinking of what we are doing. The precise opposite is the case. Civilization advances by extending the number of important operations which we can perform without thinking about them. (Alfred North Whitehead, 1911.)
==========
The Design of Everyday Things: Revised and Expanded Edition (Norman, Don)
- Your Highlight on page 111 | location 2395-2396 | Added on Saturday, 18 June 2016 19:33:53
unless it is triggered by some external event or unless we deliberately keep it in mind through constant repetition (which then prevents us from having other conscious thoughts).
==========
@stared
stared / metal_bands_happiness.Rmd
Last active January 7, 2023 16:45
Metal bands bring happiness (as chocolate brings Nobel Prizes) - ggplot2 code
---
title: "Metal bands bring happiness"
output: html_notebook
author: "Piotr Migdał"
---
```{r}
library(ggplot2)
library(ggrepel)
```
@stared
stared / brewing_your_mac.sh
Last active December 20, 2022 11:44
Brewing your Mac: install all stuff easily on Macbook Pro 2021 (M1 Pro / Max)
# Homebrew - the package manager
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
# Rosetta - for running apps not native to M1 arm64
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
# Terminal improvement
brew install fish
sudo sh -c 'echo /opt/homebrew/bin/fish >> /etc/shells'
language: node_js
node_js: node
before_script:
- npm install -g typescript
- npm install codecov -g
script:
- yarn lint
- yarn build
@stared
stared / jest_typescript_extend.ts
Created February 13, 2020 23:17
Example of extending jest matchers in TypeScript
export {}
declare global {
namespace jest {
interface Matchers<R> {
myMatcher: (received: string) => R
}
}
}
@stared
stared / beamsplitter.md
Last active October 29, 2019 17:35
Element desc init

50-50 Beamsplitter

Optical devices used to split a single beam of laser light into two beams, or to recombine two beams into one.

{
  "cols": 4,
  "rows": 3,
  "cells": [
 {
@stared
stared / tf_playground_like_plots.ipynb
Last active April 2, 2019 18:24
TF playground like plots (cf. scikit-learn comparison)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
import delve
import logging
import torch
import torch.nn as nn
from delve import CheckLayerSat
from torch.autograd import Variable
from tqdm import tqdm, trange
@stared
stared / nlpprogress_md_tbl_2_yaml.ipynb
Created August 14, 2018 09:02
NLP progress Markdown table to YAML
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stared
stared / html_svg_github_test.ipynb
Created July 14, 2018 13:14
Jupyter in GitHub SVG HTML display
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.