Skip to content

Instantly share code, notes, and snippets.

View demacdolincoln's full-sized avatar

Lincoln de Macêdo demacdolincoln

  • Brasil
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#Pkg.add("Primes")
using Primes
function genBigPrime()
prime = 0
while prime == 0
#possiblePrime = rand(BigInt(1e+50):BigInt(1e+100))
possiblePrime = Int(rand(1e+2:1e+4))
if isprime(possiblePrime)
prime = possiblePrime
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
dependências:
* python2
* opencv
* numpy
* matplotlib
"""
import cv2
import numpy as np
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
class Perceptron(object):
'''
Implementacao do perceptron
'''
def __init__(self, dimensoes):
'''
:dimensoes: list com o nome das variaveis de entrada
'''
for dim in dimensoes: