Hello guys i am trying to implement an algortihm to remove water from underwater images and make image more noticable , but i got an errror ValueError: max() arg is an empty sequence , at the function homomorpic on this line r = max(np.ravel(result[:,:i])) , the error is caused because the result array is empty but i filled it above
How do I get the sub-reddit submission with the highest score with pushshift?
I’m a beginner and I’m sorry if this is completely wrong. So far, I’ve been able to present the fields required (author, subreddit, date created, number of comments, score, submission title, submission description) as well as save this into a dataframe. But I’m suddenly lost when the complicated questions begin such as this one and which day of the week
Python for loop not looping through all the elements? It is only taking the 1st element
I am trying to scrape the data from naukri.com, here I am trying to scrape the location details for each recruiter visible on the page. The code I am writing is : 1st I have extracted all recruiters details in list highlight_table_tag. highlight_table_tag includes all the elements on the page however the loop only takes the 0th element of my
Parsing JSON web scraper output
I am practicing web scraping using the requests and BeautifulSoup modules on the following website: https://www.imdb.com/title/tt0080684/ My code thus far properly outputs the json in question. I’d like help in extracting from the json only the name and description into a response dictionary. Code Desired Output Answer You can parse the dictonary and then print a new JSON object using
how to compare two columns and get the mean value of the the 3rd column for all matching items in the two in python pandas dataframe?
I have the following table named Rides : start_id end_id eta A B 5 B C 4 A C 6 A B 5 B A 3 C A 3 B C 6 C A 5 A B 8 From the Rides Table , I want to Create a new table which should look like something like below : start_id end_id
Can you write to the middle of a file in python?
I would like to write to the middle of a line in a file. for exemple i have a file: Text.txt: Is is it possible to precise an index where: file.write() has to start writing? I have started with this: Answer I think what you can do is to substitute already existing characters with the same amount of other characters
Unable to open pandas python package from Azure Data Studio, while configuring SQL Server 2019 Big Data Cluster
I’m working on setting up SQL Server 2019 Big Data Cluster. One of the initial steps is installing python package: panda. Post installation, when I try to import the package, I get the following exception in Azure Data Studio. import pandas ModuleNotFoundError: No module named ‘pandas’ I don’t get this exception, when I load the package from command-prompt/python. This could
How to create a list of images and their names in a folder
I am using the following code to create a list of image files with tif extension. The current result of the code is a list with the address of the .tif files. result: How can I revise the code to create two lists a) name of the file with .tif b) name of the file. here is the example: edit
Segmentation fault when importing a C++ shared object in Python
I have the following shared object: MyLib.cpp That I compile with: g++ -fPIC -shared -o MyLib.so MyLib.cpp I then use it with the following Python script: script.py Like this, it works perfectly, but if I uncomment the line //var = 10;, Python makes a segmentation fault (Python 3.8). This happens every time the object MyClass makes a change to one
Is it necessary to discard outliers before applying LSTM on time series
I am trying to detect anomalies on a time series that controls battery voltage output. I find that my original dataset has some outliers. In this case do I need to remove those points using InterQuartile Range (IQR) or Zscore? of course before using the LSTM keras model Answer Removing or not removing outliers all depends on what you are