Skip to content

Instantly share code, notes, and snippets.

@facundobatista
facundobatista / gist:25f3124465b8b2cad9d9cec359de5d88
Created November 28, 2024 17:39
azure-cli installation with pip
14:35:43|facundo@trifon:~/temp$ python3 -m venv testaz
14:35:47|facundo@trifon:~/temp$ source testaz/bin/activate
(testaz) 14:35:51|facundo@trifon:~/temp$ pip install azure-cli
Collecting azure-cli
Using cached azure_cli-2.67.0-py3-none-any.whl.metadata (8.4 kB)
Collecting antlr4-python3-runtime~=4.13.1 (from azure-cli)
Using cached antlr4_python3_runtime-4.13.2-py3-none-any.whl.metadata (304 bytes)
Collecting azure-appconfiguration~=1.7.0 (from azure-cli)
Using cached azure_appconfiguration-1.7.1-py3-none-any.whl.metadata (27 kB)
Collecting azure-batch~=14.2.0 (from azure-cli)
@facundobatista
facundobatista / gist:618aeb8765b69b73d4428ab2355f3d93
Created November 28, 2024 17:30
Installing azure-cli with uv
This file has been truncated, but you can view the full file.
14:27:58|facundo@trifon:~$ uv clean
Clearing cache at: .cache/uv
Removed 66485 files (509.3MiB)
14:28:01|facundo@trifon:~$
14:28:04|facundo@trifon:~$
14:28:04|facundo@trifon:~$ uv --verbose tool run --from azure-cli az --version
DEBUG uv 0.5.5
DEBUG Searching for default Python interpreter in managed installations or search path
DEBUG Searching for managed installations at `.local/share/uv/python`
DEBUG Found `cpython-3.12.3-linux-x86_64-gnu` at `/usr/bin/python3` (search path)
## set up a Focal machine, installed charmcraft, node and unzip
facundo@antorcha:~$ lxc launch ubuntu:20.04 test-weirdsubproc
Creating test-weirdsubproc
Starting test-weirdsubproc
facundo@antorcha:~$ lxc exec test-weirdsubproc -- /bin/bash
root@test-weirdsubproc:~# snap install charmcraft --classic
charmcraft 1.2.1 from Canonical✓ installed
root@test-weirdsubproc:~# snap install node --classic --channel 12/stable
node (12/stable) 12.22.7 from OpenJS Foundation (iojs✓) installed
================================== FAILURES ===================================
______________________________ test_create_venv _______________________________
tmp_path = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_create_venv0')
def test_create_venv(tmp_path):
"""Test to show that venv.create doesn't work in Github Actions."""
import venv
> venv.create(str(tmp_path), with_pip=True)

Using charmcraft to build, upload and release charms

Through this tutorial we'll see the whole process of publishing a charm: building it, uploading it to the store, and releasing it.

For simplicity we start by having a ready-to-build charm. If you want to start from a previous step, please check this other tutorial on how to build a charm using modern tools.

FIXME: build the structure, remember to include a version.txt file!!!!! FIXME: show the structure!!!

Let's do it!

Using charmcraft to build, upload and release charms

Through this tutorial we'll see the whole process of publishing a charm: building it, uploading it to the store, and releasing it.

For simplicity we start by having a ready-to-build charm. If you want to start from a previous step, please check this other tutorial on how to build a charm using modern tools.

$ ll
total 16
-rw-rw-r-- 1 facundo facundo  180 jul 23 13:27 metadata.yaml
@facundobatista
facundobatista / gist:74619d7c91de6b6a3c3c6facf56148a1
Created July 23, 2020 12:40
Using charmcraft to build, upload and release charms
# Using charmcraft to build, upload and release charms
Through this tutorial we'll see the whole process of publishing a charm: building it, uploading it to the store, and releasing it.
For simplicity we start by having a ready-to-build charm. If you want to start from a previous step, please check this other tutorial on [how to build a charm using modern tools](https://discourse.juju.is/t/how-to-build-a-charm-using-modern-tools/3246).
FIXME: build the structure, remember to include a version.txt file!!!!!
FIXME: show the structure!!!
## Let's do it!
*** fades *** 2020-04-21 23:17:51,968 fades INFO Hi! This is fades 8.1, automatically managing your dependencies
*** fades *** 2020-04-21 23:17:51,968 fades DEBUG Running Python sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0) on 'Linux-4.15.0-96-generic-x86_64-with-Ubuntu-18.04-bionic'
*** fades *** 2020-04-21 23:17:51,968 fades DEBUG Starting fades v. 8.1
*** fades *** 2020-04-21 23:17:51,969 fades DEBUG Arguments: Namespace(check_updates=False, child_options=[], child_program=None, clean_unused_venvs=None, dependency=['requests'], executable=False, get_venv_dir=True, ipython=False, no_precheck_availability=False, pip_options=[], python=None, python_options=[], quiet=False, remove=None, requirement=None, system_site_packages=False, verbose=True, version=False, virtualenv_options=[])
*** fades *** 2020-04-21 23:17:51,970 fades.helpers DEBUG Using last resort base dir: ~/.fades
*** fades *** 2020-04-
#--------------------- game.py
#--------------------- header.py
instrucciones = [
"You are the memory allocator: your job is to place code segments in RAM",
"Place the segments before the user loses her patience",
"Use space or right click to rotate memory segments",
"The score will increase as you optimize the space by making rectangular areas",
"When a segment is not yet optimized you can still move it",
"You get higher scores if your areas are more 'square'",
"When a memory segment is no longer needed it will be released by the GC",
*** fades *** 2020-01-23 12:18:05,735 fades INFO Hi! This is fades 8.1, automatically managing your dependencies
*** fades *** 2020-01-23 12:18:05,735 fades DEBUG Running Python sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0) on 'Linux-4.15.0-72-generic-x86_64-with-neon-18.04-bionic'
*** fades *** 2020-01-23 12:18:05,735 fades DEBUG Starting fades v. 8.1
*** fades *** 2020-01-23 12:18:05,736 fades DEBUG Arguments: Namespace(check_updates=False, child_options=[], child_program='pipdeptree', clean_unused_venvs=None, dependency=['pipdeptree'], executable=True, get_venv_dir=False, ipython=False, no_precheck_availability=False, pip_options=[], python=None, python_options=[], quiet=False, remove=None, requirement=['requirements.txt'], system_site_packages=False, verbose=True, version=False, virtualenv_options=[])
*** fades *** 2020-01-23 12:18:05,736 fades.cache DEBUG Using cache index: '/home/facundo/.l