Skip to content

Instantly share code, notes, and snippets.

Tony Hirst psychemedia

Block or report user

Report or block psychemedia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@psychemedia
psychemedia / datetime_scatter.ipynb
Last active Nov 20, 2019
Example of scatter plot based on median values by hour from datetimes
View datetime_scatter.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / wrc_telem_unpack_example.py
Created Nov 19, 2019
Example of handling compressed json
View wrc_telem_unpack_example.py
import requests
url = 'https://webappsdata.wrc.com/srv/fs/pull/1a3cdf87-4d91-435c-a1f9-7aab556fc3b1/ss07mee_telemetry_js_merged/js'
#I get an SSL error so dump the verification
r = requests.get(url, verify=False)
import gzip
import base64
import json
@psychemedia
psychemedia / apt.txt
Last active Nov 16, 2019
TM112 md demo Binder
View apt.txt
git
gcc
zip
@psychemedia
psychemedia / linked data bands.ipynb
Last active Oct 30, 2019
Example of finding relationships between band genres using SPARQL queries over DBPedia Linked Data
View linked data bands.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / thebelab.tpl
Created Oct 29, 2019
nbconvert template for generating ThebeLab enabled HTML page from ipynb notebook
View thebelab.tpl
<!--
Template to geneate a ThebeLab enhanced HTML page.
The Binder / Jupyyer kernel target needs setting explicitly in the template.
Run using: jupyter nbconvert --to html 'my notebook.ipynb' --template=thebelab.tpl
-->
{% extends 'full.tpl'%}
@psychemedia
psychemedia / bands.svg
Created Oct 1, 2019
Music genre connections via bands listed under Heavy Metal genre on dbpedia
View bands.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Venues - Linked Data.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View venues.html
<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script>
L_NO_TOUCH = false;
L_DISABLE_3D = false;
</script>
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.5.1/dist/leaflet.js"></script>
@psychemedia
psychemedia / DEFRA AUR Data Downloader.ipynb
Last active Sep 9, 2019
DEFRA AUR Data Downloader - quick hack for downloading UK air quality data
View DEFRA AUR Data Downloader.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / ouxml2md.xslt
Last active Aug 29, 2019
Testing - ou-xml to markdown xslt
View ouxml2md.xslt
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
xmlns:str="http://exslt.org/strings" extension-element-prefixes="exsl">
<!-- xmlns:functx="http://www.functx.com" -->
<!-- Strip out any whitespace used to style layout of XML doc we're processing -->
<xsl:strip-space elements="*"/>
You can’t perform that action at this time.