Skip to content

Instantly share code, notes, and snippets.

View foxish's full-sized avatar
🎯
Focusing

Anirudh Ramanathan foxish

🎯
Focusing
View GitHub Profile
@foxish
foxish / index.html
Created March 26, 2017 20:27
React JS Example // source http://jsbin.com/papasaq
<!DOCTYPE html>
<html>
<head>
<script src="http://fb.me/react-0.13.0.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>React JS Example</title>
</head>
<body>
@foxish
foxish / mongo.md
Last active August 9, 2016 09:07 — forked from bprashanth/mongo.md
Mongo petset

MongoDB is document database that supports range and field queries (https://github.com/foxish/docker-mongodb/tree/master/kubernetes)

Concepts

Replication

A single server can run either standalone or as part of a replica set. A "replica set" is set of mongod instances with 1 primary. Primary: receives writes, services reads. Can step down and become secondary. Secondary: replicate the primary's oplog. If the primary goes down, secondaries will hold an election.

@foxish
foxish / label_extraction.go
Last active August 1, 2016 19:33
label_extraction_go
// This function can be used to write a check-labels config file.
func writeLabelFile(c *CheckLabelsMunger, filename string) error {
fp, err := os.Create(filename)
if err != nil {
return err
}
defer fp.Close()
labels, err := c.labelAccessor.GetLabels()
if err != nil {
return err
@foxish
foxish / filter.sh
Last active February 11, 2016 08:11
CSCE-656 Media Analysis
grep -i -l "skype" * | uniq | xargs head -n 2 | python link_creator.py
@foxish
foxish / perceptron.js
Last active February 2, 2016 03:55
Perceptron
var Perceptron = function () {
// initialize both weights to 0.
this.w0 = 0;
this.w1 = 0;
// learning rate
this.learn_rate = 0.08;
// the bias neuron
this.x0 = 1;
@foxish
foxish / gabe_defense.md
Created December 4, 2015 20:25
Property Models: Guaranteeing Responsiveness and Consistency in Dynamic, Asynchronous Graphical User Interfaces
  • MVVM
@foxish
foxish / Class Presentations - CSCE 622.md
Last active December 1, 2015 17:01
Class Presentations - CSCE 622
  • HotDrink and Graph visualizations
    • Using hotdrink and building an adapter for it to work with D3.
    • D3 works on HTML5 and SVGs, making it work with mobile as well.
    • Observables on both sides (Hotdrink and D3) and glue-code between them.
    • Examples of Dijkstra's algorithm, Knight's tour and Elastic Triangle expressed in a constraint system.
    • Github repo: TBD
    • We saw programs which take an entire constraint system as a parameter, and the generic algorithm it's running is that of the user interface.
  • A mobile web-crawler
    • Use of the webview is rather common in Android applications.
  • Android has a lot of malware.
@foxish
foxish / Looking Beyond Exaflops & Zettabytes.md
Last active November 30, 2015 23:16
Looking Beyond Exaflops & Zettabytes by Dr. Pradeep Dubey, Director of the Parallel Computing Lab at Intel Corporation

Dr. Pradeep Dubey.

  • Synopsis:

    • Starting with hardware, went up till the application layer, with IBM moving "upwards" and become a services company.
    • Parallel computing lab, works with the end-user supercomputing applications, and not bottom-up.
    • Multicore -> Manycore -> Bigdata -> ML.
    • Why do we need to look beyond EZ (exaflops and zettabytes)?
  • Why machine learning?

  • ML drives innovation now.

  • How does it matter to people at large?

@foxish
foxish / 2015Nov28.md
Last active November 28, 2015 16:52
2015Nov28
  • The copy-and-swap idiom is used in creating the copy assignment operator and prevents us from replicating code in the copy constructor and destructor. It's about assigning one object B to another A and destructing the memory previously held by the name A. As constructors should have strong safety guarantees, it should first allocate the memory needed and then clear the old copy, to ensure that it doesn't throw some bad alloc after it has destructed the object. It also takes a copy-by-val RHS, which can be destructed automatically after the function and swaps the contents of the RHS into 'this'. This serves all purposes and is simply copy first, followed by swap.
  • RVO and copy-elision (when passing arguments into functions) can let compilers do some fancy optimizations, while keeping things like constness of names and smaller code size. Pass-by-val can be quite fast if the compiler does optimize certain things.
@foxish
foxish / something.html
Last active August 29, 2015 14:08
Sample HTML
<html><script language="javascript" src="something.js"></script></html>