Skip to content

Instantly share code, notes, and snippets.

# some code to work out how many daycare days are in a particular month.
# params
start_string = "01-09-2021"
days_to_count = 2, 3, 4 # NB monday is 0, sunday 6.
time_period = "365d"
import pandas as pd
start = pd.to_datetime(start_string, dayfirst=True)
@hardingnj
hardingnj / getting_started_google_colab.ipynb
Created June 16, 2020 10:50
getting_started_google_colab.ipynb
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.
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.

Snakemake

Syntax

  • based around rules
rule parse_txt:
  input:
    txt="input_file.txt"
@hardingnj
hardingnj / dendrogram.ipynb
Created October 2, 2018 08:51
Dendrograms
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.
@hardingnj
hardingnj / draw_ehh.ipynb
Created June 20, 2018 11:32
make an ehh example plot for presentations etc.
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.