Skip to content

Instantly share code, notes, and snippets.

@bmiles
bmiles / biocoder_python_Oct_2015.py
Created September 24, 2015 18:46
This code uses Autoprotocol-Python to generate Autoprotocol JSON for a simple bacterial incubation and OD600 measurement.
from autoprotocol.protocol import Protocol
p = Protocol()
# Set up the containers being referenced
ctrl_bacteria = p.ref("DH5a", id="3209xifd029", cont_type="micro-1.5", discard=True)
growth_plate = p.ref("growth_plate", id="3208kfhf394", cont_type="96-flat", storage="cold_4")
# Dispense, transfer, cover the plate, incubate, measure OD600
p.dispense(growth_plate, "lb-broth-noAB", [{"column": "0", "volume": "150:microliter"}])
p.transfer(ctrl_bacteria.well(0), growth_plate.wells_from(0,4, columnwise=True), "2:microliter")
@glasslion
glasslion / vtt2text.py
Last active March 9, 2025 02:54
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.
@100ideas
100ideas / brew-lsbrews
Last active March 17, 2022 04:11
lsfuncs.fish: Print user-defined Fish functions (including any executable files in first path of `$fish_user_paths`)
#!/usr/bin/env bash
#
#!/usr/bin/env bash
#: Usage: brew lsbrews [OPTION]
#:
#: list name: description of all instealled "leaf" formulae
#:
# disables logging the script's contents to .bash_history
set +o history