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 foo: | |
name="string" | |
num=-1 | |
math="string2" | |
def __init__(self,name,num,math): | |
self.name=name | |
self.num=num | |
self.math=math |
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
# pip install google-api-python-client | |
# pip install oauth2client | |
# pip install pandas | |
from datetime import datetime, timedelta, date | |
from dateutil.rrule import rrule, DAILY | |
import apiclient | |
from oauth2client.service_account import ServiceAccountCredentials | |
import json | |
import pandas as pd |
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
public override void CreateNewOutputRows() | |
{ | |
// added | |
bool fireAgain = false; | |
System.Net.ServicePointManager.SecurityProtocol = | |
SecurityProtocolType.Tls12 | | |
SecurityProtocolType.Tls11 | | |
SecurityProtocolType.Tls; |
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
# Sample data of what Summary.txt looks like | |
<# | |
Overall summary: | |
Final result: Passed | |
Exit code (Decimal): 0 | |
Start time: 2021-02-26 03:03:25 | |
End time: 2021-02-26 03:04:36 | |
Requested action: Patch | |
Instance DEV2019UTF8 overall summary: |
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
USE tempdb | |
IF EXISTS (SELECT * FROM sys.schemas AS S INNER JOIN sys.tables AS T ON T.schema_id = S.schema_id WHERE S.name = 'dbo' AND T.name = 'Employee') | |
BEGIN | |
BEGIN TRY | |
ALTER TABLE dbo.Employee | |
SET (SYSTEM_VERSIONING = OFF); | |
END TRY | |
BEGIN CATCH | |
-- I don't care if system versioning is on |
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.Collections.Generic; | |
using System.Linq; | |
using System.Xml.Linq; | |
using System.Text; | |
public class Program | |
{ | |
public static void Main() | |
{ |
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
<Biml xmlns="http://schemas.varigence.com/biml.xsd"> | |
<# | |
// Given the following structure | |
///{ | |
/// "packages": [ | |
/// "p1", | |
/// "p2", | |
/// "p3" | |
/// ] | |
///} |
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
IF OBJECT_ID('tempdb..#Numbers') IS NOT NULL | |
BEGIN | |
DROP TABLE #Numbers; | |
END | |
IF OBJECT_ID('tempdb..#rush') IS NOT NULL | |
BEGIN | |
DROP TABLE #rush; | |
END |
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
IF NOT EXISTS | |
( | |
SELECT * FROM sys.partition_functions AS PF WHERE PF.name = 'PartitionRange' | |
) | |
BEGIN | |
CREATE PARTITION FUNCTION PartitionRange(bigint) AS RANGE RIGHT FOR VALUES (0, 1, 2, 3, 4, 5, 6, 7, 8, 9); | |
END | |
GO | |
IF NOT EXISTS | |
( |
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
<#@ import namespace="System.Data" #> | |
<Biml xmlns="http://schemas.varigence.com/biml.xsd"> | |
<# | |
Dictionary<string, string> namedQueries = new Dictionary<string,string>{{"Query 28", @"-- Drive level latency information (Query 28) (Drive Level Latency) | |
-- Based on code from Jimmy May | |
SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], | |
CASE | |
WHEN num_of_reads = 0 THEN 0 | |
ELSE (io_stall_read_ms/num_of_reads) | |
END AS [Read Latency], |
NewerOlder