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
# Select base image (can be ubuntu, python, shiny etc) | |
FROM python:3.11-slim | |
# Create user name and home directory variables. | |
# The variables are later used as $USER and $HOME. | |
ENV USER=username | |
ENV HOME=/home/$USER | |
# Add user to system | |
RUN useradd -m -u 1000 $USER |
FROM python:3.9-slim | |
ENV USER=nikita | |
ENV HOME=/home/$USER | |
# Add user to system | |
RUN useradd -m -u 1000 $USER | |
WORKDIR $HOME/app |
FROM python:3.9-slim | |
ENV USER=username | |
ENV HOME=/home/$USER | |
# Add user to system | |
RUN useradd -m -u 1000 $USER | |
WORKDIR $HOME/app |
# Select base image (can be ubuntu, python, shiny etc) | |
FROM python:3.11-slim | |
# Create user name and home directory variables. | |
# The variables are later used as $USER and $HOME. | |
ENV USER=username | |
ENV HOME=/home/$USER | |
# Add user to system | |
RUN useradd -m -u 1000 $USER |
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) | |