Pro Sports River of News

Subscribe to Pro Sports River of News feed
This feed was created by mixing existing feeds from various sources.
Updated: 4 hours 29 min ago

Dark Floors vs Light Floors: Pros And Cons - Concord Carpet & Hardwood

Fri, 08/24/2018 - 22:49
via Concord Carpet & Hardwood

Parallel Programming with Python | Hacker News

Wed, 08/22/2018 - 17:48
quietbritishjim 2 days ago [-] In response to the multiple comments here complaining that multithreading is impossible in Python without using multiple processes, because of the GIL (global interpreter lock): This is just not true, because C extension modules (i.e. libraries written to be used from Python but whose implementations are written in C) can release the global interpreter lock while inside a function call. Examples of these include numpy, scipy, pandas and tensorflow, and there are many others. Most Python processes that are doing CPU-intensive computation spend relatively little time actually executing Python, and are really just coordinating the C libraries (e.g. "mutiply these two matrices together"). The GIL is also released during IO operations like writing to a file or waiting for a subprocess to finish or send data down its pipe. So in most practical situations where you have a performance-critical application written in Python (or more precisely, the top layer is written in Python), multithreading works fine. If you are doing CPU intensive work in pure Python and you find things are unacceptably slow, then the simplest way to boost performance (and probably simplify your code) is to rewrite chunks of your code in terms of these C extension modules. If you can't do this for some reason then you will have to throw in the Python towel and re-write some or all of your code in a natively compiled language (if it's just a small fraction of your code then Cython is a good option). But this is the best course of action regardless of the threads situation, because pure Python code runs orders of magnitude slower than native code. reply

Kein Krebsrisiko bei Fleisch - YouTube

Tue, 08/21/2018 - 20:22