Skip to content

Instantly share code, notes, and snippets.

View yanCode's full-sized avatar
🏠
Working from home

Zhang ShengYan yanCode

🏠
Working from home
  • Suzhou, JiangSu, China
View GitHub Profile
@yanCode
yanCode / neural-network-from-scratch.py
Created October 20, 2022 00:36 — forked from svpino/neural-network-from-scratch.py
An implementation of a neural network from scratch
import numpy as np
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def neural_network(X, y):
learning_rate = 0.1
W1 = np.random.rand(2, 4)
W2 = np.random.rand(4, 1)
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
mongoose.connect('mongodb://127.0.0.1/testDB');
var TaskSchema = new Schema({
name: String,
priority: Number
});
@yanCode
yanCode / app.js
Last active December 19, 2015 11:29 — forked from tj/app.js
var express = require('express')
, cookieSessions = require('./cookie-sessions');
var app = express();
app.use(express.cookieParser('manny is cool'));
app.use(cookieSessions('sid'));
app.get('/', function(req, res){
req.session.count = req.session.count || 0;