Category "python-3.x"

How I can change my ip address with python requests

I write a code for get some data with a fake ip. but my code don't work correctly import requests proxies = {"https://": "https://190.71.22.98:8080",} r = requ

How can I ensure my Python packages are installed in Python 3.10 instead of /Library/Python 3.8?

I have successfully installed Python 3.10. I want to install packages. Pandas, BeautifulSoup4, and requests. I tried to import NumPy but IDE says it doesn't hav

Place ipywidget Dropdown on screen in matplotlib.pyplot axes ax1

When I run this code, the Dropdown is nowhere to be found. How do I make it appear in ax1? (I think I would like to avoid Tkinter.) #!/usr/bin/env python3 #Pla

ModuleNotFoundError: No module named 'hcaptcha'

I am trying to execute a code of mine, but i keep getting the following error: ModuleNotFoundError: No module named 'hcaptcha' When I try installing 'hcaptcha

Python 2to3 command window conversion

I have some long scripts to convert from py2 to py3. Also, I am a beginner and I don't have experience with python. On my computer (windows 10) I have python 27

Python-pptx, find special text and replace with image

I'm trying to replace text in PowerPoint slides with an image. For example, if I find <graph1> I would like to replace that text with the picture "picture

How can I iterate a for loop in Python in the increments of sum of another variable and iterator

I am trying to make a python program for "The Sieve Of Eratosthenes" but I am stuck at one place. The c program I wrote looks something like this : for (i = 2;

PyQt5 on Fullscreen with embedded vispy canvas flickers when any widget is clicked

I'm working on an application where I've embedded a vispy scene.SceneCanvas to pyqt5 to plot volumes. But when I put pyqt5 on full screen, it flickers whenever

Python- How to Combine 2 pandas.core.frame =.dataframe with the same column name together in python [duplicate]

So i got 2 pandas.core.frame.DataFrame like this: anomalies: Sales outlet Date 2006-07-01 700 2 a

Open3D scene renderer render_to_image returns black screen

I am trying to render a scene that simply contains a mesh of obj file and the material file. It looks okay when I try to view with o3d.visualization.draw([{

How to convert PPM image file to JPG or PNG using Python? [duplicate]

I have made a script which makes a valid ppm file which when opened using a ppm viewer is working properly. But I don't want my users to insta

I'm on a project trying to create a leap year generator. Every year works besides the years with the last two digits being 16 or 20

Any time I type the years that end with 16 or 20, example: 2016 or 3020, it just ends. The code I am using is below, any help would be much appreciated. Thank y

Google Colab: pip install and imports from a custom script

In MyDrive/colab a I have these files: 00-imports.py with content... !pip install boto3 classes.py with content... class Test def __init__(self): print(

Casting irresponsive

Tried to do casting on this little project I am working on can anyone tell me what I have done wrong? Calculation_to_units = 24 name_of_unit = "hours" def day

Can't understand how to store values for each step

I am a beginner, trying to learn recursion and solve some problems (trying the subsequences problem). But before I could even attempt to get the recursion logic

Nested Data inside output needing to be expanded

I have the following code import requests import json import pandas as pd import csv import numpy from pandas.io.json import json_normalize url = 'http://URL/a

Getting a map() to return a list in Python 3.x

I'm trying to map a list into hex, and then use the list elsewhere. In python 2.6, this was easy: A: Python 2.6: >>> map(chr, [66, 53, 0, 94]) ['B',

Unused import statement 'import config' Pycharm

class Bot: @staticmethod def token(): telegramtoken = '...' return telegramtoken @staticmethod def executar(): import

How to make the if condition contain more than one condition? i.e.: if (number % 3 == 0) & (number % 5 == 0): [duplicate]

Starting_Num = int(input('Please enter intial number: ')) Ending_Num = int(input('Please enter ending number: ')) for number in range(Starti

How can I add a conditional within my model that changes a model field based on a previous fields value?

Using Django/python. So I have a 'food' model that is taking multiple user inputs, one of which is 'type' and has the options of 'fresh' and 'pantry'. Another i