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
#ifndef XTCONCATENATE_HPP | |
#define XTCONCATENATE_HPP | |
#include <cstddef> | |
#include <stdexcept> | |
#include <vector> | |
#include <xtensor/xarray.hpp> | |
template <typename S> | |
struct ShapeIndex |
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 a given latitude, longitude, and zoom, returns the URL to an image for that tile. | |
function tileIndex(latitude, longitude, zoom){ | |
if ((latitude === undefined) || (longitude === undefined) || (zoom === undefined)) | |
throw("Arguments mising in tileIndex"); | |
var lat_rad = latitude / 180 * Math.PI; | |
var n = 1 << zoom; | |
var xtile = n * ((longitude + 180) / 360); | |
var ytile = n * (1 - (Math.log (Math.tan (lat_rad) + 1/Math.cos (lat_rad)) / Math.PI)) / 2; |
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 nginx:alpine AS builder | |
# nginx:alpine contains NGINX_VERSION environment variable, like so: | |
# ENV NGINX_VERSION 1.15.0 | |
# Our NCHAN version | |
ENV NCHAN_VERSION 1.1.15 | |
# Download sources | |
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \ |
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
:: | |
:: This script installs wormhole (https://github.com/warner/magic-wormhole) and | |
:: its prerequisites. Run this as an administrator. | |
:: | |
:: Install chocolatey. | |
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
:: Install Python 3. Python3.8 has removed time.clock which breaks autobahn on which wormhole relies | |
choco install -y python3 --version=3.7 --allow-downgrade |