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 sys | |
from pandas import DataFrame | |
def optimal_bst(keys, frequencies): | |
n = len(keys) | |
cost = [[0 for j in range(n)] for i in range(n)] # Cria matriz com elementos = nulo | |
# Popula diagonal | |
for i in range(n): |
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 multiprocessing | |
import operator | |
import string | |
from functools import reduce | |
import itertools | |
def remove_punctuation(text): | |
translator = str.maketrans({key: None for key in string.punctuation}) |
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 requests | |
response = requests.get('http://www.americanas.com') | |
print(response.text) |
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 requests | |
urls = ( | |
'http://www.americanas.com', | |
'http://www.submarino.com', | |
'http://www.shoptime.com', | |
'http://www.soubarato.com', | |
) | |
for url in urls: |
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 os | |
import requests | |
from multiprocessing import Pool | |
urls = ( | |
'http://www.americanas.com', | |
'http://www.submarino.com', | |
'http://www.shoptime.com', | |
'http://www.soubarato.com', |
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 os | |
import requests | |
from multiprocessing.pool import ThreadPool as Pool | |
urls = ( | |
'http://www.americanas.com', | |
'http://www.submarino.com', | |
'http://www.shoptime.com', | |
'http://www.soubarato.com', |
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 asyncio | |
from aiohttp import ClientSession | |
urls = ( | |
'http://www.americanas.com', | |
'http://www.submarino.com', | |
'http://www.shoptime.com', | |
'http://www.soubarato.com', | |
) |
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 asyncio | |
from aiohttp import ClientSession | |
urls = ( | |
'http://www.americanas.com', | |
'http://www.submarino.com', | |
'http://www.shoptime.com', | |
'http://www.soubarato.com', | |
) |
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
#include<locale.h> | |
#include<stdio.h> | |
void main () | |
{ | |
// Cidade Quilometro | |
// Rio 9 | |
// Minas 7 | |
// Espirito Santo 6 | |
// São Paulo 12 |
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 asyncio | |
import sys | |
from asyncio.streams import StreamWriter | |
from asyncio.unix_events import _set_nonblocking | |
class StdoutProtocol(asyncio.Protocol): | |
pass | |
class StderrProtocol(asyncio.Protocol): |
OlderNewer