Design → Build → Verify → Release → Observe → Improve
Developer
Picking the right architecture = Picking the right battles + Managing trade-offs
The use of __main__.py to create executables
myprojectfolder/
|_ __main__.py
|_ __init__.py
Being __main__.py:
print("Hello")
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| pip install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org -r requirements.txt |
| #!/bin/bash | |
| # | |
| # PostgreSQL Backup Script Ver 1.0 | |
| # http://autopgsqlbackup.frozenpc.net | |
| # Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com> | |
| # | |
| # This script is based of the AutoMySQLBackup Script Ver 2.2 | |
| # It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
| # | |
| # The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |
| # pip install -r requirements.txt | |
| # refer https://pip.pypa.io/en/stable/reference/pip_install/#example-requirements-file | |
| # refer top packages @ http://pypi-ranking.info/alltime | |
| virtualenv # basic | |
| virtualenvwrapper # wrapper to virtualenvwrapper | |
| pep8 # Code Style Guide | |
| pycodestyle # enforces pep8 style, | |
| pylint # enforces pep8 style |
| #!/bin/bash | |
| function seed { | |
| echo $1 >> $2; | |
| git add $2; | |
| git commit -m "$1"; | |
| } | |
| rm -rf .git | |
| git config --global core.editor vim |
| ---- | |
| To Create Stash | |
| $ git stash | |
| To List all stash | |
| $ git stash list | |
| To apply and not delete from stash | |
| $ git stash apply stash@{0} |
| # For remote usage: https://oracle-base.com/articles/10g/oracle-data-pump-10g | |
| # create directory | |
| create directory dmpdir as 'c:/temp'; | |
| select directory_name,directory_path from dba_directories; | |
| # expdp owner | |
| create user scott identified by tiger; | |
| grant connect, resource to scott; | |
| ... | |
| grant read, write on directory dmpdir to scott; |