Giter Site home page Giter Site logo

looping_python's Introduction

Python loop optimization for numerical calculations

This is the companion code for article "If you have slow loops in Python, you can fix it…until you can’t"

  • ks_dp_solvers.py - a number of solver functions implementing dynamic programming algorithm to solve the knapsack problem. Solvers employ different approaches to looping through the array of data.
  • ks_dp_solvers_profiles.txt - outputs of line profiler for the above implementations
  • ks_dp_cython.pyx - a straightforward solver (two nested for loops) based on cython
  • ks_dp_cython_script.py - the script to run ks_dp_cython.pyx
  • ks_dp_naive_solver.go - a straightforward solver (two nested for loops) coded in Golang
  • nasdaq100list.csv - data file (Nasdaq 100 list of stock prices and price estimates)
  • ks_dp_example.pdf - an annotated illustration of the dynamic programming algorithm used to solve the knapsack problem

looping_python's People

Contributors

mmamaev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.