What Can Cause an Application to Run Slowly?

Problem scenario
You support an existing application and its servers. It is experiencing slowness as the users are complaining about its performance. What are some potential root causes of this slowness?

Possible Solutions

  • The slowness is caused by the client. A user’s workstation has something wrong with it (e.g., malware, or it is trying to run too many applications at once).

What Is The Difference between a VPC and a Subnet?

Question
You have heard about VPCs and subnets. What are the differences between these two?

Answer
A subnet is a subdivision of a network. Internal to an enterprise network, you may divide the network into different addresses with gateways, routers, bridges and subnet masks. The subnet mask (in CIDR (classless inter-domain routing) notation may be /28, /24, /10 etc.

A VPC ordinarily has its own NACLs and firewalls associated with it;

How Do You Write a Python Program without the import Statement That Palindromically Tests a String in Four Lines of Code?

Problem scenario
You want to avoid importing any modules in Python. You want to have a way to test if a string is a palindrome is four lines of code. What do you do?

Solution

def is_palindrome_pythonic(s):
return all(a == b for a, b, in zip(
map(str.lower, filter(str.isalnum, s)),
map(str.lower, filter(str.isalnum, reversed(s)))))

# The above four lines of code were taken from page 78 of Elements of Programming Interviews in Python. …

What Are Guardrails in I.T.?

Question
What are guardrails in the I.T. industry?

Answer
A measure, technology or authentication policy in place to prevent problems in an enterprise network or with a application. With guardrails, a server or web application is protected from hackers or accidental misuse. It is a common metaphor based on highway guardrails. To learn more, see this posting:
https://devops.com/building-great-cloud-security-guardrails/

There is a specific product called GUARDRAILS that detects,

How Do You Use Python to Retrieve Information about Bitcoin Transactions?

Problem scenario
You want to use Python to get data from BTC transactions. You do not want to use “import requests”. What do you do?

Solution
Prerequisite

This assumes you have installed the Bitcoin pypi package: pip install bitcoin
If you need assistance installing pip, see this posting for Ubuntu or this posting for a Red Hat derivative.

How Do You Use an Amazon API Gateway?

Problem scenario
You want to use the AWS PaaS offering for exposing an API and having it be able to scale and handle lots of users easily. How do you use Amazon API Gateway?

Solution
Overview: This is a proof-of-concept. You could use different API types (e.g., web socket APIs for persistent applications like a chat window).

Prerequisite
This assumes you have a working Lambda function configured and you know its name.

How Do You Use Nomics to a Retrieve Cryptocurrency Prices?

Problem scenario
You want to use Nomics to retrieve cryptocurrency prices. What do you do?

Prerequisite
Get an API key. It is free here: https://p.nomics.com/pricing#free-plan
(You do not need to provided credit card information to obtain one.)

Procedures
Run this Python program but replace YOUR_KEY_HERE with the key:

import requests
resp = requests.get(“https://api.nomics.com/v1/prices?key=YOUR_KEY_HERE&format=json”)
for item in resp.json():
if item[’currency’] in [”BTC”, …

How Does an ssh Command Work in Detail?

Question
You want an overview of how SSH works because it seems confusing. You want to know exactly what happens when you run an SSH command like ssh jdoe@acme.com. Where can you find a precise explanation on using ssh as well as some background information on SSH?

Solution
SSH is named after the secure shell way of remotely connecting to another server using encryption.

How Do You Retrieve Cryptocurrency Data for One Day in the Past Using Python?

Problem scenario
You want to find the historic data for a given cryptocurrency using Python. You want to print out the low, high, open and close prices on a specific day. How do you get data for one specific date?

Solution

Prerequisite
This assumes you have installed pandas: pip install pandas

Procedures
Run this program:

“””
Usage instructions: Change the “2016-12-25” the value (assigned to “date_to_see”) to the day you want to view. …