Questions tagged as 'python'

1
answer

There is data binding in Python

Hello, guys. You know some kind of data binding in Python that you commonly have in Java frameworks, such as JSF, Spring, and so on. I have already used Flask and Django and I have not seen a similar feature in both, so I have to attribute attri...
asked by 27.04.2017 / 00:59
0
answers

Extracting source and destination IP to verify that the server has become dead after attack

from scapy.all import * from collections import deque def print_attack_measure(pcap_file): plist = rdpcap(pcap_file) server_ip = "192.168.1.5" n = 300 d = deque(maxlen=n) # If you want source/destination IP addresses get...
asked by 15.03.2017 / 03:33
0
answers

Border Condition Algorithm in Python

I can not run this in my python, anyone who can help me? The problem is in border conditions. for it in range(2,nt): uu=u*u; uv=u*v; vv=v*v; hbu=(h-b)*u; hbv=(h-b)*v; gh=g*h; # Avançar o sinal em todo o domínio exce...
asked by 21.04.2017 / 21:06
2
answers

How to separate the digits of an integer and add them to each other? - Python

How to separate the digits of a number and add them, for example: 123 - > 1 + 2 + 3 = 6 How to do this, however, do this using arithmetic operators. I saw a case where it was separated using operations with "//" and "%", but I did not quit...
asked by 21.04.2017 / 04:25
0
answers

How can I customize my data for use in Theano?

I'm following the link link tutorial and would like to apply the codes to my own dataset. As I do not know much about python, I did some searching and found that I needed to put my data in a multidimensional array like in the code below:...
asked by 28.03.2017 / 23:47
0
answers

Converting Web Scraper from Python 2.7 to 3.5

Good afternoon everyone! It is as follows: I found a script in Python 2.7 but I have version 3.6. As I am new in this scope, I wanted to work manually to convert this script. Here is the code below: ### Modified for naming pics by tag impor...
asked by 28.03.2017 / 21:18
1
answer

AttributeError: 'list' object has no attribute 'apend'

Why does this error occur?    "AttributeError: 'list' object has no attribute 'append'" with this code? class Stack : def __init__(self) : self.items = [] def push(self, item) : self.items.apend(item) def pop(self) : re...
asked by 24.02.2017 / 16:48
1
answer

Has Api's moon language for Python

I've heard that there are api of the moon language to be used in spreadsheets with other languages like C, C ++, C #, is there an api of this for Python?     
asked by 04.03.2017 / 03:51
1
answer

How to access data from a dynamic imput of a form with django?

I'm participating in a project where we're using django. I created a form with two initial fields and can add more dynamically using javascript. <div class="form-group"> <div class="panel-title"><b>Informe os Crit...
asked by 18.02.2017 / 20:22
1
answer

Creating Python objects from the database

I'm learning Python now and I want to create an object from the information I get from the database, just passing the user ID. I'm using SQL Azure and the pyodbc driver. It's working fine, but I wonder if this is the right way for this kind o...
asked by 23.03.2017 / 00:18