Skip to content

Instantly share code, notes, and snippets.

View veggiesaurus's full-sized avatar

Angus Comrie veggiesaurus

View GitHub Profile
@veggiesaurus
veggiesaurus / CMakeLists-imageanalysis.txt
Last active August 13, 2019 09:13
Modified CMake config for building imageanalysis with minimal dependencies
# CASA - Common Astronomy Software Applications
# Copyright (C) 2010 by ESO (in the framework of the ALMA collaboration)
# Copyright (C) 2010-2013 Associated Universities, Inc. Washington DC, USA.
#
# This file is part of CASA.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@veggiesaurus
veggiesaurus / idavie_mapping_schema.json
Created November 8, 2020 19:31
Mapping schema for iDaVIE particles
{
"$schema": "http://json-schema.org/draft-06/schema#",
"definitions": {
"ColorMap": {
"enum": [
"Accent",
"Afmhot",
"Autumn",
"Binary",
"Blues",
@veggiesaurus
veggiesaurus / test_s3.ts
Created September 12, 2022 12:00
Benchmarking spectral/spatial profile reads using S3 signed URLs
import DataView from "https://deno.land/x/[email protected]/_DataView.js";
async function getPartialFile(url: string, byteOffset: number = 0, byteLength: number = 4096) {
try {
const headers = new Headers();
headers.append("Range", `bytes=${byteOffset}-${byteOffset+byteLength - 1}`);
const res = await fetch(url, { mode: "no-cors", headers });
return await res.blob();
} catch (err) {
console.log(err);