npm update -g updates all global packages and their dependencies, see npm/npm#6247.
- Either use the shell script or windows batch here instead.
| import importlib | |
| module = importlib.import_module('my_package.my_module') | |
| my_class = getattr(module, 'MyClass') | |
| my_instance = my_class() |
npm update -g updates all global packages and their dependencies, see npm/npm#6247.
FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.
| error with tf hdinsight | |
| azurerm_hdinsight_hadoop_cluster.hdpcluster: Still destroying... [id=/subscriptions/b00a4572-2115-4d17-a2e5-....HDInsight/clusters/scicoriahdicluster, 40s elapsed] | |
| azurerm_hdinsight_hadoop_cluster.hdpcluster: Still destroying... [id=/subscriptions/b00a4572-2115-4d17-a2e5-....HDInsight/clusters/scicoriahdicluster, 50s elapsed] | |
| azurerm_hdinsight_hadoop_cluster.hdpcluster: Still destroying... [id=/subscriptions/b00a4572-2115-4d17-a2e5-....HDInsight/clusters/scicoriahdicluster, 1m0s elapsed] | |
| azurerm_hdinsight_hadoop_cluster.hdpcluster: Destruction complete after 1m2s | |
| Destroy complete! Resources: 1 destroyed. | |
| data.azurerm_resource_group.hdpcluster: Refreshing state... |
| package com.test; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class MergeSort<T extends Comparable<T>> { | |
| public void sort(List<T> values){ | |
| mergeSort(0, values.size() - 1, values, new ArrayList<T>(values)); | |
| } |
| const { createServer } = require('http'); | |
| createServer((req, res) => { | |
| res.writeHead(200, { | |
| Connection: 'Transfer-Encoding', | |
| 'Content-Type': 'text/html; charset=utf-8', | |
| 'Transfer-Encoding': 'chunked' | |
| }); | |
| res.write(` |
| $userPath = $env:USERPROFILE | |
| $pathExclusions = New-Object System.Collections.ArrayList | |
| $processExclusions = New-Object System.Collections.ArrayList | |
| $pathExclusions.Add('C:\Windows\Microsoft.NET') > $null | |
| $pathExclusions.Add('C:\Windows\assembly') > $null | |
| $pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null | |
| $pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null | |
| $pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null | |
| $pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio 14.0') > $null |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import scipy.stats as scs | |
| def z_val(sig_level=0.05, two_tailed=True): | |
| """Returns the z value for a given significance level""" | |
| z_dist = scs.norm() | |
| if two_tailed: | |
| sig_level = sig_level/2 | |
| area = 1 - sig_level |
from https://www.insidethemicrosoftcloud.com/create-new-vm-on-existing-subnet-with-azure-cli/
If you want to attach a VM to an existing subnet, you need to pass the subnet ID to the –subnet parameter. Begin by retrieving the ID of the existing subnet and assign to a variable.
In this sample, the subnet is named ‘default’, and represented by the –name parameter, and SUBNETID is the name of the variable.
export SUBNETID=$(az network vnet subnet show /
--resource-group 'MyRG' --name default /
--vnet-name 'Existing-VNET' --query id -o tsv)