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 -*- | |
################################################################################## | |
# Script python para gerar vários documentos usando um DOCX como template | |
# e uma planilha XLSX como base de dados. | |
# é necessário ter um template preparado antes. | |
# | |
# Autor: Kyle Felipe Vieira Roberto | |
# Data de Criação: quarta-feira 19 de julho de 2017 | |
# |
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
def sql_insert(tab_origem, tab_destino): | |
"""Gera um SQL de insert no BD genérico, tem de definir a conexão com o BD | |
A ordem das colunas de destino devem estar na mesma ordem da coluna de origem""" | |
cur = conn.cursor() | |
# Caso vá buscar dados de uma tabela e inserir em outra essa variável deverá receber o nome da tabela | |
tab_origem = "" | |
# Pegando as colunas da tabela origem | |
origem = cur.execute("PRAGMA table_info({0});".format(tab_origem)) | |
# Pegando as colunas da tabela origem |
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 -*- | |
from qgis.core import * | |
from qgis.gui import * | |
from re import sub | |
@qgsfunction(args="auto", group='Lista') | |
def verifica_valor(lista, divisor, dado, feature, parent): | |
""" Essa funcao verifica se o se um determinado valor encontra-se dentro de uma determinada lista. | |
LISTA = coluna onde encontra-se o dado. |
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 |
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
# -*- 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
# -*- 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
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
<!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
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){ |
OlderNewer