This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| // ╔══════════════════════════════════════════════════════════════════════════════════╗ | |
| // ║ VSCODE VIM LAZYVIM KEYBINDINGS ║ | |
| // ║ Modifier Key Bindings (Ctrl, Alt, Shift) ║ | |
| // ╚══════════════════════════════════════════════════════════════════════════════════╝ | |
| // | |
| // This file contains keybindings that use modifier keys (Ctrl, Alt, Shift) and special | |
| // characters that need VSCode's key binding system (not Vim's). | |
| // | |
| // IMPORTANT: DO NOT put space-leader bindings here (<leader>...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Make sure the source index is actually open | |
| POST /source_index/_open | |
| # Put the source index in read-only mode | |
| PUT /source_index/_settings | |
| { | |
| "settings": { | |
| "index.blocks.write": "true" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pyspark.sql.functions as F | |
| from pyspark.sql import Window | |
| df = spark.createDataFrame([ | |
| ('d1',None), | |
| ('d2',10), | |
| ('d3',None), | |
| ('d4',30), | |
| ('d5',None), | |
| ('d6',None), |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### prerequisites | |
| sudo yum groupinstall "Development Tools" | |
| git --version | |
| gcc --version | |
| bash --version | |
| python --version # (system) | |
| sudo yum install -y openssl-devel readline-devel zlib-devel | |
| sudo yum update | |
| ### install `pyenv` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from boto3.session import Session | |
| from botocore.client import Config | |
| from botocore.handlers import set_list_objects_encoding_type_url | |
| import boto3 | |
| ACCESS_KEY = "xx" | |
| SECRET_KEY = "yy" | |
| boto3.set_stream_logger('') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| #################################################################################### | |
| # Slack Bash console script for sending messages. | |
| #################################################################################### | |
| # Installation | |
| # $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack | |
| # $ chmod +x /usr/bin/slack | |
| #################################################################################### | |
| # USAGE | |
| # Send message to slack channel/user |