Skip to content

Instantly share code, notes, and snippets.

View flekschas's full-sized avatar
👋

Fritz Lekschas flekschas

👋
View GitHub Profile
@flekschas
flekschas / README.md
Last active March 3, 2021 19:06
Sample-based encoding of multivecs

Sample-based encoding of multivecs

Using overlay in combination with dataTransform and filter we can customize the color encoding of each row in the multivec dataset.

This is more of a proof of concept rather than a recommendation. Normally you would just want to just one colormap instead of different once!

Live demo: https://gosling.js.org?gist=flekschas/a43a1c9924b36d9f0c66862c3314689c

@flekschas
flekschas / README.md
Last active March 2, 2021 19:48
Gosling: Vector Data

Vector Data

A simple data showing how to load vector data.

property type description
type string required, "vector"
url string required, URL pointing to a HiGlass server's tileset_info endpoint
column string required, the name of center position of bins.
value string required, the name of the bin value.
@flekschas
flekschas / _pilingjs.json
Last active September 14, 2020 13:23
Ridge Plots
{
"title": "Ridge Plots",
"subtitle": "Global Surface Temperature",
"thumbnail": "https://user-images.githubusercontent.com/932103/92788343-dcd7a800-f377-11ea-9077-f519eac82a62.jpg"
}
@flekschas
flekschas / _pilingjs.json
Last active September 22, 2020 22:10
Matrices
{
"title": "Matrices",
"subtitle": "Hi-C Loop Patterns",
"thumbnail": "https://user-images.githubusercontent.com/932103/90644105-5b6e7900-e202-11ea-8fa3-3f9c4c469f19.jpg"
}
@flekschas
flekschas / _pilingjs.json
Last active February 9, 2021 20:22
Book Covers
{
"title": "Book Covers",
"thumbnail": "https://user-images.githubusercontent.com/932103/89745160-d952b780-da7f-11ea-9af4-54a3fd205e07.jpg"
}
@flekschas
flekschas / convert_with_clodius.sh
Created November 9, 2018 19:53
Script to do convert data with Clodius in the cloud cleanly. Created by Alex Reynolds
#!/bin/bash
ENVIRONMENT=$1
ASSEMBLY=$2
RESOLUTION=$3
STATES=$4
STATESFN=$5
MARKSFN=$6
FILETOMOVESRC=$7
FILETOMOVEDEST=$8
@flekschas
flekschas / index.js
Created October 19, 2018 02:02
A small library for rigid body transformations for WebGL.
import { quat, vec3 } from 'gl-matrix';
import * as rbt from './rigid-body-transform.js';
const myFancyRbt = rbt.create();
// Rotate 45 degree around the x axis
const r = rbt.create({ r: quat.fromEuler(45, 0, 0) });
myFancyRbt.multiply(r);
// Translate
@flekschas
flekschas / conclusion.md
Created July 31, 2018 14:59
Performance of Object.keys vs Object.values for getting the number of props of an object

Results

Let's get started!
VM73:13 Object.keys took: 20234.000000054948msecs
VM73:19 Object.values took: 5987.800000002608msecs

Conclusion

@flekschas
flekschas / delay-promise.js
Created July 15, 2018 22:28
Delay promise chain
const delayPromise = (duration) => (...args) => new Promise((resolve) => {
setTimeout(() => { resolve(...args); }, duration);
});
export default delayPromise;
@flekschas
flekschas / instructions.md
Last active July 5, 2018 14:06
Install iPython Widget in Jupyter Notebook and JupyterLab

Get a Jupyter Notebook and JupyterLab compatible widget setup

Install packages

conda install -c conda-forge jupyterlab
conda install -c conda-forge ipywidgets
conda install -c conda-forge cookiecutter

jupyter labextension install @jupyter-widgets/jupyterlab-manager