Skip to content

Instantly share code, notes, and snippets.

View ChrisWellsWood's full-sized avatar

Christopher W. Wood ChrisWellsWood

View GitHub Profile
@ChrisWellsWood
ChrisWellsWood / midi_in.py
Created January 14, 2023 00:37
A simple example of using rtmidi to listen for MIDI messages from a device.
import time
import rtmidi
# initialise midi in class
midi_in = rtmidi.MidiIn()
# connect to a device
midi_in.open_port(3)
# get midi msgs
@ChrisWellsWood
ChrisWellsWood / parametric-modelling-isambard2.ipynb
Last active January 31, 2024 14:46
Parametric Modelling of Coiled Coils using ISAMBARD
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChrisWellsWood
ChrisWellsWood / empty_rust_structs.md
Last active November 8, 2023 10:05
Initialising empty structs in Rust.

Initialising Empty Structs in Rust

In C/C++, you can initialise a struct without giving values for any of the fields:

struct Point {
  float x;
  float y;
  float z;
};
@ChrisWellsWood
ChrisWellsWood / model-evaluation.ipynb
Created April 20, 2018 13:53
Evaluation of Models Produced by ISAMBARD
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChrisWellsWood
ChrisWellsWood / grid-scanning.ipynb
Created April 20, 2018 13:54
Grid Scanning Parameters in ISAMBARD
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChrisWellsWood
ChrisWellsWood / metaheuristics.ipynb
Created April 20, 2018 13:56
Parameter Optimisation with Metaheuristics in ISAMBARD
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChrisWellsWood
ChrisWellsWood / i3_config
Last active September 17, 2023 14:41
i3wm Config and Cheat Sheet
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChrisWellsWood
ChrisWellsWood / Anti-parallel Optimisation.ipynb
Last active April 25, 2023 13:40
A quick overview of how to use a custom specification with an optimizer in ISAMBARD.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChrisWellsWood
ChrisWellsWood / pop_os_20_04_freeze.md
Created April 22, 2023 15:52
How to fix random freezes on a laptop running Pop OS 22.04

How to fix random freezes on Pop OS 22.04

I've been experiencing random screen freezes on Pop OS, where the mouse pointer can still be moved onto another screen, but one of my monitors is totally unresponsive. I tried a whole range of things to fix this (disabling high DPI, turning off extensions etc), but none of this worked.

In order to fix this, I had to disable hybrid graphics. This is an option when you have both a dedicated GPU and a integrated GPU, generally you want to use the low power integrated GPU when you're using battery. However, something is breaking this on the current version of Gnome on Pop. To disable hybrid graphics:

  1. Click on the system tray

image