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 | |
# Criado em:Seg 06/Jul/2009 hs 17:53 | |
# Last Change: Seg 06/Jul/2009 hs 17:53 | |
# vim:ft=sh:fdm=syntax:nu: | |
# Instituicao: cpqt | |
# Proposito do script: instalar o inkscape 0.47 no linux educacional | |
# Autor: Sérgio Luiz Araújo Silva | |
# site: http://vivaotux.blogspot.com | |
# para instalar manualmente siga este link |
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 | |
# bigfiles.py - Generate a list of the largest files within a subdir | |
# Copyright (C) 2007 Dan Noe / isomerica.net | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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 -*- | |
# Criado em:Ter 02/Mar/2010 hs 11:58 | |
# Last Change: Ter 02 Mar 2010 18:18:43 BRT | |
# vim:ft=python:nolist:nu: | |
# Instituicao: none | |
# Proposito do script: pesquisar tags populares no delicious | |
# Autor: Sérgio Luiz Araújo Silva | |
# site: http://vivaotux.blogspot.com |
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
""" Le um arquivo delimitado e mostra os campos na tela. | |
source: http://aprenda-python.blogspot.com/2008/10/exemplo-3-ler-arquivo-csv-e-mostrar.html | |
""" | |
import csv | |
print __doc__ | |
f = csv.reader(open('fones.txt'), delimiter=';') | |
for [nome,nasc,fone] in f: | |
print 'nome=%s | nasc=%s | fone=%s' % (nome,nasc,fone) |
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
# source: http://stackoverflow.com/questions/517970/how-to-clear-python-interpreter-console | |
import os | |
def cls(): | |
os.system(['clear','cls'][os.name == 'nt']) | |
# now, to clear the screen | |
cls() |
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
# First, import itertools: | |
# source: http://stackoverflow.com/questions/104420/how-to-generate-all-permutations-of-a-list-in-python | |
import itertools | |
# Permutation: | |
print list(itertools.permutations([1,2,3,4], 2)) | |
[(1, 2), (1, 3), (1, 4), | |
(2, 1), (2, 3), (2, 4), |
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 -*- | |
# Criado em:Sáb 06/Mar/2010 hs 08:09 | |
# Last Change: Sáb 06 Mar 2010 08:40:18 BRT | |
# vim:ft=python:nolist:nu: | |
# Instituicao: cpqt | |
# Proposito do script: apihelper - acesso à documentação dos módulos | |
# Autor: Sérgio Luiz Araújo Silva | |
# site: http://vivaotux.blogspot.com |
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 | |
# Criado em:Qui 23/Abr/2009 hs 22:58 | |
# Last Change: Qua 24 Fev 2010 09:49:54 BRT | |
# vim:ft=sh:fdm=syntax:nu: | |
# Instituicao: none | |
# Proposito do script: instalar codecs e outros programas no ubuntu karmic 9.10 | |
# Autor: Sérgio Luiz Araújo Silva | |
# site: http://vivaotux.blogspot.com | |
# cabeçalho |
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 -*- | |
# Criado em:Qui 11/Mar/2010 hs 08:19 | |
# Last Change: Qui 11 Mar 2010 08:52:48 BRT | |
# vim:ft=python:nolist:nu: | |
# Instituicao: none | |
# Proposito do script: calcular sequencia de fibonacci | |
# Autor: Sérgio Luiz Araújo Silva | |
# site: http://vivaotux.blogspot.com | |
""" |
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 -*- | |
# Criado em:Qui 11/Mar/2010 hs 13:34 | |
# Last Change: Qui 11/Mar/2010 hs 13:34 | |
# vim:ft=python:nolist:nu: | |
# Instituicao: <+nome+> | |
# Proposito do script: <+descreva+> | |
# Autor: <+seuNome+> | |
# site: <+seuSite+> |