PycURL is a Python interface to libcurl. PycURL can be used to fetch objects identified by a URL from a Python program, similar to the urllib Python module. PycURL is mature, very fast, and supports a lot of features
JavaScript Promises: A Tutorial with Examples
Promises, when used correctly, produce easy-to-read code that is easier to reason about, and thus easier to debug than callbacks. There is no need to set up conventions regarding, for example, error handling since they are already part of the specification.
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">dieToss</span><span class="hljs-params">()</span> {</span> <span class="hljs-keyword">return</span> <span class="hljs-transposed_variable">Math.</span><span class="hljs-built_in">floor</span>(<span class="hljs-transposed_variable">Math.</span>random() * <span class="hljs-number">6</span>) + <span class="hljs-number">1</span>; } <span class="hljs-transposed_variable">console.</span><span class="hljs-built_in">log</span>(<span class="hljs-string">'1'</span>); var promise = new <span class="hljs-transposed_variable">RSVP.</span>Promise(<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(fulfill, reject)</span> {</span> var n = dieToss(); <span class="hljs-keyword">if</span> (n === <span class="hljs-number">6</span>) <span class="hljs-cell">{ fulfill(n); }</span> <span class="hljs-keyword">else</span> <span class="hljs-cell">{ reject(n); }</span> <span class="hljs-transposed_variable">console.</span><span class="hljs-built_in">log</span>(<span class="hljs-string">'2'</span>); }); <span class="hljs-transposed_variable">promise.</span>then(<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(toss)</span> {</span> <span class="hljs-transposed_variable">console.</span><span class="hljs-built_in">log</span>(<span class="hljs-string">'Yay, threw a '</span> + toss + <span class="hljs-string">'.'</span>); }, <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(toss)</span> {</span> <span class="hljs-transposed_variable">console.</span><span class="hljs-built_in">log</span>(<span class="hljs-string">'Oh, noes, threw a '</span> + toss + <span class="hljs-string">'.'</span>); }); <span class="hljs-transposed_variable">console.</span><span class="hljs-built_in">log</span>(<span class="hljs-string">'3'</span>);
Introduction to Python async/await
Python 3.5 is coming up soon with async and await built-in keywords. Let’s get excited with a couple of simple examples showing off how to use this new syntax.
Pragmatic Unicode
This is a presentation I gave at PyCon 2012. You can read the slides and text on this page, or open the actual presentation in your browser, or watch the video: