Use the following commands to add the kubectl autocomplete to zsh:
mkdir -p ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/
kubectl completion zsh > ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/kubectl-autocomplete.plugin.zshIn general, you will learn some markdown tricks combined with standard HTML tags. In more details what you will learn:
| from novo_financeiro.models import * | |
| leilao = 'DIVSC05-17' | |
| for nota in Nota.objects.filter(cache_dicionario__contains=leilao): | |
| dicionario = nota.dicionario_do_cache() | |
| dicionario['taxas'] = 0 | |
| nota.cache_dicionario = json.dumps(dicionario, cls=DjangoJSONEncoder) | |
| nota.save() |
| from leilao.models import LanceProgramado | |
| leilao = 'SEOP15-17' | |
| lote = 2795 | |
| username = 'shirlene' | |
| LanceProgramado.objects.filter( | |
| lote__numero_do_lote_no_leilao=lote, | |
| lote__leilao__nome=leilao, | |
| user__username=username).values_list('ativo', flat=True) |
| # import config. | |
| # You can change the default config with `make cnf="config_special.env" build` | |
| cnf ?= config.env | |
| include $(cnf) | |
| export $(shell sed 's/=.*//' $(cnf)) | |
| # import deploy config | |
| # You can change the default deploy config with `make cnf="deploy_special.env" release` | |
| dpl ?= deploy.env | |
| include $(dpl) |
This is an unofficial manual for the couchdb Python module I wish I had had.
pip install couchdb
| import csv | |
| import sys | |
| import os | |
| # example usage: python split.py example.csv 200 | |
| # above command would split the `example.csv` into smaller CSV files of 200 rows each (with header included) | |
| # if example.csv has 401 rows for instance, this creates 3 files in same directory: | |
| # - `example_1.csv` (row 1 - 200) | |
| # - `example_2.csv` (row 201 - 400) | |
| # - `example_3.csv` (row 401) |
| /* | |
| Notes: | |
| Despite Scala's appearances, it is, in fact, a Statically Typed language. | |
| It has just eliminated a great deal of the "type vomit" people are used | |
| to seeing in Statically Typed languages (e.g. C, C++, Java). It often | |
| can infer the type on its own. It also combines functional and | |
| object-oriented programming paradigms in a fashion that feels similar | |
| to Python. | |
| */ |