Skip to content

Instantly share code, notes, and snippets.

View george-silva's full-sized avatar
🌊

George Silva george-silva

🌊
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Core.GIS.Geodatabase;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
namespace Core.GIS.Carto
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Output;
using ESRI.ArcGIS.esriSystem;
@george-silva
george-silva / timeutils.py
Created January 23, 2015 13:51
Templatetag to limit the output of timeuntil.
from django.template import Library
register = Library()
@register.filter
def split_timeuntil(duration, chunks=1):
return ", ".join(duration.split(",")[0:chunks])
@george-silva
george-silva / ex_fgdb.shp
Last active August 29, 2015 14:10
Main script file and supporting scripts
#!/bin/bash
SERVIDOR=$1
PORTA=$2
BANCO_DADOS=$3
USUARIO=$4
SENHA=$5
CAMINHO_SAIDA=$6
NOME_TABELA=$7
NOME_VIEW=$8
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",
@george-silva
george-silva / exportar.sh
Created July 11, 2014 13:22
exportação em lote postgis
#!/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
#!/usr/bin/env python
import os
import sys
import Image
EXTENSIONS = ".jpg", ".jpeg", ".png", ".bmp", ".tif"
SIZE = 1024, 768
def redimensionar_imagens(dir_):
public class GeradorMemorialDescritivo
{
public GeradorMemorialDescritivo()
{}
public IMemorialDescritivo GerarMemorial(IFeature feature)
{
var geometria = feature.ShapeCopy as IPointCollection;
var lista = new List<IAzimuteDistancia>();
@george-silva
george-silva / server.py
Created January 9, 2014 21:56
Twisted huh?
# coding: utf-8
from twisted.internet.protocol import Factory
from twisted.protocols.basic import LineReceiver
from twisted.internet import reactor
class Gateway(LineReceiver):
"""Classe para lidar com as conexões"""