Divide (distribute) the given number (n) into number (p) of parts randomly,

Related tags

Network randomsplit
Overview

Number Split Randomly

The sample code written in Go lang

Executables

This repo already have executables for Linux and windows, after clone the repo just navigate to the source the follow the steps based on your OS.

For Linux from CLI

./randomsplit

For windows run the randomsplit.exe

Run & Build

Run the application from CLI (Go must be installed on the local machine or use docker container for Go)

go run main.go

Build Commands

For native OS build

go build

For windows build from Linux

 GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc go build

Test Cases

For running test cases (test cases can be modified in the main_test.go file as per the requirements)

go test

or

go test -v

Coverage Test

go test -coverprofile=coverage.out

HTML view

go tool cover -html=coverage.out

Benchmarks

go test -bench=.

Access The CLI with Docker

docker ps

docker exec -it <go container ID> /bin/sh

You might also like...
Takes an integer array, returns the array sorted and the number of inversions in the array

Takes an integer slice, returns the slice sorted and the number of inversions in the slice

Anaximander is an ISP probing tool implementing several reduction techniques to cut down the number of probes launched in order to map an Autonomous System
Anaximander is an ISP probing tool implementing several reduction techniques to cut down the number of probes launched in order to map an Autonomous System

Anaximander is an ISP probing tool implementing several reduction techniques to cut down the number of probes launched in order to map an Autonomous System, while still keeping high discovery levels.

A little library for turning TCP connections into go channels.

netutils By Tim Henderson ([email protected]) This is a little library that was part of a larger project that I decided to pull out and make public.

turn a directory into a GUI, slash example of VNC-based GUI

dirgui @rsnous on Jan 11, 2021: "idea: filesystem-GUI adapter, where a directory turns into a form, executable files inside that directory turn into

GoReplay is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes. Deskreen turns any device with a web browser into a secondary screen for your computer
Deskreen turns any device with a web browser into a secondary screen for your computer

Deskreen Website: https://deskreen.com ▶️ Deskreen Youtube channel (video tutorials, demos, use cases for Deskreen day to day usage) Deskreen turns an

GoReplay is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes.
wire protocol for multiplexing connections or streams into a single connection, based on a subset of the SSH Connection Protocol

qmux qmux is a wire protocol for multiplexing connections or streams into a single connection. It is based on the SSH Connection Protocol, which is th

Node for providing data into Orakuru network

Orakuru's crystal-ball Node for providing data into Orakuru network. Configuration Crystal-ball uses environment variables and configuration files for

Owner
Jobin Jose
A passionate Web Developer , Interested to works on any tech that invented or yet to be invent !
Jobin Jose
[WIP] gg is a portable tool to redirect the traffic of a given program to your modern proxy without installing any other programs.

gg gg (go-graft), was inspired by graftcp. go-graft is a pure golang implementation with more useful features. TODO: Use system DNS as the fallback. R

mzz 428 Dec 28, 2022
A service to proxy requests to a given backend service.

Proxy Service A service to proxy requests to a given backend service. Go 1.17+ Clone git clone [email protected]:janu-cambrelen/proxy-service.git Run (L

Janu (Janeshwar) Cambrelen 0 Jan 5, 2022
generate Wireguard keypairs with a given prefix string

wireguard-vanity-address Generate Wireguard keypairs with a given prefix string. The Wireguard VPN uses Curve25519 keypairs, and displays the Base64-e

yinheli 1 Nov 9, 2022
Limit-order-book - Limit order books keep records of orders for a given symbol to be traded

Limit Order Book Limit order books keep records of orders for a given symbol to

Michael Bowler 0 Jan 17, 2022
Fetch-npm-package - A small utility that can be used to fetch a given version of a NPM package

Use fetch-npm-package <package> <version> <output-dir> E.g. fetch-npm-package is

Bjørn Erik Pedersen 1 May 21, 2022
iflandown runs commands after the wired LAN link is down for a given amount of time.

iflandown iflandown runs commands after the wired LAN link is down for a given amount of time. All/most linux devices should work. Tested on amd64, Ra

null 1 Mar 16, 2022
Designed to support DNS brute-forcing with a minimal number of network connections

Fast Use of DNS Resolvers Designed to support DNS brute-forcing with a minimal number of network connections. Installation go get -v -u github.com/caf

Jeff Foley 35 Dec 8, 2022
Prometheus exporter for ping metrics such as RTT, packet loss, and jitter to any number of hosts.

ping_exporter Command ping_exporter provides a Prometheus exporter for ping metrics such as RTT, packet loss, and jitter to any number of hosts. Usage

Beard Slayer 7 Sep 24, 2022
A CLI tool queries the GitHub GraphQL API for users and ranks them according to number of contributions

Project homepage Most Active GitHub Users Counter This CLI tool queries the GitHub GraphQL API for users and ranks them according to number of contrib

Mike Owino 0 Dec 6, 2021