117 karma · joined Mar 29, 2021 (5y ago) · 54 submissions
comment 5y ago · link · parent
Like OP, I observed that static typing make_list yields little benefit. It's runtime is 3x the runtime of iterate_list. And that makes sense. I'm not sure why we'd expect Cython to speed up the allocation of large numbers of Python objects.
comment 5y ago · link · parent
"A small number of unelected agents, operating largely behind closed doors, are increasingly important to the lives of millions who barely know of the existence much less the identity or inclinations of those agents."
A little bit of Python can fix at least that small part.
comment 5y ago · link · parent
import time, torch
from itertools import product
N = 100
ten = torch.randn(N,N,N)
arr = ten.numpy()
def indexTimer(val):
start = time.time()
for i,j,k in product(range(N), range(N), range(N)):
x = val[i, j, k]
end = time.time()
print('{:.2f}'.format(end-start))
indexTimer(ten)
indexTimer(arr)comment 5y ago · link · parent
This seems to have become a deep-seated aspect of American culture. It extends into startup land as well. We on HN seem to be deeply skeptical of new applications of technology--like Dropbox and Coinbase--despite being highly receptive to developments lower in the abstraction hierarchy.
comment 5y ago · link · parent
The law doesn't require this of course, but basically all money managers get their insider trading compliance program from the same 3 outside law firms.
comment 5y ago · link · parent
Your problem set sounds super cool, and it would be nice if DOD had a functioning acquisition process that would allow people with interesting tech to out-compete companies whose boards are stacked with current and former public officials. But alas, that's not the world we live in.
The sad thing is, there are probably dozens of proto Kelly Johnson's out there. But they've made defense industries so intolerable that none of them work there.