Key Combination Function
C-a move cursor to beginning of line
C-b move back one character
C-d delete a character
C-e move cursor to end of line
C-f move forward one character
C-k delete the line
C-n move cursor to next line
C-p move cursor to previous line
C-v page down
C-x u undelete
C-x C-c exit
C-x C-f find a file
C-x C-s save file
C-x C-v find alternative file
C-x C-w write to a file with new filename
ESC b back one word
ESC d delete word
ESC f move cursor by one word
ESC < move to beginning of file
ESC > move to end of file
ESC v page up
Note: C = The Control key
- Easy image format conversion
- Run/open file/folder as root
- Mount/Unmount .iso files
- PNG optimizing
- Multimedia conversion
>> sudo add-apt-repository ppa:dr3mro/nautilus-actions-extra
>> sudo apt-get update && sudo apt-get install nautilus-actions-extra
Non si duplicano mai le righe di codice e gli articoli ben scritti:
mypythonnotes
docs python it
Iterable object is any object which responds to the __iter__() or __getitem__()
Iterator responds to next() and raises a StopIteration exception when there are no more elements
Generator is a function which returns an iterator: to implement a generator simply use the yield keyword to successively return values to the calling context and raise a StopIteration when done
Per il download di tutti i pdf collegati alla pagina del prof. cazzola per il corso di PA:
import re
import os
import base64
import urllib.request
baseUrl = "http://cazzola.dico.unimi.it/"
username = ""
password = ""
if __name__ == "__main__":
fd = open('page.html')
opener = urllib.request.build_opener()
base64string = base64.encodestring(bytes('{0}:{1}'.format(username, password), "utf-8"))[:-1]
opener.addheaders = [('Authorization', "Basic {0}".format(base64string.decode()))]
for line in fd.readlines():
paths = re.findall("[a-zA-Z0-9/\-%\(\).&;]+pdf", line)
if (len(paths) > 0):
url = paths[0].replace("&", "&")
fl = opener.open(baseUrl + url)
name = url.split("/")[-1].replace("%20", " ")
pdf = open("output" + os.sep + name, "wb")
pdf.writelines(fl.readlines())
pdf.close()
print("downloaded ... " + name)
Nota: username e password devono essere richiesti direttamente a lui
iBus: strumento per inserire caratteri di alfabeti non latini, tipo quelli cinesi.
Nepomuk: backup semantico.
un paio di link da tenere sott’occhio:
tornado web server
interactive python
Provate la modalità notebook di ipython … personalmente mi fà sbavare!!
Che fico
Press Alt and right-click the top menu bar …
Se siete nostalgici del vecchio aspetto di Gnome 2 e volete riaverlo ecco come installare la modalità di ripiego su Ubuntu 11.10 Oneiric
La modalità di ripiego o modalità fallback è prevista su Gnome 3 per quei pc che non soddisfano appieno i requisiti hardware per far girare la nuova interfaccia Gnome Shell. La caratteristica della modalità di ripiego è che l’aspetto è quello classico a cui eravamo abituati su Gnome 2 e sarà quindi molto apprezzato dai nostalgici.
Un mitico cliente da shell … cadaver
Grazie Marco L.