Wednesday, October 4, 2017

#310: Essential Image Optimization for the Web

Frontend Focus
Issue 310 — October 4, 2017
A free ebook on modern image optimization techniques. Formats, decoders, techniques for efficient compression and more are covered.
Addy Osmani

CSS Grid is such a different way of approaching Web layout that a variety of questions often pop up, some of which are answered here.
Rachel Andrew

A look at how the Accessibility Object Model may help custom elements with semantics.
Rob Dodson

Get up and running in a hurry with the Vue.js JavaScript framework. Learn how to build and maintain complex applications quickly and efficiently in this practical guide to Vue.js by Sarah Drasner.
Frontend Masters   Sponsor

A good explainer of the key concepts for responsive images, and an overview of a few different responsive image tactics.
Marc Drummond

The Web Platform Working Group has published a W3C Recommendation of HTML 5.1 2nd Edition.
W3C

Dudley Storey gets into why you should be using Scalable Vector Graphics (SVG) and how you can easily integrate them into your site in a variety of ways.
Heart Internet

Jobs

In Brief

Everything You Ever Wanted to Know About Secure HTML Forms tutorial
Randall Degges

Using SVG clip-path to Change A Logo's Color On Scroll tutorial
Eduardo Bouças

Implementing a Collapsible Widget with Pure CSS tutorial
Alligator.io

VoiceOver, Safari and `list-style-type: none` tutorial
A fix for when VoiceOver doesn’t play nice when reading out unordered lists from Safari.
Unfettered Thoughts

How to Write Better CSS with the BEM Naming Convention tutorial
Raymon Schouwenaar

2017 Video Developer Report - Free Download 
Get the 24 page report on current video technology usage and planned usage for 2018.
Bitmovin  Sponsor

How 18F Created A Large-Scale Design System for the US Government story
Maya Benari

eBay’s Font Loading Strategy story
The considerations and strategy behind eBay’s switch to using a custom font.
Senthil Padmanabhan

Microsoft Edge Extensions, One Year Later story
Microsoft Edge Team

What You Need to Know About Variable Fonts opinion
An interview with Tim Brown and Bram Stein of Adobe Typekit.
Ulrik Hogrebe

How CSS Grid Went From Idea to Reality video
Microsoft

Embedding a CMS anywhere you want, with any framework 
A CMS that works on any website and any platform. It’s simple to install & easy for your whole team to use.
Component IO  Sponsor

Stripe Elements: Build Beautiful, Smart Checkout Flows tools
Pre-built UI components for creating ‘pixel-perfect’ checkout flows across desktop and mobile.
Stripe

CSS Grid Layout + Firefox = ❤️ code
A detailed walk-through on learning CSS Grid layout.
Mozilla

SentinelJS: Detect New DOM Nodes using CSS Selectors code
Andres Morey

a11y-dialog: A Very Lightweight and Flexible Accessible Modal Dialog code
Edenspiekermann

A Comic Book Style Layout Example with CSS Grid and 'clip-path' demo code
Ren Aysha


by via Frontend Focus

An internet security expert tells us the scariest thing about webcam hacking [video]

Mikko Hypponen, a cyber security expert told Business Insider: "Once you gain access to somebody’s system it’s trivial to turn on the webcam and record whatever they’re doing, or to just turn on the microphone and record whatever is being spoken around the infected laptop.

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

by Web Desk via Digital Information World

Pandas: The Swiss Army Knife for Your Data, Part 2

This is part two of a two-part tutorial about Pandas, the amazing Python data analytics toolkit. 

In part one, we covered the basic data types of Pandas: the series and the data frame. We imported and exported data, selected subsets of data, worked with metadata, and sorted the data. 

In this part, we'll continue our journey and deal with missing data, data manipulation, data merging, data grouping, time series, and plotting.

Dealing With Missing Values

One of the strongest points of pandas is its handling of missing values. It will not just crash and burn in the presence of missing data. When data is missing, pandas replaces it with numpy's np.nan (not a number), and it doesn't participate in any computation.

Let's reindex our data frame, adding more rows and columns, but without any new data. To make it interesting, we'll populate some values.

Note that df.index.append() returns a new index and doesn't modify the existing index. Also, df.reindex() returns a new data frame that I assign back to the df variable.

At this point, our data frame has six rows. The last row is all NaNs, and all other rows except the third and the fourth have NaN in the "c" column. What can you do with missing data? Here are options:

  • Keep it (but it will not participate in computations).
  • Drop it (the result of the computation will not contain the missing data).
  • Replace it with a default value.

If you just want to check if you have missing data in your data frame, use the isnull() method. This returns a boolean mask of your dataframe, which is True for missing values and False elsewhere.

Manipulating Your Data

When you have a data frame, you often need to perform operations on the data. Let's start with a new data frame that has four rows and three columns of random integers between 1 and 9 (inclusive).

Now, you can start working on the data. Let's sum up all the columns and assign the result to the last row, and then sum all the rows (dimension 1) and assign to the last column:

You can also perform operations on the entire data frame. Here is an example of subtracting 3 from each and every cell:

For total control, you can apply arbitrary functions:

Merging Data

Another common scenario when working with data frames is combining and merging data frames (and series) together. Pandas, as usual, gives you different options. Let's create another data frame and explore the various options.

Concat

When using pd.concat, pandas simply concatenates all the rows of the provided parts in order. There is no alignment of indexes. See in the following example how duplicate index values are created:

You can also concatenate columns by using the axis=1 argument:

Note that because the first data frame (I used only two rows) didn't have as many rows, the missing values were automatically populated with NaNs, which changed those column types from int to float.

It's possible to concatenate any number of data frames in one call.

Merge

The merge function behaves in a similar way to SQL join. It merges all the columns from rows that have similar keys. Note that it operates on two data frames only:

Append

The data frame's append() method is a little shortcut. It functionally behaves like concat(), but saves some key strokes.

Grouping Your Data

Here is a data frame that contains the members and ages of two families: the Smiths and the Joneses. You can use the groupby() method to group data by last name and find information at the family level like the sum of ages and the mean age:

Time Series

A lot of important data is time series data. Pandas has strong support for time series data starting with data ranges, going through localization and time conversion, and all the way to sophisticated frequency-based resampling.

The date_range() function can generate sequences of datetimes. Here is an example of generating a six-week period starting on 1 January 2017 using the UTC time zone.

Adding a timestamp to your data frames, either as data column or as the index, is great for organizing and grouping your data by time. It also allows resampling. Here is an example of resampling every minute data as five-minute aggregations.

Plotting

Pandas supports plotting with matplotlib. Make sure it's installed: pip install matplotlib. To generate a plot, you can call the plot() of a series or a data frame. There are many options to control the plot, but the defaults work for simple visualization purposes. Here is how to generate a line graph and save it to a PDF file.

Note that on macOS, Python must be installed as a framework for plotting with Pandas.

Conclusion

Pandas is a very broad data analytics framework. It has a simple object model with the concepts of series and data frame and a wealth of built-in functionality. You can compose and mix pandas functions and your own algorithms. 

Additionally, don’t hesitate to see what we have available for sale and for study in the marketplace, and don't hesitate to ask any questions and provide your valuable feedback using the feed below.

Data importing and exporting in pandas are very extensive too and ensure that you can integrate it easily into existing systems. If you're doing any data processing in Python, pandas belongs in your toolbox.


by Gigi Sayfan via Envato Tuts+ Code

#178: Cross-Platform App Dev Tools Compared

Mobile Dev Weekly October 4, 2017   #178
Holly Schinsky recommends
Cross-Platform Mobile App Development Tools Compared — Summaries and pros and cons of Cordova, Phonegap, Ionic, Framework 7, Weex, React Native, NativeScript, Flutter, Jasonette, and Manifold.
Stanley Idesis
Brian Rinaldi recommends
CSS Grid Gotchas And Stumbling Blocks — CSS Grid is such a different way of approaching Web layout that a variety of questions often pop up, some of which are answered here.
Rachel Andrew
Sponsored
2017 Video Developer Report - Free Download — 78% of video developers encode for HLS (56% for DASH) - The majority of developers plan to use HEVC in 2018 - Cloud encoding 45% more popular in US than Europe. Get the full 24 page report.
Bitmovin

Holly Schinsky recommends
Using Preact as a React Alternative — Ahmed Bouchefra takes a look at Preact, a lightweight version of React with a growing community that’s well suited to high-performance apps and slow 2G networks.
Ahmed Bouchefra
Brian Rinaldi recommends
How to Use iOS 11 Safari's Feature Flags — iOS 11 lets you enable a variety of ‘experimental features’ for the Safari browser, including Web Animations support and support for display: contents.
Robin Rendle
Brian Rinaldi recommends
Walmart Labs Open Sources Its Tool for Bringing React Native to Existing Mobile Apps
Frederic Lardinois
Brian Rinaldi recommends
'safe-area-inset' Values on iOS 11 — safe-area-inset prevents your site from being covered by the iPhone X notch, but it may misfire whenever the user zooms in.
Peter-Paul Koch
Holly Schinsky recommends
Creating Mobile Web Apps with Framework7 and Marionette.js
Luiz Américo Pereira Câmara
Holly Schinsky recommends
8 Reasons to Develop A Progressive Web App — What makes PWAs so attractive and why should you be using them?
Ian Naylor
Sponsored
Database Performance Monitoring Buyer’s Guide — This guide is designed to aid when evaluating database monitoring solutions for your unique environment.
VividCortex

Brian Rinaldi recommends
Node.js for Mobile Apps: Full-Fledged Node for Android and iOS — Free and open source, offers a Node execution environment running in a background thread inside your app.
Alexis Campailla
Chris Brandrick recommends
Weex: A Framework for Building Mobile Cross-Platform UIs — You write Vue.js-style code using JavaScript, but it’s native ‘under the hood’.
Apache Software Foundation
Brian Rinaldi recommends
Size Limit: Make The Web Lighter — Size Limit is an npm-based tool to warn you about JavaScript libraries’ bloat (which can be especially important on mobile).
Andy Barnov and Andrey Sitnik


by via Mobile Dev Weekly

Plant22

Colorful One Pager with loads of charisma promoting a co-working space in Amsterdam called Plant22.

Full Review | Direct Link


by Rob Hope @robhope via One Page Love

How to Rapidly Create Branded Graphics to Promote Your Content

Do you need promotional graphics for your content? Looking for a tool to easily add your logo to your graphics? In this article, you’ll discover how to quickly create consistently branded graphics for multiple social media channels at one time. #1: Sign Up With RelayThat To get started with RelayThat, sign up for a free [...]

This post How to Rapidly Create Branded Graphics to Promote Your Content first appeared on .
- Your Guide to the Social Media Jungle


by Orana Velarde via

4 Tips for Spotting a Fake News Story

The year 2016 was newsworthy, to say the least. An unprecedented American election, Brexit, earthquakes, and outbreaks all contributed to some of the most compelling news in recent memory. But mixed in with all the fair, factual, and well-researched reporting was something more sinister: Fake...

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

by Web Desk via Digital Information World