Skip to content

Instantly share code, notes, and snippets.

View antonkratz's full-sized avatar

Anton Kratz antonkratz

View GitHub Profile
@antonkratz
antonkratz / ak.degree.distro.r
Created July 21, 2018 01:55 — forked from ruliana/igraph-degree-distribution.R
Plotting degree distribution with igraph and ggplot2
# Anton Kratz
# date: Sat Jul 21 17:03:22 PDT 2018
suppressPackageStartupMessages(library("igraph"))
suppressPackageStartupMessages(library("ggplot2"))
# Load the PG Yeast Net file - two large components and many small ones
rf <- read.table("~/git/assets/INT.PG.YeastNet.v3.2463gene.54496link.txt", sep="\t")
akg <- graph_from_data_frame(rf, directed = FALSE, vertices = NULL)
# List of degrees
@antonkratz
antonkratz / components.r
Last active July 20, 2018 18:44
determine the # of components in a graph
#!/usr/bin/Rscript
# author: Anton Kratz
# created: Fri Jul 20 11:00:06 PDT 2018
# given a graph in edge list with score field, i.e.:
# FROM_NODE TO_NODE SCORE
# determine the # of components in this graph
suppressPackageStartupMessages(library(igraph))
@antonkratz
antonkratz / akvimnotes.md
Last active April 28, 2025 00:15
The essence of how copying and pasting works in vim.

Copy and paste with VIM across instances, SSH-borders, different clipboards

Use registers for copying and pasting WITHIN one vim instance

Vim saves text in registers. Selecting text and pressing y copies (yanks) text into a register, and pressing p pastes (puts) it.

You can see the register contents with :reg.

Named registers: there are named registers a-z.

how to install Gnumeric 1.12.35 under Xubuntu 16.04.2 LTS
wget http://ftp.gnome.org/pub/GNOME/sources/gnumeric/1.12/gnumeric-1.12.35.tar.xz
tar xvf gnumeric-1.12.35.tar.xz
cd gnumeric-1.12.35/
./configure
make
sudo make install
sudo ldconfig
how to install Gnumeric 1.12.34 under Xubuntu 16.04.2 LTS