Shaoqing Ren NIO: The Genius of Autonomous Driving

Ren Shaoqing NIO – Top Researcher in Autonomous Driving

Not many people know this, but NIO car manufacturer’s head of AI, Ren Shaoqing (任少卿) is an absolute genius in the field of autonomous driving. In this blog post, we will detail facts about Dr Ren Shaoqing and his research in self driving and autonomous driving technology. We will also introduce other top researchers in the field of autonomous driving. All our sources are from Google Scholar and other trusted sources.

Ren Shaoqing NIO – the secret weapon of NIO Autonomous Driving

Everyone knows that the main trumps of electric vehicles are clean energy, and autonomous driving. NIO has managed to hire the top researcher in the field of autonomous driving. They are quite low profile about it, not many people know about this at the moment.

Just click on the Google Scholar (Autonomous Driving) link, it will show you the full ranking of the top researchers in the field of autonomous driving, ranked by the official Google Scholar algorithm according to citation count.

The top 5 researchers in the field of Autonomous Driving, ranked by the official Google Scholar page.

Just look at the top researcher in the list, it is Dr Ren Shaoqing of NIO, with a whopping 111,396 citation count (as of Dec 2020). Citation counts are a way of measuring the impact of a researcher’s work. Basically, the more citation counts means the more people are noticing and citing the researcher’s papers. Ren Shaoqing’s citation count of 111k is typically 10 times more than a Full Professor at most universities.

In terms of quantity of citations, it is clear that Ren Shaoqing (NIO’s head of AI), is at the top of the game. How about quality of research?

Dr Ren Shaoqing’s research quality is top notch as well!

Ren Shaoqing NIO – Achievements in the field of Autonomous Driving

  • First author paper at NIPS (Conference on Neural Information Processing Systems), which is one of the best conferences in computer science. The paper’s topic is “Faster R-CNN: Towards real-time object detection with region proposal networks”. Real-time object detection is very related to autonomous driving, it helps the car detect objects and obstacles in real time.
  • CVPR Best Paper Award, 2016. CVPR is the premier annual computer vision event comprising the main conference and several co-located workshops and short courses. His co-authored award winning paper is titled “Deep Residual Learning for Image Recognition”.
  • ImageNet Large Scale Visual Recognition Challenge (ImageNet) Competition Winner Award, 2015
  • COCO Detection Challenge Winner Award, 2015
  • Microsoft Research Asia Fellowship, 2014
  • National Scholarship of China, 2010

In case, if anyone is thinking that Dr Ren Shaoqing is just an academic nerd with no business experience, that would be totally wrong! He has business and startup experience as well, he co-founded an autonomous driving software startup Momenta.ai, which grew into unicorn (private company with a valuation over $1 billion) in three years, aiming to help people live a better life with improved safety and efficiency of driving through artificial intelligence.

More of Ren Shaoqing’s achivements in autonomous driving and self driving can be found on his personal website.

Some of the comments on Ren Shaoqing’s personality can be found on Chinese website Zhihu (Chinese version of Quora):

这里的“年轻”除了长相上的嫩,也包括为人处世——完全没有架子。他是个很儒雅的人,手下的团队跟他也很亲近。少卿做事风格看起来不紧不慢、慢条斯理,但论及“拼”,他也是超拼。记得有一段时间,他白天一整天的时间都花在各种会、各种面试上,一直会持续到凌晨十二点之后。这时他也不着急走,而是继续干些得静下心来才能干的工作。早期他主要负责视觉感知研发方面的工作,后来负责了一段时间高速路自主巡航相关的项目,我走的时候还是在负责感知研发。

Translation:

Ren Shaoqing is a young guy, he is very humble with no airs. He is a very refined person, and his team is very close to him. Shaoqing’s style of doing things does not seem to be hurried, his style is slow and steady, but when it comes to “fighting”, he is also super persistent. I remember that there was a period of time when he spent the whole day in various meetings and interviews, which lasted until after 12am midnight. At this time, he did not leave office in a hurry, but continued to do some work that could only be done by calming down in the quiet of the night. In the early days, he was mainly responsible for the research and development of visual perception. Later, he was responsible for the projects related to autonomous driving on highways for a period of time. When I left, he was still responsible for the research and development of visual perception.

Source: https://www.zhihu.com/question/414025403/answer/1408847709

Other Top Researchers in Autonomous Driving

Other than Ren Shaoqing of NIO, there are also other genius top researchers in the field of Autonomous Driving. Interestingly, the third highly ranked researcher in Autonomous Driving (Dr Zhou Xing) is also affiliated to NIO!

We compile some of the top researchers in autonomous driving in the table and barchart below.

Top Researchers in Autonomous Driving and Computer Vision

We list 15 top researchers (with more than 1000 citations) in the field of autonomous driving and computer vision. Notice that #1 and #3 on the list are from NIO!

Rank Name Citations
1 Shaoqing Ren (NIO) 111396
2 Andrew Blake (Samsung) 57258
3 Zhou Xing (NIO, Stanford) 36267
4 Raquel Urtasun (Uber, University of Toronto) 34264
5 Andrej Karpathy (Tesla) 32692
6 Jonathan P. How (MIT) 31601
7 Gang Wang (Alibaba) 16240
8 Uwe Franke (Daimler Mercedes-Benz) 13485
9 Fisher Yu (ETH Zurich) 13150
10 Dmitri Dolgov (Google) 8381
11 Markus Enzweiler (Daimler Mercedes-Benz) 7917
12 John M. Dolan (Carnegie Mellon University) 7206
13 Forrest Iandola (Tesla) 6277
14 Xinzhou Wu (XPENG) 5787
15 Tianjun Xiao (Tesla) 2588
Chart of top researchers in Autonomous Driving, ranked by Google Scholar Citations.

We can see from the barchart above that all 15 researchers (ranging from NIO, Tesla, XPENG) are very excellent in their field, producing research with more than 1000 citations in the field of autonomous driving or closely related fields like computer vision.

It is clear that Ren Shaoqing is one of the brightest stars in this exciting new field of Autonomous Driving!

Ren Shaoqing – the 21st Century Zhuge Liang of Autonomous Driving

Based on Ren Shaoqing’s personality (devoted and extremely hardworking 鞠躬尽瘁, but yet calm and unhurried) and achievements in autonomous driving, he bears close resemblance to a legendary character in Chinese history: Zhuge Liang.

In Chinese history or legend, Zhuge Liang was a famous military strategist and inventor. He is said to invent the first self-driving (or self-walking) cow, called the Wooden Cow Flowing Horse (木牛流马). It was said to be able to walk by itself and was used to transport grain during the Northern Expedition.

The self-driving car (or rather cow), invented by Zhuge Liang, according to legend.

Hence, Zhuge Liang can be said to be the father of autonomous driving or self-driving, according to legend. Will Ren Shaoqing (NIO’s head of AI) become the Zhuge Liang of the 21st Century and invent the perfect autonomous self-driving car?

NIO Book

Currently, there is no NIO book available as history is still being written! We will definitely add them here if books on NIO become available. For a deeper insight into Electric Vehicles and Autonomous Vehicles, there are several great books on Amazon.


Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
(New York Times Bestseller!)


Autonomous Vehicles: Opportunities, Strategies and Disruptions: Updated and Expanded Second Edition
(Autonomous vehicles will change our fundamental lifestyles and create what are perhaps the most significant opportunities of this century!)


Autonomy: The Quest to Build the Driverless Car―And How It Will Reshape Our World
(Autonomous Vehicles are said to be the innovation that promises to be the most disruptive change to our way of life since the smartphone!)

Spyder Typing Delay

Recently, the Spyder IDE faced serious typing delay or lag. Basically, after entering something using the keyboard, it takes almost half a second for it to appear on the screen. The issue can also be described as a typing lag in Spyder.

This seems to have been triggered by the installation of Big Sur OS.

Spyder slow on Mac

After intensive googling, we stumbled upon this Github page detailing several possible solutions.

The one that worked for us was installing pyqt and pyqtwebengine. Basically, type the following commands in the terminal:

pip install PyQt5
pip install PyQtWebEngine

The above solution should be very safe since it is just installing Python packages.

Spyder lagging

The above solution helped to solve the troubling issue of Spyder lagging. Since Spyder uses Qt for its GUI, it is critical to keep the various Qt related packages updated / at the correct version. This may be the reason why installing PyQt5 and PyQtWebEngine helps to remove the lag in Spyder.

Spyder very slow

There seems to be many reasons, other than the above, that can result in Spyder being very slow. One tip that is useful, is never update to the latest version of Spyder, Mac OS, or Anaconda immediately once it is released, unless it is absolutely necessary. Most of the bugs appear in the newest releases, and can cause multiple problems including making Spyder very slow. By updating at a later date, most of the bugs would have been solved by then and it is a much safer approach.

Previously, updating to the latest Spyder 4.1.5 also caused several problems, including lag, slowness or even Spyder simply just crashing.

Best Majors in Singapore

Update: To ensure that our list of best majors in Singapore is always updated, we have a poll below to reflect the updated views of readers. Do vote and check out the latest results!

Poll on the Best Major in Singapore:

Why is there a need to consider the Best Majors in Singapore?

There is an old Chinese proverb, saying that “The greatest fear of a man is to choose the wrong occupation.”. (男怕入错行,女怕嫁错郎.) Despite being thousands of years old, this proverb still holds true in the 21st century, even in advanced regions like the USA, Europe, and Singapore.

Basically, the choice of major directly or indirectly determines the future occupation or career path of a student.

Ancient Chinese Proverb:
“The greatest fear of man is getting into the wrong occupation. The greatest fear of woman is marrying the wrong man.”

(The first part still holds true, the second part may be outdated?)

男怕入错行,女怕嫁错郎

Best Majors in Singapore

There are many sources on the best majors in university or college, but focused on other countries such as the USA. Do take a look to see the general trend, but there are several majors that are “uniquely” good or bad in Singapore.

Best Majors in Singapore (Tier List)

Firstly, the best major in a sense is based on one’s interest and passion. For example, if one has totally zero interest in being a medical doctor or healing patients, it does not make sense going into the Medicine major in university. One may even burn out while attempting to do so.

That being said, if you have passion for multiple subjects, but have problem narrowing it down to a single major, it may be good to look at which one has the best prospects.

S Tier Majors in Singapore

  • Medicine
  • Dentistry

Based on the ageless theory of demand and supply, medicine and dentistry are bound to be the best for years to come. Demand-wise, humans are bound to get sick, and even more so with an aging population in Singapore. Supply-wise, the supply of doctors and dentists are strictly controlled by limiting the yearly cohort of medical students. In general, there will always be a shortage (or just enough), and never a surplus of doctors/dentists in Singapore.

The Singapore Medical Council (SMC) is a powerful organization, with the power to advice the Ministry of Health to cut overseas medical schools approved for practice in Singapore, for example. This helps to control the supply of doctors in Singapore.

Dentistry, though not as prestigious as medicine, actually have good earning potential as most visits to dentists are surgeries which cost more. From an official Youth.SG government website, the salary range is  $5,000 to $7,000 per month for fresh dentistry graduates.

In general, both medicine and dentistry are always among the highest paying degrees in Singapore. According to anecdotes online, there are people who are even willing to sell their house in order to send their child to medical school overseas (e.g. Australia); such is the attractiveness of the Medicine major in Singapore.

A Tier Majors in Singapore

  • Law
  • Computer Science (or other computer related majors)
  • Architecture
  • Pharmacy

Law is one of the highest paying degrees in Singapore, in fact potentially even more so than medicine. However, it is also known that being a lawyer is an extremely high stress occupation, and there is a high attrition rate because of that. In Singapore, 3 out of 4 (75%) local lawyers will leave practice within 10 years of commencing, according to the Law Society. That is why it is only placed at ‘A’ tier instead of ‘S’ tier.

For Computer Science, there is no need to explain, it is needed in all companies nowadays in the shift to high tech. Big data, data science, machine learning, is the hottest thing now. The only reason why computing science is only ‘A’ tier instead of ‘S’ tier is because there is no control on the supply of computer engineers/scientists in Singapore. Theoretically, it could happen that there can be more and more computer engineers/ data scientists trained (including from overseas) until the entire field is over-saturated. Also, from history, the technological sector tend to experience things like “AI winter” or “Dot-com bubble”.

Computer Science (and data science) is also recently one of the highest paying degrees in Singapore, with good job prospects. It is also quite compatible with the current “work from home” climate across the globe, it is unlikely to be disrupted by disease epidemics such as COVID-19 or future viruses.

For architecture, the pay is good and attracts top students. And also, even though Singapore is a small country with limited land, there always seems to be construction projects going on here and there all the time. For pharmacy, due to the laws, there is a constant demand for pharmacists required to dispense medication (for example every Guardian/Watson pharmacy needs one) and other duties. Hence, unless the laws regarding medicine change, there is always a constant demand for pharmacists.

B Tier Majors in Singapore

Note that “B Tier” still means good, while “A Tier” means very good!

  • Engineering (except computing)
  • Science (Physical science or hard science majors such as: Physics, Mathematics, Chemistry.)
  • Many others … (Vote in the poll!)

For engineering, this may be a surprise to foreign readers because in the USA, engineers are paid very well. According to the U.S. Bureau of Labor Statistics (BLS) engineers in America have a median annual wage of USD $91,010, which is  around SDG $122k.

In Singapore, engineering majors are “B” tier since they are still good in the sense that you could still most likely find a job related to what you study. Why they are not “A” tier is again due to the theory of demand and supply. The demand is not as high as say Computer Science, since Singapore is already slowly transitioning out of the manufacturing industry (e.g. do you see any big factories in Singapore?) For supply, again the number of engineers are not controlled, when there is a huge number of engineers (either trained or imported), wages will get suppressed.

For Science degrees (especially physical sciences like Physics, Chemistry, Mathematics), it is a solid “B” tier because the student actually learns useful and real quantitative skills that can be transferred to other domains. For example, it is very possible for physics or mathematics majors to transition to the finance industry after they graduate. Also, teaching in schools (public or private) is a valid option for Science majors.

Useless Degrees in Singapore

Many people actually search for “useless degrees in Singapore”, presumably to avoid them?

There is actually no such thing as a “useless degree”, since every degree from a recognized institution in Singapore does impart knowledge to the student. In the worst case scenario, they are still regarded as a general degree which will be recognized in the civil service or most major companies.

There is a notable mention to “Life Science” (Biology) degrees in Singapore though. Basically, the “Life Science” undergraduate degree in Singapore is widely regarded as not sufficient in itself to get a Life Science related job in Singapore, further degrees such as masters or PhD may most likely be required.

seriously it (Life Science Prospects in Singapore) is not good.

my batch people who went into life sciences are not doing well.

most have changed industries.

jobs are still few and not well paying.

i receive quite a lot of resumes from them, trying to do a mid career switch to engineering.

Source: Reddit

 

I was a life science grad specializing in biomed. Graduated in 2015

I would say out of my circle of friends, only one person went on to do research for a year for his masters. Everyone else went to do other things that were not life science related.

Source: Reddit

 

hi!! to be vv honest, life sci is q a bad place to be in rn (unless u are intending to do the duke-nus grad med track; which again, entry is vv competitive). i have friends who’re in life sci and they’re all desperate for phd bc degree really means nothing; they constantly joke about degree-holders being test-tube washers lmao. in nus faculty of sci, the dean’s list is often filled w ppl from life sci whose CAP are v high. that’s bc life sci mods are generally easier than other sci courses, and the cohort is bigger (so more bellcurve tankers). and when a degree is relatively easy, u can imagine it’s prospects

Source: Reddit

An excellent world-class post on why the Life Science / biology hype died down worldwide, not just in Singapore:

It died down worldwide imo. There was a lot of hype about genetics and biotech in the 90’s, but after the Human Genome Project was completed in the early 00’s everyone realised that there are several more levels between genes and phenotype, e.g. epigenetics, mRNA regulation, proteomics, nutrition, lifestyle choices, pathogens, behaviour… And we can’t even be certain that there aren’t more levels which we are currently unable to perceive.

Despite the predictions of futurists in the 90’s, we still can’t fully explain the pathways that lead to cancer or Alzheimer’s or heart disease, let alone fully formulate rational treatments for them. And forget about designing artificial life from scratch.

There was a mountain that science hoped El Dorado lay hidden behind, but after climbing it science found only a bit of gold, and 5 higher mountains in front. It’s just the way the universe is really; nobody could have known that the 5 mountains existed before climbing the first.

Source: Reddit

Python matplotlib Plot Multiple Figures in Separate Windows

Matplotlib is a popular plotting package used in Python. There are some things to note for plotting multiple figures, in separate windows.

A wrong approach may lead to matplotlib showing a black screen, or plotting two figures superimposed on each other, which may not be the desired outcome.

Sample Matplotlib Code for Plotting Multiple Figures in Separate Windows

import matplotlib.pyplot as plt

plt.figure()
# plotting function here, e.g. plt.hist()
plt.savefig('filename1')


plt.figure()
# plotting function here, e.g. plt.hist()
plt.savefig('filename2')

plt.show()

One way to do this is to use the plt.figure() command for each figure that you want to plot separately. Optionally, you can use plt.savefig() if you wish to save the figure plotted to the working directory folder.

At the end, use the plt.show() command. The plt.show() command should only be used once per script.

Laptop for data science and machine learning

We recommend and review some laptops/notebooks suitable for data science and machine learning.

Firstly, we state the 4 core important specs (specifications) for laptops for data science and machine learning.

1) RAM: Should be 8GB or higher.

2) CPU: Should be Intel Core i5, or even better Intel Core i7.

3) Storage: Should be at least 256 GB SSD.

4) GPU: Optional, but good to have for deep learning. (Note that Mac GPUs are not usable for deep learning.)

RAM and CPU are necessary in order to conduct computations successfully and within a reasonable time. Storage is necessary to process big data which can potentially be several gigabytes. GPU is useful to speed up deep learning, but is optional since there are many cloud or server options available.

For concrete recommendations, we recommend the following 5 laptops. Certainly, there could be other laptops that are equally suitable for data science and machine learning, do comment below if you have a good suggestion!

1)

ASUS ROG Strix Scar 17 Gaming Laptop, 17.3” 300Hz FHD IPS Type, NVIDIA GeForce RTX 2070 Super, Intel Core i7-10875H, 16GB DDR4, 1TB PCIe SSD, Per-Key RGB Keyboard, Wi-Fi 6, Windows 10, G732LWS-DS76

2)

Dell XPS 15 7590 Laptop 15.6 inch, 4K UHD OLED InfinityEdge, 9th Gen Intel Core i7-9750H, NVIDIA GeForce GTX 1650 4GB GDDR5, 256GB SSD, 16GB RAM, Windows 10 Home, XPS7590-7572SLV-PUS, 15-15.99 inches

3)
New Apple MacBook Pro (16-inch, 16GB RAM, 512GB Storage, 2.6GHz Intel Core i7) – Space Gray

4)

2020 Lenovo ThinkPad T590 15.6″ FHD Full HD (1920×1080) Business Laptop (Intel Quad-Core i7-8565U, 16GB RAM, 512GB SSD) Backlit, Type-C Thunderbolt 3, RJ-45, Webcam, Windows 10 Pro IST Computers

5)
HP Pavilion 15-inch Laptop, Intel Core i7, 16 GB RAM, 512 GB SSD Storage, Intel Iris Plus Graphics, Windows 10 Pro, Amazon Alexa Voice Compatible (15-cs3019nr, Mineral Silver)

iMovie Transition Glitch

iMovie “Corrupted” Frames between two video clips

iMovie is a great free movie editor for Mac. However, an annoying bug is that when two video clips are put together, there can often be “corrupted” frames, glitch, or even choppy video between the two clips.

Simple solution to iMovie Transition Glitch

There are some complicated solutions online, such as re-importing the video clips in certain formats.

However, a simple solution that I tried and tested to work in most cases is to try trimming off a few seconds from the start of the affected video clip. Or even adding a transition effect where the problem arises may work.

To explain more precisely, suppose the problem arises in between A -> B, where A and B are video clips. Then, you can try trimming off a few seconds off the start of video clip B, or adding a transition effect between A and B. (If there is already a transition from A -> B, try removing it!)

Another solution to iMovie Transition Bug

Another solution that I tried and works in some cases, is to export the movie via File -> Share in Best (ProRes) Quality, with Better Quality Compress.

Best (ProRes) Quality and Better Quality Compression may solve your iMovie glitching bugs.

Other solutions to iMovie Bugs between Video transitions

If you have other solutions that you have seen or tried out, please share it in the comments below!

How to free up space on Gmail

4 Steps to clear space in Gmail

Although Gmail has 15 GB of space, it can run out of space quite fast, especially nowadays many emails contain attachments that can be quite large.

To free up space on Gmail, I usually do the following 4 steps:

1) Search “size:100k older:2018” on Gmail

The above searches for files 100 kilobytes or larger, dated 2018 or earlier.

You can modify your search accordingly, for example “size:1M older:2017” searches for files larger than 1 megabyte, older than 2017.

2) Search “from:facebook.com”

The above searches for all email sent from email address ending with “facebook.com”. This can be quite effective, since many small emails typically end up being larger than 1 single big email.

You can modify your search accordingly, for example “from:twitter.com”, etc.

3) Delete unwanted emails (found using methods above), and clear Trash

Clearing trash is important (otherwise the deleted files will still take up space). Messages that have been in Trash more than 30 days will be automatically deleted though.

Double check before you delete, since once deleted it is not possible to recover the emails.

4) Refresh your browser, and see that you have more space!

Typically, by using the above steps, I can delete up to 1o0 MB of email.

 

Canon PIXMA G5020 (G5070) Review

Canon Most Ink Efficient Printer

Just bought this printer (Canon PIXMA G5020, which is listed in Singapore as Canon PIXMA G5070). It is ideal for home use for students and working professionals.

Its advantages include:

  • Very efficient “ink tank” system. The ink refill system is by bottles of pure ink liquid instead of cartridges.
  • Design for high volume printing at low running cost
  • Compact size and dimensions (Approx. 403 x 369 x 166 mm for factory configuration,  Approx. 403 x 695 x 356 mm when Output/ADF trays extended)
  • Dual paper loading (you can load paper on the rear tray as well as the front tray). If you retract the rear tray, the printer becomes even more compact (just 16.6cm tall).
  • High speed (for inkjet): ISO standard print speed (A4): up to 13.0ipm black / 6.8 ipm colour
  • Supports wireless connection to computer as well as smart phone.
  • Automatic Duplex


Canon PIXMA G5020 Wireless MegaTank Single Function SuperTank Printer | Mobile & Auto 2-Sided Printing

Overall, this is the ideal printer for work from home, as well as homeschool purposes. It is even more ideal for those who don’t want additional features such as scanner and fax. By not having those features (which you may not need), it has a very economical affordable cost. Especially when you factor in the long term savings from cheap and long-lasting ink refills.

If you do want copier, fax and scanning features, then you can consider the Canon PIXMA G7020 instead, which is basically the Canon G5020 with the additional features.


Canon PIXMA G7020 Wireless All-in-One Supertank (Megatank) Printer, Copier, Scan, Fax and ADF with Mobile Printing, Black

AI can’t predict how a child’s life will turn out even with a ton of data

Despite the great hype of AI, there are still many limitations of what AI can do. Real life is too complicated for a machine to figure out, at least currently.

Source: MIT Tech Review

Hundreds of researchers attempted to predict children’s and families’ outcomes, using 15 years of data. None were able to do so with meaningful accuracy.

Now a new study published in the Proceedings of the National Academy of Sciences casts doubt on how effective this approach really is. Three sociologists at Princeton University asked hundreds of researchers to predict six life outcomes for children, parents, and households using nearly 13,000 data points on over 4,000 families. None of the researchers got even close to a reasonable level of accuracy, regardless of whether they used simple statistics or cutting-edge machine learning.

“The study really highlights this idea that at the end of the day, machine-learning tools are not magic,” says Alice Xiang, the head of fairness and accountability research at the nonprofit Partnership on AI.

Install Windows on MacBook (Fast and Easy method)

Basically, you just need to follow the instructions in the YouTube video below. It is very easy and fast. The key software is VirtualBox.

You can download the official Windows 10 ISO disc image here: https://www.microsoft.com/en-gb/software-download/windows10ISO

Note that Windows 10 (Home) is free (you don’t have to activate it) and you can use it with only very minor restrictions.

Overall, the process to install Windows 10 on a Mac (using VirtualBox) is much easier than I expected.

Total time taken: Around 30-40 minutes (possibly faster if your download speed and RAM is fast)

Total cost: $0

Total space needed: Around 10-20 GB is needed initially. VirtualBox allows “dynamically allocated disks” which are faster to create and can grow to larger sizes. For example, if you set 50GB as your disk space (but only use 10 GB) then it will only occupy 10 GB on your Mac.

How to keep Python / R Running on Mac (without screen lock or sleep)

When the Mac (or MacBook) is running for a long time, it is very liable to do one of the following things:

  • sleep
  • screen saver
  • lock screen

The problem is that your Python program or R program running in the background will most likely stop completely. Sure, it can resume when you activate the Mac again, but that is not what most people want! For one, it may impact the accurate calculation of elapsed time of your Python code.

Changing settings via System Preferences -> Energy Saver is a possible solution, but it is troublesome and problematic:

  • Have to switch it on and off again when not in use (many steps).
  • Preventing sleep may still run into screen saver, screen lock, etc.
  • Vice versa, preventing screen lock may still run into Mac sleeping, etc.

The solution is to install this free App called Amphetamine. Despite its “drug” name, it is a totally legitimate program that has high reviews everywhere. What this app does is to prevent your Mac from stopping, locking or sleeping. Hence, whatever program you are running will not halt till the program is done (or when you switch off Amphetamine).

It is a great program that does its job well! Highly recommended for anyone doing programming, video editing or downloading large files on Mac.