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.Globalization; | |
using System.IO.Compression; | |
using System.Text.Json; | |
using Azure.AI.OpenAI; | |
using CsvHelper; | |
using CsvHelper.Configuration; | |
using CsvHelper.Configuration.Attributes; | |
using CsvHelper.TypeConversion; | |
using Qdrant.Client; | |
using Qdrant.Client.Grpc; |
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 Elasticsearch.Net; | |
using Nest; | |
namespace Example | |
{ | |
private static void Main() | |
{ | |
var defaultIndex = "attachments"; |
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
<# | |
.Synopsis | |
Functions for working with Process monitor | |
.Link | |
https://docs.microsoft.com/en-us/sysinternals/downloads/procmon | |
#> | |
#Requires -Version 3.0 | |
New-Module -Name Procmon -Scriptblock { |
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
private static void Main() | |
{ | |
var defaultIndex = "icecreams"; | |
var settings = new ConnectionSettings(new Uri("http://localhost:9200")) | |
.DefaultIndex(defaultIndex) | |
.DisableDirectStreaming() | |
.PrettyJson() | |
.OnRequestCompleted(callDetails => | |
{ |
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
void Main() | |
{ | |
var indexName = "stackoverflow"; | |
var node = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); | |
var settings = new ConnectionSettings(node) | |
.InferMappingFor<Question>(m => m | |
.IndexName(indexName) | |
) | |
.PrettyJson() | |
.DisableDirectStreaming() |
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
<Query Kind="Program"> | |
<NuGetReference>Elasticsearch.Net</NuGetReference> | |
<NuGetReference>NEST</NuGetReference> | |
<NuGetReference>NEST.JsonNetSerializer</NuGetReference> | |
<NuGetReference>NetTopologySuite.IO.GeoJSON</NuGetReference> | |
<Namespace>Elasticsearch.Net</Namespace> | |
<Namespace>Elasticsearch.Net.Specification.CatApi</Namespace> | |
<Namespace>Nest</Namespace> | |
<Namespace>Nest.JsonNetSerializer</Namespace> | |
<Namespace>Newtonsoft.Json</Namespace> |
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
// Licensed to the Apache Software Foundation (ASF) under one | |
// or more contributor license agreements. See the NOTICE file | |
// distributed with this work for additional information | |
// regarding copyright ownership. The ASF licenses this file | |
// to you under the Apache License, Version 2.0 (the | |
// "License"); you may not use this file except in compliance | |
// with the License. You may obtain a copy of the License at | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// Unless required by applicable law or agreed to in writing, | |
// software distributed under the License is distributed on an |
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.Text; | |
using System.Threading; | |
public static class ThreadpoolStats | |
{ | |
public static string GetThreadPoolStats() | |
{ | |
ThreadPool.GetMaxThreads(out int maxWorkerThreads, out int maxIoThreads); | |
ThreadPool.GetAvailableThreads(out int freeWorkerThreads, out int freeIoThreads); |
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.Text; | |
using System.Net.NetworkInformation | |
public static class TcpStats | |
{ | |
private static int _stateLength = Enum.GetNames(typeof(TcpState)).Length; | |
private static int _longestState = Enum.GetNames(typeof(TcpState)).Max(s => s.Length); |
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
<Query Kind="Program"> | |
<Reference><RuntimeDirectory>\System.Net.Http.dll</Reference> | |
<NuGetReference>HtmlAgilityPack</NuGetReference> | |
<Namespace>HtmlAgilityPack</Namespace> | |
<Namespace>System.Net.Http</Namespace> | |
<Namespace>System.Threading.Tasks</Namespace> | |
<Namespace>System.Collections.Concurrent</Namespace> | |
</Query> | |
void Main() |
NewerOlder