Quantcast
Browsing all 13921 articles
Browse latest View live

where to mock in python

I'm working with python for some years, and when it comes to unit testing and mocking I used to mock the collaborators of the unit under test where they are declared, for example if I want to mock a...

View Article


How to send a camera capture frame to YouTube streaming using ffmpeg

import subprocess import cv2# YouTube streaming settingsYOUTUBE_URL = "rtmp://a.rtmp.youtube.com/live2/"KEY = "..."# OpenCV camera setupcap = cv2.VideoCapture(0)cap.set(cv2.CAP_PROP_FRAME_WIDTH,...

View Article


Scraping Data from Framework Documentation and Preparing for Fine-Tuning...

I'm working on a project where I aim to scrape data from documentation of frameworks like Vue.js and prepare it for fine-tuning Gemma 2b model. I've developed a Python script using BeautifulSoup to...

View Article

TypeError: compute_predictions_logits() missing 2 required positional...

I want to train albert v2 model the squad dataset, but when I run it. I am faced with this error.TypeError: compute_predictions_logits() missing 2 required positional arguments:...

View Article

How to eliminate the telephone emoji in unicode?

During web scraping and after getting rid of all html tags, I got the black telephone character \u260e in unicode (☎). But unlike this response I do want to get rid of it too.I used the following...

View Article


Not all objects are found in a "SELECT" command

I have this function that do a "SELECT" query to find computers in SCCM. I do get get some objects, but not all computers are found, even that I can see them in the SCCM console. I don't get any errors...

View Article

Python scraper for facebook marketplace isn't working anymore

Since yesterday, I encountered an issue where my facebook marketplace scraper ceased to fetch data, I'm currently using scrapy due to his features, am I doing any mistakes? Output has been shared on my...

View Article

virtualenv activate script missing

I have installed python and virtual environment on linux, but every time I try to create a new virtual environment the bin folder is missing many files such as the activate script. I only succeed if I...

View Article


Python argparse: Make at least one argument required

I've been using argparse for a Python program that can -process, -upload or both:parser = argparse.ArgumentParser(description='Log archiver arguments.')parser.add_argument('-process',...

View Article


Solving Hcaptcha using 2captcha to automate website search (Python)

I'm trying to automate a web search via Python.The website is behind hCaptcha where I'm using 2captcha solver.Below I've replicate the same behavior as web browser does but I'm still being asked to...

View Article

Unable to create clientid-secret in Azure Active Directory

I am trying to generate a New ClientID and Secret for an Application in Azure Active Directory using client_credentials flow using code below.The application used to run this script has...

View Article

Compare two CSV files and output lines not found in first file into a third...

I have two CSV files which are file1.csv, and file2.csv. Both have multiple columns as follows:a. file1.csvusername,user id,access hash,name,group,group...

View Article

Selenium webscrapping element

I am trying to do webscraping with Selenium (Python) from a website that has the following structure (I anonymized the html) but the GET part does not work..I would like to retrieve the following...

View Article


Switch wireframe to shade all [closed]

I need a python script that in maya will switch wireframe to shaded (key 5:smooth shade all ). Or just enable shaded.

View Article

Import Python files from a c++ project

I have a c++ submodule inside my Python project. The file tree looks like this:Project |-src |-main_dir |-utils |-util.py |-modules |-cpp_module |-scripts |-py_files |-__init__.py |-file.pyI need to...

View Article


Error trying to restore a Dialogflow CX agent with a data store in the python...

I'm trying to restore the contents of a Dialogflow CX agent into a new different agent. Basically trying to clone an agent. The original agent has a data store associated with it in order to make LLM...

View Article

Robot Framework how swith active screen

I need to change the foreground program in Robot Framework.The programs are Windows. (ex: calc.exe or notepad.exe)how can I do?I use the Sikuli library but I can use others tooi have tried: Switch...

View Article


Python function to download zip file

I am trying python function to download zip file https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.69/win32/chromedriver_win32.zip I tried this and the file is downloaded but damaged...

View Article

pip module they disappear after reboot

I don't understand why (home assistant on raspberry pi 4), after installing modules with pip, when the server is restarted they disappear..install before rebootafter reboot

View Article

scraping url results in "Loading..." content

I am trying to read a url in python 3.8 but the html content only shows something ending in "Loading..."from urllib.request import...

View Article
Browsing all 13921 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>