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
{"value":1277.8807,"description":"sum of:","details":[{"value":1071.0992,"description":"sum of:","details":[{"value":18.746872,"description":"sum of:","details":[{"value":13.116461,"description":"weight(_pt_all:\"(exame pericia) pericial\"~2 in 2063381) [PerFieldSimilarity], result of:","details":[{"value":13.116461,"description":"score(freq=3.0), computed as boost * idf * tf from:","details":[{"value":2.2,"description":"boost","details":[]},{"value":7.4051723,"description":"idf, sum of:","details":[{"value":1.8479005,"description":"idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:","details":[{"value":23313910,"description":"n, number of documents containing term","details":[]},{"value":147961299,"description":"N, total number of documents with field","details":[]}]},{"value":2.9448743,"description":"idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:","details":[{"value":7784048,"description":"n, number of documents containing term","details":[]},{"value":147961299,"description":"N, total numb |
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 multiprocessing import Process, Queue | |
import time | |
from random import randint | |
def calcula_percent(q_entrada,q_saida): | |
# Realiza o cálculo | |
lista_fatiada = q_entrada.get() | |
resultado = [] | |
for elemento in lista_fatiada: | |
resultado.append(elemento * 0.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
import socket, os | |
PORTA = 9091 | |
socket_servidor = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
host = socket.gethostbyname("") | |
socket_servidor.bind((host, PORTA)) | |
socket_servidor.listen() | |
print("Servidor de nome", host, "esperando conexão na porta", PORTA) | |
while True: |
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 socket, sys, os | |
# Cria o socket | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
nome_arq = input('Entre com o nome do arquivo: ') | |
"/Users/thaisviana/Downloads/infnet.png" | |
try: | |
# Tenta se conectar ao servidor | |
s.connect((socket.gethostbyname(""), 9091)) | |
# Envia o nome do arquivo: |
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 pygame | |
from random import randint | |
from CONSTANTS import largura_tela, altura_tela, q_largura, q_altura | |
class Quadradinho(): | |
def __init__(self): | |
self.largura = q_largura | |
self.altura = q_altura | |
self.x = randint(0, largura_tela-self.largura) | |
self.y = randint(0, altura_tela-self.altura) |
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 pygame | |
from CONSTANTS import largura_tela, altura_tela, cor, tempo_total_do_jogo,numero_inicial_de_quadradinhos | |
from Quadradinho import Quadradinho | |
from time import sleep | |
def mostra_tempo(tempo, pontos): | |
font = pygame.font.Font(None, 24) | |
text = font.render(f"Tempo: {tempo}s | Pontuação: {pontos}", 1, cor['BRANCO']) | |
textpos = text.get_rect(centerx=tela.get_width()/2) | |
tela.blit(text, textpos) |
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 pygame | |
from pygame.locals import * | |
from grafico import desenha_grafico | |
pygame.init() | |
window = pygame.display.set_mode((600, 800), DOUBLEBUF) | |
screen = pygame.display.get_surface() | |
param1, param2 = 0 , 0 | |
canvas, raw_data = desenha_grafico(param1, param2) |
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 matplotlib | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import matplotlib.backends.backend_agg as agg | |
import pylab | |
matplotlib.use("Agg") | |
def desenha_grafico(param1, param2): |
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
datestr | A_minus | A_plus | AB_minus | AB_plus | B_minus | B_plus | O_minus | O_plus | total | |
---|---|---|---|---|---|---|---|---|---|---|
20130101 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | |
20130102 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | |
20130103 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | |
20130104 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | |
20130105 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | |
20130106 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | |
20130107 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | |
20130108 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | |
20130109 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 |
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 pygame | |
BRANCO = (255,255,255) | |
PRETO = (0,0,0) | |
LARANJA = (246,130,0) | |
VERMELHO = (230,0,0) | |
pygame.init() | |
largura_tela, altura_tela = 1024, 800 | |
tela = pygame.display.set_mode((largura_tela, altura_tela)) |
NewerOlder