Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaeladuta committed Nov 21, 2024
1 parent b1d417c commit d0ba9d7
Show file tree
Hide file tree
Showing 4 changed files with 259 additions and 88 deletions.
4 changes: 2 additions & 2 deletions l2gv2/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import numpy as np
import numba

from local2global_embedding.network import TGraph, NPGraph
from local2global_embedding import progress
from l2gv2.network import TGraph, NPGraph
from l2gv2 import progress


def distributed_clustering(graph: TGraph, beta, rounds=None, patience=3, min_samples=2):
Expand Down
38 changes: 38 additions & 0 deletions l2gv2/progress.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright (c) 2021. Lucas G. S. Jeub
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
""" TODO: module docstring for progress. """
from tqdm.auto import tqdm


def reset(total):
""" TODO: docstring for reset"""
global pbar
pbar = tqdm(total=total)


def update(iterations):
""" TODO: docstring for update"""
pbar.update(iterations)


def close():
""" TODO: docstring for close"""
pbar.update(pbar.total - pbar.n)
pbar.close()
Loading

0 comments on commit d0ba9d7

Please sign in to comment.