Last active
November 8, 2024 12:22
-
-
Save ishan1608/87cb762f31b7af70a867 to your computer and use it in GitHub Desktop.
A python script to heat your computer so that your fingers can work upon your laptop in winter.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Heater | |
A program that spawns as much number of processes as there are CPUs on the computer. | |
This keeps the core temprature high. | |
I made this so that my fingers feel more comfortable while working on my laptop during winter. | |
Caution : An eye should be kept on the CPU temprature so that when it is getting too hot, | |
the prgoram needs to be killed; else it can damage the CPU. | |
Author : Ishan | |
Email : [email protected] | |
""" | |
import multiprocessing | |
import sys | |
def round_robin_count(): | |
while(True): | |
number = 0 | |
if(number >= sys.maxsize): | |
number = 0 | |
else: | |
number = number + 1 | |
if __name__ == "__main__": | |
if len(sys.argv) == 2 and sys.argv[1] == '--about': | |
print(__doc__) | |
elif len(sys.argv) == 2 and sys.argv[1] == '--help': | |
print('Heater', 'USAGE: python3 ' + sys.argv[0] + ' [option]', sep='\n') | |
print('To read about.', 'python3 ' + sys.argv[0] + ' --about' ,sep=' ') | |
print('To see this help message.', 'python3 ' + sys.argv[0] + ' --help', sep=' ') | |
else: | |
process_count = 1 | |
print('Heating up the CPU') | |
while(process_count <= multiprocessing.cpu_count()): | |
process_to_be_not_seen_again = multiprocessing.Process(target=round_robin_count) | |
process_to_be_not_seen_again.start() | |
process_count += 1 | |
This is for the ants in my laptop!
This is for the ants in my laptop!
🤣 Never thought of this use case.
man ur a life saver I was wearing shorts and using my MacBook so it hit me with an extreme cold so I am now using this much love!
HOW TO STOP IT HELP!!!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Speed3k-python That piece of code is already inside the
if __name__ == "__main__":
block.What would adding another redundant condition do?