Questions tagged as 'python-3.x'

0
answers

Create a table in django's User models!

Well, I would like to create a column in the django models User table, because I would like to get the password before django transformed into sha256, because I want to display it in the unencrypted browser. Can you do that?     
asked by 13.11.2017 / 22:09
1
answer

python3.6 URLLIB Request

I have this code: import urllib.request x = urllib.request.urlopen('https://www.google.com') print (x.read()) And the error that happens:    Traceback (most recent call last): File "python", line 3, in    urllib.error.URLError: It s...
asked by 08.11.2017 / 18:22
1
answer

Error accessing dictionary index

I creating a program to read from a file csv a set of coordinates and store them in a DataFrame object. The code is below df = pandas.read_csv(os.getcwd() + "/Coordinates.csv") print(df["Longitude"]) The csv file is as follows...
asked by 09.11.2017 / 00:30
1
answer

I'm having trouble printing database values

I'm trying to print the 'ok' on the screen when it finds the value '3' inside one of the keys in the database. >>> with dbm.open('data1.db','r') as user: user['0'] = '1' user['1'] = '2' user['2'] = '3' for i in user:...
asked by 24.10.2017 / 15:42
0
answers

DLL error: api-ms-win-crt-runtime-l1-1-0.dll when running Python

After I finished installing Python on my computer, when I ran Python on my CMD the following message appeared: ItriedtoreinstallPythonmorethan3times,itdidnotwork,Ialsotriedtodownloadtheupdateupdateforuniversal-c-runtime-in-windowsbutitdidnot...
asked by 21.10.2017 / 18:20
0
answers

Find a smaller array inside a larger array

I have two lists of frequencies, one observed and one modeled. It turns out that I want to find all the values closest to those observed within the model. The first has length of 38 and the second of 303. I did the following def find_nearest(a...
asked by 02.11.2017 / 22:47
1
answer

How to copy a specific line of date frame to another date frame

I have following Data Frame: data = { 'País': ['Bélgica', 'Índia', 'Brasil','Índia','Bélgica','Bélgica','Russia','Brasil'], 'Capital': ['Bruxelas1', 'Nova Delhi', 'Brasília', 'Nova Delhi','Bruxelas2','Bruxelas3','Moscou','Brasília'], 'Continen...
asked by 09.10.2017 / 17:43
0
answers

Module requests are imported into IDLE, but not into Thonny (the IDE I use)

I installed the module requests through Terminal with sudo pip3 install requests (I'm using Mac) and I was able to import it through the interactive shell without problems in IDLE. But when I try to import through Thonny's interact...
asked by 07.10.2017 / 00:46
0
answers

Naming file with sql query data

Hello, I need to name each file created by the script with a single column data from my database. Here is the code: for index, source in zip(list(range(0, len(self.sources))), self.sources): if self.jsonfile is not None and sel...
asked by 20.09.2017 / 19:49
0
answers

Send Functions using pickle and use LOOP

We are developing an application with client-server structure using the socket and pickle library, we need a loop that continuously sends the data to the client using the pickle to compress the data of the functions and send. but the loop only w...
asked by 19.09.2017 / 16:36