Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
python2
- Page 1
Re: How can I upload a tar.bz2 file to openstack swift object storage container
Programming
Software Development
17 Hours Ago
by Hanginium65
Good day, Salem. My apologies for taking so long to reply to your suggestion. I refactored my code to read the contents of the tar.bz2 file and then pass them as a file-like object to the 'put_object' and also to change the content type for the file transfer to "application/octet-stream". The first was sent through to object storage …
Re: How can I upload a tar.bz2 file to openstack swift object storage container
Programming
Software Development
15 Hours Ago
by Salem
I don't understand why you need to extract all the files from the compressed `tar.bz2` just to upload to a backup. Also, line 69 is now meaningless having just posted only a snippet of the code. Before the error, what was the last `logger.info` message?
Re: Installing programs from Github
Programming
Software Development
6 Days Ago
by rproffitt
> Python is an interpreted language, which means the source code of a Python program is converted into bytecode that is then executed by the Python virtual machine. As such the .exe would be the Python virtual machine and not your Python apps.
How can I upload a tar.bz2 file to openstack swift object storage container
Programming
Software Development
6 Days Ago
by Hanginium65
I wrote a Python script that included the python-swiftclient module to connect to the OpenStack Object Storage and upload some files to the OpenStack Object Storage container It works great if I upload a file that ends with the extension .gz however, I’m getting an error regarding the ‘TarFile’ object having no attribute ‘read’ after running my …
Re: How can I upload a tar.bz2 file to openstack swift object storage container
Programming
Software Development
5 Days Ago
by Salem
First, let's prepare two tar files using different compression schemes for demo purposes. $ cat foo_1.txt This is file 1 $ cat foo_2.txt This is file 2 This is file two This is file too # Three tar files, two compressed and one uncompressed for reference $ tar -j -c -f foo.tar.bz2 foo_1.txt foo_2.txt…
Re: Installing programs from Github
Programming
Software Development
6 Days Ago
by Reverend Jim
Further... Python gets converted to byte code which is then cached in a sub-folder. As long as the source code and packages have not changed there is no need to reconvert so subsequent runs should start faster. Also, I strongly recommend that you look into wxpython as a much better alternative to tkinter. Wxpython is a wrapper for wxwidgets …
Paris Olympics Chatbot- Get Ticket Information Using Chat-GPT and LangChain
Programming
Computer Science
6 Days Ago
by usmanmalik57
I was searching for Paris Olympics ticket prices for tennis games recently. The official website directs you to a [PDF document](https://tickets.paris2024.org/obj/media/FR-Paris2024/ticket-prices.pdf) containing ticket prices and venues for all the games. However, I found the PDF document to be very hard to navigate. To make things easier, I …
Installing programs from Github
Programming
Software Development
6 Days Ago
by Audun
Hi I downloaded Tkinter Designer, but there´s no exe there. I´ve used Thonny as a "compiler" for running scripts, and I used it to "make" a a simple program, but I don´t know how to save as an exe, and I don´t know how I would put these files into Thonny. Am I even using the right program ?
Paris Olympics Ticket Information Chatbot with Memory Using LangChain
Programming
Computer Science
2 Days Ago
by usmanmalik57
In my previous article, I explained how I developed a simple chatbot using LangChain and Chat-GPT that can answer queries related to Paris Olympics ticket prices. However, one major drawback with that chatbot is that it can only generate a single response based on user queries. It can not answer follow-up questions. In short, the chatbot has no …
Re: How Do I address ERROR: access violation writing 0x0000000000005140,
Programming
Web Development
3 Weeks Ago
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 …
7 NLP Tasks to Perform for Free in Python with Mistral 7b LLM
Programming
Computer Science
2 Weeks Ago
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 …
ABC for Github-programs and Python
Programming
Software Development
1 Week Ago
by Audun
Hi I want to make use of GitHub-programs, and so I downloaded a bunch of Python-tools. When I run this command in "Python 3.12", which looks like CMD to me, I get a syntax error. "To create a virtual environment, Python supplies a built in venv module which provides the basic functionality needed for the virtual …
Re: ABC for Github-programs and Python
Programming
Software Development
1 Week Ago
by Reverend Jim
I have an apps folder on D: where I keep all my portable/homegrown software. Let's say I want to create a virtual enviromnent in `D:\apps\MyVirtual`. To do this I open a command shell and do D:\>cd apps D:\apps>python -m venv MyVirtual If I install any packages in this session, they will be installed in the virtual python. …
Re: ABC for Github-programs and Python
Programming
Software Development
1 Week Ago
by Reverend Jim
I have developed a number of GUI applications in python. I found that the wxpython package was far better than tkinter. wxpython is based on wxwidgets which is essentially windows controls. Because wxwidgets are compiled for each major system, controls rendered by wxpython look like the native controls for whatever system is hosting.
A module that comes with Python, doesn´t register?
Programming
Web Development
1 Week Ago
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
1 Week Ago
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" …
Retrieval Augmented Generation (RAG) with Google Gemma From HuggingFace
Programming
Computer Science
4 Weeks Ago
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
3 Weeks Ago
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
2 Weeks Ago
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: i don´t understand this syntax error when using OpenCV
Programming
Databases
1 Week Ago
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
1 Week Ago
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\…
Re: i don´t understand this syntax error when using OpenCV
Programming
Databases
1 Week Ago
by Audun
I tried that using Thonny, and I´m getting the same result. I tried the same in the "CMD" that opens when I press Python 3.12, and what happened was, it just said nothing and went back to an empty "line", or whatever. I suppose that´s a good sign? It says syntax error a lot on there too. What sort of programs do you use …
AI-powered Code Reviews: The Future of Collaborative Development
Programming
3 Weeks Ago
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
2 Weeks Ago
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.
Claude 3 Opus Vs. Google Gemini Vs. GPT-4 for Zero-Shot Text Classification
Programming
Computer Science
1 Week Ago
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 …
Re: what's the correct way of learning programming?
Programming
1 Month Ago
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 …
Why am getting different syntax errors when running a Python script
Programming
Software Development
1 Month Ago
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
2 Months Ago
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 …
Re: Using ChatGPT to Interact with Third-Party Applications in Python
Programming
Computer Science
1 Month Ago
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.
Problem Returning MySQL Stored Procedure results using Python
Programming
Databases
2 Months Ago
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 …
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC