Skip to content

Instantly share code, notes, and snippets.

View psychemedia's full-sized avatar

Tony Hirst psychemedia

View GitHub Profile
@psychemedia
psychemedia / README.md
Last active May 4, 2024 22:33
How to load desktop CSV file into R/Sshiny app.

Minimal R shiny app demonstrating:

  1. how to upload a CSV file into an R/shiny app
  2. how to automatically populate list selectors based on column headers
  3. how to use optional list selectors
  4. how to populate a list selector with column names of numerical columns only
  5. how to use an action button to trigger an event when you're ready to do so

@psychemedia
psychemedia / f1TimingPDFsScrpaer.py
Created April 10, 2011 21:46
Scraperwiki script for scraping data from FIA/F1 timing sheets/PDFs
import scraperwiki
import urllib2
import lxml.etree
'''
Code to pull data out of the timing related press releases issued by FIA for Formula One races.
This code is provided solely for your own use, without guarantee, so you can publish F1 timing data,
according to license conditions specified by FIA,
without having to rekey the timing data as published on the PDF press releases yourself.
@psychemedia
psychemedia / Recipes - Entity Extraction.ipynb
Last active February 10, 2024 00:08
Examples of tagging and fuzzy matchings items in txt docs using python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / GPT4all-langchain-demo.ipynb
Last active December 21, 2023 17:30
Example of running GPT4all local LLM via langchain in a Jupyter notebook (Python)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / Testing examples.md
Last active October 5, 2023 07:09
Examples of things we can test for autograding and auto-feedback

Test Examples

Trying to identify testable things for use in autograders and automated code feedback tools...

Automated testing of computer code can be used to support learning in several ways.

For example, automated tests may be used to:

@psychemedia
psychemedia / ipythonblocks_pandas_demo.ipynb
Last active September 9, 2023 23:56
IPython notebook demonstrating the use of ipythonblocks to visualise pandas dataframe manipulations
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / index.html
Last active July 22, 2023 17:52
Query form for Google spreadsheets
<html><head><title>Google Spreadsheet Explorer</title>
<script type="text/javascript" src="//www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {'packages':['table', 'scatterchart', 'linechart','piechart', 'barchart','columnchart']});
function removeChildrenFromNode(node) {
if(node.hasChildNodes()) {
while(node.childNodes.length >= 1 ) {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / table2tree.ipynb
Last active June 12, 2023 08:34
Convert a pandas dataframe describing a hierarchy to a JSON tree
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / Dockerfile
Last active June 2, 2023 03:26
Example of setting up a docker image that will expose Audacity UI via a browser using guacamole remote desktop application.
#via https://github.com/linuxserver/dockergui
# Builds a docker gui image
#FROM hurricane/dockergui:xvnc
FROM hurricane/dockergui:x11rdp1.3
#Use an updated build
#FROM psychemedia/dockergui
#########################################
## ENVIRONMENTAL CONFIG ##
#########################################