Skip to content

Instantly share code, notes, and snippets.

View slowkow's full-sized avatar
🐄
moooooo

Kamil Slowikowski slowkow

🐄
moooooo
View GitHub Profile
@slowkow
slowkow / ssh-tutorial.md
Last active March 27, 2026 06:23
ssh to a server without typing your password

How to ssh to a remote server without typing your password

Save yourself a few keystrokes. Follow the steps below:

  1. Run this Bash script on your laptop:

    #!/usr/bin/env bash
    

The hostname of your remote server.

@slowkow
slowkow / remove-emoji.py
Created July 19, 2018 14:10
Remove all traces of emoji from a text file.
#!/usr/bin/env python
"""
Remove emoji from a text file and print it to stdout.
Usage
-----
python remove-emoji.py input.txt > output.txt
"""
@slowkow
slowkow / counts_to_tpm.R
Last active January 19, 2026 18:36
Convert read counts to transcripts per million (TPM).
#' Convert counts to transcripts per million (TPM).
#'
#' Convert a numeric matrix of features (rows) and conditions (columns) with
#' raw feature counts to transcripts per million.
#'
#' Lior Pachter. Models for transcript quantification from RNA-Seq.
#' arXiv:1104.3889v2
#'
#' Wagner, et al. Measurement of mRNA abundance using RNA-seq data:
#' RPKM measure is inconsistent among samples. Theory Biosci. 24 July 2012.
@slowkow
slowkow / needleman-wunsch.py
Last active November 5, 2025 11:49
A simple version of the Needleman-Wunsch algorithm in Python.
#!/usr/bin/env python
"""
The Needleman-Wunsch Algorithm
==============================
This is a dynamic programming algorithm for finding the optimal alignment of
two strings.
Example
-------
@slowkow
slowkow / GTF.py
Last active July 24, 2025 19:02
GTF.py is a simple module for reading GTF and GFF files
#!/usr/bin/env python
"""
GTF.py
Kamil Slowikowski
December 24, 2013
Read GFF/GTF files. Works with gzip compressed files and pandas.
http://useast.ensembl.org/info/website/upload/gff.html
@slowkow
slowkow / take-screenshot.scpt
Last active May 26, 2025 20:13
Applescript to take a screenshot with the application title in the filename.
-- take-screenshot.scpt
-- Kamil Slowikowski
-- 2025-05-26
-- Get the title of the frontmost application window.
-- https://stackoverflow.com/questions/5292204
global frontApp, frontAppName, windowTitle
set windowTitle to ""
tell application "System Events"
set frontApp to first application process whose frontmost is true
@slowkow
slowkow / coding_lengths.png
Last active March 31, 2025 08:04
Count the number of coding base pairs in each Gencode gene.
coding_lengths.png
@slowkow
slowkow / barplot_heatmap.png
Last active February 22, 2025 00:05
Plot a horizontal bar plot and the lower triangle of a heatmap aligned at the base of the bars
barplot_heatmap.png
@slowkow
slowkow / pubmed-publications.html
Created May 3, 2019 01:22
Get an HTML list of PubMed publications
<!DOCTYPE html>
<body>
<!-- Copied directly from http://www.ephys.org/ by Damian J Williams -->
<input placeholder="Kamil Slowikowski" name="name"/>
<p id="demo"></p>
<script>
@slowkow
slowkow / index.html
Last active November 3, 2024 17:38
Karabiner-Elements mouse4 to back and mouse5 to forward
<html>
<body>
<a href="karabiner://karabiner/assets/complex_modifications/import?url=https%3A%2F%2Fgist.githubusercontent.com%2Fslowkow%2F275e53573e2aeb60c8304add1e54faf5%2Fraw%2Fc63540925dba76f46293834c24700ebf1578ed10%2Fmouse-buttons-back-forward.json">click here to import into Karabiner-Elements</a>
</body>
</html>