Implementing a basic plugin architecture shouldn't be a complicated task. The solution described here is working but you still have to import every plugin (inheriting from the base class).
This is my solution:
$ tree
from concurrent.futures import ThreadPoolExecutor, as_completed | |
import json | |
import urllib.request | |
with open('webapp.json', encoding='utf-8') as f: | |
config = json.loads(f.read()) | |
URLS = [ | |
'http://localhost:%d/?ident=%d' % (config['port'], ident) | |
for ident in range(1, 1001) |
# Install latest version nvidia-docker2 on PopOS 22.04 | |
## PopOS does not take the latest upstream NVIDIA Container runtime which is needed to run the container | |
## Run the below steps | |
### Add a new preference entry in /etc/apt/preferences.d/pop-default-settings | |
Package: * | |
Pin: origin nvidia.github.io | |
Pin-Priority: 1002 |
#!/bin/bash | |
set -e | |
sudo apt-get -y install libsecret-1-0 libsecret-1-dev libglib2.0-dev | |
sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret | |
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret |
sudo apt update | |
sudo add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt install nvidia-driver-535-server | |
sudo apt install linux-modules-nvidia-535-server-generic | |
sudo apt-cache policy linux-modules-nvidia-535-server-$(uname -r) | |
sudo apt install linux-modules-nvidia-535-server-generic | |
sudo reboot | |
sudo apt update | |
sudo lsmod | grep nouveau | |
sudo lsmod | grep nvidia |
Implementing a basic plugin architecture shouldn't be a complicated task. The solution described here is working but you still have to import every plugin (inheriting from the base class).
This is my solution:
$ tree
nats: encountered error | |
Traceback (most recent call last): | |
File "/root/.local/lib/python3.10/site-packages/nats/aio/client.py", line 1301, in _select_next_server | |
await self._transport.connect( | |
File "/root/.local/lib/python3.10/site-packages/nats/aio/transport.py", line 118, in connect | |
r, w = await asyncio.wait_for( | |
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 445, in wait_for | |
return fut.result() | |
File "/usr/local/lib/python3.10/asyncio/streams.py", line 48, in open_connection | |
transport, _ = await loop.create_connection( |
from pathlib import Path | |
text = Path(text_filepath).read_text() | |
image_data = Path(binary_filepath).read_bytes() |
from pprint import pprint | |
import numpy as np | |
import pandas as pd | |
def fill_first_base_price_of_above_one_window(df, indices): | |
df["window_base_price"].at[indices[-1]] = df["base_price"].at[indices[0]] | |
import warnings | |
def view_connectome(adjacency_matrix, | |
node_coords, | |
edge_threshold=None, | |
edge_cmap=cm.cyan_orange, | |
symmetric_cmap=True, | |
linewidth=6., | |
node_size=3., |
# each library should be imported in a separate line and arranged alphabetically. | |
import csv | |
import glob | |
import hashlib | |
import os | |
# replace with file location | |
r''' | |
path = r'/mnt/chromeos/MyFiles/Downloads/CSVs/' | |
files = glob.glob(path + r"/*.csv") |