Skip to content

Instantly share code, notes, and snippets.

View pavanmanideep's full-sized avatar
🏠
Based out of Singapore

Pavan Mani Deep Y pavanmanideep

🏠
Based out of Singapore
View GitHub Profile
UpdateContext({AIReplyResponse:Environment.AIReply({Text:AIInput.Text})})
var request = new OrganizationRequest("AIClassify")
{
["AllowMultipleCategories"] = false,
["Categories"] = titles,
["Text"] = classifyText
};
var result = service.Execute(request);
@pavanmanideep
pavanmanideep / No Entitlements available
Created April 27, 2024 23:01
Dataverse AI Functions Error
{
"operationStatus": "Error",
"error": {
"type": "Error",
"code": "EntitlementNotAvailable",
"innerErrors": [
{
"scope": "Generic",
"target": null,
"code": "QuotaExceeded",
{
"orderId": "ORD123456",
"customerName": "John Doe",
"orderDate": "2024-04-27T08:30:00Z",
"items": [
{
"itemId": "ITEM001",
"itemName": "Product A",
"quantity": 2,
"unitPrice": 25.99
@pavanmanideep
pavanmanideep / UpdateMultipleSample.cs
Created April 6, 2024 22:10
Bulk Operation Messages Sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Crm.Sdk;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
namespace Plugin_Sample
@pavanmanideep
pavanmanideep / NA
Created February 28, 2024 13:04
DAX Expression to calculate sales in last 7 days
Sales in last 7 days =
CALCULATE (
DISTINCTCOUNT ( new_sales[id] ),
FILTER (
new_sales,
DATEDIFF ( new_sales[new_saledate] + TIME ( 8, 0, 0 ), TODAY (), DAY ) <= 9
&& NOT ( ISBLANK ( new_sales[new_saledate] ) )
)
) + 0
@pavanmanideep
pavanmanideep / Violin Plot Python Code.py
Last active February 24, 2024 12:59
This piece of code requires necessary libraries to be installed.
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
# dataset = pandas.DataFrame(Sales, Country)
# dataset = dataset.drop_duplicates()
# Paste or type your script code here:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# Set the aesthetic style of the plots
MyRegion = LookUp(
Regions,
Region = MyParamRegion
);
MyFacility = LookUp(
FacilitiesList,
Id = GUID(Param("FacilityID")
);
@pavanmanideep
pavanmanideep / PowerFx Without Named Formulas
Last active December 19, 2023 13:18
Without Named Formulas
ClearCollect(
MySplashSelectionsCollection,
{
MySystemCol: First(
Filter(
Regions,
Region = MyParamRegion
)
).System.'System Name',
MyRegionCol: First(
@pavanmanideep
pavanmanideep / Encrypt csv file using GnuPG from C# using command line
Created November 18, 2023 07:38
File encryption using gpg command line script
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace eHintsBatchDecryptionTest
{
class Program