QuestionId int64 74.8M 79.8M | UserId int64 56 29.4M | QuestionTitle stringlengths 15 150 | QuestionBody stringlengths 40 40.3k | Tags stringlengths 8 101 | CreationDate stringdate 2022-12-10 09:42:47 2025-11-01 19:08:18 | AnswerCount int64 0 44 | UserExpertiseLevel int64 301 888k | UserDisplayName stringlengths 3 30 ⌀ |
|---|---|---|---|---|---|---|---|---|
79,263,643 | 9,381,966 | Slug Field in Django Model Not Including Related Tags on Save | <p>I have the following <code>save</code> method in my Django model:</p>
<pre class="lang-py prettyprint-override"><code>slug = models.SlugField(unique=True, blank=True, null=True, max_length=255)
def save(self, *args, **kwargs):
if self.pk is None:
super().save(*args, **kwargs)
tags = Tag.objects.fil... | <python><django> | 2024-12-09 01:22:15 | 0 | 1,590 | Lucas |
79,263,520 | 4,330,537 | selenium Filling in text in a series TDs kin the first TR of a specific table | <p>I have a first row in a table that has empty TDs filled with input TEXTBOXs or TEXTAREAs here is what the row looks like</p>
<pre><code> <tr>
<td class="gwf_variable_table_control_column">
<div class="gwf_tooltip"><input type="button" class="gwf-ro... | <python><selenium-webdriver> | 2024-12-08 23:21:02 | 1 | 835 | RobM |
79,263,332 | 307,050 | How to calculate the dBFS level using python sounddevice | <p>I'm trying to get a decibel reading from an audio stream using the <code>sounddevice</code> library.</p>
<p>More specifically, I want to display the current level in a <a href="https://en.wikipedia.org/wiki/Digital_audio_workstation" rel="nofollow noreferrer">DAW</a> like fashion.</p>
<p>According to <a href="https:... | <python><audio><python-sounddevice><decibel> | 2024-12-08 20:55:04 | 0 | 1,347 | mefiX |
79,263,329 | 12,466,687 | How to change text color of facet category in plotly charts in Python? | <p>I have created few <code>Plotly</code> charts with <code>facets</code> on basis of category variable and would like to change the <code>color</code> of <code>facet text</code> in the chart. Have searched alot even on plotly website but couldn't figure out the property that can be used to change the color for facet t... | <python><plotly> | 2024-12-08 20:53:06 | 1 | 2,357 | ViSa |
79,263,115 | 11,951,910 | Using signal to clean up process | <p>I am learning how to use signals. I created a small program that connects to a database and prints the results. I am leaving the database connection open. I am sending a SIGTERM to end the program. That works. But when I try to add my database disconnect object it fails. I made db global. Any help or explanati... | <python><signals> | 2024-12-08 18:36:50 | 0 | 718 | newdeveloper |
79,262,905 | 10,746,224 | Django-Extensions: how to add local variables to shell_plus | <p>I have multiple dictionaries, and I want each key/value pair to be defined in the local scope of a <strong><code>django-extensions</code></strong> <code>shell_plus</code> session.</p>
<p>My current <em><strong>management command</strong></em> looks something like this:</p>
<pre><code>import django
import code
devs ... | <python><django><django-extensions><django-commands> | 2024-12-08 16:41:52 | 1 | 16,425 | Lord Elrond |
79,262,845 | 8,291,840 | Django Allauth 65.2.0 headless mode - session token problems | <p>I have a setup with django, drf, django-allauth headless and nextjs acting somewhat as a proxy to my django api, completely decoupled and server from different servers (a regular django setup and separate node server for next)</p>
<p>Settings:</p>
<pre class="lang-py prettyprint-override"><code>AUTH_USER_MODEL = &qu... | <python><python-3.x><django><django-allauth> | 2024-12-08 16:16:49 | 0 | 3,042 | Işık Kaplan |
79,262,705 | 18,582,529 | SQLAlchemy Updating ORM model after inserting it | <pre class="lang-py prettyprint-override"><code>async def upsert_record(record: Record) -> Record:
async with async_session() as session:
stmt = insert(Record).values(
record.to_dict()
).on_conflict_do_update(
index_elements=['id'],
set_={
# Jus... | <python><python-3.x><database><sqlite><sqlalchemy> | 2024-12-08 14:59:08 | 0 | 663 | lisa.smith |
79,262,610 | 7,456,317 | Using Pydantic to define AST of boolean expressions | <p>I'd like to use Pydantic to define and validate AST of queries that will be applied on a Pandas dataframe. Here's my code:</p>
<pre class="lang-py prettyprint-override"><code>from typing import List, Literal, Optional, Union
from pydantic import BaseModel, Field
import pandas as pd
class ColumnCondition(BaseModel):... | <python><pandas><abstract-syntax-tree><pydantic> | 2024-12-08 14:05:45 | 0 | 913 | Gino |
79,262,591 | 5,350,089 | How to check Serial Write is complete in Raspberry Pi Python | <p>Hi In my Project my raspberry pi act as a server and whenever the data came from the tcp client it is writing the same data in Serial Uart but when doing write operation in Serial Uart some character is missing If i insert some delay after the serial write it is working fine but i want to be working without giving a... | <python><raspberry-pi><serial-port><pyserial><uart> | 2024-12-08 13:49:02 | 0 | 445 | Sathish |
79,262,467 | 19,356,117 | How to convert negative values to others in polars DataFrame? | <p>I want to convert negative float values in polars DataFrame,and I use this code:</p>
<pre><code>x_origin.select(pl.col(pl.Float64), pl.when(pl.col(pl.Float64)<0).then(np.nan).otherwise(pl.col(pl.Float64)))
</code></pre>
<p>But it crashed with this:</p>
<pre><code>Traceback (most recent call last):
File "/h... | <python><python-polars> | 2024-12-08 12:44:29 | 1 | 1,115 | forestbat |
79,262,465 | 12,832,931 | How to invert OHLC data? | <p>I have a OHLC (Open, High, Low, Close financial data).</p>
<p>An upward bar (bullish) is when the close price is higher than the open price.</p>
<p>A downward bar (bearish) is when the close price is lower than the open price.</p>
<p>I am trying to find a way to invert the dataset in order to have the following beha... | <python><pandas><time-series> | 2024-12-08 12:42:50 | 1 | 542 | William |
79,262,426 | 11,779,147 | Vertex AI Text Embedding model forbidden | <p>I am trying to run the tutorial here about text embedding on GCP : <a href="https://cloud.google.com/vertex-ai/generative-ai/docs/embeddings/get-text-embeddings?hl=fr" rel="nofollow noreferrer">https://cloud.google.com/vertex-ai/generative-ai/docs/embeddings/get-text-embeddings?hl=fr</a></p>
<p>However, the code sni... | <python><google-cloud-platform><large-language-model><google-cloud-vertex-ai><rag> | 2024-12-08 12:12:10 | 1 | 527 | maggle |
79,262,287 | 2,069,099 | Pandas : make future.no_silent_downcasting working | <p>Python 3.11, Pandas 2.2.3</p>
<p>I currently track FutureWarnings to sanitize an existing code. To silent and opt-in future <code>Downcasting behavior in 'replace' is deprecated and will be removed in a future version</code>, I use <code>pd.set_option("future.no_silent_downcasting", True)</code>.</p>
<p>Th... | <python><pandas> | 2024-12-08 10:53:08 | 1 | 3,517 | Nic |
79,262,249 | 1,473,517 | asizeof appears to be inaccurate | <p>Take this MWE:</p>
<pre><code>from pympler import asizeof
from random import randint, choice
from string import printable
from heapq import heappush
ascii = printable[:-5]
pq = []
for _ in range(10_000_000):
heappush(pq, (randint(0, 31), randint(0, 31), randint(0, 31), ''.join(choice(ascii) for _ in range(16)))... | <python><memory> | 2024-12-08 10:27:53 | 2 | 21,513 | Simd |
79,262,117 | 8,831,742 | Graph features with low computational complexity | <p>I'm trying to cluster some unlabeleded unweighted undirected graphs. I'd like to calculate some scalar features for each of them to build an embedding vector and then use a clustering algorithm to see if they can be distinguished in an unsupervised way. However, most of the features i was planning to use (closeness/... | <python><time-complexity><graph-theory><feature-extraction> | 2024-12-08 08:52:37 | 1 | 353 | none none |
79,261,982 | 6,312,979 | Using a Polars DataFrame inside Django template html | <p>Lets start with their demo.</p>
<pre class="lang-py prettyprint-override"><code>import polars as pl
df = pl.DataFrame(
{
"foo": [1, 2, 3],
"bar": [6, 7, 8],
}
)
df.write_json()
# '[{"foo":1,"bar":6},{"foo":2,"bar":7},{"foo&quo... | <python><html><django><dataframe><python-polars> | 2024-12-08 06:58:25 | 1 | 2,181 | diogenes |
79,261,901 | 8,176,763 | nested operators airflow, good practice? | <p>My goal is to pass a string of a file path from one @task into Emailoperators , so I can apply logic with the dataset that I will read from the file path to build up my operators that will send emails. My code looks like this:</p>
<pre><code>from airflow import DAG
from airflow.decorators import dag, task
from airfl... | <python><airflow> | 2024-12-08 05:30:57 | 0 | 2,459 | moth |
79,261,820 | 7,729,563 | Inconsistent behavior between Python function and VS Code debugger for scope lookup | <p>For the following code (revised):</p>
<pre class="lang-py prettyprint-override"><code># infile.py
FILE1 = 'file1'
FILE2 = 'file2'
def getfile():
# Note: I am doing the equivalent of this with VS Code debugger:
# breakpoint()
file = FILE1 if 'FILE1' in locals() else FILE2
print(f'{file=}')
if __na... | <python><python-3.x><visual-studio-code><vscode-debugger> | 2024-12-08 03:43:47 | 1 | 529 | James S. |
79,261,741 | 1,982,032 | Text Recognition with pytesseract and cv2 or other libs | <p>Please download the png file and save it as 'sample.png'.<br />
<a href="https://i.sstatic.net/M6ywO7up.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/M6ywO7up.png" alt="enter image description here" /></a><br />
I want to extract english characters in the png file.</p>
<pre><code>import cv2
import p... | <python><text-recognition> | 2024-12-08 02:18:08 | 1 | 355 | showkey |
79,261,713 | 5,163,984 | minio.error.S3Error: S3 operation failed; code: AccessDenied, message: Access Denied., resource: /musor-bucket | <p>Create the bucket</p>
<pre><code>mc mb local/musor-bucket --debug
</code></pre>
<p>Create the credentials pair</p>
<pre><code>mc admin user add local musor-user musor-top-secret-key --debug
</code></pre>
<p>Create the policy to grant access to the bucket</p>
<pre><code># cat musor-bucket-policy.json
{
"Versio... | <python><amazon-web-services><amazon-s3><minio><minio-client> | 2024-12-08 01:24:16 | 1 | 1,703 | Nikolay Baranenko |
79,261,638 | 1,827,587 | Python script can't move file between mounted docker volumes while mv command could | <p>I think I did configure docker volumes correctly, but I can't understand why mv command success called from interactive bash shell.</p>
<pre class="lang-none prettyprint-override"><code>FROM ubuntu:rolling
RUN apt update
RUN apt install -y python3 python3-venv
USER ubuntu
</code></pre>
<pre class="lang-none prett... | <python><docker><pathlib> | 2024-12-08 00:06:06 | 2 | 386 | proofit404 |
79,261,474 | 251,589 | Python generic type on function getting lost somewhere | <p>Getting this typing error:</p>
<pre><code>error: Incompatible types in assignment (expression has type "object", variable has type "A | B") [assignment]
</code></pre>
<p>With this code:</p>
<pre class="lang-py prettyprint-override"><code>from dataclasses import dataclass
from typing import TypeV... | <python><python-typing><mypy> | 2024-12-07 21:53:59 | 2 | 27,385 | sixtyfootersdude |
79,261,380 | 4,333,809 | Setting boost compilation options in conanfile.py | <p>I've got the following structure of conanfile.py for the purpose of installing boost in my macOS build machine. Apparently some boost components are not supported in this platform and should be omitted according to this <a href="https://github.com/conan-io/conan-center-index/issues/24313" rel="nofollow noreferrer">p... | <python><boost><conan><conan-2> | 2024-12-07 20:46:58 | 0 | 5,214 | Zohar81 |
79,261,313 | 932,593 | How can I make a density plot with log-scaled axes in matplotlib? | <p>I want to plot a scalar density as a function of two variables <code>x</code> and <code>y</code>, which can potentially be scaled logarithmically. I essentially run simulations for each pair of <code>x</code> and <code>y</code> and want to report the data using a nice colormap. However, I run into the problem that I... | <python><matplotlib><density-plot> | 2024-12-07 20:08:34 | 2 | 24,438 | David Zwicker |
79,261,312 | 1,684,103 | matplotlib x axis not as expected | <p>I want the x-axis labels to be exactly as in the file, but it's converting them. Also, I don't want the thick black line above the labels. And, I'd like the plot to extend fully to both sides of the area without the empty spaces on the left and right.</p>
<p>plot:
<a href="https://i.sstatic.net/26z7fggM.png" rel="... | <python><matplotlib> | 2024-12-07 20:07:21 | 1 | 812 | Mike |
79,261,159 | 2,334,254 | How do you install python-barcode on Ubuntu 24? | <p>Everywhere I see just use pip but it doesn't work and it isn't found with apt. I think I need to add a repo, which is it?</p>
<pre><code>User@System:~/Desktop$ sudo apt install python3-barcode
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package... | <python><python-3.x><ubuntu><ubuntu-24.04> | 2024-12-07 18:34:31 | 1 | 11,200 | kpie |
79,260,810 | 8,050,183 | PyMuPDF - Prevent PDF pages from being auto cropped | <p>I'm using PyMuPDF to process a PDF and then re-save it, but the resulting file loses the original page orientations and crop boxes. Some pages in the original PDF are larger or differently oriented (e.g., rotated or with custom crop regions), but after calling pdf.save(), all pages become uniformly sized and oriente... | <python><pdf><pymupdf> | 2024-12-07 14:51:30 | 1 | 1,159 | axelmukwena |
79,260,798 | 8,024,622 | KivyMD Google like suggestions while typing | <p>I'm new to kivy(MD).</p>
<p>On one screen I have a TextInput where I can type city names. When I click on the "next" button, the screen is switched and the city name variable is passed to that screen.</p>
<p>What I would like to have is that while typing, there are suggestions showing with city names start... | <python><autocomplete><kivy><kivymd><autosuggest> | 2024-12-07 14:43:38 | 0 | 624 | jigga |
79,260,787 | 11,283,324 | Pandas dataframe reshape with columns name | <p>I have a dataframe like this:</p>
<pre><code>>>> df
TYPE A B C D
0 IN 550 350 600 360
1 OUT 340 270 420 190
</code></pre>
<p>I want reshape it to this shape:</p>
<pre><code> AIN AOUT BIN BOUT CIN COUT DIN DOUT
550 340 350 270 600 420 360 190
</code></pre>
<p>S... | <python><pandas><dataframe><reshape> | 2024-12-07 14:36:34 | 3 | 351 | Sun Jar |
79,260,781 | 11,748,924 | What is the Keras 3 version of this numpy function of this IEEE754 to Unsigned Integer 8 normalization? | <p>Using the Keras 3 <code>ops</code> api, what is the Keras 3 version of this normalization function?</p>
<pre><code>def ieee754_to_uint8(x, axis=-1):
"""
Normalize a tensor using IEEE 754 logic and map it to uint8 values.
Args:
x (tensor): A Keras tensor of shape (batch_size, seq_len).
... | <python><machine-learning><keras><neural-network> | 2024-12-07 14:32:53 | 1 | 1,252 | Muhammad Ikhwan Perwira |
79,260,577 | 851,249 | How can I host a Python Web API built with Flask on IIS? | <p>I have developed a Python-based Web API using frameworks such as Flask or FastAPI and need to deploy it on an IIS (Internet Information Services) server. The goal is to make the API accessible within my organization's network.</p>
<p>Here is what I have completed so far:</p>
<ol>
<li>Installed Python and added it to... | <python><iis-7.5><google-api-python-client><python-webbrowser> | 2024-12-07 12:17:02 | 0 | 1,648 | Praveen Kumar |
79,260,553 | 10,451,126 | SSL error with salesforce API using requests library in python | <p>I've recently run into a problem trying to connect to the salesforce API using python simple-salesforce and requests library to download some data for some PowerBI and analytics applications / forecasting / machine learning apps.</p>
<p>I'm on python 3.10.4 on Windows 10 and have the latest updated to latest publish... | <python><ssl><python-requests><simple-salesforce> | 2024-12-07 12:00:51 | 0 | 1,071 | el_oso |
79,260,231 | 13,392,257 | Selenium BlockingIOError: [Errno 11] Resource temporarily unavailable | <p>I am running several browsers in separate threads with help of <code>selenium 4.2.0 (FireFox)</code> and celery in docker container.</p>
<p>Program is working fine, but for significant amount of data I have an error (see trace below)</p>
<p>I read about the error <a href="https://www.pythonanywhere.com/forums/topic/... | <python><selenium-webdriver> | 2024-12-07 08:17:35 | 0 | 1,708 | mascai |
79,259,984 | 8,384,910 | PyTorch type for dataset with length | <p>I am creating a meta-dataset that combines data from multiple input datasets.</p>
<pre class="lang-py prettyprint-override"><code>from torch.utils.data import Dataset, IterableDataset
class MetaDataset(Dataset):
def __init__(self, regular_dataset: Dataset, iterable_dataset: IterableDataset):
self.regula... | <python><pytorch><python-typing> | 2024-12-07 04:48:38 | 1 | 9,414 | Richie Bendall |
79,259,917 | 8,384,910 | Python type for dict-like object | <p>I have some function that accepts a dict-like object.</p>
<pre class="lang-py prettyprint-override"><code>from typing import Dict
def handle(x: Dict[str, str]):
pass # Do some processing here...
</code></pre>
<p>I still get a type warning if I try passing a <code>Shelf</code> to the function, even though the fu... | <python><python-typing> | 2024-12-07 03:43:24 | 2 | 9,414 | Richie Bendall |
79,259,732 | 2,334,254 | How do I install pygame on Ubuntu 24? | <p>Pip doesn't work. Python3 base install on Ubuntu wants package installs via <code>apt install python-xyz</code>. And I can't find pygame</p>
<pre><code>_@Sbox:~/Desktop$ python3 -m pip install pygame
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages sys... | <python><python-3.x><ubuntu><pygame> | 2024-12-07 00:30:13 | 1 | 11,200 | kpie |
79,259,601 | 2,328,154 | Using cdk Aspects to add tags to all resources in a stack? | <p>I am using cdk Aspects and I can see that the statement is being printed out from the visit method. However, when I try to add a Tag to each resource within my stack, nothing happens.</p>
<p>This is the line I have in my app.py.</p>
<pre><code>cdk.Aspects.of(my_stack).add(TagsAddingAspect())
</code></pre>
<p>This is... | <python><aws-cdk> | 2024-12-06 23:01:32 | 0 | 421 | MountainBiker |
79,259,596 | 1,445,660 | Aurora - password authentication failed for user "postgres" - after password rotation | <p>I'm using python lambda functions. In the beginning of the file I call this function:</p>
<pre><code>def create_db_engines():
session = boto3.session.Session()
client = session.client(
service_name='secretsmanager',
region_name=os.environ['region']
)
try:
get_secret_value_res... | <python><amazon-web-services><aws-lambda><amazon-rds><amazon-aurora> | 2024-12-06 22:59:00 | 1 | 1,396 | Rony Tesler |
79,259,576 | 4,072,043 | Using Flask session variable for OAUTH CSRF prevention | <p>I am trying to write a simple (hah!) Python Flask app which will use Google's <code>people</code> API to retrieve a user's numeric Google ID (which otherwise seems to be almost impossible to determine). Doing this requires that the user authenticate with Google's OAUTH. I have this working, but Google's <a href="h... | <python><flask><google-oauth> | 2024-12-06 22:50:46 | 1 | 1,628 | Ian Pilcher |
79,259,509 | 5,270,376 | ffmpeg piped output producing incorrect metadata frame count | <p>The short version: Using piped output from ffmpeg produces a file with incorrect metadata.</p>
<p><code>ffmpeg -y -i .\test_mp4.mp4 -f avi -c:v libx264 - > output.avi</code> to make an AVI file using the pipe output.</p>
<p><code>ffprobe -v error -count_frames -show_entries stream=duration,nb_read_frames,r_frame_... | <python><ffmpeg> | 2024-12-06 22:11:10 | 1 | 520 | Xorgon |
79,259,488 | 8,190,068 | How do I get Accordion-like behavior in a RecycleView? | <p>I wanted to use the Kivy Accordion widget in my python app, but I couldn't get it to work right - the accordion items would expand or contract to exactly fill the space in the window. That's when I realized I had a bigger problem: the number of accordion items could increase indefinitely, but my accordion had no s... | <python><accordion><kivy-recycleview> | 2024-12-06 21:59:58 | 1 | 424 | Todd Hoatson |
79,259,453 | 4,382,391 | Is there a way to relatively import python files within a module so that the execution context may change without needing to update the import path? | <p>Take the following python project structure:</p>
<pre><code>project/
├── package/
│ ├── __init__.py
│ ├── module1.py
└── main.py
</code></pre>
<p>my main.py looks like:</p>
<pre class="lang-py prettyprint-override"><code>import package
</code></pre>
<p>my module1.py looks like:</p>
<pre class="lang-py prettyprin... | <python><python-3.x><import> | 2024-12-06 21:40:41 | 0 | 1,070 | Null Salad |
79,259,448 | 5,561,649 | What should typing be for __add__ in a subclass of list? | <p>This is a simplification of my code:</p>
<pre class="lang-py prettyprint-override"><code># my_list.py
from __future__ import annotations
class MyList(list[int]):
def __add__(self, other: list[int]) -> MyList:
return MyList()
</code></pre>
<p>mypy says:</p>
<pre class="lang-none prettyprint-override"... | <python><list><python-typing><mypy> | 2024-12-06 21:35:12 | 1 | 550 | LoneCodeRanger |
79,259,235 | 9,873,381 | How to extract specific metrics (mAP) from YOLOv7's train function? | <p>I am using the train function from the file: <a href="https://github.com/WongKinYiu/yolov7/blob/main/train_aux.py" rel="nofollow noreferrer">https://github.com/WongKinYiu/yolov7/blob/main/train_aux.py</a> to train a <code>YOLOv7</code> model on a custom dataset. I would like to optimize the hyperparameters (using <c... | <python><pytorch><yolo><hyperparameters><optuna> | 2024-12-06 19:58:29 | 0 | 672 | Skywalker |
79,259,125 | 1,942,868 | 403 error with CSRF when accesing Django login by axios | <pre><code> await axios.get("http://localhost:8000/get_csrf_token/").then((res)=>{
console.log(res.data.csrf_token);
axios.defaults.xsrfHeaderName = "X-CSRFTOKEN";
axios.defaults.xsrfCookieName = "csrftoken";
axios.defaults.withCredentials = true;
axios.post('http:/... | <javascript><python><reactjs><django> | 2024-12-06 19:08:59 | 0 | 12,599 | whitebear |
79,259,121 | 1,717,414 | Why aren't sub-union types handled properly by type guards? | <p>In the following code, the <code>valid</code> function and the <code>invalid</code> function do exactly the same thing. Why is MyPy happy with <code>valid</code>, but throws an error on <code>invalid</code>?</p>
<p>Isn't the <code>TypeGuard</code> suppose to handle that?</p>
<p>If I add a function to <code>B</code>... | <python><python-typing><mypy> | 2024-12-06 19:07:54 | 1 | 533 | Nathan Kronenfeld |
79,259,088 | 1,357,613 | Python Paramiko method paramiko.client.SSHClient.connect only receives files via key_filename, is there a way to pass a string variable? | <p>Python's package Paramiko has the moehtod paramiko.client.SSHClient.connect to connect. It receives the private key as a file with the parameter key_filename.</p>
<p><code>ssh.connect(key_filename=key_filename)</code></p>
<p>For security purpouses I'm not having a file with my private key in my repository, then I'm ... | <python><paramiko> | 2024-12-06 18:59:25 | 0 | 346 | Moisés Briseño Estrello |
79,259,078 | 9,371,999 | Ruff ignore F401 | <p>I am working with VScode and python. I installed ruff because I really like it, but thee one thing I don't like is the F401 error, which basically automatically removes the unused libraries when I try to include them in my main files.
For instance, if I try to go from this:</p>
<pre><code>from fastapi import FastAPI... | <python><visual-studio-code><pyproject.toml><ruff> | 2024-12-06 18:55:42 | 0 | 529 | GEBRU |
79,258,912 | 10,452,700 | Visualization of ranking models based on time executions | <p>I'm working on reproducing the following plot for my own case:
<a href="https://i.sstatic.net/6vK55kBM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6vK55kBM.png" alt="img" /></a></p>
<p>so, let's say I already have my results ready and in the form of data frames as below:</p>
<pre class="lang-py pr... | <python><pandas><matplotlib><seaborn><ranking> | 2024-12-06 17:51:32 | 1 | 2,056 | Mario |
79,258,896 | 1,355,634 | How to do an advanced grouping in pandas? | <p>The easiest way is to demonstrate my question with an example. Suppose I have the following long format data frame</p>
<pre><code>In [284]: import pandas as pd
In [285]: data = pd.DataFrame({"day": [0,0,0,0,0,0,1,1,1,1,1,1], "cat1": ["A", "A", "A", "B", &q... | <python><pandas> | 2024-12-06 17:47:08 | 2 | 2,042 | math |
79,258,868 | 5,550,833 | Tkinter Python - Update a label from an instance method goes to segmentation fault | <p>I'm trying to update a Label with a method that is called via a scheduler process, but when i try to configure the label, the app crashes with a segmentation fault</p>
<p>This is my script</p>
<pre><code>class Gui():
def __init__(self):
app = Tk()
self.initialize_user_interface()
def initial... | <python><tkinter> | 2024-12-06 17:33:05 | 1 | 3,258 | MarioC |
79,258,814 | 11,748,924 | Numpythonic way of float to signed integer normalization | <p>What is the faster numpythonic way of this normalization:</p>
<pre><code>def normalize_vector(x, b, axis):
"""
Normalize real vector x and outputs an integer vector y.
Parameters:
x (numpy.ndarray): Input real vector. (batch_size, seq_len)
b (int): Unsigned integer definin... | <python><numpy> | 2024-12-06 17:13:26 | 2 | 1,252 | Muhammad Ikhwan Perwira |
79,258,525 | 1,085,805 | Plotting quiver plots in matplotlib | <p>I want to plot the slope field for: <code>0.5*sin(0.5*pi*x)*sqrt(y+7)</code></p>
<pre><code>import numpy as np
import matplotlib.pyplot as plt
# Specify the grid of dots
x = np.arange(-3,3,0.3)
y = np.arange(-2,4,0.3)
X, Y = np.meshgrid(x,y)
# Create unit vectors at each dot with correct slope
dy = 0.5*(np.sin(x... | <python><matplotlib><plot> | 2024-12-06 15:23:27 | 1 | 903 | blackened |
79,258,503 | 4,706,711 | What is the correct AWS policy in order for my app allow users to login at AWS COGNITO? | <p>I am using Django Warrant for IAM:</p>
<pre><code>from rest_framework.response import Response
from rest_framework.exceptions import AuthenticationFailed
from rest_framework.decorators import api_view
from django.apps import apps
@api_view(['POST'])
def login(request):
username = request.data.get('email')
p... | <python><django><amazon-web-services><amazon-cognito> | 2024-12-06 15:15:37 | 0 | 10,444 | Dimitrios Desyllas |
79,258,483 | 1,987,477 | How to efficiently look for a substring in a pandas df column | <p>I have a large pandas df.</p>
<p>I'd need to loop through a specific column and look for a substring in each row.</p>
<p>For example, I'd have to find the row with <code>source_id</code> containing the substring <code>'136704'</code>.
This is my code</p>
<pre><code>for row_num, row_data in my_df.iterrows():
sour... | <python><pandas> | 2024-12-06 15:10:41 | 0 | 1,325 | user123892 |
79,258,445 | 5,344,240 | Get the list of actually persisted DataFrames in Spark | <p>I am using Databricks notebooks. I want to programmatically find the list of DataFrames that have actually been cached by an action call, that is where <code>.cache()</code> was followed by an action, like <code>.show()</code>.</p>
<p><a href="https://stackoverflow.com/questions/75168521/find-the-list-of-all-persist... | <python><apache-spark><pyspark><azure-databricks> | 2024-12-06 15:00:26 | 1 | 455 | Andras Vanyolos |
79,258,400 | 13,491,504 | Use DPI_AWARENESS_CONTEXT with tkinter | <p>I am Using tkinter for a small application. Using</p>
<pre><code>from ctypes import windll
windll.shcore.SetProcessDpiAwareness(2)
</code></pre>
<p>I wanted to adjust the application on my dual monitor setup (with two different kind of montiors (Laptop and Display)). But it doesn't work 100%. The application opens o... | <python><tkinter><dpi> | 2024-12-06 14:42:52 | 0 | 637 | Mo711 |
79,258,379 | 1,898,534 | How to run an init script from correct volume when using databricks asset bundles | <p>I have the following resource definition. What i am trying to do is attaching an aws profile to a cluster so it can pull python packages from private codeArtifact via pip. However, in order to allow then pip to pull, I need a init script. But its impossible to figure out in the docs what the config for this is.</p>
... | <python><aws-codeartifact><databricks-asset-bundle> | 2024-12-06 14:38:18 | 1 | 6,499 | PlagTag |
79,258,364 | 3,919,804 | dnspython does not resolve on osx inside corporate network | <p>I am trying to use dnspython to resolve some names on our corporate network on mac osx. There is the sample code I am using:</p>
<pre><code>import dns.resolver
dns.resolver.default_resolver = dns.resolver.Resolver(configure=False)
dns.resolver.default_resolver.nameservers = ['x.x.x.x']
dns.resolver.resolve('www.go... | <python><dns><dnspython> | 2024-12-06 14:33:35 | 0 | 342 | Jon |
79,258,317 | 1,879,604 | Micro Service project structure around code sharing | <p>I'm trying to move a monolith project structure to a micro services (self learning), and need directions on the the shared code placement.</p>
<pre><code>src
|-- service1
| |-- Dockerfile
| |-- Code
| |-- DB
|
|-- service2
| |-- Dockerfile
| |-- Code
| |-- DB
|
|-- utils (only code)
| |-- code
|
|--d... | <python><docker> | 2024-12-06 14:23:47 | 0 | 742 | NEB |
79,258,125 | 1,898,534 | How to switch off automatic wheel building in databricks asset bundle python wheel task | <p>I have the following databricks asset bundle job defintion:</p>
<pre class="lang-py prettyprint-override"><code> - task_key: test-model-from-wheel
python_wheel_task:
entry_point: run # Entry point of the wheel
package_name: myservice # must match the name of your package in t... | <python><databricks><python-wheel><databricks-asset-bundle> | 2024-12-06 13:19:22 | 1 | 6,499 | PlagTag |
79,258,116 | 3,710,004 | Remove empty dirctories in Python recursively | <p>I have the following script in Pyth to remove empty directories. This will remove an empty directory with the filepath "a/b/c" no matter how many folders down. The problem is, sometimes if folder "c" is removed because it is empty, folder "b" is in turn empty, but then I have to keep ru... | <python> | 2024-12-06 13:16:54 | 0 | 686 | user3710004 |
79,258,103 | 561,243 | Appending additional '_id' to a field | <p>I have the following model:</p>
<pre class="lang-py prettyprint-override"><code>class Sample(MAFwBaseModel):
sample_id = AutoField(primary_key=True, help_text='The sample id primary key')
sample_name = TextField(help_text='The sample name')
class Resolution(MAFwBaseModel):
resolution_id = AutoField(prim... | <python><orm><peewee> | 2024-12-06 13:09:58 | 1 | 367 | toto |
79,257,801 | 2,523,501 | VSCode's testing framework breaks when referencing a file in a tertiary folder | <p>I have a super simple test framework in VSCode as follows:</p>
<pre><code>/.vscode
launch.json
settings.json
/python
/resources
some_data.tsv
/src
myapp.py
/test
test_config.py
test_myapp.py
/venv
</code></pre>
<p><code>setting.json</code> has:</p>
<pre><code> &... | <python><visual-studio-code><pytest><python-unittest> | 2024-12-06 11:22:37 | 1 | 750 | yeliabsalohcin |
79,257,762 | 4,902,934 | How to run dependence tasks concurrently with non-dependence ones, and tasks inside for loop? | <p>I am learning asyncio and there is a problem of running a dependence task concurrently with non-dependence ones. So far I couldn't make it work. This is my code:</p>
<pre><code>import asyncio
import random
def first_execution(choice):
if choice==1:
print(f"First result {choice}")
return cho... | <python><python-3.x><asynchronous><concurrency><python-asyncio> | 2024-12-06 11:06:22 | 1 | 1,030 | HienPham |
79,257,740 | 4,108,376 | Limit of Python call stack variables in Visual Studio Code | <p>I'm using Visual Studio Code to debug a Python program with a deep, recursive call stack.
The debugger shows the entire call stack, but it seems that the "Variables" view, showing the local variables at each place in the call stack, only gets updated when I select one of the few first or last of the stack ... | <python><visual-studio-code><vscode-debugger> | 2024-12-06 10:57:57 | 0 | 9,230 | tmlen |
79,257,607 | 8,831,742 | Estimating average closeness centrality of a large graph in python in a reasonable time | <p>I have a large network file (about 7 million nodes and 7 million edges) that i've imported in a <code>networkx</code> graph. I need to estimate its <a href="https://en.wikipedia.org/wiki/Closeness_centrality" rel="nofollow noreferrer">closeness centrality</a> average across all nodes. I've tried implementing the Epp... | <python><graph><networkx><estimation> | 2024-12-06 10:12:23 | 0 | 353 | none none |
79,257,526 | 3,575,623 | Edit legend of seaborn stacked barplot | <p>I followed <a href="https://python-graph-gallery.com/stacked-and-percent-stacked-barplot/" rel="nofollow noreferrer">this tutorial</a> to create a stacked double barplot, which worked nicely for my data, but now I'm trying to edit the legend to include the information needed to read the figure. I tried following <a ... | <python><pandas><matplotlib><seaborn><legend> | 2024-12-06 09:46:44 | 2 | 507 | Whitehot |
79,257,488 | 11,629,296 | Create a new line for comma separated values in pandas column - I dont want to add new rows, I want to have same rows in output | <p>I have a dataframe like this,</p>
<pre><code>df
col1 col2
1 'abc,pqr'
2 'ghv'
3 'mrr, jig'
</code></pre>
<p>Now I want to create a new line for each comma separated values in col2, so the output would look like,</p>
<pre><code>col1 col2
1 'abc
pqr'
2 'ghv'
3 ... | <python><pandas><dataframe><sklearn-pandas> | 2024-12-06 09:31:15 | 0 | 2,189 | Kallol |
79,257,046 | 6,328,841 | Cannot install llama-index-embeddings-huggingface==0.1.3 because these package versions have conflicting dependencies | <p>I am unable to install the huggingfaceEmbedding \</p>
<p>Getting the followng error:</p>
<pre><code>ERROR: Cannot install llama-index-embeddings-huggingface==0.1.3, llama-index-embeddings-huggingface==0.1.4 and llama-index-embeddings-huggingface==0.1.5 because these package versions have conflicting dependencies.
ER... | <python><huggingface-transformers><large-language-model><huggingface><llama> | 2024-12-06 06:33:21 | 1 | 718 | Saurabh Verma |
79,256,899 | 8,384,910 | Plotly KDE in histogram | <p>I can create a histogram in Plotly like this:</p>
<pre class="lang-py prettyprint-override"><code>import plotly.figure_factory as ff
import plotly.express as px
data = px.data.tips()["tip"]
ff.create_distplot([data], group_labels=["Tip"])
</code></pre>
<p><a href="https://i.sstatic.net/MBFQ450p... | <python><plotly> | 2024-12-06 05:12:24 | 1 | 9,414 | Richie Bendall |
79,256,824 | 174,615 | Why are enums incompatible across python packages? | <p>An enum is declared in an imported package and identically in the importer. Same value, but Python treats the imported enum value as different for some reason. Package 1 is a parser that I wrote which outputs a dictionary containing some values from this enum declared in the parser package:</p>
<pre><code>class Node... | <python><enums><keyerror> | 2024-12-06 04:17:17 | 1 | 532 | Leon Starr |
79,256,512 | 11,091,148 | FastAPI Azure Opentelemetry logger does not map LogLevels correctly | <p>Logs of my FastAPI app are currently written into <code>AppServiceConsoleLogs</code> table in Log Analytics, Azure. I initialize my loggers with (where <code>LOGGING_CONFIG</code> is just the logging config as Class):</p>
<pre><code>class ApiLoggerConfig(BaseModel):
"""Logging configuration to be ... | <python><azure><fastapi><open-telemetry><azure-log-analytics> | 2024-12-05 23:35:44 | 1 | 526 | Bennimi |
79,256,485 | 11,547,168 | How do I convert a complex Postgres SQL query into a Django queryset? | <p>I have the following SQL query working:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT
mrc.token_id,
ARRAY_AGG(mt.name) AS tracking
FROM
markets_rankscurrent mrc
LEFT JOIN (
SELECT
mtg.id,
mtg.index_id,
mtg.favorites_group_id,
mtg.name,
COA... | <python><django><postgresql><django-models><django-views> | 2024-12-05 23:16:23 | 1 | 620 | DLAN |
79,256,113 | 8,340,867 | Streamlabs api 2.0 Uauthorized HTTP | <p>currently i have this problem with stremlabs, I am trying to integrate a 3rd party donation service which will hit the streamlabs donations in order to augment the value there.</p>
<pre><code>import requests
import datetime
API_ACCESS_TOKEN = "MY API ACCESS TOKEN"
# FROM https://streamlabs.com/dashboard#/... | <python><python-requests><streamlabs> | 2024-12-05 20:12:10 | 0 | 2,045 | ThunderHorn |
79,256,095 | 19,959,092 | Problems plotting timestamps on the x-axis with Matplotlib | <p>I am working on a Python script that loads several CSV files containing timestamps and ping data and then displays them on a plot. The X-axis is supposed to display the timestamps in HH:MM format, with the timestamps coming from multiple CSV files that record different ping values for different addresses.</p>
<p>The... | <python><csv><matplotlib><plot> | 2024-12-05 20:03:15 | 1 | 428 | Pantastix |
79,256,084 | 678,061 | Python typing of Callable with Concatenate and ParamSpec for child class functions in decorator? | <p>I feel I'm not understanding something and don't know the correct way to typehint this.</p>
<p>I've got a parent class and a child class. I'm trying to create a decorator with ParamSpec so I gain access to args / kwargs and the return inside a decorated child class function where the first argument is of course alwa... | <python><python-typing><python-decorators> | 2024-12-05 19:57:47 | 1 | 840 | AndyMac |
79,255,967 | 943,713 | How to create a column of increasing value base on other column with same value | <p>all</p>
<p>I have a data frame as below</p>
<pre><code>df = pd.DataFrame.from_dict({'A':[1,1,2], 'B':[10,20,14], "C":[30,40,20]})
</code></pre>
<p><a href="https://i.sstatic.net/KnzVbFkG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/KnzVbFkG.png" alt="enter image description here" /></a></... | <python><pandas><numpy> | 2024-12-05 19:15:59 | 1 | 1,883 | Shawn Zhang |
79,255,816 | 14,802,285 | How to implement self paced multitask weighted loss (Kendall et al. 2018) in pytorch? | <p>In <a href="https://arxiv.org/abs/1705.07115" rel="nofollow noreferrer">this study</a> authors introduce an equation (equation 7) to weigh the individual losses for different tasks of neural networks.</p>
<p>I want to implement this as a function in <code>pytorch</code> so that I can use for my model. So far, what I... | <python><pytorch> | 2024-12-05 18:15:23 | 1 | 3,364 | bird |
79,255,610 | 12,276,279 | Is there a function available to convert HIGHS solution file format to GLPK solution file format? | <p>I am currently using HIGHS to solve a mps file and get a solution file using the following code:</p>
<pre><code>import highspy
h = highspy.Highs()
filename = 'abc.mps'
h.readModel(filename)
h.setOptionValue("solver","ipm")
h.run()
h.writeSolution("abc_highs_solution.sol", 1)
</code>... | <python><optimization><glpk><highs> | 2024-12-05 17:00:55 | 0 | 1,810 | hbstha123 |
79,255,590 | 9,640,238 | Add columns to dataframe from a dictionary | <p>There are many answers out there to this question, but I couldn't find one that applies to my case.</p>
<p>I have a dataframe that contains ID's:</p>
<pre class="lang-py prettyprint-override"><code>df = pd.DataFrame({"id": [0, 1, 2, 3, 4]})
</code></pre>
<p>Now, I query a REST API for each ID's to get addi... | <python><pandas><dataframe> | 2024-12-05 16:53:54 | 3 | 2,690 | mrgou |
79,255,556 | 3,858,619 | Python JetBrains profiler fallthrough call a lot of time | <p>I test the profiler in the JetBrains software for my Python application. I did that to evaluate the slow part of my code. Problem is, I check the statistics and I see that <code>fallthrough</code> appear 125 times for 6466ms !</p>
<p><a href="https://i.sstatic.net/M64YHa8p.png" rel="nofollow noreferrer"><img src="ht... | <python><pycharm><jetbrains-ide> | 2024-12-05 16:46:01 | 0 | 1,093 | Nathan30 |
79,255,413 | 9,223,023 | How does Python ThreadPoolExecutor switch between concurrent threads? | <p>How does Python ThreadPoolExecutor switch between concurrent threads?</p>
<p>In the case of the async/awaint event-loop, the switching between different pieces of the code happens at the await calls. Does the ThreadPoolExecutor run each submitted task for a random amount of time> Or until something somewhere call... | <python><python-multithreading> | 2024-12-05 16:02:41 | 1 | 1,203 | Petras Purlys |
79,255,406 | 4,811,873 | Python Wagtail crashes 6.3.1 "Streamfield object has no attribute 'bind_to_model' | <p>While updating an old Wagtail website to the current version, I encounter this error, in <code>admin/panels/group.py</code> line 74:</p>
<p><code>AttributeError: 'StreamField' object has no attribute 'bind_to_model'</code></p>
<p>Since this is apparently in the Wagtail software <em>as distributed,</em> I am quite co... | <python><wagtail><wagtail-streamfield> | 2024-12-05 16:00:59 | 2 | 9,043 | Mike Robinson |
79,255,192 | 849,278 | Altair - Area chart fill bleeds out from chart | <p>I'm using the <code>altair</code> library to build a graph, however for some reason the area fill bleeds out of the chart.</p>
<p>Here is the code</p>
<pre><code>import altair as alt
# Determine the minimum and maximum values for the y-axis
y_min = price_data["close"].min()
y_max = price_data["close&... | <python><plot><altair> | 2024-12-05 14:57:51 | 1 | 381 | Rami |
79,255,096 | 1,099,854 | Await inside ctypes callback with loop already running | <p>I need to perform a series of read/write tasks inside a ctypes callback function, but still inside an async task that is responsible for giving such read/write tasks:</p>
<pre><code>async def main(ble_address):
async with BleakClient(ble_address) as client:
def my_io_callback(...)
# await cli... | <python><python-asyncio><ctypes><python-bleak> | 2024-12-05 14:28:51 | 2 | 491 | Caian |
79,255,080 | 9,753,863 | Can't load C++ unit test module with python 3.10 on windows (using boost 1.75.0) | <p>I have a challenging tricky issue managing the unit tests of my C++ project in Python.</p>
<p><strong>The project</strong></p>
<p>The project is a big one, strongly relying on boost, with several dlls/so files and the funcitonnalities are exported to python. So I can't copy the code and it's hard to extract a minima... | <python><c++><python-3.x><unit-testing><boost> | 2024-12-05 14:24:02 | 1 | 862 | ractiv |
79,255,009 | 6,266,810 | Memory problem when serializing zipped files in PySpark on Databricks | <p>I want to unzip many files in 7z format in PySpark on Databricks.
The zip files contain several thousand tiny files.</p>
<p>I read the files using binary File and I use a UDF to unzip the files:</p>
<pre class="lang-py prettyprint-override"><code>schema = ArrayType(StringType())
@F.udf(returnType=schema)
def unzip_... | <python><pyspark><databricks><7zip><py7zr> | 2024-12-05 14:04:06 | 1 | 996 | WilliamEllisWebb |
79,254,930 | 752,092 | How to properly and efficiently read and filter a .las file to memory in chunks using laspy | <p>I'm working on a number of large .las files (>300M points) from LiDAR scans where I have to perform some calculations on a subset of the points in those files. Reading the files all at once is problematic due to the large memory use when reading all the data into memory, making the processing extremely slow. I'm ... | <python><point-clouds><lidar><laspy> | 2024-12-05 13:44:56 | 0 | 326 | rhkarls |
79,254,763 | 1,205,158 | How can I access an XML node's attributes in Python that have a namespace? | <p>I've got a question about parsing a rather complicated XML document in Python with <code>xml.etree.ElementTree</code>. The XML is <code>scap-security-guide-0.1.75/ssg-ubuntu2204-ds.xml</code> from <code>https://github.com/ComplianceAsCode/content/releases/download/v0.1.75/scap-security-guide-0.1.75.zip</code> and t... | <python><xml><namespaces><elementtree> | 2024-12-05 12:53:35 | 1 | 339 | John |
79,254,587 | 12,466,687 | How to get a line marking for each tick on x axis in plotnine chart in python? | <p>I am trying to replicate some bits from a reference chart and create marking for every tick on x axis in plotnine plot.</p>
<p>Reference Chart:
<a href="https://i.sstatic.net/25aoEmM6.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/25aoEmM6.png" alt="enter image description here" /></a></p>
<p>I am no... | <python><ggplot2><plotnine> | 2024-12-05 11:59:14 | 1 | 2,357 | ViSa |
79,254,467 | 1,307,905 | how to insert from __future__ import annotations in a future proof way | <p>The <a href="https://docs.python.org/3.14/whatsnew/3.14.html#from-future-import-annotations" rel="nofollow noreferrer">Python 3.14 documentation</a> states that the</p>
<pre><code>from __future__ import annotations
</code></pre>
<p>directive will be considered deprecated with the release of 3.14 and expected to be r... | <python><python-typing> | 2024-12-05 11:25:10 | 1 | 78,248 | Anthon |
79,254,344 | 13,339,621 | Simple example of influxdb-client-python | <p>I am running the script <a href="https://github.com/influxdata/influxdb-client-python/blob/ab16384b7e9931da8b74f9a19af89939c0a3b673/examples/example.py" rel="nofollow noreferrer">example.py</a> from the <code>influxdb-client-python</code> code base. It runs and writes a data point to a local influxDB instance, for t... | <python><influxdb><influxdb-python><influx-line-protocol> | 2024-12-05 10:50:56 | 2 | 1,549 | matleg |
79,254,205 | 21,185,825 | Python - Flask - cannot use flask run - The system cannot find the file specified | <p>After having installed my environment, I just try to run my flask app</p>
<p>It works fine using python</p>
<pre><code>.\venv\Scripts\python.exe .\src\main.py --debug
</code></pre>
<p>But as I try to run this</p>
<pre><code>.\venv\Scripts\activate.bat
flask.exe app .\src\main.py
</code></pre>
<p>I get... | <python><flask> | 2024-12-05 10:09:46 | 0 | 511 | pf12345678910 |
79,253,942 | 12,466,687 | How to do facet_wrap/facet_grid properly in plotnine showing relevant subcategpries only in python? | <p>I have data with two columns with categories and I am trying to create a split/facets based on parent category that will contain sub categories. Below is something that I have tried:</p>
<pre><code>import pandas as pd
import plotnine as p9
from plotnine import *
# Create a sample dataset
new_data = {
'date': pd... | <python><ggplot2><plotnine> | 2024-12-05 08:51:22 | 1 | 2,357 | ViSa |
79,253,846 | 11,748,924 | Could not locate class 'SinePositionEncoding'. Make sure custom classes are decorated with `@keras.saving.register_keras_serializable()` | <p>I trained transformer with <code>SinePositionEncoding</code> and <code>TransformerEncoder</code>:</p>
<p>Instead of using from <code>keras-hub</code> from <code>pip</code> due to error in Windows due to numpy compatibility, I directly copy the source code like below:</p>
<pre><code>#@title Define SinePositionEncodin... | <python><keras> | 2024-12-05 08:16:27 | 1 | 1,252 | Muhammad Ikhwan Perwira |
79,253,803 | 11,815,097 | Pagination and continuation token in Azure Table Storage Python API | <p>Similar questions asked <a href="https://stackoverflow.com/questions/34680011/python-how-to-grab-azure-continuation-token">here</a> but the azure table package has updated significantly since then and that solution doesn't work any more.</p>
<p>I'm using Azure Data Table Package V12.6.0: <a href="https://pypi.org/pr... | <python><database><azure><azure-table-storage> | 2024-12-05 07:58:24 | 1 | 315 | Yasin Amini |
79,253,560 | 2,709,454 | Difficulty converting python web socket code to java | <p>I'm trying to convert some python web socket code to Java (code that talks to a consumer device:)</p>
<pre><code> ssl_context = ssl.create_default_context()
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE
ws_connection_local = connect(f"wss://{target_ip}... | <python><java><ssl><websocket><java-websocket> | 2024-12-05 06:06:25 | 0 | 1,696 | xpusostomos |
79,253,283 | 11,626,909 | Counting the Frequency of Some Words within some other Key Words in Text | <p>I have two sets of word lists - first one I called <code>search words</code> and the second one I called <code>key words</code>. My goal is to calculate the frequency of <code>search words</code> within 10 words of <code>key words</code>. For example, assume that the word - <strong>acquire</strong> - is in <code>key... | <python><pandas><nlp> | 2024-12-05 03:05:06 | 1 | 401 | Sharif |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.