This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# optionally clone the project from github | |
git clone https://github.com/PrateekKumarSingh/AzViz.git | |
Set-Location .\AzViz\ | |
# import the powershell module | |
Import-Module .\AzViz.psm1 -Verbose | |
# login to azure, this is required for module to work | |
Connect-AzAccount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install from powershell gallery | |
Install-Module AzViz -Verbose -Scope CurrentUser -Force | |
# import the module | |
Import-Module AzViz -Verbose | |
# login to azure, this is required for module to work | |
Connect-AzAccount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
# YouTube video searching API | |
from apiclient.discovery import build | |
from apiclient.errors import HttpError | |
from oauth2client.tools import argparser | |
# Downloading YouTube videos | |
import pafy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# value type variable | |
$valueVar = 0 | |
# reference type variable | |
$referenceVar = [ref]0 | |
function increment { | |
$valueVar++ # increment value type variable | |
$referenceVar.Value++ # increment reference type variable | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Book | |
{ | |
public string Name = ""; | |
public string Author = ""; | |
} | |
Book X = new Book(); | |
X.Name = "Harry Potter"; | |
X.Author = "J. K. Rowling"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int x = 5; | |
// value type variables copies the value | |
int y = x; | |
// changing the value of 'y' doesn't change the value of 'x' | |
y = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
url = "https://keytodatascience.com/games" | |
browser = webdriver.Chrome() | |
def capture_matrix(): | |
h = {} | |
for i in range(0,25): | |
element = browser.find_element_by_id(i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Management.Automation; | |
namespace ReadSecurely | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// this doesn't works | |
PowerShell ps = PowerShell.Create(); | |
var pass = ps.AddCommand("Read-Host").AddParameter("AsSecureString").Invoke(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Management.Automation; | |
namespace app { | |
class Program { | |
static void Main(string[] args) { | |
Console.Write ("Enter your password: "); | |
var password = string.Empty; | |
ConsoleKey key; | |
do { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace app | |
{ | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine("Hello World!"); | |
} | |
} |
NewerOlder