Giter VIP home page Giter VIP logo

epai_session_10_assign's Introduction

EPAI Session 10

test_create_random_profiles_type

raise ValuError if rep n is pass as text format

test_stock_exchange_type_check

raise ValuError if rep n is pass as text format

test_stock_exchange

This test function calls stock_exchange function that returns a pandas dataframe. This test case validates all the high values are actually greater than open, close and low values for all the instances. If any of them fail, in that case the test fails.

calculate_age

function to calculate age from a given date of birth

timed_reps

Decorator function to run a function reps times and return average run times..

create_random_profiles

Generate n fake profiles with each profile is stored as a namedtuple in a list. Then return most frequent blood group, average location, oldest person and average age Decorated with timed_reps to run the function 15 times to get the average run time.

d_create_random_profiles

Creates n as input and creates n number of fake profiles. Each profile is stored as a dictionary in a list. It calculates most frequent blood group, average location, oldest person and average age and returns them. Decorated with timed_reps to run 15 times to get average run time.

stock_exchange

Takes n as input and creates n number of random company names using Faker. Calls company_symbol function to create 5 character symbol for the company. Creates random values to assign open, high, low and close stock values however adhering to comparison rules. Puts the company stock details in pandas dataframe to print in tabular form.

epai_session_10_assign's People

Contributors

mutum avatar

Watchers

James Cloos avatar  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.