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
| /* | |
| make sure to | |
| homestar install iotdb-transport-mqtt | |
| homestar install iotdb-transport-iotdb | |
| (npm install will probably work too) | |
| Further reading on transporter | |
| https://homestar.io/about/transporters |
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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "iot:Connect" | |
| ], | |
| "Resource": [ | |
| "*" |
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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "iot:Connect" | |
| ], | |
| "Resource": [ | |
| "*" |
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
| # -*- coding: utf-8 -*- | |
| # | |
| # numbers.py | |
| # | |
| # David Janes | |
| # 2016-10-21 | |
| # | |
| # Program to solve (more generally): | |
| # | |
| # Take the digits 5, 4, 3, 2 and 1, in that order. |
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
| -31 = ( 5 ) - ( 4 * 3 ) * ( 2 + 1 ) | |
| ( 5 ) - ( 4 ) * ( 3 ) * ( 2 + 1 ) | |
| -23 = ( 5 ) - ( 4 ) * ( 3 * 2 + 1 ) | |
| -21 = ( 5 - 4 * 3 ) * ( 2 + 1 ) | |
| -20 = ( 5 - 4 * 3 * 2 - 1 ) | |
| ( 5 ) - ( 4 * 3 * 2 + 1 ) | |
| ( 5 - 4 * 3 * 2 ) - ( 1 ) | |
| ( 5 ) - ( 4 * 3 * 2 ) - ( 1 ) | |
| ( 5 ) - ( 4 ) * ( 3 * 2 ) - ( 1 ) | |
| ( 5 ) - ( 4 * 3 ) * ( 2 ) - ( 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
| const _ = require("iotdb-helpers") | |
| const Board = _size => { | |
| const self = Object.assign({}) | |
| let _d = {} | |
| const _key = (x, y) => `${x}//${y}` | |
| const _set = (d, x, y, v) => d[_key(x,y)] = v | |
| const _get = (d, x, y) => d[_key(x,y)] || 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
| const unirest = require('unirest') | |
| const query = ` | |
| SELECT * | |
| WHERE | |
| { | |
| ?id | |
| rdf:type <http://schema.org/City>; | |
| rdf:type ?type; | |
| rdfs:label ?city; | |
| dbo:country ?country. |
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
| SELECT * | |
| WHERE | |
| { | |
| ?id wdt:P31 wd:Q740752; | |
| optional { ?id rdfs:label ?name } | |
| optional { ?id wdt:P154 ?logo } | |
| FILTER(lang(?name) = 'en') | |
| } |
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
| { | |
| "@context": [ | |
| "https://www.w3.org/2018/credentials/v1", | |
| "https://w3id.org/pathogen/v1", | |
| "https://w3id.org/security/bbs/v1" | |
| ], | |
| "id": "http://example.org/credentials/", | |
| "type": [ | |
| "VerifiableCredential" | |
| ], |
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 base64 | |
| from cryptography.hazmat.backends import default_backend | |
| from cryptography.hazmat.primitives.asymmetric import rsa | |
| from cryptography.hazmat.primitives import serialization | |
| from cryptography.hazmat.primitives import hashes | |
| from cryptography.hazmat.primitives.asymmetric import padding | |
| def utf8(s: bytes): | |
| return str(s, 'utf-8') |