Category "python"

python file to excutable file at any operating system

Now I created a python app using tkinter which it should be used in pc, but I am using windows, so I executed the .py file to .exe. My problem now is my program

Freqtrade Python Sell Sign

I am trying to create a sales order using the Freqtrade bot when: The current price hits the entry price + ATR. I don't know how I can retrieve the entry price

How to effectively run tasks parallelly in pyspark

I am working on writing a framework that basically does a data sanity check. I have a set of inputs like { "check_1": [ sql_query_1, sql_query_2 ], "check_2":

Y axis labels are not ordered like the bars in seaborn

I have a data frame called general_stats that has information about YouTube channels like title, number of subscribers and such. I want to plot the channels nam

Empty output for NLTK function in CGI script

I want to use python NLTK library's function in CGI script to tokenize some text, recieved via WEB. If i simply use: someamountoftext = "someamountoftext someam

from django.core.management import execute_from_command_line not working

I am working on a bug project. Which is on Python 2.7, we are migrating to Python 3.9. I am getting import errors in manage.py during importfrom django.core.man

How to add title to the plot of shap.plots.force with Matplotlib?

I want to add some modifications to my force plot (created by shap.plots.force) using Matplotlib, e.g. adding title, using tight layout etc. However, I tried to

UnpicklingError on data received from socket

Context: I have a system with a server.py file and a live_client.py. Server is constantly updating an object. The system works correctly if I send the attribute

Java gateway process exited before sending its port number

I am trying to install PySpark on my Windows 10 to be used on Jupyter Lab. I have already installed Java and running Python 3.7.3: openjdk version "1.8.0_242" O

Django use urls with same ending

I ahve a django project with the application web-api and the following url configuration: main project urls.py urlpatterns = [ path('admin/', admin.site.url

KeyError while reading a CSV file in Python

I am trying to plot the fall of an object (an optical fork to be precise) as a function of time in order to verify that the law of gravity is indeed 9.81. The d

Python: Reading a Windows generated csv with carriage return in column

I'm working on a Python program that needs to read csv files that are produced on a Windows 2012 server machine. The aim of the Python code is to give a min/max

Optimization: Attempting to declare variables in matrix format and exporting in excel format

I have price, cost, demand in different sheets of an excel workbook. Each of these have two dimensions such as Product and Location. Total number of columns(tim

I need to split array to sub arrays of similar values in python

lets suppose i have this queryset_array: queryset_array = [{"category":"a"},{"category":"a"},{"category:"b"},{"category":"b"},{"category":"c"},{"category":"c"}]

How to exclude weekends and holidays from finding the difference between two dates in python

I need to find the difference between 2 dates where certain end dates are blank. I am need to exclude the weekends, as well as the holidays when calculating the

Python valueError: setting an array element with a sequence, TypeError: only size-1 arrays can be converted to Python scalars on MLP

I have this dataset (shape is (36,2)). x is a numerical pattern, y is a binary class (0,1) x y [0.2, 0.3, 0.5 ..... 0.5] 0 [0.1, 0.4, 0.5 ..... 0.9] 1 and so

How to save data for each loop?

I want to save the dictionary in Csv or mat file for each loop, the code is from the link FHN equations import scipy.io as sio trajectory_nonauto = {}

Matplotlib control text properties for legend title

I have a matplotlib plot with a title in the legend and the properties of the title text I want to control, like the font family size etc. import numpy as np

reading data-frame with missing values

I am trying to read some df with few columns and few rows where in some rows data are missing. For example df looks like this, also elements of the df are separ

How to fix tiktok selenium robot detection

How to fix TikTok selenium robot detection Background-Info I'm creating a python selenium bot to do things on the TikTok website. The user will log in manually