Skip to content

Instantly share code, notes, and snippets.

Avatar

Piotr Migdał stared

View GitHub Profile
@stared
stared / metal_bands_happiness.Rmd
Last active January 7, 2023 16:45
Metal bands bring happiness (as chocolate brings Nobel Prizes) - ggplot2 code
View metal_bands_happiness.Rmd
---
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)
View brewing_your_mac.sh
# 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'
View .travis.yml
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
View jest_typescript_extend.ts
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
View beamsplitter.md

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)
View tf_playground_like_plots.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View example_submodule.py
#!/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
View nlpprogress_md_tbl_2_yaml.ipynb
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
View html_svg_github_test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stared
stared / Dockerfile
Created January 8, 2018 19:16
Docker with TensorFlow and PyTorch
View Dockerfile
FROM jupyter/scipy-notebook
# Install Tensorflow and PyTorch
RUN conda install --quiet --yes \
'tensorflow=1.3*' \
'keras=2.0*' \
'pytorch=0.3' \
'torchvision' && \
conda clean -tipsy && \
fix-permissions $CONDA_DIR