π¨βπ
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
class NeuralNetwork: | |
def __init__(self, x, y): | |
self.input = x | |
self.weights1 = np.random.rand(self.input.shape[1],4) | |
self.weights2 = np.random.rand(4,1) | |
self.y = y | |
self.output = np.zeros(self.y.shape) | |
def feedforward(self): | |
self.layer1 = sigmoid(np.dot(self.input, self.weights1)) |
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
#!/bin/bash | |
if [ -s "$1" ] | |
then | |
MONGO_STATUS=$(docker inspect -f {{.State.Running}} mongo) | |
if [ "$MONGO_STATUS" != "true" ] | |
then | |
echo "Mongo is not running" | |
exit 1 | |
fi |
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
#!/bin/bash | |
if [ -s "$1" ] | |
then | |
if [ "$(docker inspect -f {{.State.Running}} database)" != "true" ] | |
then | |
echo "Container MySql is not running" | |
exit 1 | |
fi | |
else | |
echo "Syntax: $0 <filename>" |
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
make_data_corr = function(corr, n){ | |
x = rnorm(n,0,1) | |
y = rnorm(n,0,1) | |
a = corr/(1-corr^2)^0.5 | |
z=a*x+y | |
the_data = data.frame(x,z) | |
return(the_data) | |
} | |
data=make_data_corr(0.99,50) |
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
ββββββββ¦ββββββββββββββ | |
β Dias β Altura (cm) β | |
β βββββββ¬ββββββββββββββ£ | |
β 10 β 5 β | |
β 12 β 6 β | |
β 13 β 7 β | |
β 15 β 8 β | |
β 19 β 13 β | |
β 25 β 16 β | |
ββββββββ©ββββββββββββββ |
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
# tks jerimi ann walker | |
make_data_correlated = function(corr, n){ | |
x = rnorm(n,0,1) | |
y = rnorm(n,0,1) | |
a = corr/(1-corr^2)^0.5 | |
z=a*x+y | |
the_data = data.frame(x,z) | |
return(the_data) | |
} |
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
# -*- coding:utf-8 -*- | |
import scrapy | |
from scrapy.exceptions import CloseSpider | |
class LoginSpider(scrapy.Spider): | |
name = 'login-spider' | |
start_urls = ['http://quotes.toscrape.com/login'] | |
def parse(self, response): |
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
var http = require("http"); | |
var fs = require("fs"); | |
var index = fs.readFileSync("index.html"); | |
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/test'); | |
var db = mongoose.connection; |
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
// | |
// QSQLite3.swift | |
// SQLiteWrapper | |
// | |
// Created by Danilo Altheman on 24/06/15. | |
// Copyright Β© 2015 Quaddro - Danilo Altheman. All rights reserved. | |
/* Usage: | |
// Open or create a Database | |
let database = QSQLite3(path: NSHomeDirectory() + "/Documents/database.sqlite") | |
NewerOlder