Skip to content

Instantly share code, notes, and snippets.

View mauriciodev's full-sized avatar

Mauricio de Paulo mauriciodev

  • Rio de Janeiro, RJ, Brasil
View GitHub Profile
@mauriciodev
mauriciodev / minimalPythonThread.py
Created August 1, 2011 17:32
Minimal Python Thread example with a progress bar and something that keeps emiting signals from time to time. Requires a simples UI with a progress bar.
from progress_ui import Ui_Dialog
from PyQt4 import QtCore, QtGui
import sys, time
class mythread(QtCore.QThread):
def __init__(self,parent,n):
QtCore.QThread.__init__(self,parent)
self.n=n
def run(self):
@mauriciodev
mauriciodev / eclipseRemoteDebugger.py
Created August 1, 2011 17:37
Eclipse Remoter Debugger minimal code. Usefull for plugin developpers.
import os,sys
#lines for eclipse debug. Comment me when publishing.
sys.path.append("/usr/lib/eclipse/plugins/org.python.pydev.debug_1.5.3.1260479439/pysrc/")
import pydevd
pydevd.settrace()
#end of eclipse debug
@mauriciodev
mauriciodev / gdalCordinateTransform.py
Created August 1, 2011 17:41
GDAL coordinate transformation example
import osr
srE=osr.SpatialReference() #spatial reference Entrada
srE.ImportFromEPSG(4291) #wgs latlon
srE.ExportToWkt()
srS=osr.SpatialReference() #spatial reference Saida
srS.ImportFromEPSG(29181) #wgs utm 21S
srS.ExportToWkt()
ct=osr.CoordinateTransformation(srE,srS)
@mauriciodev
mauriciodev / sbc.csl
Created August 19, 2011 21:35
Preliminary Zotero Style for Sociedade Brasileira de Computação
<?xml version="1.0" encoding="UTF-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="in-text" default-locale="en-US">
<info>
<title>Sociedade Brasileira de Computação</title>
<id>http://www.zotero.org/styles/sbc</id>
<link href="http://www.zotero.org/styles/abnt" rel="self"/>
<author>
<name>Maurício de Paulo</name>
<email>mauricio dot dev at gmail dot com</email>
</author>