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 static LangChain.Chains.Chain; | |
using LangChain.Providers.OpenAI; | |
namespace XX.Backend.Services | |
{ | |
public class OpenAILanguageModelService : ILanguageModelService | |
{ | |
private readonly ILogger<OpenAILanguageModelService> _logger; | |
private readonly IConfiguration _configuration; |
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
{ | |
"kind": "discovery#restDescription", | |
"description": "Business logic for the Meetings app.", | |
"servicePath": "", | |
"rootUrl": "https://meetings.googleapis.com/", | |
"basePath": "", | |
"ownerDomain": "google.com", | |
"name": "meetings", | |
"batchPath": "batch", | |
"revision": "20181113", |
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
/* tslint:disable */ | |
export interface IOptions { | |
text: string; | |
width: number; | |
height: number; | |
colorDark: string; | |
colorLight: string; | |
correctLevel: CorrectLevel; | |
} |
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
/* tslint:disable */ | |
import { Component, Input, ElementRef, OnInit } from '@angular/core'; | |
import { CorrectLevel, QRCodeConstructor } from './qrcode.interface'; | |
import * as __QRCode from 'davidshimjs-qrcodejs'; | |
const QRCode: QRCodeConstructor = __QRCode; | |
@Component({ | |
selector: 'tide-qrcode', | |
template: '', |
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 IPayload<T> { | |
payload: T; | |
} | |
class Payload { | |
public static empty: IPayload<{}> = { payload: null } as IPayload<{}>; | |
} | |
interface IHttpTypedAction<R, S, F> { | |
request: ActionCreator<string, (props: IPayload<R>) => IPayload<R> & TypedAction<string>>; |
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
/* breakpoints */ | |
$grid-bp-xs: 0; | |
$grid-bp-sm: 576; | |
$grid-bp-md: 768; | |
$grid-bp-lg: 992; | |
$grid-bp-xl: 1200; | |
/* columns */ | |
$grid-cols: 12; |
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 { Component, OnInit } from '@angular/core'; | |
import WebSocketMessage from './WebSocketMessage'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class AppComponent implements OnInit { | |
public code: string; |
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.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; | |
using CloudSoft.MessageBus.Client; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Logging; | |
using Microsoft.Extensions.DependencyInjection; | |
using Newtonsoft.Json; |
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
static class LevenshteinDistance | |
{ | |
/// <summary> | |
/// Compute the distance between two strings. | |
/// </summary> | |
public static int Compute(string s, string t) | |
{ | |
int n = s.Length; | |
int m = t.Length; | |
int[,] d = new int[n + 1, m + 1]; |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var model = new Test() { }; | |
var validator = new Validator<Test>(); | |
var result = new Validator<Test>() | |
.AddRule(t => t.Name, new ValidatorNameRule()) | |
.Validate(model); |
NewerOlder