Skip to content

Instantly share code, notes, and snippets.

View jansturm1's full-sized avatar
:octocat:

Jan jansturm1

:octocat:
  • 127.0.0.1
View GitHub Profile
@jansturm1
jansturm1 / ex VAR.py
Created September 6, 2024 06:38 — forked from BioSciEconomist/ex VAR.py
Example VAR model for python
# *-----------------------------------------------------------------
# | PROGRAM NAME: ex VAR.py
# | DATE: 2/23/21
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE: source: https://www.machinelearningplus.com/time-series/vector-autoregression-examples-python/
# *----------------------------------------------------------------
# see also my blog post: http://econometricsense.blogspot.com/2011/05/vector-autoregressions-and-bayesian.html
@jansturm1
jansturm1 / gist:ac0c54972ee67bc0c409636963a6f15e
Created January 4, 2024 11:51 — forked from Evalle/gist:7b21e0357c137875a03480428a7d6bf6
How to configure Docker to use external DNS server
Either via
$ docker run --dns 10.0.0.2 busybox nslookup google.com
or edit your /etc/docker/daemon.json to have something like:
{
"dns": ["10.0.0.2", "8.8.8.8"]
}
then restart docker service
@jansturm1
jansturm1 / README.md
Created May 30, 2022 11:56 — forked from mdml/README.md
Dendrograms: Convert from Scipy to D3

A dendrogram is a common way to represent hierarchical data. For Python users, Scipy has a hierarchical clustering module that performs hierarchical clustering and outputs the results as dendrogram plots via matplotlib. When it's time to make a prettier, more customized, or web-version of the dendogram, however, it can be tricky to use Scipy's dendrogram to create a suitable visualization. My preferred method of visualizing data -- especially on the web -- is D3. This example includes a script to convert a Scipy dendrogram into JSON format used by D3's cluster method.

In the example, I cluster six genes by their expression values from two experiments. You can easily replace that data with your own, larger data set, to harness the power of both Scipy and D3 for analyzing hierarchical data. The D3 code I used to generate this example is straigh