A module that comes with Python, doesn´t register? Programming Web Development by Audun Hi Title: A module that comes with Python, doesn´t register. This is the error message: %Run 'open cv - tot.py' Traceback (most recent call last): File "C:\Users\Audun Nilsen\open cv - tot.py", line 1, in <module> import cv2 # OpenCV for image processing ModuleNotFoundError: No module named 'cv2' I double-checked to … Re: A module that comes with Python, doesn´t register? Programming Web Development by Reverend Jim I tried installing python 3.12 and had the same problem. I typically wait a bit before installing the latest and greatest because I have found it can take a while before packages are upgraded to be compatible (usually wxpython). I was able to install the individual packages under python 3.10. I know that the "next to latest and greatest" … Re: i don´t understand this syntax error when using OpenCV Programming Databases by Reverend Jim What happens if you open a python shell and just type "import cv2"? As I said in your other thread, the problem might be with python 3.12. It imports ok under 3.10. Re: i don´t understand this syntax error when using OpenCV Programming Databases by Audun Thanks. That sorted it. Now, I have a new problem.. I tried the two variations of quotation marks, without the backslash, and got this: >>> %Run 'open cv - tot.py' Traceback (most recent call last): File "C:\Users\Audun Nilsen\open cv - tot.py", line 8 image = cv2.imread("C:\Users\Audun Nilsen\Pictures\… Claude 3 Opus Vs. Google Gemini Vs. GPT-4 for Zero-Shot Text Classification Programming Computer Science by usmanmalik57 On March 4, 2024, [Anthropic](https://www.anthropic.com/) launched the [Claude 3 family of large language models](https://www.anthropic.com/news/claude-3-family). Anthropic claimed that its Claude 3 Opus model outperforms GPT-4 on various benchmarks. Intrigued by Anthropic's claim, I performed a simple test to compare the performances of Claude … 7 NLP Tasks to Perform for Free in Python with Mistral 7b LLM Programming Computer Science by usmanmalik57 In the rapidly evolving field of Natural Language Processing (NLP), open-source large language models (LLMs) are becoming increasingly popular as they are free to use. Among these, the [Mistral](https://docs.mistral.ai/models/) family of models stands out as a state-of-the-art model that is freely accessible to the public. Comparable in … Re: How Do I address ERROR: access violation writing 0x0000000000005140, Programming Web Development by rproffitt Python shouldn't create such an error. Reference https://www.reddit.com/r/learnpython/comments/kv83hc/error_code_exception_access_violation_writing_0x0/ I can't duplicate your issue but if this was mine I'd place a logging command in my python script at each step so I could nail down which line of code threw the error. Tutorial on that at … Re: what's the correct way of learning programming? Programming by Dani Python works as a first language, but I would also recommend Javascript just because it is being used just about everywhere nowadays! However, I guess the bigger question is, as a math major, what’s your objective to learning programming? If you want to make web apps, you might take a very different path than doing some backend calculations for … Fine Tuning Google Gemma Model for Text Classification in Python Programming Computer Science by usmanmalik57 On February 21, 2024, Google released [Gemma](https://ai.google.dev/gemma), a family of state-of-the-art open-source large language models (LLMs). As per initial results, its 7b (seven billion parameter) version is known to perform better than Meta's [Llama 2](https://llama.meta.com/), the previous state-of-the-art open-source LLM. As always, my… Retrieval Augmented Generation (RAG) with Google Gemma From HuggingFace Programming Computer Science by usmanmalik57 In a previous article, I explained [how to fine-tune Google's Gemma model for text classification](https://www.daniweb.com/programming/computer-science/tutorials/541544/fine-tuning-google-gemma-model-for-text-classification-in-python). In this article, I will explain how you can improve performance of a pretrained large language model (LLM) using … How Do I address ERROR: access violation writing 0x0000000000005140, Programming Web Development by A_957 The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation exception that occurred within my application. This type of error apparently usually points to a problem where the code attempted to write to a protected … Re: How Do I address ERROR: access violation writing 0x0000000000005140, Programming Web Development by Dani I don't have any python experience, sadly, but I am super awesome at jQuery. Once you solve this server-side problem at hand, if you find yourself with the jQ side of things not working, please don't hesitate to post. Re: what's the correct way of learning programming? Programming by Reverend Jim As a first language I highly recommend Python. It is free and comes with a simple IDE (idle). For something more robust you can use Microsoft vscode (also free) as the Python IDE. Python has a very friendly syntax and there are a large number of free online tutorials. And you can post questions here for things that are unclear. I've programmed in a… Re: i don´t understand this syntax error when using OpenCV Programming Databases by Reverend Jim Assuming this is python you have to ensure the backslashes are not read as escape characters. Try image = cv2.imread(r'C:\Users\Audun Nilsen\Pictures\pica.webp') Using `r'` in front of a string indicates a raw string and the backslashes will not be interpreted as special unless the backslash is the final character in the string. You could… Re: Extracting values from a regex match Programming Software Development by Tom_45 Question has been answered. The correct pattern is: matches = re.findall(r'<td>(\d+)+<\/td><td>(\w+)<\/td><td>(\w+)', file) Extract Tabular Data from PDF Images using Hugging Face Table Transformer Programming Computer Science by usmanmalik57 In a previous article, I explained [how to extract tabular data from PDF image documents using Multimodal Google Gemini Pro](https://www.daniweb.com/programming/computer-science/tutorials/541449/pdf-image-table-extractor-web-app-with-google-gemini-pro-and-streamlit#post2296083). However, there are a couple of disadvantages with Google Gemini Pro. … AI-powered Code Reviews: The Future of Collaborative Development Programming by SEO_935 AI-powered code reviews are bringing about a revolution in the way developers collaborate, enabling more efficient, accurate, and thorough evaluations of code prior to its integration into the central project repository. This transformation is made possible by leveraging machine learning and artificial intelligence to automate and enhance different… Re: Applying PySide's QAbstractTableModel Programming Software Development by Mark_94 Even although this topic is 11 years old (in 2024), it's still very helpfulby showing how to properly program in Python3. I've readily translated it to PySide6 and it works fine except for one tiny prob: sorting the MP column with "TypeError: '<' not supported between instances of 'str' and 'float'". I'm not sure how to fix it. Why am getting different syntax errors when running a Python script Programming Software Development by Tom_45 I am working on an exercise from Google's Python class dealing with popular baby names. I have the program running properly when using only one filename, but when I try to use the wildcard to get all files with baby####.html files I get differing errors every time I run the program. Here is the problem code: matches = re.findall('<… Track Faces from Videos with Margins Using Deep Learning in Python Programming Computer Science by usmanmalik57 In this article, you will learn how to track faces within a video using the Python DeepFace library. Additionally, you'll discover how to include portions of the video background in face tracking by implementing custom methods that utilize the DeepFace library's `extract_faces()` method for face extraction. I explained how to extract faces from … Reducing Video Frames and Frame Rates (FPS) in Python Programming Computer Science by usmanmalik57 A video is a series of images, or frames, shown in rapid succession. Its frame rate, measured in frames per second (FPS), dictates the display speed. For instance, a 30 FPS video shows 30 frames each second. The frame count and frame rate determine a video's detail, smoothness, file size, and the processing power needed for playback or editing. … Re: Using ChatGPT to Interact with Third-Party Applications in Python Programming Computer Science by catherine_11 Integrating ChatGPT with third-party applications in Python involves utilizing [OpenAI's API](http://www.google.com). Begin by obtaining API credentials, then craft Python scripts to send requests and process responses. Adhere to OpenAI's documentation for optimal integration, ensuring secure and efficient interaction with the ChatGPT model. Re: Reducing Video Frames and Frame Rates (FPS) in Python Programming Computer Science by usmanmalik57 Yes, that's an option, but while you are developing Python applications where you have to process multiple videos, I don't think ffmpeg is scalable enough. Thanks for your feedback r though :) Problem Returning MySQL Stored Procedure results using Python Programming Databases by cored0mp Hey Gang! OK today I am having trouble with my transaction processing application implemented in python/MySQL. Here is some "working" testing code. import psycopg2 from psycopg2 import Error import binascii from binascii import unhexlify import mysql.connector as mysql sql='''CREATE … Re: What is easier, PHP or Python? Programming Web Development by Dani I wholeheartedly agree with cored0mp when it comes to library support. As a PHP’er, it’s been a lifesaver for me knowing that anything I might need, and any popular API I might want to use, can find documentation and extensive support on. At least for everything I’ve tried to do over the past 20 years, I’m not so sure I could say the same for … TensorFlow Keras Sequence Data Generator for Multimodal Classification Programming Computer Science by usmanmalik57 I recently tackled a challenging research task involving multimodal data for a classification problem using [TensorFlow Keras](https://www.tensorflow.org/guide/keras). One of the trickiest aspects was figuring out how to load multimodal data in batches from storage efficiently. While TensorFlow Keras offers helpful functions for batch-loading … PDF Image Table Extractor Web App with Google Gemini Pro and Streamlit Programming Computer Science by usmanmalik57 In my previous article, I explained [how to convert PDF image to CSV using Multimodal Google Gemini Pro](https://www.daniweb.com/programming/computer-science/tutorials/541365/converting-pdf-image-to-csv-using-multimodal-google-gemini-pro). To do so, I wrote a Python script that passes text command to [Google Gemino Pro](https://blog.google/… Converting PDF Image to CSV Using Multimodal Google Gemini Pro Programming Computer Science by usmanmalik57 In this article, you will learn to use [Google Gemini Pro](https://blog.google/technology/ai/google-gemini-ai/), a state-of-the-art multimodal generative model, to extract information from PDF and convert it to CSV files. You will use a simple text prompt to tell Google Gemini Pro about the information you want to extract. This is a valuable skill … Re: Do you think you can create a game with Python Programming Langauges? Programming Mobile Development by Esteban_5 Hi I agree with Reverend Jim, there are several factors that could define which programming language is better, I studied at the university of TECH and what I was taught was to look for the one that would give me more tools to work with more feasibility, and I came to the conclusion that Python is the best language for video games personally. Re: how converte C to VB6? Programming Software Development by Reverend Jim I always recommend ditching VB6. It is super old technology. If you were using Python 2.x I would also advise moving to Python 3.x for the same reason. If you stick with the old you will be left behind. If I were a potential employer I would not hire anyone who only worked in old tech except for the very rare case when it is required to maintain …