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.Collections.Immutable; | |
| using AutoFixture.Kernel; | |
| public class ImmutableListSpecimenBuilder : ISpecimenBuilder | |
| { | |
| public object Create(object request, ISpecimenContext context) | |
| { | |
| if (context == null) | |
| { | |
| throw new ArgumentNullException(nameof(context)); |
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
| [extend] | |
| useDefault = true | |
| [allowlist] | |
| description = "Fake secrets" | |
| regexTarget = "match" | |
| regexes = [ | |
| "6a654835c594485b8980ba2c73af6f18" | |
| ] |
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
| resource natGateway 'Microsoft.Network/natGateways@2023-11-01' = if (hasNatGateway) { | |
| name: natGatewayName | |
| location: location | |
| sku: { | |
| name: 'Standard' | |
| } | |
| } | |
| resource subnets 'Microsoft.Network/virtualNetworks/subnets@2022-11-01' = { | |
| name: name |
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
| sudo apt install nvidia-cuda-toolkit | |
| wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
| bash Miniconda3-latest-Linux-x86_64.sh | |
| pip install bitsandbytes | |
| git clone --recursive https://github.com/magic-quill/MagicQuill.git | |
| cd MagicQuill | |
| wget -O models.zip "https://hkustconnect-my.sharepoint.com/:u:/g/personal/zliucz_connect_ust_hk/EWlGF0WfawJIrJ1Hn85_-3gB0MtwImAnYeWXuleVQcukMg?e=Gcjugg&download=1" | |
| unzip models.zip |
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
| options.RetryCount, retryAttempt => TimeSpan.FromMilliseconds(options.RetryDelayMilliseconds * Math.Pow(2, retryAttempt-1)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.Collections; | |
| using System.Collections.Immutable; | |
| using System.ComponentModel; | |
| using System.Reactive.Subjects; | |
| using CSharpFunctionalExtensions; | |
| namespace Example; | |
| public sealed class ChangeErrorsSubject : ISubject<ImmutableList<PropertyDataError>>, INotifyDataErrorInfo, IDisposable | |
| { |
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
| # Ref: https://stackoverflow.com/a/67392622/23266117 | |
| locals { | |
| input = file("./sample.txt") | |
| map = { | |
| food = "Sushi" | |
| name = "Data_sniffer" | |
| } | |
| out = join("\n", [ |
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 static class FormatExtensions | |
| { | |
| public static string Int32ToString(int a) | |
| { | |
| const int radix = 10; | |
| const int maxLength = 11; | |
| Span<char> str = stackalloc char[maxLength]; | |
| int i = str.Length; | |
| bool isNegative = a < 0; |
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
| # Global | |
| [includeIf "gitdir/i:C:/Users/<user>/Source/repos/github/<user>/"] | |
| path = C:/Users/<user>/Source/repos/github/<user>/.gitconfig | |
| [includeIf "gitdir/i:~/Source/repos/github/<user>/"] | |
| path = ~/Source/repos/github/<user>/.gitconfig | |
| # Path | |
| [user] | |
| email = <email> |