GithubHelp home page GithubHelp logo

elixir-dfs's Introduction

DailyFantasy

Daily fantasy sports lineup optimizer.

Data

Player data must be in the _data directory. File names should be a CSV named after the league that the players are in (i.e. nba.csv, nfl.csv, etc.)

Mandatory columns are:

  • First Name
  • Last Name
  • Position
  • FPPG
  • Salary
  • Team
  • Opponent
  • Injury Indicator
  • Injury Details

Use in iEx:

# Register players
DailyFantasy.Import.register(:nba)

# Create lineups
data = DailyFantasy.Lineups.create_lineups(:FanduelNBA)

# Print lineups
data |>
Enum.take(2) |>
Enum.map(&DailyFantasy.Lineups.Lineup.print/1)

Release Notes:

Release 0.1.3 aka Darrell Green:

  • ~23% speed improvement by using integers for player point projections instead of floats

Release 0.1.2 aka Grayson "The Professor" Boucher:

  • 100% test coverage (per coveralls)
  • Minor refactoring

Release 0.1.1 aka Tim Duncan:

  • ~15% speed improvement by optimizing data types for lineup creation
  • Invalid input handling

Release 0.1.0 aka William "The Refrigerator" Perry:

  • A player registry is created as an ETS table upon initialization
  • Player data is stored in player registry
  • ~10% speed improvement by caching player data and minimizing lineup payload during lineup creation and optimization

Release 0.0.3 aka Lew Alcindor:

  • Implemeted Fanduel NBA lineup creation
  • Implemented a general way to create lineups by specifying the lineup as an atom; for example :FanduelNFL specifies the structure for Fanduel NFL contests

Release 0.0.2 aka Barry Sanders:

  • Improved speed
  • Organized modules

Release 0.0.1 aka Joe Namath:

Brute force script. I went at this the same way I'd write a Python script or any other "procedural" script in an Object Oriented language. The data gets imported and goes through a series of steps until it is transformed into the desired output. There is no utilization of any of the Elixir nicities (maybe Stream concurrency) or other advantages of Functional programming.

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.