Skip to content

Instantly share code, notes, and snippets.

@bdunnette
bdunnette / process-svs.sh
Last active November 20, 2020 06:30
Process Aperio SVS files into web tiles (with Leaflet-based viewer)
#!/bin/bash
# Copyright (c) 2014 Regents of the University of Minnesota
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
tar -cf - . | ssh [email protected] "tar -xf - -C /www/basic/ahc/labmed/slides.pathology.umn.edu/htdocs"
import sys
import cmislib
cmisClient = cmislib.CmisClient('https://lmp-alfresco.ahc.umn.edu/alfresco/cmisatom', sys.argv[1], sys.argv[2])
print cmisClient
repo = cmisClient.getRepository('48ebc2be-3a2c-4856-8e68-877ec40d9a20')
print repo.id
imaging = repo.getObjectByPath("/Sites/lmp-imaging/documentLibrary/Grosslab")
print imaging
new_folder = imaging.createFolder(sys.argv[3])
<html>
<head>
<title>Google Fusion Tables API Example</title>
</head>
<body>
<div id="content"></div>
<script>
function handler(response) {
for (var i = 0; i < response.items.length; i++) {
var item = response.items[i];
// hacked together aperio support
(function( $ ){
/**
* A client implementation of the Aperio ImageServer Format
*
* @class
* @extends OpenSeadragon.TileSource
* @param {Number|Object} width - the pixel width of the image or the idiomatic
#!/usr/bin/python
#
# Delete the label image from an Aperio SVS file.
#
# Copyright (c) 2012-2013 Carnegie Mellon University
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, version 2.1.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<meta name="viewport" content="width=620">
<title>HTML5 Demo: geolocation</title>
<link rel="stylesheet" href="css/html5demos.css">
<script src="js/h5utils.js"></script></head>
<body>
<section id="wrapper">
import sys
import os
import os.path
import zipfile
from lxml import etree
from lxml import objectify
tempdir = 'temp'
docfile = zipfile.ZipFile(sys.argv[1])
docfile.extractall(tempdir)
#!/usr/bin/env python
import hashlib
import os
import sys
import csv
# Set the directory you want to start from
rootDir = sys.argv[1]
BLOCKSIZE = 65536
csv_filename = "checksums.csv"
import feedparser
import urllib
feed = feedparser.parse('http://ws.audioscrobbler.com/2.0/user/lazymofo/podcast.rss')
for item in feed.entries:
item_url = item.links[0].href
print item_url
file = urllib.urlretrieve(item_url)