sudo /etc/init.d/motion stop
hostname -I
| # https://en.m.wikipedia.org/wiki/Electric_power | |
| from collections import namedtuple | |
| from typing import Tuple | |
| def electric_power(voltage: float, current: float, power: float) -> Tuple: | |
| """ | |
| This function can calculate any one of the three (voltage, current, power), | |
| fundamental value of electrical system. | |
| examples are below: |
echo "# Nice_Schedule" >> README.md git init git add README.md git commit -m "first commit" git branch -M main git remote add origin https://github.com/Komet-Kazi/.git git push -u origin main
| #!/usr/bin/env python3 | |
| ######################################################################## | |
| # Filename : ADCDevice.py | |
| # Description : Freenove ADC Module library. | |
| # Author : www.freenove.com | |
| # modification: 2020/04/21 | |
| ######################################################################## | |
| import smbus |
| # The bit position in a binary integer giving the units value, that is, determining whether the number is even or odd. | |
| # The LSB is sometimes referred to as the low-order bit or right-most bit | |
| # the most significant bit (MSB, also called the high-order bit) is the bit position in a binary number having the greatest value. | |
| # The MSB is sometimes referred to as the high-order bit or left-most bit. | |
| # "1" signifies a negative number and "0" signifies a positive number | |
| # Example: | |
| # if bite is currently b'0 0 0 0 0 0 0 1, | |
| # bite << 1 would produce: b'0 0 0 0 0 0 1 0 |
| # The MIT License (MIT) | |
| # | |
| # | |
| # 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: | |
| # |
| import os | |
| import json | |
| import sys | |
| import logging | |
| from functools import wraps | |
| def create_logger(): | |
| # create a logger object |
| # log entry and exit values of a function. | |
| # use decorator '@logger_wraps()' above function to log entry, its arguments, and its return | |
| import functools | |
| from loguru import logger | |
| def logger_wraps(*, entry=True, exit=True, level="DEBUG"): | |
| """Use decorator '@logger_wraps()' above function to log entry into function, its arguments, and its return""" | |
| def wrapper(func): |
| # split_pairs.py --> Split the string into pairs of two characters. | |
| # If the string contains an odd number of characters, then the missing second character of the final pair should be replaced with an underscore ('_'). | |
| # Input: A string. | |
| # Output: An iterable of strings. | |
| # Precondition: 0<=len(str)<=100 | |
| def split_pairs(a: str): | |
| # find length of string. check if odd. if odd append "_" to the list | |
| stringSize = len(a) |
| .grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); | |
| /* This is better for small screens, once min() is better supported */ | |
| /* grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); */ | |
| grid-gap: 1rem; | |
| /* This is the standardized property now, but has slightly less support */ | |
| /* gap: 1rem */ | |
| } | |
| .grid > div { |