Questions tagged as 'python'

1
answer

Is it possible to use Sqlite3 on Android using the QPython3 application?

I'm trying to create a table: import sqlite3 def criar_tab_contato(conexao): cursor = conexao.cursor() sql = """ CREATE TABLE IF NOT EXISTS contato( nome text, telefone text, senha text ); """ cursor.execute(sql)...
asked by 25.10.2018 / 18:24
0
answers

Structure with another structure inside it in python ctypes

I'm developing a ratchet control software, it uses a dll called xpcomlib, and has examples made in C. I'm developing in Python and for using the DLL I'm using Ctypes, I've been able to make DLL functions work almost all but one, it needs one poi...
asked by 25.10.2018 / 19:45
1
answer

define a polynomial of any degree in Python

Working with numerical calculus, my goal is to use a " least squares ". I'm defining a function in Python as follows: def F(P,x): return P[0] + P[1]*x + P[2]*x**2 + P[3]*x**3 Then I will define these coefficients P [0], P [1], ... Th...
asked by 01.11.2018 / 01:35
1
answer

How to train a bot using chatterbot

This is my first time developing a bot and following the instructions in the chatterbot manual I came up with the following code: from chatterbot import ChatBot bot = ChatBot( "Terminal", storage_adapter="chatterbot.storage.SQLStorageAdapter"...
asked by 01.11.2018 / 14:21
1
answer

How do I use the text_input python-kivy text?

I'm having trouble using text_input text to store in the database. Python code: from kivy.app import App from kivy.uix.screenmanager import ScreenManager, Screen from kivy.core.window import Window from kivy.utils import get_color_from_hex...
asked by 16.11.2018 / 18:16
0
answers

Use saved variables on the Spyder console (Anaconda) on another console

Good evening. I'm using Spyder to train a classifier with machine learning, I have all the variables saved on the spyder console. The problem is that I need to generate graphs to better analyze the accuracy of my model, but the graphs are genera...
asked by 06.11.2018 / 00:21
0
answers

Android app with python

I'm having trouble, the python program runs perfectly on the computer, but the same does not happen on the phone. It opens the application, loads and closes. I use the kivy interface and generate the apk through the buildozer. This problem occur...
asked by 06.11.2018 / 17:09
1
answer

Find the last position of the matrix

I'm making a game in pygame and I need to know the last position of the array for the movement of enemies. It has to be according to the size of the array, ie the last column and the first column of the array has to collide with the map edges...
asked by 24.10.2018 / 21:21
0
answers

Get the user ID logged in Python

I'm having a project in Python and Django. Where I have an INSCRIPTION class, and in this table I would like to record in the "Person" column the user ID logged in the application, in the "Events" column record the event that he is doing registr...
asked by 29.10.2018 / 13:29
0
answers

segmentation of images with text

This is my code for targeting text in python def showfig(image, ucmap): imgplot=plt.imshow(image, ucmap) get_ipython().magic(u'matplotlib inline') #L=img.shape[0] #C=img.shape[1] import numpy as np import matplotlib.pyplot as plt from P...
asked by 23.10.2018 / 22:51