Your laptop for machine learning does not need a powerful processor. Most applications are only multi-threaded on the GPU, so don't go broke on the CPU. Therefore, you should buy a processor with the highest clock speed, i.e. i7-6700K at 4 GHz.
Minimum laptop requirements for a programmer in 2022:
Optimal laptop requirements for a programmer in 2022:
The last criterion is price. Budget (cheap) laptops are not suitable for programming. One can argue with this for a long time, but in their professional activities, programmers value time and cannot spend 10-15 seconds of time launching a browser alone. On the other hand, there is also no strict need to spend huge amounts of money on high-end devices. Exception: you assign complex computing tasks to your laptop, well, or just crazy about Apple.
In this case, you can look towards laptops with Intel Core i5 / i7 or AMD Ryzen 5/7 processors, preferably with a generation above the 7th for Intel (for example, Intel Core i7 9750H) and at least 3rd for AMD (to for example, AMD Ryzen 5 3600). 8 GB of RAM should be enough for most tasks, but 16 GB or with the possibility of adding another stick of RAM in the future would be preferable.
The recommended processor model is Intel Core i5 XXXXX (for example, 1135G7 or 11320H), 6/8-core AMD Ryzen XXXXU (for example, 5800H) or higher. 16 GB of RAM is the need of our time.
If you're running Swift, Android Studio, or C#, 10 and 11 Gen Intel Core and AMD Ryzen processors with 16 GB of RAM and a discrete graphics card will work. Not the worst solution would be an integrated AMD Radeon RX Vega 8 or a discrete NVIDIA GeForce GTX 1650 Ti or higher.