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
| # Python 3.5 | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from keras.models import Sequential | |
| from keras.layers.core import Dense, Activation | |
| from keras.optimizers import SGD | |
| from sklearn.metrics import mean_squared_error |
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
| # Python 3 | |
| # coding: utf-8 | |
| import spacy | |
| from spacy.attrs import HEAD, DEP | |
| from spacy.symbols import nsubj, root, dobj, punct | |
| from numpy import ndarray | |
| nlp = spacy.load('en') |
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
| # coding: utf-8 | |
| """ | |
| Plot horizontal and vertical joining lines for coordinates described by | |
| arrays `x` & `y`. | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| def lines(x, y, first='x', ax=None, **kwargs): | |
| """ |
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
| ''' | |
| Utilities for manipulating sqlalchemy connection to keboola workspace. | |
| Example usage:: | |
| from getpass import getpass | |
| from kbcstorage.client import Client | |
| import sqlalchemy as sqa |
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
| 04c7074a2a2c094a81c8fb23c3766d17b162de6d09baaf1916544e35f8af30159c8d4da5ebcb14dc18b2c1e1ac30749a05a2a58169b9c933714376a6efa08ce53b;tinybot-ca |
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 continuumio/miniconda3:latest | |
| RUN conda update conda -y | |
| WORKDIR /opt/example/ | |
| COPY environment.yml /opt/example/ | |
| COPY ex_bokeh.ipymd /opt/example/ |
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 mae(y_true, y_pred): | |
| ''' | |
| Caluclate mean absolute error between two vectors | |
| ''' | |
| return np.mean(np.abs(y_pred - y_true)) | |
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
| """ | |
| Implementation of a function that returns elements from the Fibonacci sequence using DP | |
| https://en.wikipedia.org/wiki/Fibonacci_number | |
| https://en.wikipedia.org/wiki/Dynamic_programming | |
| """ | |
| import logging | |
| logger = logging.getLogger(__name__) |
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
| name: test4ds | |
| dependencies: | |
| - python>=3.7 | |
| - scikit-learn=0.21.2 | |
| - pandas=0.24.2 | |
| - numpy=1.16.4 | |
| - pip | |
| - pip: | |
| - pytest | |
| - pytest-cov |
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/python3 | |
| """ | |
| Simulation of the solution to a problem from a blog post by Nadbordrozd: | |
| http://nadbordrozd.github.io/interviews/index.html | |
| """ | |
| from random import Random | |
| def count_updates(x): | |
| """ |
OlderNewer