Friday, October 18, 2019

Salesforce CEO Marc Benioff Calls Facebook Addictive and Harmful

Social media is a pretty big aspect of the manner in which we interact with the world around us, but if you think about it, it hasn’t really been around for all that long. This means that the impact that social media may be having both on us as well as our children who tend to use it on quite a...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Zia Zaidi via Digital Information World

Navigation Menu Style 85

The post Navigation Menu Style 85 appeared first on Best jQuery.


by Admin via Best jQuery

Link Hover Style 86

The post Link Hover Style 86 appeared first on Best jQuery.


by Admin via Best jQuery

Yahoo Groups Coming to an End on October 28

There was a time not all that long ago where Yahoo was one of the biggest, if not the absolute biggest, internet based company in the world. In fact, Yahoo was such a big company that when Google was just starting out Yahoo was mulling over purchasing that company, something that they didn’t do and...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Zia Zaidi via Digital Information World

A Beginner’s Guide to Keras: Digit Recognition in 30 Minutes

A Beginner's Guide to Keras

Over the last decade, the use of artificial neural networks (ANNs) has increased considerably. People have used ANNs in medical diagnoses, to predict Bitcoin prices, and to create fake Obama videos! With all the buzz about deep learning and artificial neural networks, haven't you always wanted to create one for yourself? In this tutorial, we'll create a model to recognize handwritten digits.

We use the keras library for training the model in this tutorial. Keras is a high-level library in Python that is a wrapper over TensorFlow, CNTK and Theano. By default, Keras uses a TensorFlow backend by default, and we'll use the same to train our model.

Artificial Neural Networks

An artificial neural network is a mathematical model that converts a set of inputs to a set of outputs through a number of hidden layers. An ANN works with hidden layers, each of which is a transient form associated with a probability. In a typical neural network, each node of a layer takes all nodes of the previous layer as input. A model may have one or more hidden layers.

ANNs receive an input layer to transform it through hidden layers. An ANN is initialized by assigning random weights and biases to each node of the hidden layers. As the training data is fed into the model, it modifies these weights and biases using the errors generated at each step. Hence, our model "learns" the pattern when going through the training data.

Convoluted Neural Networks

In this tutorial, we're going to identify digits — which is a simple version of image classification. An image is essentially a collection of dots or pixels. A pixel can be identified through its component colors (RGB). Therefore, the input data of an image is essentially a 2D array of pixels, each representing a color.

If we were to train a regular neural network based on image data, we'd have to provide a long list of inputs, each of which would be connected to the next hidden layer. This makes the process difficult to scale up.

In a convoluted neural network (CNN), the layers are arranged in a 3D array (X-axis coordinate, Y-axis coordinate and color). Consequently, a node of the hidden layer would only be connected to a small region in the vicinity of the corresponding input layer, making the process far more efficient than a traditional neural network. CNNs, therefore, are popular when it comes to working with images and videos.

The various types of layers in a CNN are as follows:

  • convolutional layers: these run input through certain filters, which identify features in the image
  • pooling layers: these combine convolutional features, helping in feature reduction
  • flatten layers: these convert an N-dimentional layer to a 1D layer
  • classification layer: the final layer, which tells us the final result.

Let's now explore the data.

Explore MNIST Dataset

As you may have realized by now, we need labelled data to train any model. In this tutorial, we'll use the MNIST dataset of handwritten digits. This dataset is a part of the Keras package. It contains a training set of 60000 examples, and a test set of 10000 examples. We'll train the data on the training set and validate the results based on the test data. Further, we'll create an image of our own to test whether the model can correctly predict it.

First, let's import the MNIST dataset from Keras. The .load_data() method returns both the training and testing datasets:

from keras.datasets import mnist

(x_train, y_train), (x_test, y_test) = mnist.load_data()

Let's try to visualize the digits in the dataset. If you're using Jupyter notebooks, use the following magic function to show inline Matplotlib plots:

%matplotlib inline

Next, import the pyplot module from matplotlib and use the .imshow() method to display the image:

import matplotlib.pyplot as plt

image_index = 35
print(y_train[image_index])
plt.imshow(x_train[image_index], cmap='Greys')
plt.show()

The label of the image is printed and then the image is displayed.

label printed and image displayed

Let's verify the sizes of the training and testing datasets:

print(x_train.shape)
print(x_test.shape)

Notice that each image has the dimensions 28 x 28:

(60000, 28, 28)
(10000, 28, 28)

Next, we may also wish to explore the dependent variable, stored in y_train. Let's print all labels until the digit that we visualized above:

print(y_train[:image_index + 1])
[5 0 4 1 9 2 1 3 1 4 3 5 3 6 1 7 2 8 6 9 4 0 9 1 1 2 4 3 2 7 3 8 6 9 0 5]

Cleaning Data

Now that we've seen the structure of the data, let's work on it further before creating the model.

To work with the Keras API, we need to reshape each image to the format of (M x N x 1). We'll use the .reshape() method to perform this action. Finally, normalize the image data by dividing each pixel value by 255 (since RGB value can range from 0 to 255):

# save input image dimensions
img_rows, img_cols = 28, 28

x_train = x_train.reshape(x_train.shape[0], img_rows, img_cols, 1)
x_test = x_test.reshape(x_test.shape[0], img_rows, img_cols, 1)

x_train /= 255
x_test /= 255

Next, we need to convert the dependent variable in the form of integers to a binary class matrix. This can be achieved by the to_categorical() function:

from keras.utils import to_categorical
num_classes = 10

y_train = to_categorical(y_train, num_classes)
y_test = to_categorical(y_test, num_classes)

We're now ready to create the model and train it!

The post A Beginner’s Guide to Keras: Digit Recognition in 30 Minutes appeared first on SitePoint.


by Shaumik Daityari via SitePoint

New Onion Program Lets You Create Dark Web Sites

OnionShare is a program that quite a few people are familiar with. It is essentially a file hosting network that enables you to share and receive data through the dark web, something that some users prefer because of the fact that it enables them to keep their privacy more or less intact which is...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Zia Zaidi via Digital Information World

Should 'JavaScript' be rebranded?

#459 — October 18, 2019

Read on the Web

JavaScript Weekly

Should We Rebrand 'JavaScript'? — I think most of us can agree there are problems with ‘JavaScript’ as a name, but is it worth rebranding it? “JS” is certainly one option.

Kieran Potts

The Power of JSON.stringify's Extra ArgumentJSON.stringify turns JavaScript objects or values into JSON strings.. no surprises there. But did you know it has a second argument that can be used to alter elements ahead of the conversion or specify which properties of an object will get stringified?

Pawel Grzybek

Get Best in Class Error Reporting for Your JavaScript Apps — Time is money. Software bugs waste both. Save time with Bugsnag. Automatically detect and diagnose errors impacting your users. Get comprehensive diagnostic reports, know immediately which errors are worth fixing, and debug in minutes. Try it free.

Bugsnag sponsor

How Vue 3 Could Enable Faster Web Applications — The key changes coming in Vue 3 (in pre-alpha here) will make both it, and your Vue.js apps, faster, smaller, and more maintainable.

Filip Rakowski

Ionic React: A Cross Platform App Building Framework — If you’re on the lookout for an interesting alternative to React Native, consider the new React-flavored version of Ionic, a popular framework (once more associated with Angular) for building iOS, Android, and desktop apps, as well as PWA webapps.

Max Lynch

Quick bytes:

💻 Jobs

Can You Help Our Client Migrate to Node.js? Docklands, London — Do you have experience and strong opinions on Node best practices? Come and share your advice with an engaged, friendly team of excellent software engineers.

CareersJS

JavaScript Developer at X-Team (Remote) — Work with the world's leading brands, from anywhere. Travel the world while being part of the most energizing community of developers.

X-Team

Find A Job Through Vettery — Vettery specializes in tech roles and is completely free for job seekers. Create a profile to get started.

Vettery

📘 Articles & Tutorials

▶  A Thorough Introduction to NuxtJS — You’ll need over an hour set aside for this screencast, but if you want to get a grip on the popular NuxtJS Vue framework, this covers all of the major features.

Vue Screencasts

7 Tricky JavaScript Questions (or Gotchas) — These are billed as being potential ‘interview questions’, but they’re really all about edge cases or JavaScript quirks. Interesting, but if you get asked these in an interview, it might not be a great signal 😄

Dmitri Pavlutin

A Much Faster Way to Debug Code Than with Breakpoints or console.log — Wallaby catches errors in your tests and code and displays them right in your editor as you type, making your development feedback loop more productive.

Wallaby.js sponsor

Understanding this, bind, call, and apply

Tania Rascia

How to Debug JavaScript in Microsoft Edge from Visual Studio — Note: This is aimed at ‘full fat’ Visual Studio users rather than VS Code.

Visual Studio Blog

▶  A Live Coding Talk Covering Vue 3's New Composition API — Warning.. Jason sings near the end of this fun 20 minute live coding session 😄

Jason Yu

Compiling TypeScript via webpack and babel-loader

Dr. Axel Rauschmayer

Top CI Pipeline Best Practices - A Developer's Guide

Datree.io sponsor

Object preventExtension vs seal vs freeze — These are ways to enforce different degrees of immutability on objects.

Cybertec

Promises and UI States in Ember.js

Sabin Hertanu

🔧 Code & Tools

Zero: A Plain Text, Terminal-Based 3D Graphics Rendering Pipeline — Yes, this is really just a bit of fun, but is a nice example of building up a 3D rendering engine from scratch.

sinclairzx81

Firefox’s New WebSocket Inspector — The new WebSocket inspector, part of the existing Network panel UI in DevTools, will be released in Firefox 71, but is ready for use in Firefox Developer Edition now. Here’s a look at how it works.

Mozilla Hacks

Typical: Animated Typing in ~400 Bytes of JavaScript — Written in a nice, modern, async way. Here’s a CodePen demo to play with.

Cam Wiegert

Automate and Standardize JS Code Quality — Set standards on coverage, duplication, complexity, and style issues and see real-time feedback in your Git workflow.

Codacy sponsor

Swiper: A Modern Mobile Touch Slider — Complete with hardware accelerated transitions and native-like behavior. Someone’s also made Tiny Swiper, a 2KB (gzipped) compatible clone, if you want something more lightweight.

Vladimir Kharlampidi

Popper.js: A Library to Manage the Position of 'Pop Out' Page Elements — Think things like tooltips, popovers, drop-downs..

Federico Zivolo

pretty-quick: Runs Prettier on your Changed FilesPrettier is a popular code formatter.

Lucas Azzola

WebAssembly.sh: An Online WebAssembly Terminal — An online WebAssembly Terminal to run WASI modules directly on your browser.

Aaron Turner

⚡️ Quick Releases


by via JavaScript Weekly