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
import numpy as np | |
import pandas as pd | |
from sklearn.linear_model import LinearRegression | |
# Create a predictor X | |
X = np.random.default_rng().normal(size=100) | |
# Create a Noise Vector e | |
e = np.random.default_rng().normal(size=100) | |
B_0 = 0.5 |
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
-- retorna a cidade com maior nome | |
( | |
select city, char_length(city) | |
from station | |
order by 2 desc, 1 asc | |
limit 1 | |
) | |
union all |
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
principal = {'titulos': []} | |
for match_titulo in FIND_TITLE.finditer(cf): | |
titulo = {'titulo_identificador': match_titulo.group('titulo_numero'), 'capitulos': []} | |
principal['titulos'].append(titulo) | |
for match_capitulo in FIND_CHAPTER.finditer(match_titulo.group(0)): | |
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
principal = {'titulos': []} | |
# for... | |
titulo = {'titulo_identificador': ..., 'capitulos': []} | |
principal['titulos'].append(titulo) | |
# for... | |
capitulo = {'capitulo_identificador': ...} | |
titulo['capitulos'].append(capitulo) |
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
Capítulo\s(?P<n>\d+)(?P<c>.*?)((?=Capítulo)|(?=$)) | |
Capítulo 1 | |
Art 1 | |
Art 2 | |
Capítulo 3 | |
Art 3 | |
Capítulo 4 | |
Art 4 |
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
#Download the content | |
import requests | |
#Parse | |
from bs4 import BeautifulSoup | |
#Catch the content | |
from lxml import etree | |
#Extrair números e símbolos | |
import re | |
#Biblioteca spacy |
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
Alunos: | |
Foi removida a coluna "Tipo de arquivo" | |
Foi removida a coluna "Sexo" | |
Atentar para que a regra que impõe não informar "Não dispõe da informação" para o campo "Cor/Raça" manteve o ano limite, 2014 | |
Foi removida a coluna "Nome completo da mãe" |
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
create temporary table a (id serial primary key); | |
create temporary table b (nome text not null) inherits (a); | |
create temporary table c (id_a int not null references a(id)); | |
insert into b values (default, 'teste'); | |
select * from a; | |
-- 1 | |
insert into c values (1); |
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
from urllib.request import urlopen | |
url = 'https://raw.githubusercontent.com/AmitMY/chimera/master/git-assets/enriched/dev.json' | |
output = urlopen(url).read() | |
j = json.loads(output) | |
len(j) | |
# Out[7]: 1642 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder