Net Liquidity formula:
Net Liquidity = Federal Reserve Balance sheet - Treasury General Account - Reverse Repo
Twitter thread by Max Anderson:
Net Liquidity formula:
Net Liquidity = Federal Reserve Balance sheet - Treasury General Account - Reverse Repo
Twitter thread by Max Anderson:
terraform config for MWAA
https://github.com/hashicorp/terraform-provider-aws/releases/tag/v3.36.0
terraform plan -var-file=vars.tfvars
terraform apply -var-file=vars.tfvars
| // Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left) | |
| // https://gist.github.com/JamieMason/7580315 | |
| // | |
| // 1. Go to https://twitter.com/YOUR_USER_NAME/following | |
| // 2. Open the Developer Console. (COMMAND+ALT+I on Mac) | |
| // 3. Paste this into the Developer Console and run it | |
| // | |
| // Last Updated: 09 April 2020 | |
| (() => { | |
| const $followButtons = '[data-testid$="-unfollow"]'; |
| # This file has to be saved in your Jupyter config directory (found by running | |
| # jupyter --config-dir | |
| # but usually C:\Users\<username>\.jupyter\jupyter_notebook_config.py on Windows | |
| def scrub_output_pre_save(model, **kwargs): | |
| """scrub output before saving notebooks""" | |
| # only run on notebooks | |
| if model['type'] != 'notebook': | |
| return | |
| # only run on nbformat v4 |
| language: python | |
| matrix: | |
| # This will launch a separate build for each Python version you add | |
| # Feel free to add extra environment variables as needed | |
| include: | |
| - python: 3.5 | |
| - python: 3.6 | |
| before_install: |
| -- CHECK TIMINGS ON ACTIVE AND EXPENSIVE QUERIES | |
| SELECT activity.* | |
| FROM ( | |
| SELECT | |
| pid, | |
| CASE WHEN state = 'active' THEN AGE(clock_timestamp(), query_start) | |
| ELSE AGE(state_change, query_start) | |
| END as query_duration, -- This is how long the most recent query was running (or is running so far, if still active) | |
| AGE(clock_timestamp(), xact_start) as xact_duration, -- Same, but for the currently active transaction | |
| CASE WHEN state = 'active' THEN INTERVAL '0' |
| ** Find commmonly accessed tables and their use of indexes: | |
| SELECT relname,seq_tup_read,idx_tup_fetch,cast(idx_tup_fetch AS numeric) / (idx_tup_fetch + seq_tup_read) AS idx_tup_pct FROM pg_stat_user_tables WHERE (idx_tup_fetch + seq_tup_read)>0 ORDER BY idx_tup_pct; | |
| Returns output like: | |
| relname | seq_tup_read | idx_tup_fetch | idx_tup_pct | |
| ----------------------+--------------+---------------+------------------------ | |
| schema_migrations | 817 | 0 | 0.00000000000000000000 | |
| user_device_photos | 349 | 0 | 0.00000000000000000000 |
| with table_stats as ( | |
| select psut.relname, | |
| psut.n_live_tup, | |
| 1.0 * psut.idx_scan / greatest(1, psut.seq_scan + psut.idx_scan) as index_use_ratio | |
| from pg_stat_user_tables psut | |
| order by psut.n_live_tup desc | |
| ), | |
| table_io as ( | |
| select psiut.relname, | |
| sum(psiut.heap_blks_read) as table_page_read, |
##MONGODB & PYTHON
###Ubuntu Install
sudo apt-get install mongodb
pip install pymongo
Table - Collection
Column - Property
Row - Document