Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
cnheider committed Feb 21, 2024
2 parents c35adb4 + cab2c2d commit f6011e8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fail_fast: true
#exclude: '^exclude'
repos:
- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.2.0
hooks:
- id: black
language_version: python3.10
Expand Down
6 changes: 3 additions & 3 deletions draugr/opencv_utilities/drawing/masks/gauss_circles.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def draw_image(a, b, theta, inner_scale, save_intermediate=False):
if save_intermediate:
show_image(
transparency,
wait=True
wait=True,
# save_path = basep/"eligrad-t.png"
)

Expand All @@ -168,7 +168,7 @@ def draw_image(a, b, theta, inner_scale, save_intermediate=False):
if save_intermediate:
show_image(
intensity,
wait=True
wait=True,
# save_path = str(basep / "eligrad-i1.png")
)

Expand All @@ -193,7 +193,7 @@ def draw_image(a, b, theta, inner_scale, save_intermediate=False):

show_image(
draw_image(a, b, theta, inner_scale, True),
wait=True
wait=True,
# save_path = str(basep/"eligrad.png")
)

Expand Down
6 changes: 3 additions & 3 deletions draugr/opencv_utilities/transformation/cv2_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ def __call__(
(int(height * ratio), int(width * ratio), depth), dtype=image.dtype
)
expand_image[..., :] = self.mean
expand_image[
int(top) : int(top + height), int(left) : int(left + width)
] = image
expand_image[int(top) : int(top + height), int(left) : int(left + width)] = (
image
)
image = expand_image

boxes = boxes.copy()
Expand Down
22 changes: 12 additions & 10 deletions draugr/os_utilities/linux_utilities/user_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ def make_user(
with ContextWrapper(
sh.contrib.sudo,
construction_kwargs=dict(
password=getpass.getpass(
prompt=f"[sudo] password for {getpass.getuser()}: "
)
if get_sudo
else None,
password=(
getpass.getpass(prompt=f"[sudo] password for {getpass.getuser()}: ")
if get_sudo
else None
),
_with=True,
),
enabled=get_sudo,
Expand Down Expand Up @@ -86,11 +86,13 @@ def remove_user(
with ContextWrapper(
sh.contrib.sudo,
construction_kwargs=dict(
password=getpass.getpass(
prompt=f"[sudo] password for {getpass.getuser()}: "
)
if get_sudo
else None,
password=(
getpass.getpass(
prompt=f"[sudo] password for {getpass.getuser()}: "
)
if get_sudo
else None
),
_with=True,
),
enabled=get_sudo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def gaussian(self, alpha):

if __name__ == "__main__":

def _main():
...
def _main(): ...

_main()
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ def __call__(self, tensor):
dtype=self.dtype,
device=self.device,
)
padded[
:, :, self.padding : -self.padding, self.padding : -self.padding
] = tensor
padded[:, :, self.padding : -self.padding, self.padding : -self.padding] = (
tensor
)
else:
padded = tensor

Expand Down

0 comments on commit f6011e8

Please sign in to comment.