Skip to content

Instantly share code, notes, and snippets.

View scottythered's full-sized avatar

Scotty Carlson scottythered

View GitHub Profile

Keybase proof

I hereby claim:

  • I am scottythered on github.
  • I am scottythered (https://keybase.io/scottythered) on keybase.
  • I have a public key ASBmVPKPX5gMdNYmAjeBO_gT2AsnBiRcaKEVSVjWLHk64Qo

To claim this, I am signing this object:

Sample data -- the multi-value connector is the plus sign (+):

col1 col2 col3
one blah scott
two blah scott+jessica
three blah jessica+scott

Under templating, use this if-statement in your row template:

from tweepy import OAuthHandler
from tweepy import API
import json
from time import sleep
consumer_key="xxxxxxxxxxxxxxxxxxxxxxxxx"
consumer_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
access_token="xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
access_token_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
from tweepy import OAuthHandler
from tweepy import API
import json
from time import sleep
import urllib.request
import os
consumer_key = "XXXXXXXXXXXXXXX"
consumer_secret = "XXXXXXXXXXXXXXX"
access_token = "XXXXXXXXXXXXXXX"
from tweepy import OAuthHandler
from tweepy import API
import urllib.request
import os
import json
consumer_key = "XXXXXXXXXXX"
consumer_secret = "XXXXXXXXXXX"
access_token = "XXXXXXXXXXX"
access_token_secret = "XXXXXXXXXXX"
# << data >> -- from ArchivesSpace
# [% data %] -- from YAML config file
# Corporate entities
{
"@context": "http://schema.org/",
"@type": "Organization",
"url": "<< url to this page >>",
"alternateName": [
"<< alternate name forms from data >>"
# [% data %] -- from YAML config file
{
"@context": "http://schema.org/",
"@type": "[% Library or Organization %]",
"@id": "[% link to Wikidata/Freebase URI, if available %]",
"name": "[% Name of archive/library %]",
"url": "[% link %]",
"image": "[% link to logo/building image %]",
"sameAs": "[% link to wikipedia, twitter, facebook, etc %]",
@scottythered
scottythered / Marc-to-IETF.json
Created November 30, 2016 20:19
Use this JSON command in OpenRefine to change (most) MARC language codes to (most) IETF language tags. Make sure you change the column name before use.
[
{
"op": "core/text-transform",
"description": "Text transform on cells in column jsonlang using expression grel:value.replace('afr','af')",
"engineConfig": {
"mode": "record-based",
"facets": []
},
"columnName": "jsonlang",
"expression": "grel:value.replace('afr','af')",
# << data >> -- from ArchivesSpace
# [% data %] -- from YAML config file
{
"@context": "http://schema.org/",
"@type": "Collection",
"name": "<< Collection name >>",
"description": [
"<< Abstract >>" or "<< Scope and Contents >>" or << Biographical Note >>"
],