Tutorial | Python | dotenv

Hide your passwords and API tokens to make your code more secure

A cat hiding, just like your credentials should
A cat hiding, just like your credentials should
A cat hiding, just like your credentials should be! | Photo by Thomas Bormans on Unsplash

In a previous post, I left a Discord token in the script. This is not the ideal way to code, especially if I don’t want to regenerate my tokens every time I share code. Using credentials and API tokens in your data science and programming projects is inevitable, but leaving them exposed is avoidable. Using the dotenv python module can help keep these sensitive bits of information safe from prying eyes.

Tutorial | R | Data Structures

The containers for your data science leftovers

Collections of Data Types

Photo by Syed Hussaini on Unsplash

Now that you know the different types of variables, let’s look at some options R has for collecting these variables together. We’ll look at the following types:

  1. Vectors
  2. Matrices
  3. Data Frames
  4. Lists


One of the most essential types in R, vectors are the backbone of a lot of operations. While they are limited to only containing 1 type of variable, this allows them to perform actions faster than using for loops. They are also the building block for data frames which we will cover later in this post. Let’s make some vectors!

numbers <- c(1, 2, 3, 4, 5, 6…

Tutorial | R | Data Types & Structures

The building blocks of data science in R

Photo by Iker Urteaga on Unsplash

In order to do data science with R, we need to store our data in variables. Depending on what our data is, we will need to give it the right type. By choosing a different type, we are able to access different tools to manipulate and use that variable later. Some are more flexible and others are more computationally efficient. Let’s dive in.

Data Types

Let’s begin with the different types of data. While this won’t be a comprehensive list, it will cover some of the most important data types that are used in data science.

  1. Numeric
  2. Factors
  3. Character
  4. Dates/Times


A numeric…

There are a ton of benefits to workers moving out of the office beyond the ease of accepting deliveries or having work done at home. When you start to throw a lot of different types of people together in places like coworking spaces, you can pick the brains of people outside your company who have very different experiences and perspectives on thing. It makes it much easier to get a different view because that person doesn't view your problems the same way or with the same background.

I touched on it in my post about getting more done by doing…

Tutorial | R | Shiny/API

Using R to put Senator Sanders in front of you house!

Bernie, waiting for you to write some code! (Image composited by the author)


Anyone who has been on the internet recently knows Bernie Sander’s iconic coat and mittens from the 2021 Presidential Inauguration. We’ve seen him popping up on college campuses and even billboards in the short time since it happened, but a particular project rises above the rest. A developer used Google Street view to put Bernie in front of any address you input.

Looking at the app, I thought it would be a fun project to reverse engineer and build it up a bit differently. The inspiration for this post can be seen here. …

A collection of people, real and fictional, who can teach us about life

Photo by Randy Tarampi on Unsplash

During tough times, it is important to find inspiration wherever you can. We can all agree that 2020 has been an especially tough year, whether it was from graduating but being unable to find a job, losing a job due to side effects of the global pandemic, getting sick, or knowing someone who was affected by one of these situations. As one of the worst years most of us can remember, where can we find inspiration to be better?

Well, inspiration is anywhere you look for it. It doesn’t have to come from real people, it doesn’t have to come…

Not working can have a positive impact on your work

Photo by Tim Gouw on Unsplash

Being stuck at home for the better part of a year has taken its toll. Normally we can escape the physical confines of work by going home. With many of us conducting business from our homes, that just isn’t the case anymore. This, combined with having trouble getting your code to run or not finding anything significant in your analysis can be draining.

You start to feel bad about not accomplishing anything. You start to doubt your skills and whether you are really getting anything done. It would be so easy to just sit back down and keep working at…

Strategies to boost you productivity, most of which involve less work!

Photo by Sid Leigh on Unsplash

My first job ever was in fast food, and it taught me a lot of things. There was a certain mentality that could be summed up by the phrase, “if you’re leaning you could be cleaning.” In a nutshell, there wasn’t meant to be any downtime. If there were no customers, there was always an unlimited supply of more work to do.

This constant nose to the grindstone philosophy really grinds away at your will to work. The ask is that you give your all for the company and work as hard as you possibly can constantly until it is…

Tutorial | Python | Discord.py

How to add rich formatting to Python Discord bots

Image by the author

Looking for that extra flair for your Discord bot responses? Making fonts bold, italic, strikethrough, and other options will give you more control over how responses look. You can draw attention to certain parts of messages, hide other parts, and generally improve the look and feel of your bot’s messages.

Previously we added some flair to our messages by using embeds to organize information sent by the bot. Now we will use the Discord markdown options to spice things up. You may have already used this to format text in the Discord app. You can see some of the options…

Bad news for anyone graduating this December looking for a job in Data Science. Unemployment is still nearly 2% higher than it was in 2019. So many people are still…

Drew Seewald

Data Scientist, Mercedes-Benz Financial Services | Twitter @RealDrewData | LinkedIn: www.linkedin.com/in/atseewal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store