Skip to content

Instantly share code, notes, and snippets.

@timehaven
Created July 19, 2017 15:47
Show Gist options
  • Select an option

  • Save timehaven/c1d0838884464669758d5e12a32ea5b5 to your computer and use it in GitHub Desktop.

Select an option

Save timehaven/c1d0838884464669758d5e12a32ea5b5 to your computer and use it in GitHub Desktop.

Revisions

  1. timehaven created this gist Jul 19, 2017.
    9 changes: 9 additions & 0 deletions mm0.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # 'features' is file path to bcolz array on disk
    bc = bcolz.open(features)[:]

    # begin epoch loop
    while 1:
    ...
    df = df.sample(frac=1) # shuffle all rows
    bc = bc[df.index.values]
    ...