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
# Read the Docs configuration file | |
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | |
# Required | |
version: 2 | |
# Build documentation in the docs/ directory with Sphinx | |
sphinx: | |
configuration: docs/source/conf.py |
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
name: CI/CD # pipeline's name that will appear in Github Actions | |
on: # events that trigger our pipeline: push on any branch and release creation | |
push: | |
release: | |
types: [created] | |
jobs: # jobs. We will have two jobs (test and publish) with multiple steps. | |
test: | |
# Our test job will run on ubuntu. |
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 math | |
import numpy as np # type: ignore | |
import pandas as pd # type: ignore | |
from tsgen.time_serie import TimeSerie | |
def affine(start, end, freq, start_y, end_y) -> TimeSerie: |
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
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v3.2.0 | |
hooks: | |
- id: check-yaml | |
- id: debug-statements | |
- id: end-of-file-fixer | |
- id: trailing-whitespace | |
- repo: local | |
hooks: |
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 pandas as pd | |
import numpy as np | |
import pytest | |
from tsgen import TimeSerie | |
@pytest.fixture | |
def ts_monthly_constant(): | |
start = "2020" |
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
from tsgen.time_serie import TimeSerie | |
import tsgen.generators as generators | |
__all__ = ["TimeSerie", "generators"] |
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 math | |
import numpy as np | |
import pandas as pd | |
from tsgen.time_serie import TimeSerie | |
def affine(start, end, freq, start_y, end_y): |
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 pandas as pd | |
import numpy as np | |
class TimeSerie: | |
def __init__(self, index, y): | |
if not isinstance(index, pd.DatetimeIndex): | |
raise TypeError("index should be a pandas.DatetimeIndex") | |
self.index = index | |
self.y = np.array(y) |
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
[tool.poetry] | |
name = "tsgen" | |
version = "0.1.0" | |
description = "Time Series Generator" | |
authors = ["Marwan Debbiche <marwan.debbiche@example.com>"] | |
license = "MIT" | |
[tool.poetry.dependencies] | |
python = "^3.8" | |
pandas = "^1.1.3" |
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
@app.route('/predict-species-proba', methods=['POST']) | |
def predict_species_proba(): | |
flower = {} | |
for feature in iris_classifier_features: | |
flower[feature] = [request.form[feature]] | |
flower = pd.DataFrame(flower) | |
probas = iris_classifier.predict_proba(flower[iris_classifier_features])[0, :].tolist() |
NewerOlder