Windows Service with Python 3.5 and pyinstaller
- Python 3.5.x
- Visual C++ Build Tools 2015
- PyInstaller 3.2
| import logging | |
| import boto3 | |
| import argparse | |
| logger = logging.getLogger('ecs-deploy') | |
| def configure_logger(log_info): | |
| # create logger | |
| logger = logging.getLogger('ecs-deploy') | |
| logger.setLevel(logging.DEBUG) |
| -- This creates an athena table that can parse ALB logs. | |
| -- Advantage of this over others are this works when the log ends with a trailing space | |
| -- plus it also breaks the http request into route and params for easier grouping | |
| CREATE EXTERNAL TABLE IF NOT EXISTS alb_logs ( | |
| type string, | |
| timestamp string, | |
| elb string, | |
| client_ip string, | |
| client_port int, |
| CREATE EXTERNAL TABLE IF NOT EXISTS alb_logs ( | |
| type string, | |
| timestamp string, | |
| elb string, | |
| client_ip string, | |
| client_port int, | |
| target_ip string, | |
| target_port int, | |
| request_processing_time double, | |
| target_processing_time double, |
Windows Service with Python 3.5 and pyinstaller
Picking the right architecture = Picking the right battles + Managing trade-offs
| #! /usr/bin/env python | |
| """ | |
| A simple Burrows-Wheeler transform function in python. | |
| Algorithm presented in: | |
| Burrows M, Wheeler DJ: A Block Sorting Lossless Data Compression Algorithm. | |
| Technical Report 124. Palo Alto, CA: Digital Equipment Corporation; 1994. | |
| USAGE: bwt.py [-h] [-i INDEX] STRING | |
| """ |
| /* | |
| ******************************************************************************** | |
| Golang - Asterisk and Ampersand Cheatsheet | |
| ******************************************************************************** | |
| Also available at: https://play.golang.org/p/lNpnS9j1ma | |
| Allowed: | |
| -------- | |
| p := Person{"Steve", 28} stores the value |
SSH into your EC2 instance. Run the following:
$ sudo yum install gcc This may return an "already installed" message. That's OK.
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make