Skip to content

Instantly share code, notes, and snippets.

View sreeprasad's full-sized avatar

Sreeprasad sreeprasad

  • BlackRock
  • New York
View GitHub Profile

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@sreeprasad
sreeprasad / gist:ad611c6756e5aa04d0cecd88184700f6
Created January 6, 2018 06:01
This git shows the command to add to `build.gradle` to show path where Gradle stores all dependencies on local file system
task showMeCache << {
configurations.compile.each { println it }
}
@sreeprasad
sreeprasad / FibonacciSumLastDigit.java
Last active January 12, 2018 04:19
last digit of sum of first N Fibonacci number
/**
* Get the last digit of the nth fibonocci number.
*/
private static long getFibonacciSumNaive(long n) {
if (n <= 1)
return n;
// we are using array length = 60 because
// fib[i] % 10 has a pissano period of 10
// i.e fib[i]%10 repeats itself after every 60 times.
@sreeprasad
sreeprasad / latex.sublime-build
Created January 13, 2018 03:22
This file describes the build file for building pdf from latex in Sublime 2
{
"cmd": ["/Library/TeX/texbin/pdflatex","$file"],
"selector": "text.tex.latex",
"variants": [
{
"name": "Build Bibliography",
"cmd": ["/Library/TeX/texbin/bibtex","$file_base_name"],
}
]
}
@sreeprasad
sreeprasad / simplest_latex_template.tex
Created January 13, 2018 03:44
Simplest Latex template
\documentclass[a4paper,12pt]{article}
\begin{document}
A sentence of text.
\end{document}
@sreeprasad
sreeprasad / NetworkUtils.java
Created January 13, 2018 16:41
Shows how to create a URL
final static String GITHUB_BASE_URL =
"https://api.github.com/search/repositories";
final static String PARAM_QUERY = "q";
final static String PARAM_SORT = "sort";
final static String sortBy = "stars";
public static URL buildUrl(String githubSearchQuery) {
Uri uri = Uri.parse(GITHUB_BASE_URL)
.buildUpon()
.appendQueryParameter(PARAM_QUERY,githubSearchQuery)
@sreeprasad
sreeprasad / UriAddressBuilder.java
Created January 18, 2018 15:17
Builds URI from address
Uri.Builder addressUriBuilder = new Uri.Builder();
addressUriBuilder.scheme("geo")
.encodedPath("0,0")
.appendQueryParameter("q",streetAddr);
package com.sreeprasad.algorithms;
import java.util.Stack;
public class RecommendedSequence {
private static StringBuilder recommended(String S) {
StringBuilder result = new StringBuilder();
@sreeprasad
sreeprasad / best saving rate
Created February 3, 2018 20:09
MIT: Introduction to Computer Science and Programming in Python : problem set 2 problem c
original_salary = float(input("Enter annual salary "))
house_cost_in_millions = int(input("Enter House cost in millions "))
house_cost = house_cost_in_millions * 1000000
down_payment = 0.25*house_cost
semi_annual_raise = 0.07
annual_investment_return = 0.04
delta = 101
low = 0
high = 1000