View prob.py
#Python code that in a pseudo-random way estimates the average number of trials needed to see the sequence 1 or 2, of iid R.V. The probability of Head must be input in decimal form like 0.0001 or 0.2548. Remove hashes for debug prints
#Done by Simone Manduchi, 28th November 2015 - Probability course - LUISS University. Beta version
import random
trials=int(raw_input('Number of trials: '))
p=float(raw_input('Probability of having an HEAD (in the form 0.xxxxx): '))
runs=int(raw_input('Different runs (each of them consists in the number of trials inserted before): '))
counter=0
finalavg=[]
while counter!=runs:
q=1-p
View gist:74bf96410f4ff69364b7
#Stata
lista=(VAR SEPARATED WITH COMMA)
a=0
b='gen var=.'
while a!=len(lista):
c=a+1
b+='\nreplace var='+str(lista[a])+' if Y11_Country=='+str(c)
a+=1
print(b)
View gist:e3a6dbc3db71602c587f
#CREATED BY SIMONE MANDUCHI IN MARCH 2015. I HAVE CREATED THESE FEW LINES OF CODE IN 5 MINUTES JUST IN ORDER TO SPLIT A VAR IN CLASSES FOR STATA. FEEL FREE TO EDIT IT AS YOU PREFER
var=input('Inserire la variabile da frazionare: ')
var1=input('Inserire il nome nuova variabile: ')
var3=input('Quante volte frazionare:')
string=''
a=1
diz={}
while a!=int(var3)+1:
if a==1:
string='gen '+var1+'=.'
View grimace.htm
<!---
Attention!!!
The code is absolutely not completed.
It is repetitive in some areas and not clean.
I apologize in advance for the naif style. It is my first project with Google Maps API.
v. 0.0.1 pre pre alpha
Copyright (C) November 2014 - Simone Manduchi simone@manduchi.net ~ E-Business solution project UCD, Dublin
Special thanks to the Google API support (some portions of code are taken from https://developers.google.com/maps/documentation/
-->
View gist:11267370
//Creato da Simone Manduchi per il NewsBoard Forum (2009) (non valido dal 2012 causa i blocchi di sicurezza sui circuiti)
var mexnospam = 'Non puoi fare spam in Tag!'
urlAllowed = new Array();
urlAllowed [0]="http://myspecialworks.blogfree.net";
urlAllowed [1]="http://supporto.forumfree.net";
urlAllowed [2]="http://newsboard.forumfree.net";
urlAllowed [3]="http://www.google.it";
var tagboardv = document.tagboard ? document.tagboard : 0;
if(tagboardv) {
function noSpam() {
View gist:11083106
#Sfondidesktopgratis.net per aggiungere rewriterules all'htaccess dopo aver cambiato la directory by Simone Manduchi (2014)
import lxml.html
var_dir=input('Directory:')
var_new_dir=input('Nuova directory:')
errors=''
print('Inizializzazione... \n')
list_file = open("/home/user/Desktop/lista-da-php.txt")
var_list_file = list_file.read()
var_list_file=var_list_file.split('&&&')
View gist:10970637
# -*- coding: utf-8 -*-
'''
###TriviaBot###
Realizzato da Simone Manduchi e Nicola Bizzoca per forumfree.it
Ultima modifica: 3/9/2010
'''
from irclib import SimpleIRCClient
import random
import timed85vg4fd8v4AAFR&CGVD
View gist:10970554
# -*- coding: utf-8 -*-
'''Questo BOT tiene i record degli utenti su vari canali. In caso di disconnessione i dati rimarranno
disponibili. Prima di installarlo creare nella stessa directory un file vuoto records.pkl'''
#Creato da Simone Manduchi per forumfree.it (2010)
from irclib import SimpleIRCClient
import pickle
class IRCCLient(SimpleIRCClient):
def __init__(self, channel):
SimpleIRCClient.__init__(self)
View gist:10970451
#universalsite.org
#created by Simone Manduchi (2010)
import sys
import webbrowser
import random
from PyQt4 import QtGui
from PyQt4 import QtCore
View gist:10970404
#http://www.universalsite.org/forum/informatica/tool-auto-aggiornante-ogame-pseudo-cheat/
#created by Simone Manduchi (2009)
import webbrowser
import random
import time
print 'http://www.universalsite.org/forum/informatica/tool-auto-aggiornante-ogame-pseudo-cheat/ - (C) 2009'
a=input('Tempo minimo: ')
b=input('Tempo massimo: ')
u=raw_input('Universo(uniXX o nome uni): ')
l=input('Numero di aggiornamenti da fare: ')