Skip to content

Instantly share code, notes, and snippets.

using System.Text.RegularExpressions;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Orchestration;
using Microsoft.SemanticKernel.SkillDefinition;
using NCalc;
namespace Experiments;
// usage :
@kaza
kaza / cpuburner.ps1
Created October 13, 2022 10:27
cpu burner powershell
$NumberOfLogicalProcessors = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
ForEach ($core in 1..$NumberOfLogicalProcessors){
start-job -ScriptBlock{
$result = 1;
foreach ($loopnumber in 1..2147483647){
$result=1;
@kaza
kaza / Log4NetBlobConfigure
Created February 25, 2014 12:21
class which lets you configure log4net using blob storage, and monitors the changes of config blob
//To use this class call Log4NetBlobConfigure.ConfigureAndWatch(); in your Application.OnStart()
public class Log4NetBlobConfigure
{
private static string _lastEtag;
private static DateTimeOffset? _lastModified;
private const string ContainerName = "config";
private const string BlobUrl = "log4net.config";
private static readonly object LockInstance = new object();