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.Diagnostics; | |
using Microsoft.Extensions.Logging; | |
namespace MyService.Diagnostics; | |
class HttpMessageHandlerActivityOvserver : IObserver<DiagnosticListener> | |
{ | |
private readonly ILogger<HttpMessageHandlerActivityOvserver> _logger; |
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; | |
public class C1 | |
{ | |
public int Value { get; init; } | |
} | |
class C2 | |
{ | |
private readonly C1 _instance = new C1() |
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
name: release | |
on: | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+* | |
jobs: | |
release: | |
runs-on: ubuntu-latest |
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.Threading; | |
using System.Threading.Tasks; | |
namespace Makuhiki; | |
public static class Exit | |
{ | |
public static Task WaitAsync() | |
{ |
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
# EditorConfig is awesome: https://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Don't use tabs for indentation. | |
[*] | |
indent_style = space | |
charset = utf-8 | |
end_of_line = lf |
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 Microsoft.AspNetCore.Authentication; | |
using Microsoft.AspNetCore.Authentication.JwtBearer; | |
using Microsoft.IdentityModel.Tokens; | |
using System.IdentityModel.Tokens.Jwt; | |
using System.Security.Claims; | |
using System.Security.Cryptography; | |
var builder = WebApplication.CreateBuilder(args); | |
// Add services to the container. |
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
interface IClientContract | |
{ | |
Task SomeClientMethod1(string user, string message); | |
Task SomeClientMethod2(); | |
} | |
interface IHubContract | |
{ | |
Task<string> SomeHubMethod1(string user, string message); | |
Task SomeHubMethod2(); |
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 numpy as np | |
import open3d as o3d | |
points_dict = np.load("points.npz") | |
points = points_dict['points'] | |
if points.dtype == np.float16: | |
points = points.astype(np.float32) | |
points += 1e-4 * np.random.randn(*points.shape) | |
else: |
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.Runtime.CompilerServices; | |
namespace ConsoleApp2 | |
{ | |
public static class EnumerableEx | |
{ | |
public static IEnumerable<T> Create<T>(Action<IYielder<T>> create) | |
{ |
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.Diagnostics; | |
namespace GenericsSpeedTest | |
{ | |
static class Program | |
{ | |
static int BiggerInt(int i, int j) | |
{ |
NewerOlder