Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions BasicPythonScripts/CPU Temperature/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Title:-

CPU Temperature

## Description :-

This is a simple python script to calculate CPU Temperature, which is compatible with Linux based Operating System. For the running this script make sure you have python install along with library "psutil".

## Setup instructions :-

You can install the all requirements from **requirements.txt** by using pip.

```
pip install -r requirements.txt

python3 "cpu.py"

```

## Output:-

<p align = "center">
<img src="./Images/01.png"/>
</p>

## Author(s):-
[Vaibhav Vipin](http://github.com/Vaibhav-Vipin)
5 changes: 5 additions & 0 deletions BasicPythonScripts/CPU Temperature/cpu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# importing the psutil library
import psutil

data = psutil.sensors_temperatures()
print("Current Temperature of CPU (celcius): ", data['coretemp'][0][1])
2 changes: 2 additions & 0 deletions BasicPythonScripts/CPU Temperature/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Requirement for running the script
psutil