Questions tagged as 'python'

1
answer

How to modify the font size of axes in Python matplotlib.pyplot

Good afternoon. I would like to know how I can increase the font on the axes when I generate a chart using matplotlib.pyplot.     
asked by 28.02.2018 / 20:48
1
answer

How to install a module in Python

Hello, I have a script here in python that needs a lib: pypxlib But I do not know how to install this blessed pq I never worked with python. I am using python 3.5 on Sabayon Linux. Anyone have a clue how to install?     
asked by 11.04.2018 / 16:00
1
answer

Calculate the sine by Taylor series expansion

Write a program that calculates an approximation for the sine according to the equation below: seno(x) = x - x^3/3! + x^5/5! - x^7/7! + ... + x^n/n! Since x and n are integers entered by the user. If n is even the progr...
asked by 22.09.2018 / 00:54
1
answer

Importation of Kivy by the terminal does not work, but in IDLE it usually imports

I had a hard time installing kivy and getting it working on Ubuntu. But now I can not make kivy work in interactive mode directly through the terminal, but I can do that through IDLE. Can anyone help me solve this? I do not know why this happ...
asked by 16.02.2017 / 01:39
1
answer

Ajax with Python - I want to call function that is in default

I'm looking to do a validation on the MySQL Bank via Ajax. I created a function called validaCNPJ () which is in the controller called Default . But I do not know how I put this function in the Ajax parameters. Can anyone give me the path...
asked by 06.06.2016 / 14:41
1
answer

Python. Get a substring in formatted text

Hello. I have a string formatted with several attributes, I need to get all the "text" fields. In this example, I need to get "Gmail" and "Youtube" and discard everything else. Using Python <node bounds="{0, 0, 540, 36}" checked="false"...
asked by 14.06.2016 / 22:21
1
answer

How can I use this code?

import socket, sys, os print "][ Attacking " + sys.argv[1] + " ... ][" print "injecting " + sys.argv[2]; def attack(): #pid = os.fork() s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((sys.argv[1], 80))...
asked by 06.06.2016 / 12:07
2
answers

Doubts average calculation with Python 3.5

I am creating a program, using Python 3.5, to calculate average, but in my school there are some subjects with two teachers, and each one of a different proof. The problem is that the code I created does the average of (Prova 1 + Prova 2)/2...
asked by 22.04.2016 / 03:31
2
answers

Learning to program - IDE PYTHON

I'm learning to program I chose the Python language and I'm using VScode I downloaded vscod. When I press "f5" to rotate the code, it error. WhatdoIneedtodo,toopena"cmd" that I can type and test the codes?     
asked by 17.11.2018 / 18:47
3
answers

FUNCTION (METHOD) IN PYTHON

I'm trying to create a registry program in python, but a simple one only to test what I have learned, but I have a problem, I created a function and I return and then I store in a variable but it executes the function without me want, someone to...
asked by 02.07.2017 / 21:12