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,951,065 | 13,677,363 | How to import a class/function in google Colab from a .py file on google drive | <p>I am trying to import a class from a .py file which is stored in my google drive.</p>
<p>Initially, I have mounted google drive as follows:</p>
<pre><code>from google.colab import drive
drive.mount('/content/drive')
</code></pre>
<p>Then navigate into the destination folder using:</p>
<pre><code>%cd "/content/d... | <python><google-drive-api><google-colaboratory> | 2023-04-06 15:09:12 | 1 | 949 | Kanchon Gharami |
75,951,051 | 11,922,765 | Python Dataframe sort the dataframe using pd.cut range column | <p>I have a big dataframe and I created a temperature range column by using <code>pd.cut</code>. This is fine. Now I want to know the minimum range in that min-max range column. So, I can use this column to sort the dataframe</p>
<p>My code:</p>
<pre><code># Goal: sort below dataframe by the 'temp_range' columns
# The ... | <python><pandas><dataframe><numpy> | 2023-04-06 15:07:56 | 1 | 4,702 | Mainland |
75,951,004 | 705,676 | Partition numpy array in-place by condition | <p>I have a 1d array of u64 ints. I need to partition it based on given bit inplace.</p>
<p>In pure python it's easy two pointer problem (similar to partitioning in quicksort), but I wonder if it possible to do it efficiently using numpy.</p>
<p>Lets say I have:</p>
<pre class="lang-py prettyprint-override"><code>arr =... | <python><numpy><bit-manipulation><partitioning><in-place> | 2023-04-06 15:02:31 | 3 | 31,420 | MichaΕ Ε rajer |
75,950,914 | 10,409,952 | Cast doesn't work as expected when concatenating strings | <p>I am trying to achieve the simplest task - creating the FISCAL_YEAR column as shown below (column YEAR is given):</p>
<pre><code>+------+-------------+
| YEAR | FISCAL_YEAR |
+------+-------------+
| 2022 | 2022-2023 |
+------+-------------+
| 2022 | 2022-2023 |
+------+-------------+
| 2022 | 2022-2023 |
+---... | <python><pandas> | 2023-04-06 14:54:04 | 1 | 310 | SAR |
75,950,748 | 4,007,564 | Product and sum without addtional memory allocation | <p>Is there away to multiply two arrays and sum along an axis (or multiple axes) without allocating extra memory?</p>
<p>In this example:</p>
<pre><code>import numpy as np
A = np.random.random((10, 10, 10))
B = np.random.random((10, 10, 10))
C = np.sum(A[:, None, :, :, None] * B[None, :, None, :, :], axis=(-1,-2))
</... | <python><numpy><broadcasting> | 2023-04-06 14:33:14 | 1 | 2,002 | Tohiko |
75,950,697 | 5,510,713 | Trigger a Python script remotely and run it on the host machine | <p>I have a python script which uses Tkinter library to do screen grab of the image displayed on my secondary screen. The script works perfectly fine. When i try to run the script remotely using ssh (command below)</p>
<pre><code>ssh pi@testing.com "python /home/display_capture.py"
</code></pre>
<p>I get the ... | <python><tkinter><ssh> | 2023-04-06 14:28:22 | 1 | 776 | DhiwaTdG |
75,950,681 | 887,074 | Alias Python package with a different root name when the old one uses lazy imports | <p>I'm currently in the middle of renaming a project. In the meantime I need to not break existing users, so I'd like to provide an alias that lets users use it exactly the same as they previously would. This is turning out to be tricker than I initially thought.</p>
<p>Say I have a repo with a package:</p>
<pre><code>... | <python><setuptools><python-packaging> | 2023-04-06 14:26:57 | 1 | 5,318 | Erotemic |
75,950,671 | 17,491,224 | Exception: Reindexing only valid with uniquely valued Index objects - indexes are unique | <p>I am attempting to concat two dataframes. When I tried doing so, I was hit with the error that the <code>Reindexing only valid with uniquely valued Index objects</code> while trying to run this code:
<code>df_3=pd.concat([df_1,df_2])</code>.</p>
<p>I have added the following checks and updates to try and identify th... | <python><pandas> | 2023-04-06 14:26:11 | 1 | 518 | Christina Stebbins |
75,950,655 | 8,510,149 | Groupby, Window and rolling average in Spark | <p>I want to do a groupby and do a rolling average on huge dataset using pyspark. Not used to pyspark I struggle to see my mistake here. Why doesn't this work?</p>
<pre><code>data = pd.DataFrame({'group':['A']*5+['B']*5,
'order':[1,2,3,4,5, 1,2,3,4,5],
'value':[23, 54, 65, 64, 78, 98, 78, 76, 77, 57]})
spark_df = spa... | <python><pyspark> | 2023-04-06 14:24:44 | 1 | 1,255 | Henri |
75,950,370 | 3,595,907 | MQTT: Client publishing but subscribers not getting data with QoS 2 | <p>Raspberry Pi 3B+, W10 x64, Paho, Mosquitto MQTT</p>
<p>I have data being sent in 358.4 Kb payloads once a second via MQTT from a Raspberry Pi to a W10 x64 machine. I'm getting the following with different QoS values,</p>
<p>QoS 0: most of the data but some payloads missing, different sent & recieved counts.</p>
... | <python><c><mqtt><paho><qos> | 2023-04-06 13:57:28 | 1 | 3,687 | DrBwts |
75,950,366 | 1,485,926 | Common mocks defined with @patch to several test case functions in Python | <p>I have this testing code in Python using mocks (simplified):</p>
<pre><code>from unittest import TestCase
from mock import patch
class TestClass(TestCase):
@patch("mymodule.function1")
@patch("mymodule.function2")
@patch("mymodule.function3")
def test_case_1(self, func... | <python><python-unittest><python-mock> | 2023-04-06 13:57:02 | 1 | 12,442 | fgalan |
75,950,294 | 2,263,683 | How to handle exceptions for all the sub apps in FastAPI | <p>I have a FastAPI project containing multiple sub apps (The sample includes just one sub app).</p>
<pre><code>main_app = FastAPI()
class CustomException(Exception):
def __init__(self, message: str, status_code: int, name: str = "Exception"):
Exception.__init__(self)
self.name = name
... | <python><exception><fastapi> | 2023-04-06 13:49:01 | 1 | 15,775 | Ghasem |
75,950,275 | 5,295,802 | pytest does not work as expected combined with @cache | <p><em>Question updated after the reply from larsks</em></p>
<p>I'm having trouble writing a unit test in Pytest for a cached class. I'm trying to patch <code>slowfunc</code> in the code below with <code>mockfunc</code>. However, the patch only appears to succeed when I'm not using <code>@cache</code>.</p>
<pre><code>i... | <python><pytest> | 2023-04-06 13:46:10 | 1 | 881 | Sander |
75,950,196 | 15,178,267 | Django: How to filter django objects based on month? | <p>I am trying to get/count how many orders that were made in a month, i have written some logic to do this, but the issue is this: It does not count how many total orders were made in a month, it spreads different orders on the same month.</p>
<p>To be more explicit, look at the reponse below:</p>
<p><strong>This is h... | <python><django><django-models><django-rest-framework><django-views> | 2023-04-06 13:38:05 | 1 | 851 | Destiny Franks |
75,949,991 | 20,920,790 | How to ignore IndexError in while/for loops? | <p>I need to find index of value "1.2 Information" in table.</p>
<p>Where's only one value like this, and it could be at any column.
I need to get index of row with this value.
I got this code to find it, but I get IndexError in first column.
How to ignore error and continue loop?</p>
<p>I know that I can do ... | <python><pandas> | 2023-04-06 13:17:31 | 1 | 402 | John Doe |
75,949,975 | 10,437,727 | Struggling with batch processing in Azure Table Storage locally | <p>I have these batches that contain more than 100 entities that I'm trying to split to send in my local Azure storage account (Azurite):</p>
<pre class="lang-py prettyprint-override"><code>def save_results_in_database(self, operations, table_name):
table = self.table_service_client.get_table_client(table_name)... | <python><azure><azure-table-storage> | 2023-04-06 13:15:44 | 1 | 1,760 | Fares |
75,949,951 | 11,169,692 | How to convert dict into array of objects in python | <p>I have a dict list <code>dict(streams_list)</code> which gives values example- <code>{'Generic': ['_96_fkGECEeyqHrLeykGtFQ'], 'SF1B': ['_9lG7AJ8PEey0L88pC_veNw']}</code></p>
<p>How can I convert this to array of objects ? example -</p>
<p><code>[{'Generic': '_96_fkGECEeyqHrLeykGtFQ'}, {'SF1B': '_9lG7AJ8PEey0L88pC_ve... | <python> | 2023-04-06 13:14:03 | 5 | 503 | NoobCoder |
75,949,872 | 12,436,050 | Group by and concatenate the columns in pandas dataframe | <p>I have following dataframe.</p>
<pre><code> id1 id2 id3 lan term
0 100000000006 100000023268 10000 en Abnormal pain
1 100000000006 100000023268 10000 zh jhkghdgh
2 100000000006 100000023268 10000 cs ghjdgfhgd
3 100000000006 100000023268 10000 nl jgfhgjhgfh
4 100000000006 100000023268... | <python><pandas><concatenation> | 2023-04-06 13:05:38 | 2 | 1,495 | rshar |
75,949,728 | 21,521,861 | PyAutoGUI - error caused by mouse on second monitor? | <p>I have a program that uses PyAutoGUI to auto-sign me into work by opening programs, clicking things in timed order, etc. I set up a logging error text file and this morning it said the following: <code>ERROR:root:2023-04-06 08:00:03.184901 - PyAutoGUI fail-safe triggered from mouse moving to a corner of the screen. ... | <python><python-3.x><pyautogui> | 2023-04-06 12:49:39 | 0 | 473 | Caleb Carson |
75,948,875 | 180,231 | How can I use the ZBar libraries in a python Azure function? | <p>I am attempting to write a simple Azure Function app in Python.</p>
<p>My function app work fine in the local simulator but when I attempt to publish it to Azure, it fails with this error:</p>
<pre><code>Exception while executing function: Functions.ProcessPDF Result: Failure
Exception: ImportError: Unable to find z... | <python><azure><azure-functions> | 2023-04-06 11:14:27 | 1 | 3,442 | Stephane |
75,948,844 | 11,321,089 | How to convert an 8bpp bitmap to 1bpp bitmap in Python | <p>I have some code which is fine for creating greyscale (8bpp) images but I need to create 1bpp (binary) also for a printer. I have seen 2 posts here but cannot understand how they fix the issue.
<a href="https://stackoverflow.com/questions/21067028/cant-format-bmp-image-data-to-1-bit-per-pixel-in-pil">Can't forma... | <python><bitmap><python-imaging-library><bit><bit-depth> | 2023-04-06 11:10:34 | 1 | 909 | Windy71 |
75,948,838 | 7,421,447 | Could you create a website font-end using Python Tkinter? | <p>I have a question. Would it be possible to create web apps using Python Tkinter for front end? The reason, that to create a website you need to know a lot of things. Such as HTML/CSS/JS. Would it be possible create browser based apps using python only?</p>
| <python><python-3.x><tkinter><browser> | 2023-04-06 11:10:12 | 2 | 713 | Alain Michael Janith Schroter |
75,948,087 | 3,116,231 | Pass class method name as a parameter | <p>I want to change the last line of following code</p>
<pre><code>import io
import pandas as pd
writer = io.BytesIO()
data = [{"createdAt": 2021, "price": 10}, {"createdAt": 2022, "price": 20} ]
pd.DataFrame(data).to_csv(self.writer, header="true", index=False)
</code... | <python><pandas> | 2023-04-06 09:46:23 | 1 | 1,704 | Zin Yosrim |
75,948,040 | 1,511,274 | Identify the timestamps of the merged audio signal |
<p>I have an audio file which was created by substituting multiple speech segments into an original (speech) utterance. The two speakers sound quite similar to each other.
I want to find the timestamps where such substitutions happened, so I guess that one thing I can do is looking for the abrupt changes in the audio ... | <python><machine-learning><deep-learning><signal-processing><speech> | 2023-04-06 09:40:29 | 0 | 1,845 | Long |
75,947,977 | 567,059 | Compare objects in a list to identify those with certain identical key/value pairs and those without | <p>Using Python, how can I find objects in a list that share certain key/value pairs, then create two separate lists - one for objects that share those certain key/value pairs, and one for objects that don't?</p>
<p>For example, take the following simple list -</p>
<pre class="lang-json prettyprint-override"><code>[
... | <python><list><object><comparison> | 2023-04-06 09:34:14 | 2 | 12,277 | David Gard |
75,947,847 | 12,870,750 | Two sync QGrapchisView layers miss aligned scene rect after zoom event, but aligned after pan events | <p>I have two classes of edited <code>QGrapchicsView</code>, one (<code>GraphicsView</code>) shows lines and it enables zoom and pan. The second class (<code>PolygonGrapchisView</code>) only updates the scene rect to match that of the first class <code>GraphicsView</code> from a signal receive from the first class. The... | <python><pyqt5><qt5><qgraphicsview> | 2023-04-06 09:20:46 | 1 | 640 | MBV |
75,947,797 | 2,560,292 | Modify response to get a list of IDs and not a list of dict when referencing ForeignKeys | <p>I have a simple app that creates and stores tickets. Those tickets can cross-references themselves, so I use a specific table to keep this kind of information. A greatly simplified table structure is like this:</p>
<pre class="lang-py prettyprint-override"><code>class Ticket(Base):
"""Ticket."... | <python><fastapi><pydantic> | 2023-04-06 09:14:41 | 1 | 1,196 | Shan-x |
75,947,699 | 15,524,481 | Django: apply constraint on 'choices'-based property on model | <p>I want to apply a constraint in the following way:
<br>
Imagine that you have a Charfield property with some choices.</p>
<pre class="lang-py prettyprint-override"><code>class ExampleChoices(models.TextChoices):
A = "A", "a"
B = "B", "b"
C = "C", "c&... | <python><django> | 2023-04-06 09:03:55 | 2 | 458 | Xander |
75,947,688 | 5,909,136 | Install python package on a specific folder instead of user level | <p>So I am currently working on a DevOps task for a Python repository.
I am tasked with making the repository work properly with our Docker environment.</p>
<p>My current issue is that when running <code>pip3 install</code>, it installs everything in various folders that have nothing to do with the current repository p... | <python><docker><docker-compose><pip> | 2023-04-06 09:02:53 | 2 | 411 | SmashingQuasar |
75,947,479 | 56,711 | Using Pytest, can I find out which tests execute a single line of code? | <p>I am using pytest to run my Python tests. Is there a way I can run I'd like to know which tests cover a specific line of code. I want to be able to run just the tests that execute a specific line. I know the <code>coverage</code> tool collects related data, but I feel this use case is not covered.</p>
| <python><pytest><code-coverage> | 2023-04-06 08:42:45 | 1 | 6,081 | Simon Walker |
75,947,478 | 12,234,535 | How to compute one mean dataset of 4 datasets [Python, xarray] | <p>I'm having 4 [GFS] temperature datasets: they are all the same in spatial resolution, the only difference is timestamp - they are for 00 UTC, 06 UTC, 12 UTC, 18 UTC within one day.</p>
<p>I need to <strong>compute the mean daily temperature dataset</strong>. Is there a way to do <em>instrumentally</em>, but not, lik... | <python><arrays><dataset><mean><python-xarray> | 2023-04-06 08:42:37 | 1 | 379 | Outlaw |
75,946,823 | 12,877,988 | ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131) | <p>I have ubuntu server that sends request to a website. When I send request it gives</p>
<blockquote>
<p>ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed: unable to get local issuer certificate
(_ssl.c:1131)</p>
</blockquote>
<p>error.</p>
<p>I added that website's CA certificat... | <python><python-3.x><cacerts> | 2023-04-06 07:21:31 | 0 | 1,497 | Elvin Jafarov |
75,946,772 | 9,108,781 | 'pseudocorpus' no longer available from 'gensim.models.phrases'? | <p>Several months ago, I used "pseudocorpus" to create a fake corpus as part of phrase training using Gensim with the following code:</p>
<pre><code>from gensim.models.phrases import pseudocorpus
corpus = pseudocorpus(bigram_model.vocab, bigram_model.delimiter, bigram_model.common_terms)
bigrams = []
for bi... | <python><python-3.x><gensim> | 2023-04-06 07:12:56 | 1 | 943 | Victor Wang |
75,946,683 | 5,186,167 | Is there a Python module to handle csv files with sections? | <p>I'm seeing more and more csv files containing multiple sections, each containing their own table. For instance this file from <a href="https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/multi#examples" rel="nofollow noreferrer">10XGenomics</a>:</p>
<pre><code>[gene-expression... | <python><pandas><csv> | 2023-04-06 07:01:18 | 3 | 440 | Aratz |
75,946,672 | 3,337,089 | PyTorch grid_sample for 2D tensors | <p>I have a 3D tensor <code>data</code> of shape <code>(N, W, D)</code> and another 1D tensor <code>index</code> of shape <code>(B,)</code>. I need to sample <code>data</code> using <code>index</code> such that my output should be of shape <code>(B,N,D)</code>. That is, for every element of <code>index</code>, I need t... | <python><pytorch><linear-interpolation> | 2023-04-06 06:59:43 | 0 | 7,307 | Nagabhushan S N |
75,946,655 | 1,384,464 | Detecting all rectangles and contours from a jpg of a scanned structured paper form using OpenCV | <p>As a newbie to OCR, I am attempting to detect all the rectangles/boxes in a scanned document illustrated here <a href="https://i.sstatic.net/xp4gz.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/xp4gz.jpg" alt="JPG of structured form" /></a></p>
<p>However the output of the code snippet provided below... | <python><opencv><image-processing><computer-vision><ocr> | 2023-04-06 06:57:45 | 2 | 1,033 | Timothy Tuti |
75,946,563 | 10,299,633 | not able to show both insample and out-of-sample plots for pycaret time series in streamlit columns | <p>I am making a Streamlit application to do experimentation on data using pycaret time series. I created a function to return the experiment and return the information I need, but for some reason I am getting only one of the 2 plots I am returning (out-of-sample). <strong>The <code>insample</code> doesn't show!</stron... | <python><streamlit><pycaret> | 2023-04-06 06:40:38 | 1 | 327 | Sam.H |
75,946,355 | 10,829,044 | Pandas create a new column based on exact match of text values | <p>I have two dataframes that look like below</p>
<pre><code>proj_df = pd.DataFrame({'reg_id':[1,2,3,4],
'part_no':['P1','P2','P3','P4'],
'partner':['A','B','C','D'],
'cust_name_1': ['ABC PVT LTD','Tesla','Apple','Google'],
... | <python><pandas><dataframe><group-by><merge> | 2023-04-06 06:07:23 | 1 | 7,793 | The Great |
75,946,272 | 5,380,901 | struct.pack gives different results when calling it again after reassigning one of its inputs | <p>I am writing a Python script to send ICMP packets by following an example from a <a href="https://euniclus.com/article/python-route-scan/" rel="nofollow noreferrer">Japanese website</a>.
There is part of the code where <code>struct.pack</code> is used to pack series of variables into a bytes array.
It looks somehow ... | <python><struct><bytebuffer><icmp> | 2023-04-06 05:52:19 | 1 | 1,583 | Hafiz Hilman Mohammad Sofian |
75,946,267 | 18,157,326 | does PyCharm read the zsh environment by default | <p>Today when I start the python project in PyCharm, I found the environment fetched failed:</p>
<pre><code>db_conn = os.environ.get('CLUSTER_POSTGRESQL_CONN')
</code></pre>
<p>this statement get None from environment. Yesterday it works fine, I check the environment in terminal:</p>
<pre><code>β ai-web git:(main) β e... | <python><postgresql><pycharm><zsh> | 2023-04-06 05:51:31 | 1 | 1,173 | spark |
75,946,255 | 19,079,397 | How to write geopandas data into osm.pbf file using python? | <p>I have sample nodes, edges data like below. I am using <code>ElementTree</code> to write the data into <code>.osm</code> file and then trying to convert into <code>.osm.pbf</code> using osmosis but when trying to convert from <code>.osm</code> to <code>.osm.pbf</code> osmosis throws error saying <code>"osm form... | <python><openstreetmap><elementtree><osmosis><osm.pbf> | 2023-04-06 05:50:00 | 1 | 615 | data en |
75,946,162 | 7,838,040 | How to convert a 2d-numpy array to diagonal matrix with padded 0? | <p>I'm not sure how to go about this,
example:</p>
<pre><code>array([[1, 1],
[2, 2],
[3, 3]])
</code></pre>
<p>convert it to this:</p>
<pre><code>array([[1, 1, 0, 0],
[0, 2, 2, 0],
[0, 0, 3, 3]])
</code></pre>
<p><code>np.diag</code> only works on 1d array to diagonal matrix.
I can get it wi... | <python><numpy> | 2023-04-06 05:34:55 | 2 | 408 | Chandan Gm |
75,946,196 | 1,581,090 | How to receive multicast UDP data on windows using python? | <p>I have a device connected to a windows 10 machine and this device is sending out various multicast UDP packages. I can see them on the windows machine using <code>wireshark</code>:</p>
<p><a href="https://i.sstatic.net/52qMK.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/52qMK.png" alt="enter image d... | <python><sockets><network-programming><wireshark> | 2023-04-06 05:29:50 | 1 | 45,023 | Alex |
75,946,126 | 2,791,346 | Count consecutive boolean values in Python/pandas array for whole subset | <p>I am looking for a way to aggregate pandas data frame by consecutive same values and perform actions like count or max on this aggregation.</p>
<p>for example, if I would have one column in df:</p>
<pre><code> my_column
0 0
1 0
2 1
3 1
4 1
5 0
6 0
7 ... | <python><pandas><group-by> | 2023-04-06 05:28:37 | 2 | 8,760 | Marko Zadravec |
75,946,037 | 2,789,334 | custom errorbars for catplot with grouped bars in facets | <p><code>pandas 1.5.3</code> <code>seaborn 0.12.2</code></p>
<p>My code and part of the data is shown below. I am trying to plot the errorbars precomputed in the dataframe <code>(val_lo,val_hi)</code>. It seems that <code>sns.catplot</code> with <code>kind=bar</code> has support using <code>errorbar</code> as mention... | <python><matplotlib><seaborn><errorbar><grouped-bar-chart> | 2023-04-06 05:14:21 | 1 | 1,068 | ironv |
75,946,021 | 8,884,239 | Dataframe column name with $$ failing in filter condition with parse error | <p>I have dataframe with column names as "lastname$$" and "firstname$$"</p>
<pre><code>+-----------+----------+----------+------------------+-----+------+
|firstname$$|middlename|lastname$$|languages |state|gender|
+-----------+----------+----------+------------------+-----+------+
|James ... | <python><apache-spark><pyspark><apache-spark-sql> | 2023-04-06 05:11:42 | 2 | 301 | Bab |
75,945,928 | 4,420,797 | Pytorch: RuntimeError: CUDA error: device-side assert triggered on CUDA 11.7 | <p>I am training two models in the same environment and one of them works fine with the same configuration but another one is giving errors without any further reason. I have also added <code>CUDA_LAUNCH_BLOCKING=1</code> but still, the problem remains the same.</p>
<p><strong>Script Command</strong></p>
<pre><code>CUD... | <python><pytorch><ocr><tesseract><doctr> | 2023-04-06 04:52:08 | 1 | 2,984 | Khawar Islam |
75,945,914 | 13,512,544 | Python saying that module doesn't exist | <p>This question has been asked a lot of times and I can't find an issue that's similar to mine. I was trying to import <code>consolemenu</code> which has a member called <code>SelectionMenu</code>. But when I try to use it</p>
<pre class="lang-py prettyprint-override"><code>selected_integer = consolemenu.SelectionMenu... | <python><pip> | 2023-04-06 04:50:03 | 2 | 466 | Pro Poop |
75,945,832 | 9,042,093 | What is the output type of Subprocess.communicate? | <p>I was going through official documentation of <a href="https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate" rel="noreferrer">Popen.communicate()</a>.</p>
<pre><code>p = subprocess.Popen('echo hello',stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=True,universal_newlines=True)
r,e = p.c... | <python><subprocess><popen> | 2023-04-06 04:32:03 | 2 | 349 | bad_coder9042093 |
75,945,804 | 5,942,100 | Tricky Long Pivot by Reverse Aggregation transformation (Pandas) | <p>I have a dataset where I would like to de aggregate the values into their own unique rows as well as perform a pivot, grouping by category.</p>
<p><strong>Data</strong> updated</p>
<pre><code>Period Date Area BB stat AA stat CC stat DD stat BB test AA test CC test DD test BB re AA re CC re BB test... | <python><pandas><numpy> | 2023-04-06 04:24:01 | 4 | 4,428 | Lynn |
75,945,735 | 188,331 | XLNet or BERT Chinese for HuggingFace AutoModelForSeq2SeqLM Training | <p>I want to use the pre-trained XLNet (<code>xlnet-base-cased</code>, which the model type is <em>Text Generation</em>) or BERT Chinese (<code>bert-base-chinese</code>, which the model type is <em>Fill Mask</em>) for Sequence to Sequence Language Model (<code>Seq2SeqLM</code>) training.</p>
<p>I can use <code>facebook... | <python><pytorch><huggingface-transformers><huggingface> | 2023-04-06 04:09:22 | 1 | 54,395 | Raptor |
75,945,695 | 14,864,907 | How to create a class instance directly with a call to a class method? | <p>I'm facing a problem that I can't solve. Is it possible to make <em>pipe</em> be an instance of the class <em>MyClass</em> concerning the call to the class method <em>do_something</em>? And make <em>print(isinstance(pipe, MyClass))</em> return True. This means that on the call <em>pipe</em> goes through the class m... | <python> | 2023-04-06 03:59:37 | 3 | 583 | Tim |
75,945,689 | 6,055,629 | Python - Efficient calculation where end value of one row is the start value of another row | <p>I would like to make simple calculations on a rolling basis, but have heavy performance issues when I try to solve this with a nested for-loop. I need to perform this kind of operations on very large data, but have to use standard Python (incl. Pandas). The values are floats and can be negative, zero or positive.</p... | <python><pandas><performance><for-loop><apply> | 2023-04-06 03:57:22 | 4 | 648 | constiii |
75,945,624 | 7,700,802 | Calculating the percentage change by year for a particular column | <p>Suppose I have this dataframe</p>
<pre><code>data = {'Year': ['2010', '2011', '2012'],
'Total_Population': [1000, 1200, 1600]}
df_sample = pd.DataFrame(data=data)
df_sample.head()
</code></pre>
<p>I want to calculate the percentage change in <code>Year</code> for <code>Total_Population</code>. I tried follow... | <python><pandas> | 2023-04-06 03:41:28 | 1 | 480 | Wolfy |
75,945,584 | 179,234 | How to extract Error-Code from REPORT.IPM.Note.NDR outlook object using Python | <p>I am trying to extract certain details from an outlook mailbox. I want to extract bounced emails and get the error code of why these emails were bounced.</p>
<p>I know with using regular expression I can extract that from the body of the message. but I am wondering if there is a MAPI ID that I can use or an existing... | <python><outlook><win32com><office-automation><mapi> | 2023-04-06 03:26:49 | 2 | 1,417 | Sarah |
75,945,523 | 18,171,350 | ModuleNotFoundError: No module named 'PIL' Windows ERROR | <p>Getting the below error when I run my python code. any suggestions?</p>
<pre><code>Traceback (most recent call last):
File "C:\Users\User\OneDrive\Desktop\crop recommend Final\app.py", line 11, in <module>
from torchvision import transforms
File "C:\Users\User\OneDrive\Desktop\crop recom... | <python> | 2023-04-06 03:12:03 | 0 | 487 | Nidew |
75,945,484 | 2,655,102 | Call subclass static methods from superclass in Python | <p>What I want:
To define some rich static methods based on simple methods in the superclass and to implement the simple methods in every subclass. The methods are all static, so I don't want to instantiate first to use them.</p>
<p>Example Code:</p>
<pre class="lang-py prettyprint-override"><code>import abc
from abc i... | <python><python-3.x> | 2023-04-06 03:02:34 | 1 | 2,141 | Renkai |
75,945,390 | 885,287 | tqdm progress bar with estimated duration | <p>I want to use TQDM to show a progress bar for a process. I know roughly how long this process will take (based on an empirical model I have fit).</p>
<p>The <code>tqdm()</code> <code>length</code> parameter makes it easy to set a progress bar's length based on a known iterable size, but I can't see a way to do the s... | <python><progress-bar><tqdm> | 2023-04-06 02:36:17 | 1 | 6,263 | aaronsnoswell |
75,945,273 | 8,878,774 | How to download all files from a link by selecting date | <p>I have a url as mentioned below. I want to select date field and fill in some date and then click on "select all reports" box. Then download all the files from "multiple file download"</p>
<p>url = 'https://www.nseindia.com/all-reports-derivatives#cr_deriv_equity_archives'</p>
<p>Is it possible u... | <python><python-3.x><selenium-webdriver><python-requests> | 2023-04-06 02:02:08 | 1 | 329 | Pravat |
75,945,197 | 2,272,824 | How best to apply successive filters to a Polars Dataframe? | <p>I have a Polars Dataframe with a bunch of columns (I'm working in Python)
I need to group the dataframe by three different row criteria - every row will match exactly one of the three criteria.
Minimal example data would look something like this</p>
<pre class="lang-py prettyprint-override"><code>df = pl.from_repr(&... | <python><python-polars> | 2023-04-06 01:41:14 | 1 | 391 | scotsman60 |
75,945,078 | 329,443 | String interpolation failing inside os.system call | <p>Editing to skip to the answer: The problem was that the string I was interpolating had a non-ascii character in it that was invisible to the naked eye.</p>
<p>I'm trying to run this ImageMagick Command:</p>
<pre><code>convert -verbose -size 732x142 xc:transparent -fill black -stroke black -strokewidth 2 -draw "... | <python><subprocess><imagemagick><string-interpolation><os.system> | 2023-04-06 01:11:37 | 2 | 1,618 | baudot |
75,944,864 | 1,942,603 | Google Drive API Not showing all revisions | <p>I have a Google Sheet that I use to track a project. It has a table on the first page with a bunch of project status stuff on it and I want to write a program to get that table for every revision and show how things have changed. The way to do that should be <a href="https://developers.google.com/drive/api/v3/refere... | <python><google-sheets><google-drive-api> | 2023-04-06 00:12:09 | 1 | 797 | Joshua Snider |
75,944,772 | 4,132,818 | Python can't initialize the sys module when compiling from source (3.11.1) on rhel machine | <p>My process was:</p>
<pre><code>wget https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tgz
tar -xvf Python-3.11.1.tgz
cd Python-3.11.1
./configure --enable-shared --prefix=$INSTALL_DIR --enable-optimizations
make
</code></pre>
<p>I get the following error</p>
<pre><code>./Programs/_freeze_module importlib._boots... | <python><python-3.x> | 2023-04-05 23:45:13 | 0 | 363 | Bryan Tan |
75,944,607 | 1,096,949 | python is buffering it's stdout in aws eks | <p>I am running a python script inside a pod container in aws eks (managed kubernetes service). My script is something like following:</p>
<pre><code>from model import startRunner
import time
while 1:
startRunner()
time.sleep(3600)
print("waited for 1 hour", flush=True)
</code></pre>
<p>I only get... | <python><kubernetes> | 2023-04-05 23:05:09 | 1 | 655 | MD. Jahidul Islam |
75,944,603 | 2,623,317 | How to repeat a specific value 'n' times based on other column's list length? | <p>I would like to repeat a None value 'n' times, but 'n' should be defined by other column's list length. I give some simple code example to better illustrate this:</p>
<pre class="lang-py prettyprint-override"><code>import polars as pl
# Create dummy LazyFrame
lf = pl.LazyFrame(
{
"col1": [[1, ... | <python><python-polars> | 2023-04-05 23:04:13 | 1 | 477 | Guz |
75,944,486 | 5,847,282 | Draw a graph with node size and edge width proportional to number of repetitions | <p>I'm working on a paper that is similar to <a href="https://www.pnas.org/doi/10.1073/pnas.0305937101" rel="nofollow noreferrer">this</a>. I have to draw a directed graph that looks similar to <a href="https://www.pnas.org/doi/10.1073/pnas.0305937101#fig2" rel="nofollow noreferrer">the one</a> presented in the paper.<... | <python><graph><networkx> | 2023-04-05 22:37:29 | 1 | 521 | Asif Iqbal |
75,944,266 | 15,724,084 | python tkinter GUI sys exit does not work[multithreading added] | <p>my code is mainly scraping pages by clicking <code>next</code> button. I wanted to add a button, when scraping continuously runs having possibility to stop it and exit running the main thread. - just stop program execution. I learnt from this <a href="https://stackoverflow.com/questions/27050492/how-do-you-create-a-... | <python><multithreading><tkinter> | 2023-04-05 21:58:34 | 1 | 741 | xlmaster |
75,944,115 | 1,100,270 | add custom tiles to geopandas dataframe | <p>I know I can add custom background maps to a geopandas data frame like below</p>
<pre><code>ax = df_wm.plot(figsize=(10, 10), alpha=0.5, edgecolor='k')
cx.add_basemap(ax, source=cx.providers.Stamen.TonerLite)
ax.set_axis_off()
</code></pre>
<p>How could I use other map tiles. For example, USGS topo tiles like those ... | <python><geopandas><cartopy> | 2023-04-05 21:29:31 | 1 | 1,623 | jotamon |
75,944,113 | 3,380,902 | ProgrammingError: (redshift_connector.ProgrammingError) when running queries using Dask | <p>I am attempting to query aws redshift using dask' <a href="https://docs.dask.org/en/stable/generated/dask.dataframe.read_sql_query.html" rel="nofollow noreferrer">read_sql_query</a> method. When I run the below code it throws an</p>
<pre><code>import dask.dataframe as dd
from config import *
host=os.environ['host']... | <python><sqlalchemy><amazon-redshift><dask><dask-dataframe> | 2023-04-05 21:29:24 | 0 | 2,022 | kms |
75,944,022 | 3,681,427 | How do I ensure that two modules use the same string cache? | <p>I'd like to have polars dataframes in multiple modules use the same string cache, but I'm finding it difficult to manage. Imagine I have a package with modules <code>A</code> and <code>B</code>:</p>
<pre class="lang-py prettyprint-override"><code># A.py
import polars as pl
df_A = pl.DataFrame({
'A': pl.Series([... | <python><dataframe><python-polars><categorical-data> | 2023-04-05 21:14:01 | 1 | 382 | NedDasty |
75,943,981 | 14,721,356 | GridSearchCV y should be a 1d array, got an array of shape (54000, 10) instead | <p>I've been trying to do grid search on <code>mnist</code> dataset with an <code>MLP</code>. Since <code>mnist</code> dataset is labeled from 0 to 9 and I have 10 neurons in output, I'm using <code>one-hot encoding</code>. But as soon as I try to run grid search, I get the following error: <code>y should be a 1d array... | <python><tensorflow><machine-learning><keras><scikit-learn> | 2023-04-05 21:08:14 | 1 | 868 | Ardalan |
75,943,938 | 1,549,736 | Why is conda not installing a dist-info for my main installation target, but is for all its dependencies? | <p>I'm building/installing a package: <code>foo</code>, using <code>conda</code>, which has several dependencies: <code>bar</code> and <code>blatz</code>, which I'm also building/installing with <code>conda</code>.
They all build without error.
When I <code>conda install foo</code>, <code>foo</code> and all its depende... | <python><conda><metadata><conda-build> | 2023-04-05 21:02:37 | 1 | 2,018 | David Banas |
75,943,919 | 19,299,757 | Runtime.ImportModuleError: Unable to import module 'app': No module named 'app' | <p>I've a lambda function as a Docker image in my ECR repository.
The lambda function just prints "Welcome" and nothing more.
I've set it up to be invoked whenever there is an S3 bucket activity.
When I upload a file to the S3 bucket, the lambda seem to be invoked but errors out as:</p>
<pre><code>[ERROR] Run... | <python><docker><aws-lambda> | 2023-04-05 21:00:17 | 0 | 433 | Ram |
75,943,852 | 13,803,549 | How to have choices for multiple slash command arguments Discord.py | <p>I have a discord.py slash command that takes in two arguments. I wanted to provide choices for these arguments but I can't figure out how.</p>
<p>This is what I have so far but its not working.</p>
<pre class="lang-py prettyprint-override"><code> import discord
from discord import app_commands
from discor... | <python><discord.py> | 2023-04-05 20:50:15 | 1 | 526 | Ryan Thomas |
75,943,803 | 4,332,644 | Using a Fargate image as lambda | <p>I am using AWS Fargate to run a python based Docker image (stored in AWS ECR), and it is working as expected. The invocation is done by a lambda function, which populates the environment and then invokes the Fargate task.</p>
<p>Now I would like to use the same Docker image, but invoke it via SQS trigger. I defined ... | <python><amazon-web-services><aws-lambda><amazon-ecr> | 2023-04-05 20:42:48 | 1 | 3,201 | LNI |
75,943,689 | 528,369 | Values returned from Python function differ in caller and callee | <p>Running the Python program</p>
<pre><code>import sys
from bisect import bisect
import numpy as np
def insert_sorted(vec, x):
""" insert x in sorted numpy array vec. Return the insertion position
and the new list """
ipos = bisect(vec, x)
print("\nexiting insert_sor... | <python> | 2023-04-05 20:23:52 | 1 | 2,605 | Fortranner |
75,943,681 | 11,628,437 | How do I copy all instances of a keyword from a dataframe to another? | <p>I have the following data frame A -</p>
<pre><code># Import pandas library
import pandas as pd
data = ['mechanical@engineer', 'field engineer','lab_scientist', 'doctor', 'computer-engineer', 'scientist/engineer']# Create the pandas DataFrame
df = pd.DataFrame(data, columns=['Job'])
print("df = ", df.head... | <python><pandas> | 2023-04-05 20:22:37 | 2 | 1,851 | desert_ranger |
75,943,587 | 4,972,716 | Divide a multi column dataframe by a one column dataframe | <p>I have 2 dataframes (<code>x_axis</code> and <code>y_axis</code>). I wish to divide <code>y_axis</code> by <code>x_axis</code>, however I get a <code>NaN</code> error. As you can see the index of the two dataframes is the same.</p>
<pre><code>import pandas as pd
x_axis = pd.DataFrame({'I': [1, -3, 4],},
... | <python> | 2023-04-05 20:08:05 | 2 | 5,177 | Stacey |
75,943,513 | 1,317,018 | Cupy is slower than numpy at emulating dot product with one hot vector | <p>I was trying to implement neural network from scratch. However it is not possible to run numpy on GPU. So I tried using cupy and benchmarking performance improvement over numpy.</p>
<p>I have following code in numpy:</p>
<pre><code>import numpy as np
emb = 300 # embedding size
m = 2048 # minibatch size
V = 50000... | <python><python-3.x><numpy><cupy> | 2023-04-05 19:57:13 | 1 | 25,281 | Mahesha999 |
75,943,409 | 6,095,646 | Heroku deployment not picking up latest commits when building Django app (e.g. recent changes to settings.py ) | <p>I'm using git trying to deploy to a staging pipeline on Heroku.</p>
<p>My build is failing. Based on the traceback (two of them, below), I have a general sense as to why. It involves my dynamic SECRET_KEY configuration variable in <strong>settings.py</strong>. The traceback refers to a python-decouple module install... | <python><django><git><heroku> | 2023-04-05 19:40:57 | 1 | 443 | enoren5 |
75,943,319 | 220,255 | pysftp listdir_attr empty on a folder with files | <p>I have a small utility that scans ftp server and does some analytics around available data. This code works fine for many servers but does not work for one particular server. I am sure the data is available on the server, lots of data, but it only lists the top folders and when goes inside of them just gets nothing.... | <python><pysftp> | 2023-04-05 19:26:45 | 1 | 4,350 | abolotnov |
75,943,276 | 19,797,660 | Pipe connection between Python and C# in two directions - sending data | <p>I have a huge problem with connection between my <code>python</code> script and <code>C#</code> WFA application.
For some reason the code worked two days ago last I checked and today when I started the script the connection is not establishing which is very odd.</p>
<p>So below is my C# code connection:</p>
<pre><co... | <python><c#><python-3.x><pipe> | 2023-04-05 19:21:32 | 0 | 329 | Jakub Szurlej |
75,943,159 | 12,297,666 | How to manually set the validation set size in 10-Fold CV | <p>I have a dataset with <code>5829</code> rows and i need to do cross validation to assess my model. Using <code>Sklearn</code> is there anyway i can fix the size of the validation set (let's say to <code>20%</code> of my data) and keep fixed the number of folds to <code>10</code>?</p>
<p>If i use <code>5</code> folds... | <python><scikit-learn><cross-validation> | 2023-04-05 19:04:00 | 2 | 679 | Murilo |
75,943,057 | 6,131,786 | I can't find how to reproducibly run a Python gymnasium taxi-v3 environment | <p>I'm using Gymnasium library (<a href="https://github.com/Farama-Foundation/Gymnasium" rel="nofollow noreferrer">https://github.com/Farama-Foundation/Gymnasium</a>) for some research in reinforcement learning algorithms.</p>
<p>Gymnasium is the actual development of the old Gym library (<a href="https://github.com/op... | <python><reinforcement-learning><openai-gym> | 2023-04-05 18:50:15 | 1 | 319 | Anselmo Blanco Dominguez |
75,943,045 | 11,192,275 | Passing parameters to a function when aggregating using pandas and numpy in python | <p>I have the following code and data frame:</p>
<pre><code>import pandas as pd
import numpy as np
df = pd.DataFrame({
'A': [1, 2, 3, 4, 5],
'B': [6, 7, 8, 9, 10]})
</code></pre>
<p>I want to calculate the 0.25 percentile for the column 'A' and the 0.75 percentile for the column 'B' using np.quantile. I tr... | <python><pandas><numpy> | 2023-04-05 18:49:06 | 2 | 456 | luifrancgom |
75,943,023 | 14,465,381 | TypeError: 'float' object is not callable in for loop declaration | <p>I'm attempting to display an <code>.obj</code> file in the console, and ran into a strange issue where a TypeError popped up for a <code>for</code> loop declaration that I had previously used, word for word. I can't seem to find the cause of this error.</p>
<pre><code>vertices = [[2.4,5.6,2.1],[54.3,67.1,90.8],[21.9... | <python><list><for-loop><floating-point><typeerror> | 2023-04-05 18:44:53 | 0 | 336 | Baby_Boy |
75,942,928 | 20,947,319 | How to scrape all data from Linkedin using Python in incognito mode | <p>I am working on a python project whereby I am scraping data from linkedin using selenium and beautifulsoup. My program works fine but the problem is that it gets only 25 results instead of all the results. I have gone through previous solutions to this and they are saying that I can use the page number. The problem ... | <python><selenium-webdriver><web-scraping><beautifulsoup> | 2023-04-05 18:31:21 | 1 | 446 | victor |
75,942,865 | 1,006,183 | Async solution for factory boy style fixtures in FastAPI? | <p>I really like the <a href="https://factoryboy.readthedocs.io/en/stable/" rel="noreferrer">factory boy</a> style of generated factories that can handle things like sequences, complex relationships etc.</p>
<p>For a FastAPI app with fully async database access using factory boy seems likely problematic. There is <a hr... | <python><fastapi><fixtures><factory-boy> | 2023-04-05 18:24:45 | 1 | 11,485 | Matt Sanders |
75,942,747 | 10,303,685 | No mic get detected as sound.query_devices() returns empty list? | <p>Im trying to get the feed of the mic using "sounddevice" library in Python.</p>
<pre><code>import sounddevice as sd
print(sd.query_devices())
</code></pre>
<p>But it returns empty list.</p>
<p>I tried <code>arecord -f cd -d 6 test.wav</code> to record a voice note and it works fine. Also i checked the mic... | <python><audio><speech-recognition><audio-processing><python-sounddevice> | 2023-04-05 18:09:55 | 2 | 388 | imtiaz ul Hassan |
75,942,685 | 1,761,521 | AWS CDK: Conditional resources? | <p>I am trying to create a cron event that runs daily on the <code>PROD</code> environment and just once a week on the <code>DEV</code> environment. My code looks like this,</p>
<pre><code>environment = CfnParameter(
self,
"environment",
type="String",
description="Environment ... | <python><amazon-web-services><aws-cdk> | 2023-04-05 18:01:41 | 1 | 3,145 | spitfiredd |
75,942,588 | 2,444,751 | headless cli scripting (in my case, bash, Ubuntu 20) | <p>I'm curious if there is a way to write scripts in php, python, or nodejs that interact with a virtual command line interface as if you were typing on a keyboard, and which reads all characters sent to the screen, even if the command you called starts its own separate process (thus bypassing the stdin/stdout streams)... | <python><php><node.js><command-line-interface> | 2023-04-05 17:48:15 | 0 | 593 | Dustin Soodak |
75,942,526 | 1,999,585 | How can I fix the "A value is trying to be set on a copy of a slice from a DataFrame" warning in pandas? | <p>I have the following Python function:</p>
<pre><code>def compute_average_fg_rating(df, mask=''):
df = df[['HorseId', 'FGrating']]
if len(mask) == 0:
df.loc['cumsum'] = df.groupby('HorseId', group_keys=False)['FGrating'].apply(
lambda x: x.shift(fill_value=0).cumsum())
return df.lo... | <python><pandas><dataframe><warnings> | 2023-04-05 17:41:34 | 2 | 2,424 | Bogdan Doicin |
75,942,420 | 7,245,066 | run post_install on pyproject.toml | <p>In my classic <code>setup.py</code> script, I have a post_install method that registers my python widget with a jupyter notebook. How do I do this using the pyproject.toml file? I can't seem to find any documentation on this.</p>
<p>doc: <a href="https://setuptools.pypa.io/en/latest/userguide/extension.html" rel="... | <python><setuptools><setup.py><python-packaging><pyproject.toml> | 2023-04-05 17:29:21 | 0 | 403 | JabberJabber |
75,942,381 | 875,806 | Implement Acuity (Squarespace scheduling) webhook signature validation in python | <p>The <a href="https://developers.acuityscheduling.com/docs/webhooks#verifying-webhook-requests" rel="nofollow noreferrer">Acuity webhook documentation</a> describes the steps to verify the source of the webhook is from Acuity.</p>
<blockquote>
<p>First compute the base64 <code>HMAC-SHA256</code> signature of the noti... | <python><squarespace> | 2023-04-05 17:24:30 | 1 | 4,388 | CoatedMoose |
75,942,274 | 6,042,824 | Replit: Getting error 'couldn't connect to display' on a repl using Tkinter | <p>Getting the following error on a <code>repl</code> of mine (<a href="https://replit.com/@BileshGanguly/Tic-Tac-Toe-GUI" rel="nofollow noreferrer">Tic-Tac-Toe GUI</a>) where I'm using <code>Tkinter</code>.</p>
<pre><code>Traceback (most recent call last):
File "main.py", line 99, in <module>
roo... | <python><tkinter><replit> | 2023-04-05 17:12:12 | 0 | 4,171 | Bilesh Ganguly |
75,942,106 | 11,629,296 | pandas/python : Get each distinct values of each column as columns and their counts as rows | <p>I have a data frame like this with below code,</p>
<pre><code>df=pd.DataFrame(columns=['col1', 'col2', 'col3'])
df.col1=['q1', 'q2', 'q2', 'q3', 'q4', 'q4']
df.col2=['b', 'a', 'a', 'c', 'b', 'b']
df.col3=['p', 'q', 'r', 'p', 'q', 'q']
df
col1 col2 col3
0 q1 b p
1 q2 a q
2 ... | <python><pandas><dataframe><pivot-table><one-hot-encoding> | 2023-04-05 16:51:15 | 1 | 2,189 | Kallol |
75,941,954 | 417,896 | Input shape for functional Tensorflow api | <p>What would be an example of properly shaped inputs for the following nn?</p>
<pre><code> inputA = Input(shape=(240, 1))
inputB = Input(shape=(240, 1))
layerA1 = LSTM(60, return_sequences=True)(inputA)
layerB1 = LSTM(60, return_sequences=True)(inputB)
layerA2 = LSTM(60, return_sequences=True)(layerA1)
la... | <python><tensorflow> | 2023-04-05 16:32:53 | 1 | 17,480 | BAR |
75,941,872 | 1,056,563 | How to run code coverage to completion with the report even if pytest is failing? | <p>We have some test cases that are known to fail: those are in our backlog to complete. The tests that fail are not consistent.</p>
<p>I have a separate branch that cleans this all up: but we need the coverage done before that other PR can be merged due to its complexity. We have maybe a hundred test <code>skip</code>... | <python><coverage.py> | 2023-04-05 16:23:06 | 0 | 63,891 | WestCoastProjects |
75,941,832 | 15,528,750 | Follow-up to "How do I execute a program or call a system command?" | <p>I have a related question to <a href="https://stackoverflow.com/questions/89228/how-do-i-execute-a-program-or-call-a-system-command">this one</a>. The command that I'd like to execute is this one:</p>
<pre class="lang-bash prettyprint-override"><code>program test.in > test.out
</code></pre>
<p>where <code>program... | <python><shell><terminal><subprocess><command> | 2023-04-05 16:18:33 | 2 | 566 | Imahn |
75,941,748 | 13,827,753 | How do I improve the speed of getting the average pixel color on sections of my screen | <p>I'm working on a project where I get the average rgb value of all the pixels in a section of the screen ex: <code>top_left</code> and <code>bottom_middle</code>. These values are then mapped to pixels on an led strip which acts as a backlight on my monitor.</p>
<p>My problem is that to get the average rgb value of e... | <python><performance><python-imaging-library><led> | 2023-04-05 16:09:09 | 1 | 478 | Seaver Olson |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.