You have 2 free member-only stories left this month.

Automate Your Terminal Makeover

Is setting up a terminal the first thing you do with a new computer? If yes, then this is for you.

Photo by Haseeb Jamil on Unsplash. Gif by Author.

Towards Data Science published my article, The Ultimate Guide to Your Terminal Makeover in April 2020. It is one of my most popular articles. It has more than 65 K views since it was published and about 300 views daily.

This month I had to install the terminal on my new laptop. Following the steps in my own article, I thought “Hmm, I can automate all these installations.”

Subsequently, I created Terminal Makeover Automated (Terma). It automates installing the following packages on a new Mac:

Caution

I created Terma for a new Mac. If you already installed iTerm2 and plugins, I suggest saving the ~/.oh-my-zsh directory, ~/.zshrc file, and ~/Library/Preferences/com.googlecode.iterm2.plist. I recommend using Automate Brew Installer first to save your brew list and then reinstall it after the Terma installation.

Installing Terma

Finding Terminal on Finder. Screenshot by Author.

Open a terminal and install the Awesome Package Manager.

Installing the Awesome Package Manager is easy. Run the following on your terminal:

curl -s https://raw.githubusercontent.com/shinokada/awesome/main/install | bash -s install

Once you have installed the Awesome Package Manager, install Terma.

awesome install shinokada/terma

Getting started

To run terma on your terminal, do the following:

terma

You’ll be asked for your password when installing Homebrew.

The Oh-My-Zsh installation exits the script, so you need to run terma again.

terma
Installing Terma. Image by Author.

iTerm2 is ready to rock!

When you open the newly installed iTerm press Ctrl+right-click and select Open.

The iTerm Preferences Profile is set with the name “Terma”, Color Presets of Snazzy, and font Fira code.

You can use brew aliases, such as bubu, auto-suggestions, auto jump, and all the above plugins.

The plugins in action. Image by Author.

Printing help

terma -h

Uninstalling Terma

You can remove all items installed including Homebrew. I suggest using Automated Brew Installation to save your brew list first.

terma uninstall

What I learned from writing Terma

At first, I wrote the script in Bash, then running source $HOME/.zshrc requires a ZSH script. I converted the script to ZSH. All I needed to change was the read command.

# Bash
read -rp "Do you want to uninstall? yes/y or no/n " PANS
# ZSH
read "PANS?Do you want to uninstall Y/y or N/n? "

The script uses Homebrew to install packages except for Oh-My-Zsh. To avoid unnecessary error messages, the script sources appropriate .zshrc files. For the iTerm2 configuration file, it copies a premade com.googlecode.iterm2.plist file to the ~/Library/Preferences directory.

The script uses a heredoc to show the final message. The Figlet program can create large letters.

The ending message was made by Figlet and heredoc. Image by Author.

Conclusion

Since you will be installing a number of programs with Terma, it takes some time to complete. I tested terma on my 2015 Mac (x86_64) and 2021 Mac (ARM 64, M1 chip), and it worked flawlessly.

If you have your favorite iTerm2 setup, replace Terma’s com.googlecode.iterm2.plist with your plist file in the ~/Library/Preferences/com.googlecode.iterm2.plist directory.

Happy coding!

If you liked my article and would like to receive my newsletter, please sign up.

Tools and tips for programmers. Math teacher, programmer, husband, father, Japanese. https://bit.ly/3nEaAfr.

Thanks to Emile Okada and Cecilie Okada. 

Sign up for The Variable

By Towards Data Science

Every Thursday, the Variable delivers the very best of Towards Data Science: from hands-on tutorials and cutting-edge research to original features you don't want to miss. Take a look.

You'll need to sign in or create an account to receive this newsletter.

Your home for data science. A Medium publication sharing concepts, ideas and codes.

Let’s Dance to Some AI Generated Tunes

AI and Music
AI and Music
Image Credits: Andrey Suslov on iStock

Audio is a domain where the cross-pollination of ideas from computer vision and NLP domains has broadened the perspective. Audio generation is not a new field, but thanks to research in the deep learning space, this domain has seen some tremendous improvements in recent years as well. Audio generation has several applications. The most prominent and popular ones nowadays are a series of smart assistants (Google Assistant, Apple Siri, Amazon Alexa, and so on). These virtual assistants not only try to understand natural language queries but also respond in a very human-like voice.

This article is an excerpt from the…


Post a quick thought or a long story. It's easy and free.


Notes from Industry

Manipulate Pandas data frames from the comfort of your own browser!

We all love processing data, but sometimes it can be challenging to relay what we did to the data. I wanted to build an application that would help people define data flows while providing an intuitive and easy way to edit and share these flows with other people. Writing a data pipeline as a script is easy and effective for people with a solid technical background, but how does one show this to a manager or stakeholder? I decided it was time to build an application that did just this! …


Semantic Reasoning and Ontologies for Autonomous Vehicles

Photo by Andreas Dress on Unsplash

Autonomy is a central pillar of the fourth industrial revolution. However, fully autonomous vehicles remain an area of development. Autonomous vehicles operate in a high-risk environment — if something goes wrong, lives could be at risk. To function effectively, the system needs human-like reasoning and decision-making capabilities.

There is a growing interest in ontology-based road environment modelling within the Intelligent Transportation Systems community. …


Extract the value of relationships by using the FastRP embedding algorithm to produce features for a downstream node classification task

This is the third article in my Twitchverse series. The previous two are:

  1. Twitchverse: Constructing a Twitch Knowledge Graph in Neo4j
  2. Twitchverse: A network analysis of Twitch universe using Neo4j Graph Data Science

Don’t worry. This article is standalone, so you don’t need to examine the previous ones if you aren’t interested. However, if you are interested in how I constructed the Twitch knowledge graph and performed a network analysis, check them out. You can also follow along by loading the database dump in Neo4j and all the code is available as a Jupyter notebook.

Agenda

In this blog post, I…


ARTIFICIAL INTELLIGENCE

GitHub, Microsoft, and OpenAI have reached a new milestone.

Photo by Nicole Wolf on Unsplash

When OpenAI released GPT-3 last year, people got surprised by its ability to generate code from natural language prompts. Sharif Shameem and others excitedly shared their discoveries and soon the hype — and the worry — went through the roof. But GPT-3 was nowhere near being a great programmer. It’s a notable feat that it could understand an English text and transform it into a chunk of code, but it performed mediocrely.

OpenAI and Microsoft (now backing their projects financially) saw a very promising commercial product in GPT-3’s coding abilities and soon started to develop another language model; a programmer…