Skip to content

Instantly share code, notes, and snippets.

@Zylophone
Zylophone / array_reduction.py
Created February 12, 2021 00:08
array reduction
import heapq
"""
At each step, pick two elemens a[i], a[j], i != j and remove them from the array. Add the sum a[i]+a[j] to the end
of the array. This step costs a[i] + a[j]. Return the minimum total cost to reduce an array to 1 element.
"""
def reduceArray(arr):
total_cost = 0
arr.sort()
heapq.heapify(arr)
@Zylophone
Zylophone / System Design.md
Created June 21, 2020 20:37 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@Zylophone
Zylophone / DistBelief.md
Created June 21, 2020 20:37 — forked from shagunsodhani/DistBelief.md
Notes for "Large Scale Distributed Deep Networks" paper

Large Scale Distributed Deep Networks

Introduction

  • In machine learning, accuracy tends to increase with an increase in the number of training examples and number of model parameters.
  • For large data, training becomes slow on even GPU (due to increase CPU-GPU data transfer).
  • Solution: Distributed training and inference - DistBelief
  • Link to paper

DistBelief

@Zylophone
Zylophone / django_python_interview_questions.md
Created June 21, 2020 20:37 — forked from subhajeet2107/django_python_interview_questions.md
Simple Interview questions for Django Developer

Django/Python Questions

  1. Find the most frequent integer in a list, Test list : [3,5,6,3,9,0,3,8,3,1,3]

  2. Find the common elements of 2 lists

        a = [2,3,4,1,1,3,6]
        b = [2,8,9,1,3]
## array contains coins represented by 0(head) and 1(tail)
def minimum_coins(array)
head = array.select {|e| e.eql?(0)}.length
tail = array.select {|e| e.eql?(1)}.length
(array.length/2) - [head, tail].min
end
@Zylophone
Zylophone / intro.md
Last active August 8, 2024 03:48
Matroid, Great Expectations

Matroid- Spoke to John. Asked about what projects I've worked with. Told me what Matroid does, how the teams are structured (field deep learning, product, research?), mostly hiring generalists with possible room for one FE specialist. Based in Palo Alto. Seemed interested in moving me forward.

He mentioned they are dealing with new models, doing some product non CV work (i.e. attributed based access control) mentioned the team is using https://github.com/stalniy/casl https://en.wikipedia.org/wiki/Attribute-based_access_control

Great Expectations- Spoke to Martin.

  • Asked me about my best project. Collecting telemetry data and showing it to Fleet managers.
  • Describe the software development life cycle. How long did this project take?
/*****************
* cellBlockA.js *
*****************
*
* Good morning, Dr. Eval.
*
* It wasn't easy, but I've managed to get your computer down
* to you. This system might be unfamiliar, but the underlying
* code is still JavaScript. Just like we predicted.
*
function functional_scoping() {
var x = "outside if";
if(true){
var x = "inside if";
}
console.log(x);
}
functional_scoping();