Skip to content

Instantly share code, notes, and snippets.

@mtambos
mtambos / thresholdout.py
Last active November 24, 2017 11:40
Implementation of the threshouldout method
# Copyright (c) 2017 Mario Tambos
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mtambos
mtambos / cnn_channel order.ipynb
Created July 7, 2017 06:42
comparison of input formats
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mtambos
mtambos / ring_buffer
Created October 10, 2014 11:41
RingBuffer
import numpy as np
class RingBuffer(np.ndarray):
'A multidimensional ring buffer.'
def __new__(cls, input_array):
obj = np.asarray(input_array).view(cls)
return obj
timestamp,V5
datetime,float
T,
2014-10-07 00:00:00,4.8
2014-10-07 00:00:00.020000,4.79
2014-10-07 00:00:00.040000,4.8100000000000005
2014-10-07 00:00:00.060000,4.838
2014-10-07 00:00:00.080000,4.8839999999999995
2014-10-07 00:00:00.100000,4.956
2014-10-07 00:00:00.120000,5.026000000000001
@mtambos
mtambos / gist:5f642555945da8ddb484
Created October 8, 2014 21:20
CLA - ECG swarm description
SWARM_DESCRIPTION = {
'includedFields': [
{
'fieldName': 'timestamp',
'fieldType': 'datetime',
},
{
'fieldName': 'V5',
'fieldType': 'float',
},
@mtambos
mtambos / gist:269298118704f5bb39a8
Last active August 29, 2015 14:07
CLA - ECG model params
MODEL_PARAMS = (
{ 'aggregationInfo': { 'days': 0,
'fields': [],
'hours': 0,
'microseconds': 0,
'milliseconds': 0,
'minutes': 0,
'months': 0,
'seconds': 0,
'weeks': 0,