Quantcast
Browsing all 13921 articles
Browse latest View live

Python MySQL (import pymysql)

If I use IDLE editor there is no any error occurs. but when I use sublime or VS code and for output I run my file (python test.py) in terminal or CMD it generate this error I try many commands to...

View Article


Image may be NSFW.
Clik here to view.

Animating Circles on a Matplotlib Plot for Orbit Simulation in Python

Intro to the taskI am working on a simulating the orbit of moon Phobos around the planet Mars. I have completed the task of using numerical integration to update the velocity and position of both...

View Article


Python–Inserting a Row in Excel

I've been searching for a solution for the last few days, and I never thought something so simple would be so near-impossible to find.The projects I'm working on are stored in Excel files (from before...

View Article

Image may be NSFW.
Clik here to view.

Converting multiple images into Base64 string and and save it in folder with...

import base64import jsonimport uuidimport osfrom os import listdirfile_path="C:/Users/***/Documents/Projects/Falsk_API_Img2Base64/image/"output_path="base64_txt_folder/"Unique_ID = uuid.uuid1()def...

View Article

Collect specific filenames using regex

I have a list of filenames. I want to collect filenames that are exactly one of these three patterns:foo.extfoo-*.extfoo.*.extfoo is a variable, * can be anything, ext is a file extension.How would I...

View Article


Passing user's local timezone to celery in django app

I have a requirement where i want to show date time in user's local datetime. For which I have added a middleware code in django which gets the local date time from user's session through browser and...

View Article

How do I access an a dictionary element within in a list within a dictionary

I have the following data structurer returned from an API and I need to manipulate the "expiresAt" element. I can't understand why I am getting the list index is out of rangeUser = {"name": "Russell...

View Article

Audio Recording Using Earphones/Headset on Python

Is it possible to record a conversation call while using headset/earphones? And if so, is it possible to do it with python script?As of now, I can only record the audio using the default microphone and...

View Article


Compression of ordered integer list

I'm reading the book "Introduction to information retrieval" and I have some practical doubt. In the book there is a chapter dedicated to the compression of the index (dictionary and posting list). For...

View Article


Image may be NSFW.
Clik here to view.

Converting Matplotlib's filled contour plot (contourf_plot) to GeoJSON

I am working on a project where I have successfully generated filled contour plots using plt.contourf in Matplotlib in a Google Colab environment. Now, I am attempting to convert these filled contour...

View Article

Trouble with translit latin names to cyrillic

Briefly, I have 2 main columns “first name”, “last name” for storing data with first and last names, which are in Latin.I tried to use different libraries based on the type of transliteration, but they...

View Article

Python | How to translate only the text in an hwp file while keeping all...

How to translate only the text in an hwp file while keeping all images, formatting, and formatting?I used Google Translate and olefileAfter the hwp file is entered as input, only the text must be...

View Article

using python pandas to filter row value that within that dataframe column

i'm very new to python transformation world using pandas! I'm here to asking some code problem stuck by myself.For my case, i'm using python pandas to filter row value without eliminate them - as just...

View Article


How to split dictionary into multiple dictionaries fast

I have found a solution but it is really slow:def chunks(self,data, SIZE=10000): for i in xrange(0, len(data), SIZE): yield dict(data.items()[i:i+SIZE])Do you have any ideas without using external...

View Article

Image may be NSFW.
Clik here to view.

Machine learning model selection for multiple dataframes

I have 365 dataframes each containing 30 rows. Each row represents a day in the future.Dataframes contain 4 features and target. The main feature is the amount of orders for each day for the next 30...

View Article


Image may be NSFW.
Clik here to view.

Issue Refreshing excel pivot table using python

I'm trying to refresh excel pivot table using openpyxl library.data sheetresult sheetIf I update values in data sheet, the pivot table in result sheet gets updated only when I reopen the excel file. I...

View Article

Compiling mod_Wsgi with python 3.11 on Amazon linux 2: fatal error: Python.h:...

Full output:In file included from src/server/mod_wsgi.c:22:0:src/server/wsgi_python.h:26:10: fatal error: Python.h: No such file or directory #include <Python.h> ^~~~~~~~~~compilation...

View Article


Deploy machine learning model on hugging face

Can anyone help me in deploying the machine learning model which is built with streamlit on hugging face.I uploaded app.py file, .hdf5 model and requirments.txt file. I'm getting build error. always it...

View Article

Image may be NSFW.
Clik here to view.

How to make a DAG in Apache Airflow run like a simple cron job?

Airflow scheduler kinda left me scratching my head for the past few days as it backfills dag runs even after catchup=False.My timezone-aware dag has a start date of 13-04-2021 19:30 PST or 14-04-2021...

View Article

Image may be NSFW.
Clik here to view.

ModuleNotFoundError: No module named 'kdconnector' in test script after...

I created the following script to test for ModuleNotFound error I am getting in other scripts.#kdconnecotsite/facebookapi/methods/testing.pyfrom kdconnector.models import Master, ClientAccounts,...

View Article
Browsing all 13921 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>