Jonathan Blow at DevGAMM 2019
28:27 "Five 9s" (99.999% uptime) "We don't use this anymore."
30:45 "Software startups are stumbling into a market, not doing software technology well."
| MIN_DPI = 200 | |
| MM_PER_INCH = 25.4 | |
| class ZoomCalculator: | |
| def __init__( | |
| self, | |
| view_width_in_mm: float, | |
| view_width_in_pixel: int, | |
| view_height_in_pixel: int, |
| #!/bin/sh | |
| # Usage: ./remove_orphans.sh [-f] | |
| # | |
| # Run this after moving / removing media files on a Synology NAS. | |
| [ "$1" = "-f" ] && REMOVE=1 | |
| IFS=' | |
| ' |
| """ | |
| Coding dojo: SQL code generator for an SQL comment to describe items to | |
| exclude. | |
| Write a function that generates an SQL comment describing a list of items to | |
| exclude. Long lists of items should be broken into multiple lines. To make the | |
| test case more managable, the maximum line length is 30. | |
| For example, ['one', 'two'] should result in |
| Notes for cutplace | |
| ------------------ | |
| 0.9.0, week 2015/xxx | |
| * Thomas: explain test_sql._assert_is_valid_sqlite_statement | |
| 0.9.0, week 2015/13 | |
| * Thomas: test that field names with non alphanumeric/_ are rejected | |
| * htlwrn: continue SQL |
| """ | |
| This source code can act as base for a coding dojo. | |
| It implements and test a function `iter_is_equal()` that take two sequences | |
| as parameters and returns `True` if all there items are equal. | |
| >>> iter_is_equal([1, 2, 3], [1, 2, 3]) | |
| True | |
| >>> iter_is_equal([1, 2, 3], [1, 3]) | |
| False |
| ''' | |
| Download images for "Schlaflos im Ländle" geocache as described at | |
| <http://www.geocaching.com/seek/cache_details.aspx?guid=3052c599-c8bb-4bff-a209-7b23b98bdb1c>. | |
| To obtain the required images, start the program sometime around 21:45 CET and let it run | |
| until 05:30 CET. You can start it earlier or stop it later but then you might have to ignore | |
| some of the images. | |
| ''' | |
| import logging | |
| import os | |
| import time |
| # Print a list of possible Python OS error codes together with the symbolic | |
| # name in `errno` and the related human readable error message. The output | |
| # uses Trac Wiki syntax so it can be copied and pasted in a Wiki document | |
| # for later reference. | |
| # | |
| # The output depends on platform and language settings. | |
| import errno | |
| import os | |
| print('||=code =||=symbol =||=message =||') |
| ''' | |
| Example for caching a list of data using pickle. | |
| ''' | |
| import cPickle as pickle | |
| _CachePath = '/tmp/cache.pkl' | |
| def expensiveToComputeData(): | |
| # These would be date retrieved from an external file involving lots fo | |
| # computations, validation and so on. This particular example data are |