<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8211560\x26blogName\x3dTech+Tips,+Tricks+%26+Trivia\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://mvark.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://mvark.blogspot.com/\x26vt\x3d-5147029996388199615', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tech Tips, Tricks & Trivia

by 'Anil' Radhakrishna
An architect's notes, experiments, discoveries and annotated bookmarks.

Search from over a hundred HOW TO articles, Tips and Tricks

This Week I Learned - Week #258

Friday, March 16, 2018
This Week I Learned -

Azure SQL Database Managed Instance, a new deployment option in SQL Database that streamlines the migration of SQL Server workloads to a fully managed database service. This new Managed Instance deployment option provides full SQL Server engine compatibility and native virtual network (VNET) support.

* Azure Hybrid Benefit for SQL Server is a benefit exclusive to Azure that enables you to use your SQL Server licenses with Software Assurance to pay a reduced rate on Managed Instance.

* Microsoft recommends using general-purpose v2 storage accounts over Blob storage accounts for most scenarios. General-purpose v1 (GPv1) accounts provide access to all Azure Storage services, but may not have the latest features or the lowest per gigabyte pricing. For example, cool storage and archive storage are not supported in GPv1. Pricing is lower for GPv1 transactions, so workloads with high churn or high read rates may benefit from this account type. Blob storage accounts support all the same block blob features as GPv2, but are limited to supporting only block blobs. Pricing is broadly similar to pricing for general-purpose v2 accounts.

* Where you sit has mattered for years at Facebook. The company's ad group traditionally sat far away from Mr. Zuckerberg. But after Facebook went public and started a big push for revenue, important members of the ad team moved next to the boss, said García Martínez, who wrote a book about his experiences inside Facebook, "Chaos Monkeys: Obscene Fortune and Random Failure in Silicon Valley"...at Facebook, the A.I. lab is no longer side by side with Mr. Zuckerberg because it also grew too large - NY Times

A latchkey kid or latchkey child is a child who returns from school to an empty home, or a child who is often left at home with little parental supervision, because their parent or parents are away at work. The term latchkey kid became commonplace to describe members of Generation X, who according to a 2004 marketing study, “went through its all-important, formative years as one of the least parented, least nurtured generations in U.S. history.” Latchkey kids were prevalent during this time, a result of increased divorce rates and increased maternal participation in the workforce, at a time before childcare options outside the home were widely available. These latchkey children, referred to as "day orphans" in the 1984 documentary, To Save Our Children to Save Our Schools, came predominately from middle or upper-class homes. The higher the educational attainment of the parents, the higher the odds the children of this time would be latchkey kids. Positive effects of being a latchkey child include independence and self-reliance at a young age - Wikipedia

* Taoists don't believe in God at all. They believe in a principle of harmony

Labels: , ,

Options for running Containers in Azure

Wednesday, March 14, 2018
Options for running Containers in Azure:

  1. Azure Container Service: Scale and orchestrate containers using Kubernetes, DC/OS or Docker Swarm
  2. Azure Container Instances: Easily run containers on Azure with a single command
  3. Azure Service Fabric: Develop microservices and orchestrate containers on Windows or Linux
  4. Web Apps for Containers: Deploy web applications on Linux using containers
  5. Azure Batch: Run Linux container workloads - samples on GitHub showing how to integrate Docker with Azure Batch

Further reading:

Labels: , , , , , ,

This Week I Learned - Week #257

Saturday, March 10, 2018
This Week I Learned -

Virtual network peering enables you to seamlessly connect two Azure virtual networks. Once peered, the virtual networks appear as one, for connectivity purposes. The traffic between virtual machines in the peered virtual networks is routed through the Microsoft backbone infrastructure, much like traffic is routed between virtual machines in the same virtual network, through private IP addresses only.

ASM (Azure Service Management) aka classic VNets can be peered with ARM (Azure Resource Manager) VNets. However they must both be in the same subscription. ARM VNets within different subscriptions can be linked. ASM (Azure Service Management) to ASM (Azure Service Management) VNets cannot be peered. Each VNet peer must reside within the same region. VNet peering does not use a virtual network gateway unlike a VNet-to-VNet VPN. Virtual machines can communicate across the peering at the speed of their full NIC potential. Global Peering, like VNET Peering, is billed based on ingress and egress data transfer. However, the pricing differs based on the zone the region is in.

Traffic Analytics (currently in public preview) analyzes NSG Flow Logs across Azure regions and equips you with actionable information to optimize workload performance, secure applications and data, audit your organization’s network activity and stay compliant.

You can now run containerized applications on Service Fabric for both Windows Server and Linux (currently Ubuntu 16.04 for the Linux clusters is supported)

Azure Data Architecture Guide intends to help readers select the right data architecture or data pipeline for your scenario, and then select the Azure services and technologies that best fit your requirements.

Azure security best practices and patterns, all at one place

* Google provides its TensorFlow application programming interfaces, or APIs, to a pilot project with the Department of Defense to help automatically identify objects in unclassified data. The feature is part of a recent Pentagon contract involving Google’s cloud unit, which is trying to wrest more government spending from cloud-computing leaders Amazon.com Inc. and Microsoft Corp. - Bloomberg

* Investors and analysts say China's unabashed fervor for collecting such data, combined with its huge population, could eventually give its artificial intelligence companies an edge over American ones - NY Times

With the flick of a switch, a handful of tech giants can change the nature and extent of mankind’s ingestion of information.

Pattern Recognition is a novel by science fiction writer William Gibson published in 2003 whose central theme involves the examination of the human desire to detect patterns or meaning and the risks of finding patterns in meaningless data.

* The crude oil industry that had suffered through $54 per barrel oil on average in 2017. But with oil producers in North America expanding output, prices are likely to remain volatile. U.S., one of the world’s largest net importers for decades, could become the world’s largest oil producer in 2018, surpassing Saudi Arabia and Russia. Transportation accounts for the majority of the world’s oil demand, and as long as oil prices stay way below their 2008 peak crude oil price of $145 per barrel, there’s less economic urgency to switch to electric vehicles and hybrids, even in China and Europe where there has been governmental support to move away from internal combustion cars - HBR

* The I-T department had till February 10 issued refunds to the tune of Rs 1.42 trillion. Over 41.9 million I-T returns were processed and refunds were issued to 16.2 million taxpayers till February 10. Typically, the I-T department gives priority to small taxpayers who claim refunds below Rs 50,000. Official data suggest of all the refunds issued so far in this fiscal year, 90 per cent were to small taxpayers and the salaried class.

* Tax fraud - The first information report (FIR), registered by the CBI in Bengaluru on February 27, suspects the role of sections of I-T officials posted at  Centralised Processing Centre (CPC) and Infosys executives at CPC in the refund fraud. According to an investigation between April 2017 and March 2018, as many as 447 companies had failed to deposit the TDS collected from their respective employees with the taxman. Sources told The Times of India that these firms had instead diverted the money to further their own business interests, often as working capital. For instance, a leading politically-connected builder had thus diverted Rs 100 crore while an MNC providing IT solutions had failed to deposit Rs 11 crore... the I-T department has unearthed a giant fraud in multiple cities, where government employees allegedly claimed huge tax refunds forging documents, inflating expenses and not revealing complete information. Since the I-T department is still investigating the matter, the loss to the department could not be ascertained, but it could go up to over Rs 10 billion, sources said.

* Initially, three states namely Assam, Nagaland and Jammu & Kashmir were accorded Special Category Status [PDF link] and later on eight other states were also given special category status namely: Arunachal Pradesh, Manipur, Meghalaya, Mizoram, Uttarakhand, Tripura, Himachal Pradesh, and Sikkim and thus the list is now increased to 11. Article 370 of the Indian Constitution is a 'temporary provision' which grants special autonomous status to Jammu & Kashmir due to which no law enacted by the Parliament of India, except for those in the field of defence, communication and foreign policy, will be extendable in Jammu and Kashmir.

* All India Pincode Directory, maintained by Ministry of Communications, Department of Posts, contains all the Postal Index Number (PIN) codes across India

Labels: , , ,

HOW TO scan images in a web page & analyze them with Microsoft Cognitive Services Face API with PowerShell

Tuesday, March 06, 2018
Head to this sample PowerShell script by Rob Sewell published in the PowerShell Gallery

The code for the Get-SpeakerFace function to get the face attributes using the Microsoft Cognitive Services Face API is customized to get the face attributes of  images from a webpage whose URL is hard-coded. With minor tweaks, the same sample can be used to work scan images in any web page & analyze them Face API

Some observations & findings from my experience running the script -
If you're trying PowerShell ISE on a computer for the first time, use Run as Administrator option &  type this or variations of it into your PowerShell window before you execute the function -
Set-ExecutionPolicy RemoteSigned

You can choose to direct the output to a CSV file -
Get-SpeakerFace | Export-csv -path  C:\PS\results.csv

You can choose to specify the access key required to utilize the Face API as an environment variable as in the sample -
$apiKey = $Env:MS_Faces_Key
or provide it directly through the code -
$apiKey = "key_generated_through_Azure_Portal"
$headers = @{ "Ocp-Apim-Subscription-Key" = $apiKey }

It may take up to 10 minutes for the newly (re)generated keys to take effect. If you encounter the error "Access denied due to invalid subscription key. Make sure you are subscribed to an
API you are trying to call and provide the right key." after running the function, you know the key has not taken effect.

Un-comment this line if you are using the free tier of the API which allows 20 transactions per minute and 30K calls free per month. No SLA is provided for the free tier. Usage is throttled if the transaction limit is reached on the free tier.
Start-Sleep -Seconds 4
With the Face API – Standard tier, you can make up to 10 calls per second. You may upgrade to a higher tier at any time. The billing rate and included quantities corresponding to the higher tier will begin immediately.

The face attributes were not returned for 7 of the 71 images in the output of the sample

Labels: , ,

This Week I Learned - Week #256

Friday, March 02, 2018
This Week I Learned -

Azure Container Service (ACS) and Azure Service Fabric (ASF) sit on top of VM Scale Set (VMSS).

* Google's Machine Learning Crash Course is a self-study guide for aspiring machine learning practitioners

Microsoft Compliance Manager Preview is a dashboard that provides a summary of your data protection and compliance stature and recommendations to improve data protection and compliance. This is a recommendation, it is up to you to evaluate its effectiveness in your regulatory environment prior to implementation. Recommendations from Compliance Manager Preview should not be interpreted as a guarantee of compliance.

* MSDN Subscription offers a 3 month subscription to DataCamp, 6 month subscription to Pluralsight, LinkedIn Learning and also 1 year on-demand training on Opsgility

* Microsoft is offering for free the ebook version of Azure Serverless Computing Cookbook

* Horizon Cloud on Microsoft Azure is a multi-tenant service that supports the delivery of RDS-Hosted applications and desktops. Horizon Cloud management console can be used to manage remote desktops, apps and users on Microsoft Azure in one place - Horizon Cloud on Microsoft Azure FAQ

* Len Bosack and Sandy Lerner used personal credit cards[75] to start Cisco Systems. Larry Page and Sergey Brin's start up of Google was financed by credit cards to buy the necessary computers and office equipment, more specifically "a terabyte of hard disks" - Wikipedia

Static electricity "refers to the build-up of electric charge on the surface of objects"—essentially, when electrons move from one surface to another through contact. If the surfaces are both insulators (rubber soles of your shoes, wool or nylon carpet, wool sweaters, dry air), they'll build up an electrical charge. One object will have a positive charge (because it lost electrons) and one will have a negative charge (because it gained electrons). If one of the charged objects then touches a conductor, like a piece of metal, the charge will neutralize itself, causing a static shock. To prevent static electricity shocks, de-static your home with a Humidifier make the air a bit less dry by keeping it above 30% relative humidity, though 40% or 50% would be even better. Try going for cotton socks over wool socks & use synthetic fabrics, like polyester which conduct electricity well. Opt for leather-soled shoes instead of rubber soled shoes. An anti-static wristband can keep the user grounded.  Always keep some piece of metal on your person, whether it’s a coin, a thimble, or a keychain.

* Changes in BRCA1 and BRCA2 genes result in cancers in women around the world. In contrast, mutations in other genes like TP53 and PALB2 in Indian populations are also associated with ovary and breast cancers - ToI

* Chickenpox, also known as varicella, is a highly contagious airborne disease which is often more severe in adults than in children. Because chickenpox is usually more severe in adults than it is in children, some parents deliberately expose their children to the virus, sometimes by taking them to "chickenpox parties". Doctors counter that children are safer getting the vaccine, which is a weakened form of the virus, rather than getting the disease, which can be fatal.

* Studies have shown that exposure to sarcasm enhances creative problem solving, for instance. Children understand and use sarcasm by the time they get to kindergarten. An inability to understand sarcasm may be an early warning sign of brain disease. Scientists who have monitored the electrical activity of the brains of test subjects exposed to sarcastic statements have found that brains have to work harder to understand sarcasm. That extra work may make our brains sharper. Sarcasm “appears to stimulate complex thinking and to attenuate the otherwise negative effects of anger”. The Greek root for sarcasm, sarkazein, means to tear flesh like dogs. - Smithsonian

Any calories consumed that aren’t burned off are converted into triglycerides. These fats help insulate the body, supply and store energy, and transport fat-soluble vitamins. Here’s where it gets a little complicated: there’s evidence to suggest that when a person has high triglyceride levels in combination with increased low density lipoproteins (LDL) and decreased high density lipoproteins (HDL), they’re at an increased risk for serious conditions such as heart disease, heart attack, and stroke - Go Ask Alice!

* Some people produce more of certain chemicals in their skin and a few of those chemicals, like lactic acid, attract mosquitoes. Mosquitoes use CO2 as their primary means of identifying bite targets. There's also evidence that one blood type (O) attracts mosquitoes more than others (A or B) - Time

Only female mosquitoes bite and feed on the blood of humans or warm-blooded animals. If a mosquito finds enough victims to bite and avoids being squashed, it can live as long as three weeks. During that time, it may lay up to five clutches of more than 100 eggs each

The business model of the news media has moved away from hard reporting and toward punditry and opinion.

* Cognizant’s employee strength in India fell by 8,000 in 2017 to a total of 1,80,000, according to the company’s latest filing with the US SEC - Times of India

* All the content on StoryWeaver, an initiative from Pratham Books, is openly licensed under Creative Commons. Their latest "open source" book is on Anna Mani, an Indian physicist and meteorologist. It's beautifully illustrated by Priya Kuriyan

* "Even the niche in India is bigger than most countries" - Reed Hastings, Netflix CEO

Labels: , , , ,