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 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); |
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
{ | |
"$schema": "http://json-schema.org/draft-06/schema#", | |
"definitions": { | |
"ColorMap": { | |
"enum": [ | |
"Accent", | |
"Afmhot", | |
"Autumn", | |
"Binary", | |
"Blues", |
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
# 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. |
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
var screenWidth = 3840; | |
var screenHeight = 2160; | |
var taskbarHeight = 68; | |
var bezelX = 50; | |
var bezelY = 45; | |
function geomLeft() { | |
return { x: 0, y: 0, width: screenWidth, height: 2 * screenHeight - taskbarHeight + bezelY }; | |
} |
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
public render() { | |
const headerHeight = 25; | |
const titleClass = this.props.isSelected ? "floating-header selected" : "floating-header"; | |
const widgetConfig = this.props.widgetConfig; | |
return ( | |
<Rnd | |
className="floating-widget" | |
style={{zIndex: this.props.zIndex}} | |
default={{ | |
// Shift by 5 pixels to compensate for 5px CSS margins |
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
cmake_minimum_required(VERSION 3.0) | |
project(hdf5_rotate) | |
set(CMAKE_CXX_STANDARD 11) | |
FIND_PACKAGE(HDF5) | |
INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIR}) | |
find_package(OpenMP) | |
if (OPENMP_FOUND) | |
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") |
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 | |
trap "kill 0" SIGINT | |
SERVER_NAMES_SA=("Interworks (Cape Town)" "SAIX (Cape Town)" "MTN SA (Cape Town)" "MTN SA (Port Elizabeth)" "Vox Telecom (Johannesburg)" "Seacom (Johannesburg)") | |
SERVERS_SA=(14749 1270 2962 16107 7254 5889) | |
SERVER_NAMES_INT=("Vodafone UK (London)" "SEACOM (Amsterdam)" "Orange (Barcelona)" "Cybera (Calgary)" "Comcast (Richmond)" "QTS (Hong Kong)") | |
SERVERS_INT=(2789 16534 4374 4637 1770 12990) | |
echo "South African server tests:" | |
echo "===========================" |
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
/*! | |
* Chart.js | |
* http://chartjs.org/ | |
* Version: 2.7.2 | |
* | |
* Copyright 2018 Chart.js Contributors | |
* Released under the MIT license | |
* https://github.com/chartjs/Chart.js/blob/master/LICENSE.md | |
*/ | |
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}}(function(){return function r(o,s,l){function u(n,t){if(!s[n]){if(!o[n]){var e="function"==typeof require&&require;if(!t&&e)return e(n,!0);if(d)return d(n,!0);var i=new Error("Cannot find module '"+n+"'");throw i.code="MODULE_NOT_FOUND",i}var a=s[n]={exports:{}};o[n][0].call(a.exports,function(t){var e=o[n][1][t];return u(e||t)},a,a.exports,r,o,s,l)}return s[n].exports}for(var d="function"==typeof require&&require,t=0;t<l.length;t++)u(l[t]);return u}({1:[function(t,e,n){var r=t(5);function i(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3})$/i |
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 IPython | |
def getViewerURL(file, subdir, cmap, range, imageWidth): | |
serverUrl = "https://viewer.idia.ac.za?" | |
if (len(subdir)): | |
serverUrl += "subdir={}&".format(subdir) | |
if (len(file)): | |
serverUrl += "file={}&".format(file) | |
if (len(cmap)): | |
serverUrl += "cmap={}&".format(cmap) |
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
cmake_minimum_required(VERSION 3.0) | |
project(CartaDummyCmake) # Your project name | |
set(CMAKE_CXX_STANDARD 11) # This is equal to QMAKE_CXX_FLAGS += -std=c++0x | |
# Find includes in corresponding build directories | |
set(CMAKE_INCLUDE_CURRENT_DIR ON) | |
# Instruct CMake to run moc automatically when needed. | |
set(CMAKE_AUTOMOC OFF) | |
# Instruct CMake to run uic automatically when needed. |
NewerOlder