Skip to content

Instantly share code, notes, and snippets.

View brh55's full-sized avatar
Hello! 👋

Brandon Him brh55

Hello! 👋
View GitHub Profile
@brh55
brh55 / notes.md
Last active June 15, 2017 14:17
Solidity Notes

Solidity Notes

Notes I've assembled for myself during my journey of learning Solidity, some notes maybe incorrect as they are my own interpretation

Event Listeners

Allow clients to keep track of things. IE: Sent transactions, End of transactions, etc.

Declaring Event

event EventName(...args)

@brh55
brh55 / elasticsearch.md
Created March 22, 2017 19:02
Log Stash Notes
@brh55
brh55 / Elastic Search
Created March 22, 2017 19:02
Log Stash Notes
@brh55
brh55 / 9.1.md
Last active May 23, 2016 20:44
Notes on Business Stats Ch 9.

9.1 Logic of Hypothesis Testing

Hypothesis Testing Steps

  1. State Hypothesis

    H0 - Null Hypothesis H1 - Alternative Hypothesis

  2. Specify Decision Rule

How to prove the null hypothesis with the evidence

@brh55
brh55 / Relevance.md
Last active May 23, 2016 18:22
Notes for in Information Retrieval Systems at Drexel University

The past:

Relevance was always based on subject matter experts.

However...

We measure based on the relevance of the query, despite the fact that other documents may be relevant. It needs to pertain to the query -- that's what we care about.

Contignecy table:

relevant non-relevant
@brh55
brh55 / SimilarityMeasureBinary.js
Last active May 18, 2016 14:08
Similarity Coefficients in JS
// Quickly wrote this to save me time in class instead of calculating all of this stuff
/**
var d1 = [0.8, 0.7, 0.9, 0, 0, 0.2];
var d2 = [0.4, 0.3, 0.5, 0, 0, 0];
var d3 = [0.9, 0, 0.8, 0.5, 0, 0];
var d4 = [0.2, 0, 0, 0.8, 0, 0.9];
var d5 = [0.7, 0.9, 0.7, 0.4, 0, 0];
var d6 = [0.3, 0.6, 0.7, 0.7, 0, 0];
similarity(d1, d2, "dice"); // 0.8571428571428571
@brh55
brh55 / Coefficient.md
Last active May 13, 2016 14:33
Coefficients for Document Retrieval

What for?

Correcting for differences/size for the number of overlapping terms x or y being the size of document or vocabulary of DOC1 to DOC2

Cosine Coefficient

| x and y | / [x]1/2 x [y]1/2

Jaccard Coefficient

| x and x | / | x or y |

@brh55
brh55 / GitResources.md
Last active May 12, 2016 14:22
Useful Easy to Digest Git-related Resources

Merging

Explains a Fast-Forward When Git Pull Hurts

Useful Alias

git up

git config --global alias.up '!git remote update -p; git merge --ff-only @{u}

Prunes remote branches and updates them, then fast-forward local branch from the Upstream branch. However, fails if there are local changes to prevent a merge conflict and undesired fast-forwarding.

@brh55
brh55 / randomforest
Created November 19, 2015 00:59
reddit analytics
// TODO: Will like to get back to this if I have time.
// Goal would be to iterate through with a instance set containing different days and MostComments and Score. Then suggest the day with greatest probability based on model.
// if (model.postList.length > 0) {
// var forest = new forestjs.RandomForest();
// var options = {}
// options.numTrees = 100;
@brh55
brh55 / gist:06962cc21314e598b998
Last active August 29, 2015 14:25
Simple Command and Reply Slack Bot
module.exports = require('node-slackr');
// Set up server dependencies
var express = require('express'),
bodyParser = require('body-parser'),
app = express();
// App usage
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));