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.2.post1.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file line-chain-0.0.2.post1.tar.gz.

File metadata

  • Download URL: line-chain-0.0.2.post1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.3

File hashes

Hashes for line-chain-0.0.2.post1.tar.gz
Algorithm Hash digest
SHA256 0a20d94fb7434d908065bedb1f048155d0f6f2e637f3b8cfcba0719290d69b25
MD5 79e5075e67d169eeead6f72661774b9b
BLAKE2b-256 319aba7ee4be9a15af397e61e2fe08e8e4f680f52b2e792a3c86db79a0fe8468

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