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 typing import Collection, List | |
from random import randint, shuffle | |
from scapy.layers.inet import IP, TCP | |
from scapy.sendrecv import sr | |
SEQ_MAX = 2**32-1 # valor limite de bits no ipv4 | |
LIMIT_PORT = 49151 # valor limite de portas definidos pela organização IANA | |
SYN_FLAG = "S" | |
SYN_ACK_FLAG = SYN_FLAG + "A" | |
DEFAULT_TIMEOUT = 3 |
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 scapy.all import * | |
import ipaddress | |
ports = [25,80,53,443,445,8080,8443] | |
def SynScan(host): | |
ans, uans = sr( | |
IP(dst=host)/ | |
TCP(sport=65535,dport=ports,flags="S"), | |
timeout=2, verbose=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
from typing import Collection, List | |
from random import randint, shuffle | |
from scapy.layers.inet import IP, TCP | |
from scapy.sendrecv import sr | |
SEQ_MAX = 2**32 - 1 | |
EPHEMERAL_RANGE = (2**14 + 2**15, 2**16 - 1) # According to the IANA | |
SYN_FLAG = "S" | |
SYN_ACK_FLAG = SYN_FLAG + "A" |
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
%%cu | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <cuda_runtime.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#include <assert.h> | |
#define DT 0.0070710676f // delta t |
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 matrix import Matrix | |
import math | |
class RedeNeural(): | |
nodes_input = [] | |
nodes_hidden = [] | |
nodes_output = [] | |
bias_in_to_hidden = [] | |
bias_hidden_to_output = [] | |
weight_in_to_hidden = [] |
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 random | |
import numpy as np | |
import math | |
class Matrix(): | |
rows = 0 | |
cols = 0 | |
data = [] | |
def create_matrix(self, rows, cols): |
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
# Primeiro vamos implementar uma função de ativação | |
funcao.ativacao <- function(v){ | |
# Função logística | |
y <- 1 / (1 + exp(-v)) | |
return(y) | |
} | |
# Vamos também precisar da derivada da função de ativação |
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 selenium import webdriver | |
import time | |
from selenium.webdriver.common.keys import Keys | |
driver = webdriver.Chrome() | |
driver.implicitly_wait(10) | |
#open spotify | |
driver.get('https://open.spotify.com/collection/tracks') |
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
[ | |
{ | |
"_id":{ | |
"$oid":"5a299c91ad921d6f048f7cdd" | |
}, | |
"indicadorAssinado":false, | |
"motivoConfInstSup":null, | |
"codSituacaoFiliacaoAtual":1, | |
"dataPedido":{ |
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
# instalar o rbenv | |
cd ~ | |
rm -rf .rbenv/ | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
source ~/.bashrc |
NewerOlder