Better HN
topnewbestaskshowjobs
Log inSign up

njam

-1 karma · joined Sep 22, 2017 (9y ago) · 3 submissions

Submissions

comment 8y ago · link · parent

Every stock IPO spikes, of course this will lead to atleast a temporary price spike.

comment 8y ago · link · parent

This is an awesome family xmas project. I don't have an old pc around to run YOLO / YOLO Tiny constantly though; can anyone recommend a cheap, suitable server provider for this? AWS EC2?

comment 8y ago · link · parent

You're spot on with vectorisation. It needs to be emphasized in academia. Take numpy/pandas, even for basic stuff the efficiency difference vs a for loop is vast:

  def product_sum(a, b):
      total = 0
      for a, b in zip(a, b):
          total += a * b
      return total
  %timeit product_sum(million_a, million_b)
  215 ms ± 3.01 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
  %timeit (million_a * million_b).sum()
  6.01 ms ± 254 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)