This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
# See official docs at https://dash.plotly.com | |
# pip install dash pandas | |
from dash import Dash, dcc, html, Input, Output | |
import plotly.express as px | |
import pandas as pd | |
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminderDataFiveYear.csv') |
import re | |
def replace(string, substitutions): | |
substrings = sorted(substitutions, key=len, reverse=True) | |
regex = re.compile('|'.join(map(re.escape, substrings))) | |
return regex.sub(lambda match: substitutions[match.group(0)], string) |
# functions for plotting garden of forking data plots | |
library(rethinking) | |
polar2screen <- function( dist, origin, theta ) { | |
## takes dist, angle and origin and returns x and y of destination point | |
vx <- cos(theta) * dist; | |
vy <- sin(theta) * dist; | |
c( origin[1]+vx , origin[2]+vy ); | |
} |
import numpy as np | |
def array_for_sliding_window(x, wshape): | |
"""Build a sliding-window representation of x. | |
The last dimension(s) of the output array contain the data of | |
the specific window. The number of dimensions in the output is | |
twice that of the input. | |
Parameters |
This procedure results in a computer that runs both Mac OS X and Ubuntu in a dual-boot configuration, each operating system using full (whole) disk encryption, and with the Ubuntu root file system stored on a ZFS pool encrypted using LUKS. The specific hardware and software versions used to document this procedure are:
#!/usr/bin/env python3 | |
import io | |
import sys | |
import time | |
import datetime | |
import requests | |
from Bio import SeqIO |
# | |
# This script calculates the depth of coverage and breadth of coverage for a given bam. | |
# Outputs a dictionary containing the contig/chromosome names and the depth and breadth of coverage for each | |
# and for the entire genome. | |
# | |
# If you optionally specify the name of the mitochondrial chromosome (e.g. mtDNA, chrM, chrMT) | |
# The script will also generate breadth and depth of coverage for the nuclear genome AND the ratio | |
# of mtDNA:nuclearDNA; which can act as a proxy in some cases for mitochondrial count within an individual. | |
# | |
# Author: Daniel E. Cook |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.