jamescalam/channel-metadata huggingface dataset:
Title: Stoic Philosophy Text Generation with TensorFlow
Category: People & Blogs
Published: 2020-04-19 13:52:43 UTC
Explanation of key parts to a RNN text generator built in TensorFlow with Python.

I've written a couple of Medium articles on this project, if you're interested check them out here:
Stoic Philosophy - Built by Algorithms
https://towardsdatascience.com/stoic-philosophy-built-by-algorithms-9cff7b91dcbd
Supercharged Prediction with Ensemble Learning
https://towardsdatascience.com/recurrent-ensemble-learning-caffdcd94092

Music used by Lakey Inspired.
1 - Blue Boi
2 - Falling
https://www.youtube.com/channel/UCOmy8wuTpC95lefU5d1dt2Q
Title: How to Build TensorFlow Pipelines with tf.data.Dataset
Category: People & Blogs
Published: 2020-11-02 08:57:48 UTC
Link to updated version (without video freeze): https://youtu.be/f6XVfgJTbp4

An introduction to building better input pipelines for Machine Learning in TF2.

Link to tf.data API docs: https://www.tensorflow.org/guide/data
Title: Every New Feature in Python 3.10.0a2
Category: People & Blogs
Published: 2020-11-10 16:44:05 UTC
Every new feature in the early release alpha 2 preview of Python 3.10

There is video lag 5:00 - 9:55 covering the Type Alias section (sorry!) - the audio is okay though
Title: How-to Build a Transformer for Language Classification in TensorFlow
Category: People & Blogs
Published: 2020-11-19 12:20:35 UTC
🎁 Free NLP for Semantic Search Course:
https://www.pinecone.io/learn/nlp

How to build a transformer model for sentiment analysis (language classification) using HuggingFace's Transformers library in TensorFlow 2 with Python.

We cover the full process from downloading data all the way through to building and training the transformer model.

This is a multi-class classification problem using both TensorFlow and Transformers to build a multiclass sentiment classifier.

Article version is here:
https://betterprogramming.pub/build-a-natural-language-classifier-with-bert-and-tensorflow-4770d4442d41

Or here (free link if you don't have Medium membership):
https://betterprogramming.pub/build-a-natural-language-classifier-with-bert-and-tensorflow-4770d4442d41?sk=346cd4ce5ee019c400835588b56d8574

Article extract:
"High-performance transformer models like BERT and GPT-3 are transforming a huge array of previously menial, language-based tasks, into the work of a few clicks, saving a lot of time.

In most industries, the newest wave of language optimization is just getting started — taking their first baby steps. But these seedlings are widespread, and sprouting quickly.

Much of this adoption is thanks to the incredibly low barrier-to-entry. If you know the basics of TensorFlow or PyTorch, and take a little time to get to grips with the Transformers library — you’re already halfway there.

With the Transformers library, it takes just three lines of code to initialize a cutting-edge ML model — a model built from the billions of research dollars spent by the likes of Google, Facebook, and OpenAI.

This article will take you through the steps to build a classification model that leverages the power of transformers, using Google’s BERT.

Transformers
- Finding Models
- Initializing
- Bert Inputs and Outputs
Classification
- The Data
- Tokenization
- Data Prep
- Train-Validation Split
- Model Definition
- Train"
Title: How-to use the Kaggle API in Python
Category: People & Blogs
Published: 2020-11-22 20:29:27 UTC
Simple step-by-step tutorial covering the setup and use of the Kaggle API for downloading datasets using the Kaggle library in Python.
Title: Language Generation with OpenAI's GPT-2 in Python
Category: People & Blogs
Published: 2020-11-24 14:22:46 UTC
Easy natural language generation with Transformers and PyTorch. We apply OpenAI's GPT-2 model to generate text in just a few lines of Python code.

Language generation is one of those natural language tasks that can really produce an incredible feeling of awe at how far the fields of machine learning and artificial intelligence have come.

GPT-1, 2, and 3 are OpenAI’s top language models — well known for their ability to produce incredibly natural, coherent, and genuinely interesting language.

In this article, we will take a small snippet of text and learn how to feed that into a pre-trained GPT-2 model using PyTorch and Transformers to produce high-quality language generation in just eight lines of code. We cover:

PyTorch and Transformers
- Data
Building the Model
- Initialization
- Tokenization
- Generation
- Decoding
Results

Medium Article:
https://towardsdatascience.com/text-generation-with-python-and-gpt-2-1fecbff1635b

Friend Link (free access):
https://towardsdatascience.com/text-generation-with-python-and-gpt-2-1fecbff1635b?sk=930367d835f15abb4ef3164f7791e1b1

Thumbnail background by gustavo centurion on Unsplash
https://unsplash.com/photos/O6fs4ablxw8
Title: Text Summarization with Google AI's T5 in Python
Category: People & Blogs
Published: 2020-11-27 06:00:07 UTC
Easy text summarization using Google AI's T5 model using HuggingFace transformers and PyTorch in Python.

Automatic text summarization allows us to shorten long pieces of text into easy-to-read, short snippets that still convey the most important and relevant information of the original text.

In this video, we’ll build a simple but incredibly powerful text summarizer using Google’s T5. We’ll be using the PyTorch and HuggingFace’s Transformers frameworks.

This is split into three parts:
1. Import and Initialization
2. Data and Tokenization
3. Summary Generation

You can read the article version of this on Medium here:
https://betterprogramming.pub/how-to-summarize-text-with-googles-t5-4dd1ae6238b6

(And for those of you without Medium membership, here's a free link):
https://betterprogramming.pub/how-to-summarize-text-with-googles-t5-4dd1ae6238b6?sk=740d3009282cb2c4f7478a0c073dedb3

Thumbnail background by gustavo centurion on Unsplash
https://unsplash.com/photos/O6fs4ablxw8
Title: How-to do Sentiment Analysis with Flair in Python
Category: People & Blogs
Published: 2020-12-04 14:00:03 UTC
Learn how to perform powerful sentiment analysis with no fine-tuning or pre-training required using the Flair NLP library in Python.

With the real-time information available to us on massive social media platforms like Twitter, we have all the data we could ever need to create these accurate and up-to-date sentiment metrics for different companies.

But then comes the question, how can our computer understand what this unstructured text data means?

That is where sentiment analysis comes in. Sentiment analysis is a particularly interesting branch of Natural Language Processing (NLP), which is used to rate the language used in a body of text.

Through sentiment analysis, we can take thousands of tweets about a company and judge whether they are generally positive or negative (the sentiment) in real-time!

Medium article:
https://towardsdatascience.com/sentiment-analysis-for-stock-price-prediction-in-python-bed40c65d178

(Free link if you don't have Medium membership):
https://towardsdatascience.com/sentiment-analysis-for-stock-price-prediction-in-python-bed40c65d178?sk=1cbf33a5d1fd2ed841f9487972c1cbed

Thumbnail photo by Alexander London on Unsplash
https://unsplash.com/@alxndr_london
Title: Python Environment Setup for Machine Learning
Category: People & Blogs
Published: 2020-12-23 13:53:02 UTC
Everything you need for a Python environment set up for Machine Learning and Data Science!

📕 Article:
https://towardsdatascience.com/how-to-setup-python-for-machine-learning-173cb25f0206

Thumbnail background by Christian Wiediger on Unsplash
https://unsplash.com/@christianw
Title: Functional API - TensorFlow Essentials #2
Category: Education
Published: 2020-12-29 10:04:40 UTC
A look at the functional API method for building models in TensorFlow 2 for Python.

Thumbnail background by Darius Bashar on Unsplash
https://unsplash.com/@dariusbashar?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
Title: Training Parameters - TensorFlow Essentials #3
Category: Education
Published: 2020-12-29 23:37:57 UTC
Learn how to set up model training parameters and compile the model before training.

Thumbnail background by Alex McCarthy on Unsplash
https://unsplash.com/@4lexmccarthy?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
Title: Input Data Pipelines - TensorFlow Essentials #4
Category: Education
Published: 2020-12-30 11:30:02 UTC
Learn how to set-up efficient and clean input data pipelines using tf.data.Dataset

Thumbnail background by Daria Nepriakhina on Unsplash
https://unsplash.com/@epicantus?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
Title: Sequential Model - TensorFlow Essentials #1
Category: Education
Published: 2020-12-29 09:50:23 UTC
Learn how to use the sequential model building approach in TensorFlow 2.

Background thumbnail by Aryan Dhiman on Unsplash
https://unsplash.com/@mylifeasaryan_?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
Title: 6 of Python's Newest and Best Features (3.7-3.9)
Category: Education
Published: 2021-01-12 23:58:12 UTC
A rundown of the six most recent, and coolest features added to Python in the past few years!

2018 brought us a plethora of new features with the release of Python 3.7, followed by 3.8 in 2019, and 3.9 in 2020.

Many of those changes were behind the scenes. Optimizations and upgrades that the vast majority of us will never notice, despite their benefits.

Others are more obvious, additions to syntax or functionality that can change how we write our code. But even these visible changes can be hard to keep up with.

In this video, we will run through the more apparent upgrades to provide a brief but hopefully invaluable refresher on everything new to Python from the past few years.

- Python 3.7
  - Breakpoints
- Python 3.8
  - Walrus Operator
  - F-string '=' Specifier
  - Positional-only Parameters
- Python 3.9
  - More Type Hinting
  - Dictionary Unions

Medium Article:
https://towardsdatascience.com/amazing-features-added-to-python-from-3-7-to-now-4f35f0bb1ea6

(Free access link):
https://towardsdatascience.com/amazing-features-added-to-python-from-3-7-to-now-4f35f0bb1ea6?sk=bda3cb7717caa969b81619f85191f241

Thumbnail background by Martin Sanchez on Unsplash:
https://unsplash.com/photos/4PDPLw1flgE
Title: Novice to Advanced RegEx in Less-than 30 Minutes + Python
Category: Education
Published: 2021-01-27 09:51:32 UTC
A full tutorial covering everything you need to know about Regular Expressions - an essential for anyone learning to code - and even more so for anyone interested in Natural Language Processing.

This video includes:

- metacharacters
- quantifiers
- capture groups
- using capture groups in Python
- character sets
- look-ahead and look-behind assertions
- negative look-ahead and look-behind assertions
- inline modifiers
- passing modifiers as function parameters in Python
- conditionals (if-else statements for RegEx)
- re.match
- re.search
- re.findall

We cover all of this in-depth in this tutorial, incl. examples all the way through on RegEx101 (an interactive debugging/regex building tool) and also in Python.
Title: Building a PlotLy $GME Chart in Python
Category: Education
Published: 2021-02-07 13:24:45 UTC
A code-along video covering the coding process from imagination to Python.
Something a little different, I'm not overly keen on this format - it's pretty long - but I've recorded it and I think maybe this can be useful for a few of you.
I haven't prepared anything beforehand, this is just going into the coding process with a rough outline of wanting to build a stock chart for GME (GameStop) and adding a few technical indicators - to get more familiar with PlotLy and the AlphaVantage API.
So, it's a weird one, but I hope a few of you enjoy it - thanks :)
Title: How to Build Custom Q&A Transformer Models in Python
Category: Education
Published: 2021-02-12 13:30:03 UTC
In this video, we will learn how to take a pre-trained transformer model and train it for question-and-answering. We will be using the HuggingFace transformers library with the PyTorch implementation of models in Python.

Transformers are one of the biggest developments in Natural Language Processing (NLP) and learning how to use them properly is basically a data science superpower - they're genuinely amazing I promise!

I hope you enjoy the video :)

Medium article:
https://towardsdatascience.com/the-ultimate-performance-metric-in-nlp-111df6c64460

(Free link):
https://towardsdatascience.com/how-to-fine-tune-a-q-a-transformer-86f91ec92997?sk=9344fd51afe71a0905db833d0183d436

Code:
https://gist.github.com/jamescalam/55daf50c8da9eb3a7c18de058bc139a3

Photo in thumbnail by Lorenzo Herrera on Unsplash
https://unsplash.com/@lorenzoherrera
Title: How-to Use The Reddit API in Python
Category: Education
Published: 2021-02-12 12:02:48 UTC
Learn how to use the Reddit API in Python, including setup, authorization, and pulling data from subreddits.

Reddit API docs:
https://www.reddit.com/dev/api/

📙 Medium article:
https://towardsdatascience.com/how-to-use-the-reddit-api-in-python-5e05ddfd1e5c

📖 Free link:
https://towardsdatascience.com/how-to-use-the-reddit-api-in-python-5e05ddfd1e5c?sk=0295f297c1365bee7cc7a32bdff21b61

Extract from article:

"Reddit is a huge ecosystem brimming with data that is readily available at our very fingertips. As a data-minded person, I wanted to take advantage of this and perform some analysis using this vast repository of open-source data.
Initially, it turned out that getting to grip with Reddit’s API wasn’t as clear-cut as expected — despite being a straightforward process; it can be a little confusing at first.
So, after figuring everything out, I wrote this article — which I hope will help a few of you to get familiar with using the Reddit API in Python. We will cover:
Getting Access
Making Requests
  - Reading the Data
  - Streaming New Posts
Parameters

Getting Access
First, we need access. Unlike most popular services, the Reddit API was somewhat difficult to figure out initially. There are several steps:
1. Go to App Preferences and click create another app… at the bottom.
2. Fill out the required details, make sure to select script — and click create app.
3. make a note of the personal use script and secret tokens.
4. Request a temporary OAuth token from Reddit. We need our username and password for this.
5. Add headers=headers to every request. The OAuth token will expire after ~2 hours, and a new one will need to be requested.
"

And so on, check it out if you're interested in reading (rather than watching).

🕹️ Free AI-Powered Code Refactoring with Sourcery:
https://sourcery.ai/?utm_source=YouTub&utm_campaign=JBriggs&utm_medium=aff
Title: How to Build Q&A Models in Python (Transformers)
Category: Education
Published: 2021-02-19 15:00:21 UTC
In this video we'll cover how to build a question-answering model in Python using HuggingFace's Transformers.

You will need to install the transformers library with:
pip install transformers

Alongside either TensorFlow or PyTorch (to follow this video exactly you will need PyTorch). To install TensorFlow just type:
pip install tensorflow
OR
conda install tensorflow

And for PyTorch follow the instructions under 'Install PyTorch' here:
https://pytorch.org/

Link to Q&A fine-tuning video:
https://youtu.be/ZIRmXkHp0-c

You can find the Medium article link below here:
https://towardsdatascience.com/question-and-answering-with-bert-6ef89a78dac
Title: How-to Decode Outputs From NLP Models (Python)
Category: Education
Published: 2021-02-24 15:00:10 UTC
In this video, we will cover three ways to decode the output probabilities from NLP models - greedy search, random sampling, and beam search.

Learning how to decode outputs can make a huge difference in diagnosing model issues and improving text output quality - and as an added bonus it's super easy.

One of the often-overlooked parts of sequence generation in natural language processing (NLP) is how we select our output tokens — otherwise known as decoding.

You may be thinking — we select a token/word/character based on the probability of each token assigned by our model.

This is half-true — in language-based tasks, we typically build a model which outputs a set of probabilities to an array where each value in that array represents the probability of a specific word/token.

At this point, it might seem logical to select the token with the highest probability? Well, not really — this can create some unforeseen consequences — as we will see soon.

When we are selecting a token in machine-generated text, we have a few alternative methods for performing this decode — and options for modifying the exact behavior too.

In this video we will explore three different methods for selecting our output token, these are:

- Greedy Decoding
- Random Sampling
- Beam Search

Link to the article version on Medium:
https://towardsdatascience.com/the-three-decoding-methods-for-nlp-23ca59cb1e9d

Free link (if you don't have membership):
https://towardsdatascience.com/the-three-decoding-methods-for-nlp-23ca59cb1e9d?sk=64fbb0204c174dc520af027a69f88030
Title: Identify Stocks on Reddit with SpaCy (NER in Python)
Category: Education
Published: 2021-03-03 14:27:48 UTC
We will learn how to process unstructured text data from Reddit and extract organization names so that any further analysis is automatically classified and results assigned to the correct stocks.

Organizations are mentioned in each subreddit in a variety of formats. Typically we will find two formats:

- Organization name, eg Tesla/Tesla Motors
- Ticker symbol, eg TSLA, tsla, or $TSLA

We also need to be able to differentiate between tickers and other abbreviations/slang -some of these are unclear like AI (AI can mean both artificial intelligence and refer to the ticker symbol for C3.ai).

So, we need a reasonable competent NER process to accurately classify our data.

Reddit API video: https://youtu.be/FdjVoOf9HN4
/r/investing data: https://github.com/jamescalam/transformers/blob/main/course/named_entity_recognition/data/reddit_investing.csv
Medium article: https://towardsdatascience.com/ner-for-extracting-stock-mentions-on-reddit-aa604e577be
(Free version if you don't have Medium membership): https://towardsdatascience.com/ner-for-extracting-stock-mentions-on-reddit-aa604e577be?sk=d16305d40b18e7955a0665633182d2b4

Thanks for watching!
Title: Sentiment Analysis on ANY Length of Text With Transformers (Python)
Category: Education
Published: 2021-03-10 13:15:03 UTC
The de-facto standard in many natural language processing (NLP) tasks nowadays is to use a transformer. Text generation? Transformer. Question-and-answering? Transformer. Language classification? Transformer!

However, one of the problems with many of these models (a problem that is not just restricted to transformer models)  is that we cannot process long pieces of text.

Almost every article I write on Medium contains 1000+ words, which, when tokenized for a transformer model like BERT, will produce 1000+ tokens. BERT (and many other transformer models) will consume 512 tokens max - truncating anything beyond this length.

Although I think you may struggle to find value in processing my Medium articles, the same applies to many useful data sources - like news articles or Reddit posts.

We will take a look at how we can work around this limitation. In this article, we will find the sentiment for long posts from the /r/investing subreddit. This video will cover:

High-Level Approach
Getting Started
- Data
- Initialization
Tokenization
Preparing The Chunks
- Split
- CLS and SEP
- Padding
- Reshaping For BERT
Making Predictions

Here's a link to the Medium article:
https://towardsdatascience.com/how-to-apply-transformers-to-any-length-of-text-a5601410af7f

And a free access link if you don't have Medium membership:
https://towardsdatascience.com/how-to-apply-transformers-to-any-length-of-text-a5601410af7f?sk=d4e717eb2ff31fb27ea67019bbb63ad6
Title: Unicode Normalization for NLP in Python
Category: Education
Published: 2021-03-17 13:30:00 UTC
ℕ𝕠-𝕠𝕟𝕖 𝕚𝕟 𝕥𝕙𝕖𝕚𝕣 𝕣𝕚𝕘𝕙𝕥 𝕞𝕚𝕟𝕕 𝕨𝕠𝕦𝕝𝕕 𝕖𝕧𝕖𝕣 𝕦𝕤𝕖 𝕥𝕙𝕖𝕤𝕖 𝕒𝕟𝕟𝕠𝕪𝕚𝕟𝕘 𝕗𝕠𝕟𝕥 𝕧𝕒𝕣𝕚𝕒𝕟𝕥𝕤. 𝕋𝕙𝕖 𝕨𝕠𝕣𝕤𝕥 𝕥𝕙𝕚𝕟𝕘, 𝕚𝕤 𝕚𝕗 𝕪𝕠𝕦 𝕕𝕠 𝕒𝕟𝕪 𝕗𝕠𝕣𝕞 𝕠𝕗 ℕ𝕃ℙ 𝕒𝕟𝕕 𝕪𝕠𝕦 𝕙𝕒𝕧𝕖 𝕔𝕙𝕒𝕣𝕒𝕔𝕥𝕖𝕣𝕤 𝕝𝕚𝕜𝕖 𝕥𝕙𝕚𝕤 𝕚𝕟 𝕪𝕠𝕦𝕣 𝕚𝕟𝕡𝕦𝕥, 𝕪𝕠𝕦𝕣 𝕥𝕖𝕩𝕥 𝕓𝕖𝕔𝕠𝕞𝕖𝕤 𝕔𝕠𝕞𝕡𝕝𝕖𝕥𝕖𝕝𝕪 𝕦𝕟𝕣𝕖𝕒𝕕𝕒𝕓𝕝𝕖.

We also find that text like this is incredibly common - particularly on social media.

Another pain-point comes from diacritics (the little glyphs in Ç, é, Å) that you'll find in almost every European language.

These characters have a hidden property that can trip up any NLP model - take a look at the Unicode for two versions of Ç:

Latin capital letter C with cedilla: \u00C7

Latin capital letter C + combining cedilla: \u0043\u0327

Both are completely different, despite rendering as the same character.

To deal with all of these text variants we need to use Unicode normalization - which we will cover in this video.

Medium article:
https://towardsdatascience.com/what-on-earth-is-unicode-normalization-56c005c55ad0

Friend link (free access):
https://towardsdatascience.com/what-on-earth-is-unicode-normalization-56c005c55ad0?sk=0cd19a9ad9f5d948b33179bab3c3b7cd
Title: The NEW Match-Case Statement in Python 3.10
Category: Education
Published: 2021-03-19 16:00:03 UTC
Python 3.10 is beginning to fill-out with plenty of fascinating new features. One of those, in particular, caught my attention - structural pattern matching - or as most of us will know it, switch/case statements.

Switch-statements have been absent from Python despite being a common feature of most languages. Python is leapfrogging ahead of those languages by introducing the match-case statement as a switch-case v2.0.

Back in 2006, PEP 3103 was raised, recommending the implementation of a switch-case statement. However, after a poll at PyCon 2007 received no support for the feature, the Python devs dropped it.

Fast-forward to 2020, and Guido van Rossum, the creator of Python, committed the first documentation showing the new match-statements, which have been named Structural Pattern Matching, as found in PEP 634.

Let's take a look at how this new logic works.

Medium Article:
https://towardsdatascience.com/switch-case-statements-are-coming-to-python-d0caf7b2bfd3

Friend Link (free access):
https://towardsdatascience.com/switch-case-statements-are-coming-to-python-d0caf7b2bfd3?sk=363e0f7696502647e007f91910b4c817

🕹️ Free AI-Powered Code Refactoring with Sourcery:
https://sourcery.ai/?utm_source=YouTub&utm_campaign=JBriggs&utm_medium=aff

00:00 Intro
00:58 Switch-Case
02:37 Flow of Logic
03:21 Second Example (Tuples)
05:00 Final Example Setup
11:30 Final Example If-Else Version
15:22 Final Example Match-Case Version
Title: Multi-Class Language Classification With BERT in TensorFlow
Category: Education
Published: 2021-03-25 16:00:15 UTC
Chapters for each section of the video (preprocessing, model build, prediction) are in the video timeline.

Transformers have been described as the fourth pillar of deep learning [1], alongside the three big neural net architectures of CNNs, RNNs, and MLPs.

However, from the perspective of natural language processing - transformers are much more than that. Since their introduction in 2017, they've come to dominate a majority of NLP benchmarks - and continue to impress daily.

What I'm saying is, transformers are damn cool. And with libraries like HuggingFace's transformers - it has become too easy to build incredible solutions with them.

So, what's not to love? Incredible performance paired with the ultimate ease-of-use.

In this video, we'll work through building a multi-class classification model using transformers - from start-to-finish.

Medium article:
https://towardsdatascience.com/multi-class-classification-with-transformers-6cf7b59a033a

Free access:
https://towardsdatascience.com/multi-class-classification-with-transformers-6cf7b59a033a?sk=544872025c2283c54cf4294814b8cae3

Link to Kaggle video:
https://youtu.be/DgGFhQmfxHo

[1] Fourth Pillar of AI:
https://ark-invest.com/articles/analyst-research/transformers-comprise-the-fourth-pillar-of-deep-learning/

00:00 Intro
01:21 Pulling Data
01:47 Preprocessing
14:33 Data Input Pipeline
24:14 Defining Model
33:29 Model Training
35:36 Saving and Loading Models
37:37 Making Predictions