3,170 questions
1
vote
1
answer
44
views
pandas.read_csv uses only utf-8 encoding for django file upload
I'm testing django using file uploads. Was facing a strange issue, when despide which encoding I choose, I'm always getting same error message that pandas is trying to decode with UTF-8
pd.read_csv(...
1
vote
1
answer
106
views
Encode.pm UTF-8 vs utf-8 vs UTF8 code example does not work as I expected
I'm trying to understand the difference between UTF-8, utf-8, and UTF8 as described at the very bottom of Encode.pm.
#!/usr/bin/perl
use strict;
use warnings;
use Encode;
printf "Perl: %s, ...
0
votes
0
answers
146
views
LI-FI based image transmission using ESP32
Dears, i'm working on a LiFi image transmission project using ESP32 microcontrollers.
I then use 2 microcontrollers, one as transmitter through laser and another as receiver through an LDR. So far, ...
2
votes
1
answer
136
views
How to convert a string variable into a numeric variable?
I have data from a survey with variables containing strings that I would like to convert to a numeric value for analysis. They also contain some blanks. I use Stata 15.1 to perform the analysis. Here ...
-2
votes
2
answers
131
views
How can I extract data from this encoded string? [closed]
I received this string as a response from a private API of a sports betting site: https://sport.synottip.cz:
...
0
votes
0
answers
95
views
Why Java Encoder and Decoder Not Working Correctly
How to properly encode strings in java? I'm trying to encode the letter Ü in utf-8 and I'm getting garbage results - d093d19a instead of C39C. What could be the problem?
package org.example;
import ...
2
votes
2
answers
358
views
Encode Struct to map[string]any with mapstructure.DecodeHookFunc
How can I encode struct with github.com/mitchellh/mapstructure, like:
type Struct struct {
CreateDate *timestamppb.Timestamp `mapstructure:"create_date"`
}
to:
map[string]any{
"...
0
votes
1
answer
101
views
Encode is giving error as "The data couldn't be written because it isn't in the correct format"
I have one API where based on parameters data is changing.
Response 1
{
"success": true,
"statusCode": 200,
"errorLst": [],
"succcessMessage": null,
&...
-1
votes
1
answer
89
views
PHP JWT not verified other than PHP [closed]
I am using PHP firebase JWT for implementation of JWT in my PHP app. Here is my code
$payload = [
'iss' => 'http://test.com',
'aud' => 'http://test.com',
'iat' =&...
0
votes
2
answers
460
views
How to create kubernetes generic secret without base64 encoding?
for example I'm creating a kubernetes generic secret using following:
kubectl create secret generic passwords \
--from-literal=TestUser='mypass' -n mynamespace
And I will get the following secret:
# ...
2
votes
2
answers
128
views
How to correctly encode special characters in URL parameters with `requests.get()` in Python?
I want to grab some content from a website using requests.get() on jupyter notebook, with a Python version of 3.10.
The website is a simple search engine with a search bar and some buttons.
When I ...
0
votes
1
answer
106
views
Raw gzip data contains non-ASCII characters
I am working with gzip raw data that contains non-ASCII characters that I am unable to decompress and decode.
I am getting the data from Firestore through the python client and the payload looks like:
...
0
votes
0
answers
53
views
How to remove encoded characters in a column? [duplicate]
I'm cleaning a dataset and there's a column named 'city' which the city name has encoded characters.
My first try was to use the method decoded, but then I noticed the city names were in string format:...
1
vote
4
answers
163
views
Create regex-like (run length encoding) of string s for blocks of a given length k
I am looking for python code to perform a run length encoding to obtain a regex-like summary of a string s, for a known length k for the blocks. How should I tackle this?
e.g.
s=...
1
vote
1
answer
127
views
like / ilike with encode(bytea) not work with unicode
I have a system where I need to compare bytea values (case insensitive in this case). For this purpose, I use encode to convert the bytea values into strings which I then compare. This works as ...