GithubHelp home page GithubHelp logo

sapienza-python's Introduction

Repo of python homeworks

Table of contents

Intro

Here I upload my homeworks.

In particular inside homework there are, obliviusly, the homeworks wich are necessary to get access to the final exams. Everithing else is just for exercise

Installation

Everithing inside this repo is based on Python 3.9.

I used anaconda to get everything set up.

Attention: if you use anaconda every time you need to use the console you have to activate the enviroment using:

conda activate <env name>

You will also need to install this packages:

conda install -c conda-forge typeguard ddt pytest-timeout stopit pytest-profiling radon typeguard

If you use Spyder IDE you can also install

conda install -c conda-forge spyder spyder-unittest pylsp-mypy

If you prefer Pycharm (like me) you can also install the line-profiler extension

When you want to update all the packages you can use

conda update --all

Run-tests

To run the tests (only the programs inside homework) you can use the unittest in Spyder or cd inside the correct root, like:

cd <path>/homework/8\ -\ obbligatorio

and the run:

pytest test_01.py -v -rA

You can also add the following switches to get more info:

  • --profile to get the top 10 longest calls (not very useful if you use the line-profiler)
  • --durations 0 to get a more detailed list of times for every test (idk, even without it is printed, I'm literally copying what my teacher wrote)
  • -x to stop to the first failure (useful in production but usually here there is only working code)

sapienza-python's People

Contributors

gabrielemercolino avatar

Watchers

 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.