This file contains hidden or 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
// Okay I have some shit i need to do in order | |
// FACK | |
// it's cool just do this... | |
async.each( /*array*/ obects_for_the_block, /*fun()*/ chopping_block, function(err){ | |
// EXPLANATION | |
// chopping_block is the function that is performed on every object in | |
// objects_for_the_block. | |
// imagine metaphor. understand. |
This file contains hidden or 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
// Creates db connection object | |
var db = new MongoDB(config.db.name, new Server(config.db.host, config.db.port, {auto_reconnect: true}), {w: 1}); | |
db.open(function(e, d) { | |
if (e) { | |
console.log(e); | |
} else{ | |
console.log('connected to database'); | |
} | |
}) |
This file contains hidden or 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 menu pretty and nice | |
let g:netrw_banner = 0 | |
let g:netrw_liststyle = 3 | |
let g:netrw_browse_split = 4 | |
let g:netrw_altv = 1 | |
let g:netrw_winsize = 25 | |
augroup ProjectDrawer | |
autocmd! | |
autocmd VimEnter * :Vexplore | |
augroup END |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/pborman/uuid" | |
) | |
func main() { |
This file contains hidden or 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
<!-- User --> | |
<comment> | |
Hi can anyone recommend a good film? | |
</comment> | |
<!-- Attacker--> | |
<comment> | |
<script src="xss.js"></script> | |
I like star wars! | |
<a id="its-a-trap" href="#">Check it out.</a> |
This file contains hidden or 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
package main | |
import "fmt" | |
type A struct { | |
OnlyForA string | |
} | |
func (a *A) Eyo() { | |
fmt.Println("eyo") |
This file contains hidden or 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
package main | |
import ( | |
"encoding/csv" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
) |
This file contains hidden or 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
package nn | |
import "gonum.org/v1/gonum/mat" | |
func (n *MLP) backward(x, y mat.Matrix) { | |
// get activations | |
as, zs := n.forward(x) | |
// final z |
This file contains hidden or 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
package nn | |
import "gonum.org/v1/gonum/mat" | |
// forward takes input data and returns the 'activation' and 'z' | |
// from each layer - z = w.x +b and a = sigmoid(z) | |
func (n *MLP) forward(x mat.Matrix) (as, zs []mat.Matrix) { | |
as = append(as, x) // first activation is input | |
_x := x |
This file contains hidden or 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
package nn | |
import ( | |
"fmt" | |
"gonum.org/v1/gonum/mat" | |
) | |
func (n *MLP) Train(x, y *mat.Dense) { |
OlderNewer