task with matrices in python
I was solving algorithm tasks in python and found this task with 2 levels of difficulty.LEVEL 1In any decent image editor and in modern messengers, there is a feature to rotate an image by 90 degrees....
View ArticleWhy can I not use the input function to modify the API?
import requestslatitudeint = input("Enter latitude: ")longitudeint = input("Enter longitude: ")yearint = input("Enter year: ")monthint = input("Enter month(in numbers): ")latitude =...
View ArticleFolium Mapbox wrong tile rendering
So I have a problem, when my zoom is 5 and 8, some parts of map have wrong tile (the "base" of my custom tile).Wrong renderingMy code:f = folium.Figure(width=4680, height=4750)m = folium.Map([36, 138],...
View ArticleSending Results to a Download Client Using Prowlarr API
I've been working on integrating my application with Prowlarr and have hit a bit of a roadblock. I can successfully search through indexers and fetch results using the Prowlarr API, but I'm struggling...
View ArticleWhy do my Windows filenames keep getting converted in FFMPEG?
I'm running a script that walks through a large library of .flac music, making a mirror library with the same structure but converted to .opus. I'm doing this on Windows 11, so I believe the source...
View ArticleSince Spark 2.3, the queries from raw JSON/CSV files are disallowed
Hi i am learning pyspark now and it currently working for the csv data but if i convert it into json data i am getting an error*Since Spark 2.3, the queries from raw JSON/CSV files are disallowed when...
View ArticleAfter changing my discord server to Community Server my own bot doesn't work
So when I activated the community server, my commands like on_member_joun() or on_member_remove() stopped working, but when I turned back to the friend server, it worked. The question is next: Do I...
View ArticlePython Flask: Chatbot and managing sessions
I am making a chatbot and will be hosting it online and naturally I need to use flask sessions (or something similar) in order to keep chat context different for different users. For some reason, when...
View Articleno output when run train command in juputer notebook
when i write this command in jupyter notebook!python -m spacy train C:/Users/Asiana/AppData/Local/Programs/Python/Python312/Scripts/python_project1/modell/config.cfg --output ./output --paths.train...
View ArticleCouldn't install pylab in Pycharm
After entering this in terminal:**pip install pylab ***the response of the terminal wasERROR: Could not find a version that satisfies the requirement pylab (from versions: none)ERROR: No matching...
View ArticlePackage python to exe with cmd pyinstaller
I use jupyter notebook of ANACONDA3. I can execute with jupyter notebook.This is my code.pip install scikit-learn...pip install numpyfrom datetime import datetime...from sklearn.model_selection import...
View Articlemypy Cannot find implementation or library stub for module
I have:foo/├── __init__.py├── bar.py└── baz├── __init__.py└── alice.pyIn bar.py, I import Alice, which is an empty class with nothing in it but the name attribute set to "Alice".from baz.alice import...
View ArticleTrying to connect to Oracle SQL on AWS using Python
I'm trying to connect to Oracle SQL on AWS using Python. I have cx_Oracle installed, ORacle Instant Client path set, and can't seem to figure out the host and service_name. I've checked some past...
View ArticleThe Anaconda launcher takes long time to load
I'm new to coding and decided to install Anaconda because I heard it was the most practical platform for beginners. The problem is, every time I try opening it, it literally takes at least 15 minutes...
View ArticleHow come this code is not presenting any errors, but also fails to print the...
import pandas as pdimport matplotlib.pyplot as pltimport seaborn as snsfrom sklearn.model_selection import train_test_splitfrom sklearn.ensemble import RandomForestClassifierfrom sklearn import...
View ArticleTypeError: list indices must be integers or slices, not str when running...
I have run the following Python script to remove duplcates between two json files based on userid: import json with open("target_user.json", "r", encoding='utf-8') as f1: target = json.load(f1) with...
View ArticleCombine dictionaries with common and nonexistent keys without filling the gaps
Here is a list of dictionaries:dictionaries = [ {"Key 1": "value1""Key 2": "value2""Key 3": "value3" }, {"Key 1": "value4""Key 3": "value5""Key 4": "value6" }, {"Key 1": "value7""Key 2": "value8""Key...
View ArticleHow to run python script on login
I am attempting to load a pyhton script that launches a Firefox Geckodriver under Selenium whenever a specific kiosk user logs in.I've tried launching this via .profile, however geckodriver throws an...
View ArticleDoes eval() have performance advantage in Mojo vs. Python?
I would like to use eval() for validation of short function synthesis. The search space may be fairly large, e.g. more than a million different functions. Functions will be synthesized as a string...
View ArticleHow to get WinID handle as pointer in pyside6
In pyqt, one can access wid as sip.voidptr, using widget.winId(), and then turn it to capsule object using wid.ascapsule()In pyside6, when using widget.winId(), I can only get an int number.How can I...
View Article