Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qwop-fast

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qwop-fast

  • 0.1.1
  • PyPI
  • Socket score

Maintainers
1

qwop-fast: A fast implementation of QWOP simulator

Same API as https://web.stanford.edu/class/cs168/qwop.py, but much faster.

Install

pip install qwop-fast

Build From Source

  1. Install Rust: https://rustup.rs/

  2. Install Maturin:

    pip install maturin
    
  3. Build and install the package:

    maturin develop --release
    
  4. Use it:

  • You can just follow the API of https://web.stanford.edu/class/cs168/qwop.py and just replace import qwop with import qwop_fast.

    import numpy as np
    import qwop_fast
    plan = np.random.uniform(-1, 1, 40)
    qwop_fast.sim(plan) # return a float
    
  • You can also simulate in batches. Batches will be executed in parallel.

    import numpy as np
    import qwop_fast
    plan = np.random.uniform(-1, 1, (100, 40))
    qwop_fast.sim_batch(plan) # return a list of floats
    

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc