- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
# https://stackoverflow.com/questions/58877390/how-to-collect-results-into-array-from-annotation | |
""" | |
Some different ways: | |
""" | |
class CombinedExpressions(SQLiteNumericMixin, Expression): | |
def __init__(self, *expressions, connector, output_field=None): |
sudo: required | |
language: python | |
python: | |
- "3.6" | |
# command to install dependencies | |
install: | |
- pip install -r requirements.txt | |
# command to run tests | |
script: | |
- python manage.py behave |
A guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with programming in Python.
For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way
# settings.py | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.postgresql_psycopg2', | |
'NAME': 'helloworld', | |
'PASSWORD': 'adminhris', | |
'USER': 'adminhris', | |
'HOST': 'localhost' | |
}, |
import timeit | |
setup = ''' | |
import random | |
random.seed('slartibartfast') | |
s = [random.random() for i in range(1000)] | |
timsort = list.sort | |
''' |
; src/boot/boot.asm | |
; Bootloader to load kernel, switch to 32-bit protected mode and execute kernel | |
[BITS 16] ; 16-bit real mode | |
[ORG 0x7C00] ; Loaded into memory at 0x7C00 | |
MOV [bootDrive], DL ; Store DL (boot drive number) in memory | |
MOV BP, 0x9000 ; Move Base Pointer in free memory space | |
MOV SP, BP ; Move Stack Pointer to base of stack |
;----------------------------------------------; | |
; | |
; A minimal bootloader that prints a hello world | |
; then halts. | |
; | |
; nasm -f bin hello-boot.asm -o hello-boot.bin | |
; | |
; @YouriAckx | |
; | |
;----------------------------------------------; |