Skip to content

Instantly share code, notes, and snippets.

View detkov's full-sized avatar
🤙

Nikita detkov

🤙
View GitHub Profile
@detkov
detkov / git_lfs_installation.sh
Created April 28, 2022 11:08
Git LFS installation
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install
@detkov
detkov / random_graph_generation.py
Last active November 3, 2020 14:15
These functions allow you to generate random undirected (un)weighted graph without loops with specified number of vertices (nodes) and edges. Also it has a function converting adjacency matrix to adjacency list and adjacency list to edges list. Under the hood it is optimized with the usage of numpy arrays.
import networkx as nx
import numpy as np
import matplotlib.pyplot as plt
from typing import List, Tuple, Union
def create_random_adjacency_matrix(V: int, E: int, weighted: bool = False,
min_: float = 1., max_: float = 10.) -> np.ndarray: