Skip to content

Instantly share code, notes, and snippets.

View malinxiao's full-sized avatar

Linxiao Ma malinxiao

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
namespace Linxiao.Utility.Library.RSACryptoService
{
/// <summary>
/// A RSA helper class which wraps RSACrytoServiceProvider
WITH AggregationStep AS
(
SELECT
System.Timestamp as tumblingWindowEnd,
AVG(temperature) as avgTemperature
FROM TemperatureSensor
GROUP BY TumblingWindow(second, 5)
),
FillInMissingValuesStep AS
let
#"Filtered Dates" = List.Dates(StartDate, Duration.Days(EndDate - StartDate)+1, #duration(1, 0, 0, 0)),
#"Dates Table"= Table.FromList(#"Filtered Dates", Splitter.SplitByNothing(), {"Date"}, null, ExtraValues.Error),
#"Extract Date Path" = Table.AddColumn(#"Dates Table", "DatePathPart",each Text.From(Date.Year([Date])) & "/"
& Text.PadStart(Text.From(Date.Month([Date])),2,"0") & "/"
& Text.PadStart(Text.From(Date.Day([Date])),2,"0")),
#"Add Root Path" = Table.AddColumn(#"Extract Date Path", "RootPath",
each Text.From("adl://ninjagodem0123.azuredatalakestore.net/Samples/Demo/")),
Product Category Title =
IF (COUNT('SalesLT ProductCategory'[Product Category])=1,
VALUES('SalesLT ProductCategory'[Product Category]),
IF (COUNT('SalesLT ProductCategory'[Product Category])=
CALCULATE(COUNT('SalesLT ProductCategory'[Product Category]),
All('SalesLT ProductCategory'[Product Category])),
"All Categories Selected",
Rank by OrderQty =
VAR IsProductFiltered = ISFILTERED('Product'[Product Name])
VAR IsProductCategoryFiltered = ISFILTERED(ProductCategory[Product Category])
RETURN
IF (IsProductFiltered && IsProductCategoryFiltered,
RANKX(ALL('Product'[Product Name]), CALCULATE(SUM(SalesOrderDetail[OrderQty]))),
IF (NOT IsProductFiltered && IsProductCategoryFiltered,
RANKX(ALL(ProductCategory[Product Category]), CALCULATE(SUM(SalesOrderDetail[OrderQty]))),
BLANK()
)
library(ggplot2)
library(grid)
p <- ggplot(dataset, aes(VisionScore, ExcutionScore))
p <- p + scale_x_continuous(expand = c(0, 0), limits = c(0, 100))
p <- p + scale_y_continuous(expand = c(0, 0), limits = c(0, 100))
p <- p + labs(x="COMPLETEMENT OF VISION",y="ABILITY TO EXCUTE")
p <- p + theme(axis.title.x = element_text(hjust = 0, vjust=4, colour="darkgrey",size=10,face="bold"))