Changes

Jump to: navigation, search

OPS435 Assignment 1 for Section C

464 bytes added, 14:43, 19 February 2021
Second Milestone (due February 21)
In order to complete <code>percent_to_graph()</code>, it's helpful to know the equation for converting a number from one scale to another.
(''y''<sub>out</sub> [[File:Scaling- ''y''<sub>min</sub>) / (''y''<sub>max</sub> - ''y''<sub>min</sub>) = (''x''<sub>in</sub> - ''x''<sub>min</sub>) / (''x''<sub>max</sub> - ''x''<sub>min</sub>)formula.png]]
In this equation, ``x`` refers to your input value percent and ``y`` will refer to the number of symbols to print. The max of percent is 100 and the min of percent is 0.
import duim
duim.percent_to_graph(50, 10)
 
To test with the check script, run the following:
 
<code>python3 checkA1.py -f -v TestPercent</code>
== Second Milestone (due February 21) ==
* <code>create_dir_dict</code> will take your list from <code>call_du_sub</code> and return a dictionary.
** Every item in your list should create a key in your dictionary.
** Your dictionary values should be a number of bytes.  For example: <code>{'/usr/lib/local': 33400}</code> ** Again, test using your Python interpreteror the check script.
== Additional Features ==To run the check script, enter the following: <code>python checkA1.py -f -v TestDirDict</code>
After completing == Minimum Viable Product == Once you have achieved the aboveMilestones, you are expected will have to do the following to get a minimum viable product:* In your <code>if __name__ == '__main__'</code> block, you will have to check command line arguments. ** If the user has entered no command line argument, use the current directory.** If the user has entered more than one argument, or their argument isn't a valid directory, print an error message.** Otherwise, the argument will be your target directory.* Call <code>call_du_sub</code> with the target directory.* Pass the return value from that function to <code>create_dir_dict</code>* You may wish to add some additional (two create one or more) functions providing useful informationto do the following:** Use the total size of the target directory to calculate percentage. Some programs ** For each subdirectory of target directory, you might want will need to look calculate a percentage, using the total of the target directory.** Once you've calculated percentage, call <code>percent_to_graph</code> with a max_size of your choice. ** For every subdirectory, print <i>at are:least</i> the percent, the bar graph, and the name of the subdirectory.** The target directory <b>should not</b> have a bar graph.
* [https://https://ostechnix.com/neofetch-display-linux-systems-information/ screenfetch/neofetch]* [https://htop.dev/ top/htop/Bashtop]== Additional Features ==
It is After completing the above, you are expected that the to add some additional features you provided should be useful, non-trivial, they should not require super-user privileges and should not require the installation of additional modules or packages.<b>In this part of the assignment, it is better to try for something useful and fail than it is to implement something trivial! I am looking for evidence that Some improvements you have worked with Linux machines and know what kinds of information could make are useful to see at a glance.</b>:
You might consider:* Network information/IP addressesFormat the output in a way that is easy to read.* The state of some important daemons/systemd servicesAdd colour to the output.* process informationAdd more error checking, print a usage message to the user.* information about online usersConvert bytes to a human-readable format. NOTE: This doesn't have to be 100% accurate to get marks.* number of packages installedAccept more options from the user.* cpu loadSort the output by percentage, or by filename.
You may even choose to make It is expected that the output more attractive/colourful etc. If soadditional features you provided should be useful, you <i>are permitted to use more modules</i> than those specified abovenon-trivial, but make sure that they should not require super-user privileges and should not require the required functions still succeed as they areinstallation of additional packages to work. You may want (ie: I shouldn't have to look into default arguments, ask me for clarification if you're interestedrun pip to make your assignment work).
== The Assignment (due March 7, 11:59pm) ==
* As stated before, Be sure to make your code will be inside the file "assignment1.py". Begin by completing the required functions, committing your changes as you go. Complete and test each function final commit before moving to the nextdeadline. * When you have completed Then, copy the task, make sure that all contents of your changes have been committed and pushed to GitHub<b>duim. py</b>In additionfile into a Word document, you will and submit <code>assignment1it to Blackboard.py</codei> I will use GitHub to evaluate your deadline, but submitting to Blackboardtells me that you wish to be evaluated.</bi>
= Rubric =
| Program Authorship Declaration || 5 ||
|-
| Check script passed required functions design || 20 5 |||-| required functions readability || 5 ||
|-
| given functions main loop design || 5 10 ||
|-
| df/free filtering functions design main loop readability || 10 ||
|-
| additional features appropriate output function design || 10 5 ||
|-
| additional features implemented output function readability || 10 5 ||
|-
| docstrings additional features implemented || 5 20 ||
|-
| in-line docstrings and comments || 5 ||
|-
| First Milestone ||10||
|-
| Debrief Second Milestone || 10 ||
|-
| github.com repository: Commit messages and use || 10 ||
Please submit the following files by the due date:
* [ ] your algorithm document, named as 'algorithm.txt', in your GitHub repo, by October 19.* [ ] your python script, named as 'assignment1duim.py', in your repository, and also '''submitted to Blackboard''', by November 2 March 7 at 11:59pm.* [ ] your debrief answers should be submitted as issues to GitHub by November 24.

Navigation menu