I created a file using stlite and streamlit-ketcher
Unfortunately, it is not working, and I don't have time right now to figure out why. Just going to leave it here for now
I created a file using stlite and streamlit-ketcher
Unfortunately, it is not working, and I don't have time right now to figure out why. Just going to leave it here for now
This small example shows how to use Ketcher and PyScript.
The process is the following: Ketcher is a JavaScript app, that has js API. PyScript allows us call this api inside of browser.
In order to setup Ketcher and PyScript on your local machine do the following:
pyketch
;cd
into it;[flake8] | |
max-line-length = 120 | |
inline-quotes = " | |
multiline-quotes = " | |
ignore = E203,W503 |
У тебя спина белая)) |
import json | |
import pandas as pd | |
from collections import Counter | |
def get_logs(paths): | |
logs = [] | |
for path in paths: | |
df = pd.read_csv(path) | |
for line in df.iterrows(): | |
logs.append(json.loads(line[1][1])) | |
return logs |
class OneQPriority(OneQ): | |
def __init__(self, config, priority=None): | |
self.priority = priority | |
super().__init__(config) | |
def start_task(self, **kwargs): | |
kwargs["priority"] = kwargs.get("priority", self.priority) | |
super().start_task(**kwargs) | |
Как говорится на главной странице Было ли вам когда-то лениво конфигурировать логгер и потому вы использовали print
? У меня было так не раз. И используя loguru у вас нет причин не начинать сразу логировать.
В какой-то степени ниже будет пересказ README loguru, так что мб есть смысл почитать его. Но тут я добавляю немного сравнения со стандартными логгингом, пытаясь повторить в нем то, что умеет loguru.
Мне кажется, что коротко преимущества loguru описывает их оглавление: