Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rayvoelker
rayvoelker / iug2024_sierra_ils_utils.ipynb
Created March 26, 2024 17:32
sierra-ils-utils -- IUG 2024 Presentation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rayvoelker
rayvoelker / epic_rap_battles_of_library_history.md
Created October 25, 2023 21:31
EPIC RAP BATTLES OF LIBRARY HISTORY! MELVIL DEWEY VERSUS CHARLES AMMI CUTTER!

EPIC RAP BATTLES OF LIBRARY HISTORY!

MELVIL DEWEY VERSUS CHARLES AMMI CUTTER!


Dewey:

I'm the king of the stacks, the master of facts,

@rayvoelker
rayvoelker / README.md
Last active October 2, 2023 16:09
StochasticPseudonymizer.ipynb

StochasticPseudonymizer: Cryptographic Token Generation for Replacing Patron Identifiers

StochasticPseudonymizer is a Python class designed to pseudonymize the personally identifiable information (PII) of patrons using the cryptographic hash function PBKDF2HMAC, preserving patron privacy while creating a deliberate uncertainty, introduced by hash collision--keeping it from being possible to prove that any one patron had some specific behavior in the past.

Stochastic refers to the property of being well-described by a random probability distribution https://en.wikipedia.org/wiki/Stochastic

Pseudonymization refers to the technique where personally identifiable information fields within a data record are replaced by one or more artificial identifiers, or pseudonyms. https://en.wikipedia.org/wiki/Pseudonymization

Background

@rayvoelker
rayvoelker / README.md
Last active September 16, 2023 15:52
Hybrid Patron Pseudonymizer

HybridPatronPseudonymizer

The HybridPatronPseudonymizer is a Python class that implements a hybrid encryption system that results with a deterministic ciphertext (the encrypted content) output for a given plaintext input. Hybrid encryption combines the benefits of both symmetric and asymmetric encryption.

Introduction

Protecting the privacy of patrons is of utmost importance for institutions that handle sensitive data. In some cases, the responsibility of safeguarding this privacy is intesified by by law, regulations or even internal institutional policy. In this context, the provided Python module serves as a powerful tool that aims to strike a balance between ensuring patron data confidentiality and preserving its analytical utility.

Pseudonymization is a data protection technique where personally identifiable information (PII) fields within a data record are replaced with artificial identifiers or pseudonyms. This method prioritizes data subject privacy while also facilitating data anal

@rayvoelker
rayvoelker / WireGuard VPN Setup Guide.md
Created August 1, 2023 22:45
WireGuard VPN Setup Guide

WireGuard VPN Setup Guide

Introduction

WireGuard is a modern, secure, and fast VPN implementation that uses state-of-the-art cryptography. This guide covers the setup of a WireGuard VPN on a server and two clients.

Key Generation

On each host, generate a private and public key pair using the following command:

@rayvoelker
rayvoelker / chpl_email_footer.html
Last active July 28, 2023 01:26
This is the design element for the footer of CHPL automated e-mail
@rayvoelker
rayvoelker / time_between_circ_transactions.sql
Created June 7, 2023 22:07
fun with lag, rank and partitions on circulation transaction data
-- generate some context around checkins and times between transactions in the circ_trans table
SELECT
circ_trans.id,
circ_trans.bib_record_id,
circ_trans.item_record_id,
circ_trans.volume_record_id,
circ_trans.patron_record_id,
itype_code_num,
circ_trans.transaction_gmt,
circ_trans.op_code,
@rayvoelker
rayvoelker / def_authenticate_session.py
Created April 30, 2023 19:35
Authenticate a HTTP Requests Session to make authorized requests for the Sierra API
# 5. Define a function to authenticate our API requests
#
def authenticate_session(session):
"""
Function, authenticate_session() accpepts a Requests Session object,
and then returns the session with headers containing a token that is
valid to make futue requests using the token
"""
if (
session.headers['Authorization'] == ''
@rayvoelker
rayvoelker / original_circ_genre.md
Created January 12, 2023 00:16
original circulation by locations (at main) and genre

See original_circ.md for more details on preparing the database for this query

id	parent	notused	detail
2	0	0	CO-ROUTINE checkout_data
3	2	0	COMPOUND QUERY
4	3	0	LEFT-MOST SUBQUERY
7	4	0	SEARCH circ_trans USING INDEX idx_location_callnumber (call_number>? AND call_number<?)
55	3	0	UNION ALL
58	55	0	SEARCH circ_trans USING INDEX idx_location_callnumber (call_number>? AND call_number<?)