Skip to main content

Value Scheduler based on Progress

Project description

line-chain Build Status codecov PyPI version

Value Scheduler based on Progress.

Installation

Need Python 3.6+.

pip install line-chain

Usage

import line_chain

line_chain = line_chain.factory(config=[
    {
        'mode': 'linear',
        'ratio': 0.01,
        'start': 0.2,
        'target': 0.8
    }, {
        'mode': 'cosine',
        'ratio': 1.0,
        'target': 0.0
    }
])

print(line_chain)
#> LineChain (
#>     1.0%, linear from 0.2 to 0.8,
#>   100.0%, cosine from 0.8 to 0.0,
#> )


# plot it!
import numpy as np
import pylab as pl

x = np.linspace(0, 1, 1000)
y = np.vectorize(line_chain.at)(x)
pl.plot(x, y)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

line-chain-0.0.4.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file line-chain-0.0.4.tar.gz.

File metadata

  • Download URL: line-chain-0.0.4.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.6.7

File hashes

Hashes for line-chain-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d0eb62aa92c75d601784d8f552a37aa0025da5ccaa88bb69db38501148631cbe
MD5 3953967e7e13f5f70a0f76c820bfbbe3
BLAKE2b-256 e9d21773a16c87aab5601f1b1a92bcf5670e83e47e466e9f63f4051236ee2df4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page