Questions tagged as 'python'

0
answers

Generate ctypes._fields_ dynamically

Good afternoon guys! This is my first post here, so have patience with the newbie;) I am creating a DNS server taking into account the RFC 1035 specifications using the ctypes to improve code readability and make it more organized. My...
asked by 25.06.2018 / 19:46
0
answers

How to solve the incompatibility between UTF-8 and ASCII-8BIT, between LINUX and WINDOWS?

If possible I would like help in the following case, I have to load data via loader \ ctl and etl kettle from different sources, and several OS, eg Linux, a UNIX and another Windows, but I always have problems that in the source I open the f...
asked by 11.06.2018 / 03:56
1
answer

I need to read a .csv file and rewrite to another .csv file without stopwords using Python

from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from string import punctuation import csv texto = open('arquivo_sujo.csv','r').read() with open('arquivo_limpo.csv', 'w') as csvfile: palavras = word_tokenize(text...
asked by 16.06.2018 / 00:28
1
answer

Write a function: int solution (int A [], int N);

My teacher gave me this problem but I can not do it int solution(int A[], int N); which, given an A matrix of integers, returns the smallest positive integer (greater than 0) that does not occur in A. For example, Given A = [1, 3...
asked by 08.06.2018 / 15:26
1
answer

How do I get and save many data entries in python?

I'm starting to program and so far the data entries were like this: dado_1 = str(input('Seu nome: ')) dado_2 = int(input('Sua idade: ')) dado_3 = str(input('Sexo: ')) But I was left with a doubt, as I take the same data as above...
asked by 13.06.2018 / 01:00
0
answers

Result of paged rather than unified loop

I'm having trouble getting a formatted result in paged JSON. My code instead of returning the result of the bound, is bringing the result per page! import requests def __init__(self, usuario, token): self.usuario = usuario self.token...
asked by 07.06.2018 / 01:18
0
answers

Python has stopped working visual studio code

I created 2 classes, one importing from another and giving error in import. I searched the internet and talked to go in the command palette and choose the interpreter (in my system it only has one: Python 3.6 (64bit) - Windows.) I clicked there,...
asked by 20.06.2018 / 03:03
1
answer

Find a certain word in a given user Tweepy

Following the documentation, I was able to create a code that extracts tweets by TAg, and another that extracts tweets from some user. But I'm having trouble extracting tweets from someone by tag. resultado = [[tweet.id_str, tweet.created_at,t...
asked by 20.06.2018 / 00:29
0
answers

Open DB berkeley Python

I got a project where I have a .db file I tried to open it with Sqlitestudio and SQLiteManager, I did not succeed. I was informed that this db was a database berkeley . I would like to open this db, if possible, convert it to a normal dat...
asked by 06.06.2018 / 23:10
2
answers

Python script does not generate the graph as expected

My algorithm in Python is running perfectly, I just can not generate the graph! I could not identify the error ... What's wrong? import matplotlib.pyplot as plt va=float(input('Digite o valor a ser aplicado: ')) juros=1.05 inflacao=1.02 saque...
asked by 06.06.2018 / 20:52