Category "python"

Why I'm getting segmentation fault with python3 C-API and c FILE *

I get segmentation fault when i try to pass opened python 3 file object to c routine via FILE * pointer. I try porting a python 2 code to python 3 and as so far

Another approach to create and form Tfrecord for training and testing data

I am currently using this command to create a train.record file !py generate_tfrecord.py -x C:/Users/Desktop/dataset/Workspace/images/train -l C:/User/Desktop/d

Why I'm getting segmentation fault with python3 C-API and c FILE *

I get segmentation fault when i try to pass opened python 3 file object to c routine via FILE * pointer. I try porting a python 2 code to python 3 and as so far

Another approach to create and form Tfrecord for training and testing data

I am currently using this command to create a train.record file !py generate_tfrecord.py -x C:/Users/Desktop/dataset/Workspace/images/train -l C:/User/Desktop/d

VSC: How to auto close curly brackets in f-strings

Hi I want to ask if it's possible to enable auto closing curly brackets in f-strings in Visual Studio Code. In Python you use often f-strings and therefore you

DF with values for Time Intervals

I am trying to make a manual dataframe.. I would like to have a time stamp with a time interval, for example: df1: Time Interval Price 10:00 - 11:00 $15 11:00

Getting AttributeError: 'NoneType' object has no attribute 'shape' error while woring in Kivy

I am exploring kivy to deploy my ml model. I have wrote the code to access the camera using kivy but I'm getting AttributeError: 'NoneType' object has no attrib

" End of script output before headers" error in Apache

I'm trying to use python cgi module with apache, but I'm getting "500 Internal Server Error ". I've configurated the server following those instructions. I trie

Is there a way to make directional line with geographic data in Hvplot

I'm using hvplot to make flow representations. So far, looking in the documentation, I haven't found ways to direct the lines. I'm using the line representation

Warning when fitting the LSTM model

When I try to fit my model i get an error. Here is the code: model = Sequential() model.add(LSTM(128, activation='relu', input_shape=(trainX.shape[1], trainX.sh

ImapLib How can I limit the number of messages fetched?

I have many e-mail messages in the inbox which I am trying to clean up. I am using the following code I found on the net, but it is exceeding the Maxline limit.

Is there a way to make directional line with geographic data in Hvplot

I'm using hvplot to make flow representations. So far, looking in the documentation, I haven't found ways to direct the lines. I'm using the line representation

using pandas to replace header of dataframe

I have an XYZ file in the following format X[m] Y[m] DensD_1200c[m] 625268.27 234978.67 7.24 625268.34 234978.52 7.24 625268.38

ImapLib How can I limit the number of messages fetched?

I have many e-mail messages in the inbox which I am trying to clean up. I am using the following code I found on the net, but it is exceeding the Maxline limit.

How to count an element that exceed our criteria in a list that is in a list that is also in a list (a list with a depth of 4 lists (?))?

I'm trying to count how many element that is exceed some criteria (for exemple: 0.7) and then convert them into percent, the element is in a multiple list that

column transformer on dataframe for one-hot encoding

3 4 \ 0 macrolide-lincosamide-streptogramin macB 1 macrolide-lincosamide-streptogramin macB 2

column transformer on dataframe for one-hot encoding

3 4 \ 0 macrolide-lincosamide-streptogramin macB 1 macrolide-lincosamide-streptogramin macB 2

Taylorseries of ln(1 + x) with Sympy

I was trying to make a function, which computes the taylorseries of ln(1 + x), which takes a z argument (the value of x) and a k argument (till which term it sh

Getting a 400 Response Spotify API Python

I am trying to use requests.get with the Spotify API and I can't figure out why I keep getting a 400 response. I am working in an .ipynb file in Jupyter Lab run

How to save certain ogrinfo results to a variable?

I am using gdal's ogrinfo command in Python to obtain information about a shapefile. My code is as follows: from subprocess import Popen, PIPE args = ['ogrinf