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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-3.3.1.js"></script> | |
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script> | |
<script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap.min.js"></script> | |
<script src="https://cdn.datatables.net/fixedcolumns/3.2.6/js/dataTables.fixedColumns.min.js"></script> | |
<script src="https://cdn.datatables.net/fixedheader/3.1.5/js/dataTables.fixedHeader.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> | |
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap.min.css" /> |
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 pprint | |
html = ( | |
'<p>O <strong><a href="https://www.instagram.com/drviotto/">Dr. Viotto</a>' | |
'</strong> já se tornou referência na ' | |
'<img src=http://slex.com.br/f1.jpg>' | |
'odontologia em nível nacional e um ' | |
'dos mais <img src=\'http://slex.com.br/f2.jpg\' /> slex renomados ' | |
'dentistas do Brasil. Conhecido não apenas dos ' | |
'profissionais da área médica mas também do público em geral por ser o ' |
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
function dePara(de,para){var t=0;if(document.documentElement.innerText.indexOf(de)===-1)return t;Array.from(document.getElementsByTagName("*")).forEach(function(e){Array.from(e.attributes).forEach(function(f){if(['title','alt'].indexOf(f.name)>-1&&f.value){f.value=f.value.split(de).join(para);t++}});e.childNodes.forEach(function(f){if(f.nodeType===3&&f.nodeValue){f.nodeValue=f.nodeValue.split(de).join(para);t++}})});return t} | |
dePara('Compartilhe','Cadê DeDe???'); |
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 json | |
import flask | |
from decorator import decorator | |
def assert_error(): | |
@decorator | |
def _fn(f: callable, *args, **kwargs): | |
try: | |
return f(*args, **kwargs) | |
except Exception as exception: |
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
#!/bin/bash | |
# Deve ser executado de 15 em 15 minutos | |
# CRONTAB | |
# 0 15,30,45 * * * * script_semaphore.sh > script_semaphore.log 2>&1 | |
echo $(date) | |
DIR=$(dirname $0) | |
PIDFILE=${DIR}"/script_semaphore.pid" | |
PUBLICA=$(dirname $(dirname $(dirname $DIR))) |
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
-- http://www.gmapas.com/poligonos-ibge/municipios-do-brasil | |
-- Download do arquivo KML com 5.566 municípios brasileiros | |
-- https://docs.google.com/a/gmapas.com/file/d/0B2yOq3AMumqRM2Q0cXVETVJvb1U/edit | |
CREATE EXTENSION postgis; | |
CREATE TABLE cidades ( | |
id SERIAL PRIMARY KEY, | |
cidade VARCHAR(64), | |
estado VARCHAR(2), | |
polygon GEOMETRY |
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
class MyClass(object): | |
"""Legal.""" | |
def __init__(self, **kwargs): | |
object.__init__(self) | |
self._session = dict(**kwargs) | |
self._session['idade'] = 98 | |
self._a_salvar = [] |
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
// https://www.urionlinejudge.com.br/judge/en/problems/view/1566 | |
include <stdio.h> | |
#include <stdlib.h> | |
struct Node{ | |
int num; | |
struct Node *prox; | |
}; | |
typedef struct Node node; |
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: latin1 -*- | |
""" | |
Codigo para colocar uma imagem na orientacao correta. | |
""" | |
from PIL import Image | |
from PIL.ExifTags import TAGS | |
def get_exif(img): | |
info_exif = {} |
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
var noticias = {"ultimas": {"noticia/tecnologia": [{"pasta": "Noticia/Tecnologia", "imagem_330x220": "https://i.em.com.br/21JEkvZUvC5jrl0EdfTFTPe8cic=/330x220/smart/imgsapp.em.com.br/app/noticia_127983242361/2017/06/14/876552/20170614200611475069i.jpg", "imagem": "http://imgsapp.em.com.br/app/noticia_127983242361/2017/06/14/876552/20170614200611475069i.jpg", "url": "http://www.em.com.br/app/noticia/tecnologia/2017/06/14/interna_tecnologia,876552/netflix-supera-tvs-a-cabo-em-numero-de-assinantes-nos-estados-unidos.shtml", "titulo": "Netflix supera TVs a cabo em n\u00famero de assinantes nos Estados Unidos", "data": "19:56 14/06/2017", "descricao": "Servi\u00e7o de streaming de v\u00eddeos teve crescimento de 5,4 milh\u00f5es de assinantes por ano nos \u00faltimos cinco anos"}, {"pasta": "Noticia/Tecnologia", "imagem_330x220": "https://i.em.com.br/Ku6jryC0cpHHHoWwg-ivIaP6MhA=/330x220/smart/imgsapp.em.com.br/app/noticia_127983242361/2017/03/27/857434/20170327102023584363e.jpg", "imagem": "http://imgsapp.em.com.b |
NewerOlder