Questions tagged as 'python'

1
answer

Transfer files from sub-folder to main folder in python

I have enough folders that in turn have their respective sub-folders, inside one of those sub-folders there is a subfolder_1_2, subfolder_2_2, subfolder_3_2 that contains files for example: carpeta │── Subcarpeta_Principal1 │...
asked by 19.01.2016 / 21:44
1
answer

Why does my Keylogger in Python 3.6 save spaces and not the letters it registers?

The program apparently works fine, it creates the file but in it it only writes blank spaces instead of the characters that I wrote. I really need help with this since I do not know the reason for this, I saved it as .pyw Here the code:...
asked by 22.04.2017 / 03:09
1
answer

Neural network with backward propagation returns the same outputs for large vectors

I have a problem with the neural network of backward propagation, it is written in Python , here I leave the GitHub link (in English), with a vector of 4096 entries, 2 hidden layer neurons and 197 output neurons. I put the network to...
asked by 12.09.2016 / 23:26
1
answer

Use proxy in Python 3

I'm wanting to use a proxy connection in Python 3, something simple. I would like an alternative to the method used in Python 2 proxy = {"http":"http://178.22.148.122:3129"} urllib.urlopen("http://httpbin.org/ip", proxies = proxy).read()...
asked by 30.03.2017 / 23:45
2
answers

Request more than 10 data without using so many variables

I just started with this world of Python and I'm doing personal sample software. But I need to ask for too much data. EXAMPLE: dato1 = float(input("Dígame su peso en kg: ")) dato2 = float(input("Dígame su peso en kg: ")) dato5 = float(in...
asked by 22.04.2018 / 01:01
2
answers

Iterate a list and save it in a file

I am trying to iterate a list and then save it to a file .txt with open/write . lista = ['uno', 'dos', 'tres'] mi_path = "../fichero.txt" f = open(mi_path, 'a+') for i in lista: f.write(i) f.close() I give the attribut...
asked by 12.07.2017 / 11:59
2
answers

Python convert a string in CamelCase to separated by dashes

Hi, I'm needing to convert a string in CamelCase to separate scripts, I've been trying a bit of regular expressions but I can not get any part of it, the idea is to enter a string in CamelCase: Entry: 'HolaMundoCruel' Exit: 'hola-mundo...
asked by 08.04.2017 / 16:29
1
answer

How to cut chain and join it in a variable

esta1seg0831a.txt my file that I want to cut file_name = esta1seg0831a.txt year = 2016 month = file_name[8:10] day = file_name[10:12] estacion = file_name[:4] nombre = file_name folder = [year,month,day,estacion] My output result is =...
asked by 07.09.2016 / 00:01
6
answers

Remove blank spaces from a series

I have a list of this form, and I need to remove the spaces between words, that is, to make it look like this: 'jul07', 'jul08' ... Here I leave the code: FechasList = [] for i in date: if i not in FechasList:...
asked by 13.07.2017 / 21:58
2
answers

Modify the Django user model

Django has its own model for managing users for login, I would like to know if this can be modified. The idea is to add some fields such as user type, mail, dependency, city, etc.     
asked by 19.04.2016 / 14:25