Skip to content

Instantly share code, notes, and snippets.

@gaearon
gaearon / modern_js.md
Last active June 11, 2024 07:33
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@ljvmiranda921
ljvmiranda921 / README.md
Last active October 25, 2020 06:32
Three layer neural network (I-H-H-O) with tanh activation function in the hidden layers and softmax cross-entropy in the output layer.

Implementing a multi-layer perceptron to solve the two-spiral problem

This utilizes a three-layer neural network (2 hidden layers with tanh and 1 output layer with softmax) to solve the two-spiral problem. Included in this gist is data_utils.py which has the method load_twin_spiral() in order to generate the data. All of the computations in the neural network (feedforward and backpropagation) are done using the numpy package.

Usage

If you wish to use the classes in this gist, simply import the module network and load the class:

from network import *
from data_utils import *
@alexpchin
alexpchin / Add_Existing_Project_To_Git.md
Created June 1, 2014 20:14
Add Existing Project To Git Repo

#Adding an existing project to GitHub using the command line

Simple steps to add existing project to Github.

1. Create a new repository on GitHub.

In Terminal, change the current working directory to your local project.

##2. Initialize the local directory as a Git repository.

git init