Skip to content

Instantly share code, notes, and snippets.

@albertofwb
Created February 3, 2018 04:44
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertofwb/d4126954a0ca59341d84d53ce517e19c to your computer and use it in GitHub Desktop.
Save albertofwb/d4126954a0ca59341d84d53ce517e19c to your computer and use it in GitHub Desktop.
早上给 MAC 插上电源就出去了,回来发现电量还是28%.电池图标显示“电池没有在充电”.网上搜索一番,网友们说是温度太低就不能充电.于是我用python 写了两行代码,十几秒之后就正常充电了
import multiprocessing
def worker():
while True:
pass
if __name__ == '__main__':
jobs = []
cpu_count = multiprocessing.cpu_count()
print("About to start %d process to warm your mac" % cpu_count)
for i in range(cpu_count):
p = multiprocessing.Process(target=worker)
jobs.append(p)
p.start()
@zlllllllllllll
Copy link

啊啊 啊 温度加 了吗

@JankinAn
Copy link

JankinAn commented Feb 3, 2018

LOL 一万的暖手宝

@albertofwb
Copy link
Author

暖手宝谈不上,但真的管用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment