... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.
For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.
But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.
SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil
I recently made my first map with MapBox's new WebGL+JavaScript API. There aren't many examples of how to do this yet, even on MapBox's API page, so I'll document my own experience here.
My map is made of several textures taken from Van Gogh paintings. The long-term goal is to allow a user to select which artworks they want to take textures from, but for now there is just one setting.
| from bitstring import ConstBitArray, BitStream | |
| # Opening from a file means that it won't be all read into memory | |
| s = ConstBitArray(filename='test.ts') | |
| outfile = open('test_nonull.ts', 'wb') | |
| # Cut the stream into 188 byte packets | |
| for packet in s.cut(188*8): | |
| # Take a 13 bit slice and interpret as an unsigned integer | |
| PID = packet[11:24].uint |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import argparse | |
| import re | |
| from multiprocessing.pool import ThreadPool as Pool | |
| import requests | |
| import bs4 | |
| root_url = 'http://pyvideo.org' | |
| index_url = root_url + '/category/50/pycon-us-2014' |
| /* Vedant Misra (vedantmisra.com) (github.com/vedant) | |
| * | |
| * Script for exporting Google Keep note files. | |
| * | |
| * This does not handle attachments or checklists, only note files. Downloads | |
| * each note to a .txt file named for the note's title. | |
| * | |
| * To use this, go to https://drive.google.com/keep/ and wait for the page to | |
| * fully load all of your saved notes; scroll to the bottom to confirm they're | |
| * loaded. Then paste the below in your URI bar, go to the start of the line, |
| 370 git clone https://github.com/buck3000/CLI-Obstacle-Course.git | |
| 371 cd CLI-Obstacle-Course/ | |
| 372 ls | |
| 373 ls | |
| 374 mv images app/assets | |
| 375 ls | |
| 376 cd app | |
| 377 ls | |
| 378 cd assets/ | |
| 379 ls |
| import csv | |
| import itertools | |
| f = csv.reader(open('file.csv')) | |
| for row in itertools.islice(f, 0, 50): | |
| print row |