Technology Effects on Financial Literacy

piggy bank

Financial literacy is the measure of personal finance best practices and actions. In this project proposal, the study reviews the efficacy of Lampo Group, LLC’s Financial Peace University online compared to the traditional classroom curriculum. The study includes qualitative analysis of focus group surveys along with a larger quantitative survey of American paths to financial health. The study concludes with recommendations to personal finance educators to improve student results and next steps for further research.

Overview of the Study’s Results

The excerpt below is from my research study for the Spring 2020 semester at Georgia Tech. You can find the formal research paper and source data on GitHub here.

Continue reading “Technology Effects on Financial Literacy”

An ML-Focused Python Guide Book for Beginners

The Orange Pages: A Map to Python Wisdom

I’ve decided to create yet another Python site (YAPS), The Orange Pages, an ML-focused Python guide book for beginners. It is in a similar vein to The Hitchhiker’s Guide to Python and Automate the Boring Stuff. It will include what I’ve learned in my five years as an engineer, utilizing Python as the “magic” as my boss calls it. Unlike the preceding sites, the information will be on Github as a set of Markdown documents. The focus will be on big data manipulation, analysis, machine learning, and that handful of scripts you simply can’t do without (like that awesome ML Docker container).

I know learning something new can be a daunting challenge for a beginner-level Python or machine learning engineer. That’s why I’m creating this guide. Instead of combing Google and textbooks, this guide will be the “Walmart” of Python development. You may even impulse download a few of the libraries in the collection.

If you are a senior engineer or have your own library you want to submit for inclusion, feel free to submit a pull request with a new Markdown document describing your library and why it’s useful.

I’ll spend some time embellishing on the documentation on GitHub here on the blog.


Before I go, I wanted to share a few social issues on my heart.

I hope everyone out there is ok during this strange time of quarantine due to COVID-19. If you are a person of color, please know Jesus loves you, as do I. We must emulate Christ’s love if we are to ever find peace in our nation. #BlackLivesMatter

I give you a new command: Love one another. Just as I have loved you, you are also to love one another.

John 13:34 CSB

Finding AD Groups with PowerShell Wildcards

directory

Managing a new app means documenting who has access. Let’s start with Active Directory groups, assuming the previous SysAdmin(s) consistently named AD groups for applications.

Get-ADGroup -filter {name -like "*foo*"}

This PowerShell command will return all the details for any AD groups containing the string “foo”. Replace foo with your app name.


Let’s break down the command:

Get-ADGroup

This is the module we’re using to connect to the current user’s domain controller.

-filter

Only return results matching what’s in the brackets after the flag.

{name -like "*foo*"}

Return only AD groups whose name property matches the regular expression “*foo*”.


Assuming your security team (or your SysAdmin predecessor) has applied some level of common sense to naming their AD groups and are using RBAC standards, you should find some preliminary results to dig into further.

You’ll probably find more than one result with almost identical members. Maybe one is a retired group; maybe it’s for a different environment. These sorts of questions lead to helpful discussions with security and business SMEs in your organization.

Use the results to begin creating documentation on your application’s security. Auditors will love you for this. And the boss always wants to know about the security of your app at the worst possible moment. Having these groups documented will make you the hero of your team at one point or another. I’ve included a sample table to get started.

GroupDescriptionMembersLast Certified
app_x_adminsAdminstrators for app “X”domain\larry, domain\curly, domain\moe2020-01-02
app_x_group_a_usersUsers for feature “A”domain\tom,
domain\dick,
domain\harry
Never
app_x_group_b_usersUsers for feature “B”domain\jane,
domain\john
2020-01-02
Use the table above to document AD groups for your organization.

Find more details on using this PowerShell module in Microsoft’s official documentation.

Building a Machine Learning Docker Container

container

I created a simple machine learning Docker container image for executing small experiments on AWS and Azure.

The container uses Ubuntu 18.04.2 LTS at its core with Python 3 and common Python ML libraries:

  • pandas
  • scipy
  • numpy
  • matplotlib
  • records
  • tensorflow

Machine Learning with Docker Source Code

#Download base image Ubuntu 18.04.2 LTS
FROM ubuntu:latest

# Update Ubuntu Software repository
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y sudo curl lsb-release wget

# Install Python 3 with pip
RUN apt-get install -y python3-pip
COPY requirements.txt .
RUN pip3 install -r requirements.txt

# Environment settings
ENV PYTHONUNBUFFERED 1
RUN echo 'alias py=python3' >> ~/.bashrc
RUN echo 'alias pip=pip3' >> ~/.bashrc

# TODO: Add nvidia-docker once it supports Windows
# https://github.com/NVIDIA/nvidia-docker/issues/429

Report Your RHEL Server Configuration in 5 Minutes

macbook

If you manage a large number of Red Hat Enterprise Linux (RHEL) servers or you’re a new admin, it’s not a bad idea to create a RHEL server configuration report to see what the servers are actually doing.

To make this a bit less painful, I created a simple bash script, providing base configurations, web server, and database details. Use this tool when logging onto a server to get a lay of the land or compare server configurations between environments.

Bash the RHEL Server Configuration

#!/bin/bash
# server_report.sh
# Server reconnaissance report
# Delivers important details about a server
# Warning: Run as sudo
# Zack White
# https://github.com/ZackWhiteIT/rhel_server_report
# Version 0.0.3
# 2018-06-13

printf '%s\n' -----------------------------------------------------------------
echo Server Report $(hostname -f) $(date --utc +%FT%TZ)
printf '%s\n' -----------------------------------------------------------------

# Get hardware info
printf '%s\n' -----------------------------------------------------------------
echo System Info
printf '%s\n' -----------------------------------------------------------------
lsb_release -drc # OS info
printf '%s\n' -----------------------------------------------------------------
echo Additional System Info
printf '%s\n' -----------------------------------------------------------------
dmidecode -t system # System information
printf '%s\n' -----------------------------------------------------------------
echo BIOS Info
printf '%s\n' -----------------------------------------------------------------
dmidecode -t bios # BIOS information
printf '%s\n' -----------------------------------------------------------------
echo Hardware Info
printf '%s\n' -----------------------------------------------------------------
lshw -short # Show hardware
printf '%s\n' -----------------------------------------------------------------
echo CPU Info
printf '%s\n' -----------------------------------------------------------------
lscpu # CPU info
printf '%s\n' -----------------------------------------------------------------
echo Memory
printf '%s\n' -----------------------------------------------------------------
free -h # Memory info
printf '%s\n' -----------------------------------------------------------------
echo Storage Device Info
printf '%s\n' -----------------------------------------------------------------
lsblk -a # Storage device info
printf '%s\n' -----------------------------------------------------------------
echo Partitions Info
printf '%s\n' -----------------------------------------------------------------
fdisk -l # Partition info

# Get network info
printf '%s\n' -----------------------------------------------------------------
echo Network Interface Info
printf '%s\n' -----------------------------------------------------------------
ifconfig -a # Network interface info
printf '%s\n' -----------------------------------------------------------------
echo Hostfile Info
printf '%s\n' -----------------------------------------------------------------
cat /etc/hosts # Hostfile info
printf '%s\n' -----------------------------------------------------------------
echo DNS Info
printf '%s\n' -----------------------------------------------------------------
cat /etc/resolv.conf # DNS info
printf '%s\n' -----------------------------------------------------------------
echo Network Configuration Info
printf '%s\n' -----------------------------------------------------------------
cat /etc/sysconfig/network # Network configuration info

# List users
printf '%s\n' -----------------------------------------------------------------
echo Users
printf '%s\n' -----------------------------------------------------------------
cat /etc/passwd

# App layer information
printf '%s\n' -----------------------------------------------------------------
echo Installed Services Info
printf '%s\n' -----------------------------------------------------------------
chkconfig --list # Installed services
printf '%s\n' -----------------------------------------------------------------
echo Service Status Information
printf '%s\n' -----------------------------------------------------------------
service --status-all # Current service status
printf '%s\n' -----------------------------------------------------------------
echo Open Ports Info
printf '%s\n' -----------------------------------------------------------------
netstat -tulpn # Services and open ports
printf '%s\n' -----------------------------------------------------------------
echo Cron Job Info
printf '%s\n' -----------------------------------------------------------------
crontab -l # Scheduled jobs

# Web layer information
if [ -d "/var/www/html" ];
then
  printf '%s\n' -----------------------------------------------------------------
  echo Web Page Info
  printf '%s\n' -----------------------------------------------------------------
  tree /var/www/html # Installed services
fi

cert_check=$(ls -al /etc/ssl/certs/ | grep -e ".*\.pem\|.*\.crt\|.*\.cer\|.*\.j ks" | wc -l);
if [ "$cert_check" -ne 0 ];
then
  printf '%s\n' -----------------------------------------------------------------
  echo Certificate Info
  printf '%s\n' -----------------------------------------------------------------
  ls -al /etc/ssl/certs/ | grep -e ".*\.pem\|.*\.crt\|.*\.cer\|.*\.j ks" # Certificates
fi

apache_cert_check=$(grep -e "SSLCertificateFile|SSLCertificateKeyFile|SSLCACertficiate File" /etc/httpd/conf/httpd.conf | wc -l)
if [ "$apache_cert_check" -ne 0 ];
then
  printf '%s\n' -----------------------------------------------------------------
  echo Apache Certificate Info
  printf '%s\n' -----------------------------------------------------------------
  grep -e "SSLCertificateFile|SSLCertificateKeyFile|SSLCACertficiate File" /etc/httpd/conf/httpd.conf # Apache Certificates
fi

apache_virtual_host_check=$(grep -e "^\<VirtualHost" /etc/httpd/conf/httpd.conf | wc -l)
if [ "$apache_virtual_host_check" -ne 0 ];
then
  printf '%s\n' -----------------------------------------------------------------
  echo Apache Virtual Host Info
  printf '%s\n' -----------------------------------------------------------------
  grep -e "^\<VirtualHost" /etc/httpd/conf/httpd.conf # Apache Virtual Hosts
fi

mysql_check=$(pgrep mysql | wc -l);
if [ "$mysql_check" -ne 1 ];
then
  printf '%s\n' -----------------------------------------------------------------
  echo Database Info
  printf '%s\n' -----------------------------------------------------------------
  mysql -V # MySQL version info
fi

How to Run It

sudo sh server_report.sh > server_report.txt 2>server_report.err

This generates the server report in the current working directory as server_report.txt with errors logged to server_report.err.