Skip to content

Instantly share code, notes, and snippets.

import numpy as np
import itertools
keypad = [list(range(n, n+3)) for n in range(1, 10, 3)]
keypad.append([None, 0, None])
keypad = np.array(keypad)
def get_values(obs):
@grahamannett
grahamannett / maxRepeatInt.go
Last active August 15, 2018 00:55
find most repeating int
package main
import (
"fmt"
"os"
"sort"
)
type kv struct {
Key string
import numpy as np
class SequenceDataGen:
'''Generate batches on time series/sequential data
Arguments:
step_size: set input mean to 0 over the dataset.
x_window: size of moving window over x
class SequenceDataGen:
'''
to add:
vocab from:
https://gist.github.com/braingineer/c69482eb1bfa4ac3bf9a7bc9b6b35cdf
Generate minibatches on time series data
example data can be generated with these:
c1 = (list(range(1,10,1)) + list(range(10,1,-1)))*100
c2 = [x * -1 * random() for x in c1]
😈 ~ $ mktmpenv
New python executable in tmp-f0a7b52744b0feee/bin/python2.7
Also creating executable in tmp-f0a7b52744b0feee/bin/python
Installing setuptools, pip...done.
This is a temporary environment. It will be deleted when you run 'deactivate'.
(tmp-f0a7b52744b0feee)😈 tmp-f0a7b52744b0feee $ pip freeze
You are using pip version 6.0.8, however version 7.0.3 is available.

Keybase proof

I hereby claim:

  • I am grahamannett on github.
  • I am grahama (https://keybase.io/grahama) on keybase.
  • I have a public key whose fingerprint is C7F4 8C0A 8D1D 1B00 9CFB 0922 5770 5EF6 1BFC E17E

To claim this, I am signing this object: