How to Print Colored Text in Python

Introduction It’s typical for CLI apps to return text in the same color of the terminal. There are always cases when we want to highlight output to the user, for example, a warning or error message. In those cases, a dash of color could make a difference. This article shows you how to print colored output in the terminal in Python with and without libraries. ANSI Escape Sequences Your Teletypewriter (TTY), or rather your terminal, is not only capable of […]

Read more

Parse Datetime Strings with parsedatetime in Python

Introduction In this tutorial, we’ll take a look at how to parse Datetime with parsedatetime in Python. To use the parsedatetime package we first need to install it using pip: $ pip install parsedatetime Should pip install parsedatetime fail, the package is also opensource available on Github. Convert String to Python’s Datetime Object with parsedatetime The first, and most common way to use parsedatetime is to parse a string into a datetime object. First, you’ll want to import the parsedatetime […]

Read more

Python Community Interview With Dane Hillard

Today I’m joined by Dane Hillard, lead web application developer at ITHAKA and author of Practices of the Python Pro. Dane is also a Real Python tutorial author. In this interview, we discuss a variety of topics, including code complexity, Python package maintenance, and popcorn. So without further ado, let’s welcome Dane. Ricky: Thanks for joining me for this interview, Dane. I’d like to start in the same manner we do with all our guests: how did you get into programming, […]

Read more

Parts of Speech Tag and Dependency Grammer

Objective Parts of speech tagging and dependency parsing are widely used techniques in text processing. Understand parts of speech tags and grammars with their respective use cases in Natural language processing Introduction Natural language processing is a branch of machine learning that deals with how machines understand human languages. Text data is a widely available problem domain for NLP tasks. In order to work with text data, it is important to transform the raw text into a form that can […]

Read more

Elvis’s Blog

Hi, It’s Elvis here! I regularly talk, write, and tweet about data science and machine learning related topics. However, there are other interests that I would love to share through this blog including tips on writing, presenting, researching, coding, learning, etc. Specific interests range from linguistics to education to product design. I work and collaborate on a lot of different projects involving different types of technologies. I would love to share more of that in this new blog. If you […]

Read more

Advancing organizational science using network machine learning to measure innovation in the workplace

Is innovation another loss due to the global COVID-19 pandemic? Indicators reveal challenges to overcome—as well as opportunities to build on our collective experience gained in the last year. Measuring collaboration using network machine learning provides a powerful diagnostic tool to address issues as they arise. One challenge lies in how we build relationships in the workplace. With many transitioning to work-from-home environments, more flexible schedules, and new methods of working, there is evidence that interactions at work have been […]

Read more

Records and Sets: Selecting the Ideal Data Structure

There are a variety of ways for storing and managing data in your program and the choice of the right data structure has an effect on the readability of your code, ease of writing, and performance. Python has a wide selection of built-in mechanisms that meet most of your data structure needs. This course introduces you to two types of data structures: data records and sets. There are multiple types and classes for both of these data structures and this […]

Read more

Tokenization and Text Normalization

Objective Text data is a type of unstructured data used in natural language processing. Understand how to preprocess the text data before feeding it to the machine learning algorithms. Introduction Text data is a form of unstructured data. The most prominent examples of text data available on the internet are social media data like tweets, posts, comments, or the Conversation data such as messages, emails, Chats. Also, it can be article data like news articles, blogs, etc. Note: If you […]

Read more

Build an Asteroids Game With Python and Pygame

Do you want to create your own computer games but like Python too much to abandon it for a career as a game developer? There’s a solution for that! With the Pygame module, you can use your amazing Python skills to create games, from the basic to the very complex. Below, you’ll learn how to use Pygame by making a clone of the Asteroids game! In this tutorial, you’ll learn how to build a complete game, including: Loading images and […]

Read more

Matplotlib: Draw Vertical Lines on Plot

Introduction Matplotlib is one of the most widely used data visualization libraries in Python. Much of Matplotlib’s popularity comes from its customization options – you can tweak just about any element from its hierarchy of objects. In this tutorial, we’ll take a look at how to draw a vertical line on a Matplotlib plot, that allows us to mark and highlight certain regions of the plot, without zooming or changing the axis range. Creating a Plot Let’s first create a […]

Read more
1 3 4 5 6 7 12