This file contains hidden or 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 pandas as pd | |
| from datasets import Dataset | |
| from transformers import AutoTokenizer, AutoModelForCausalLM, TrainingArguments, Trainer, DataCollatorForLanguageModeling | |
| import torch | |
| # Step 1: Load and prepare the data | |
| df = pd.read_csv('test-data.csv') | |
| def combine_text(row): | |
| return "Input: Pochta bo'limi: {0}\nOutput: Manzil: {1}, Xizmat: {2}, Yangi Indeks: {3}, Eski Indeks: {4}".format( |
This file contains hidden or 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 Domain.Brokers; | |
| using Domain.Constants; | |
| using Domain.Exceptions.Request; | |
| using Force.DeepCloner; | |
| using Microsoft.AspNetCore.Http; | |
| namespace Infrastructure.Common.RequestContexts.Brokers; | |
| /// <summary> | |
| /// Provides client context information for the current request. |
This file contains hidden or 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: Build & Test Backend for Production, Publish Release Version | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/**' | |
| env: |
This file contains hidden or 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: Build & Test Backend for Development, Publish PreRelease Version | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| paths: | |
| - 'src/**' | |
| env: |
This file contains hidden or 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: Build & Test Backend for Development, Publish PreRelease Version | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| paths: | |
| - 'src/**' | |
| env: |
This file contains hidden or 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
| var test = AccertifyTransactionActionCode.REJECT; | |
| var assemblies = Assembly.GetExecutingAssembly() | |
| .GetReferencedAssemblies() | |
| .Select(Assembly.Load) | |
| .Append(Assembly.GetExecutingAssembly()) | |
| .ToList(); | |
| var duplicateTypes = assemblies | |
| .SelectMany(assembly => assembly.GetTypes()) |
This file contains hidden or 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
| /// <summary> | |
| /// Records all registered settings types | |
| /// </summary> | |
| internal static WebApplicationBuilder RecordRegisteredSettingsTypes(this WebApplicationBuilder builder) | |
| { | |
| // Get registered option types | |
| if (builder.Environment.IsDevelopment()) | |
| { | |
| _registeredDependencyOptionTypes = Assemblies | |
| .SelectMany(assembly => assembly |
This file contains hidden or 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
| public class ListEqualityComparer<T> : IEqualityComparer<List<T>> | |
| { | |
| public bool Equals(List<T> x, List<T> y) | |
| { | |
| if (ReferenceEquals(x, y)) return true; | |
| if (ReferenceEquals(x, null)) return false; | |
| if (ReferenceEquals(y, null)) return false; | |
| if (x.GetType() != y.GetType()) return false; | |
| if (x.Capacity != y.Capacity || x.Count != y.Count) return false; |
This file contains hidden or 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
| namespace Cerulean.Core.Extensions; | |
| /// <summary> | |
| /// Provides methods for relfection related operations | |
| /// </summary> | |
| public static class ReflectionExtensions | |
| { | |
| /// <summary> | |
| /// Determines whether type A is child of type B | |
| /// </summary> |
This file contains hidden or 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; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| public class InMemoryQueryProvider<T> : IQueryProvider | |
| { | |
| private readonly IEnumerable<T> _collection; |
NewerOlder