a helpful primer for users sick of git's poorly-named commands
I've used Git since 2011, and this is the stuff that I've always had to Google to remember. I hope it helps you not hate Git so much.
import coremltools | |
# Load a Core ML model | |
coreml_model = coremltools.utils.load_spec('SentimentPolarity.mlmodel') | |
# Convert the Core ML model into ONNX | |
onnx_model = onnxmltools.convert_coreml(coreml_model, 'Sentiment Polarity') | |
# Save as protobuf | |
onnxmltools.utils.save_model(onnx_model, 'SentimentPolarity.onnx') |
'use strict'; | |
// Simple way to download the model and insert it into the database. | |
// Normally would use a tool like mlcp to do this. This only needs to be done once | |
declareUpdate() | |
//downloads the BiDAF model | |
let model = fn.subsequence( | |
xdmp.httpGet("https://onnxzoo.blob.core.windows.net/models/opset_9/bidaf/bidaf.onnx") | |
, 2, 1) | |
//inserts the BiDAF model into the database at the URI /onnx/model/bidaf.onnx |
'use strict'; | |
// Fluent interface functions | |
function document(root) { | |
return function(b) { | |
return (b || new NodeBuilder()).addDocument(root); | |
} | |
} |
#!/bin/sh | |
############################################################################# | |
## Usage: cfvalidate file.template [ file ...] | |
############################################################################## | |
## Convenience wrapper script for aws cli 'cloudformation validate-template' | |
## which requires a inline, file URL or S3 url for templates to validate | |
## This script takes simple, absolute or relative filenames and validate them | |
## using the AWS API | |
## https://aws.amazon.com/cli/ | |
## |
# -*- coding: utf-8 -*- | |
"""A simple tool for making command line tools in python.""" | |
import os | |
import sys | |
class CLI(object): |
# -*- coding: utf-8 -*- | |
"""A simple tool to document how to control AWS resources. | |
AWS AUTHENTICATION | |
------------------- | |
In order to run any of the code below, you need a profile with AWS credentials | |
set up on your computer. It's very easy to do this. Google how to configure | |
your profile with boto3, or visit the docs: |
This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].
First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as
#!/usr/bin/env python | |
# Simple [boto3](https://github.com/boto/boto3) based EC2 manipulation tool | |
# | |
# To start an instance, create a yaml file with the following format: | |
# | |
# frankfurt: | |
# - subnet-azb: | |
# - type: t2.micro | |
# image: image-tagname |
Open $ vim /etc/default/grub
then add elevator=noop
next to GRUB_CMDLINE_LINUX_DEFAULT
. Run $ update-grub
and $ cat /sys/block/sda/queue/scheduler
to be sure that noop is being used:
$ vim /etc/default/grub
$ update-grub
$ cat /sys/block/sda/queue/scheduler
[noop] deadline cfq