ascii

Convert image header information to ASCII code

Convert image header information to ASCII code Question: I got a string with image header information like pixel number for each dimension. Here the header: "1 10 10 1 4 LE". In addition to that the other image data is saved in the following base64 code: "+igSKdAm9CVoJhYnzidqKLsmnyX2JwQo9CYhJgMmaCb5Jo0nMSevJmAnwibIJuEmnyZRJpomNicxJ9gmfSeoJkcmySZAJ/Am2CZZJ78nOSeUJ7km+CWVJpMnyCebJ6UnoiclJ7UmPyY3JgsnwyfGJ7cniSdlJ3oneSajJi8n3ye5Jz4nvCeMJ1onYSdAJ3QnsScLKHsnTCfuJ6MnGCdaJ2onECfUJmcnhicEKAko9yZPJjYn0SY7JmkmKid3J1goDyhOJrIldic=". I tried to combine these two strings to …

Total answers: 1

How to turn TXT ASCII to PNG Python

How to turn TXT ASCII to PNG Python Question: I have been trying to solve this problem I have right now. I have tried many many ways to convert txt files to pngs but none has worked for me. I have been wanting to convert the text file below (the content of this file is …

Total answers: 1

Encrypting a file into ascii key

Encrypting a file into ascii key Question: I am trying to encrypt a file input by user into a randomized key of ascii. I got the random key and can translate the string in the file into ascii but cannot figure out how to translate it into the key I tried many things but am …

Total answers: 1

Modbus: Wrong response from the slave

Modbus: Wrong response from the slave Question: I am trying to write data to DVP28SS2 controller using minimalmodbus in ascii mode. I have received a responce from thr controller but it seems wrong. In particular bits, corresponding to slave address and the function code don’t match them. The request is: 3A 30 31 31 30 …

Total answers: 1

Dividing a 24-digit binary number to 3 equal parts

Dividing a 24-digit binary number to 3 equal parts Question: I’d like to know how can I divide a 24-digit binary number which is taken from user in python to 3 parts and then put different conditions on each of these 3 parts. e.g: input => 111100011110110100100100 divide the input to 3 equal parts (each …

Total answers: 1

How would I add a space character to ascii_lowercase

How would I add a space character to ascii_lowercase Question: So im making a code that’ll encrypt a character or word per se. Im done with that so far but would like to include a space character and continue on with an extra word to encrypt. "Congratulations you won"<<< from random import shuffle from string …

Total answers: 1

How do I iterate through a list of dictionaries?

How do I iterate through a list of dictionaries? Question: I need to take an inputted time, for example "12:20", and print a 5×3 ASCII clock representation of it. But I don’t know how how iterate through a list of dictionaries, which I think is the simplest way to solve this problem. time = input("enter …

Total answers: 1

Finding Missing Letters

Finding Missing Letters Question: I’m currently trying to create a function that counts the frequency of characters in in a string. I need to store it in a dictionary in ASCII code. From this dictionary I need to calculate which letters do not appear in the string. enter image description here import string result=string.ascii_uppercase print(result) …

Total answers: 1

Iteration via expandable nested 'for' loops without itertools

Iteration via expandable nested 'for' loops without itertools Question: I am trying to make a list of iterations of the alphabet with itself to the n-th power but I am unable to find an appropriate way of achieving this. I would rather not use itertools for the time being. My idea is as follows, although …

Total answers: 1