This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* range() | |
* | |
* Returns an array of numbers between a start number and an end number incremented | |
* sequentially by a fixed number(step), beginning with either the start number or | |
* the end number depending on which is greater. | |
* | |
* @param {number} start (Required: The start number.) | |
* @param {number} end (Required: The end number. If end is less than start, | |
* then the range begins with end instead of start and decrements instead of increment.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const formatSeconds = seconds => { | |
const measuredTime = new Date(null); | |
measuredTime.setSeconds(seconds); | |
return measuredTime.toISOString().substr(11, 8); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { createConnector } from 'react-instantsearch-dom'; | |
const connect = createConnector({ | |
displayName: 'GreaterThanRefinement', | |
getProvidedProps(props, searchState) { | |
const currentRefinement = searchState.greaterThan[props.attribute] || false; | |
return { currentRefinement }; | |
}, | |
refine(props, searchState, nextRefinement) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
import datetime | |
import csv | |
import sys | |
import keyboard | |
if len(sys.argv) != 2: | |
print('Wrong number of arguments! First and only argument must be serial port name.') | |
exit(-1) |