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 β |
|---|---|---|---|---|---|---|---|---|
75,221,271 | 16,169,533 | Django image dosen't show when searching? | <p>I have an inventory app with products and its name, photo.</p>
<p>I query the records in HTML page and all works fine and the images showing.</p>
<p>when i try to search the result come without the photo.</p>
<p>View:</p>
<pre><code>def inventory_search_view(request):
query = request.GET.get('q')
product_se... | <python><django><orm> | 2023-01-24 12:09:20 | 1 | 424 | Yussef Raouf Abdelmisih |
75,221,252 | 10,714,156 | PyTorch: Compute Hessian matrix of the model | <p>Say that, for some reason, I want to fit a linear regression using PyTorch, as illustrated below.</p>
<p>How could I compute the <strong>Hessian matrix</strong> of the model to, ultimately, compute the standard error for my parameter estimates?</p>
<pre><code>import torch
import torch.nn as nn
# set seed
torch.man... | <python><pytorch><regression><standard-error><hessian-matrix> | 2023-01-24 12:07:29 | 1 | 1,966 | Γlvaro A. GutiΓ©rrez-Vargas |
75,221,234 | 11,023,647 | Why the logs sent to syslog-ng are not saved? | <p>I have an application which I run with <code>docker-compose</code>. Now I'd like to add logging to my application so I added this image to my compose -file:</p>
<pre><code>syslog-ng:
image: lscr.io/linuxserver/syslog-ng:latest
container_name: syslog-ng
environment:
- PUID=1000
- PGID=1000
... | <python><docker><logging><python-logging><syslog-ng> | 2023-01-24 12:05:16 | 0 | 379 | lr_optim |
75,221,086 | 1,540,456 | List of values to list of dictionaries | <p>I have a list with some string values:</p>
<pre><code>['red', 'blue']
</code></pre>
<p>And I want to use those strings as values in single, constant keyed dictionaries. So the output would be:</p>
<pre><code>[{'color': 'red'}, {'color': 'blue'}]
</code></pre>
| <python><list><dictionary> | 2023-01-24 11:52:16 | 2 | 5,914 | Atlas91 |
75,220,524 | 2,179,057 | Python CLI Menu with Arrow Keys on Windows | <p>The terminal I use on Windows is Mingw-w64 (Git Bash). I am trying to find or create a CLI menu with Python that I can navigate with arrow keys, however nothing I find works.</p>
<p>The Python library, <code>simple-term-menu</code>, doesn't work on Windows. <code>console-menu</code> doesn't use arrow keys but it jus... | <python><command-line-interface><python-curses> | 2023-01-24 10:59:57 | 3 | 4,510 | Spedwards |
75,220,492 | 11,710,304 | poetry does not upgrade polars 15.16 | <p>I have a repository which consits mainly of python and polars code. Every time I want to update or add libraries with poetry I get this error. Until the version 15.15 I had no problems with polars. I have tried updating Polars within the IDE (PyCharm) and also with Brew. Is it something to do with the latest polars ... | <python><python-poetry><python-polars> | 2023-01-24 10:56:03 | 2 | 437 | Horseman |
75,220,272 | 2,919,585 | Why do I get a SettingWithCopyWarning when using a MultiIndex (but not with a simple index)? | <p>The following piece of code works as expected, with no warnings. I create a dataframe, create two sub-dataframes from it using <code>.loc</code>, give them the same index and then assign to a column of one of them.</p>
<pre class="lang-py prettyprint-override"><code>import numpy as np
import pandas as pd
df = pd.Da... | <python><pandas><dataframe><multi-index><chained-assignment> | 2023-01-24 10:36:11 | 2 | 571 | schtandard |
75,220,251 | 4,753,897 | hex to int python but get a letter in response | <p>This is pretty well documented but I keep getting output that doesn't make sense. I have a hex value that looks like</p>
<pre><code>\x00\x00\x00\x00\x00\x01\x86\xa0
</code></pre>
<p>but I get</p>
<pre><code> >>> b'\x00\x00\x00\x00\x00\x01\x86\xa0'.hex()
'00000000000186a0'
</code></pre>
<p>I am expecting a i... | <python><python-3.x> | 2023-01-24 10:34:05 | 2 | 12,145 | Mike3355 |
75,220,145 | 5,928,682 | props.source.bindAsNotificationRuleSource is not a function in aws cdk python | <p>I am trying to set up notification to my codepipeline in aws.
Been following this <a href="https://docs.aws.amazon.com/cdk/api/v1/python/aws_cdk.aws_codestarnotifications/README.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/cdk/api/v1/python/aws_cdk.aws_codestarnotifications/README.html</a></p>
<pre><c... | <python><amazon-web-services><aws-codepipeline><aws-cdk> | 2023-01-24 10:24:45 | 2 | 677 | Sumanth Shetty |
75,220,079 | 16,395,449 | CSV to Xls conversion using Pandas script | <p>Trying to convert csv to xls using Python script. I have a sample csv file - test_report.csv and it is having the below values</p>
<pre><code>COL1 COL2 COL3
A 1
B 2
C 5
</code></pre>
<p>COL3 is having empty or NULL values.</p>
<p>When I am trying to convert csv to xls using python script... | <python><python-3.x><pandas><dataframe> | 2023-01-24 10:18:59 | 0 | 369 | Jenifer |
75,220,007 | 806,160 | Running delta lake in python and Debian as standalone spark | <p>I want to use a delta lake in python. I installed spark as stand alone and anaconda in Debian 11.6.</p>
<p>The code that I try to run delta lake is:</p>
<pre><code>import pyspark
from delta import *
builder = pyspark.sql.SparkSession.builder.appName("MyApp") \
.config("spark.sql.extensions",... | <python><pyspark><delta-lake> | 2023-01-24 10:12:30 | 1 | 1,423 | Tavakoli |
75,219,852 | 6,941,145 | Changing task_runner in prefect deployment | <p>Is there a way to change the <code>task_runner</code> within a prefect deployment? I would like to have possibility to have for a single flow a deployment with say <code>ConcurrentTaskRunner</code> and <code>DaskTaskRunner</code> (local or remote).</p>
<p>The only way I have found so far is to create within deployme... | <python><prefect> | 2023-01-24 09:58:04 | 1 | 317 | Piotr Siejda |
75,219,678 | 14,860,526 | Check if a type is Union type in Python | <p>I have defined a dataclass:</p>
<pre><code>import dataclasses
@dataclasses.dataclass
class MyClass:
attr1: int | None
attr2: str | None
</code></pre>
<p>I can loop through the types of my attributes with:</p>
<pre><code>for field in dataclasses.fields(MyClass):
fieldname = field.name
fieldtype = fie... | <python><python-typing> | 2023-01-24 09:42:41 | 1 | 642 | Alberto B |
75,219,448 | 19,580,067 | Read outlook Email from one of my 2 email addresses using win32 python | <p>I have 2 outlook email accounts opened in app. So trying to read the emails of one particular account using python. I have tried few steps but didn't work. Any suggestions on how can I do that.
I know how to read emails if i have only one account but not sure how to do that with 2.</p>
<pre><code>code below:
outlook... | <python><jupyter-notebook><outlook><pywin32><win32com> | 2023-01-24 09:16:31 | 1 | 359 | Pravin |
75,219,255 | 16,250,224 | Reallocate the fraction of weights above threshold to the other weights while maintaining the sum per group | <p>I have a dataframe <code>df1</code> with <code>Date</code> and <code>ID</code> as index and the <code>Weight</code>. I want to set an upper weight limit (30%) of the weights per date. The weights on each day add up to 100% and if I set an upper weight limit, it is the case that the next biggest weight is then bigger... | <python><pandas> | 2023-01-24 08:54:05 | 1 | 793 | fjurt |
75,219,242 | 1,415,325 | How to return value from a javascript call in Jupyterlab? | <p>I am struggling to read clipboard from <strong>jupyterlab</strong>.
My jupyter server is running on a remote instance using docker, so pyperclip and other similar tricks are not working. The idea is to use javascript but I have very limited experience using it. I am able to get the clipboard value and paste it to th... | <javascript><python><jupyter-lab> | 2023-01-24 08:52:37 | 0 | 1,429 | sweetdream |
75,218,903 | 19,238,204 | How to Close the Surface of this Half Cylinder with Python Matplotlib? | <p>I have this half cylinder plot, but it is not closed on the surface. How to make it close?</p>
<p>Is it possible to plot cylinder from vertices and sides? With 2 vertices become an arc?</p>
<pre><code>from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d.art3d import Poly3DCollection, Line3DCollection
impor... | <python><matplotlib> | 2023-01-24 08:16:07 | 1 | 435 | Freya the Goddess |
75,218,781 | 1,581,090 | How to read UDP data from a given port with python in Windows? | <p>On Windows 10 I want to read data from UDP port 9001. I have created the following script which does not give any output (python 3.10.9):</p>
<pre><code>import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(("", 9001))
while True:
data, addr = sock.recv(1024)
print(f... | <python><windows><powershell> | 2023-01-24 08:00:24 | 1 | 45,023 | Alex |
75,218,686 | 3,467,698 | How do I view raw SQL of the query generated by asyncpg? | <p>As it is said in <a href="https://magicstack.github.io/asyncpg/current/usage.html" rel="nofollow noreferrer">asyncpg Usage</a>, I can use <code>$n</code> pattern for the arguments and execute a query this way, for example:</p>
<pre><code>result = await conn.fetchval("SELECT $1", 42)
</code></pre>
<p>In thi... | <python><asyncpg> | 2023-01-24 07:46:06 | 0 | 9,971 | Fomalhaut |
75,218,667 | 4,519,018 | Python mysql connector rollback not working | <p>I am writing a python script that does the following as a part a transaction.</p>
<ol>
<li>Creates a new database.</li>
<li>Creates new tables using a schema.sql file.</li>
<li>Copies the data from the master DB to this new DB using <code>insert into select * from master.table_name...</code> like SQL statements.</li... | <python><mysql><innodb> | 2023-01-24 07:44:00 | 1 | 808 | vvs14 |
75,218,609 | 13,359,498 | Validation acc is very high in each fold but Test acc is very low | <p>I am trying to implement a neural network. I am using CNN model for classifying. First I split the dataset into train and test.</p>
<p>Code Snippet:</p>
<p><code>X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.2, random_state=42, shuffle=True, stratify=Y)</code></p>
<p>then I built a CNN model ... | <python><tensorflow><keras><deep-learning><conv-neural-network> | 2023-01-24 07:36:52 | 2 | 578 | Rezuana Haque |
75,218,486 | 1,436,800 | How to make an attribute read-only in serializers in DRF? | <p>I have a serializer.</p>
<pre><code>class MySerializer(serializers.ModelSerializer):
class Meta:
model = models.MyClass
</code></pre>
<p>My model class is:</p>
<pre><code>class MyClass(models.Model):
employee = models.ForeignKey("Employee", on_delete=models.CASCADE)
work_done = models.T... | <python><django><django-rest-framework><django-views><django-serializer> | 2023-01-24 07:22:04 | 2 | 315 | Waleed Farrukh |
75,218,300 | 7,177,478 | How to initialize database with some data when app startup? (fastapi, sqlalchemy) | <p>I'm new to the fastapi and sqlalchemy. And I'm trying to initialize some data when I startup my app. Here is what I'm thinking of:</p>
<pre><code>@app.on_event("startup")
async def startup_event():
with SessionLocal() as session:
country_dataframe = pd.read_csv('./initialize_data/country.csv')
... | <python><sqlalchemy><fastapi> | 2023-01-24 06:58:28 | 0 | 420 | Ian |
75,218,218 | 20,599,682 | How to solve expressions from a list? | <p>I have a list of expressions (+ - *):
<code>["2 + 3", "5 - 1", "3 * 4", ...]</code>
and I need to convert every expresion to <code>expression = answer</code> like this <code>2 + 3 = 5</code>.</p>
<p>I tried just doing <code>print(listt[0])</code> but it outputs <code>2 + 3</code>, not <... | <python> | 2023-01-24 06:46:09 | 3 | 328 | FoxFil |
75,218,205 | 1,245,659 | ipython security lib missing | <p>Per instructions for IPython, I am supposed to be able to run this import when coding:</p>
<pre><code>from IPython.lib.security import passwd_check
</code></pre>
<p>I have IPython 8.8.0 installed as part of a Jupyter install.</p>
<p>however, when I attempt to run this library, it reports:</p>
<pre><code>ModuleNotFou... | <python><python-3.x><jupyter-notebook><ipython> | 2023-01-24 06:43:40 | 3 | 305 | arcee123 |
75,218,126 | 12,242,085 | How to replace values in columns in DataFrame with staing coma if exists in Python Pandas? | <p>I have Pandas DataFrame like below:</p>
<pre><code>df = pd.DataFrame()
df["COL1"] = [111,222,333]
df["COL2"] = ["CV_COUNT_ABC_XM_BF, CV_COUNT_DEF_XM_BF", "CV_COUNT_DEF_XM_ BF", "LACK"]
df["COL3"] = ["LACK", "CV_COUNT_ABC_XM_BF, CV_COUNT_DEF_X... | <python><pandas><dataframe><if-statement><replace> | 2023-01-24 06:32:21 | 1 | 2,350 | dingaro |
75,218,000 | 597,858 | Remove duplicate pages from a PDF | <p>I have a pdf file which has lots duplicate pages which I want to remove. This is my code:</p>
<pre><code>pdf_reader = PyPDF2.PdfFileReader(filename_path)
print(pdf_reader.getNumPages())
pdf_writer = PyPDF2.PdfFileWriter()
last_page_n = pdf_reader.getNumPages() - 1
megalist1 =[]
for i in range(last_page_n):
curr... | <python> | 2023-01-24 06:13:56 | 2 | 10,020 | KawaiKx |
75,217,883 | 2,993,106 | python datefinder.find_dates does not work if only years are present e.g '2014 - 2018' | <p>I am trying to extract dates from a string if only years are present, e.g the following string:</p>
<pre><code>'2014 - 2018'
</code></pre>
<p>should return the following dates:</p>
<pre><code>2014/01/01
2018/01/01
</code></pre>
<p>I am using the python library datefinder and it's brilliant when other element like a ... | <python><date><datefinder> | 2023-01-24 05:56:27 | 1 | 1,347 | Dino |
75,217,828 | 13,849,446 | selenium.common.exceptions.InsecureCertificateException: probably due to HSTS policy | <p>I am trying to open microsoft outlook using selenium firefox, but I get this when the url opens
Connection to outlook.live.com has a security policy called HTTP Strict Transport Security (HSTS), which means that Firefox can only connect to it securely. The error I get on terminal is</p>
<pre><code>Traceback (most re... | <python><selenium><selenium-webdriver><firefox><seleniumwire> | 2023-01-24 05:46:54 | 2 | 1,146 | farhan jatt |
75,217,780 | 7,177,478 | Sqlalchemy autoincrement not working while insert new data | <p>Hi I'm new to the sqlalchemy. And I have a table like this.</p>
<pre><code>class Block(Base):
__tablename__ = "block"
id = Column(Integer, nullable=False, autoincrement=True)
blocker = Column(Integer, ForeignKey("user.id"), nullable=False, primary_key=True)
blocked = Column(Integ... | <python><sqlalchemy><fastapi> | 2023-01-24 05:40:30 | 1 | 420 | Ian |
75,217,779 | 4,732,139 | Pandas weekly resampling | <p>I have a dataframe with daily market data (OHLCV) and am resampling it to weekly.</p>
<p>My specific requirement is that the weekly dataframe's index labels must be the index labels of the <strong>first day of that week</strong>, whose data is <strong>present in</strong> the daily dataframe.</p>
<p>For example, in J... | <python><pandas><group-by><resampling> | 2023-01-24 05:40:26 | 1 | 373 | Py_Dream |
75,217,558 | 5,527,786 | Leetcode 3 sum different answer python vs javascript | <p>The <a href="https://leetcode.com/problems/3sum" rel="nofollow noreferrer">3 sum problem</a> is a well known coding interview problem. It states the following:</p>
<blockquote>
<p>Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums... | <javascript><python> | 2023-01-24 04:57:41 | 1 | 561 | nodel |
75,217,503 | 1,436,800 | Custom Validate function is not being called inside perform_create function in DRF | <p>This is my code.</p>
<pre><code>class MyViewSet(ModelViewSet):
serializer_class = MySerializer
queryset = MyClass.objects.all()
def get_serializer_class(self):
if request.user.is_superuser:
return self.serializer_class
else:
return OtherSerializer
def perform... | <python><django><django-rest-framework><django-serializer><django-validation> | 2023-01-24 04:47:11 | 1 | 315 | Waleed Farrukh |
75,217,411 | 12,242,085 | How to modify Data Frame so as to take values between some other character in column in Python Pandas? | <p>I have DataFrame in Python Pandas like below:</p>
<pre><code>COL_1 | COL_2 | COL_3
------|---------------------|---------
111 | CV_COUNT_ABC_XM_BF | CV_SUM_ABC_XM_BF
222 | CV_COUNT_DEF_XM_BF | CV_SUM_CC_XM_BF
333 | CV_COUNT_CC_XM_BF | LACK
444 | LACK | CV_SUM_DEF_XM_BF
... ... | <python><pandas><dataframe><numpy><if-statement> | 2023-01-24 04:30:45 | 2 | 2,350 | dingaro |
75,217,264 | 9,727,704 | Getting list elements satisfying some criteria using a comprehension | <p>I have a list like this:</p>
<pre><code>foolist = ['foo bar', 'foo', 'bar' 'foo bar']
</code></pre>
<p>I want the number of <code>foo</code>s in that list, without using regex. Is there a simpler way to do it than below, using one line?</p>
<pre><code>print(len([i for i in [ 'foo' in line for line in foolist ] if ... | <python><list-comprehension> | 2023-01-24 03:58:44 | 1 | 765 | Lucky |
75,217,081 | 6,494,707 | Tensor of Lists: how to convert to tensor of one list? | <p>I have a tensor like this</p>
<pre><code>tensor([[4.],[1.]], device='cuda:0')
</code></pre>
<p>I wanna change to the following:</p>
<pre><code>tensor([4.,1.], device='cuda:0')
</code></pre>
<p>How to do that?</p>
<p>I am not sure if this is the reason for the error:</p>
<pre><code>loss = nn.MSELoss(y_tilde,y)
Runti... | <python><pytorch><tensor><torch> | 2023-01-24 03:11:11 | 1 | 2,236 | S.EB |
75,217,063 | 192,221 | Polars table convert a list column to separate rows i.e. unnest a list column to multiple rows | <p>I have a Polars dataframe in the form:</p>
<pre><code>df = pl.DataFrame({'a':[1,2,3], 'b':[['a','b'],['a'],['c','d']]})
</code></pre>
<pre><code>βββββββ¬βββββββββββββ
β a β b β
β --- β --- β
β i64 β list[str] β
βββββββͺβββββββββββββ‘
β 1 β ["a", "b"] β
β 2 β ["a"] ... | <python><dataframe><python-polars> | 2023-01-24 03:08:49 | 1 | 6,017 | kristianp |
75,216,980 | 9,521,905 | Tensorflow object detection from a video | <p>I am trying to use tensorflow's available pretrained modal and see objects gets identified in a video. Here is what I've tried.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-overrid... | <python><tensorflow> | 2023-01-24 02:46:57 | 1 | 677 | Berglund |
75,216,548 | 11,413,442 | AWS SAM CLI throws error: Error building docker image | <p>I am trying to use the SAM CLI on my M1 Mac.</p>
<p>I followed the steps outlined in <a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-getting-started-hello-world.html" rel="noreferrer">these docs</a>:</p>
<pre><code>sam init
cd sam-app
sam build
sam deploy --guided
<... | <python><docker><aws-lambda><serverless><aws-sam-cli> | 2023-01-24 01:00:53 | 1 | 372 | Mathis Van Eetvelde |
75,216,547 | 7,530,975 | How can I use matplotlib to animate several graphs each with an advancing window of real-time data and utilizing blitting? | <p>I currently have a working python program that simultaneously animates one or more graphs each with an advancing window of real-time data. The program utilizes FuncAnimation and replots each graph using the axes plot routine. It is desired to show updates every second in the animation and the program is able to per... | <python><matplotlib><animation> | 2023-01-24 01:00:38 | 1 | 341 | GAF |
75,216,543 | 18,091,372 | Using geopandas to explore a geojson LineString | <p>I have the following python code:</p>
<pre><code>import geopandas
data = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "GeometryCollection"... | <python><geojson><geopandas> | 2023-01-24 01:00:10 | 1 | 796 | Eric G |
75,216,507 | 3,380,902 | Plotly Dash: Uncaught (in promise) Error after upgrading dash to 2.7.1 | <p>I have a Dash App running inside a Flask App. I am seeing a bunch of errors in the console after upgrading dash to <code>2.7.1</code></p>
<pre><code>Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received
Uncaught (... | <javascript><python><plotly-dash> | 2023-01-24 00:51:46 | 1 | 2,022 | kms |
75,216,496 | 2,747,734 | How to match between the nth occurrence and nth +1 occurrence using regex | <p>I have the following text:</p>
<pre><code>aBcD-19/WES/VA-MKL-2217223/2020
</code></pre>
<p>I would like to extract what is between the 2nd occurrence of / and the 3rd occurrence of /. Based on the text, the following will be extracted</p>
<pre><code>VA-MKL-2217223
</code></pre>
<p>So far I came out with this pattern... | <python><regex> | 2023-01-24 00:48:59 | 1 | 1,313 | Sarah cartenz |
75,216,470 | 1,887,261 | How to get data from both sides of a many to many join in django | <p>Let's say I have the following models:</p>
<pre><code>class Well(TimeStampMixin, models.Model):
plate = models.ForeignKey(Plate, on_delete=models.CASCADE, related_name="wells")
row = models.TextField(null=False)
column = models.TextField(null=False)
class Meta:
unique_together = [[... | <python><django><django-models><django-queryset> | 2023-01-24 00:43:52 | 1 | 12,666 | metersk |
75,216,176 | 5,807,808 | json normalize to Dataframe for nested objects, Python | <p>i am trying to use normalize function to convert json to data frame using json_normalize.
This is the json i am working with</p>
<pre><code>data = {
"Parent":
[
{
"Attributes":
[
{
"Values": [{
"Month"... | <python><pandas><dataframe> | 2023-01-23 23:42:35 | 2 | 401 | peter |
75,216,174 | 8,783,155 | Torchserve streaming of inference responses with gRPC | <p>I am trying to send a singular request to a Torchserve server and retrieve a stream of responses. The processing of the request takes some time and I would like to receive intermeddiate updates over the course of the run. I am quite new to torchserve and especially gRPC but I assume that I either need to write a cus... | <python><pytorch><grpc><torchserve> | 2023-01-23 23:42:22 | 1 | 781 | P_Andre |
75,216,089 | 6,205,382 | How to calculate percentage of column using pandas pivot_table() | <p>I am attempting to get the frequency of objects per version expressed as a percentage.</p>
<p>Input <code>dfsof = pd.read_clipboard()</code></p>
<pre><code>file version object
path1 1.0 name
path1 1.0 session
path1 1.0 sequence
path2 2.01 name
path2 2.01 s... | <python><pandas><group-by><pivot-table> | 2023-01-23 23:26:08 | 1 | 2,239 | CandleWax |
75,215,883 | 17,696,880 | Why does this capture group capture a single character but not everything that the capture group covers? | <pre class="lang-py prettyprint-override"><code>import re
#input_example
capture_where_capsule = "((PL_ADVB='la gran biblioteca rΓ‘pidamente y luego llegamos allΓ')hacΓa)"
list_all_adverbs_of_place = ["de allΓ", "de alli", "allΓ", "alli", "de allΓ‘", "de... | <python><python-3.x><regex><string><regex-group> | 2023-01-23 22:54:24 | 1 | 875 | Matt095 |
75,215,850 | 3,582,831 | How should I split the dataset in the Keras data generator train-valid-test? | <p>How should I split the dataset in the Keras data generator <code>train-valid-test</code>?
Should I load the train folder as a train-valid subset and load the test folder ad the test to use with <code>model.predict(...).</code> or use <code>valid_generator</code> again?</p>
<pre><code>train_datagen = ImageDataGenera... | <python><tensorflow><keras> | 2023-01-23 22:50:18 | 1 | 4,867 | coder |
75,215,847 | 2,130,515 | How to fix not found element on Selenium | <p>I want to run some query on <a href="https://www.scribbr.com/paraphrasing-tool/" rel="nofollow noreferrer">here</a></p>
<pre><code>from time import sleep
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.commo... | <python><selenium> | 2023-01-23 22:49:18 | 2 | 1,790 | LearnToGrow |
75,215,801 | 499,699 | PyTorch Transformer Encoder masking sequence values | <p>It was my understanding that in the PyTorch <code>TransformerEncoder</code> I can pass a mask which would then stop certain features being attended to. By doing so, the model learns to "fill in the gaps" and becomes more resilient to noise and overfitting.</p>
<p>In the documentation for <code>TransformerE... | <python><pytorch><transformer-model> | 2023-01-23 22:43:01 | 1 | 14,954 | Γlex |
75,215,780 | 6,077,239 | Implement qcut functionality using polars | <p>I have been using polars but it seems like it lacks qcut functionality as pandas do.</p>
<p>I am not sure about the reason but is it possible to achieve the same effect as pandas qcut using current available polars functionalities?</p>
<p>The following shows an example about what I can do with pandas qcut.</p>
<pre>... | <python><python-polars> | 2023-01-23 22:39:52 | 1 | 1,153 | lebesgue |
75,215,442 | 1,115,833 | efficient parsing of large nested json into a file | <p>I would like to parse this json <code>Affiliations</code> into a text file of entries without the email addresses:</p>
<pre><code># example of one entry: total entries: ~1million
{
"_index": "group",
"_type": "_doc",
"_id": "9890798789",
"_scor... | <python><python-3.x><bash> | 2023-01-23 21:54:51 | 1 | 7,096 | JohnJ |
75,215,428 | 17,945,841 | After applying PCA ,K-means assigns a center that is far from the cluster it self | <p>My data contains about 1200 observations and 25 features. I performed dimensionality reduction with PCA, and then used k-means.</p>
<p>It seems I'm getting random centers, as they are far from the cluster itself. Look at the yellow cluster for example, where is its center?</p>
<p>Notice that the clusters didn't move... | <python><machine-learning><cluster-analysis><k-means> | 2023-01-23 21:53:34 | 0 | 1,352 | Programming Noob |
75,215,389 | 13,142,245 | Pandas pivot to explode columns and fill values? | <p>I have a Pandas dataframe like so</p>
<pre><code>movie, week, sales
-----, ----, ------
1, 1, 100
...
1, 52, 200
2, 1, 500,
...
</code></pre>
<p>What I actually want it to look like is</p>
<pre><code>movie, week_1, ... week_52,
1, 1, 200
2, 1, 500
</code></pre>
<p>So w... | <python><pandas><dataframe><pivot> | 2023-01-23 21:48:22 | 0 | 1,238 | jbuddy_13 |
75,215,360 | 11,370,582 | Pass Pandas Dataframe between functions using Upload component in Plotly Dash | <p>I am working with an Excel workbook in plotly dash and I need to access the dataframe it returns so I can use it as an input to another function, I'm following this tutorial - <a href="https://dash.plotly.com/dash-core-components/upload" rel="nofollow noreferrer">https://dash.plotly.com/dash-core-components/upload</... | <python><pandas><function><parameter-passing><plotly-dash> | 2023-01-23 21:44:44 | 1 | 904 | John Conor |
75,215,318 | 4,106,634 | Combine multiple table schemas in one separate table in databricks | <p>I am learning Databricks and going through an exploring and research phase. I found various tools while triaging python syntax. I.e. <strong>Dataframes</strong> with <strong>PySpark</strong>, <strong>Bamboo</strong> library, <strong>Apache Spark</strong> library to read SQL objects, Panda etc.</p>
<p>But somehow I a... | <python><azure-databricks> | 2023-01-23 21:39:50 | 1 | 422 | adventureworks |
75,215,099 | 1,098,792 | Why am I only able to scrape 100 tweets with snscrape? | <p>So granted I'm not technical or experience with Python, but I need to scrape maybe 5,000 tweets from the Twitter account of a particular user. I got it working, but I can only scrape 100 tweets β I'm not sure what I'm doing wrong.</p>
<p>Here's the code I use:</p>
<pre><code>snscrape --jsonl --progress --max-results... | <python><web-scraping><twitter> | 2023-01-23 21:12:25 | 1 | 9,623 | Tom Maxwell |
75,215,078 | 2,925,387 | aioredis - how to process redis messages asynchronously? | <p>I have to process every message from redis asynchronously.
Here is my attempt with aioredis:</p>
<pre class="lang-py prettyprint-override"><code>import asyncio
import aioredis
async def reader(channel: aioredis.client.PubSub):
while True:
data = None
try:
message = await channel.get... | <python><redis><aioredis> | 2023-01-23 21:09:46 | 1 | 789 | SKulibin |
75,215,046 | 8,065,797 | Replace incorrect occurrence of comas | <p>I would need to replace all incorrect occurrences of coma in the text</p>
<pre><code>jlkj,jlkj
jlkj, jlkj
jlkj,jlkj
jlkj , jlkj
</code></pre>
<p>with <code>, </code>, that means it would be <code>jlkj, jlkj</code> in result for all the cases.</p>
<p>The the pattern I came up with does not work: <code>(.*),(.*)</code... | <python><regex> | 2023-01-23 21:05:49 | 1 | 529 | JanFi86 |
75,215,044 | 402,649 | Python WSGI ignoring python-home virtual environment? | <p>Using WSGI with Python 3.6 on RHEL 8 to run Flask on Apache.</p>
<p>In the WSGI configuration, we have the following line:</p>
<pre><code>WSGIDaemonProcess myapp user=apache group=apache threads=5 python-home=/var/www/FLASKAPPS/myapp/venv
</code></pre>
<p>When activating the virtual environment and running the Flask... | <python><python-3.6><wsgi> | 2023-01-23 21:05:32 | 1 | 3,948 | Wige |
75,214,968 | 8,964,393 | How to create lists from pandas columns | <p>I have created a pandas dataframe using this code:</p>
<pre><code>import numpy as np
import pandas as pd
ds = {'col1': [1,2,3,3,3,6,7,8,9,10]}
df = pd.DataFrame(data=ds)
</code></pre>
<p>The dataframe looks like this:</p>
<pre><code>print(df)
col1
0 1
1 2
2 3
3 3
4 3
5 6
6 7
7 ... | <python><pandas><list><iterator><field> | 2023-01-23 20:56:40 | 4 | 1,762 | Giampaolo Levorato |
75,214,941 | 817,630 | How should I type-hint a generic class method that calls another class method to construct an instance of the class? | <p>I'm trying to figure out the type hinting for a couple of abstract classes that I want to use as base classes for classes have a <code>create</code> function. Specifically, this is for deserialization typing.</p>
<p>My simple example looks like this</p>
<pre class="lang-py prettyprint-override"><code>from abc import... | <python><mypy><typing><type-variables> | 2023-01-23 20:54:08 | 1 | 5,912 | Kris Harper |
75,214,612 | 1,664,944 | Nested JSON to Pandas Data frame | <p><strong>Input JSON</strong></p>
<pre><code>{
"tables": {
"Cloc": {
"MINT": {
"CANDY": {
"Mob": [{
"loc": "AA",
"loc2": [&... | <python><json><pandas><nested-json> | 2023-01-23 20:16:06 | 1 | 706 | Alind Billore |
75,214,218 | 372,429 | Looking for python equivalent of powershell code | <p>I have some powershell code that I want to have an equivalent way to do with python:</p>
<pre><code>$secretARgs = @{ fileName = "ssltls.crt"
>> fileAttachment = [IO.File]::ReadAllBytes("c:\users\myuser\git\myrepos\ssltls.crt")
>> } | ConvertTo-Json
</code></pre>
<p>It uses this to add... | <python><powershell> | 2023-01-23 19:33:54 | 1 | 479 | archcutbank |
75,214,198 | 20,589,275 | How to call a function in django view.py | <p>I need to call the function get_context_data in my VacanciesView.
Code views.py:</p>
<pre><code>def VacanciesView(request):
navigate_results = Navigate.objects.all()
context_vac = { 'navigate_results': navigate_results}
get_context_data(self, **kwargs)
return render(request, 'main/vacancies.html', c... | <python><django> | 2023-01-23 19:32:00 | 1 | 650 | Proger228 |
75,214,006 | 391,104 | Use Python to split a string and output each token into seperate lines? | <pre><code>$ echo '"a1","a2","a3"'|python3 -c "import sys; print('\n'.join(sys.stdin.read().splitlines()), sep='\n');"
"a1","a2","a3"
$ echo '"a1","a2","a3"'|python3 -c "import sys; [print(a, sep='\n') for a in sys... | <python> | 2023-01-23 19:14:05 | 1 | 36,152 | q0987 |
75,213,916 | 9,582,542 | Return Dynamic MSSQL query from python | <p>I have this script below. I left out the connection details for security purposes but the code executes with out error in python and in MS SQL 2019</p>
<pre><code>import pandas as pd
import pyodbc
sqlInsertScript = """
SELECT 'INSERT INTO dbo.table(' +
STUFF ((
SELECT ', [' + name + ']'
... | <python> | 2023-01-23 19:03:36 | 1 | 690 | Leo Torres |
75,213,815 | 5,266,176 | is it possible to run jupyter nbconvert in colab to execute on ipynb file that mounts to google drive? | <p>I am trying to execute a series of ipynb notebooks sequentially from another, in colab.</p>
<pre><code>from google.colab import drive
drive.mount('/content/gdrive')
!jupyter nbconvert --to notebook --ExecutePreprocessor.timeout=600 --execute "/content/drive/My Drive/Mike Education/Code/Extract/Reading Lev... | <python><jupyter-notebook><google-colaboratory> | 2023-01-23 18:53:45 | 0 | 371 | elcunyado |
75,213,272 | 1,472,474 | limited resource for ProcessPoolExecutor (for example tcp port) | <h2>Motivation:</h2>
<p>I want to run some function (<code>myfunc</code> in the following example) for a large
number of values, and this function needs a free TCP port, and because the
number of TCP ports is limited I want to have only as many TCP ports as is the
number of worker processes.</p>
<blockquote>
<p>In real... | <python><python-multiprocessing><concurrent.futures> | 2023-01-23 17:55:40 | 2 | 5,587 | Jan Spurny |
75,213,238 | 11,168,443 | Trying to find the difference between 2 datetime objects and getting only Hours, Minutes, and Seconds | <p>I am pulling an ending time from a json api response. Then I am trying to calculate the time remaining, before the end time, to call a function after it ends.</p>
<pre><code>end_time_string = data['endTime'] # Get the end time in a string in weird format
date_format = "%Y%m%dT%H%M%S.%fZ" # Specify the da... | <python><python-3.x><datetime> | 2023-01-23 17:52:07 | 2 | 965 | Lzypenguin |
75,213,207 | 18,029,950 | pip returns error: CB_ISSUER_CHECK at startup | <p>Pip was running just fine yesterday. Today it's angry. I've attempted the following command:
<code>sudo apt reinstall python3-pip</code></p>
<p>The only thing I've done on this server since yesterday is run "sudo apt update"</p>
<p>What should I do to fix this?</p>
<p>Here is the error:</p>
<pre><code>Tr... | <python><python-3.x><pip> | 2023-01-23 17:48:39 | 1 | 308 | TxTechnician |
75,213,102 | 12,906,445 | Can't train model from checkpoint on Google Colab as session expires | <p>I'm using Google Colab for finetuning a pre-trained model.</p>
<p>I successfully preprocessed a dataset and created an instance of the Seq2SeqTrainer class:</p>
<pre class="lang-py prettyprint-override"><code>trainer = Seq2SeqTrainer(
model,
args,
train_dataset=tokenized_datasets["train"],
... | <python><machine-learning><google-colaboratory> | 2023-01-23 17:38:51 | 1 | 1,002 | Seungjun |
75,213,049 | 15,283,859 | Using np.where to access values in a dictionary - vectorization | <p>Given a dictionary</p>
<pre><code>coaching_hours_per_level = {1:30, 2: 55, 3:80, 4:115}
coaching_hours_per_level
</code></pre>
<p>and a dataframe:</p>
<pre><code>df1 = {'skill_0': {'jay': 1, 'roy': 4, 'axel': 5, 'billy': 1, 'charlie': 2},
'skill_1': {'jay': 5, 'roy': 3, 'axel': 2, 'billy': 5, 'charlie': 1},
'skill... | <python><pandas><numpy> | 2023-01-23 17:33:01 | 1 | 895 | Yolao_21 |
75,213,013 | 9,173,710 | How to fill array by keypoints | <p>I have an array like this:<br />
<code>arr = [[180, 210, 240, 270, 300],[38.7, 38.4, 38.2, 37.9,37.7]]</code><br />
It contains frame numbers from a video and the value of a sensor recorded during that frame.</p>
<p>I have a program to evaluate the video material and need to know the value of the sensor for each fra... | <python><arrays><interpolation> | 2023-01-23 17:28:26 | 2 | 1,215 | Raphael |
75,213,001 | 9,781,480 | How to install package dependencies for a custom Airbyte connector? | <p>I'm developing a custom connector for Airbyte, and it involves extracting files from different compressed formats, like <code>.zip</code> or <code>.7z</code>. My plan was to use <a href="http://wummel.github.io/patool/" rel="nofollow noreferrer">patool</a> for this, and indeed it works in local tests, running:</p>
<... | <python><docker><docker-compose> | 2023-01-23 17:27:37 | 1 | 621 | PiFace |
75,212,965 | 5,507,389 | Class not directly inheriting but can use method from another class | <p>I came accross a piece of Python legacy code at work that I couldn't understand how it could work without errors. Obviously I can't write the exact code here but here is a minimal working example:</p>
<pre><code>class ClassB:
def func(self, txt: str):
return self.str_to_uppercase(txt)
class ClassA(Clas... | <python><class><inheritance><subclass> | 2023-01-23 17:24:41 | 2 | 679 | glpsx |
75,212,902 | 5,437,090 | webscraping an image with highlighted text | <p>I am doing web scraping on <a href="https://digi.kansalliskirjasto.fi/sanomalehti/binding/761979?term=Katri&term=Katrina&term=Ikonen&page=12" rel="nofollow noreferrer">this URL</a> which is a newspaper image with highlighted words. My purpose is to retrieve all those highlighted words in red. Inspecting ... | <python><web-scraping><beautifulsoup> | 2023-01-23 17:17:55 | 1 | 1,621 | farid |
75,212,894 | 6,534,818 | Translating Python loop to Javascript | <p>How can I yield the same output in Javascript, given this Python example?</p>
<p>I want to loop over an array and check a value, if condition met, store it.</p>
<pre><code>arr1 = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0,
13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 0, 0, ... | <javascript><python> | 2023-01-23 17:16:57 | 1 | 1,859 | John Stud |
75,212,878 | 10,967,961 | Finding similarity in a pandas variable | <p>I have a dataset with company names as follows:</p>
<pre><code>{0: 'SEEO INC',
1: 'BOSCH GMBH ROBERT',
2: 'SAMSUNG SDI CO LTD',
12: 'NAGAI TAKAYUKI',
21: 'WESTPORT POWER INC',
26: 'SAMSUNG ELECTRONICS CO LTD',
27: 'SATO TOSHIO',
28: 'SUMITOMO ELECTRIC INDUSTRIES',
31: 'TOSHIBA KK',
35: 'TEIKOKU SEIYAKU KK',... | <python><pandas><string><similarity> | 2023-01-23 17:15:50 | 1 | 653 | Lusian |
75,212,866 | 9,373,756 | Can I change "import" (english) to "importar" (portuguese) in python? | <p>To change a function in python I know I can simply assign to a new variable, like:</p>
<pre><code>imprimir = print
imprimir("test") # it prints "test"
</code></pre>
<p>However I can't do that to <code>import</code>. Like <code>import = importar</code>.
I would like to do the following:</p>
<pre>... | <python><built-in> | 2023-01-23 17:14:32 | 1 | 725 | Artur |
75,212,830 | 9,786,534 | xarray: Combine data variables with discrete observations in a new continuous dimension | <p>I am working with a crop calendar that records the day of the year (doy) at which a given phenological state occurs - here the mean planting (<code>plant</code>) and harvest (<code>harvest</code>) seasons (note that the <code>nan</code> printed below are pixels on oceans, the other values contain <code>int</code>):<... | <python><python-xarray> | 2023-01-23 17:10:17 | 1 | 324 | e5k |
75,212,810 | 458,274 | Prepopulate a DateTimeField in Django Rest Framework | <p>I'm using a Django Rest Framework <a href="https://www.django-rest-framework.org/api-guide/serializers/" rel="nofollow noreferrer">Serializer</a>. Fields allow the <a href="https://www.django-rest-framework.org/api-guide/fields/#initial" rel="nofollow noreferrer">initial</a> parameter to be passed, which prepopulate... | <python><datetime><django-rest-framework> | 2023-01-23 17:09:17 | 1 | 6,931 | soerface |
75,212,803 | 7,658,051 | How can I call python directly inside Ansible playbook, in a for loop? | <p>I have developed a playbooks that sends a mail indicating a list of 3-zero-padded numbers.</p>
<p>I want to make the padding in the for loop which prints the information in the mail body.</p>
<p>The playbook takes the number to pad from variable <code>hostvars[host]['number']</code>.</p>
<p>The padding is made via t... | <python><for-loop><ansible> | 2023-01-23 17:08:50 | 1 | 4,389 | Tms91 |
75,212,761 | 12,860,924 | Segment image into sub-images components using python | <p>I am working on medical images containing sub-images. I want to segment these image types into their component sub-images. I tried a lot of codes that do segmentation but nothing of segment the image into the sub-images parts. please help me to do that.</p>
<p><strong>Original image and the sub-images that should be... | <python><image><image-processing><python-imaging-library><image-segmentation> | 2023-01-23 17:04:54 | 0 | 685 | Eda |
75,212,757 | 6,543,183 | compare several columns grouped by a list pandas | <p>I have the following pandas dataframe:</p>
<pre><code> A0 B0 C0 D0 E0 F0 G0 A1 B1 C1 D1 E1 F1 G1 label
0 1.3 2.4 1.5 2.0 2.0 3.2 5 1.3 2.4 1.5 2.0 2.0 3.2 5 True
1 1.3 2.4 1.5 2.0 2.0 3.2 7 1.3 2.4 1.5 2.0 2.0 3.2 5 False
2 1.3 2.4 1.5 2.0 2.0 3.2 ... | <python><pandas><numpy> | 2023-01-23 17:04:36 | 1 | 880 | rnv86 |
75,212,737 | 278,383 | Validating "Parallel" JSON Arrays | <p>I am trying to use pydantic to validate JSON that is being returned in a "parallel" array format. Namely, there is an array defining the column names/types followed by an array of "rows" (this is similar to how pandas handles <code>df.to_json(orient='split')</code> seen <a href="https://pandas.py... | <python><json><pydantic> | 2023-01-23 17:02:30 | 1 | 663 | JKD |
75,212,700 | 5,908,629 | Run Apache-beam pipeline job on existing google cloud VM | <p>I am creating a python apache-beam pipeline that has google cloud SQL ingestion, so when I am deploying the pipeline, a new VM is created automatically which has no access to my google cloud SQL instance, so my job is getting failed each time. showing below error log in job logs</p>
<p><a href="https://i.sstatic.net... | <python><google-cloud-platform><google-cloud-dataflow><apache-beam><apache-beam-io> | 2023-01-23 16:59:29 | 1 | 2,551 | lazyCoder |
75,212,567 | 6,367,971 | Concatenating CSVs into dataframe with filename column | <p>I am trying to concat multiple CSVs that live in subfolders of my parent directory into a data frame, while also adding a new filename column.</p>
<pre><code>/ParentDirectory
β
β
ββββSubFolder 1
β test1.csv
β
ββββSubFolder 2
β test2.csv
β
ββββSubFolder 3
β test3.csv
β test4.csv
β
ββββSubFol... | <python><pandas><concatenation><glob> | 2023-01-23 16:46:37 | 2 | 978 | user53526356 |
75,212,387 | 3,057,900 | grpc server handles multiple requests in parallel | <p>I have a question regarding the grpc server handles multiple requests in parallel, I have a grpc server, and the server provides an endpoint to handle client requests, and there are multiple clients sending request to the same endpoint.</p>
<p>When different clients send multiple requests to server at the same time,... | <python><grpc> | 2023-01-23 16:30:16 | 1 | 1,681 | ratzip |
75,212,260 | 14,353,779 | Pandas : Chaning date to a format where I can use `map` | <p>Im trying to get current data in string format <code>(Month-Date-Year)</code></p>
<p><code>def user_defined_function(date_str):</code> I have a user defined function which takes input date(<code>refresh_date</code>) in the above mentioned format. So I need to change the today's date to the required format and map it... | <python><pandas> | 2023-01-23 16:20:33 | 1 | 789 | Scope |
75,212,158 | 19,155,645 | VScode order of python imports: how to force tensorflow to import before keras? | <p>I am importing several libraries in a .py file using VScode.</p>
<p>somehow it always orders the imports when I am saving the file.
It is important for me that a certain order is maintained, for example:</p>
<pre><code>import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
</code></pre>
<p>should be... | <python><tensorflow><visual-studio-code><keras> | 2023-01-23 16:11:41 | 1 | 512 | ArieAI |
75,212,147 | 10,901,843 | How would I make clusters from a Levenshtein similarity matrix? | <p>I have a similarity matrix of words and would like to apply an algorithm that can put the words in clusters.</p>
<p>Here's the example I have so far:</p>
<pre><code>from Levenshtein import distance
import numpy as np
words = ['The Bachelor','The Bachelorette','The Bachelor Special','SportsCenter',
'SportsC... | <python><nlp><cluster-analysis><similarity><levenshtein-distance> | 2023-01-23 16:11:12 | 1 | 407 | AI92 |
75,211,952 | 3,692,004 | Test fails in Foundry when using asterisk (*) for unpacking when creating a dataframe | <p>I want to create a DataFrame in a fixture using the following code:</p>
<pre><code>@pytest.fixture
def my_fun(spark_session):
return spark_session.createDataFrame(
[
(*['test', 'testy'])
],
T.StructType([
T.StructField('mytest', T.StringType()),
T.Struc... | <python><apache-spark-sql><tuples><pytest><palantir-foundry> | 2023-01-23 15:57:58 | 2 | 619 | Benji |
75,211,934 | 11,710,304 | How can I use when, then and otherwise with multiple conditions in polars? | <p>I have a data set with three columns. Column A is to be checked for strings. If the string matches <code>foo</code> or <code>spam</code>, the values in the same row for the other two columns <code>L</code> and <code>G</code> should be changed to <code>XX</code>. For this I have tried the following.</p>
<pre><code>df... | <python><dataframe><python-polars> | 2023-01-23 15:57:03 | 1 | 437 | Horseman |
75,211,830 | 15,414,112 | how to install python modules where pipy.org is is not accessible from iran? | <p>so the problem is that pypi.org hase been filtered by iranian government(<strong>yes , i know it's ridiculous!</strong>). i tried to install some python modules from Github downloaded files:
<code>pip install moduleName</code>
but every module has it's own dependencies and try to connect to pipy.org to reach them. ... | <python><installation><pip><module><pypi> | 2023-01-23 15:49:32 | 6 | 500 | nariman zaeim |
75,211,676 | 11,999,452 | For loop breaks for no apparente reason | <p>If I run the following code, I get i = 42598.</p>
<pre class="lang-py prettyprint-override"><code>import numpy as np
all_sets = []
working_sets = []
numbers = np.arange(10)
operators = ['+', '-', '*', '/']
i = 0
expression = ['', '', '', '', '', '', '']
for n1 in numbers:
expression[0] = str(n1)
for o1 in ... | <python> | 2023-01-23 15:34:22 | 1 | 400 | Akut Luna |
75,211,551 | 10,413,428 | Pyside6 QDoubleValidator - decimal places are not working as expected | <p>I have written the following PySide6 program and would like to limit the decimal places of the inputs.</p>
<pre class="lang-py prettyprint-override"><code>import sys
from PySide6 import QtWidgets
from PySide6.QtCore import QSize, QLocale
from PySide6.QtGui import QDoubleValidator
from PySide6.QtWidgets import QMain... | <python><pyqt><pyside><pyside6><pyqt6> | 2023-01-23 15:22:25 | 1 | 405 | sebwr |
75,211,499 | 56 | How do I analyze what is hanging my Flask application | <p>I have a Python Flask web application, which uses a Postgresql database.</p>
<p>When I put a load on my application, it stops to respond. This only happens when I request pages which uses the database.</p>
<p>My setup:</p>
<ul>
<li>nginx frontend (although in my test environment, skipping this tier doesn't make a di... | <python><postgresql><flask><gunicorn><pgbouncer> | 2023-01-23 15:19:07 | 1 | 19,370 | doekman |
75,211,253 | 12,065,399 | Agregate Different String Columns on Pandas - List of Unique Values | <p>I am facing a problem to get the <strong>unique values</strong> of two different columns <strong>ordered A-Z</strong> and <strong>ignoring <code>nan</code> values</strong>.<br />
I was trying to create an ordered list of unique values, then remove the brackets, but I struggle.<br />
Can someone please help me on thi... | <python><pandas> | 2023-01-23 14:57:29 | 0 | 741 | Andre Nevares |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.