Skip to content

Instantly share code, notes, and snippets.

View mpkocher's full-sized avatar

M. Kocher mpkocher

View GitHub Profile
@mpkocher
mpkocher / Functional-Python-Part-4.ipynb
Created February 27, 2019 04:34
Functional Programming Techniques in Python: Part 4
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mpkocher
mpkocher / Functional-Python-Part-3.ipynb
Last active February 22, 2019 01:05
Functional Python Techniques Part 3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mpkocher
mpkocher / Functional-Python-Part-2.ipynb
Last active September 14, 2020 21:43
Functional-Python-Part-2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mpkocher
mpkocher / Functional-Python-Part-1.ipynb
Last active February 15, 2019 11:25
Functional Python Part 1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mpkocher
mpkocher / AmmoniteOpsExample.ipynb
Created November 7, 2018 00:56
Ammonite Ops /dev/tty: Device not configured Issue
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mpkocher
mpkocher / HelloScalaAlmond.ipynb
Last active October 30, 2018 22:48
Almond Example Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mpkocher
mpkocher / P_Filter.py
Created October 26, 2018 17:14
Legacy smrtpipe.py workflow examples from the RS
"""Filters sequences based on the pls.h5 file, removing apparently
doubly loaded wells and unloaded wells.
Note: The 'chunking' (i.e., chunkFunc) in the task decorator must be
consistent for each instance of SMRTFile. In other words, inputPlsFofn must be
scattered using the same function in *every* P_module. Therefore, the
chunkFunc must be set to context.numMovies.
"""
@mpkocher
mpkocher / get-runs.py
Last active October 2, 2019 14:54
Example of getting Runs list from SL
#!/usr/bin/env python
"""Get a List of Runs from SMRT Link"""
# From:http://bitbucket.nanofluidics.com:7990/projects/SL/repos/pbcommand/browse/pbcommand/cli/examples/template_simple.py
import os
import sys
import logging
from pbcommand.validators import validate_file
from pbcommand.utils import setup_log
@mpkocher
mpkocher / sl_clieint_template.py
Last active October 2, 2019 14:55
pbcommand SL-Client Template
import datetime
import json
import copy
import time
import functools
import itertools
import pickle
import requests
import iso8601
@mpkocher
mpkocher / ExampleCatMonoid.sc
Last active October 2, 2019 14:58
Example Monoid with Cats
// Run with ammonite use amm ExampleCatsMonoid.sc
// import $ivy.`org.typelevel::cats-core:1.0.1`
import cats.implicits._
import cats.instances.all._
import cats.Monoid
// For demonstration purposes, load a file (csv, json) and
// each item can be converted to a record of type R
case class R(name: String, age: Int, favoriteColor: String)