96 questions
0
votes
1
answer
206
views
RLE -> Mask for semantic segmentation | Azure Semantic Segmentation (Preview)
I used Azure Data Labelling to prepare my Semantic Segmentation (Preview) Dataset and export it from Azure into my Local System. Now I have images in images folder and Labels in Json file.
I'm trying ...
0
votes
1
answer
212
views
Get proper encoded string value from decoded string
I want to get proper encoded string value from decoded string.
In my database one column is storing value in this way.
UA8SMvak9gq+mjrj6C6BR9atmlA=
This value is saving from distributed memory ...
0
votes
0
answers
257
views
how to decode and decrypt a string in swift
From a server, I get an encrypted and base 64 encoded string, these are criteria used to encrypt it.
aes 256 cbc encryption system with hexadecimal digest
the key is hash sha 512 of a phone number
...
0
votes
0
answers
226
views
Cannot find what is the encoding of the signature obtained by signing with private key
I create a pair of ed25519 keys and then used the cryptography Python library to sign an auth code with the private key:
private_key = serialization.load_ssh_private_key(open('ed25519', 'rb').read(), ...
0
votes
0
answers
80
views
SQL French char encoding issue
I have an address with French chars - Vétéran. In table column it is read as Vétéran when using SMS select. The server language is English.
When I copied Vétéran to Word, it remained the same. I ...
0
votes
1
answer
740
views
Decode data as [String: String] while value can have json in it
So I have JSON, which has string keys and values which can be either strings or custom JSON, when I put json there (even if I put it in quotes) JSONDecoder throws an error "The given data was not ...
0
votes
0
answers
10k
views
Invalid base64-encoded string: number of data characters (13) cannot be 1 more than a multiple of 4
I just started coding with Python , I have an image that is supposed to be decoded by the base64 module as I understood , but I keep getting this error :" Invalid base64-encoded string: number of ...
-1
votes
1
answer
390
views
Decoding HTML data in swift
I am implementing showing html data received from server in web view in swift ... I ma getting html data from server in following format (just part of data string)
I want to convert this to proper ...
0
votes
1
answer
246
views
Reverse Engineering 'UTF-8 Like' Encoding Algorithm
I'm attempting to reverse engineer an encoding algorithm to ensure backwards compatibility with other software packages. For each type of quantity to be encoded in the output file, there is a ...
0
votes
1
answer
388
views
Gmail 'full' body base64url encoding unexpected output
When trying to decode a message from Gmail using official GoogleAPIs, I am running into unexpected issues when trying to decode the body data from the full message get request.
The code used to ...
0
votes
0
answers
90
views
Saving decoded byte data vs print
I have a sql script that is saved as binary data. I read it in the standard way.
with open('data.sql', 'rb') as f:
var = f.read()
var_text = var.decode('utf-8', errors='replace)
When I ...
1
vote
1
answer
2k
views
Given a string which contains only ones and zeros, return the number of substrings with ones more than zeros
Suppose that S is a string containing only 0 and 1. I would like to count the number of not null substrings of S in which the number of 0s is less than the number of 1s.
Using brute-force method given ...
0
votes
1
answer
320
views
How to convert replacement characters into UTF-8 characters with Python after grabbing text using Selenium
I grabbed text from a specific classes child nodes using this subroutine
elements = WebDriverWait(self.driver, 10).until(EC.presence_of_all_elements_located((By.CLASS_NAME, "gamesRow")))
for ...
6
votes
1
answer
32k
views
Unhandled Exception: FormatException: Unexpected extension byte (at offset 5)
The Json response has an gzip encoded string.
var dataList = [
{"Data": "compressedata"},
{"Data": "compressedData"}
];
I tried so many methods to ...
0
votes
2
answers
1k
views
Understanding the need of encoding and decoding in context to saving the strings on disk
I have read the answer here. I understand what a byte stream is (a stream of 1s and 0s), encoding is (a mapping from that stream to what characters that we humans understand) and decoding is (a ...
-1
votes
1
answer
173
views
How to decode "\/" in strings
I am parsing a source that frequently contains / encoded as \/. For example, https:// is encoded as https:\/\/.
What is the name of this encoding? It appreas to be used when sending json in HTML. It ...
5
votes
2
answers
12k
views
Decode image bytes data stream to JPEG
I am struggling to successfully decode a JPEG image from bytes, back to JPEG again.
I started from encoded frame from a MJPG bytes stream, which I want to decode in order to manipulate with OpenCV. I ...
0
votes
1
answer
120
views
Issue in decoding in node js
I have a requirement where I need to encode data in "iso-8859-1" and then convert back it to readable string in node js.
In .Net env:
string encodedData = "VABpAG0AZQAgAHMAZQByAGUAaQBzAA==";
...
1
vote
2
answers
744
views
What is the best way to convert all non display characters in a pandas dataframe?
I am loading data into a pandas dataframe from an Excel sheet and there are a lot of non display characters in many columns that I want to convert.
The most prevalent is an apostrophe being used in a ...
0
votes
1
answer
807
views
Difficulty reading text with pytesseract
I need to read the highest temperature on thermographic images, as shown below:
IR_1544_INFRA.jpg
IR_1546_INFRA.jpg
IR_1560_INFRA.jpg
IR_1564_INFRA.jpg
I used the following code, this was the ...
1
vote
1
answer
3k
views
print (encoding/edcoding) French characters works in txt file but incorrect in excel/csv [python]
I was given a string with special characters (which should be french characters) and want to make it display correctly in csv/excel:
s1 = 'Benoît'
# take a look at encoding
print(s1.encode(encoding=...
0
votes
1
answer
582
views
Convert string representation of a hexadecimal byte array to a string with non ascii characters in Java
I have a String being sent in the request payload by a client as:
"[0xc3][0xa1][0xc3][0xa9][0xc3][0xad][0xc3][0xb3][0xc3][0xba][0xc3][0x81][0xc3][0x89][0xc3][0x8d][0xc3][0x93][0xc3][0x9a]Departms"
I ...
1
vote
1
answer
4k
views
Defining Empty String in Avro Schema
I currently having an issue with the Avro JsonDecoder. Avro is used in Version 1.8.2. The .avsc file is defined like:
{
"type": "record",
"namespace": "my.namespace",
"name": "recordName",
"fields": [...
2
votes
1
answer
5k
views
Base64 encoding/decoding not working with special characters in Java 1.6
I am using JDK 1.6 and facing issue while trying to encoding/decoding French words. My code is under:
String setText = "Vos factures impayées Internet sont";
String encodedText= Base64.encode(setText....
0
votes
1
answer
1k
views
How to convert a string to binary utf-16 and Binary to String in java?
my project requires converting Arabic text to binary , then convert binary to text (reverse process).
I used this code,but I notice that when I use utf-16 to convert string to binary, then read this ...
1
vote
1
answer
630
views
How to decode unknown string format in java
I'm getting xml file which I need to handle in my SpringBoot Rest controller. But I have problem with parsing cyrillic chars. In my controller these symbols look like this: d�鲲𠲨㮮弯.
I was trying to ...
1
vote
0
answers
109
views
Decoding data from WIN10 ssh server (response of paramiko recv()) [duplicate]
I am using paramiko to connect to a win10 server (client is Linux) and for most parts communication is OK.
But when i read the response to a command (via recv()) , i see some strange data.
Example: ...
1
vote
1
answer
106
views
Ruby: How to decode strings which are partially encoded or fully encoded?
I am getting encoded strings while parsing text files. I have no idea on how to decode them to english or it's original language.
"info@cloudag.&...
1
vote
1
answer
607
views
How to read images and labels from the infimnist / mnist8m dataset?
Using the the program at this link, https://leon.bottou.org/projects/infimnist, I generated some data.
As far as i can tell it is in some sort of binary format:
b"\x00\x00\x08\x01\x00\x00'\x10\x07\...
0
votes
1
answer
972
views
Decoding data from serial port (string with integers)
I'm sending string from Arduino to PC using serial communication. Format of message includes char, value and space (separating data). Example message: "H123 V2 L63 V2413 I23 CRC2a".
I have problem ...
1
vote
1
answer
331
views
Error while decoding base64 string to UIImage
I am trying to decode base64 String to UIImage in Swift 4.2. I have tried almost every solution on stackoverflow but it's not working.
I have tried converting the string with NSData, it didn't work. ...
2
votes
1
answer
4k
views
String Decoding in Golang
In Ruby, I'm using the string.unpack method to decode some data. I'm migrating this code into a Golang app, however I can't find a corresponding method in the standard library?
The ruby code is: str....
-1
votes
1
answer
2k
views
Decode ASCII string in Python 3
Got a string in ASCII (with only ASCII value ranges for A-Z, a-z, and " "), want to decode it.
ex. "781059910132" cooresponds to "Nice "
Is there an easy way to do this in Python 3?
-1
votes
1
answer
216
views
decodeString codefights: Program doesn't pass all tests."30/31 Output limit exceeded on test -31". Kindly support
function decodeString(s)
{
let arr = [];
let digitSum = '';
let digitSumArr = []; // for numbers before '['
let i;
//iterating string
for (i = 0; i < s.length; i++)
{
...
0
votes
2
answers
913
views
Decode a ASCII string with Python 2.7.10
I'm fairly new to Python so I'm probably still making a lot of rookie mistakes.
I was comparing two seemingly matching strings in Python, but it always returned false. When I checked the ...
3
votes
0
answers
532
views
How can I determine the encoding used given the plain text string and encoded string?
We are working on exporting a bunch of data from a 3rd party system and bringing it into our own. The only good way to do this is to use the SQL database. We have had a good amount of success finding ...
0
votes
0
answers
880
views
How to decode "Сверд..." data format (name of region in Russia) in .csv file to English in R?
I am working on a project on Machine learning. When I download the .csv file, some of the features have values in an unknown format. Something like СвердловÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°Ñть and Личны...
3
votes
1
answer
2k
views
How do I get audio/video from base64 encoded string?
In JSON file, I am receiving the base64 encoded string. It may contain image file, pdf file, doc or text file or audio/video file.
How can I show/play audio/video in iOS from base64 encoded string?
...
-1
votes
1
answer
61
views
UTF-8 decoding error in PHP [duplicate]
My database value is École Polytechnique Fédérale de Lausanne. I cannot convert to html characters. I tried to convert using following method,
echo html_entity_decode(École Polytechnique Fédé...
1
vote
1
answer
2k
views
java method for decoding via unicode_escape
Python has a nice function to decode hex and unicode characters in Strings, like so:
print "123\x20Fake\x20St\u002e".decode('unicode_escape')
Will print:
123 Fake St.
Is there anything similar in ...
0
votes
1
answer
1k
views
Python Decoding and Encoding, List Element utf-8
just another question about encoding in python i think. I have this programm:
regex = re.compile(ur'\b[sw]\w+', flags= re.U | re.I)
ergebnisliste = []
for line in fileobject:
print str(line)
...
0
votes
2
answers
3k
views
base 64 decoding in shell scripting
For Example I have a file like as follows .
A,Y29tLz9hPTQ2JmM9NDQzNzgmczE9Q0,123
B,FJNLTA2MjQyMDE3LVAmczI9ODQ3MDA,321
I want to print field1,field2(by base 64 decoding),field3
Output ...
4
votes
2
answers
3k
views
Reading data from _transaction_state topic in Kafka 0.11.0.1
I want to read meta data for transaction (which is supported in Kafka 0.11.0.1) so that I can figure out that whether the transaction for a particular transactional ID has been committed or not. ...
0
votes
1
answer
313
views
Decode AES 256?
i have this method for decoding:
-(NSString *)decrypt:(NSString *)encryptedTextValue withSecret:(NSString*)secret
{
NSData *encryptedData = [NSData base64DataFromString:encryptedTextValue];
...
1
vote
1
answer
3k
views
How to decode a base64-encoded email subject string using a Procmail recipe?
This is a simple Procmail recipe to filter emails depending on subject:
:0
* ^Subject: .*Content to filter
$HOME/Maildir/.INBOX.My_filtered_folder/
The above very simple Procmail recipe works without ...
-1
votes
1
answer
1k
views
Python decoding a string from a log file
I am writing a Python to process a log file. The program decrypts a base64 encoded string between two patterns. Whenever I run the code I get "Incorrect Padding Error"
Here is my code
import ...
0
votes
3
answers
1k
views
How to decode String which contains characters like 'Total\x20Value' my actual value is 'Total Value'
How to decode String which contains characters like 'Total\x20Value' my actual value is 'Total Value'
Using javascript it is getting decoded by the browser like:
if I write on browser console:
var a = ...
0
votes
2
answers
3k
views
Decoding multiple encoded string
How do I decode this to get the result below?
/browse_ajax?action_continuation=1\u0026amp;continuation=4qmFsgJAEhhVQ2ZXdHFQeUJNR183aTMzT2VlTnNaWncaJEVnWjJhV1JsYjNNZ0FEZ0JZQUZxQUhvQk03Z0JBQSUzRCUzRA%...
5
votes
1
answer
8k
views
Creating TfRecords from a list of strings and feeding a Graph in tensorflow after decoding
The aim was to create a database of TfRecords.
Given: I have 23 folders each contain 7500 image, and 23 text file, each with 7500 line describing features for the 7500 images in separate folders.
I ...
0
votes
1
answer
551
views
Time optimize C++ function to find number of decoding possibilities
This is an interview practice problem from CodeFights. I have a solution that's working except for the fact that it takes too long to run for very large inputs.
Problem Description (from the link ...