Category "python-3.x"

How can print out in console more beautifully? [closed]

I create a Web-Bruteforce project with Python for CTFs. I ran it. As you can see something's wrong. It isn't regular. How can I print them mo

Not able to replicate AJAX using Python Requests

I am trying to replicate ajax request from a web page (https://droughtmonitor.unl.edu/Data/DataTables.aspx). AJAX is initiated when we select values from dropdo

Clearing user-created variables in Python

I am an absolute beginner in Python. I have been using R and Matlab for data analysis for quite some time. One of the great things about these languages (or too

Not able to replicate AJAX using Python Requests

I am trying to replicate ajax request from a web page (https://droughtmonitor.unl.edu/Data/DataTables.aspx). AJAX is initiated when we select values from dropdo

Outputting height of a pyramid in Python

So for this coding exercise I have to input a number of imaginary blocks and it will tell me how many complete rows high the pyramid is. So for example if I i

Conda environment is in an unsolvable loop of 'The environment is inconsistent', how to fix it?

A dependency conflict in conda environment seems to cause the environment to be in a state of self-conflict and it is unable to find any useful fix. I've tried

Impossible to upgrade Brownie package via pip or pipx command - version still showing 16.4.1 after the upgrade

I am trying to upgrade my version of Brownie, currently v.16.4. I have tries all commands : Pip install --upgrade eth-brownie Pipx upgrade eth-brownie even via

Private Object Field in Django Admin

I'm wondering what the best way to have an editable field (by admins) for some object in Django admin that can't be viewable on the public site. For example, a

Python discord bot - coroutine was never awaited

I'm working on a Discord bot and it works to some degree but it keeps crashing every couple minutes. It gives me an error like Task was detroyed but it's pendi

Different File Paths in Python ZipFile Depending on .write() vs .writestr()

I just wanted to ask quickly if the behavior I'm seeing in Python's zipfile module is expected... I wanted to put together a zip archive. For reasons I don't th

Different File Paths in Python ZipFile Depending on .write() vs .writestr()

I just wanted to ask quickly if the behavior I'm seeing in Python's zipfile module is expected... I wanted to put together a zip archive. For reasons I don't th

Implementing threading with flask with application context

I am trying to implement multiprocessing or threading in my flask __init__.py to implement a sub-process that will handle some back-end work for me. However, I

Unable to iterate through list using BeautifulSoup

I am doing some experiments with Python3.6 in Mac and BeautifulSoup. I am trying to build a simple program to scrap song lyrics from a URL and store them as pla

Write a program to print the sum of 1 to n. While calculating sum omits the numbers which are multiples of x. Note :Use the concept of continue

Please help me with this I'm not able to omit number of multiple x

'Import "Path.to.own.script" could not be resolved Pylance (reportMissingImports)' in VS Code using Python 3.x on Ubuntu 20.04 LTS

It is a similar situation I'd encountered several months ago using pylint prior to pylance: My python 3.9x - script (using VS Code on Ubuntu 20.04 LTS) starts w

How can I create a forest plot?

I would like to combine different risk ratios into one forest plot. I would expect the output to be similar to metamiss in STATA or metafor in R. How can I do t

"RuntimeError: implement_array_function method already has a docstring", trying to import numpy. How do I solve this?

I am trying to run a script importing numpy, and it shows this error: Traceback (most recent call last): File "C:/Users/<user>/pycharm/<my_project>

zipfile: Adding files to encrypted zip [duplicate]

I have an encrypted ZIP file and for some reason, any password I feed it doesn't seem to matter as it can add files to the archive regardless.

Can you help me with a solution of hackerrank active traders problem?

How can I rewrite this piece of code so that it works faster? Currently the execution time is more than 10 seconds. def mostActive(customers): initial = so

Function to see if word is isogram

An isogram is a word that has no repeating letters, consecutive or non-consecutive. Implement a function that determines whether a string that contains only le