Skip to content

Instantly share code, notes, and snippets.

View divyang4481's full-sized avatar

Divyang Panchasara divyang4481

View GitHub Profile
@divyang4481
divyang4481 / visualstudio2019Key.txt
Last active November 15, 2020 12:54
Visual Studio 2019 Product Key
Visual Studio 2019 Product Key
[Please Star this gist]
Follow My GitHub Account --> https://github.com/ch-kashif @ch-kashif
**Follow Me On Instagram -->> https://www.instagram.com/ch.kashif602/ **
Lets do a code together
Join Cloud Disk repository --> https://github.com/ch-kashif/CloudDisk
@divyang4481
divyang4481 / generic_host-vs-spring_boot.md
Created July 2, 2020 14:17 — forked from Lakritzator/generic_host-vs-spring_boot.md
A comparison between Javas Spring-Boot and the Generic Host of dotnet core

This is work in progress

I read about the .NET Generic Host for the first time in a Tweet of David Fowler. And I was hooked by the idea, it was just what I was looking for.

I like modules making things small but fit together like pieces of a puzzle, if possible being able to reuse them. I started refactoring Greenshot over a year ago, and was making modules out of the spaghetti code that it was. Trying to extract the modules into their own nuget packages, making them more generic and testable. I glued them together with some code I wrote, which is availble in Dapplo.Addons, but I knew that this was just a journey, until I found something that is a better with more potential.

I found the following description: _The purpose of Generic Host is to enable a wider array of host scenarios. Messaging, backg

@ForNeVeR
ForNeVeR / InterfaceMaps.cs
Last active April 27, 2022 16:17
Shows how interface maps work for implicit and explicit interface implementations in C#.
using System;
using System.Reflection;
public interface ITest
{
void TestFun(int arg);
}
public class TestClass : ITest
{
@Kir-Antipov
Kir-Antipov / Other.cs
Created February 19, 2019 08:57
Get object's pointer
object obj = new List<int> { 1, 2, 3 };
TypedReference trObj = __makeref(obj);
IntPtr ptrObj = **(IntPtr**)&trObj;
@Wavefarer42
Wavefarer42 / docker-compose.yml
Created January 22, 2019 10:04
MongoDB Charts (docker-compose)
version: "3.3"
services:
mongo:
image: mongo:4.1.1
restart: on-failure
command: --wiredTigerCacheSizeGB 3
ports:
# Charts db is available under port 27018 to not block the default mongo port
- "8082:8081"
@CMCDragonkai
CMCDragonkai / storage_tiers.md
Last active January 8, 2024 16:48
Storage Tiers

Storage Tiers

  1. Block Devices
  2. Filesystems
  3. Object Storage
  4. Application Domain

Block Devices

At the bottom we have block devices supplied by HDDs and SSDs. These use a protocol like SCSI or ATA or SAS or SATA.

@CMCDragonkai
CMCDragonkai / population_variance_stddev_sample_variance_stddev.md
Last active September 7, 2019 07:33
Population Variance/Stddev vs Sample Variance/Stddev #python

Population Variance/Stddev vs Sample Variance/Stddev

According to: http://vortex.ihrc.fiu.edu/MET4570/members/Lectures/Lect05/m10divideby_nminus1.pdf the reason why we use n - 1 is because that ensures that the average of all sample variances of every combination of sample (with replacement) of a population is equal to the population variance!

import random
import numpy as np

def calculate_variance(population):
@CMCDragonkai
CMCDragonkai / multi_input_multi_output_unix_processes.md
Created December 14, 2018 05:28
Multi-input and Multi-output Unix Processes #cli

Multi-input and Multi-output Unix Processes

When writing a multi-input and/or multi-output process. Use this style:

process --foo=foo --bar=bar --output-foo=output_foo --output-bar=output_bar

To represent STDIN or STDOUT you can optionally use -.

@CMCDragonkai
CMCDragonkai / stress_testing_tools.md
Last active December 27, 2018 05:59
Stress Testing Tools #cli #linux

Stress Testing Tools

  • iperf - For network bandwidth
  • owamp - For one-way latency
  • fio - For filesystem testing
  • stress-ng - For memory testing, CPU testing
  • dnsperf - Testing DNS
  • tc from iproute2 - For simulating network behaviours
  • tsung - Distributed Application Protocol Load Generator
  • ostinato - Packet Generator
@CMCDragonkai
CMCDragonkai / convolution_correlation_deep_learning.md
Last active November 13, 2019 22:47
Convolution and Correlation in Deep Learning, Tensorflow and Theano #python #tensorflow

Convolution and Correlation in Deep Learning, Tensorflow and Theano

Convolution in deep learning works by applying a kernel (a small matrix) to a larger input matrix. You slide this kernel on the input matrix from the top left to the bottom right. You perform element-wise multiplication on each slide (where the sliding distance is the stride length), then you sum all the multplications into a single number. This number is then put in the output matrix.

Strictly speaking, convolution requires the kernel to be flipped horizontally and vertically (transposed). The reason to do this is to acquire the commutative property of convolution. However this is not required in deep learning frameworks or neural network implementations because as a human you don't interpret the kernel.