Skip to content

Instantly share code, notes, and snippets.

View pansapiens's full-sized avatar

Andrew Perry pansapiens

  • Melbourne, Australia
View GitHub Profile
@ckandoth
ckandoth / install_nextflow_singularity.md
Last active March 22, 2024 06:58
Install conda and use it to install nextflow and singularity

This guide will show you how to install conda and then use it to install nextflow and singularity for executing popular bioinformatics workflows. Unfortunately, singularity is not available on Windows or macOS. So, this guide will only target Linux environments. If you have to use Windows 10, then try WSL2. If you have to use macOS, then try a Virtual Machine.

Download the Miniconda3 installer for Linux environments:

curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh

Install into a folder named miniconda3 under your home directory, and delete the installer:

bash miniconda.sh -bup $HOME/miniconda3 && rm -f miniconda.sh
@jrsa
jrsa / gist:a6c99e4b95a906acc9bed1ed7060ee9b
Last active February 25, 2024 08:00
EN129 VCO Core in falstad
$ 1 0.000005 0.2954511527092107 50 5 50
402 400 496 560 496 1 0\s0\s40\s-9\s0\s0\s0.5 0\s0\s40\s9\s0\s0\s0.5 0\s1\s-12.107891388002887\s0.49020072449645724\s100 0\s1\s-0.49020072449645724\s0.4899458951514504\s100 0\s1\s0\s0.4899458951514504\s100 0\s1\s-3.4423968860970877\s0.48994335934397704\s100 0\s1\s-8.969060690957324\s-4.088038007650795\s100 0\s-1\s0.48993828812503004\s-0.4896834587831105\s100 0\s-1\s0\s-0.4896834587831105\s100 0\s-1\s16.04076664862162\s-0.48993828812503004\s100 0\s-1\s0.0070150138786200245\s-0.02392429516405592\s100 0\s-1\s0\s-0.02392429516405592\s100 0\s-1\s9.993078392331174\s-0.0070150138786200245\s100 0\s1\s0\s0.48967838756419013\s100 0\s1\s-0.4899332169060475\s0.48967838756419013\s100 0\s1\s-6.996370694155912\s0.4899332169060475\s100 0\s1\s0\s-13.57798136396477\s100 0\s1\s0\s-8.999999996969999\s100
w 560 496 576 496 0
w 576 496 592 496 0
g 320 464 320 496 0
w 400 496 384 496 0
r 384 496 384 368 0 15000
r 544 368 544 432 0 1000000
w 544 432 544 464 1
R 544 368 544 336 0 0 40 9 0 0 0.5
@isaiahtaylor
isaiahtaylor / code
Last active November 2, 2023 20:40
VS Code's "code" command for code-server
#!/bin/bash
set -e
function cleanup {
echo ""
echo "Cleaning up processes"
kill -SIGINT -$GID
}
trap cleanup EXIT
if [ "$1" ]; then
@vsoch
vsoch / Singularity.spec
Created March 3, 2018 14:57
A DeepVariant image for Singularity, reliant on a localimage pull of layers first
Bootstrap: localimage
From: /home/vanessa/.singularity/shub/deepvariant-docker-deepvariant:0.5.0.simg
# sregistry get gcr.io/deepvariant-docker/deepvariant:0.5.0
# sudo singularity build deepvariant Singularity
%environment
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DV_GPU_BUILD=0
export PATH DV_GPU_BUILD
@ForgottenUmbrella
ForgottenUmbrella / publish_python.md
Last active December 25, 2023 21:49
How to publish Python apps for human beings

How to publish Python apps for human beings

So, you've created a Python app (be it a graphical user interface with Qt or the like, or a simple command line interface). Great! But how are others going to use it? Python applications often have dependencies (e.g. from third-party modules), and they also need a Python interpreter to run them. For a developer, installing all the necessary bits and bobs to make things work is okay, but that's unacceptable for a normal user - they just want to download the thing and run it.

Below are simple instructions to publish your app on the three main operating systems: Windows, macOS and Linux.

>Illumina Single End Apapter 1
ACACTCTTTCCCTACACGACGCTGTTCCATCT
>Illumina Single End Apapter 2
CAAGCAGAAGACGGCATACGAGCTCTTCCGATCT
>Illumina Single End PCR Primer 1
AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT
>Illumina Single End PCR Primer 2
CAAGCAGAAGACGGCATACGAGCTCTTCCGATCT
>Illumina Single End Sequencing Primer
ACACTCTTTCCCTACACGACGCTCTTCCGATCT
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 26, 2024 02:03
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@veuncent
veuncent / docker_debugging.md
Last active February 21, 2024 00:58
Debugging Django apps running in Docker using ptvsd - Visual Studio (Code)

Remote debugging in Docker (for Django apps)

In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):

  1. Add ptvsd to your requirements.txt file
ptvsd == 4.3.2
  1. To your launch.json, add this:
@wassname
wassname / to_filename.py
Last active November 30, 2022 14:19
python convert string to safe filename
"""
Url: https://gist.github.com/wassname/1393c4a57cfcbf03641dbc31886123b8
"""
import unicodedata
import string
valid_filename_chars = "-_.() %s%s" % (string.ascii_letters, string.digits)
char_limit = 255
def clean_filename(filename, whitelist=valid_filename_chars, replace=' '):

How to get firmware onto mutable modules

I had the best luck with the Black Magic Probe and gdb.

Install compiler

First install the arm compiler:

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa