19,152 Topics
I just learned the 'head scratching way' that module names come up from nesting code. The code can be nested from within Python in combination with a "NoNo" like calling a helpful code snippet the name of an official module like 'textwrap.py'. More or less by accident this snippet ended …
I have been coding with Python for many years. Every now and then I discover in my own collection of helper files something that just astonishes me about the language. Here is one example:
**Introduction** You know that being effective is the key to success in any business domain. However, you may be wondering how to improve employee performance. In order to do this, it’s important to have tools at hand that will help you measure and track employee performance in real-time and act …
I am asking this because I am habitually intrigued by numbers. Python seems to be a good language to explore all sorts of numeric facts. Do you have any 'tricks' hidden away? Here is one about the number 61 I recently bumped into:
I’m working on a small informational project where the same basic type of information needs to be maintained across a fairly large number of entries. The challenge is keeping the data organized and easy to update without ending up with duplicated fields or a structure that becomes difficult to maintain. …
Just asking about a good approach for the user.
Pyqt6 has undergone some major improvements from its earlier versions. I used to code in versions 5 and even much earlier, and also its license-free PySide cohort. I am hoping for any advice on easing this switch!
I have been writing small Python utility programs, a few lines of code using module 'glob' that go through a working folder and search for strings in text and code files. Also have one that can give you a slide show of any image files there. These programs are tiny, …
I have watched a fair amount of those and only a few impress me! The once that sound like church sermons (do it my way ...) are the pits! I think Corey Schafer has good presentations, like his style and voice!
I am in the process of rediscovering python after a dire cardiac episode. Used to be very active under my favored nickname vegaseat, not 'seat' but 'eat'! Got tired of the arbitrary jolts from MS and Windows 11 and switched totally to LinuxMint. Actually, my commercial grade 'HP 17 laptop' …
I’ve been working on a small Python API client recently, and I realized the request itself is usually the easy part. At first, my code was basically just: requests.get() → raise_for_status() → parse JSON. That worked fine until I started running into timeouts, 429 responses, and the occasional 502/503. The …
I recently completed, for the most part, a wxPython app to convert speech to text in files containing an audio stream. As someone who is hearing impaired I find I am relying more and more on captioning. I am also finding that a number of videos, even when they include …
This is a little project I threw together for exchanging messages between two computers. It started as a way for my wife and me to exchange messages when one of us was inside and the other outside in the hammock. I tried various approaches involving a shared folder (a bit …
Here's a fun one... How would you solve a basic simultanous equation with PHP? I have an array with a range [high,low] of [378,395] and I want to normalise the data in that array between the values of [-1, 1]. From that, using `x => ax + b`you get the …
I'm looking for help on CloudFormation Template for Glue Jobs orchestration for below scenario: Suppose I have 10 AWS Glue Jobs, 4 jobs should be executed parallel and 6 jobs should be executed sequentially. If any job failure, send Workflow "Failure" notification along with the failed Glue Jobname. Job1 Job2----job5-->job6-->job7 …
Now a days AI is very popular among all of us. So the question arires that which programming language should i learn to get master in AI. Making Ai programmes. Does this questions arise in your mind?
So am working with .poly files (the game file type for polytoria) and am working ot convert .rbxl to .poly but .poly is XML and .rbxl is binary YES I DO KNOW THAT .rbxlx exist which is also XML but I also want to convert .rbxl files so uh PLEASE …
Hi everyone, I've been comparing MirrorFly and Chanty recently, and I'm a bit confused about where each one fits. Chanty seems to be a straightforward team messaging platform, whereas MirrorFly appears to offer more customization and communication APIs. Has anyone here actually used both? Is MirrorFly genuinely better, or is …
I am Miyazaki. I am currently developing a platform that matches cafes with users, similar in concept to the flexible marketplace model used by Airbnb. The platform is designed to help users easily discover cafes that match their preferences and needs. At this stage, the design documentation and MVP development …
Hii I am a developer working on a blockchain MVP development. I want to add MVP features to the app, but I am not sure where to start. Can anyone provide some guidance? Thank You
Hello everyone! I want to use bash from python, however the os.system([I]command[/I]) seems to act only on one command at a time. I want to use complete commands, also containing control flow statements, like If and While, and to call them from python. something like this code in bash: T1="foo" …
Stock price prediction is a challenging task that requires analyzing historical trends, market sentiments, economic indicators, and company performance. One of the popular methods for stock price prediction is using deep learning models, such as convolutional neural networks (CNNs). CNNs are a type of neural network that can extract features …
So here, I am gonna to ask developers around which is the most popular language is used to develop a game for students or professionals.
I’m working on a mid-sized TypeScript project and running into a weird issue with type narrowing. Inside a callback function (specifically inside a .map()), TypeScript refuses to narrow a union type even though I’ve added all the checks. Outside the callback it works fine. Is this a known limitation, or …
Hi this is Palak, I am in third year of my engineering and my interest and strength is python, to enhance my skills into next level I need more study in this field therefore I want to know which python course will be best for me to enhance my skills …
Hey everyone, I’ve been working on a side project that I think might solve a pain point for a lot of Python devs: a high-performance, Excel-like DataGridView for Python apps. If you’ve ever wanted to embed a powerful, customizable grid (think sorting, filtering, cell editing) into your tools—but without the …
I’m currently working on my final year project in python , developing an Online Health Management System. These days, I’m focusing on documenting the project. Does anyone know of any useful or professional documentation samples available online, or could anyone share some references? It would really help me improve the …
In my previous article, I presented a [comparison of GPT-4o and Claude 3.5 Sonnet for multi-label text classification](https://www.daniweb.com/programming/computer-science/tutorials/542629/openai-gpt-4o-vs-claude-3-5-sonnet-for-multi-label-text-classification). The accuracies achieved by both models were relatively low. Fine-tuning is one solution to overcome the low performance of large-language models. With fine-tuning, you can incorporate custom domain knowledge into an LLM's …
I had some fun this weekend having a go at pdfkit with mixed results. Can anyone nominate a candidate for best PDF writing?
On April 14, 2025, OpenAI released [GPT-4.1](https://openai.com/index/gpt-4-1/) — a model touted as the new state-of-the-art, outperforming GPT-4o on all major benchmarks. As always, I like to evaluate new LLMs on simple tasks like text classification and summarization to see how they compare with current leading models. In this article, I …
If anyone is interested, [this documentary](https://www.youtube.com/watch?v=GfH4QL4VqJ0) just got posted to Youtube.
I subscribe to several Python newsletters, one of which comes with at least partial access to tutorials. To anyone who has dabbled in Python, one of the first things recommended is to enter the command import this which renders the output Beautiful is better than ugly. Explicit is better than …
for ref: [code_link see main](https://github.com/yotamarker/LivinGrimoire/tree/main/livingrimoire%20start%20here/LivinGrimoire%20python%20easy%20start%20packet) as you can see this structure allows the coder to add functionality(skills) to the object with 2 main ways: 1 with code a brain.add_skill(Skill()) 2 the structure can be utilized to add skills by pasting their files into the DLC directory, for example: pasting the …
what are the pros and cons of controlling a smart house via: MCP servers (via LLMs) versus the livingrimoire software design pattern (with skill classes for a more heuristic control)
[LangGraph](https://www.langchain.com/langgraph) is an agentic framework for orchestrating complex language model workflows as graphs of nodes and edges. Subgraphs in LangGraph are simply graphs used as nodes within a larger graph. In other words, an entire graph (with its internal nodes and logic) can be encapsulated and treated as a single …
Hi Everyone, Web development can be both exciting and challenging, but having the right tools makes all the difference. If you're starting out or looking to improve your workflow, consider using popular frameworks like React or Vue for streamlined front-end development. On the back end, Node.js and Django are solid …
For me, it's python and node.js (backend javascript). I feel like those are two languages that are *everywhere* these days. I'd also love to get into websockets or server-sent events to replace the long polling PHP chat we currently have going on (eek). A couple of years ago, I tried …
I've been reprocessing a bunch of home videos by running them through various ffmpeg filters, typically the deshake filter. In order to see how much of a difference the filter makes it is nice to be able to play the before and after files side by side. The wxPython and …
So I've gotten past step one: Creating an account with OpenAI API. However, I'm completely overwhelmed by [all of the models](https://platform.openai.com/docs/models). How do I know which one to pick? There seem to be so many! My specific use case is [explained here](https://www.daniweb.com/programming/threads/543649/how-can-i-use-ai-to-categorize-forum-threads).
[OpenAI](https://openai.com/) and [Anthropic](https://www.anthropic.com/) are two AI giants delivering state-of-the-art large language models for various tasks. In a [previous article](https://www.daniweb.com/programming/computer-science/tutorials/542132/comparing-gpt-4o-vs-claude-3-5-sonnet-for-zero-shot-text-classification), I compared OpenAI GPT-4o and Anthropic Claude 3.5 sonnet models for text classification tasks. That article was published almost a year ago. Since then, both OpenAI and Anthropic have released state-of-the-art …
Hay my name is Dviesh, Iam looking for python development course in Jaipur . SO lets me Disceusss best agecny and comapny for leanding python development course in jaipur .
I'm just coding something for fun right now and I'm stuck on looping. I'm using a while loop that only runs if my variable is 0. Right now, I set the variable to 0 but the code was after the loop. How do I fix this? import time import sys …
The project is: -------------------------------- Write a program that computes and prints the average of the numbers in a text file. You should make use of two higher-order functions (i.e., map and reduce, or something else) to simplify the design. Create a text file and name as numbers.txt and add the …
Hi everyone. I am just learning Python on class so I am really at the basic. I need to write a python program that will flip a coin 100 times and then tell how many times tails and heads were flipped. This is what I have so far but I …
Like Ron McLeod, [who we met yesterday](https://www.daniweb.com/community-center/say-hello/threads/543368/hi-everyone-i-m-ron-mcleod), I'm a moderator and administrator over at the CodeRanch.com forums. I'm a Software Engineer, currently working as a Software Architect for a medical technology company in Belfast, Northern Ireland. We use Java, JavaScript, TypeScript, Python, we have used many of the related tooling …
Large language models are trained on a fixed corpus, and their knowledge is often limited by the documents they are trained on. Techniques like retrieval augmented generation, continuous pre-training, and fine-tuning enhance an LLM's default knowledge. However, these techniques can still not enable an LLM to answer queries that require …
Hi everyone, I'm Hichem. A web developer, Python enthusiast and problem solver. I'm happy to be a member of the DaniWeb community.
This tutorial demonstrates how to build an AI agent that queries SQLite databases using natural language. You will see how to leverage the [LangGraph framework](https://www.langchain.com/langgraph) and the [OpenAI GPT-4o](https://openai.com/index/gpt-4/) model to retrieve natural language answers from an SQLite database, given a natural language query. So, let's begin without ado. ## …
In a [previous article](https://www.daniweb.com/programming/computer-science/tutorials/543028/text-classification-and-summarization-with-deepseek-r1-distill-llama-70b), I presented a comparison of [DeepSeek-R1-Distill-Llama-70b](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-70B) with the [DeepSeek-R1-Distill-Qwen-32B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B) for text classification and summarization. Both these models are distilled versions of the original DeepSeek R1 model. Recently, I wanted to try the original version of the DeepSeek R1 model using the DeepSeek API. However, I was …
In the [last article](https://www.daniweb.com/programming/computer-science/tutorials/542973/benchmarking-deepseek-r1-for-text-classification-and-summarization#post2300447), I explained how you can use the [DeepSeek-R1-Distill-Qwen-32B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B) model for text classification and summarization problems. In this article, we will use the [DeepSeek-R1-Distill-Llama-70b](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-70B) for the same tasks. Following results from the [DeepSeek-AI's official paper](https://arxiv.org/pdf/2501.12948) show that `DeepSeek-R1-Distill-Llama-70b` outperform the other distilled models on 4 out of …
The End.