Skip to content

Instantly share code, notes, and snippets.

View pansapiens's full-sized avatar

Andrew Perry pansapiens

  • Melbourne, Australia
View GitHub Profile
@supersonictw
supersonictw / ollama-export.sh
Last active November 30, 2024 09:22
Ollama Model Export Script
#!/bin/bash
# Ollama Model Export Script
# Usage: bash ollama-export.sh vicuna:7b
# SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR)
# https://gist.github.com/supersonictw/f6cf5e599377132fe5e180b3d495c553
# Interrupt if any error occurred
set -e
# Declare
@ckandoth
ckandoth / install_nextflow_singularity.md
Last active October 30, 2024 22:08
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
@xlfe
xlfe / export.py
Created June 30, 2019 05:56
Export from Google App Engine Datastore Backup LevelDB format to JSON flat file
import sys, os, json
import datetime
sys.path.append(os.path.expanduser('~/google-cloud-sdk/platform/google_appengine/'))
from google.appengine.api.files import records
from google.appengine.datastore import entity_pb
from google.appengine.api import datastore
def myconverter(o):
if isinstance(o, datetime.datetime):
@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
@mfansler
mfansler / index-gtf.sh
Last active July 31, 2024 01:51
GTF file compressed indexing for IGV compatibility
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo -e "Incorrect number of parameters! Usage:\n index-gtf.sh <file.gtf(.gz)>" >&2
exit 1
fi
gtf="$1"
if [[ $gtf =~ \.gz$ ]]; 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 September 24, 2024 10:14
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
@mrw34
mrw34 / postgres.sh
Last active October 16, 2024 22:51
Enabling SSL for PostgreSQL in Docker
#!/bin/bash
set -euo pipefail
openssl req -new -text -passout pass:abcd -subj /CN=localhost -out server.req -keyout privkey.pem
openssl rsa -in privkey.pem -passin pass:abcd -out server.key
openssl req -x509 -in server.req -text -key server.key -out server.crt
chmod 600 server.key
test $(uname -s) = Linux && chown 70 server.key
docker run -d --name postgres -e POSTGRES_HOST_AUTH_METHOD=trust -v "$(pwd)/server.crt:/var/lib/postgresql/server.crt:ro" -v "$(pwd)/server.key:/var/lib/postgresql/server.key:ro" postgres:12-alpine -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key