First set up a project directory to hold your work:
cd ~/projects
mkdir mapnik-ios-test
cd mapnik-ios-test
public struct Person { | |
public var firstName: String | |
public var middleName: String? | |
public var lastName: String | |
public var ageInYears: Int | |
public var fullName: String { | |
return [firstName, middleName, lastName].flatMap{ $0 }.joinWithSeparator(" ") | |
} | |
} |
import boto3 | |
import logging | |
import json | |
import re | |
import uuid | |
import argparse | |
''' | |
This script enables the IoT shadow syncing for your AWS Greengrass Core. |
You want to set up your Raspberry Pi without monitor and keyboard. This is sometimes called "headless". Don't worry, you'll keep your head if you follow these step-by-step instructions (however, see license and disclaimer below). We will install the Raspbian operating system and configure the Pi WiFi from a Terminal session on a Mac.
You have:
{ | |
"Comment": "An AWS Step Function State Machine to train, build and deploy an Amazon SageMaker model endpoint", | |
"StartAt": "Create Training Job", | |
"States": { | |
"Create Training Job": { | |
"Type": "Task", | |
"Resource": "arn:aws:states:::sagemaker:createTrainingJob.sync", | |
"Parameters": { | |
"TrainingJobName.$": "$$.Execution.Name", | |
"ResourceConfig": { |
var AWS = require('aws-sdk'); | |
exports.handler = function(event, context) { | |
var cloudsearchdomain = new AWS.CloudSearchDomain({endpoint: 'doc-dev-cinch-accounts-ltmqj5gt5mjb5hg5eyqaf2v5hu.us-east-1.cloudsearch.amazonaws.com'}); | |
var documents = event.Records.map(function(record) { | |
var data = {id : record.dynamodb.Keys.id.S}; | |
if (record.eventName === 'REMOVE') { | |
data.type = 'delete' |
-- | |
-- This will register the "planet" table within your AWS account | |
-- | |
CREATE EXTERNAL TABLE planet ( | |
id BIGINT, | |
type STRING, | |
tags MAP<STRING,STRING>, | |
lat DECIMAL(9,7), | |
lon DECIMAL(10,7), | |
nds ARRAY<STRUCT<ref: BIGINT>>, |
import boto3 | |
import requests | |
authentication = {"USER": "", "PASSWORD": ""} | |
payload = {"query": "some query"} | |
session = requests.Session() | |
response = session.post("URL", | |
data=payload, | |
auth=(authentication["USER"], |
// Create an `Observable` of Optional<Int> | |
let values: Observable<Int?> = [1, 2, .None, 3, .None, 4, 5].toObservable() | |
// Method 1: using a free function | |
// Requires passing the function to `flatMap` | |
func ignoreNil<A>(x: A?) -> Observable<A> { | |
return x.map { Observable.just($0) } ?? Observable.empty() | |
} |
#!/usr/bin/python3 | |
#-*- coding: utf-8 -*- | |
import logging | |
import timeit | |
import traceback | |
import time | |
import gi | |
gi.require_version('Gst', '1.0') |