Skip to content

Instantly share code, notes, and snippets.

View tingletech's full-sized avatar

Brian Tingle tingletech

View GitHub Profile
usage: nxid [-h] [--mint] [--create] [--update] [--no-noop-report]
[--show-erc] [--ezid-username EZID_USERNAME]
[--ezid-password EZID_PASSWORD] [--shoulder SHOULDER]
[--owner OWNER] [--status STATUS] [--publisher PUBLISHER]
[--location LOCATION] [--loglevel LOGLEVEL] [--rcfile RCFILE]
path
nxid finds top level objects in Nuxeo and syncs them up with EZID
positional arguments:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:nxs="http://www.nuxeo.org/ecm/project/schemas/tingle-california-digita/ucldc_schema" xmlns:nxsv="http://www.nuxeo.org/ecm/schemas/core/validation/" xmlns:ref="http://www.nuxeo.org/ecm/schemas/core/external-references/" targetNamespace="http://www.nuxeo.org/ecm/project/schemas/tingle-california-digita/ucldc_schema">
<!-- helper XSD definitions for list types -->
<xs:complexType name="content">
<xs:sequence>
<xs:element name="encoding" type="xs:string"/>
<xs:element name="mime-type" type="xs:string"/>
<xs:element name="data" type="xs:base64Binary"/>
<xs:element name="name" type="xs:string"/>
class MyException(Exception):
pass
class MyException2(Exception):
pass
def f1():

Keybase proof

I hereby claim:

  • I am tingletech on github.
  • I am tingle (https://keybase.io/tingle) on keybase.
  • I have a public key ASBAVyvLjP7prJs_6mYWqtCGbCs12jxzEJwrCXIM43ZhgAo

To claim this, I am signing this object:

{
"responseHeader":{
"status":0,
"QTime":3,
"params":{
"q":"collection_data:*/79/*",
"fl":"subject,url_item",
"rows":"500"}},
"response":{"numFound":427,"start":0,"docs":[
{
@tingletech
tingletech / CHANGES.txt
Created January 25, 2017 16:23
XTF changes pulled into dsc.cdlib.org
changeset: 2203:b35bb4856e74
parent: 2174:2a619674504a
user: Martin Haye <martin.haye@ucop.edu>
date: Thu Apr 17 14:50:18 2014 -0700
summary: Adding .gitignore, derived from old .hgignore.
changeset: 2204:ae21e14ae0d0
parent: 2174:2a619674504a
user: BRIAN TINGLE <brian.tingle.cdlib.org@gmail.com>
date: Fri Apr 11 19:11:42 2014 -0700
@tingletech
tingletech / install_gpu.md
Created December 14, 2016 03:39
Notes for setting up to follow https://github.com/tensorflow/models/tree/master/im2txt on a generic ubuntu 14x AMI

Ubuntu/Linux 64-bit, GPU enabled, Python 2.7 Requires CUDA toolkit 8.0 and CuDNN v5.1

Install CUDA 8.0

wget "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_8.0.44-1_amd64.deb"
sudo dpkg -i cuda-repo-ubuntu1404_8.0.44-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda
@tingletech
tingletech / benchmark.py
Last active September 13, 2016 17:14
pip install pytest-benchmark statistics
from __future__ import print_function
from xml.etree.ElementTree import Element, SubElement, ElementTree
from lxml.etree import Element as E
from lxml.etree import SubElement as SE
from lxml.etree import ElementTree as ET
@tingletech
tingletech / sqlite_in_production.md
Created August 20, 2016 23:08
Does this sound like a good or a bad idea? Let me know in the comments.

SQLite in Production

Okay, I can see how at first glance this might seem super hacky, but I just detached production calisphere from postgress, and now it is running from sqlite.

Basically. Postgress is still in use -- for the database where edits are done. We have an on demand EC2 machine running django where have just migrated all the editoral content we publish. It is all controlled in the django admin interface.

@tingletech
tingletech / 0.md
Last active August 20, 2016 22:33
outbound link tracking, adapted from SNAC project

track external links

assuming modern as of 2016 ga tracking code and jquery is on the page

based on the example in the manual but does not require adding onclick="trackOutboundLink('http://www.example.com'); return false;" to the HTML of every link

  • event category outbound