Skip to content

Instantly share code, notes, and snippets.

View stared's full-sized avatar

Piotr Migdał stared

View GitHub Profile
@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 / NGA_coverage-ISO2.csv
Last active November 21, 2019 12:18
Plot of Europe (choropleth) in R/ggplot, using NUTS data
CountryCode NGA_Coverage
MT 100
BE 98.84
NL 98.41
LT 97.29
LU 94.42
DK 91.7
LV 89.58
PT 89.11
UK 88.55
@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 / keras_pydata_warsaw_jan2017.ipynb
Last active April 21, 2019 21:21
First steps in deep learning with Keras @ PyData Warsaw Meetup (12 Jan 2017)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stared
stared / tf_playground_like_plots.ipynb
Last active April 2, 2019 18:24
TF playground like plots (cf. scikit-learn comparison)
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
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
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
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
@stared
stared / tips_for_neurotypicals.md
Last active April 29, 2017 17:38
Tips for Neuro-Typicals (from A Mind-Body Look at the Concept of Asperger's Syndrome)

from A Mind-Body Look at the Concept of Asperger's Syndrome (pdf) by Michael Samsel, LMHC

Tips for Neuro-Typicals

Say What You Want Directly and Plainly. Don't hint, don't understate. Spell out expectations.

Allow and Accept Asynchrony in Communication. For instance, let an exchange play out in email, even if you both live in the same house. In this case any delay does not take over as the subject of discussion, as it tends to in attempts at synchronous (face-to-face) discussion. After all, people tolerate asynchrony in internet shopping or judicial proceedings, in the interest of getting a better product.

Make Social Occasions Fairly Short and Fix Upon a Duration. Open-ended social situations tend to provoke shutdown in the aspie for self-protection. A time limited foray is a manageable task.