Skip to content

Instantly share code, notes, and snippets.

View krassowski's full-sized avatar

Michał Krassowski krassowski

View GitHub Profile
@krassowski
krassowski / loadings_similarity_simple.py
Created March 22, 2020 11:58
Loadings similarity method - a simplified version
from pandas import DataFrame
from sklearn.pipeline import Pipeline
from sklearn.base import clone
from sklearn.model_selection import KFold
from scipy.stats import pearsonr
from numpy import Inf
def loadings_similarity_simple(
pipeline: Pipeline, data,
@krassowski
krassowski / compress_png_in_notebook.py
Last active April 1, 2020 15:14
A quick script to compress PNG images in a Jupyter notebook
#!/usr/bin/env python3
import sys
import json
from subprocess import run
from base64 import decodebytes, encodebytes
from tempfile import NamedTemporaryFile
try:
from tqdm import tqdm
except ImportError:
@krassowski
krassowski / upset_with_icons.R
Last active April 16, 2020 22:55
ComplexUpset with icons
# for indvs and symptoms see https://github.com/kjhealy/covid_symptoms
mapping = list(
'Fatigue'='tired-regular',
'Anosmia'='socks-solid',
'Cough'='head-side-cough-solid',
'Fever'='thermometer-full-solid',
'Diarrhea'='toilet-solid',
'Breath'='lungs-solid'
)
@krassowski
krassowski / example.py
Last active October 19, 2022 14:09
Simple pandas DataFrame explorer for JupyterLab (using sidecar)
from pandas_explorer import pandas_explorer
from pandas import read_csv
iris = read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv')
pandas_explorer(iris, title='Iris')
@krassowski
krassowski / preproposal.md
Last active January 24, 2021 21:06 — forked from bollwyvl/preproposal.md
DRAFT jupyter(lab)-lsp incorporation pre-proposal

Pre-Proposal Checklist

  • Briefly outlines the proposal
  • Suggests a review team (optional)
  • Declares why it should be a JEP (See the “JEP / Not-a-JEP Rubric” below.)
  • Identify a Shepherd to see the process through. (Shepherds are assigned on a round-robin basis from a set of interested engaged volunteers).
  • Decide if it’s a JEP according to the criteria listed above. The Shepherd decides if the JEP criteria have been met.

Pre-Proposal

The maintainers of the jupyter(lab)-lsp would like to propose its incorporation as an official Project Jupyter project, as signalled by a new, Jupyter-branded GitHub organization. We feel it would benefit Jupyter users through higher velocity in delivering more robust features otherwise missing in the Jupyter interactive computing experience.

@krassowski
krassowski / README.md
Last active October 22, 2021 19:28 — forked from jtpio/README.md
JupyterLab 3.2 with LSP, git and few other extensions

JupyterLab 3.2 on Binder

Binder

@krassowski
krassowski / 1.ipynb
Created May 19, 2021 13:41
nbdime failure repro
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@krassowski
krassowski / README.md
Last active November 24, 2021 13:16
jupytext

JupyterLab 3.2 with jupytext and git

Binder

@krassowski
krassowski / 50_cells.ipynb
Last active August 21, 2021 14:59
Reproducer of cell rendering issue
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.