2 Things You Need to Know About Reinforcement Learning: Computational and Sample Efficiency

The High Cost of Deep Learning

Have you ever put on a sweater because the air conditioning was too cold? Forgotten to turn off the lights in another room before heading to bed? Do you commute to work more than 30 minutes every day just for the sake of “filling seats” at the office, even though everything you do at work could be done via laptop from home? 

In the counter-intuitive trade-offs between sample and computational efficiency in Reinforcement Learning, choosing evolution strategies can be smarter than it looks.

Find Free Udemy Courses with Google Sheets and the Udemy API

Whether you are looking to learn a programming language, enhance your Microsoft Excel skills, or acquire knowledge in Machine Learning, Udemy probably has a video course for you. Udemy courses are usually affordable, there are no subscription fee and you can learn at your own pace.

Free Udemy Courses on Programming

While most video tutorials on Udemy require payment, the website also offers some of their highly-rated courses for free. I’ve prepared a Google Sheet that lists all the free programming courses currently available on Udemy. The spreadsheet is updated automatically every few hours. You can also access the web version for easy browsing.

Free Udemy Courses ✨ You may use the search function of the browser (Ctrl + F) to find courses for a specific programming language or topic. The courses are sorted by popularity.

There’s no secret sauce. Udemy has an developer API that provides access to all the course data available on the website, including user ratings, number of students who have taken the course, duration, preview video lectures, and more.

Use the Udemy API with Google Sheets

The Udemy API is free to use but requires authentication. You can generate the credentials for your Udemy account and then use the /courses endpoint to fetch the list of free courses.

const parseCourseData_ = (courses) =>
  courses
    .filter(
      ({ is_paid, primary_category }) =>
        is_paid === false && ['Development', 'IT & Software'].includes(primary_category.title)
      // We are primarily interested in programming courses on Udemy
    )
    .map((e) => [
      `=IMAGE("${e.image_240x135}")`,
      `=HYPERLINK("https://www.udemy.com${e.url}";"${e.title}")`,
      e.visible_instructors.map(({ display_name }) => display_name).join(', '),
      e.num_subscribers,
      Math.round(e.avg_rating * 100) / 100,
      e.num_reviews,
      e.content_info_short,
      e.num_lectures,
      new Date(e.last_update_date),
    ]);

const listUdemyCoursesGoneFree = () => {
  // Put your Udemy credentials here
  const CLIENT_ID = '';
  const CLIENT_SECRET = '';

  const params = {
    page: 1,
    page_size: 100,
    is_paid: false,
    'fields[course]': '@all',
  };

  const query = Object.entries(params)
    .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)
    .join('&');

  const apiUrl = `https://www.udemy.com/api-2.0/courses/?${query}`;
  const bearer = Utilities.base64Encode(`${CLIENT_ID}:${CLIENT_SECRET}`);
  const options = {
    muteHttpExceptions: true,
    headers: {
      Authorization: `Basic ${bearer}`,
    },
  };

  const courses = [];

  do {
    const response = UrlFetchApp.fetch(apiUrl, options);
    const { results = [], next } = JSON.parse(response);
    courses.push(...parseCourseData_(results));
    url = next;
  } while (url && courses.length < 500);

  const ss = SpreadsheetApp.getActiveSpreadsheet();
  const [sheet] = ss.getSheets();
  sheet.getRange(2, 1, sheet.getLastRow(), sheet.getLastColumn()).clearContent();
  sheet.getRange(2, 1, courses.length, courses[0].length).setValues(courses);
};

We use the UrlFetch service of Google Scripts to fetch the data from the Udemy API and the data is then parsed and inserted into the Google Sheet. The course thumbnail image is rendered using the IMAGE formula and the course title is linked to the Udemy website using the HYPERLINK formula.

Aarogya Setu – How India’s COVID-19 Proximity Alerts Work?

The Government of India has developed a mobile tracker app - Aarogya Setu - as part of their efforts to contain the spread of Corona virus in this country of 1.3 billion people. The app is available for both iPhone and Android phones.

The Aarogya Setu app has already gone viral in India with more than a million downloads in a single day.

The app has three parts:

  1. It contains a chat bot that guides you through a self-assessment test if you exhibit any COVID-19 symptoms.
  2. The app provides quick access to emergency phone numbers of health centers that are dealing with COVID-19 patients.
  3. The app will automatically alert you if you ever come near (or have crossed paths earlier) to a person who has tested COVID-19 positive.

COVID-19 India Alerts

Proximity Alerts for COVID-19 - How the app works?

The proximity alert feature in Aarogya Setu is the reason why people are so interested in this app but how does this work?

This morning, a person who returned from Dubai about two weeks ago, tested positive for Coronavirus and the authorities have taken him to the hospital. Their residence is less than a mile from our home and I was expecting some sort of alert in the tracker app but none so far.

So I dug a bit deeper into how the app works and here’s what I found:

When a user installs the app, it uses Bluetooth to detect any nearby phones that could also be running the Aaryogya Setu app. While the actual algorithm is a secret, the app likely keeps a record of all devices that have ever been near to you. If the owner of any of these nearby phones is later found to be infected, the app will alert you.

Thus more and more people have to install the app, with Bluetooth and location turned on, for the proximity alerts to really work.

I am not aware of the internal working of the app but I think it would have been even more effective if it made use of GPS data as well. Let me explain.

When the app is continuously scanning the location of its users, it has a fairly accurate overview of who has been where in recent days. If a COVID-19 positive case is detected, his path can be traced and others users who have crossed through those geographic regions can be alerted though the app.

AWS Amazon Detective Moves to General Availability

Amazon Web Services has recently announced that the company’s Amazon Detective, a security service that aims to streamline the detection of security vulnerabilities across a customer’s AWS workload, has been transitioned to general availability. The Amazon Detective initial preview was originally announced in December of 2019, alongside several other new security services.

Introduction to Data Security as a Service (DSaaS)

Data Security as a Service (DSaaS) enables application and security leaders to mitigate the risk and compliance burdens for all of your organization’s sensitive data through a simple, portable, cloud-native service. This Refcard walks you through data access monitoring, access governance, and at-rest protection for sensitive PII, PHI, and PCI data.

RateSV Announces Metanet API service, MetaSV

Launched in August last year, RateSV is a financial platform on the Bitcoin SV (BSV) blockchain utilizing big data. Its goal is to provide a convenient and efficient channel for moving data to blockchains, with plans to expand to data sources outside of financials in the future. Currently, however, as the infrastructure and tools of the Metanet protocol are still being built, the RateSV team has limited its product development to tools specific to the Metanet API service. Recently, they launched Metanet API service, MetaSV.

Event Streaming and Apache Kafka in Telco Business (OSS/BSS)

Event Streaming is a hot topic in Telecommunications Industry. In the last few months, I have seen various projects leveraging Apache Kafka and its ecosystem to implement scalable real-time infrastructure in OSS and BSS scenarios. This blog post covers the reasons for this trend. Finally, we'll show a whiteboard video recording exploring the different use cases for event streaming in telcos in detail.

The Evolution of the Telecommunications Industry

The telecommunications industries within the sector of information and communication technology is made up of all telecommunications/telephone companies and internet service providers. It plays a crucial role in the evolution of mobile communications and the information society.

8 Scala Pattern Matching Tricks

You can't be a Scala programmer and say you've never used pattern matching — it is one of the most powerful Scala features. It allows one to test lots of values and conditions without nested and chained if-else expressions.

This article is for the Scala programmer who is either, a) only getting started with Scala, or b) has only used pattern matching in its basic form — as a switch-on-steroids or to deconstruct case classes.

Implement a Password Strength Meter in Angular 8

Introduction

In most applications, there is a field while registering to enter a valid password, which should contain at least a number and one special symbol. In this article, we are going to learn how to create a password strength bar that will detail the strength of a given password.

Prerequisite

  • Basic knowledge of Angular.
  • Visual Studio Code must be installed.
  • Angular CLI must be installed.
  • Node must be installed.

Step 1

Let's create a new Angular project, using the following npm command.

Little Project Fixes

While we were cleaning some house in our Projects infrastructure, we fixed a few things that we know have been annoying to some users for quite some time.

  1. You can now use .dev domains with custom domains for your Projects.
  2. Favicons will now host and display properly for deployed Projects.

Sorry that took us forever.

The post Little Project Fixes appeared first on CodePen Blog.

Things You May Not Have Considered With No-Code

I got together with some industry experts and asked them what they thought about no-code and to find out some different perspectives that you may not have considered.

What Is No-Code Anyway?

"I think that we need to define what no-code is. I also think that we need to define what programming is. My definition of programming, in this context, would be the organization of logic and data to accomplish an objective.

Implementing MuleSoft AnyPoint Platform Identity Management Using AWS Cognito Authorization Code

In the last article, we have seen how we can do client management for MuleSoft API using AWS Cognito Client Credentials. Here, we will see how we can use AWS Cognito for MuleSoft AnyPoint Platform Identity Management.

The authorization code grant is the preferred method for authorizing end users. Instead of directly providing user pool tokens to an end-user upon authentication, an authorization code is provided. This code is then sent to a custom application that can exchange it for the desired tokens. Because the tokens are never exposed directly to an end-user, they are less likely to become compromised. 

Create Custom Patterns with the Block Pattern Builder Plugin

Have I mentioned how excited I am about the potential of block patterns? For regular Tavern readers, I may sound like a broken record at this point, but I am going to continue evangelizing this upcoming feature for WordPress.

With no social plans or other important things requiring my attention this past weekend, it made for a good moment to dip my toes back into the development waters. I have not built a new plugin for public release since becoming a writer for WP Tavern six months ago. My excitement over block patterns was creating an itch that I needed to scratch. Combine that with the physical distancing we are all practicing during the current worldwide pandemic, it made for an opportune moment to throw together a plugin idea I had.

Let me introduce you to Block Pattern Builder.

When the initial API launched for block patterns in Gutenberg 7.8, it was immediately apparent how easy registering custom patterns would be for theme and plugin authors. Building a pattern was as simple as creating a unique ID, giving it a title, and pasting in the code for the blocks that make up the pattern. There is almost no coding actually involved with building patterns.

Because patterns are merely the HTML code from blocks, it meant that it was possible to utilize the block editor to create them. End-users could do this. They just need an easy way to publish their custom patterns. That’s where the Block Pattern Builder plugin comes in.

With the idea in mind, I knocked out a working prototype in an hour on Saturday afternoon. I have since cleaned the code a bit and packaged it for you all to use.

Download the plugin: You can grab the ZIP file for the plugin via GitHub and install it in the old-fashioned way. It is currently pending review for the official WordPress plugin directory. I will update the link here once it is up.

How Block Pattern Builder Works

Block Pattern Builder requires version 7.8 or later of the Gutenberg plugin to work. Eventually, perhaps in WordPress 5.5, the block pattern system will be merged directly into WordPress. For now, the latest version of the Gutenberg plugin is necessary.

After installing and activating the plugin, it adds a new admin menu item titled “Block Patterns.” From that point, creating patterns works just like creating a post or page. You simply add a new pattern by clicking the “Add New” link. You can rearrange blocks to your heart’s desire. When you have a pattern that you like, publish it.

Screenshot of creating a custom block pattern.
Creating a custom block pattern.

Once a pattern is published, it is available via the pattern sidebar in the block editor. Currently, this is a button in the top right corner of the editor. However, its location and interface are likely to change as the Gutenberg team continues developing the feature.

Screenshot of inserting a block pattern into the post editor.
Inserting a block pattern into the post editor.

That is all there is to it. It is a simple system, but it will provide an easy way to play around with the patterns feature in Gutenberg.

Notes and Ideas

Because block patterns are an evolving feature in the Gutenberg plugin, the system could break until things are a bit more settled down. The underlying API could change. However, that does not mean we cannot have a little fun in the meantime. Just keep in mind this is currently flagged as an experimental feature in Gutenberg.

If you are a plugin or theme author who wants to register your patterns within your own plugins or themes, you can make use of this plugin too. Build your custom patterns within the provided editor. Then, switch over to the code view for the block editor. You can copy the block code and register it via the Patterns API.

If you need inspiration for patterns, Gutenberg Hub’s template library has over 100 ideas to choose from. You can copy and paste those directly into the editor and save them as custom patterns with Block Pattern Builder.

Accessibility Links

Austin Gil has kicked off the first in a five-part series about “HTML Forms Right” and to starts with semantics. It’s talking to the “we build our front-ends with JavaScript” crowd. The first block of code is an example of an Ajax form submission where the data submitted is gathered through the JavaScript API FormData.

Why is that so vital? Well, no <form> tag, no FormData. Why else use a form (aside from the Enter-key submission):

“But Austin, I’m building an SPA. Therefore if the user even sees the form, it means JavaScript MUST be enabled.” And you’d be right. Although, if it is an important form, you may want to consider supporting a no-JS world. The day may come that you want to implement SSR.

Server-Side Rendering (SSR) is going to get easier and easier to do as the benefits of it become more and more obvious. Google tells us a page that is client-side rendered has week-long-ish queue to get indexed and re-indexed on changes. Not to mention SSR is almost definitely going to be far faster to load.


Oscar Braunert’s Inclusive Inputs is a nice follow-up read as it begins with form HTML that is so close to being right, but is painfully not right. (Hint: it’s missing the label/input connection). Then he gets into interesting patterns like how to accessibly mark up required fields and fields with errors. Like:

<div class="form-group">
  <label for="password">
    Password
    <span class="required" aria-hidden="true">*</span>
    <span class="sr-only">required</span>
  </label>
  <input 
    type="password"
    id="password"
    name="password"
    aria-describedby="desc_pw"
  >
  <p class="aside" id="desc_pw">Your password needs to have at least eight characters.</p>
</div>

Amber Wilson gets into Accessible HTML elements with the twist of avoiding any ARIA usage at all:

You may be aware that ARIA roles are often used with HTML elements. I haven’t written about them here, as it’s good to see how HTML written without ARIA can still be accessible.

Shout out to <dl>.


Sarah Higley does get into ARIA in Roles and relationships, but she warns us to be very careful upfront:

[…] a budding accessibility practitioner might find themselves experimenting with more serious roles like menulistbox, or even treegrid. These are tantalizing, powerful patterns that allow you to create experiences that are not supported by only vanilla HTML. Unfortunately, they are also brittle; even small mistakes in using these roles can take a user on a very bad trip.

Talk to your kids about ARIA before it’s too late.

Ideally, don’t use ARIA at all. But if the accessibility is screwed up to the point it can’t be fixed at the DOM level, Sarah gets into some tricks. For example, one uses role="presentation" to essentially remove an element’s default role (when it is in the way).


Speaking of ARIA and not using it unless you have to, one of the things you can do with ARIA is label controls. Adrian Roselli has thoughts on how best to do that:

Here is the priority I follow when assigning an accessible name to a control:

1. Native HTML techniques
2. aria-labelledby pointing at existing visible text
3. Visibly-hidden content that is still in the page
4. aria-label

The post Accessibility Links appeared first on CSS-Tricks.

typespecimens.io

If you’re looking for a new typeface for that side project of yours then here’s a great website by John D. Jameson that collects a bunch of the latest type specimen websites. Everything is on display here, from the daring and bold, to those that are a bit more professional and reserved.

Not only are there a ton of great typefaces on display and for sale, but the websites for these specimens are fantastic, too. My favorite at the moment has to this website by Grilli Type for GT America: Bright colors! Lovely illustrations! Fancy animations that aren’t annoying!

It’s a wonderful example of what’s possible with just a few colors and one big, beautiful typeface:

On that note, make sure to check out the full catalogue of fonts by Grilli Type because yikes is there a lot in there to love.

Direct Link to ArticlePermalink

The post typespecimens.io appeared first on CSS-Tricks.