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
# pip install pandas rispy | |
import pandas as pd | |
import rispy | |
# download RIS file: https://www.repository.cam.ac.uk/handle/1810/256117 | |
# parse RIS file into entries | |
with open('genizahbibliography20160203.txt') as bibfile: | |
entries = rispy.load(bibfile) |
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 | |
from django.contrib.admin.models import LogEntry, ADDITION, CHANGE, DELETION | |
# convert action codes to labels | |
action_label = {ADDITION: 'addition', CHANGE: 'change', DELETION: "deletion"} | |
with open('/tmp/django-logentries.csv', 'w') as csvfile: | |
writer = csv.writer(csvfile) | |
writer.writerow(['action_time', 'user', 'content_type', 'object_id', 'change_message', 'action_flag']) | |
for log in LogEntry.objects.all(): |
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
#!/bin/bash | |
# based on https://blog.benoitblanchon.fr/git-file-count-vs-time/ | |
OUTPUT=stats.csv | |
# create output file with a CSV header | |
# echo "date;transcription_count;transcribed_documents;translation_count;translated_documents" > $OUTPUT | |
echo "date,transcriptions,transcribed_documents,translations,translated_documents" > $OUTPUT |
OlderNewer