Category "python"

Flattening Directory tree in Google Colab

I have a tree of directories like this User-1 Raw --Scan1.img --Scan2.img User-2 RAW --Scan1.img --Scan2.img Etc How would I go about flattening the directo

Scrapy: Can't Crawling App store Reviews Page

Hi guys I'm having some issues to get data from this page from app store: app store reviewshttps://apps.apple.com/us/app/mathy-cool-math-learner-games/id1476596

Cant load spacy en_core_web_trf

As the self guide says, I've installed it with (conda environment) conda install -c conda-forge spacy python -m spacy download en_core_web_trf I have spacy-tra

TypeError('Keyword argument not understood:', 'groups') in keras.models load_model

After training a model using Google Colab, I downloaded it using the following command (inside Google Colab): model.save('model.h5') from google.colab import fi

How to early-stop autoregressive model with a list of stop words?

I am using GPT-Neo model from transformers to generate text. Because the prompt I use starts with '{', so I would like to stop the sentence once the paring '}'

How to get last modified time from pysftp

I am using pysftp to access files on SFTP. But I want to get the last modified date of these files and store it in mongo. This is to access the date again next

How can I use BERT for address matching problem?

I am building an address matching algorithm. The main problem is that previous models like Conditional Random fields (CRF)from Paserator and Averaged Perceptron

Automate the boring stuff - Chapter 4: Coin Flip Solution

I am struggling with the solution of the 'Coin Flip' practice project at the end of chapter 4 in 'Automate the boring stuff' for python programming. I have two

How to connect to Power BI database outside of Power BI?

I'd like to connect to a power BI database and query it using SQL. My first instinct was to use Python's pyodbc package, like so: conn = pyodbc.connect( 'DRIVER

Difference between argparse.Namespace and types.SimpleNamespace?

It seems they both behave exactly the same – both are like dicts but with . literal to access an item, however none of it is even a subclass of another fr

How to programatically get the Model id from google.cloud.automl with Python

Q: How can i programmatically get the model id when finished training the model?. Goal: I will use that id to deploy the model without web interface. Tried: At

Scraping the English Vivino.com reviews from the website

I have two questions about web scraping information from Vivino.com: 1.) With the code below I can scrape information and reviews from the Vivino website, howev

How to get data with JSON format in Clickhouse-driver

I'm trying to get my Clickhouse data in my Django project. I'm using clickhouse_driver and : client.execute('SELECT * FROM myTable LIMIT 5 FORMAT JSON') When I

Django - After Register, Data Should Go To 2 Different Tables (Customer & User)

I am creating an e-commerce website where people can choose to login or not but still the can order and checkout (even if you are an AnonymousUser or Guest user

ERROR: Could not build wheels for coincurve, which is required to install pyproject.toml-based projects

Error while installing bit using Termux on a Samsung Galaxy s10 Android 12 which is not rooted ~ $ pip3 install bit Collectin

Reacting messages with Emojis in Discord.py

I'm making a bot with Python and I want to send messages with emojis. How can I react a message in discord.py? I found this method in stackoverflow but How can

Remove specific string char at the beginning of each lines of a txt file using python

I'm currently working on a script in python. I want to convert an xls file into a txt file but I also want to clean and manage the data. In the xls files, there

import pyzbar.pyzbar - Unable to find zbar shared library

I want to make a script for detecting and reading QR codes from photos. I would like to use PyZbar for that, but I have a problem with some errors. I'm working

Import Error: cannot import name 'ft2font' from partially initialized module 'matplotlib'

import matplotlib.pyplot as plt output ImportError Traceback (most recent call last) <ipython-input-7-a0d2faabd9e9> in <

Install Scip optimization

I'm trying install Scip optimization for python and I'm following a video but in the video it is installing Scip Optimization 7, and I'm installing Scip Optimiz