This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import requests | |
import os | |
class EZIDARKGenerator: | |
def __init__(self, shoulder_url='https://ezid.cdlib.org/shoulder/ark:/81423/d2'): | |
self.url = shoulder_url | |
self.headers = {'Content-Type': 'text/plain'} | |
self.auth = (os.getenv("EZID_USER"), os.getenv("EZID_PASSWORD")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dublin_core": { | |
"title": { | |
"value": "suggested title", | |
"confidence": "high|medium|low", | |
"reasoning": "explanation of how determined", | |
"source_text": "relevant excerpt from letter" | |
}, | |
"creator": { | |
"value": "author name", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extracted_text": "full text content", | |
"confidence_assesment": "high/medium/low", | |
"legibility_notes": "any notes about difficult to read sections" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import os | |
from tqdm import tqdm | |
import math | |
import subprocess | |
from subprocess import CalledProcessError | |
from csv import DictWriter | |
class AvalonBase: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import os | |
class AMCItem: | |
def __init__(self, path, files): | |
self.path = path | |
self.files = sorted(files) | |
self.ignore = {self.files[0]} | |
self.target_ratio = self.get_target_aspect_ratio(f"{path}/{self.files[0]}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import time | |
import threading | |
from time import sleep | |
timeout_seconds = 30 | |
switch_context = [ | |
"kubectl", | |
"config", | |
"use-context", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you are on main, checkout a new branch. | |
git checkout -b a-new-branch-name-that-has-not-been-used | |
# After you have a branch, you'll do these things: | |
git status # Shows you which files changed | |
git diff # This will show which things in a file changed | |
git add directory/file.ext # Adds a file so it can be committedd | |
git commit -m "What I changed." # Commits a file | |
git push origin the-branch-you-are-on # Look at the thing in red for a hint here. Make sure it doesn't say main or master. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"audrey-import":{ | |
"ingestType":"SAF", | |
"isHeadless":true, | |
"repositories": [{ | |
"name": "audrey import", | |
"type": "FEDORA_PCDM", | |
"settings": [{ | |
"key": "repoUrl", | |
"values": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"responseHeader": { | |
"status": 0, | |
"QTime": 1, | |
"params": { | |
"q": "*:*", | |
"facet.field": "collection", | |
"indent": "true", | |
"rows": "0", | |
"facet": "true" |
NewerOlder