Skip to content

Instantly share code, notes, and snippets.

View michael-ford's full-sized avatar

michael-ford

View GitHub Profile
@michael-ford
michael-ford / optimization-solver-wrapper.py
Created October 4, 2023 19:17
Modular python wrapper for ILP solvers
import importlib
from abc import ABCMeta, abstractmethod
from typing import Literal
class NoSolutionsError(Exception):
"""Raised if a model is infeasible."""
pass
class SolverMeta(metaclass=ABCMeta):
@michael-ford
michael-ford / .tmux.conf
Created March 27, 2023 18:23
Tmux Config
# Set Tmux's default keystroke to C-a, a binding which comes from GNU Screen
# and is quite commong among Tmux users.
set-option -g prefix C-a
unbind C-b
# fix emacs C-a
bind a send-prefix
# Better colors
set -g default-terminal "screen-256color"
@michael-ford
michael-ford / conda_env_export.py
Created March 3, 2021 21:46 — forked from gwerbin/conda_env_export.py
Export a Conda environment with --from-history, but also append Pip-installed dependencies
"""
Export a Conda environment with --from-history, but also append
Pip-installed dependencies
Exports only manually-installed dependencies, excluding build versions, but
including Pip-installed dependencies.
Lots of issues requesting this functionality in the Conda issue tracker, no
sign of progress (as of March 2020).
@michael-ford
michael-ford / presentation.html
Last active June 17, 2020 18:42
Project Design and Tools for Reproducibility
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html class="sl-root decks export loaded ua-phantomjs>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>deck: Slides</title>
<meta name="description" content="Slides">
<style>/*! normalize.css v2.1.0 | MIT License | git.io/normalize */@import url("https://s3.amazonaws.com/static.slid.es/fonts/montserrat/montserrat.css");@import url("https://s3.amazonaws.com/static.slid.es/fonts/opensans/opensans.css");@import url("https://s3.amazonaws.com/static.slid.es/fonts/lato/lato.css");@import url("https://s3.amazonaws.com/static.slid.es/fonts/asul/asul.css");@import url("https://s3.amazonaws.com/static.slid.es/fonts/josefinsans/josefinsans.css");@import url("https://s3.amazonaws.com/static.slid.es/fonts/league/league_gothic.css");@import url("https://s3.amazonaws.com/static.slid.es/fonts/merriweathersans/merriweathersans.css");@import url("https://s3.amazonaws.com/stati
@michael-ford
michael-ford / fetch_reads_and_map.sh
Last active January 6, 2019 22:59
Fetch Reads from EBI-ENA via Aspera and Map to Reference
#!/bin/bash
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@michael-ford
michael-ford / git-cheatsheet.md
Last active December 28, 2018 18:45 — forked from hofmannsven/README.md
My simply Git Cheatsheet