This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
import re | |
def translate(pat, double_star=False): | |
"""Translate a shell PATTERN to a regular expression. | |
There is no way to quote meta-characters. | |
""" | |
STAR = object() | |
DOUBLE_STAR = object() |
#Python script for having a peek in a large file | |
#Tested in python 3.11 | |
#Script character encoding: utf-8 (this is mostly important for the current place_holder for unprintables which you can replace if needed) | |
#File to open | |
filename = '/srv/storage/Artifacts/Wiki Data Dumps/enwiktionary-20200220-pages-articles-multistream.xml' | |
#Start position | |
offset = 2 << 30 # 2 gigabytes in |
gpt-3.5-turbo> How many cat powers is there to one horse power? | |
I'm sorry, but cats and horses are two different animals and it's not possible to compare their powers in a one-to-one ratio. Additionally, there are different types of "cat powers" and "horse powers" that could make the comparison even more complex. Is there anything else you need help with? | |
gpt-3.5-turbo> It is mostly for fun though. Maybe one could compare the energy consumption of a typical horse to a typical house cat? | |
Sure, we could make a comparison based on energy consumption. However, it's important to keep in mind that energy consumption doesn't necessarily translate to "power." That being said, according to the US Department of Energy, an average house cat consumes about 100 kilowatt-hours (kWh) of electricity per year. In comparison, an average horse consumes about 11,000 kilowatt-hours (kWh) of energy per year. Therefore, we could say that it takes about 110 house cats to equal the energy consumption of one horse. | |
gpt-3.5 |
import random | |
participants = ''' | |
Curie | |
Einstein | |
Faraday | |
Maxwell | |
Newton | |
Tesla |
#!/bin/bash | |
#The file system may of course change during these operations but at least the stage test is likely to prevent a half run but not guaranteed | |
#Out of laziness we may not add flags here and instead make a python script for more advanced use | |
# https://stackoverflow.com/a/33271194/19961748 | |
target=${@:$#} | |
files=${*%${!#}} | |
function stage_file { |
class dict_filter: | |
def __init__(self, key=None, value=None, key_condition=None, value_condition=None): | |
self.key = key | |
self.value = value | |
self.key_condition = key_condition | |
self.value_condition = value_condition | |
def __call__(self, source): | |
K, V, KC, VC = self.key, self.value, self.key_condition, self.value_condition |
import sys | |
def dummy_trace(frame, event, *args): | |
pass | |
class CancelExecutionException(Exception): | |
pass | |
class alternative_execution: |
_pkgname=zim | |
pkgname=${_pkgname}-git | |
pkgver=0.74.3.r41.f4c98c2c | |
pkgrel=1 | |
pkgdesc="A WYSIWYG text editor that aims at bringing the concept of a wiki to the desktop. Mikael Lövqvist's Git Version" | |
arch=(any) | |
license=('GPL' 'PerlArtistic') | |
url="http://zim-wiki.org/" | |
depends=('python') | |
conflicts=('zim') |
# Maintainer: Filipe Laíns (FFY00) <[email protected]> | |
# Contributor: Sergej Pupykin <[email protected]> | |
# Contributor: Bartłomiej Piotrowski <[email protected]> | |
# Contributor: Matthias Bauch <[email protected]> | |
# Contributor: Laszlo Papp <djszapi2 at gmail com> | |
# Contributor: Samuel Tardieu <[email protected]> | |
_features=(amtjtagaccel armjtagew buspirate ftdi gw16012 jlink oocd_trace opendous osbdm | |
parport presto_libftdi remote-bitbang rlink stlink ti-icdi ulink usbprog vsllink | |
aice cmsis-dap dummy jtag_vpi openjtag_ftdi usb-blaster-2 usb_blaster_libftdi) |