export token="<token-goes-here>"
dd if=/dev/urandom of=200MB-file.txt bs=1M count=200
import os | |
import time | |
from typing import List | |
from pathlib import Path | |
import parsl | |
from parsl.app.app import python_app, bash_app | |
from parsl.executors import ThreadPoolExecutor | |
from parsl.executors import HighThroughputExecutor | |
from parsl.config import Config | |
from parsl.data_provider.files import File |
import fiona | |
from pprint import pprint | |
from shapely.geometry import Point, Polygon | |
from descartes import PolygonPatch | |
import matplotlib.pyplot as plt | |
from pathlib import Path | |
data_folder = os.path.join( | |
Path.home(), | |
"Documents", |
#!/usr/bin/env python3 | |
from d1_client.mnclient_2_0 import MemberNodeClient_2_0 | |
import os | |
# Log in and get a token from https://search.dataone.org | |
# (or https://search-stage.test.dataone.org if using a test server) | |
# and set the token as a shell variable | |
token = os.getenv("token") |
package org.dataone.client.javafx; | |
import javafx.application.Application; | |
import javafx.scene.Scene; | |
import javafx.scene.layout.VBox; | |
import javafx.scene.web.WebView; | |
import javafx.stage.Stage; | |
import java.io.BufferedReader; | |
import java.io.IOException; |
#!/bin/env python3 | |
from d1_client.mnclient_2_0 import MemberNodeClient_2_0 | |
from d1_common.types import dataoneTypes | |
import uuid | |
import hashlib | |
import io | |
# Log in and get a token from https://knb.ecoinformatics.org | |
# or https://dev.nceas.ucsb.edu if using a a test server |
#!/bin/env python3 | |
from d1_client.cnclient_2_0 import CoordinatingNodeClient_2_0 | |
from d1_common.types import dataoneTypes | |
import os | |
# Set up the CN client with a token | |
token = os.environ["token"] | |
headers = {"Authorization": "Bearer " + token} | |
base_url = "https://cn.dataone.org/cn" | |
cn = CoordinatingNodeClient_2_0(base_url, headers = headers) |
Tier | Version | REST | Function |
---|---|---|---|
1 | 1.0 | GET /monitor/ping | MNCore.ping() |
1 | 1.0, 2.0 | GET /log?[fromDate={fromDate}][&toDate={toDate}][&event={event}][&idFilter={idFilter}][&start={start}][&count={count}] | MNCore.getLogRecords() |
1 | 1.0 | GET / and GET /node | MNCore.getCapabilities() |
1 | 1.0 | GET /object/{id} | MNRead.get() |
1 | 1.0 | GET /meta/{id} | MNRead.getSystemMetadata() |
1 | 1.0 | HEAD /object/{id} | MNRead.describe() |
1 | 1.0 | GET /checksum/{pid}[?checksumAlgorithm={checksumAlgorithm}] | MNRead.getChecksum() |
1 | 1.0 | GET /object[?fromDate={fromDate}&toDate={toDate}&identifier={identifier}&formatId={formatId}&replicaStatus={replicaStatus}&start={start}&count={count}] | MNRead.listObjects() |
/** | |
* | |
*/ | |
package org.dataone.tests; | |
import com.hazelcast.client.ClientConfig; | |
import com.hazelcast.client.HazelcastClient; | |
import com.hazelcast.config.GroupConfig; | |
import com.hazelcast.core.IQueue; |
library(xml2) | |
library(httr) | |
# Get the XML from the CN | |
nodes_xml <- GET("https://cn.dataone.org/cn/v2/node") | |
# Build an xml document object | |
node_document <- read_xml(nodes_xml) | |
# Filter out CNs and dedicated replica MNs |