Dirac Essentials Level Test


SettingsSettingsSettings
Dirac Essentials Level Test - Quiz

.


Questions and Answers
  • 1. 

    Use the cd command to go into the python/ directory, which contains 2 subdirectories. Use a single shell command to create a list of all files (within the python directory) with names ending in .dat in or below this directory in a file called all-dat-files.txt. Paste the command you used in the answer box below.

  • 2. 

    Add all-dat-files.txt to the version control repository and commit it. Include a comment describing the file. Paste the command(s) used below.

  • 3. 

    Add do-many.xx to the version control repository and commit it. Include a comment describing the file. Paste the command(s) used below.

  • 4. 

    The analyze.py program contains a function called running_total, which is supposed to calculate the total of each strictly increasing sequence of integers in a list. For example:   running_total([1, 2, 1, 8, 9, 2]) == [3, 18, 2] running_total([1, 3, 4, 2, 5, 4, 6, 9]) == [8, 7, 19]   In the file test_analyze.py, you will find a unit test implementing the first example above. Write four (4) more unit tests that you think are most important to run to test this function. Do not test for cases of invalid input (e.g. inputs that are strings, lists of lists or an input that isn't a flat list of numbers).   You can run your tests using the command:   py.test test_analyze.py   Paste your four tests below.

  • 5. 

    Add test_analyse.py to the version control repository and commit it. Include a comment describing the file. Paste the command(s) used below.

  • 6. 

    What is the approach you would use to check the scaling of your code? Explain your method in 50 words.

  • 7. 

    Commit your changes to power2.py/power2.c/power2.f to the version control repository. Include a comment describing the file.   Paste the command(s) used below.

  • 8. 

    Assume you have an account, username "me", on a remote host, server.dirac.org. Password-based authentication to remote hosts are vulnerable to brute-force attacks. SSH public key authentication can provide you with additional security.   Supposing you want to use a SSH public/private keypair, and associated passphrase, to access the remote host, what commands would you use to create your SSH keypair and to update the remote host with your public key?   Assume that you are using the default files. When you are prompted to enter the file in which you want to save the key you would press enter to use the default files.   Paste the commands below.

  • 9. 

    Assume that in your "me" account on server.dirac.org you have 100 files, detector000.dat, ..., detector099.dat. These are located in a directory called data.   a) What commands would you use to securely copy the directory that contains all these files from server.dirac.org to your local account?   b) Assume a few files have been changed within this directory on your Dirac account, what command would you use to copy over only the amended files?   Paste the commands below.

  • 10. 

    Write a script called do-many.xx, using a scripting language of your choice (e.g. shell script, python) that runs power2.py for the inputs listed in the input.d file and writes a list of outputs to a file called output.d.   output.d must contain:   16 8 2 1 8 1 32 2 1   You do not need to do error-checking on the command-line parameters, i.e. you may assume that they are all non-negative integers. Paste your script below.

  • 11. 

    The programs power2.py, power2.c and power2.f90 take a single non negative integer as a command line argument and produces the powers of two that total to that number. For example:   ./power2.py 27   produces:   16 8 2 1   Choose the language you are most comfortable with and change this program in at least 3 ways to improve its readability, understandability and modularity *without* changing its behaviour. Paste your edited code below.

  • 12. 

    Do you have any feedback you would like to give us?

  • 13. 

    Exit survey Did you take the Essentials Level Training?

    • A.

      Yes.

    • B.

      No.

    Correct Answer
    A. Yes.
  • 14. 

    Using In-Terminal text Editors

    • A.

      No knowledge

    • B.

      Novice

    • C.

      Intermediate

    • D.

      Proficient

    • E.

      Expert

    Correct Answer
    A. No knowledge
  • 15. 

    Using command scripts

    • A.

      No knowledge

    • B.

      Novice

    • C.

      Intermediate

    • D.

      Proficient

    • E.

      Expert

    Correct Answer
    A. No knowledge
  • 16. 

    Using a code repository

    • A.

      No knowledge

    • B.

      Novice

    • C.

      Intermediate

    • D.

      Proficient

    • E.

      Expert

    Correct Answer
    A. No knowledge
  • 17. 

    Designing code

    • A.

      No knowledge

    • B.

      Novice

    • C.

      Intermediate

    • D.

      Proficient

    • E.

      Expert

    Correct Answer
    A. No knowledge
  • 18. 

    Testing code

    • A.

      No knowledge

    • B.

      Novice

    • C.

      Intermediate

    • D.

      Proficient

    • E.

      Expert

    Correct Answer
    A. No knowledge
  • 19. 

    Profiling code

    • A.

      No knowledge

    • B.

      Novice

    • C.

      Intermediate

    • D.

      Proficient

    • E.

      Expert

    Correct Answer
    A. No knowledge
  • 20. 

    Connecting and transferring data to a secure server

    • A.

      No knowledge

    • B.

      Novice

    • C.

      Intermediate

    • D.

      Proficient

    • E.

      Expert

    Correct Answer
    A. No knowledge
  • 21. 

    Editing and maintaining code

    • A.

      No knowledge

    • B.

      Novice

    • C.

      Intermediate

    • D.

      Proficient

    • E.

      Expert

    Correct Answer
    A. No knowledge
  • 22. 

    Debugging code

    • A.

      No knowledge

    • B.

      Novice

    • C.

      Intermediate

    • D.

      Proficient

    • E.

      Expert

    Correct Answer
    A. No knowledge
  • 23. 

    Would you recommend this course to a friend or colleague?

    • A.

      Yes

    • B.

      No

    Correct Answer
    A. Yes
  • 24. 

    How would you describe your ability in the following areas now? Using and navigating a Unix environment

    • A.

      No knowledge

    • B.

      Novice

    • C.

      Intermediate

    • D.

      Proficient

    • E.

      Expert

    Correct Answer
    A. No knowledge
  • 25. 

    How much of the training material presented was new to you?

    • A.

      None of it.

    • B.

      Some of it.

    • C.

      Most of it.

    • D.

      All of it.

    Correct Answer
    A. None of it.
  • 26. 

    How much of the training material presented was useful to you?

    • A.

      None of it.

    • B.

      Some of it.

    • C.

      Most of it.

    • D.

      All of it.

    Correct Answer
    A. None of it.

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Feb 08, 2019
    Quiz Edited by
    ProProfs Editorial Team
  • Sep 30, 2015
    Quiz Created by
Back to Top Back to top
Advertisement