Skip to content

Instantly share code, notes, and snippets.

@riccardobenini
riccardobenini / progetto.py
Last active December 11, 2020 15:23
progetto
from math import *
def f(variabile):
return variabile+1
% This example requires PGF >= 1.09 and only works wit PDFTeX
% You have to compile document twice to get correct placement of nodes.
\documentclass{beamer} %
\usepackage{tikz}
\usepackage{verbatim}
\usetikzlibrary{arrows,shapes,backgrounds}
\begin{document}
@riccardobenini
riccardobenini / itemize_modificato.tex
Created October 14, 2013 14:38
A small gist to modify the output of the itemize environment through the enumitem package.
\begin{itemize}[itemsep=0mm,leftmargin=1cm,label=\checkmark]
\item
something
\end{itemize}
@riccardobenini
riccardobenini / update_python_on_mac.py
Created October 3, 2013 12:37
Python script to update the Apple Python distro to the most recent This is for python 3.3; change those version to 2.7 or what else if it applies. The script remove the default folder in system/library, then moves the latest installed version to the same folder. It also create the symbolic links and updates the executable in usr/bin necessary fo…
#!/bin/bash
rm -R /System/Library/Frameworks/Python.framework/Versions/3.3
mv /Library/Frameworks/Python.framework/Versions/3.3 /System/Library/Frameworks/Python.framework/Versions
chown -R root:wheel /System/Library/Frameworks/Python.framework/Versions/3.3
rm /System/Library/Frameworks/Python.framework/Versions/Current
ln -s /System/Library/Frameworks/Python.framework/Versions/3.3 /System/Library/Frameworks/Python.framework/Versions/Current
rm /usr/bin/pydoc
rm /usr/bin/python
@riccardobenini
riccardobenini / open_xls_as_xlsx.py
Created September 30, 2013 14:17
convert from xls to xlsx using xlrd and openpyxl found at http://stackoverflow.com/questions/9918646/how-to-convert-xls-to-xlsx
import xlrd
from openpyxl.workbook import Workbook
from openpyxl.reader.excel import load_workbook, InvalidFileException
def open_xls_as_xlsx(filename):
# first open using xlrd
book = xlrd.open_workbook(filename)
index = 0
nrows, ncols = 0, 0
while nrows * ncols == 0:
@riccardobenini
riccardobenini / script
Created August 30, 2013 10:56
Abilitare la selezione del testo in quick look
defaults write com.apple.finder QLEnableTextSelection -bool TRUE; killall Finder
@riccardobenini
riccardobenini / newsletter
Created August 5, 2013 09:35
Operazioni su due equazioni
eqnOperate[eqn1_, eqn2_, f_] :=
Equal @@ f @@ {List @@ eqn1, List @@ eqn2};