|
You are here |
blog.demofox.org | ||
| | | | |
codeexplainer.wordpress.com
|
|
| | | | | Good news for all International Obfuscated C Code Contest fans -- here's another winning piece from 2013 written by Yusuke Endoh, who is no stranger to the Contest. It is dubbed the Most Tweetable 1-Liner, because is small enough to fit in a tweet (137 characters only), yet can "tweet out a tune", that is, | |
| | | | |
www.jeremykun.com
|
|
| | | | | Problem: Compute the product of two polynomials efficiently. Solution: import numpy from numpy.fft import fft, ifft def poly_mul(p1, p2): """Multiply two polynomials. p1 and p2 are arrays of coefficients in degree-increasing order. """ deg1 = p1.shape[0] - 1 deg2 = p1.shape[0] - 1 # Would be 2*(deg1 + deg2) + 1, but the next-power-of-2 handles the +1 total_num_pts = 2 * (deg1 + deg2) next_power_of_2 = 1 << (total_num_pts - 1). | |
| | | | |
www.codeproject.com
|
|
| | | | | Describes why the most obvious way of evaluating functions may be bad and how to do better | |
| | | | |
boldandgreen.wordpress.com
|
|
| | | I tried a new background color for my windows as shown here. Instead of the light grey suggested, I picked a very light brown: R 230 Y 222 B 188 (as shown on picture). The best thing is to change the background in Word first and test the color. | ||