This page is located in archive. Go to the latest version of this course pages. Go the latest version of this page.

Python Development

  • The BRUTE uses python version 3.5.3
  • Use the forum to discuss any Python issues.
  • If you want to use an IDE, there is a professional PyCharm licence available at https://download.cvut.cz (but feel free to use butterflies instead).
  • If you have experience with MATLAB programming, you can start by Numpy for MATLAB users.

Common Issues and Solutions

  • Not working with correct shapes of input/output data: Shapes of all input/output data are defined in the docstring of individual methods. Please strictly stick to the prescribed shapes.
    • If you want to use i.e. np array <1xn> as (n,), you can use np.squeeze() in the beginning of the method.
    • For returning data in certain shape, you can use np.expand_dims() or np.at_leastXd() (where X is the number of dimmensions).
  • The template does not specify something correctly or differs from the assignment text
    • You are probably using an old version of the template. As noted in the git repository readme: Keep in mind that the assignments and the assignment templates will be updated during the semester. Always pull the current template version before starting to work on an assignment!

Assignment Templates

  • All assignment templates are stored in a git repository
  • Follow the instruction in the repository README
  • Make sure to get the current template version before starting to work on an assignment
  • Make sure not to push the repository with your solutions to any public remote (=plagiarism), you can use FEE GitLab for private remote repo.
  • Each assignment template contains a Jupyter notebook (.ipynb) that you can use to testrun the assignment functions you implement. This notebook will not be checked by the BRUTE.

List of Modules Available

  • The evaluation server has the following packages installed:
    • numpy (1.12.1)
    • matplotlib (2.0.0)
    • scipy (0.18.1)
    • PIL (4.0.0)
    • pandas (0.19.2)
  • If there is something important missing, please contact us on forum. We will do our best to install it on the evaluation server.

This setup is recommended by Radim Shpetleek™®.
1. Install Miniconda, Python version 3.X.
2. Run conda CLI.
3. Run

conda create --name rpz python=3.5.3 numpy=1.11.3 matplotlib=2.0.0 scipy=0.19 pillow=4.0.0 pandas=0.19.2
4. a) Activate the environment with
conda activate rpz
and work in the python interactive interpreter.
4. b) Use the IDE of your choice (IntelliJ PyCharm, of course) and set the interpreter of your project to the python executable/binary in your environment's path. Run your scripts using PyCharm's configurations.How to find the path to your environment's interpreter?

courses/be5b33rpz/labs/python_development.txt · Last modified: 2019/10/02 07:54 by sochmjan