Nono.MA

NOVEMBER 28, 2022


Creating grids with native HTML5 and the "display: flex" CSS property.


See transcript ›

NOVEMBER 21, 2022


How to encode an image dataset to reduce its dimensionality and visualize it in the 2D space.


See transcript ›

NOVEMBER 9, 2022


How to use TensorFlow inside of a Docker container.


See transcript ›

NOVEMBER 7, 2022


How to sort a Vue.js view by different attributes and toggle different view modes.


See transcript ›

OCTOBER 31, 2022


How to hide un-compiled Vue templates while loading.


See transcript ›

OCTOBER 28, 2022


How to build a website with the Next.js React framework and TypeScript.

# TL;DR
npx create-next-app@latest --ts
cd my-app
npm run build
npm start
# ready - started server on 0.0.0.0:3000, url: http://localhost:3000

See transcript ›

JULY 11, 2022


Here's a video in which I test if OpenAI's DALL-E can generate usable texture maps from an uploaded image.

This texture comes with one of Apple's project examples and the idea of generating textures with DALL-E came from Adam Watters on Discord.

JUNE 6, 2022


My video on how to use the YouTube Data API v3 to upload videos to your channel from Python scripts and the command line is now on YouTube.

The video walks through how to create a project in the Google API Console, register an application, generate credentials, and use them in a Python script that can be called from the command-line interface to upload videos to your YouTube account with a web browser.

Types of authorization credentials

  • OAuth 2.0. The application first sends a client ID and client secret to obtain a token. (This is the method used in the video.)
  • API keys. The key identifies your project and provides API access, quota, and reports.
  • Service account. Server-to-server, app-level authentication using robot accounts.

Google Account, Project, and Application

  • You need a Google Account to access the Google API Console, request an API key, and register your application.
  • Create a project in the Google Developers Console and obtain authorization credentials so your application can submit API requests.
    • Go to the API Console and select the project that you just registered.
    • Visit the Enabled APIs page. In the list of APIs, make sure the status is ON for the YouTube Data API v3.
  • Go to the Credentials page and create one.
    • Project name
    • Organization (optional)
    • Click Create
  • Your project should now be showing in the dropdown next to Google Cloud Platform.

Create OAuth 2 credentials

Set up a Python environment with the Google API Client Library with Anaconda

conda create -n yt python=3.8 -y && conda activate yt
pip install google-api-python-client
pip install google_auth_oauthlib
python -c "from apiclient.discovery import build;print(build)"

Upgrading the Python upload video script to Python 3

As the upload_video.py sample is written in Python 2, there are minor edits that need to be done to upgrade to Python 3. (Here's the Python 3 version.)

  • Add from http import client
  • Replace appearances of httplib. with client.
  • Update the syntax of except and print statements from Python 2 to 3.

Dispose the created conda environment

You can delete the previously created Python environment when you're done as follows.

conda remove -n yt --all -y

Watch Upload Videos to YouTube with the Data API in Python

Want to see older publications? Visit the archive.

Listen to Getting Simple .