Automate Replacing JSON Values with Python

In this post: Intro JSON File CSV File Python Script Writing the Python Script I was recently tasked with automating the replacement of key:value pairs in a JSON file. The goal was to take the output of a CLI command listing key:value pairs and place those keys/values in specific places within a JSON file. I decided to convert the output of the CLI command to a CSV file and have a python script use that CSV to create a new JSON file with updated keys/values. ...

Wed, Dec 22, 2021 · 7 min · Olivia Snowden

Python Methods and Classes

Once you get past your first “Hello World” Python script, it’s good to learn how to use Python methods and classes. Methods and **functions **are a self-contained block of code that can be reused over and over. There are built-in functions that beginners in Python may already be familiar with, like print() and sum(). A user can also define a function (called a user-defined function) that executes a task they need done in their script multiple times. This is especially useful because it keeps the user from having to write that same chunk of code repeatedly. Variables that exist outside of the function can be passed to the function as parameters, but they are not required. The format of defining your own function is below: ...

Mon, Jan 18, 2021 · 5 min · Olivia Snowden

Neural Networks and Tensorflow - Capstone Pt.1

Over the next year, I will be completing a research project exploring how biased training data effects the machine learning algorithm of self-driving cars. This project, which I’ll detail in a later post, involves deep neural networks (DNNs), computer vision, linear algebra, and more. Is this project a massive undertaking? Yes. Will that stop me? Absolutely not. Let’s get started. Neural Network Basics First, what is artificial intelligence (AI)? AI is a field of computer science pertaining to programming computers so that they demonstrate human-like intelligence. ...

Wed, Nov 11, 2020 · 6 min · Olivia Snowden

Neural Networks and Tensorflow - Capstone Pt.2

In my first Capstone post I gave a rundown of basic AI terms and how to use Tensorflow to create your own machine learning (ML) script. I’m using Tensorflow to write a script that can process images of roads and determine whether there is an obstacle in the road or not. Since I’m studying self-driving cars, I’d like to see if using biased data to train an object detection script affects the model’s performance. To do this, I’m using a training dataset of clear, bright road images to train a neural network and then testing that script with corrupted images of roads. If the model can’t recognize obstacles in images that are corrupted, then the biased training dataset did have an affect on the model. ...

Wed, Nov 11, 2020 · 9 min · Olivia Snowden