Find your Mac Spec

1. Go to the Apple (top left of screen) and choose “About this Mac”.
2. Look at the pop-up window and find the serial number listed at the bottom. Copy it.
3. Go to http://www.everymac.com/ultimate-mac-lookup/ and paste your serial number where it says Enter Identifier.
4. This will bring you to a page with the model of your machine.

Reference:
https://apple.stackexchange.com/questions/268463/which-graphics-cards-does-macbook-pro-retina-15-inch-mid-2014-have

Advertisements

Python – Performance Tuning with Nvidia

Step 1:
Read this first
https://weeraman.com/put-that-gpu-to-good-use-with-python-e5a437168c01

Step 2: Install NVidia in Mac
https://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html

>brew tap caskroom/drivers
>brew cask install nvidia-cuda

Then you also need to add the following to your file ~/.bash_profile:
export PATH=/Developer/NVIDIA/CUDA-9.0/bin${PATH:+:${PATH}}
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-9.0/lib${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}

Step 3: Try the following code

Before

import numpy as np
from timeit import default_timer as timer

def pow(a, b):
    return a ** b

def main():
    vec_size = 100000000

    a = b = np.array(np.random.sample(vec_size), dtype=np.float32)
    c = np.zeros(vec_size, dtype=np.float32)

    start = timer()
    c = pow(a, b)
    duration = timer() - start

    print(duration)

if __name__ == '__main__':
    main()
    
#performance: 2.000642750179395
    

After

import numpy as np
from timeit import default_timer as timer
from numba import vectorize

@vectorize(['float32(float32, float32)'], target='parallel')
def pow(a, b):
    return a ** b

def main():
    vec_size = 100000000

    a = b = np.array(np.random.sample(vec_size), dtype=np.float32)
    c = np.zeros(vec_size, dtype=np.float32)

    start = timer()
    c = pow(a, b)
    duration = timer() - start

    print(duration)

if __name__ == '__main__':
    main()
    
#performance: 0.4175510290078819    

—–
Reference:
https://github.com/numba/numba/issues/1898
https://stackoverflow.com/questions/38566367/installing-cuda-via-brew-and-dmg

Learn Python

https://www.tutorialspoint.com/python/index.htm

https://edu.openedg.org

Object-Oriented Programming: https://realpython.com/python3-object-oriented-programming/

Full Stack Python: https://www.fullstackpython.com/table-of-contents.html

10 Myths of Enterprise Python
https://www.paypal-engineering.com/2014/12/10/10-myths-of-enterprise-python/

Python Performance: https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/python.html

Python popularity is going up and Java popularity is going down
https://medium.freecodecamp.org/best-programming-languages-to-learn-in-2018-ultimate-guide-bfc93e615b35

UI Response Times

https://www.nngroup.com/articles/website-response-times/

Response-Time Limits
The 3 response-time limits are the same today as when I wrote about them in 1993 (based on 40-year-old research by human factors pioneers):

0.1 seconds gives the feeling of instantaneous response — that is, the outcome feels like it was caused by the user, not the computer. This level of responsiveness is essential to support the feeling of direct manipulation (direct manipulation is one of the key GUI techniques to increase user engagement and control — for more about it, see our User Interface Principles Every Designer Must Know course).
1 second keeps the user’s flow of thought seamless. Users can sense a delay, and thus know the computer is generating the outcome, but they still feel in control of the overall experience and that they’re moving freely rather than waiting on the computer. This degree of responsiveness is needed for good navigation.
10 seconds keeps the user’s attention. From 1–10 seconds, users definitely feel at the mercy of the computer and wish it was faster, but they can handle it. After 10 seconds, they start thinking about other things, making it harder to get their brains back on track once the computer finally does respond.
A 10-second delay will often make users leave a site immediately. And even if they stay, it’s harder for them to understand what’s going on, making it less likely that they’ll succeed in any difficult tasks.

Even a few seconds’ delay is enough to create an unpleasant user experience. Users are no longer in control, and they’re consciously annoyed by having to wait for the computer. Thus, with repeated short delays, users will give up unless they’re extremely committed to completing the task. The result? You can easily lose half your sales (to those less-committed customers) simply because your site is a few seconds too slow for each page.