This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import os | |
| import json | |
| from csv import DictReader | |
| files_to_parse = sys.argv[1:] | |
| for f in files_to_parse: | |
| print("Reading cases from %s" % f) | |
| json_filename = "%s.json" % os.path.splitext(f)[0] | |
| cases = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #Read case/slide titles from titles.txt (one case/title per line) | |
| titles=() | |
| while read line | |
| do | |
| # echo $line | |
| titles+=("$line") | |
| done < titles.txt | |
| # echo ${titles[@]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Find files from specific data group | |
| SELECT [ImageId],[CompressedFileLocation] | |
| FROM [Aperio].[dbo].[Image] | |
| WHERE [DataGroupID]=162 | |
| -- Update file location of given image | |
| UPDATE [Aperio].[dbo].[Image] | |
| SET [CompressedFileLocation]='\\gleason\images2\Projects\Giubellino\D17-1452-CompoundSpitzNevus.svs' | |
| WHERE [ImageId]=76585 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for %%f in (*.svs) do ( | |
| echo %%~nf | |
| vips openslideload --associated thumbnail "%%~nf.svs" "%%~nf.jpg" | |
| vipsthumbnail -s 256 "%%~nf.jpg" | |
| del "%%~nf.jpg" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script requires libvips-tools to be installed | |
| trackingcode="UA-39453866-3" | |
| imagehost="web-basic.oit.umn.edu" | |
| tracking_script="<script>(function(e,t,n,r,i,s,o){e[\"GoogleAnalyticsObject\"]=i;e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},e[i].l=1*new Date;s=t.createElement(n),o=t.getElementsByTagName(n)[0];s.async=1;s.src=r;o.parentNode.insertBefore(s,o)})(window,document,\"script\",\"//www.google-analytics.com/analytics.js\",\"ga\");ga(\"create\",\"$trackingcode\",\"umn.edu\");ga(\"send\",\"pageview\")</script>" | |
| indextitle=${PWD##*/} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT TOP 100 * | |
| FROM [Aperio].[dbo].[Specimen] Specimen | |
| INNER JOIN [Aperio].[dbo].[Slide] Slide | |
| ON Slide.ParentId=Specimen.Id | |
| INNER JOIN [Aperio].[dbo].[Image] Image | |
| ON Image.ParentId=Slide.Id | |
| WHERE Specimen.ColumnPublishToWeb2 = 'TRUE' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:16.04 | |
| MAINTAINER Brian Dunnette <[email protected]> | |
| RUN \ | |
| # Install dependencies | |
| sed "s/archive.ubuntu.com/local-mirror.cs.umn.edu/g; \ | |
| s/security.ubuntu.com/local-mirror.cs.umn.edu/g" \ | |
| -i /etc/apt/sources.list && \ | |
| apt-get update && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # cd to your Loopback project directory and run: | |
| # curl https://gist.githubusercontent.com/bdunnette/a1854b4f0c5010cb7a539be5f2d63ef8/raw/add-gulp.sh | sh | |
| REPO=https://gist.githubusercontent.com/bdunnette/a1854b4f0c5010cb7a539be5f2d63ef8/raw | |
| echo client/vendor >> .gitignore | |
| mv server/boot/root.js server/boot/root.js.bak | |
| sed 's/\("files\".*\:.*{\)/&\"loopback\#static\"\:\{\"params\"\:\"\$\!\.\.\/client\"\}/' -i server/middleware.json | |
| sed 's/\("compression\".*\:.*{\)/&\"enabled\":false/' -i server/middleware.json | |
| mkdir -p client/js client/css server/fixtures | |
| touch client/css/app.css server/fixtures/.gitkeep | |
| wget -O gulpfile.js $REPO/gulpfile.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # checkout, compile & install | |
| git clone https://github.com/facebook/watchman.git | |
| cd watchman/ | |
| # git checkout v4.7.0 | |
| sudo apt install -y autoconf automake build-essential python-dev | |
| ./autogen.sh | |
| ./configure | |
| make | |
| sudo make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "Using $1 for output..." | |
| for s in *.pdf | |
| do | |
| i="${s%.*}" | |
| printf "# $i\n\n" >> $1 | |
| echo $s | |
| pdftotext $s - >> $1 | |
| done |