I hereby claim:
- I am mattstibbs on github.
- I am mattstibbs (https://keybase.io/mattstibbs) on keybase.
- I have a public key ASAkSpGkBuKpwuVmRjuIvRYp5gUC2mRO8iMRRm87hlaGZAo
To claim this, I am signing this object:
""" | |
This code checks that an NHS number is of valid format based on the specified calculation and check digit. | |
It does NOT check that the NHS number is an active, valid NHS number according to the national NHS number database. | |
Requires: Python 3.6+ | |
""" | |
# NHS numbers must be ten numerical digits long | |
nhs_number = "1354554531" |
#!/bin/bash | |
# Gather current power status | |
AC_POWER=`ioreg -l | grep ExternalConnected | cut -d"=" -f2 | sed -e 's/ //g'` | |
# Gather details about current wifi network | |
WIFI_NETWORK=`networksetup -getairportnetwork en0 | grep 'Current Wi-Fi Network' | cut -c 24-` | |
# Specify the name of your home / office wifi network here | |
HOME_WIFI=my_home_wifi |
import datetime | |
original_timestamp = datetime.datetime.now() | |
# Convert datetime object to a string representation | |
timestamp_string = original_timestamp.strftime("%Y-%m-%dT%H:%M:%S%z") | |
print(timestamp_string) | |
# OUTPUT: 2019-08-17T00:00:00+0000 | |
# Add a colon separator to the offset segment |
def test_log_line_written_ods_code(): | |
u = User('test-username', 'test-password') | |
client = RestApiClient(u) | |
identifier = 'A91547' | |
data = { | |
'success': | |
{ | |
'serviceCount': 1, | |
'services': | |
[ |
class RecentlyUsedList(): | |
def __init__(self): | |
self.list_of_items = [] | |
def __len__(self): | |
return len(self.list_of_items) | |
def insert(self, item): | |
if item in self.list_of_items: | |
self.list_of_items.remove(item) |
import unittest | |
from recently_used_list import RecentlyUsedList | |
class RULTests(unittest.TestCase): | |
def setUp(self): | |
self.rul = RecentlyUsedList() | |
def test_new_RUL_gives_empty_list(self): |
def str2bool(v): | |
return v.lower() in ("yes", "true", "t", "1") |
import config as config | |
from flask import Response, request | |
from functools import wraps | |
def check_auth(username, password): | |
"""This function is called to check if a username / | |
password combination is valid. | |
""" | |
result = (username == config.API_USER and password == config.API_PASS) |
I hereby claim:
To claim this, I am signing this object:
Verifying that +mstibbs is my blockchain ID. https://onename.com/mstibbs |