Business, cloud, JavaScript

OpenAI API – 101 Tutorial

OpenAI is a research organization focused on developing advanced artificial intelligence technology, and one way it achieves this is by making its technology available to developers through APIs. 

This blog post will explore what OpenAI API is and how to use it from Node.js – We will show a few examples you can take and combine with your current applications.
Other good examples to explore the API are at openai.com.

What is OpenAI API?

OpenAI API is a powerful tool allowing developers to access cutting-edge AI models that OpenAI researchers train. 

It’s (also) a mouthful, no?

These models can be used for various applications, including natural language processing, translation, image recognition, chatbots, etc.

The OpenAI API is designed to be easy to use, with a RESTful API that can be accessed using any programming language.
It also includes pre-built models that can be used out of the box and the ability to train custom models using your own data.

Continue reading
Advertisement
Standard
JavaScript, webdev

JavaScript Objects 101

The Object type represents one of JavaScript’s data types. It’s important stuff as we will use them—a lot.

It is used to store various keyed collections and more complex entities. Objects can be created using the Object() constructor or the object initializer / literal syntax. Did you know that all modern JavaScript utilities for working with objects are static?

Here is an example of a JavaScript object that contains two names and one key:

let obj = {
  name1: "John",
  name2: "Jane",
  key: "value"
}
Continue reading
Standard
JavaScript, webdev

RegEx 101

Regular expression or in short Regex is a string of text that lets you create patterns that help match, locate, and manage text. It’s an important tool in a wide variety of computing applications, from programming languages like JS, Java and Perl, to text processing tools like grep, sed, and vim.

Here are a few helpers to refresh your mind when you need some ‘simple’ regex to do the job.

Continue reading
Standard
cloud, JavaScript

Integrate JFrog Xray with Slack

The need to protect your software and to be updated about vulnerabilities is getting stronger. JFrog Xray is unique in its capabilities to perform analysis of all the binaries you are consuming in your project. It works with Artifactory to perform a deep analysis of binary components at any stage of the application lifecycle. Xray provides great visibility into issues lurking in components anywhere in your organization and there are many cases where you wish to get notified on a security violation (or a license breach) directly to Slack.

Getting Started

We will use Xray’s Webhooks to define our server’s and base on the policies/rules our Webhook will be notified with the alerts about violations (security or licenses).

Continue reading
Standard
cloud, JavaScript

Export Violations From JFrog Xray to CSV

The trend of #DevSecOps is growing fast and it is no longer just part of your security team. More and more organizations wish to integrate their security team in all the phases of development and operations. To achieve it, there are cases where you need to export data from JFrog Xray (in our case to a CSV format) so you can ingest it to your current logging/monitoring system. 

What is Xray?

In a nutshell, JFrog Xray works with JFrog Artifactory to perform a deep analysis of binary components at any stage of the application lifecycle. It provides full transparency that leads to more trust in your software. 

By scanning binary components and their metadata, recursively going through dependencies at any level (think on the layers you have in any Docker container), JFrog Xray provides great visibility into issues lurking in components anywhere in your organization.

Xray API

One of the best parts is that JFrog Xray is also fully automated through a rich REST API. We will use it to create this Exporter. Please feel free to clone/fork the code below and use it, but remember you might need to add pagination and a watchdog for a real system.

Continue reading
Standard
cloud, JavaScript

How To Build An Integration With JFrog Xray?

The trend of DevSecOps is not new but it’s growing fast. More and more organizations wish to integrate their security team in all the phases of development and operation. 

Many security products keep your code safe from vulnerabilities at different stages (dev, test, qa and prod). However, JFrog Xray is unique in its capabilities to perform analysis of all the binaries you are consuming in your project.

JFrog Xray works with JFrog Artifactory to perform a deep analysis of binary components at any stage of the application lifecycle. It provides full transparency that leads to (more) trust in your software. By scanning binary components and their metadata, recursively going through dependencies at any level (think on the layers you have in any Docker container), JFrog Xray provides great visibility into issues lurking in components anywhere in your organization.

One of the best parts is that JFrog Xray is also fully automated through a rich REST API that lets it integrate with a CI/CD pipeline and allows other binary analysis tools to build on its unique capabilities.

Continue reading
Standard
JavaScript, life

The Monty Hall Problem

The Monty Hall problem is a brain teaser loosely based on the American television game show “Let’s Make a Deal” and named after its original host, Monty Hall.

I wrote a little web app that show you what is the right choice with a simulator. It’s a bit hard to explain the correct solution as it’s going against ‘common’ sense. Continue reading

Standard
bots, JavaScript

Build Your First Smart Bot For Google Home

In the past few months, I heard someone smart saying that “the future is artificial intelligence first”.

Artificial intelligence, is making computers “smart” so they can think on their own and be even more helpful for us. It’s clear that Google, has been investing heavily in the areas of:

  • Machine learning – Teaching computers how to see patterns in data and act on it.
  • Speech recognition and Language understanding – Meaning, being able to understand you when you are talking with all the little differences and nuance.

These days we can see it all come together in the Google Assistant. It allows you to have a conversation with Google and be more productive. In this post, we will see how it’s all working by building a new Action for Google home. In the same time, we will have a nice bot that in the future we will integrate with many apps. Cool? Continue reading

Standard