正规365体育投注

Questions tagged [python]

正规365体育投注 Python is a multi-paradigm, dynamically typed, multipurpose programming language, designed to be quick (to learn, to use, and to understand), and to enforce a clean and uniform syntax. Two similar but incompatible versions of Python are commonly in use, Python 2.7 and 3.x. For version-specific Python questions, add the [python-2.7] or [python-3.x] tag. When using a Python variant or library (e.g. Jython, PyPy, Pandas, Numpy), please include it in the tags.

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

How to get image's url in HTML template in Django?

I have a model class SliderImage(models.Model): title = models.CharField("Nazwa obrazka", max_length=250) image = models.ImageField(upload_to="main/media/slider/") def __str__(self): ...
0
votes
0answers
4 views

Seamless SQL DB and Python Integration

I use Python (Spyder) to manipulate data and perform complex data analysis operations. Till now, I only had to deal with small data-sets in .csv, so it wasn't a problem, and thousands of lines of code ...
0
votes
1answer
6 views

the button doesen't appear with tkinter (3.8)

I have a problem with python 3.8. I am using tkinter. I was tring to do a simple ui (i was doing some tests,actually i am learning tkinter) here is the code: ### importing libraries ### import ...
0
votes
0answers
6 views

Fitting an image with another boundary in matplotlib python

I have an image plotted on matplot. The image contains only the foreground and the background is black. I've to detect the farmost coordinates of the foreground(ie., topmost, bottommost, leftmost, ...
-1
votes
0answers
5 views

Training CNN on small subsets to select architecture

I'm new to deep learning and convolutional network. From what I've learned the key in reaching good performance seems to be in finding the right architecture for the problem at hand. Not only in term ...
0
votes
0answers
3 views

NLP PYTHON with ARABIC LANG

How can I use the NLP library in python with the Arabic language, if I want to make sentiment analysis? Are there stop words in Arabic?
0
votes
0answers
3 views

Accuracy of Keras NN very low on unseen data

I wrote a code for Keras NN and for now it works good, but I noticed something that is very strange for me. It gives me very accuracy of more than 83%, loss is around 12%, but when I want to make a ...
0
votes
0answers
4 views

Activating conda environment in Sublime text by default

I am trying to configure sublime text to work with anaconda distribution that is installed in the system. I have installed the conda package in the sublime text 3. But whenever i start sublime text , ...
0
votes
0answers
7 views

How to put pygame functions into a function?

I would like to know if it was possible to put pygame code into functions like display() to simplify the call of functions that blits or create rects. The final result would be : class game(): ...
0
votes
0answers
12 views

How does specifying type of input and output in function header or docstring work?

I recently started to learn programming with Python and in some sources I encounter code: def f(x : int) -> str: or def f(x): """(int) -> str....""" When I try the first code it doesn't ...
0
votes
0answers
6 views

Django:Unable to add extra field in User Model

I got the idea from a random post that how to extend the field of the User Model in Django by using the One to One relation. I'm trying to write One to One relation by creating a complete_user model ...
0
votes
0answers
6 views

mock classes created in runtime in Python

I'd like to use the Python mock library to mock the method generate_presigned_url() method of the Boto3 S3 client class in my tests and make it return a fake URL value based on the bucket and key ...
0
votes
0answers
7 views

Python: I/O file If loop not working. CSV Cell value not comparing

''' PROBLEM STATEMENT: If condition is not working ''' ''' New to Python. Excuse for basic queries''' CSV File Contains Data: "XYZ", 12345, 1000 Tagged to account_holder_name', 'account_number', '...
-6
votes
0answers
20 views

how can i move digits in Python?

Given a number x , print the smallest number larger than x , which comes from moving the digits x . input: 156 output: 165 input: 27711 output: 71127 input: 330 output: 0
0
votes
0answers
3 views

Flask render_template not being called after Thread

I currently have an app.route which when it's triggered starts a thread and is suppose to return a template. However it is not currently returning the template, but if I comment out the Thread it does....

15 30 50 per page
1
2 3 4 5
92085