Skip to content

Instantly share code, notes, and snippets.

View FranciscoCanas's full-sized avatar

Francisco Canas FranciscoCanas

View GitHub Profile
{
"description": "The additional dimensions used for BiblioWeb events",
"title": "bc_web_event",
"type": "object",
"properties": {
"containerName": {
"type": "string"
},
"contentType": {
"type": "string"
{
"description": "The Environment in which an event happened",
"title": "bc_environment",
"type": "object",
"properties": {
"productId": {
"type": "string"
},
"environmentId": {
"type": "string"
{
"description": "The additional dimensions used for BiblioWeb events",
"title": "v3_web_event",
"type": "object",
"properties": {
"containerName": {
"type": "string"
},
"contentType": {
"type": "string"
{
"description": "The library for which the event occurred",
"title": "bc_library",
"type": "object",
"properties": {
"siteId": {
"type": "string"
},
"site": {
"type": "string"
{
"description": "The library for which the event occurred",
"title": "bc_library",
"type": "object",
"properties": {
"siteId": {
"type": ["string", "null"],
"maxLength": 255
},
"site": {
@FranciscoCanas
FranciscoCanas / combine.py
Last active May 26, 2020 04:05
Combining Pre-trained Left and Right nets into a single joint model
import numpy as np
import sys, os
# Edit the paths as needed:
caffe_root = '../caffe/'
sys.path.insert(0, caffe_root + 'python')
import caffe
# Path to your combined net prototxt files:
@FranciscoCanas
FranciscoCanas / rle.py
Created August 20, 2014 15:22
Run Length Encoding
def encode(input):
"""
Returns the Run Length Encoding for an input string.
"""
if not input:
return ''
result = []
count = 1
prev = input[0]