This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Joel’s Totally Fair Method to Divide Up The Ownership of Any Startup | |
This is such a common question here and elsewhere that I will attempt to | |
write the world’s most canonical answer to this question. Hopefully in | |
the future when someone on answers.onstartups asks how to split up the | |
ownership of their new company, you can simply point to this answer. | |
The most important principle: Fairness, and the perception of fairness, | |
is much more valuable than owning a large stake. Almost everything | |
that can go wrong in a startup will go wrong, and one of the biggest | |
things that can go wrong is huge, angry, shouting matches between |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//1D grid of 1D blocks | |
__device__ int getGlobalIdx_1D_1D() | |
{ | |
return blockIdx.x *blockDim.x + threadIdx.x; | |
} | |
//1D grid of 2D blocks | |
__device__ int getGlobalIdx_1D_2D() | |
{ | |
return blockIdx.x * blockDim.x * blockDim.y + threadIdx.y * blockDim.x + threadIdx.x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpdef set(self, curve): | |
# some checks here | |
cdef double[:] curve_flat = curve.ravel() | |
c_function(self.c_obj, &curve_flat[0]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
n = 30 | |
m = 100000 | |
# using memory_profiler package | |
@profile | |
def main(): | |
foo = np.zeros((n,m)) |