I hereby claim:
- I am jesserobertson on github.
- I am jessrobertson (https://keybase.io/jessrobertson) on keybase.
- I have a public key ASD_4QhDJ-LfxNAGMMvnfQlBOtfqGNV4xGWGZ_w2TfOUTgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # file: hashicorp.sh | |
| # author: Jess Robertson, CSIRO Mineral Resources | |
| # date: March 2017 | |
| # | |
| # description: Download and install Hashicorp products from their | |
| # release server. Note that this assumes that Hashicorp doesn't change | |
| # their release URLS. | |
| # | |
| # Requires gnupg and openssl (see `install_dependencies`) |
| import logging, sys | |
| def log_to_notebook(module=None, level='INFO'): | |
| """ | |
| Sets up logging to stdout so we can capture it in the notebook | |
| Parameters: | |
| module - the module to log from. To log only certain submodules | |
| do something like `module='placer.stream'`. If None, default is | |
| to get the root logger which logs everything. |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Action": [ | |
| "ses:SendEmail", | |
| "ses:SendRawEmail" | |
| ], | |
| "Effect": "Allow", | |
| "Resource": "*" |
| data "template_file" "batch_policy_template" { | |
| template = "${file("${path.module}/batch_ecs_instance_policy.json.tpl")}" | |
| vars = { | |
| bucket_name = "${module.email_storage.name}" | |
| } | |
| } | |
| resource "aws_iam_role_policy" "test_policy" { | |
| name = "test_policy" | |
| role = "${aws_iam_role.aws_batch_service_role.id}" | |
| policy = "${data.template_file.batch_policy_template.rendered}" |
| import requests | |
| from lxml import etree | |
| def hit(url, params): | |
| "Hit a URL, parse the xml" | |
| response = requests.get(url, params=params) | |
| print(response.url) | |
| if response.ok: | |
| print(response.headers) | |
| return etree.fromstring(response.content) |
| #!/bin/bash | |
| BITLOCKER_PARTITION="${1}" | |
| BITLOCKER_PASSWORD="${2}" | |
| function usage() { | |
| echo "$(basename ${0}) <partition> <password>" | |
| echo "Unlocks and mounts a bitlocker partition as read-only" | |
| } | |
| if [ -z "${BITLOCKER_PARTITION}" ] |
An official formula for dynamodb-local existed, but was removed since dynamodb-local is not open source and stopped having versions.
Now its available either through a Cask, or by installing it as a formula from an unofficial tap (third party repo).
When installed as a cask dynamodb-local cannot be exposed as a service, so here we are installing it as a formula. It has been forked from rjcoelho/homebrew-boneyard and updated to be a head-only formula, to avoid checksum erros on new versions. It is available at dgoguerra/homebrew-boneyard.
# dynamodb-local depends on Java 6+
| """ file: mase.py | |
| author: Jess Robertson, [email protected] | |
| date: Thursday, 31 January 2019 | |
| description: MASE scoring for Glencore competition (https://unearthed.solutions/u/competitions/turn-zinc) | |
| """ | |
| import numpy as np | |
| def _mase_numeric_only(predicted, measured): |
| import pathlib | |
| from itertools import product | |
| from tqdm import tqdm | |
| import rasterio | |
| import geosoft | |
| import geosoft.gxpy.gx as gx | |
| import geosoft.gxpy.coordinate_system as gxcs | |
| import geosoft.gxpy.grid as gxgrid |