Skip to content

Instantly share code, notes, and snippets.

@DanaCase
DanaCase / AperioToQuPath.groovy
Last active November 21, 2024 15:01
Convert Exported Aperio Image Scope Annotations to QuPath Annotations
import qupath.lib.scripting.QP
import qupath.lib.geom.Point2
import qupath.lib.roi.PolygonROI
import qupath.lib.objects.PathAnnotationObject
import qupath.lib.images.servers.ImageServer
//Aperio Image Scope displays images in a different orientation
def rotated = true
@eddiewebb
eddiewebb / readme.md
Last active May 12, 2025 09:35
Hugo JS Searching with Fuse.js
@tomdyson
tomdyson / wagtail-on-zappa.md
Last active February 18, 2025 15:12
Wagtail on AWS Lambda, with Zappa

Wagtail on AWS Lambda, with Zappa

Install Wagtail and Zappa, and create an empty site:

pip install wagtail zappa zappa-django-utils
pip install pip==9.0.3 # see https://github.com/Miserlou/Zappa/issues/1471
wagtail start foo
@radzhome
radzhome / json_schema_to_django_model.py
Last active January 9, 2025 13:11
Converts json schema to django models.py
"""
Json Schema to Django Model
"""
import json
import argparse
import logging
import os
def determine_model_name(model_id=None, filename=None):
@nealtodd
nealtodd / wagtail-on-zappa.md
Last active February 18, 2025 15:13 — forked from tomdyson/wagtail-on-zappa.md
Wagtail on AWS Lambda, with Zappa

Wagtail on AWS Lambda, with Zappa

Aim

A demonstration of Wagtail running on AWS Lambda + API Gateway using Zappa for deployment.

This is not a Production solution, it is an insecure setup focusing solely on getting Wagtail to run on Lambda in the simplest way possible (and at zero cost if it is not used beyond this demonstration (or close to zero depending on how much you exercise the S3 bucket)).

caveat emptor!

import qupath.lib.scripting.QP
import qupath.lib.geom.Point2
import qupath.lib.roi.PolygonROI
import qupath.lib.objects.PathAnnotationObject
import qupath.lib.images.servers.ImageServer
//Aperio Image Scope displays images in a different orientation
def rotated = false
@deansublett
deansublett / rec_system_movies.ipynb
Created June 5, 2019 17:13
rec_system_movies.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ThomasLeister
ThomasLeister / auto-start-tmux-ssh.txt
Last active March 5, 2025 09:44
Put this into your .bashrc to auto-start a tmux session after SSH login
Put these lines into your server's .bashrc:
##
## TMUX auto attach
##
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then # if this is an SSH session
if which tmux >/dev/null 2>&1; then # check if tmux is installed
if [[ -z "$TMUX" ]] ;then # do not allow "tmux in tmux"
ID="$( tmux ls | grep -vm1 attached | cut -d: -f1 )" # get the id of a deattached session
if [[ -z "$ID" ]] ;then # if not available create a new one
tmux new-session