Skip to content

Instantly share code, notes, and snippets.

View olgabot's full-sized avatar

Olga Botvinnik olgabot

View GitHub Profile

Given a subscribed calendar with a url like

https://example.com/example.ics

To force Google Calendar to refresh and reload the contents right now, unsubscribe from the calendar and subscribe to a new calendar with a URL like

https://example.com/example.ics#1

Adding the anchor tag will force Google Calendar to think of it as a new calendar

@darencard
darencard / extract_fastq_bam.md
Last active July 14, 2023 06:19
Extract paired FASTQ reads from a BAM mapping file

Please see the most up-to-date version of this protocol on my blog at https://darencard.net/blog/.

Extracting paired FASTQ read data from a BAM mapping file

Sometimes FASTQ data is aligned to a reference and stored as a BAM file, instead of the normal FASTQ read files. This is okay, because it is possible to recreate raw FASTQ files based on the BAM file. The following outlines this process. The useful software samtools and bedtools are both required.

From each bam, we need to extract:

  1. reads that mapped properly as pairs
  2. reads that didn’t map properly as pairs (both didn’t map, or one didn’t map)
@olgabot
olgabot / trying_to_install_dionysus.txt
Last active August 16, 2017 21:04
Installing persistent homology packages
Last login: Mon Aug 14 16:42:56 on ttys007
~ source activate maca-dash
(maca-dash) ➜ ~ conda install --yes phat
Fetching package metadata ...............
PackageNotFoundError: Package missing in current osx-64 channels:
- phat
Close matches found; did you mean one of these?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@briandowns
briandowns / go_hamming_distance
Created October 22, 2014 02:07
Go Hamming Distance
package main
import (
"errors"
"log"
)
func getDistance(s1, s2 string) (int, error) {
if len(s1) != len(s2) {
return 0, errors.New("ERROR: Strings are of different lengths")
@davidrpugh
davidrpugh / conda_instructions.md
Last active July 25, 2021 15:21
Instructions for setting up a Conda development environment

Creating a Conda development environment

We recommend that you set up a Python environment for developing quantecon that is separate from the "default" Python environment that you use in your own research. This will allow you to contribute to quantecon without worrying about corrupting the Python environment on which your other work depends.

Below are instructions for building a separate development environment for contributing to the quantecon package using the Conda package management system which comes bundled with the Anaconda Python distribution provided by Continuum Analytics.

Step 1:

Fork and clone a copy of the quant-econ repository on to your local machine.

Step 2:

@audreyfeldroy
audreyfeldroy / pypi-release-checklist.md
Last active February 23, 2023 15:03
My PyPI Release Checklist
  • Update HISTORY.md
  • Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@tsabat
tsabat / zsh.md
Last active October 16, 2024 14:43
Getting oh-my-zsh to work in Ubuntu