Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Search
I've given up on that Azure UI, here's the Python code to do it. It requires a token generated via az account get-access-token. import json import requests new_capacity = 3 # Change this numbe...
It looks like I was confused, and the problem I am asking about does not actually exist. Perhaps it existed in an older version, or perhaps I am simply misremembering. Regardless, I've seen other p...
Problems like this occur, fundamentally, because there is more than one Python installation on the system, and the system is configured in a way that pip installs for a different Python than the on...
I understand the benefits of virtual environments in general, and specifically I want to use a virtual environment so that I'll have access to Pip without exposing the system Python (i.e., included...
I have multiple installations of Python on my machine. I already know how to choose one to use to run for my code - and therefore, I could also solve the problem for third-party application code. ...
Choosing an environment for third-party libraries The short version of the answer is: Python installations don't normally share libraries because there are too many ways it could go wrong; general...
When I write and execute a prompt in Cursor IDE, what specific information is included in the context that gets sent to the underlying language model (such as GPT or Claude)? E.g., does it include ...
Normally gateways just do routing and maybe load balancing. That's one well-defined job that can be done well. You are adding a second job, which is to be a universal adapter. An adapter would be ...
I converted the PyTorch model Helsinki-NLP/opus-mt-fr-en (HuggingFace), which is an encoder-decoder model for machine translation, to ONNX using this script: import os from optimum.onnxruntime im...
If your only concern is overflowing the 64-bit pixelCount value, you can safely forget about it. By the time you are processing an image with 18 quintillion (2^64) pixels, you will have bigger prob...
Problems like this start when Pip retrieves your desired package as a sdist ("source distribution"), which has to be separately built on your machine before it can be installed. Normally, package a...
How about a library instead? The traditional way of reducing code duplication among separate software packages is to wrap the common bits in a library and use it where ever the functionality is ne...
There is a small oddity wherein this post shows up strangely in list pages: Regex to get text outside brackets I am trying to capture the content outside square brackets in groups, using this r...
Example: I specify a random model name some random name: Then I call it: Which model is Cursor IDE using when I specify a random model name? Cross-posted: https://stackoverflow.com/q/79...
Aliasing is perhaps better understood as a property of assignments through pointers, not of the pointers themselves. First, let's consider the reasoning behind applying the optimization to the fir...
A class might calculate static variables during instantiation, which are then used by various functions. A common technique to optimize function performance is to precalculate expensive variables u...
Here's the solution I ended up with a while back to traverse the (sub-)tree, starting at the given root component. In short, the model's field, components, is used directly and small unsafe blocks ...
I am trying to install the Spacy library in VSCode in a folder with a virtual environment. The output appearing in the terminal is excessively long; I will share it with a pastebin later. My versio...
It is possible to set custom JSON serializer for hibernate. Here is example: @Configuration public class JsonHibernatePropertiesCustomizerConfig { @Bean HibernatePropertiesCustomizer c...
I have a generated file that I want Tilt to ignore for re-building. However, when that file changes, Tilt also detects that the parent directory has changed based on its contents changing. I can fi...
I did a quick test using LINQPad and it looks as though .Select() does not necessarily preserve capacity. For .Where() and .OfType() the capacity depends on the count, though it doesn't necessarily...
This question is adapted from a question I just helped fix up on Stack Overflow. I'm giving a different motivating example which I think will make it clearer what the requirements are and why a n...
Using a recursive generator There isn't anything like a built-in solution for this algorithm, but it's easy to express the desired output recursively. A valid output combination of k-many inputs l...
Using filtered products of candidates, over combinations of first letters Let's consider the n=2 case first. (For higher n, we can use the same sort of recursive generator approach as in my other ...
Understanding the representation of text in C "Text" is a high level abstraction that C doesn't properly support Fundamentally, C does not have any built-in "string" type. It arguably doesn't eve...