- Aeroporto
- Alameda
- Área
- Avenida
- Campo
- Chácara
- Colônia
- Condomínio
- Conjunto
- Distrito
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 bash | |
mpid=$1 | |
pgrep -f $mpid | awk 'NR == 1 {print}' | xargs pgrep -P | xargs kill -9 |
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
#' Lê informações do emitente e converte em tibble | |
#' | |
#' @param arquivos Vetor de arquivos | |
#' @param diretorio Informar diretório se não informar arquivos | |
#' | |
#' @return tibble | |
#' @export | |
#' | |
nfe_emitente <- function(arquivos = NULL, diretorio = "."){ | |
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
tpu_ultima_versao <- function(){ | |
url1 <- "https://www.cnj.jus.br/sgt/sgt_ws.php" | |
corpo <- '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sgt="https://www.cnj.jus.br/sgt/sgt_ws.php"> | |
<soapenv:Header/> | |
<soapenv:Body> | |
<sgt:getDataUltimaVersao/> | |
</soapenv:Body> |
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
#' Creates a ggplot funnel based on a decreasing numeric vector | |
#' | |
#' @param x Decreasing numeric vector | |
#' @param text Text vector to annotate the funnel. | |
#' @param color Vector of colors | |
#' | |
#' @return ggplot funnel object | |
#' @details This function needs improvement. I made it ad doc. | |
#' @export | |
#' |
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
WITH cte1 AS ( | |
SELECT relname | |
FROM pg_class AS pc | |
INNER JOIN pg_namespace AS pn | |
ON pn.oid = pc.relnamespace | |
WHERE pn.nspname = 'public' -- indique outro schema eventualmente | |
AND relkind = 'r' | |
) | |
SELECT string_agg('DROP table ' || relname || ' cascade' || ';', E'\n') AS apagar_tabelas FROM cte1; \gset |
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
#' Replaces NULLs in a list | |
#' | |
#' @param x List of values | |
#' @param replacement A replacement value | |
#' | |
#' @return Same list with NULLs replaced. | |
#' @export | |
#' | |
#' @examples | |
#' x <- list(y = 2, z = NULL) |
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
listar_grupos <- function(token){ | |
group_fields <- "name,metadata,clientData,groupType" | |
page_size <- 1000 | |
req <- request_build(path = "/v1/contactGroups", | |
base_url = "https://people.googleapis.com", | |
params = list(groupFields= group_fields, |
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
#' Mascara coluna com url(link) com hyperlink e salva em excel. | |
#' | |
#' @param data Dataframe com coluna com o link ou url a ser mascarada | |
#' @param col_link Coluna com link ou url | |
#' @param col_texto Coluna com texto (máscara) | |
#' @param novo_nome Novo nome da coluna. Opcional. Se não informada | |
#' receberá o mesmo nome da coluna col_link. | |
#' @param arquivo Nome do arquivo que armazenará o excel. | |
#' | |
#' @return arquivo excel |
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
tjmt_baixar_cjsg <- function(busca = "", diretorio = "."){ | |
uri <- "https://jurisprudencia-api.tjmt.jus.br/api/Consulta?" | |
corpo <- | |
list( | |
filtro.isBasica = "true", | |
filtro.indicePagina = "1", | |
filtro.quantidadePagina = "5", |