Questions tagged as 'python'

1
answer

Initialize the graph in the matplotlib and then insert elements

Hello. Is there any way I can first open a chart with matplotlib and, after open, perform some operations? Eg open chart and then plot one line, then another, and so on. I know there are some topics in the English stackoverflow about this, an...
asked by 23.11.2017 / 21:02
1
answer

Renaming file: 'str' object has no attribute 'group' [closed]

I have a problem that may be very trivial but I can not understand. I found in a text by regular expression a number sequence of type XXXX / YYYY, after that I need to rename the .txt file with the sequence found. The problem is that when trying...
asked by 21.11.2017 / 12:16
1
answer

Calculate a string in Python

I would like to do a calculation of a string that I get, for example: var = '1+2' I wanted to convert this string into an account, to return 3 for the variable var and not '1 + 2', but this would not only be added, would have subtrac...
asked by 16.03.2017 / 15:50
1
answer

How to create a new window in Selenium webdriver? Or something like that.

Next: I have an application that monitors a webpage, and I'm using the Selenium web driver ... The application now opens a page with calls from a client, shreds the data and generates alert popups for the analyst reporting new calls and etc ......
asked by 22.11.2017 / 17:54
0
answers

Have it open and reopen every x time a number of Python and Selenium tabs

I need this code of my every hour to do the process of reopening all tabs or setting or just close everything and run that code every hour. How? from selenium import webdriver import time import json import sys import os import pyautogui if l...
asked by 06.12.2017 / 20:24
0
answers

Python code to generate event in Google Calendar

I would like a help to create a code using Python to generate events in Google's calendar, I already have the API set up and launched for this action, but I can not make my code work, I already did this process for sending Emails and worked perf...
asked by 24.11.2017 / 19:45
0
answers

(Flask) Ajax JSON with JQuery-Datatable

Good luck. I'm trying to show my data (JSON) in a Datatable table via Ajax. The HTML is: <div class="x_content"> <table id="exemplo" name="exemplo" class="table table-striped table-bordered">...
asked by 20.11.2017 / 17:11
1
answer

Intersection point between two lines using GeoPandas

Good morning, everyone. I'm making a code and I came across a problem. I'm using GeoPandas and I need to find the intersection between two Linestring Z and their elevation values (Z). What has happened is that when executing the intersecti...
asked by 29.11.2017 / 14:18
0
answers

int object is not subscriptable (python)

I'm new using Python and I do not know why it's giving the error:    Traceback (most recent call last):     File "C: \ Users \ Gabriel \ Desktop \ Perceptron.py", line 51, in       print (perceptron (max_it, errors, alpha, inputs, outputs))  ...
asked by 14.11.2017 / 15:55
1
answer

Separate input value and expected value in pytest.mark.parametrize

How do I separate the parametrize, the expected input @pytest.mark.parametrize('entrada, esperado', [(1,0,0,), (1,0,) ]) def testa_raizes(entrada, esperado): assert b.calcula_raizes(entrada...
asked by 14.11.2017 / 12:11