Skip to content

Instantly share code, notes, and snippets.

@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

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

@danijar
danijar / blog_tensorflow_sequence_classification.py
Last active December 24, 2021 03:53
TensorFlow Sequence Classification
# Example for my blog post at:
# https://danijar.com/introduction-to-recurrent-networks-in-tensorflow/
import functools
import sets
import tensorflow as tf
def lazy_property(function):
attribute = '_' + function.__name__
@gmmorris
gmmorris / SafeAccessFunction.js
Created February 7, 2016 21:35
Implementation for the Safe Access Proxy article
function safe(obj) {
return new Proxy(obj, {
get: function(target, name){
return hasKey(target, name) ?
(isObject(target[name]) ? safe(target[name]) : target[name]) : Undefined;
}
});
}
@tomaslibal
tomaslibal / command-line.md
Last active June 19, 2018 08:13
Collection of commands for CLI (mostly Bash), and settings of my environment (.dot files in my home directory).

Command Line snippets, info and settings

IO redirection

There are three file descriptors open by default:

  • 0 for stdin
  • 1 for stdout
  • 2 for stderr
@medikoo
medikoo / es6-shims.md
Last active March 24, 2021 22:29
List of ECMAScript 6 shims

List of ECMAScript 6 shims

Implemented on top of ECMAScript 5

Provided as distinct CJS modules, installable via npm


ECMAScript 5 Built-in Objects extensions

Individual modules of es5-ext package. See ES6 features for usage information.

Array

@tomaslibal
tomaslibal / bsearch.cpp
Last active January 19, 2017 15:27
A binary search like function in processing. There are no pointers by default in processing so this function works with array indexes. This example works with an array of ordered strings.
#include <cstring>
#include <cmath>
bool bsearch(const char* array, char ch)
{
int a = 0; // start of the search array
int b = strlen(array); // end of the search array
int m = 0; // the middle value
int prev; // remembers the previous middle value
while(true) {
@turbofart
turbofart / tsp.py
Created August 22, 2012 20:06
Applying a genetic algorithm to the travelling salesman problem
#!/usr/bin/env python
"""
This Python code is based on Java code by Lee Jacobson found in an article
entitled "Applying a genetic algorithm to the travelling salesman problem"
that can be found at: http://goo.gl/cJEY1
"""
import math
import random