import numpy as np

# Perceptron
def predict_perceptron(inputs, weights):
    if np.dot(inputs, weights) > 0:
        return 1
    else:
        return 0

def predict_perceptron_proper(inputs, weights):

    def step_function(input):
        return 1 if input > 0 else 0

    def linear_model(inputs, weights):
        return np.dot(inputs, weights)

    return step_function(linear_model(inputs, weights))

def neuron(inputs, weights):

    def sigmoid_function(input):
        return 1 / (1 + np.exp(-1 * input))

    def linear_model(inputs, weights):
        return np.dot(inputs, weights)

    return sigmoid_function(linear_model(inputs, weights))

neural_network = neuron(neuron(inputs, weights1), weights2)

[((5, 7, 5, 30), 'numpy.dot', 'np.dot', ({(5, 14, 5, 20): 'inputs', (5, 22, 5, 29): 'weights'}, {}), '(inputs, weights)', True, 'import numpy as np\n'), ((16, 15, 16, 38), 'numpy.dot', 'np.dot', ({(16, 22, 16, 28): 'inputs', (16, 30, 16, 37): 'weights'}, {}), '(inputs, weights)', True, 'import numpy as np\n'), ((26, 15, 26, 38), 'numpy.dot', 'np.dot', ({(26, 22, 26, 28): 'inputs', (26, 30, 26, 37): 'weights'}, {}), '(inputs, weights)', True, 'import numpy as np\n'), ((23, 24, 23, 42), 'numpy.exp', 'np.exp', ({(23, 31, 23, 41): '(-1 * input)'}, {}), '(-1 * input)', True, 'import numpy as np\n')]