Optional: Project logo/image.
One to three sentence description of project.
Optional: GIF demoing functionality of project
--- | |
orphan: true | |
myst: | |
substitutions: | |
reuse_key: "This is **included** text." | |
advanced_reuse_key: "This is a substitution that includes a code block: | |
``` | |
code block | |
```" | |
--- |
##@ Build | |
.PHONY: build | |
build: ## Build project | |
# Where targets related to building the project - e.g. compiling, preprocessing, snapping, etc. - should go. | |
##@ Lint | |
# Where targets related to linting the project source code should go. |
# Works with builtin types and classes. Does not support type checking with annotations. | |
# If you are using types composed with the `typing` module, a more advanced validator should be used | |
def assert_type(*typed_args, **typed_kwargs): | |
"""Check the type of args and kwargs passed to a function/method.""" | |
def decorator(func: Callable): | |
sig = inspect.signature(func) | |
bound_types = sig.bind_partial(*typed_args, **typed_kwargs).arguments | |
@functools.wraps(func) |
# Copyright 2023 Jason C. Nucciarone | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
So, you have the situation where you need to pack a newer charm that uses the latest and greatest bells and whistles
Python provides, but the default Python on CentOS 7 (Python 3.6 to be exact) is too old? This quick guide will tell you
how to get a CentOS 7 packer instance up and running using libvirt/kvm
packing charms before you know it.
Originally I was going to use a CentOS 7 virtual machine with LXD, but it was having consistent connectivity issues. Even though the virtual machine had an IP address, lxc was incapable of reaching. Also, the virtual machine struggled to connect to the internet after it was first started, requiring an IP address to be manually assigned with
dhclient -v
#!/usr/bin/env python3 | |
# Copyright 2023 Jason C. Nucciarone | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
#!/usr/bin/env python3 | |
"""Abstractions that wrap the slurmdb configuration file.""" | |
import logging | |
import pathlib | |
import re | |
from collections import deque | |
from datetime import datetime | |
from enum import Enum |
#!/usr/bin/env python3 | |
"""Filter None out of a dictionary with nested data structures.""" | |
from typing import Dict | |
def filterdict(dirty: Dict) -> Dict: | |
"""Filter `None` values out of a dictionary. |
# sudo snap install pypi-server | |
# cat << EOF > /etc/systemd/system/pypiserver.service <This file> EOF | |
# systemctl enable pypiserver | |
[Unit] | |
Description=A minimal PyPI server for use with pip/easy_install. | |
After=network.target | |
[Service] | |
Type=simple |