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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <resource xsi:schemaLocation="http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd" xmlns="http://datacite.org/schema/kernel-3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
| <identifier identifierType="DOI">filler</identifier> | |
| <creators> | |
| <creator> | |
| <creatorName>Researcher</creatorName> | |
| </creator> | |
| <creator> | |
| <creatorName>Another Researcher</creatorName> | |
| </creator> |
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
| #!/usr/bin/python | |
| import base64, json, sys | |
| if len(sys.argv) != 2: | |
| print "args: sonicwall-export-file.exp" | |
| exit(1) | |
| with open(sys.argv[1], "r") as f: | |
| data = base64.b64decode(f.read()).split("&") |
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
| #!/usr/bin/env python | |
| import json, os | |
| from novaclient.v1_1 import client | |
| auth_url = "https://keystone.rc.nectar.org.au:5000/v2.0/" | |
| nectar = client.Client(username = os.environ["OS_USERNAME"], api_key = os.environ["OS_PASSWORD"], project_id = os.environ["OS_TENANT_NAME"], auth_url = auth_url) |
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
| #!/usr/bin/env python | |
| import sys, os, time, socket, argparse, random, urllib2 | |
| from novaclient.v1_1 import client | |
| default_image = urllib2.urlopen("https://swift.rc.nectar.org.au:8888/v1/AUTH_6f3b184bcf194672a55d258620e732db/deploy/nectar-zfs-image").read().strip() | |
| default_setup_script = None | |
| default_security_group = "default" | |
| default_auth_url = "https://keystone.rc.nectar.org.au:5000/v2.0/" |
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 java.util.concurrent.Callable; | |
| import javax.ws.rs.WebApplicationException; | |
| public class Wrap { | |
| public static <T> T webApplicationException(Callable<T> callable) { | |
| try { | |
| return callable.call(); | |
| } catch (Exception e) { throw new WebApplicationException(e); } | |
| } |
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
| <h3 id="image-scaling-example">image scaling example</h3> | |
| <p><img src="https://www.ersa.edu.au/sites/default/files/danland_logo.png" alt="ersa logo" style="max-width: 200px; height: auto;" /></p> |
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
| #!/usr/bin/python | |
| import urllib, xml.etree.ElementTree as et | |
| ns = { "pingdom" : "http://www.pingdom.com/ns/PingdomRSSNamespace" } | |
| rss = et.fromstring(urllib.urlopen("https://www.pingdom.com/rss/probe_servers.xml").read()) | |
| for ip in rss.iterfind("channel/item/pingdom:ip", namespaces = ns): | |
| print ip.text |
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
| #!/usr/bin/python | |
| import subprocess, time, re | |
| devices = [ "vda", "vdb" ] | |
| space = re.compile(" +") | |
| cmd = [ "iostat", "-dky" ] | |
| cmd.extend(devices) | |
| cmd.append("1") |
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
| #!/usr/bin/python | |
| import sys, socket, paramiko | |
| if len(sys.argv) < 2: | |
| print "args: host ..." | |
| exit(1) | |
| for host in sys.argv[1:]: | |
| s = socket.socket() |
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
| def prettify(x): | |
| return json.dumps(x, sort_keys = True, indent = 2, separators = (",", ": ")) |