wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update -y
sudo apt-get install -y erlang erlang-nox
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 <stdio.h> | |
int main(int argc, char *argv[]){ | |
char *str = argv[1]; | |
FILE *fp; | |
char buff[255]; | |
fp = fopen("casos_teste/i_test", "r"); | |
char c; |
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 | |
# Url base da pagina do Whitesnake no Letras.com | |
url = 'https://www.letras.com/whitesnake/' | |
# Fazer uma requisição do tipo get a url que definimos | |
response = requests.get(url) | |
# Status da requisição (200 quer dizer que foi Ok!) | |
print('Status da requisição: ',response.status_code, '\n') |
Para os exercícios utilize o Wireshark para capturar os pacotes. A resposta deverá conter sua análise e um screenshot do wireshark (que permita observar a resposta).
Limpe o cache do seu navegador. Acesse o site https://www.w3.org/ Observe os pacotes capturados e identifique:
Acesse a página http://news.mit.edu/2017/tim-berners-lee-wins-turing-award-0404
Aplique o filtro HTTP para ver apenas os pacotes do protocolo HTTP.
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
/* | |
Railscasts-like style (c) Visoft, Inc. (Damien White) | |
*/ | |
.hljs { | |
display: block; | |
overflow-x: auto; | |
padding: 0.5em; |
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 | |
from sklearn.neighbors import KNeighborsClassifier | |
from sklearn.naive_bayes import GaussianNB | |
from sklearn.tree import DecisionTreeClassifier | |
from numpy import random | |
X = np.genfromtxt('bases/iris.data', dtype=None, delimiter=',', usecols=(0, 1, 2, 3)) | |
y = np.genfromtxt('bases/iris.data', dtype=None, delimiter=',', usecols=[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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <pthread.h> | |
#include <sys/time.h> | |
#define N_THREADS 4 | |
typedef struct { | |
int x; |
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
float f (float V) | |
{ | |
float fx1; | |
fx1 = (p + a*pow((N/V), 2))*(V - N*b) - k*N*T; | |
return (fx1); | |
} | |
float df (float V) | |
{ | |
float fx1; |