Skip to content

Instantly share code, notes, and snippets.

# usage: sed -f css2ccss.sed file.css
# helps to translate css filtes to clevercss format (most of the work has to be done by hand)
s/{/:/
s/}//
s/\ *:\ */: /
s/\;//

Taolin

Taolin is an open source Web desktop created at the research institute Fondazione Bruno Kessler (FBK).

The web desktop consists of a personal dashboard customisable by adding micro-applications called widgets. Each widget offers a different service that can be provided as a view over internal services or repositories (e.g. access to papers repository) or as a communication service (e.g. jabber web chat) or as an external resource (e.g. Google search).

Technology

Taolin relies on a 3-tier architecture: the back-end has been developed using CakePHP (a Model-View-Controller framework) over a PostgreSQL database (chosen for its stability and reliability), while the front-end takes advantage of the usage of JavaScript and AJAX (the framework adopted for the development is ExtJS, integrated with jQuery). JSON (JavaScript Object Notation, a lightweight data-intercha

class AnalyseTask(Task):
def run(self, lang, date):
from subprocess import *
import os
logger = self.get_logger()
logger.info("Running: %s-%s" % (lang, date))
p = Popen("/sra0/sra/setti/Source/wiki-network/analysis.py --as-table --group --reciprocity --density $HHOME/datasets/wikipedia/%swiki-%s_rich.pickle" % (lang, date),
shell=True, stderr=PIPE)
#! /bin/sh
# find the path of this script
ABSPATH="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
SCRIPT_PATH=`dirname "$ABSPATH"
export DEST_DIR=/hardmnt/bowie0/sra/sonet/backup/
export AUTH_FILE=.......
source $SCRIPT_PATH/backup-lib.sh
## From http://code.google.com/p/soxred93tools/source/browse/trunk/web/rfap/rfalib3.php
/*
RfA Analysis Library 2.05
This version breaks compatibility with the 1.x series
Copyright (C) 2006 Tangotango (tangotango.wp _at_ gmail _dot_ com)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
@vad
vad / zinnia-nosouth.log
Created December 17, 2010 10:10
python manage.py test -v 2 zinnia 2>&1 > zinnia.log
Creating test database 'default'...
Processing auth.Permission model
Creating table auth_permission
Processing auth.Group_permissions model
Creating table auth_group_permissions
Processing auth.Group model
Creating table auth_group
Processing auth.User_user_permissions model
Creating table auth_user_user_permissions
Processing auth.User_groups model
@vad
vad / redis-py in jython
Created January 18, 2011 09:52
Traceback
$ jython
Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54)
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_22
Type "help", "copyright", "credits" or "license" for more information.
>>> from redis import Redis
>>> c = Redis()
>>> c.get('a')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/vad/Source/Envs/jython/Lib/site-packages/redis/client.py", line 587, in get
from gevent import monkey
monkey.patch_all()
from gevent.pool import Group
from urllib import urlopen
l = ["http://www.google.com",]*20
def get(url):
content = urlopen(url).read()
from fabric.api import *
class RunAggregator(object):
def __init__(self):
self.commands = []
def __enter__(self):
return self.commands.append
def __exit__(self, exc_type, exc_value, traceback):
run(' && '.join(self.commands))
$.easydate.locales.it = {
"future_format": "%s %t",
"past_format": "%t %s",
"second": "secondo",
"seconds": "secondi",
"minute": "minuto",
"minutes": "minuti",
"hour": "ora",
"hours": "ore",
"day": "giorno",