This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>MQTT Topic tree visualisation experiment</title> | |
<script src="https://d3js.org/d3.v6.min.js"></script> | |
<script src="https://unpkg.com/mqtt/dist/mqtt.min.js"></script> | |
<style> | |
.node-label { | |
max-width: 15px; /* You can adjust this value as needed */ |
This file contains 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 requests | |
import requests_cache | |
import math | |
import ephem | |
import os | |
import json | |
import paho.mqtt.client as mqtt | |
import datetime | |
observer = ephem.Observer() |
This file contains 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
library(jsonlite) | |
library(dplyr) | |
require(ggplot2) | |
library(data.table) | |
library(lubridate) | |
library(dplyr) | |
library(tidyr) | |
library(reshape2) | |
library(data.table) |
This file contains 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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"id": "235a092e", | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [], |
This file contains 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
Assumptions: | |
All interactions with the service is over SMS | |
There is no other interaction with any other users other than the updated temperatures or names | |
No phone numbers will be sent over SMS _ever_ | |
All data sent over the service is low-stakes, low security information (?!) - names, temperatures and associations - that people would be fine publicly sharing if it came to it (because it is, to some extent, public as described) | |
Basic rules: | |
A USER is a phone number, desired name, and their most recent UPDATE | |
An UPDATE is the temperature and time a USER took it | |
A USER creates an UPDATE by sending their temperature to the service |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
# <bitbar.title>Pi-hole status</bitbar.title> | |
# <bitbar.version>v3.1</bitbar.version> | |
# <bitbar.author>Felipe Martin</bitbar.author> | |
# <bitbar.author.github>fmartingr</bitbar.author.github> | |
# <bitbar.author>Siim Ots</bitbar.author> | |
# <bitbar.author.github>siimots</bitbar.author.github> | |
# <bitbar.author>Ryan Bateman</bitbar.author> | |
# <bitbar.author.github>ryanbateman</bitbar.author.github> |
This file contains 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
require("ggplot2") | |
require("viridis") | |
require("colorBrewer") | |
require("randomcoloR") | |
trees <- read.csv("trees.csv") | |
trees$health <- factor(trees$health) | |
trees$spc_common <- factor(trees$spc_common) | |
colours <- sample(grDevices::colors()[grep('gr(a|e)y', grDevices::colors(), invert = T)], length(trees$spc_common)) |
This file contains 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
library(monzor) | |
library(geosphere) | |
library(ggrepel) | |
library(ggmap) | |
# For the purposes of this demo, I picked the relevant transcation by hand. Using Monzo's callbacks, this would be automated in live code | |
getFlight <- function() { | |
getTransaction(transactionId = "tx_0000AAAAA5i3BqkXSPAAAA") | |
} |
This file contains 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
// ==UserScript== | |
// @name NoText | |
// @version 0.2 | |
// @namespace com.everythinginthesky | |
// @description Makes the web bearable | |
// @author @rynbtmn | |
// @match *://*/* | |
// ==/UserScript== | |
function addGlobalStyle(css) { |
This file contains 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
library(httr) | |
library(jsonlite) | |
# OAuth settings for Monzo: | |
# https://monzo.com/docs/#authentication | |
monzo <- oauth_endpoint( | |
authorize = "https://auth.getmondo.co.uk/", | |
access = "https://api.monzo.com/oauth2/token") | |
# You need to set up your own Monzo 'app' to play with the API |
NewerOlder