Skip to content

Instantly share code, notes, and snippets.

View rickymoorhouse's full-sized avatar

Ricky Moorhouse rickymoorhouse

View GitHub Profile
@rickymoorhouse
rickymoorhouse / openpgp.md
Created November 8, 2022 07:23
Key Oxide Proof
@rickymoorhouse
rickymoorhouse / ibm-cloud-function.yaml
Created October 4, 2022 11:13
Invoke IBM Cloud functions from API Connect
swagger: '2.0'
info:
version: 1.0.0
title: IBM Cloud Functions
x-ibm-name: ibm-cloud-functions
basePath: /ibm-cloud-functions
x-ibm-configuration:
properties:
function-url:
value: YOUR-FUNCTION-URL
@rickymoorhouse
rickymoorhouse / parse_sats_csv.py
Last active July 9, 2022 09:04
Parse SATs data from CSV to line per pupil
import csv
import logging
list = {}
filename = 'AllSubject_Result.csv'
"""
0 CurrLA
1 CurrESTAB
2 CurrDfENo
@rickymoorhouse
rickymoorhouse / api-validate-prewarm.yaml
Created July 1, 2021 14:21
Example API to trigger the compilation of the validation configuration across k8s gateways
swagger: '2.0'
info:
title: API Validate Warm
x-ibm-name: api-validate-warm
version: 1.0.0
schemes:
- https
basePath: /validation
x-ibm-configuration:
cors:
def happyish_sequence(numbers):
# Take the last number from the list and convert to a string
number = numbers[-1]
s_number = str(number)
# If it's only one digit, then square it
if len(s_number) == 1:
output = number**2
# Otherwise find the difference
else:
As part of national social distancing measures to limit the spread of coronavirus, we have had to limit the numbers of children and young people attending educational and childcare settings, to ensure that pupils and staff attending could do so safely. That is why, since 23 March, education and childcare settings have only been open to priority groups (children of critical workers and vulnerable children).
Throughout this document there is a distinction made between ‘vulnerable children’, which has a wide definition as described in Supporting vulnerable children and young people during the coronavirus (COVID-19) outbreak and in the relevant section below, and those who are ‘clinically vulnerable’ to coronavirus.
As a result of the huge efforts everyone has made to adhere to strict social distancing measures, the transmission rate of coronavirus has decreased. We therefore anticipate, with further progress, that we may be able, from the week commencing 1 June, to welcome back more children to early years, sch
@rickymoorhouse
rickymoorhouse / capture.py
Created January 21, 2015 19:36
Capture Image
# Gather the block devices
blockDevices = self.client['Virtual_Guest'].getBlockDevices(id=server.id)
objectMask ="mask[id;note;transactionId;globalIdentifier;children.id;children.note;children.transactionId]"
# Gather the List of template device groups/images from softlayer as to reduce search
preVGBDTGs = self.client['Account'].getPrivateBlockDeviceTemplateGroups(mask=objectMask)
versionStamp = " [v"+version+"]"
### Keybase proof
I hereby claim:
* I am rickymoorhouse on github.
* I am rickymoorhouse (https://keybase.io/rickymoorhouse) on keybase.
* I have a public key whose fingerprint is E3C0 A8E5 CFFA 2B7D 1497 0E81 F256 093D DD31 BAAF
To claim this, I am signing this object:
@rickymoorhouse
rickymoorhouse / morsetache.py
Last active December 29, 2015 20:00
Morse code moustache...video to follow
#!/usr/bin/python
import time
from pyglow import PyGlow
def flash(char):
if char == '-': # Dashes... in yellow
print '-'
pyglow.color(4,255)
time.sleep(1)
pyglow.color(4,0)
@rickymoorhouse
rickymoorhouse / my.cnf
Created October 31, 2013 21:53
MySQL Config
# The MySQL database server configuration file.
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0