Skip to content

Tag: python

Unable to install boto3

I have trouble installing boto3 inside a virtual environment. I have done what the document says. First I activated virtual environment. then I did a: Now I enter python But if I import boto, it works Why does it install boto 2.38 when I installed boto3. I tried closing the terminal and re-opened it. Should I…

Histogram with Boxplot above in Python

Hi I wanted to draw a histogram with a boxplot appearing the top of the histogram showing the Q1,Q2 and Q3 as well as the outliers. Example phone is below. (I am using Python and Pandas) I have checked several examples using matplotlib.pyplot but hardly came out with a good example. And I also wanted to have …

python regex to match only first instance

I have a python code and i’m reading a certificate and matching only the root cert. For ex my certificate is as below: I want to fetch only the root certificate, which starts with CZImiZPy. I read the certificate into the variable data and applying the below regex But it fetched both the encrypted certi…

How to stop a python loop when it hits the range of a specific number?

Our assignment is to find the square root of number inputed by the user by using the Babylonian algorithm. The babylonian algorithm is (guess+input/guess)/2. I am using a loop and replacing the ‘guess’ with the answer of the previous iteration. What I want to do is to stop the loop once it is with…