Skip to content

Commit

Permalink
52
Browse files Browse the repository at this point in the history
  • Loading branch information
TreshMom committed Feb 19, 2024
1 parent 23d21e5 commit a7eb749
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/code_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,4 @@ jobs:
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -r requirements.txt
python -m pip list
# Install pre-commit from .pre-commit-config.yaml
- name: Install pre-commit
run: |
pre-commit install
# Run pre-commit on all the files in the repo
- name: Run pre-commit
run: |
pre-commit run --all-files --color always --verbose --show-diff-on-failure
python -m pip list
18 changes: 17 additions & 1 deletion project/__main__.py
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
print("exec sources directory")
import cfpq_data
import networkx as nx
import random
import matplotlib.pyplot as plt

n = 3 # количество вершин
p = 0.3 # вероятность соединения вершин

random_graph = nx.erdos_renyi_graph(n, p)
print(random_graph.nodes())
print(random_graph.edges())
print(random_graph.number_of_nodes())
'''
fig, ax = plt.subplots() # создать фигуру и оси
nx.draw(random_graph, with_labels=True, ax=ax) # сделать рисунок на указанных осях
plt.show() # показать граф
'''

0 comments on commit a7eb749

Please sign in to comment.