Skip to content

Instantly share code, notes, and snippets.

View Nemolog's full-sized avatar

Mauro Rubin Nemolog

View GitHub Profile
@Nemolog
Nemolog / ByteZoneFtp.py
Created March 1, 2009 21:22
ftp command line
import ftplib
def command():
cmd = raw_input(login +"@" + host +">")
#upload
if cmd=="upload":
filename = raw_input("Insert file name:")
#Upload a binary file from your disk
ftp.storbinary('STOR '+filename, open(filename,'rb'))
print "file upload success!"
@Nemolog
Nemolog / readFileLine.py
Created March 1, 2009 15:21
Legge e modifica le linee di un file
#!/usr/bin/env python
#Leggo un file
f = open("/home/nemolog/Scrivania/test2","r");
#ciclo per ogni line...
for line in f:
# ...printa la linea
print line
# modifico la linea
@Nemolog
Nemolog / PyCopyFile.py
Created March 1, 2009 13:45
copy a file python
print "Avvio di Python Program...";
#lettura del file
file_object = open('/home/nemolog/LotusInstall.log');
print "File sorgente: ", file_object
all_the_text = file_object.read( )
file_object.close( )
#print all_the_text
@Nemolog
Nemolog / CodeSearch Ubiquity
Created January 8, 2009 10:09
CodeSearch x Ubiquity
CmdUtils.CreateCommand({
//nome del comando
name: "CodeSearch",
homepage: "http://bytezone.plumfake.net/",
author: { name: "Mauro Rubin", email: "mauro.rubin@plumfake.net"},
help: "Se ne volete saperne di più andate su http://bytezone.plumfake.net/"
//definisco il tipo di parametro passato
takes: {"qualcosa da ricercare": noun_arb_text},
@Nemolog
Nemolog / x
Created January 8, 2009 09:22
Tutti Script Ubiquity
CmdUtils.CreateCommand({
//nome del comando
name: "OilprojectSearch",
//definisco il tipo di parametro passato
takes: {"qualcosa da ricercare": noun_arb_text},
//descrizione sotto...
@Nemolog
Nemolog / x
Created October 23, 2008 13:28
Twine Search (semantic web)
CmdUtils.CreateCommand({
//nome del comando
name: "TwineSearch",
homepage: "http://bytezone.plumfake.net/",
author: { name: "Mauro Rubin", email: "mauro.rubin@plumfake.net"},
help: "Se ne volete saperne di più andate su http://bytezone.plumfake.net/",
//definisco il tipo di parametro passato (in questo caso "noun_arb_text": testo semplice)
takes: {"qualcosa di interessante": noun_arb_text},