Skip to content

Instantly share code, notes, and snippets.

View eightBitter's full-sized avatar

Jacob Shelby eightBitter

  • NBBI
  • Raleigh, North Carolina
View GitHub Profile
@eightBitter
eightBitter / streaming_import.rb
Created February 13, 2024 18:51
streaming_import.rb tweak for repository-importer
require 'java'
require 'json'
require 'atomic'
require 'tempfile'
require_relative 'dependency_set'
require_relative 'streaming_json_reader'
require_relative 'cycle_finder'
class StreamingImport
@eightBitter
eightBitter / archivemanager_reformat_csvs.rb
Created February 2, 2023 15:10
example data reformatting using Polars
require_relative './reformatter'
### AM HGARC object props
# Read in props data to dataframe
archivemanager_object_props = Polars.read_csv('data/archivemanager/object_properties_escaped.csv',dtypes:{'node_id'=>:str})
# Read aspects data to dataframe
archivemanager_object_aspects = Polars.read_csv('data/archivemanager/object_aspects.csv',dtypes:{'node_id'=>:str})
# Read hierarchy data to dataframe
@eightBitter
eightBitter / createTextLink.js
Last active November 11, 2024 20:37
This javascript bookmarklet creates a Text Fragment URL string and copies to clipboard, allowing one to share a link to highlighted text on a page.
@eightBitter
eightBitter / ebsco-parser.py
Created January 4, 2019 21:51
This script pulls out specified fields from EBSCO's "Generic bibliographic management format" and transforms the data to a csv
# python 3.7.0. This script pulls out specified fields from EBSCO's "Generic bibliographic management format"
# and transforms the data to a csv
import re
class RIS:
""" RIS file structure """
def __init__(self, in_file=None):
""" Initialize and parse input """
self.records = []
if in_file:
@eightBitter
eightBitter / trendsAvailable.py
Last active September 8, 2018 00:23
Goal of this script is to find all places that have a Twitter trend available, tapping into Twitter's trends/available API feed, pulling out specific fields, and populating a pipe delimited file.
# goal of this script is to find all places that have a Twitter trend available, tapping into Twitter's trends/available API feed, pulling out specific fields, and populating a pipe delimited file.
# import libraries
import twitter
import re
import json
import fileinput
import collections
import os
import sys