Skip to content

Instantly share code, notes, and snippets.

View aloksharma1's full-sized avatar
🏠
Working from home

Alok Sharma aloksharma1

🏠
Working from home
View GitHub Profile
@veyselerCS
veyselerCS / ReflectionComparisonTest
Last active August 1, 2023 09:13
Performance test script for setting a field with various ways c#
using System;
using System.Reflection;
using System.Reflection.Emit;
using NUnit.Framework;
using Unity.PerformanceTesting;
public class ReflectionComparisonTest
{
//Test environment
private int _warmupCount = 5;
@patharanordev
patharanordev / convert-pt-to-onnx.md
Created March 6, 2021 04:27
How-to-convert `.pt` to `.onnx` model file format.

Convert .pt to .onnx

The function using in Scaled-YOLOv4, please refer to Scaled-YOLOv4 repository.

Before start, the export script requires onnxsim, you need to install it first :

$ pip install -q onnx-simplifier

Web Api

Download Resume

make download resumable using c#

Resuming files is done by specifying the byte range of the file you would like to download using the Range HTTP header. This can be done in .NET with the HttpWebRequest.AddRange function.

For example:

@hallidev
hallidev / gist:300c50fa1bab3a44c3ee2fcb45c6eb1e
Created December 5, 2019 15:47
Emit MediatR Events to EventGrid
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MyApp.AppServices.Configuration;
using MyApp.AppServices.EventBus.Command;
using MyApp.AppServices.Model.EventGrid;
using Framework.EventBus.Command;
using Framework.Model;
@ReubenBond
ReubenBond / ILFieldBuilder.cs
Created October 12, 2016 01:58
Generating static fields on the fly in C# (for use in other codegen)
using System;
using System.Collections.Concurrent;
using System.Reflection;
using System.Reflection.Emit;
internal class ILFieldBuilder
{
private static readonly AssemblyBuilder AssemblyBuilder =
AssemblyBuilder.DefineDynamicAssembly(
new AssemblyName(nameof(ILFieldBuilder)),
@auremoser
auremoser / graph.md
Last active December 27, 2018 17:16
Parsons: Webgraphs
@martijn00
martijn00 / RecyclerViewActivity.cs
Last active March 18, 2024 22:13
Load more / endless scroll for Xamarin RecyclerView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var view = base.OnCreateView(inflater, container, savedInstanceState);
var recyclerView = view.FindViewById<RecyclerView>(Resource.Id.my_recycler_view);
if (recyclerView != null)
{
recyclerView.HasFixedSize = true;
var layoutManager = new LinearLayoutManager(Activity);
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 12, 2024 15:28 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags