"Al fondo, vedo (non certo nei curatori del progetto, ma come sottofondo ancora presente nella mente di alcuni bibliotecari italiani), l'idea che le opere conservate in una biblioteca siano in qualche modo "possedute" dalla biblioteca. Conservare (che è la mission delle biblioteche per le opere storiche) non implica acquisire diritti, quanto piuttosto, semmai, doveri, come appunto quello della massima valorizzazione delle opere. Al giorno d'oggi questo non può che significare rilasciare anche le digitalizzazioni in pubblico dominio (o CC0)."
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import csv,urllib.request,urllib.parse,urllib.error | |
from bs4 import BeautifulSoup | |
from time import sleep | |
URL_SITO = "http://www.psypress.com/books/search/?qs=1&imprint=psychology_press&sort=date&order=desc&range=published&page=" | |
#ciccio = open ('psy.html','r').read() | |
csout = open('psy.csv','w') | |
cswrite = csv.writer(csout) | |
for pagina in range(1,8): | |
print("Opening %s%i\n" % (URL_SITO,pagina)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
COMMON_YEAR_DAYS =365 | |
LEAP_YEAR_DAYS = 366 | |
days_in_months = {0:0,1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31} | |
giorni = ['monday','tuesday','wednsday','thursday','friday','saturday','sunday'] | |
def is_it_leap(year): | |
return year%4 == 0 and not year%100 == 0 or year%400 ==0 | |
def day_of_the_week(year,month,day): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Keeping medicines from the blood streams of the sick; food | |
from the bellies of the hungry; books from the hands of the | |
uneducated; technology from the underdeveloped; and putting | |
advocates of freedom in prisons. Intellectual property is | |
to the 21st century what the slave trade was to the 16th. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IERI=`TZ=aaa24 date +%Y%m%d` | |
for t in `find . -maxdepth 1 -type f` ; do ln -s $t ${t:0:6}_$IERI ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Occorre una query per ottenere il record in tabella2 correlato al record in tabella1 che stiamo aggiornando | |
# questa qui sotto è solo un esempio | |
record_tabella2 = db(db.tabella2.id == id_del_record_in_tabella2) | |
# Creiamo il form principale tramite SQLFORM della tabella1 | |
form = SQLFORM(db.tabella1,record_id,deletable=True,showid=True,compute=True) | |
# Costruiamo manualmente l'html del campo da aggiungere nella form | |
mio_campo_aggiuntivo = TR(LABEL('Campo aggiuntivo:'),TEXTAREA(_name='campo',value=tabella2.campo)) | |
# Inseriamo il campo in posizione -1, ovvero sotto tutti gli altri campi | |
# attenzione che in questo modo il campo finira' sotto la spunta per l'eventuale cancellazione | |
form[0].insert(-1,mio_campo_aggiuntivo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: web2py_scheduler | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Should-Start: $mysql $nginx $uwsgi | |
# Should-Stop: $mysql $nginx $uwsgi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# richiede pacchetti espeak mbrola-it3 | |
while [ 1 ] | |
do | |
MANNAGGIA="Mannaggia a san`curl -s www.santiebeati.it/$(</dev/urandom tr -dc A-Z|head -c1)/|grep -a tit|cut -d'>' -f5|cut -d'<' -f1|shuf -n1`" | |
echo "$MANNAGGIA" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import re | |
from subprocess import call | |
import sys | |
def scavezza_classic(collo): | |
if collo != '': | |
print ("Collocazione in entrata: %s" % collo) | |
# Vuolsi cosi' cola' ove si puote | |
newcollo = re.sub('Statistiche','ST.PER.ST',collo) | |
newcollo = newcollo.split(' ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -* | |
import mmap,re,sys,csv | |
def check_multiple_items(fields): | |
for ciccio in filter(lambda x:'##' in x,campi): | |
for i in ciccio.split('##'): | |
nl = filter(lambda x:x != ciccio,campi) | |
nl.insert(campi.index(ciccio),i) | |
check_multiple_items(nl) |
OlderNewer