Skip to content

Instantly share code, notes, and snippets.

@wilig
wilig / oai_server.py
Last active December 17, 2015 09:19 — forked from veriojon/oai_server.py
#from lxml import etree
from flask import Flask, request, Response, render_template, abort
from oaipmh import server, metadata
from oai_auth import auth_info, ip_check_init, ip_to_inst, set_auth, get_ip
import logging
import re
import ss_server
def getServer():
@wilig
wilig / gist:847903
Created February 28, 2011 19:52 — forked from veriojon/gist:847897
var ExcelSuccessDialog = Ext.extend(Ext.Window, {
constructor: function(config) {
this.importsuccessForm = new Ext.FormPanel({
frame: true,
bodyStyle: 'padding: 10px 10px 0 10px;',
labelWidth: 50,
defaults: { anchor: '95%', allowBlank: false, msgTarget: 'side'},
items: [{
xtype: 'displayfield',
itemID: 'numnew',
@wilig
wilig / gist:674728
Created November 12, 2010 21:35 — forked from veriojon/gist:674700
from sharedshelf.tests import *
from sharedshelf.lib import imatacache
class TestImataCache(TestCase):
def test_adding_value_to_cache(self):
cache = imatacache.ImataCache()
myvalue = 'bar'
key = cache.add(myvalue)
self.assertEqual(myvalue, cache.get(key))
from decorator import decorator
import inspect
@decorator
def deco(f, *a, **kw):
# set a default keyword arg
if 'foo' not in kw:
kw['foo'] = 'bar'
return f(*a, **kw)