Форум Python: Вопросы и Ответы

#проект
#работа
#книга
#урок
#debug
#jupyter
#venv
#pip
#оптимизация
#интервью
#продвинутый
#новичок
#игра
#автоматизация
#базы_данных
#ии
#парсинг
#боты
#веб
#asyncio
#tkinter
#requests
#matplotlib
#pandas
#numpy
#flask
#django
#python3
#python2
#совет
#обсуждение
#пример
#ошибка
#помощь
#вопрос
#python
#метакласс
#асинхронность
#многопроцессорность
#многопоточность
#контекстный_менеджер
#assert
#logging
#исключение
#try_except
#итератор
#генератор
#строка
#кортеж
#множество
#словарь
#список
#полиморфизм
#инкапсуляция
#метод
#ооп
#декоратор
#lambda
#рекурсия
#функция
#match_case
#тернарный
#break_continue
#Циклы
#Условия
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ии
How to calculate the amount of 1! +2! +3!+...+N!
Condition of the problem: for this natural n calculate the amount of 1! +2! +2!+...+n!. In solving this problem, only one cycle can be used. It is forbidden to use the mathem...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · функция, python, ии
Why is the global variable inaccessible from the function?
Please tell me why the function does not display the value of s S = "" I'M Global Variable "" def foo (): print (s) r = '' reset global Variable ' foo () I ass...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · метод, python, пример
The period of decimal fraction
Task: Two integers are presented to the function of the function (int (a), int (b)) . You need to retu the private a/b , and the repeated numbers (period) need to be taken into b...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · помощь
Determination of the floor by name
Tell me, please, the algorithm for determining the floor by name. Maybe there are any solutions on the python? I tried: 1-to the ends; 2-С Pymorphy broke up the name of the word a...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, pandas, jupyter
Remove the lines in Dataframe satisfying the condition
How to remove the lines in Pandas Dataframe, in which the values ​​in the column stp == 1005092 Details: I am engaged in data processing in jupyter Notebook : normal dis...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
How to make a console calculator on Python?
I want to make a calculator on Python. When I look on the Inteet how to make a calculator on Python, I come across a type of calculators, enter the first, enter the second operato...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, помощь
Generation of the random line
I am interested in how to generate a line of the type SA32ASF7W1 using the Random library in Python. The first 4 characters are a random set of letters and numbers, from 6 to 10...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Selection of the last by the date of the file from the catalog
I study python , trying to write a script that takes a file that was created from a certain folder that was created late others. How to do this?
аватар форума question@mail.ru · 0000-00-00 00:00:00 · ооп, python, вопрос
Study of OOP in Python [duplicate]
(1 & nbsp; answer) closed 5 years Back . friends, please tell me why it is better to start studying the OOP in Python-E.
аватар форума question@mail.ru · 0000-00-00 00:00:00 · ии, работа
You need to find out the IP address of your computer on the Inteet in Python
In the documentation, I found Socket.gethostbyName (Socket.gethostname ()) . But I have a mistake. The gethostbyname does not work, I don't know why. Python version 3.2. Tell m...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
How to check if all elements are the same in the list?
n = inte ( input ()) sp = [] for _ in range (n): sp.Append ( int ( input ())) how to check if all the numbers are the same in this list?
аватар форума question@mail.ru · 0000-00-00 00:00:00 · вопрос
Removing empty elements of the Python list
Sorry for the stupid question, but how to remove empty elements from the list in the Pieton?
аватар форума question@mail.ru · 0000-00-00 00:00:00 · строка, python, работа
Replacement in the line of double space for a single
I have a line: str = 'a l a m a k o t a ' as can be seen in the line, between the letters of the same word I have one gap, between the words two. Class = ""> 'Ala ma ko...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, asyncio
Python when should I use ASYNC, and when is AWAIT?
when should I use ASYNC, and when AWAIT?
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список, python, пример
Django Solr (Filter) - a falling list for objects, how to implement? or adapt
There is such a list of objects displayed by the value of the attributes of goods. the values ​​of the attributes of goods that are interconnected - should be in the form of a ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Using __init__.py in mode code
Do I need to add a file __ init __. Py to the directory from which you are going to import modules? Or is it enough to use implicit namespace packages?
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список, python, вопрос, django
Drop -down list in Django
I am writing a simple online store on django 1.9 . The following models are available: tovar/models.py 25 , BLANK = false , null = true ) code = models.charfield (Ve...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ошибка, python2, ии
Coding problem when recording in SQLite3
I write in Windows 7 on Python 2.7.10. #-*-coding: utf-8-*- conn = conn = connn = db.connect ( 'main.db' ) #conn.text_Factory = str c = conn.cursor () c.execte ( 'Pragma Enc...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · метод, python
How to encrypt the RSA method by your key?
How to encrypt the RSA method with your key? import rsa (PUBKEY, PRIVKEY) = rsa.newkeys ( 512 ) message = b'hello world! ' # encryption crypto = RSA.ENCRYPT (Message, Pub...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос
Python Electronic signature
Hello everyone. Help me deal with the question. Consider such a case, my program has users and I will send files, the user's program reads this data. I want to check the data from...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · помощь, asyncio
Python. Asyncio. Asynchronous reading and recording file
python. Asyncio. Asynchronous reading and recording of the file
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ии
Calling C ++ Functions from Python
there is a Python script having the path to the file, you need to open this file in C/C ++ functions, carry out manipulations with it and retu the result in the Python script. ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ошибка, python3, requests, ии, pip
SSL errors of the protocol
when I use the most common requests.get() python issues ssl certificate errorsTraceback (most recent call last): File ""C:\Users\ADMIN\AppData\Local\Programs\Python\Python37\lib\si...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Python: Windows notification notification
How, using Python, send a notification to the Windows 10 notification center?
аватар форума question@mail.ru · 0000-00-00 00:00:00 · вопрос
How to make syntax backlight in tkinter
I suspect that this issue is very complicated (well, or impossible). But I would like to know if it is possible to make a syntax backlight in a text widget?
аватар форума question@mail.ru · 0000-00-00 00:00:00 · функция, python, пример, ии, проект
Appeal to the function specified in __init__.py
When initializing the package in Python 2.7, I need to determine the functions that should be common to all modules of this package. I identified them in __ Init __. Py . How to ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Several designers with different amounts of arguments
Is it possible to make several designers with different amounts of arguments in Python in one class? class a : def __ init __ ( self, b ): pass def __ Init __ ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · метод, python
Python method that displays all copies of his class
How to create a method in Python, which will display all copies of the same class in which this method is defined?
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список, python
A way out of several cycles
There is an input list, the elements of which consist of a certain text. It is necessary to check whether there are words from one list in the elements of the list from one list, ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · метод
What does the Random_state parameter mean at Sklea.manifold.tsne and other Scikit-Lea classes?
Put 3 different values ​​ random_state , this: (None, 0, 1) . I did not understand what the essence of this method is. I read the documentation, the answer on the site, but I ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Deet bot on the Heroku server
Can someone give instructions on how to expand the bot on the Heroku server (written on python )? Thanks in advance.
аватар форума question@mail.ru · 0000-00-00 00:00:00 · помощь, numpy, pandas, matplotlib, pip
Download Python packages for offline installation
I have restrictions at work and if I download packages using the PIP command through the command line, then the security service blocks everything from the Inteet. Therefore, I ne...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, matplotlib, pip, jupyter
How to animize the schedule?
Tell me, is it possible to draw animated graphs in Jupyter, such as the processor loading schedule in real time? I'm trying to monitor the server response time to the ping. I deal...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список, python, ии
How does the code work [I for i in Range (51) if I % 2 == 0]?
Evens_to_50 = [I for i in range ( 51 ) if i % 2 == 0 ] Print Evens_to_50 This code generates a list of even numbers up to fifty. But I, as new in programming, d...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
How to make a temporary cycle correctly?
We need to make a cycle that will perform a function for a minute with an interval of 1 sec. What is the most effective way? I could not come up with anything better than this:...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, пример, numpy
How to tu a matrix (two -dimensional array) by 90 degrees using ZIP?
How to make a matrix tu in one line without Numpy and cycles? For example, if the original matrix: [ [ 3 , 1 ], [ 4 , 2 ]]
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
How to fix it? 'Ints Object is not Subscriptable
Here is the task: to generate 20 random integers in the range from -5 to 4, to write them down in the cells of the array. Count how many positive, negative and zero values ​​among...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · пример
Removing the same elements in a sorted sheet (list)
For example, I have a sheet x = = a, a, a, f, h, k, k] . I need to do so that there would be only one a in this sheet and one k , i.e. Delete extra similar elements, do not to...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, пример, ии
How to dynamically create a variable
How to dynamically create a variable, in the name of which the value of another variable can contain? For example, you need to create a variable as follows (pseudo-cod): Su...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, пример
How to choose one of the values ​​with a certain probability?
Example. Katya received 10 points, and Kolya & mdash; 20 points. So in one case, Katya will win out of three, and in two of the three & mdash; Kolya. It is necessary to randoml...

Интересное