Skip to content

Instantly share code, notes, and snippets.

@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 / original_circ.md
Last active January 10, 2023 19:22
some notes on finding "orginal circ"

Finding Original Circulation

finding checkouts without any paired "filled hold" transactions will be how we define an "original circ".

the idea is that we match a "filled hold" with a 'checkout' based on 4 points of data op_code, patron_record_id, item_record_id, transaction_gmt

@rayvoelker
rayvoelker / ezproxy_log_analysis.py
Last active June 6, 2019 13:02
Converts the (apache style) ezproxy log file into .csv files for easier analysis--also converting the date to iso.
import re
import csv
from dateutil import parser
"""Converts the (apache style) ezproxy log file into .csv files for easier analysis.
Current EZproxy config for log output:
(https://help.oclc.org/Library_Management/EZproxy/Configure_resources/LogFormat)
LogFormat %h %{ezproxy-session}i %u %t "%r" %s %b

How To Sync Your Movie to the Professional Jokes By Professional Comedy Professionals (AKA RiffTrax)

Intro

This guide started off as a sort of checklist for myself to try to refine, and speed up the process. I'm sure that there are a good number of things that can be improved upon, but in my opinion, the steps below produce pretty consistently good results. Hopefully this will help

@rayvoelker
rayvoelker / locCallClass.html
Created September 5, 2016 19:10
javascript class for parsing, comparing and sorting library of congress call numbers
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>locCallClass test sorting of call numbers</title>
<script type="text/javascript" src="./locCallClass.js"></script>
</head>
<body style="font-family:monospace;">
@spikegrobstein
spikegrobstein / nginx.conf
Last active September 22, 2023 04:19
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.