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
| [Background] | |
| Color=39,40,34 | |
| [BackgroundIntense] | |
| Color=65,67,57 | |
| [Foreground] | |
| Color=225,225,218 | |
| [ForegroundIntense] |
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
| # The goal of this is to try to make use of Shap to explain a tree built in river. | |
| # https://github.com/online-ml/river/issues/437 | |
| from functools import reduce | |
| import operator | |
| import numpy as np | |
| import pandas as pd | |
| import pprint | |
| from sklearn import datasets |
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
| #!/usr/bin/env python | |
| """ | |
| Simple example of a full screen application with a vertical split. | |
| This will show a window on the left for user input. When the user types, the | |
| reversed input is shown on the right. Pressing Ctrl-Q will quit the application. | |
| """ | |
| from prompt_toolkit.application import Application | |
| from prompt_toolkit.buffer import Buffer | |
| from prompt_toolkit.key_binding import KeyBindings |
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 pandas as pd | |
| import statsmodels.api as sm | |
| def test_rolling_mode(): | |
| """ | |
| The goal of this application level monitoring is to react in light of changes | |
| to re-model fits and movement in the modelling process. In the linear model | |
| scenario, confidence intervals around the coefficients can be provided which | |
| can be used as a measure for model drift over time. |
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
| """ | |
| This is a manual implementaiton of grucell so that it will work in more | |
| general envrionments... | |
| """ | |
| import tensorflow as tf | |
| input_size = 64 | |
| cell_size = 32 |
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
| <script src='https://unpkg.com/[email protected]/dist/tesseract.min.js'></script> | |
| <input type="file" onchange="getRego(this.files)"> | |
| <script> | |
| function getRego(files) { | |
| const worker = new Tesseract.TesseractWorker(); | |
| worker.recognize(files[0]).then(function(data){ | |
| // construct something which glues all the words together... | |
| console.log(data.text); | |
| }) |
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 numpy as np | |
| def linear_part(x, w): | |
| return x * w | |
| def non_linear(x, p=0.001): | |
| multi = (x > 0).astype(np.float64) | |
| multi[multi == 0] = 0.001 | |
| return x * multi |
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
| pareto_principle <- function(x){ | |
| return (x ^ (log(0.2)/log(0.8))) | |
| } | |
| sprintf("%.2f of the effort comes from %.2f of the causes", 0.99, pareto_principle(0.99)) | |
| sprintf("%.2f of the effort comes from %.2f of the causes", 0.95, pareto_principle(0.95)) | |
| sprintf("%.2f of the effort comes from %.2f of the causes", 0.8, pareto_principle(0.8)) | |
| sprintf("%.2f of the effort comes from %.2f of the causes", 0.5, pareto_principle(0.5)) |
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
| FROM jupyter/r-notebook | |
| # docker build --rm -t jupyter/extended-notebook . | |
| # docker run --rm -it -p 8888:8888 jupyter/extended-notebook | |
| RUN conda install --quiet --yes -c r rstudio=1.1* | |
| RUN conda install --quiet --yes -c anaconda pandas scipy gensim scikit-learn | |
| # install nbrsessionproxy |
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
| # | |
| # Licensed to the Apache Software Foundation (ASF) under one or more | |
| # contributor license agreements. See the NOTICE file distributed with | |
| # this work for additional information regarding copyright ownership. | |
| # The ASF licenses this file to You under the Apache License, Version 2.0 | |
| # (the "License"); you may not use this file except in compliance with | |
| # the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |