Skip to content

Instantly share code, notes, and snippets.

View ashen007's full-sized avatar
🥸
Human Coder

Hewarathna A. I. ashen007

🥸
Human Coder
View GitHub Profile
@ashen007
ashen007 / main.py
Created February 26, 2023 17:30
example 1-1
import logging
from module import lib
def main():
logging.basicConfig(filename='.log', encoding='utf-8', level=logging.DEBUG)
logging.info("main is calling do_something from module")
lib.do_something()
@ashen007
ashen007 / module.py
Created February 26, 2023 17:10
module file
import logging
def do_something():
print("call this to do somthing")
logging.debug("do somthing executed.")
@ashen007
ashen007 / main.py
Created February 26, 2023 17:09
single point of execution
import logging
import module
def main():
logging.basicConfig(filename='.log', encoding='utf-8', level=logging.DEBUG)
logging.info("main is calling do_something from module")
module.do_something()
@ashen007
ashen007 / main.py
Created February 26, 2023 16:33
log into a seperate file
import logging
logging.basicConfig(filename='.log', encoding='utf-8', level=logging.DEBUG)
logging.debug("this is for debug.")
logging.info("just a piece of information.")
logging.warning("this is a warning!")
logging.error("an error has occurred")
@ashen007
ashen007 / main.py
Created February 26, 2023 15:18
simple log into terminal
import logging
logging.warning("this is a warning!")
logging.info("just a piece of information.")
@ashen007
ashen007 / README.md
Created November 24, 2020 15:38 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store