Computers and Technology, 05.10.2021 20:10, bloop3r
#!/usr/bin/env python3
import shutil
import psutil
def check_disk_usage(disk):
"""Verifies that there's enough free space on disk"""
du = shutil. disk_usage(disk)
free = du. free / du. total * 100
return free > 20
def check_cpu_usage():
"""Verifies that there's enough unused CPU"""
usage = psutil. cpu_percent(1)
return usage <75
#If there's not enough disk, or not enough CPU, print an error
if not check_disk_usage('/') or not check_cpu_usage():
print("ERROR!")
print("Everything ok")
else:
print("Network checks failed")
i cant seem to find the bug in the code, ive written it multiple times. can someone help me?
Answers: 2
Computers and Technology, 23.06.2019 13:00, torresnoemi899
Which of the following statements is false? a. a class can directly inherit from class object. b. if the class you're inheriting from declares instance variables as private, the inherited class can access those instance variables directly. c. a class's instance variables are normally declared private to enforce good software engineering. d. it's often much more efficient to create a class by inheriting from a similar class than to create the class by writing every line of code the new class requires.
Answers: 3
Computers and Technology, 24.06.2019 11:00, airbenderjermai
Need fast im timed in a paragraph of 125 words, explain at least three ways that engineers explore possible solutions in their projects.
Answers: 2
Computers and Technology, 24.06.2019 18:30, shemiahking5432
Jacking is a crime that takes place when a hacker misdirects url to a different site. the link itself looks safe, but the user is directed to an unsafe page
Answers: 1
#!/usr/bin/env python3
import shutil
import psutil
def check_disk_usage(disk...
import psutil
def check_disk_usage(disk...
Mathematics, 19.11.2020 20:10
Physics, 19.11.2020 20:10
Biology, 19.11.2020 20:10
History, 19.11.2020 20:10
English, 19.11.2020 20:10
Geography, 19.11.2020 20:10
History, 19.11.2020 20:10