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 | |
import os | |
import sys | |
import Image | |
EXTENSIONS = ".jpg", ".jpeg", ".png", ".bmp", ".tif" | |
SIZE = 1024, 768 | |
def redimensionar_imagens(dir_): |
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 | |
# forma de uso ./exportar <host> <porta> <nome_do_banco_de_dados> <usuario> <senha> <caminho> <formato> | |
# este script depende de: lib32z1 lib32ncurses5 lib32bz2-1.0 e filegdbapi | |
export SHAPE_ENCODING="ISO-8859-1" | |
SERVIDOR=$1 | |
PORTA=$2 | |
BANCO_DADOS=$3 | |
USUARIO=$4 | |
SENHA=$5 |
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
class AppModelMixin(models.Model): | |
""" | |
Este modelo tem em seus atributos dados para referenciar uma | |
aplicação e um modelo django. | |
""" | |
app = models.CharField(max_length=128, | |
verbose_name=u"Aplicação Django", | |
help_text=u"Aplicação Django que contém o modelo em questão") | |
modelo = models.CharField(max_length=128, | |
verbose_name=u"Modelo Django", |
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 | |
SERVIDOR=$1 | |
PORTA=$2 | |
BANCO_DADOS=$3 | |
USUARIO=$4 | |
SENHA=$5 | |
CAMINHO_SAIDA=$6 | |
NOME_TABELA=$7 | |
NOME_VIEW=$8 |
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
from django.template import Library | |
register = Library() | |
@register.filter | |
def split_timeuntil(duration, chunks=1): | |
return ", ".join(duration.split(",")[0:chunks]) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>SIG SMTT</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<script src="http://www.openlayers.org/api/OpenLayers.js"></script> | |
<script type="text/javascript"> | |
var map; | |
function init(){ | |
map = new OpenLayers.Map('map'); |
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
from django.template.loader import get_template | |
from django.template import Context | |
import cStringIO as StringIO | |
import cgi | |
import ho.pisa as pisa | |
def render_to_pdf(template_src, context_dict): | |
template = get_template(template_src) | |
context = Context(context_dict) | |
html = template.render(context) |
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
@staticmethod | |
def para_ptl(xo,yo,zo,lato,lono,x_geoc,y_geoc,z_geoc): | |
""" | |
xo,yo,zo = origem geocentrica; | |
lato,lono = origem em lat long; | |
x_geoc,y_geoc,z_geoc = ponto a ser convertido; | |
""" | |
rlat = radians(lato) | |
rlot = radians(lono) |
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
[TestFixture] | |
public class ConverterUnitTest | |
{ | |
[SetUp] | |
public void Init() | |
{ | |
var aoInit = new AoInitializeClass(); | |
aoInit.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcInfo); | |
} |
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
public class ParentFinders | |
{ | |
private static ILog _log = LogManager.GetLogger(typeof(ParentFinders)); | |
public static IObject FindParentAmbiguous(IObject obj, ITable parentTable) | |
{ | |
_log.IfInfo("Utilizando método 'toca' para encontrar objeto pai."); | |
if (!(parentTable is IFeatureClass)) | |
throw new ArgumentException("parentTable não é uma feature class."); |
OlderNewer