limit

I would like to limit the borrowing objects in my Django app

I would like to limit the borrowing objects in my Django app Question: I have an app that displays games and user can borrow them. I want to limit the amount of borrowed games for each user to max 3 games. I created two models borrow and games. The methods work well except for the …

Total answers: 1

need to limit BeautifulSoup href result to first occurence – or – account for an open parenthesis in href string

need to limit BeautifulSoup href result to first occurence – or – account for an open parenthesis in href string Question: I want ONLY the <a href NPPES Data Dissemination in the Full Replacement Monthly NPI File section of https://download.cms.gov/nppes/NPI_Files.html. There are other <a href NPPES Data Dissemination files in the Weekly Incremental NPI Files …

Total answers: 1

Python – Memory limit exceeded during Google App Engine deployment

Python – Memory limit exceeded during Google App Engine deployment Question: I am creating a Python project and deploying it to Google App Engine. When I use the deployed link in another project, I get the following error message in Google Cloud Logging: Exceeded hard memory limit of 256 MB with 667 MB after servicing …

Total answers: 1

Changing x and y limits

Changing x and y limits Question: I would like to reduce the x axis from 100 μm to 10 μm and the same for the y axis. I tried setting the axis limits but want the same data to be plotted on the 10 x 10 grid that is on the 100 x 100 grid, …

Total answers: 1

Verifying ctypes type precision in Python

Verifying ctypes type precision in Python Question: If an API expects a 64 bit type, how can I check that a ctypes type has that many bits if sizeof returns the number of bytes? How do I know how many bits are in each byte on the current platform? Where is CHAR_BIT defined in Python? …

Total answers: 1

Python Number Limit

Python Number Limit Question: I know in most, if not all programming languages, integers, floats etc all have a maximum amount they can hold, either unsigned or signed. Eg pascal’s int type can only hold up to 32768 ~. What i wanted to know was, what is the limit on python’s int and floating point …

Total answers: 4

Maximum size of object that can be saved in memcached with memcache.py

Maximum size of object that can be saved in memcached Question: I need to return a rather big file (11MB) to the user. For certain reasons, I can’t just provide a direct url to the file (http://www.sample.com/mybigfile.exe); instead it must be accessed through code. Instead of having to read it from disk over and over, …

Total answers: 8

What is a maximum number of arguments in a Python function?

What is a maximum number of arguments in a Python function? Question: It’s somewhat common knowledge that Python functions can have a maximum of 256 arguments. What I’m curious to know is if this limit applies to *args and **kwargs when they’re unrolled in the following manner: items = [1,2,3,4,5,6] def do_something(*items): pass I ask …

Total answers: 6