This file contains hidden or 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
import os, sys, shutil | |
from qgis.PyQt.QtWidgets import QFileDialog | |
getFolder = QFileDialog().getExistingDirectory() | |
arquivos = [] | |
def renameFile(filePath, newFileName): | |
"""Funcao que renomeia o arquivo extraido""" | |
newName = f"{filePath}{os.sep}{newFileName.split('.')[0]}.kml" |
This file contains hidden or 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
""" | |
Faz transposição de dados usando como coluna os valores no segundo campo da | |
da camada e o terceiro como valores. | |
A camada a ser transposta precisa estar ativa no painel de camadas. | |
""" | |
from copy import copy | |
from qgis.PyQt.QtCore import QVariant |
This file contains hidden or 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
// Preenche dois selects, um com os estados brasileiros e o outro com os municipios daquele estado | |
// conforme o estado vai mudando | |
// a `option` do estado tem o valor a sigla do estado, e o texto interno o nome do estado | |
// a `option'do município tem o valor o geocódgo (IBGE) do município e o texto o nome do município | |
// geocódigo é o código IBGE para a região demarcada por ele, como estados e municípios. | |
// Não estou usando geocódigo nos estados... | |
const estados = document.getElementById('id-do-select-do-estado'); | |
const muncipiosDoEstado = document.getElementById('id-do-select-do-municipio'); | |
function populaSelecao(opcoes, elemento) { |
This file contains hidden or 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
const pattern = /^([0-9]{0,2})\/([0-9]{2})\/([0-9]{4})$/; | |
const dataInicio = document.getElementById('data-inicio'); | |
dataInicio.addEventListener("keypress", function(e){ | |
if (e.keyCode === 13){ | |
validaData(); | |
} | |
}); | |
function validaData(){ | |
if (dataInicio.value.match(pattern) === null){ |
This file contains hidden or 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> | |
<meta charset=utf-8 /> | |
<link rel="stylesheet" href="style.css"> | |
<title>Meme Generator Plus Tabajara</title> | |
</head> | |
<body> | |
<header class="header"> | |
<h1 class="center">Meme Generator Plus Tabajara</h1> |
This file contains hidden or 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
echo "Oi galera, vamos bater um papo atoa aqui!" |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
*************************************************************************** | |
Grass7Algorithm.py | |
--------------------- | |
Date : February 2015 | |
Copyright : (C) 2014-2015 by Victor Olaya | |
Email : volayaf at gmail dot com | |
*************************************************************************** |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
u"""verificando se uma matriz quadrada é triangular superior ou inferior.""" | |
mat2 = ([0, 2, 3], [0, 1, 3], [0, 0, 3]) | |
mat2 = ([0, 0, 0], [1, 1, 0], [1, 2, 0]) | |
mat2 = ([1, 1, 1], [1, 1, 1], [1, 1, 1]) | |
mat = ([0, 0, 0], [0, 0, 0], [0, 0, 0]) | |
# testando superior | |
triangular = [] | |
for lin in mat: |
This file contains hidden or 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 -*- | |
# Python 2 | |
import os | |
from sqlite3 import dbapi2 as db | |
db_folder = "/" | |
db_name = "test" |
This file contains hidden or 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
import os | |
from osgeo import gdal, ogr, osr | |
import sys | |
def initFields(in_lyr, out_lyr): | |
#Arbitrarily get the first feature | |
feat = in_lyr[0] | |
#loop over each field |