I run: And I get: I am trying to follow this tutorial: https://tutorials.technology/tutorials/59-Start-a-flask-project-from-zero-building-api-rest.html Other info: I recently made my .bash_profile it contains: What should I do to properly start virtualenv? Answer That should be in .bashrc, not .bash_profile. …
How to merge lines after HoughLinesP?
My task is to find coordinates of lines (startX, startY, endX, endY) and rectangles (4 lines). Here is input file: I use the next code: I get the next results: From the last image you can see big amount of small red lines. Questions: What is the best way to merge small lines? Why there are a lot of small
Top 10 features SVC with rbf kernel
I’m trying to get the top 10 most informative (best) features for a SVM classifier with RBF kernel. As I’m a beginner in programming, I tried some codes that I found online. Unfortunately, none work. I always get the error: ValueError: coef_ is only available when using a linear kernel. This is th…
Split audio files using silence detection
I’ve more than 200 MP3 files and I need to split each one of them by using silence detection. I tried Audacity and WavePad but they do not have batch processes and it’s very slow to make them one by one. The scenario is as follows: split track whereas silence 2 seconds or more then add 0.5 s at th…
Flask url_for – incorrect static folder path
I’m trying to add an image to my quiz.html page with Flask using: When I look at the page source, it’s interpreted as: http://127.0.0.1:5000/quiz/static/img/question-mark.png rather than: http://127.0.0.1:5000/static/img/question-mark.png Yet, my .css files and .js files load in quiz.html using th…
Trouble running Python script CRON: Import Error: No Module Named Tweepy
Background: I am following Crontab not running my python script in an attempt to debug and run my python script using CRON. Per SO suggestions, I tried /usr/bin/python /Users/eer/Desktop/myscript.py on the terminal. Problem: However, I get a an error: ImportError: No module named tweepy. So, I tried to pip in…
Python – Send item to next page in Word
I am trying to send text to the next page in a .docx file using Python. So far, I have written a some code that will locate a certain word in a .docx file (using python-docx): Now I want to send each occurrence of “Hello” to a new page so that each page in my Word document starts with the
plot multiple pandas dataframes in one graph
I have created 6 different dataframes that eliminate the outliers of their own original data frames. Now, I’m trying to plot all of the dataframes that eliminate the outliers on the same graph. This is my code that eliminates the outliers in each data frame: If I remove the comment newdf.plot() I will b…
How to disable manual resizing of Tkinter’s Treeview column?
Since I can’t horizontally scroll Treeview column due to what appears to be Tk/Tkinter limitation, I want to make it sticky so it is attached to the frame. The issue is that user can manually resize Treeview column which can mess up my interface in a certain way. Is it possible to disable such functiona…
Run Makefile on pip install
I have some protocol buffer definitions which need to be built to Python source as part of the pip install process. I’ve subclassed the setuptools.command.install command in setup.py but I think it’s trying to run the Makefile after the package is installed so the sources aren’t recognised. …