Skip to content

How could I list Azure Virtual Machines using Python?

I’ve used the below code to get the Access Token from my Azure account. https://github.com/AzureAD/azure-activedirectory-library-for-python/blob/dev/sample/certificate_credentials_sample.py It’s working fine, I already got the token. However, how can I use this token to list all VMs running in that subscripti…

Django: Problem with Understanding Objects in For Loop

I am a beginner in Django. I am building a Django app, named PhoneReview. It will store reviews related to the latest mobile phone. It will also display phone brands, along with the associated phone models. I have managed to do some protion of the app. Right now, I am a bit confused with a line of code. I hav…

python code to split into multiple nested list

I am having the following input data(temp_list1). I am trying to convert this input into a nested list as mentioned below(new_list). this input is part of vnstat command’s output. Input: temp_list1 = [(‘ eno1:’, “rn Oct ’19 10.09 GiB / 68.98 GiB / 79.08 GiB / 164.53 GiBrn yesterd…

Django 2.2 img’s not loading

I’m actually new to django and I found a problem when loading my images, I did the settings like the docs said and it saves my images to the right folder. Just the loading part does not work as I want it to. the upload is working as expected. Saves all images to the media folder (which is on the