This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torch.nn import Conv2d | |
@torch.no_grad() | |
def fuse_normalize_into_conv_2d(conv: Conv2d, mean: torch.Tensor, std: torch.Tensor) -> Conv2d: | |
""" | |
Fuse normalization statistics into a convolutional layer. | |
Args: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Structures for real-time plot rendering using OpenCV.""" | |
import cv2 | |
import numpy as np | |
from matplotlib import pyplot as plt | |
class Plot: | |
"""A base structure for real-time plot rendering using OpenCV.""" | |
def __init__(self, title: str, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""A python method wrapper to enforce static typing.""" | |
import typing | |
from functools import wraps | |
import inspect | |
def static_type(function): | |
""" | |
Wrap a method with a guard condition to statically type input variables. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear control | |
clear mod1 | |
keycode 37 = Alt_L Meta_L | |
keycode 64 = Control_L | |
keycode 105 = Alt_R | |
keycode 108 = Control_R | |
add control = Control_L Control_R | |
add mod1 = Alt_L Meta_L |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Functions for working with remote files using pandas and paramiko (SFTP/SSH).""" | |
import pandas as pd | |
import paramiko | |
def read_csv_sftp(hostname: str, username: str, remotepath: str, *args, **kwargs) -> pd.DataFrame: | |
""" | |
Read a file from a remote host using SFTP over SSH. | |
Args: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Methods for working with files and remote hosts using SFTP.""" | |
import paramiko | |
def sftp_get(hostname: str, username: str, remotepath: str, localpath: str): | |
""" | |
Read a file from a remote host using SFTP over SSH. | |
Args: | |
hostname: the remote host to read the file from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Methods for converting color spaces for hue devices. | |
Reference: https://developers.meethue.com/develop/application-design-guidance/color-conversion-formulas-rgb-to-xy-and-back/ | |
""" | |
from numba import jit | |
@jit(nopython=True) | |
def correct_xyz2rgb_gamma(channel): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Music" | |
-- get the selection | |
set theSongs to selection | |
end tell | |
-- setup the progress bar | |
set theSongCount to length of theSongs | |
set progress total steps to theSongCount | |
set progress completed steps to 0 | |
set progress description to "Refreshing Songs..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Yamaha AV Receiver – Dark Mode */ | |
.gr__receiver_local, | |
.gr__receiver_local body, | |
.gr__receiver_local div, | |
.gr__receiver_local span, | |
.gr__receiver_local font, | |
.gr__receiver_local h1, | |
.gr__receiver_local h2, | |
.gr__receiver_local h3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
EMBY THEME : spotipi | |
# Table of Contents | |
1. ACCENT COLORS | |
1.1 Buttons | |
1.1.1 Checkboxes | |
1.1.2 Rectangles | |
1.1.3 Links & Text buttons |
NewerOlder