Docker.app will complain about incompatible processor, so we will use Docker Machine.
Download Docker for Mac (Docker.app). It contains some binaries that are necessary.
brew install virtualbox docker-machine
#!/usr/bin/env python3 | |
import argparse | |
import os | |
import subprocess | |
import sys | |
STATUS_FILE = os.path.join(os.path.dirname(__file__), ".dmypy.json") | |
from model_utils.managers import InheritanceManagerMixin, InheritanceQuerySetMixin | |
from treebeard.mp_tree import MP_NodeManager, MP_NodeQuerySet, MP_Node | |
class PolymorphicTreeQuerySet(InheritanceQuerySetMixin, MP_NodeQuerySet): | |
"""QuerySet combining functionality of polymorphic up-casting with Materialized Path tree structure""" | |
class PolymorphicTreeManager(InheritanceManagerMixin, MP_NodeManager): | |
_queryset_class = PolymorphicTreeQuerySet |
FROM = 1 | |
TO = 100 | |
DIVIDERS = [ | |
(3, "Fizz"), | |
(5, "Buzz"), | |
(7, "Kazz") # or any other (div, word) pair | |
] | |
for n in range(FROM, TO): |
rancher: | |
network: | |
interfaces: | |
eth0: | |
address: 192.168.0.100/24 | |
gateway: 192.168.0.1 | |
dns: | |
nameservers: | |
- 8.8.8.8 | |
- 8.8.4.4 |
// See https://pl.wikipedia.org/wiki/PESEL#Data_urodzenia | |
// See https://en.wikipedia.org/wiki/PESEL#Birthdates | |
const CENTURY_MAP: {[k: number]: number} = { | |
0: 1900, | |
1: 2000, | |
2: 2100, | |
3: 2200, | |
4: 1800, | |
}; |
// do something 10 times | |
'.'.repeat(10).split('').forEach(dot => doSomething()); | |
// add 7 more `{}` to `rows` | |
const rows = [{}, {}]; | |
Array(7).fill({}).map(o => rows.push({})) |
/** | |
* Returns an object with definition of <b-field :type> for Buefy. | |
* | |
* Instead of setting the field type like this: | |
* | |
* <b-field :type="{ 'is-danger': errors.has('field_name') }"></b-field> | |
* | |
* You can now use it like this: | |
* | |
* get fieldTypes() { |