Stay up to date with Machine Learning go here

GitHub

Hacker News

Medium

Reddit

Blogs

Helpful Image Commands Matlab/Octave

% Load and display an image

img = imread(‘filename.jpg’)

imshow(img)

% Image size

disp(size(img));

% Image class (data type):

disp(class(img));

% At a given location (row, col):

disp(img(50, 100));

% For an entire row:

disp(img(50, :));

plot(img(50, :));

 

% A slice of an image

img(101:103, 201:203))

 

% Crop an image

cropped = img(110:310, 10:160)

 

Color images

Note: Matlab indexes begin at 1 not 0

% Get the red layer (RGB)

img_red = img(:, :, 1);

% Get the green layer (RGB)

img_green = img(:, :, 2);

% Get the blue layer (RGB)

img_blue = img(:, :, 3);

 

Image arithmetic

% Add two images

summed = img_1 + img_2

% Average of two images

average = img_1 / 2 + img_2 / 2

% Multiply by a scalar

0.5 * img

% Blend two images

result = 0.75 * img_1 + 0.25 * img_2

% Image difference

diff = img_1 – img_2

diff = img_2 – img_1

% Absolute image difference

imabsdiff(img_1, img_2)

Alphabetical 50 US States & Abbreviations List

An online, alphabetical list of the 50 US State names, postal code (2 letter abbreviations), and AP style abbreviations is convenient to have around.  Teachers, students, business people, and developers can find this handy.  Make lists in spreadsheets, menus, arrays, drop-down lists or combination boxes.

Alphabetical 50 US States & Abbreviations

Uppercase Name Name Postal Code Abbreviation
ALABAMA Alabama AL Ala.
ALASKA Alaska AK Alaska
ARIZONA Arizona AZ Ariz.
ARKANSAS Arkansas AR Ark.
CALIFORNIA California CA Calif.
COLORADO Colorado CO Colo.
CONNECTICUT Connecticut CT Conn.
DELAWARE Delaware DE Del.
FLORIDA Florida FL Fla.
GEORGIA Georgia GA Ga.
HAWAII Hawaii HI Hawaii
IDAHO Idaho ID Idaho
ILLINOIS Illinois IL Ill.
INDIANA Indiana IN Ind.
IOWA Iowa IA Iowa
KANSAS Kansas KS Kan.
KENTUCKY Kentucky KY Ky.
LOUISIANA Louisiana LA La.
MAINE Maine ME Maine
MARYLAND Maryland MD Md.
MASSACHUSETTS Massachusetts MA Mass.
MICHIGAN Michigan MI Mich.
MINNESOTA Minnesota MN Minn.
MISSISSIPPI Mississippi MS Miss.
MISSOURI Missouri MO Mo.
MONTANA Montana MT Mont.
NEBRASKA Nebraska NE Neb.
NEVADA Nevada NV Nev.
NEW HAMPSHIRE New Hampshire NH N.H.
NEW JERSEY New Jersey NJ N.J.
NEW MEXICO New Mexico NM N.M.
NEW YORK New York NY N.Y.
NORTH CAROLINA North Carolina NC N.C.
NORTH DAKOTA North Dakota ND N.D.
OHIO Ohio OH Ohio
OKLAHOMA Oklahoma OK Okla.
OREGON Oregon OR Ore.
PENNSYLVANIA Pennsylvania PA Pa.
RHODE ISLAND Rhode Island RI R.I.
SOUTH CAROLINA South Carolina SC S.C.
SOUTH DAKOTA South Dakota SD S.D.
TENNESSEE Tennessee TN Tenn.
TEXAS Texas TX Texas
UTAH Utah UT Utah
VERMONT Vermont VT Vt.
VIRGINIA Virginia VA Va.
WASHINGTON Washington WA Wash.
WEST VIRGINIA West Virginia WV W.Va.
WISCONSIN Wisconsin WI Wis.
WYOMING Wyoming WY Wyo.

Download

creative-commons-atribution-88x31 This list is available under a Creative Commons Attribution license (CC BY 3.0)

Download “US States List” sot-us-states.csv – Downloaded 409 times – 2 KB

HS: Machine Learning Driven Programming: A New Programming for a New World

If Google were created from scratch today, much of it would be learned, not coded. Around 10% of Google’s 25,000 developers are proficient in ML; it should be 100% — Jeff Dean

Like the weather, everybody complains about programming, but nobody does anything about it. That’s changing and like an unexpected storm the change comes from an unexpected direction: Machine Learning / Deep Learning.

I know, you are tired of hearing about Deep Learning. Who isn’t by now? But programming has been stuck in a rut for a very long time and it’s time we do something about it.

Lots of silly little programming wars continue to be fought that decide nothing. Functions vs objects; this language vs that language; this public cloud vs that public cloud vs this private cloud vs that ‘fill in the blank’; REST vs unrest; this byte level encoding vs some different one; this framework vs that framework; this methodology vs that methodology; bare metal vs containers vs VMs vs unikernels; monoliths vs microservices vs nanoservices; eventually consistent vs transactional; mutable vs immutable; DevOps vs NoOps vs SysOps; scale-up vs scale-out; centralized vs decentralized; single threaded vs massively parallel; sync vs async. And so on ad infinitum.

It’s all pretty much the same shite different day. We are just creating different ways of calling functions that we humans still have to write. The real power would be in getting a machine to write the functions. And that’s what Machine Learning can do, write functions for us. Machine Learning might just might be some different kind of shite for a different day.

Read the full article: Machine Learning Driven Programming on High Scalability

TNW: Understanding the impact of AI

TL;DR Computer coding will become obsolete and we (humans) should teach our children/re-learn ourselves practical and social skills to become better humans.

Understanding the impact of AI
by Matt Webb – 7/6/16

Steam engines, telegrams and typewriters. All obsolete technologies, but well worthy of preservation in the name of engineering history and art.

Coding will join this list in time, however, where it differs wildly from the afore mentioned examples is it is unlikely to be lovingly preserved for future generations to admire, fiddle with or better still, reactivate.

Its essence will not be reified for one specific reason – it can’t be touched and humans value tactility. It’s our basic instinct. We touch immediately, both inside and outside the womb.

Read the full article on TNW

Our Final Invention: People, Quotes, Books Mentioned

our-final-invention-james-barrat
Our Final Invention
Artificial Intelligence and the End of the Human Era
by James Barrat

People

Key people mentioned in this book (alphabetical)

  • Bostrom, Nick
  • Kurzweil, Ray

Books

Other books mention in this book (alphabetical)

Quotes

Quotes used in this book

Chapter 13

“Both because of its superior planning ability and because of the technologies it could develop, it is plausible to suppose that the first superintelligence would be very powerful. Quite possibly, it would be unrivalled: it would be able to bring about almost any possi-ble outcome and to thwart any attempt to prevent the implemen-tation of its top goal. It could kill off all other agents, persuade them to change their behavior, or block their attempts at inter-ference. Even a “fettered superintelligence” that was running on an isolated computer, able to interact with the rest of the world only via text interface, might be able to break out of its confine-ment by persuading its handlers to release it. There is even some preliminary experimental evidence that this would be the case.” —Nick Bostrom, Future of Humanity Institute, Oxford University

A lot has been written that Watson works through statistical knowledge rather than “true” understanding. Many readers interpret this to mean that Watson is merely gathering statistics on word sequences. . . . One could just as easily refer to the distributed neurotransmitter concentrations in the human cortex as “statistical information.” Indeed, we resolve ambiguities in much the same way that Watson does by considering the likelihood of different interpretations of a phrase. – Ray Kurzweil

Excel Delete Blank Rows while Preserving Data

You could use Excel’s “Remove Duplicates” feature, but any duplicate data that is supposed to be there will also get blown away.

To assuredly remove blank rows without removing duplicate data (and maintaining the original order), follow these steps:

  1. Locate or insert a blank column
  2. Optionally name the column “Order” or leave it blank if there are no headers
  3. Type the number “1” in the first row of data
  4. Fill down to the last row of data
  5. Sort by an actual data field
  6. Now the blank rows will be grouped together, so delete the blank rows.
  7. Re-sort by the column of numbers from Smallest to Largest.
  8. Optionally delete the column of numbers

Need to undo this operation? Here’s how to Insert a Blank Row Between Every Row in Excel

Related how-to’s using the functions mentioned here:

Computing, technology, general information