I hereby claim:
- I am jan-matthis on github.
- I am janmatthis (https://keybase.io/janmatthis) on keybase.
- I have a public key whose fingerprint is AA9E 3AAD 49B1 AC62 5DDE F7AF 1B85 B50C 639D DDFE
To claim this, I am signing this object:
# test.py | |
from abc import ABC, abstractmethod | |
class Parent(ABC): | |
def __init__(self, arg): | |
"""Parent __init__ | |
Args: | |
arg: Arg |
============================= test session starts ============================= | |
platform win32 -- Python 3.7.7, pytest-5.4.3, py-1.8.2, pluggy-0.13.1 -- c:\users\user\anaconda3\envs\sbi_env\python.exe | |
cachedir: .pytest_cache | |
rootdir: C:\Users\User\sbi\sbi-master, inifile: setup.cfg | |
collecting ... collected 149 items | |
tests/inference_with_NaN_simulator_test.py::test_handle_invalid_x[x_shape0] PASSED [ 0%] | |
tests/inference_with_NaN_simulator_test.py::test_handle_invalid_x[x_shape1] PASSED [ 1%] | |
tests/inference_with_NaN_simulator_test.py::test_handle_invalid_x[x_shape2] PASSED [ 2%] | |
tests/inference_with_NaN_simulator_test.py::test_handle_invalid_x[x_shape3] PASSED [ 2%] |
def transform_posterior(posterior, lower, upper): | |
rescale = lambda x: (x - lower) / (upper - lower) | |
inverse_rescale = lambda x: x*(upper - lower) + lower | |
bijection = lambda x: expit(x) * (upper - lower) + lower | |
inverse_bijection = lambda x: logit(rescale(x)) | |
# log abs determinant of jacobian | |
bijection_jac_logD = lambda x: np.log(np.abs((expit(x) * (1-expit(x)) * (p.upper - p.lower)).prod(axis=-1))) |
# gradients based on http://bsou.io/posts/color-gradients-with-python | |
def hex_to_RGB(hex): | |
''' "#FFFFFF" -> [255,255,255] ''' | |
# Pass 16 to the integer function for change of base | |
return [int(hex[i:i+2], 16) for i in range(1,6,2)] | |
def RGB_to_hex(RGB): | |
''' [255,255,255] -> "#FFFFFF" ''' |
I hereby claim:
To claim this, I am signing this object:
{"cc": "\uf20a", "bookmark": "\uf02e", "venus-mars": "\uf228", "arrow-circle-o-down": "\uf01a", "comment-o": "\uf0e5", "long-arrow-left": "\uf177", "arrow-right": "\uf061", "delicious": "\uf1a5", "chevron-circle-left": "\uf137", "bullhorn": "\uf0a1", "outdent": "\uf03b", "jpy": "\uf157", "drupal": "\uf1a9", "hdd-o": "\uf0a0", "hand-o-left": "\uf0a5", "pinterest": "\uf0d2", "plane": "\uf072", "question": "\uf128", "child": "\uf1ae", "circle-o": "\uf10c", "italic": "\uf033", "meanpath": "\uf20c", "subway": "\uf239", "google-plus": "\uf0d5", "angle-up": "\uf106", "star": "\uf005", "star-half-empty": "\uf123", "facebook-official": "\uf230", "youtube-square": "\uf166", "rss": "\uf09e", "toggle-off": "\uf204", "list-ol": "\uf0cb", "dot-circle-o": "\uf192", "copyright": "\uf1f9", "user": "\uf007", "key": "\uf084", "minus-square-o": "\uf147", "mobile": "\uf10b", "table": "\uf0ce", "columns": "\uf0db", "bolt": "\uf0e7", "fighter-jet": "\uf0fb", "share-square-o": "\uf045", "file-archive-o": "\uf1c6", "retweet": "\uf079 |
var calcDiff = function(arr) { | |
var calc = function(n, i) { return n - arr[i]; } | |
return arr.slice(1).map(calc); | |
} |
/* JS to find connected regions */ | |
var findConnectedRegions = function(arr) { | |
var distinct = []; | |
var durations = []; | |
var labels = []; | |
var idx = 0; | |
var calcCumSum = function(arr) { | |
var calc = function(acc, n) { |
# IPython magic to check for PEP8 compliance. | |
# Author: Juan Luis Cano <juanlu001@gmail.com> | |
"""IPython magic to check for PEP8 compliance. | |
To use it, type | |
```%load_ext pep8magic``` | |
and then |