Archive for March, 2017

LocalStack – A fully functional local AWS cloud stack

March 31, 2017 Leave a comment

LocalStack provides an easy-to-use test/mocking framework for developing Cloud applications.

Currently, the focus is primarily on supporting the AWS cloud stack.

LocalStack spins up the following core Cloud APIs on your local machine:

* API Gateway at http://localhost:4567
* Kinesis at http://localhost:4568
* DynamoDB at http://localhost:4569
* DynamoDB Streams at http://localhost:4570
* Elasticsearch at http://localhost:4571
* S3 at http://localhost:4572
* Firehose at http://localhost:4573
* Lambda at http://localhost:4574
* SNS at http://localhost:4575
* SQS at http://localhost:4576
* Redshift at http://localhost:4577

Additionally, LocalStack provides a powerful set of tools to interact with the cloud services, including a fully featured KCL Kinesis client with Python binding, simple setup/teardown integration for nosetests, as well as an Environment abstraction that allows to easily switch between local and remote Cloud execution.

Categories: Interesting Tags: , ,

Managing secrets

March 29, 2017 Leave a comment

Secrets — passwords, API keys, secure tokens, private keys, and so on — protect access to sensitive resources in your environment. If not properly managed, they can end up in the wrong hands.

In Part 1 of this post, we will show you how to find secrets using truffleHog and git-secrets. In Part 2, we will explain how to manage them using appropriate software tools in order to quickly and cost-effectively achieve a higher level of security.


Categories: Interesting

Writing functional python

March 29, 2017 Leave a comment

The recent buzz surrounding Functional Programming (FP for short) is well deserved. Languages like Haskell and Clojure in use by big name companies such as Barclays Captial, Atlassian, and Walmart have helped FP ideas gain a major foothold in the industry. I am a Clojure hobbyist who has been interested in FP for some time so this is great news to me. But what exactly is FP, and why should a Python/Django programmer care? First, understanding FP will help you bring these sought-after ideas into your Python development. Second, you will quite likely begin to recognize instances where you have already been using these concepts, unknowingly!

Read more here ->

Python performance optimization

March 28, 2017 Leave a comment

This article assumes you are already familiar with Python.

As soon as your code stops being trivial and runs on real-world data volumes, you will run into performance issues. You’ve heard that Python is slow, so it must be the culprit!

Not so fast!

Sure, Python is not compiled to optimized native code (yet) and therefore won’t rival C, Fortran or assembly in tightly nested loops. But most Python performance issues can be alleviated by improving the algorithm or using the right tool for the job. Read on to learn how.

Read the full article here ->

Pycoders weekly

Categories: Interesting

pip failed to install package

March 17, 2017 Leave a comment

Note to future self:

When installing a python package in a virtualenv using pip ie

pip install -r requirements.txt

If it fails to build and gives an error about something or the other.
Do a pip freeze and do a diff between what was installed and what is listed in requirements.txt

If there is a diff. Upgrade your pip version.

sudo pip install --upgrade pip

Try running the install again.

Categories: python Tags:

How to Run Python Tests “Continuously” While Coding

March 17, 2017 Leave a comment

Last week I was doing some Test Driven Development training and overheard someone mention another programming language that had a test runner that you could set up to watch your project directory and run your tests when the files changed.

Categories: Interesting, python

Convert .iso to .mp4

March 15, 2017 Leave a comment

A colleague asked to convert .iso files to .mp4

Installed and used Handbrake to do the conversion.

HandBrake is a tool for converting video from nearly any format to a selection of modern, widely supported codecs.

Reasons you’ll love HandBrake:

Convert video from nearly any format
Free and Open Source
Multi-Platform (Windows, Mac and Linux)


Categories: Interesting

Meet Cachet – The open source status page system

March 3, 2017 Leave a comment

Cachet is a beautiful open source status page system, used by large household names, airports, schools and businesses.

* List your services components
* Log incidents
* Apply custom CSS to the status page
* Markdown support for incident messages
* Translated into eleven languages
* Metrics
* Cross-database support: MySQL, PostgreSQL and SQLite
* Subscriber notifications via Email
* Two factor authentication, with Google Authenticator

Categories: Interesting