This file contains hidden or 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
| const userTiming = () => (next) => (action) => { | |
| if (performance.mark === undefined) return next(action); | |
| performance.mark(`${action.type}_start`); | |
| const result = next(action); | |
| performance.mark(`${action.type}_end`); | |
| performance.measure( | |
| `${action.type}`, | |
| `${action.type}_start`, | |
| `${action.type}_end`, | |
| ); |
This file contains hidden or 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
| """ | |
| requirements: | |
| scikit-optimize | |
| """ | |
| from skopt import gbrt_minimize, gp_minimize, callbacks, load | |
| from skopt.utils import use_named_args | |
| from skopt.space import Real, Categorical, Integer | |
| from functools import partial | |
This file contains hidden or 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
| @tf.function | |
| def tf_strech_histogram(image): | |
| rmax = tf.reduce_max(image, axis=[-3,-2]) | |
| rmin = tf.reduce_min(image, axis=[-3,-2]) | |
| return (image-rmin)/(rmax-rmin) |
This file contains hidden or 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, { createContext, useContext, useState } from 'react'; | |
| import { | |
| makeStyles, | |
| Dialog, | |
| DialogContent, | |
| CircularProgress, | |
| Typography, | |
| } from '@material-ui/core'; | |
| const PendingContext = createContext(); |