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
def import_submodules(package, recursive=True): | |
"""Import all submodules of a module, recursively, including subpackages | |
:param package: package (name or actual module) | |
:type package: str | module | |
:rtype: dict[str, types.ModuleType] | |
""" | |
if isinstance(package, str): | |
package = importlib.import_module(package) | |
results = {} |
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
IF OBJECT_ID (N'[ts_round_base]', N'FN') IS NOT NULL | |
DROP FUNCTION ts_round_base; | |
GO | |
CREATE FUNCTION [dbo].[ts_round_base](@ts datetime, @secs_delta int) | |
RETURNS DATETIME | |
AS | |
-- ============================================= | |
-- Author: Arthur Harduim | |
-- Description: DATETIME rounding function | |
-- |
OlderNewer