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,788,229 | 14,094,778 | Python: Selenium cann't finde the btn on pop-up window | <p>I'm trying to click the btn "select all cookies" on cookies terms pop-up window.
I'v tried:</p>
<pre><code>div=driver.find_element(By.XPATH,'//*[@id="js_cookie-settings-modal"]/div[2]/div/div[3]/div')
driver.implicitly_wait(4)
button=div.find_element(By.XPATH,'//*[@id="selectAll"]')
dri... | <python><python-3.x><selenium-webdriver><xpath><webdriverwait> | 2023-03-20 08:58:00 | 2 | 693 | ahm5 |
75,787,865 | 19,325,656 | Extract text from column between two delimiters | <p>Hi all i have pandas columns that are looking like this</p>
<pre><code>**<https://stackoverflow.com/> Stackoverflow runs the world --website --q 3** - <@123456789> (today)
</code></pre>
<p>How can I parse each column to get something like this</p>
<pre><code><https://stackoverflow.com/> Stackoverfl... | <python><pandas><dataframe> | 2023-03-20 08:18:26 | 1 | 471 | rafaelHTML |
75,787,845 | 880,783 | How to get the code of just a lambda argument? | <p>In the following example code, <code>inspect.getsource(lambda_argument)</code> seems to include the source code of the function call surrounding the definition of the lambda. How can I prevent that?</p>
<pre class="lang-py prettyprint-override"><code>import inspect
def fun_of_lambda(lambda_argument):
print(insp... | <python><lambda><code-inspection> | 2023-03-20 08:15:28 | 1 | 6,279 | bers |
75,787,663 | 18,221,164 | Dictionary entry to file fails | <p>I am having a requirement of downloading certain libraries from the repository. I use the get method from Requests module to achieve that. However, on every run of the code, the libraries are fetched over and over again. So we plan to optimise it in the following way:</p>
<p>For all the libraries downloaded, we crea... | <python><python-3.x><dictionary> | 2023-03-20 07:48:01 | 3 | 511 | RCB |
75,787,376 | 10,829,044 | pandas groupby, split df and rename multiple sheets | <p>I have a dataframe like as below</p>
<pre><code>import numpy as np
import pandas as pd
from numpy.random import default_rng
rng = default_rng(100)
cdf = pd.DataFrame({'Id':[1,2,3,4,5],
'customer': rng.choice(list('ACD'),size=(5)),
'segment': rng.choice(list('PQRS'),size=(5)),
... | <python><excel><pandas><dataframe><group-by> | 2023-03-20 07:06:42 | 1 | 7,793 | The Great |
75,787,164 | 2,149,425 | Expected type 'Iterable[SupportsLessThan | Any]' (matched generic type 'Iterable[SupportsLessThanT]'), got 'object' instead | <p>The two following blocks of code should be equivalent:</p>
<h4>Block 1</h4>
<pre><code>array_1 = [[12, 15], [10, 1], [5, 13]]
print(array_1)
""" output:
[[12, 15], [10, 1], [5, 13]]
"""
print(sorted(array_1))
""" output:
[[5, 13], [10, 1], [12, 15]]
"""
<... | <python><python-3.x><numpy><sorting><pycharm> | 2023-03-20 06:30:28 | 1 | 1,673 | Riccardo Volpe |
75,787,160 | 11,518,165 | how to store complete script content to a variable and execute later | <p>I have a script.py we execute and inside this python script we need to read the content of a scripts and execute in another server</p>
<p>We have few shell scripts and one of the sample shell script "execution_count.ksh" as below.</p>
<p>We have these scripts available in one server. Is there a way we can... | <python><shell> | 2023-03-20 06:30:02 | 0 | 541 | Arya |
75,786,903 | 8,064,104 | Interpretation of IMU-Data for position tracking | <p>Is it possible to track the position of an object in a reference coordinate system with an INS? if yes what is the correct approach in doing that?</p>
| <python><ros><imu> | 2023-03-20 05:45:47 | 0 | 347 | nikki |
75,786,783 | 11,141,816 | Use xml.etree.elementtree to process xml with xmlns="http://www.w3.org/2005/Atom" | <p>I'm trying to process the data extracted from the web. The decoded raw data was bytes of xml file. I had some old code that just magically worked. However, I'm not sure what they were doing since it's been a while.</p>
<pre><code>import urllib, urllib.request
url = 'http://export.arxiv.org/api/query?search_query=all... | <python><python-3.x><xml><elementtree><xml-namespaces> | 2023-03-20 05:20:10 | 1 | 593 | ShoutOutAndCalculate |
75,786,744 | 19,327,879 | Drop down value disappear closing when I click drop down to inspect, find xpath. How to find drop down value which collapse as soon as I click on it | <p>How to get drop down value or xpath in selenium when drop down is not of Select type.
How to find drop down value xpath of div type elements?
I am clicking on drop down value to find xpath and it is collapsing and hiding?
I am not able to find drop down values in dom html file.
#React #Dropdown values Xpath.
Dynamic... | <python><selenium-webdriver><xpath><drop-down-menu><selenium-chromedriver> | 2023-03-20 05:13:18 | 2 | 336 | Sachin |
75,786,740 | 15,412,256 | heroku + github path error in the log - cannot find the file path | <p>I deployed my github master branch to heroku. One of my code tries to access a file in the <code>misc</code> directory under the same branch. However, the log on heroku shows that the file does not exist. Please see the screenshot as follows:</p>
<p><a href="https://i.sstatic.net/3k2wr.png" rel="nofollow noreferrer"... | <python><github><heroku><discord><cloud> | 2023-03-20 05:12:18 | 1 | 649 | Kevin Li |
75,786,699 | 1,106,951 | How to find keys in second dictionary which has different value compare to first dictionary | <p>I can use <code>diff = set(dict2) - set(dict1)</code> to know that the <code>dict1</code> and <code>dict2</code> are not equal but what I need is to find which KEY in <code>dict2</code> has a different value than <code>dict1</code></p>
<pre><code> dict1 = {'c1': 'Iran', 'c2': 'India', 'c3': 'Iraq', 'c4': 'Qatar'}
... | <python> | 2023-03-20 05:00:21 | 3 | 6,336 | Behseini |
75,786,601 | 12,931,358 | How to convert TrainingArguments object into a json file? | <p>I want to convert an object of TrainingArguments into a json file and load json when training model because I think it didn't look better in main function and hard to check all parameters in TrainingArguments, for example,</p>
<pre><code>import json
import dataclasses
from transformers import TrainingArguments
clas... | <python><json><deep-learning><pytorch><huggingface-transformers> | 2023-03-20 04:34:43 | 1 | 2,077 | 4daJKong |
75,786,523 | 1,609,428 | how to limit the display width in polars so that wide dataframes are printed in a legible way? | <p>Consider the following example</p>
<pre><code>pd.set_option('display.width', 50)
pl.DataFrame(data = np.random.randint(0,20, size = (10, 42)),
columns = list('abcdefghijklmnopqrstuvwxyz123456789ABCDEFG')).to_pandas()
</code></pre>
<p><a href="https://i.sstatic.net/Rxv9h.png" rel="noreferrer"><img src="... | <python><dataframe><python-polars> | 2023-03-20 04:14:44 | 2 | 19,485 | ℕʘʘḆḽḘ |
75,786,481 | 15,010,256 | Python - check if condition is met within a given timeout | <p>I've a script that 1. downloads & push binaries to internal registry (func_to_push_image) and
2. process messages from a section of messaging queue, to see if the push is successful by filtering the messages for a keyword 3. If the push is successful, monitor and process another section of messaging queue, to va... | <python><python-3.x> | 2023-03-20 04:02:01 | 1 | 466 | Chel MS |
75,786,332 | 213,759 | How to create a stub Python package for PyCharm? | <p>Let's say we have a builtin module <code>car</code>.</p>
<p>We have no autocomplete in PyCharm for it.</p>
<p>It has interface:</p>
<pre class="lang-py prettyprint-override"><code>def getState(id, optional_id = None):
pass
def log(value):
pass
</code></pre>
<p>So, end usage would be:</p>
<pre class="lang-py... | <python><python-3.x><interface><stub> | 2023-03-20 03:20:37 | 1 | 3,127 | Kirby |
75,786,157 | 6,020,411 | How to properly retrieve values/settings from a Python Tkinter radiobutton | <p>Dinking around with a Tkinter window sporting a pair of radio buttons:</p>
<pre><code>from tkinter import *
window = Tk()
window.title("Python Radio Buttons")
# Tkinter string variable
# able to store any string value
v = StringVar(window, "1")
def handle_click(event):
print(v.get())
... | <python><tkinter> | 2023-03-20 02:31:34 | 3 | 753 | ds_practicioner |
75,786,066 | 10,616,752 | Beautiful Soup can't find comment | <p>I am trying to use bs4 to scrape a page but key to my objective is finding a comment in the page.</p>
<p>I cannot make bs4 find it. Can you help. This is my code:</p>
<pre><code> # Parse the HTML content with BeautifulSoup
soup = BeautifulSoup(response.content, "html.parser")
# Find the fir... | <python><beautifulsoup> | 2023-03-20 02:05:58 | 1 | 546 | Scouse_Bob |
75,785,945 | 1,424,739 | how to get the least number of elements whose sum is greater than n? | <pre><code>a = ['a', 'bc', 'def', 'hijk']
n = 5
i = 0
l = 0
for x in a:
l += len(x)
if l > n:
break
i += 1
print(i) # get 2 meaning the 3rd element.
</code></pre>
<p>I use the above code to get the least number of elements whose total length is greater than n. It involves for-loop. I am not sure if for-lo... | <python> | 2023-03-20 01:30:31 | 1 | 14,083 | user1424739 |
75,785,932 | 3,622,232 | Python: How do I store a nonlocal variable's value in an inner function when it's created? | <p>If I have an outer function returning an inner function like so:</p>
<pre><code>def outer():
outer_var = 1
def inner():
return outer_var
outer_var = 2
return inner
</code></pre>
<p>Calling <code>outer()()</code> will return 2. However, I want the inner function to return the value outer_var... | <python><function><scope><runtime> | 2023-03-20 01:26:36 | 1 | 2,017 | uzumaki |
75,785,695 | 5,302,323 | Coverting dates on the same pd column that are in different format (Excel float + dd/mm/yy) into Python dates | <p>I am really struggling to convert two different types of dates on the same pd dataframe into python dates.</p>
<p>This is the type of dates I have:</p>
<pre><code>1 44859
2 7/12/22
3 6/12/22
</code></pre>
<p>Here is the code I have tried so far but it still results in NaT for the Excel format dates (intege... | <python> | 2023-03-20 00:04:04 | 0 | 365 | Cla Rosie |
75,785,663 | 15,900,832 | mkdocs/mkdocstrings: add link back to GitHub source code | <p>I am making docs for my Python code with mkdocs and mkdocstrings.</p>
<p>I would like to have link from the docs to the source code (page and line number on github).</p>
<p>Is there a way to automatic add that with function/class syntax (e.g., '::: identifier')?</p>
<p>I am looking for something similar to 'SciPy' d... | <python><github><mkdocs><mkdocstrings> | 2023-03-19 23:56:02 | 1 | 633 | basil_man |
75,785,588 | 8,272,788 | MQTT messages going to broker but not client | <p>I have a project publishing MQTT messages from an ESP to a broker running on a Pi, and client running on the Pi. Messages are reliably getting from the ESP to the broker, as I can observe them using <code>mosquitto_sub</code>, however the client only receives them sporadically. I have tried setting QOS to 1 and 2, b... | <python><mqtt><paho><micropython> | 2023-03-19 23:33:40 | 1 | 1,261 | MorrisseyJ |
75,785,409 | 15,176,150 | What's the fastest way to append to a list with Numba? | <p>I'm creating some code that does a lot of list appends. It has to be performant so I'm using <a href="https://numba.pydata.org/" rel="nofollow noreferrer">Numba</a> to <code>@jit</code> compile it.</p>
<p>I've checked the <a href="https://numba.pydata.org/numba-doc/dev/reference/pysupported.html#list" rel="nofollow ... | <python><list><append><numba><jit> | 2023-03-19 22:50:43 | 1 | 1,146 | Connor |
75,785,259 | 15,209,311 | Python "on_destroy" class method | <p>I am wondering if there is a way to call a method before the object is finally "destroyed" - like some sort of event.</p>
<p>I am using a class and a static method. Since it is not an instantiated object, I cannot use <code>del</code> and modify <code>__del__</code> on it.</p>
<p>Is the object garbage coll... | <python><python-3.x><class><oop><python-class> | 2023-03-19 22:15:25 | 2 | 619 | Niv |
75,784,905 | 18,493,710 | cannot upload audio files in Bale bot using python-bale-bot | <p>I intend to create a bot in a Telegram-like messenger called Bale that should send audio files. I am using <a href="https://github.com/python-bale-bot" rel="nofollow noreferrer">python-bale-bot</a> which is a wrapper for Bale Messenger API. When I try to open the mp3 file and read it and pass it to the method, I get... | <python><bale-messenger> | 2023-03-19 21:02:05 | 1 | 418 | okaeiz |
75,784,875 | 5,246,226 | Can another thread release a lock held by another thread in Python? | <p>I am trying to understand threading in Python via <a href="https://realpython.com/intro-to-python-threading/" rel="nofollow noreferrer">this website</a>. Here, it has the following code for a single producer/consumer-type problem:</p>
<pre><code>import random
SENTINEL = object()
def producer(pipeline):
"... | <python><multithreading> | 2023-03-19 20:56:27 | 1 | 759 | Victor M |
75,784,606 | 16,283,580 | sqlalchemy: concat strings with + sign | <p>I try to concatenate 3 parts together into an SQL expression with <code>sqlalchemy</code>:</p>
<pre><code>func.date(cls.entry_date, '+' + cls.duration + ' year', '-1 day')
</code></pre>
<p>The SQL statement produced is:</p>
<pre><code>date("My_Table"."Entry date", '+' + "My_Table".&quo... | <python><sqlite><sqlalchemy> | 2023-03-19 19:58:31 | 1 | 321 | zigma12 |
75,784,544 | 11,280,068 | Jinja convert chat.js charts to images when rendering template | <p>I have a question about javascript within Jinja2 before I start on my project, so I can understand if jinja is the right solution to use</p>
<ul>
<li><p>I want to create an html email template that will fill in some values for each user, and then send them the rendered template via email. I already have the email fu... | <javascript><python><html><chart.js><jinja2> | 2023-03-19 19:43:46 | 1 | 1,194 | NFeruch - FreePalestine |
75,784,491 | 158,801 | How to read path variables / binding data in Python Azure BlobTrigger Function? | <p>How do I read {email} in Python Azure BlobTrigger function?</p>
<p>function.json</p>
<pre><code>{
"scriptFile": "__init__.py",
"bindings": [
{
"name": "myBlob",
"type": "blobTrigger",
"direction": "in"... | <python><azure><azure-functions><azure-blob-storage> | 2023-03-19 19:33:34 | 1 | 10,849 | Mikeon |
75,784,453 | 6,440,589 | Evaluating a string as a numpy array | <p>My team is migrating from <strong>Clickhouse</strong> to <strong>Azure Data Explorer</strong> (ADX). We are currently experiencing difficulties to query our data from ADX: the queried values are correct, but the data are read as a <strong>string</strong> rather than as an array of <strong>floats</strong>.</p>
<p>Her... | <python><list-comprehension><eval> | 2023-03-19 19:25:42 | 3 | 4,770 | Sheldon |
75,784,338 | 5,644,961 | How to make mypy like my protocols that work at runtime with runtime_checkable | <p>I defined a couple of protocols like so:</p>
<pre class="lang-py prettyprint-override"><code>import json
from typing import Any, Protocol, TypeVar, runtime_checkable
T_co = TypeVar('T_co', covariant=True)
T = TypeVar('T')
@runtime_checkable
class SupportsRead(Protocol[T_co]):
def read(self, __length: int = ..... | <python><python-typing><mypy> | 2023-03-19 19:05:02 | 1 | 8,635 | Copperfield |
75,784,094 | 4,502,950 | ValueError: time data '23/11/2022' does not match format '%m/%d/%Y' (match) | <p>I have user-entered data where some people put the date as 'm/d/y' while others entered it as 'd/m/y'. I am trying to convert the column to datetime using try except blocks. But it keeps throwing me this error</p>
<pre><code>ValueError: time data '23/11/2022' does not match format '%m/%d/%Y' (match)
</code></pre>
<p... | <python><datetime> | 2023-03-19 18:21:39 | 2 | 693 | hyeri |
75,784,057 | 8,201,204 | Jupyter notebook command doesn't bring up Jupyter | <p>I am using windows 11
I installed Python latest version and installed pip also
I installed Jupyter using the command (at command prompt) "pip install jupyter"
Installation went fine.</p>
<p>When I try to launch Jupyter notebook using the command "jupyter notebook" it says "jupyter is not a r... | <python><windows><jupyter-notebook><pip> | 2023-03-19 18:15:32 | 2 | 557 | Jason |
75,784,038 | 1,011,253 | Python multiprocessing application is getting stuck in docker container | <p>I am trying to run a multiprocessing Python application to speedup and parallel my tasks.
My application is using a simple multiprocessing <code>Pool</code> and running within docker container with limited resources.</p>
<p>I have noticed that my application is getting stuck from time to time; It's never end/termina... | <python><docker><memory><multiprocessing><python-multiprocessing> | 2023-03-19 18:12:50 | 1 | 11,527 | ItayB |
75,784,018 | 188,159 | How to find out available system fonts in Pycairo? | <p>I'm writing SVG text in Pycairo and want to set the font like so:</p>
<pre><code>context.select_font_face ("Adventure", Cairo.FontSlant.NORMAL, Cairo.FontWeight.BOLD);
</code></pre>
<p>(example from <a href="https://valadoc.org/cairo/Cairo.Context.set_font_size.html" rel="nofollow noreferrer">Valadoc</a>)<... | <python><windows><fonts><pycairo> | 2023-03-19 18:10:07 | 0 | 9,813 | qubodup |
75,783,837 | 1,438,082 | write to configuration fmodule | <p>I am using the code as menstioned <a href="https://stackoverflow.com/questions/5055042/whats-the-best-practice-using-a-settings-file-in-python">here</a></p>
<pre><code>truck = dict(
color = 'blue',
brand = 'ford',
)
city = 'new york'
cabriolet = dict(
color = 'black',
engine = dict(
cylinders... | <python><python-3.x><dictionary> | 2023-03-19 17:39:34 | 1 | 2,778 | user1438082 |
75,783,751 | 7,102,572 | Reading csv with numpy has extra row of 1's | <p>I am using <code>np.genfromtxt</code> to read a csv file, and trying to use the <code>converters</code> argument to preprocess each column.</p>
<p>CSV:</p>
<pre><code>"","Col1","Col2","Col3"
"1","Cell.1",NA,1
"2","Cell.2",NA,NA
"3&q... | <python><numpy><csv><converters><genfromtxt> | 2023-03-19 17:22:35 | 1 | 1,048 | efthimio |
75,783,694 | 9,601,748 | Trying to pivot a large dataframe, but get 'IndexError: index 875914235 is out of bounds for axis 0 with size 875909652' | <p>I'm trying to pivot this dataframe ('refined_dataset'):</p>
<p><a href="https://i.sstatic.net/k3I14.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/k3I14.png" alt="dataframe" /></a></p>
<p>Like this:</p>
<pre><code>movieUser_df = refined_dataset.pivot(
index='userID',
columns='primaryTitle',
... | <python><pandas><dataframe><pivot-table> | 2023-03-19 17:14:14 | 1 | 311 | Marcus |
75,783,605 | 402,281 | Why is Type[T] defined to be covariant in T? | <p><a href="https://peps.python.org/pep-0484/#the-type-of-class-objects" rel="nofollow noreferrer">PEP 484</a> declares that <code>typing.Type[T]</code> is covariant, i.e. that for any types <code>A</code> and <code>B</code>, <code>B</code> being a subtype of <code>A</code> implies that <code>Type[B]</code> is a subtyp... | <python><python-typing><covariance> | 2023-03-19 16:59:21 | 1 | 10,085 | Feuermurmel |
75,783,420 | 1,893,164 | How can you detect if the mouse buttons are swapped on Windows from Python? | <p>Left-handed users may have swapped the mouse buttons on Windows by setting the primary button to the right mouse button instead of the left. What Python code will let me detect this setting?</p>
<p>There are similar questions for C++ and C#:</p>
<p><a href="https://stackoverflow.com/questions/34997186/use-c-sharp-to... | <python><winapi><mouse> | 2023-03-19 16:26:39 | 2 | 13,197 | Al Sweigart |
75,783,393 | 585,806 | A value is trying to be set on a copy of a slice from a DataFrame, but not slice | <p>I read several similar question on stackoverflow, but I still don't understand, I'm doing:</p>
<pre><code>dictionnaire = {}
for i, valeur in enumerate(streets):
dictionnaire[valeur] = i+1
for index, elem in enumerate(home_data['Street']):
home_data['Street'][index]=dictionnaire[elem]
</code></pre>
<p>Which s... | <python><pandas> | 2023-03-19 16:22:51 | 0 | 2,271 | Entretoize |
75,783,251 | 17,487,457 | dataframe: column statistics after grouping | <p>I know this question has been asked, but I can't the answer worked for me, so I ask.
Having this dataframe:</p>
<pre class="lang-py prettyprint-override"><code>data = pd.DataFrame({'id': [9,9,9,2,2,7,7,7,5,8,8,4,4,3,3,3,
1,1,1,1,1,6,6,6,6,6,10,11,11,11,11],
'signal': [1,3,5,7,9,13,17,27,5,1,5,5,11,3,7,11,6,... | <python><pandas><dataframe> | 2023-03-19 15:59:38 | 1 | 305 | Amina Umar |
75,783,145 | 2,998,976 | Summing over C contiguous array in numpy returns wrong answer | <p>I have the following array:</p>
<pre class="lang-py prettyprint-override"><code>values = np.array(
[[0.00000000000000000000000e+00,
0.00000000000000000000000e+00],
[-4.79999759999999625000000e+14,
-0.00000000000000000000000e+00],
[4.79999759999999625000000e+14,
-0.00000000000000000000... | <python><numpy> | 2023-03-19 15:41:48 | 1 | 373 | ikhebgeenaccount |
75,783,081 | 1,788,771 | Specifying a relation through multiple shared foreign keys | <p>Let's say we have 4 models, lets call them <code>Alpha</code>, <code>Beta</code>, <code>Gamma</code>, and <code>Delta</code> and the first two are something like:</p>
<pre class="lang-py prettyprint-override"><code>class Alpha(models.Model):
gamma = models.ForeignKey(Gamma, on_delete=models.RESTRICT)
delta =... | <python><django><has-many-through> | 2023-03-19 15:32:07 | 1 | 4,107 | kaan_atakan |
75,783,029 | 1,314,732 | PyTorch with Transformer - finetune GPT2 throws index out of range Error | <p>in my Jupiter i have the following code. I can not figure out why this throws a <code>IndexError: index out of range in self</code> error.</p>
<p>here ist the code:</p>
<pre><code>!pip install torch
!pip install torchvision
!pip install transformers
</code></pre>
<pre><code>import torch
from torch.utils.data import ... | <python><pytorch><huggingface><gpt-2> | 2023-03-19 15:24:24 | 0 | 1,917 | Peter Shaw |
75,783,003 | 4,404,805 | Regex: Match decimal numerals with no digits before decimal point | <p>I am trying to match decimal numerals with no digits before the decimal point in a string using regex. For example, I have the strings:</p>
<pre><code>The dimensions of the object-1 is: 1.4 meters wide, .5 meters long, 5.6 meters high
The dimensions of the object-2 is: .8 meters wide, .11 meters long, 0.6 meters hig... | <python><regex><expression><leading-zero> | 2023-03-19 15:18:56 | 2 | 1,207 | Animeartist |
75,782,915 | 12,688,015 | cannot build package for all python3 versions | <p>This is my setup.py file for my C extension module for Python, I want to build my package for all py3 versions but it still builds for cp38, I don't understand why and tried every option I saw on the internet, what would be the reason of this</p>
<pre><code>import os
import glob
import pathlib
import setuptools
from... | <python><cpython> | 2023-03-19 15:04:50 | 0 | 742 | sekomer |
75,782,877 | 5,984,358 | How does scipy minimization handle cases where hessian is not positive definite | <p>I am using <code>from scipy.optimize import minimize</code> to minimize a function subject to two constraints. I have been using the <code>trust-constr</code> method, which takes the value, gradient and the Hessian of the function.</p>
<p>However, in my case, the Hessian may sometimes develop negative eigenvalues (i... | <python><scipy><scipy-optimize><hessian-matrix> | 2023-03-19 14:56:56 | 0 | 327 | S R Maiti |
75,782,775 | 12,285,101 | quit while loop inside for loop | <p>I have the following logic in my code:</p>
<pre><code>count=0
for x in lst:
print('hello!')
while True:
rep=input('save this?y/n?')
print(rep)
if rep=="y":
print('wow amazing')
count=count+1
break
elif rep=="n":
... | <python><for-loop><while-loop><exit> | 2023-03-19 14:43:28 | 2 | 1,592 | Reut |
75,782,765 | 11,015,558 | Pyarrow slice pushdown for Azure data lake | <p>I want to access Parquet files on an Azure data lake, and only retrieve some rows.</p>
<p>Here is a reproducible example, using a public dataset:</p>
<pre><code>import pyarrow.dataset as ds
from adlfs import AzureBlobFileSystem
abfs_public = AzureBlobFileSystem(
account_name="azureopendatastorage")
d... | <python><azure><azure-data-lake><pyarrow><apache-arrow> | 2023-03-19 14:42:10 | 2 | 1,994 | Luca |
75,782,694 | 3,848 | Building package with 'build' does not exclude exclude-files (which setup.py does) | <p>We're getting deprecation warnings when building with <code>python3 setup.py sdist</code> and after reading <a href="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html" rel="nofollow noreferrer">Why you shouldn't invoke setup.py directly?</a> I see that the recomended alternative is to use <a href="ht... | <python><build><setuptools><setup.py><python-packaging> | 2023-03-19 14:30:04 | 1 | 115,461 | Motti |
75,782,664 | 9,418,142 | Passing a list of senders to the sender parameter of @receiver decorator | <p>So at the moment, I'm working on my Django project and I have a signal receiver function that looks like this:</p>
<pre><code>@receiver(pre_save, sender=Task, dispatch_uid='core.models.task_handler_pre_1')
@receiver(pre_save, sender=TaskHistory, dispatch_uid='core.models.task_handler_pre_2')
@receiver(pre_save, send... | <python><django><event-handling> | 2023-03-19 14:25:38 | 1 | 716 | AnonSar |
75,782,594 | 9,414,470 | RSA Implementation in Python | <p>I was trying to implement RSA cipher, and this is my work so far:</p>
<pre class="lang-py prettyprint-override"><code>import numpy as np
def solve_diophantine_eqn(a: int, b: int, d: int):
'''
Solving ax + by = d, where a, b and d are given. \\
Solving for x and y, where d is multiple of gcd(a, b)
''... | <python><numpy> | 2023-03-19 14:14:52 | 2 | 896 | Jaideep Shekhar |
75,782,584 | 11,092,636 | multiprocessing with SLURM, increasing number of cpus-per-ask works but not increasing number of tasks | <p>Whether i specify <code>--ntasks=3</code> and <code>--cpus-per-task=40</code> or <code>--ntasks=1</code> and <code>--cpus-per-task=40</code> (SLURM), the code takes the exact same time (99 seconds) to run. What am I missing?</p>
<p>I do witness a speed up when going from <code>--cpus-per-task=20</code> to <code>--cp... | <python><python-multiprocessing><slurm> | 2023-03-19 14:12:27 | 1 | 720 | FluidMechanics Potential Flows |
75,782,431 | 20,959,773 | How to get the coordinates of Selenium Mouse cursor Python without involving any elements | <p>I need to find a way to get location coordinates of current Selenium ActionChains invisible cursor.</p>
<p>I can find it after I move to an element, and calculate it from size of element and location of element, but this requires to move first to it and is not very accurate.</p>
<p>I can find it injecting javascript... | <javascript><python><html><selenium-webdriver> | 2023-03-19 13:48:41 | 1 | 347 | RifloSnake |
75,782,276 | 5,082,187 | Single quotes around types in Python variable declarations | <p>Python accepts this statement:</p>
<pre><code>stop:bool = False
</code></pre>
<p>I have been told this is better:</p>
<pre><code>stop:'bool' = False
</code></pre>
<p>Does it matter? Is there a kind of beautifier that will make my code use a single consistent style?</p>
| <python> | 2023-03-19 13:20:41 | 1 | 428 | TradingDerivatives.eu |
75,781,877 | 19,130,803 | Type-hint a custom class enum | <p>I have a enum class, which is class variable inside person class. I am getting typehint error for <code>types</code> class variable.</p>
<p>I tried as below to typehint <code>types</code> class variable.</p>
<ul>
<li>XyzTypes</li>
<li>"XyzTypes"</li>
<li>Type[XyzTypes]</li>
<li>TypeVar["T"]</li>... | <python> | 2023-03-19 12:09:10 | 1 | 962 | winter |
75,781,875 | 9,978,223 | ARRAY of UUID to raw SQL | <p>I'm using</p>
<pre><code>Python == 3.10
flask-sqlalchemy == 2.5.1
sqlalchemy == 1.4.46
</code></pre>
<p>I have a stored procedure <code>delete_foo_by_uuids</code> to delete data from <code>foo</code> table using PostgreSQL. The stored procedure gets <code>UUID[]</code> as input parameters.
It works great inside SQL... | <python><postgresql><sqlalchemy><flask-sqlalchemy> | 2023-03-19 12:08:58 | 1 | 668 | Dmitrii Sidenko |
75,781,743 | 3,966,691 | Python subprocess.Popen hang to prcoess stream of linux 'read -p' command | <p>I want to interact with Linux <code>read -p</code> prompt command through python.</p>
<p>I wrote following program using python <code>subprocess.Popen</code> but this program stuck of getting <code>read -p</code> prompt stream.</p>
<pre><code>import subprocess
import threading
import re
class ExeCmd:
def __i... | <python><python-3.x><linux><subprocess> | 2023-03-19 11:46:06 | 0 | 563 | Equation Solver |
75,781,599 | 20,266,647 | Missing webapi parameter or V3IO_API environment variable | <p>I got the exception:</p>
<pre><code> File "C:\Python\ingestKVdatetime\venv\lib\site-packages\mlrun\datastore\targets.py", line 1155, in get_table_object
V3ioDriver(webapi=endpoint),
File "C:\Python\ingestKVdatetime\venv\lib\site-packages\storey\drivers.py", line 100, in __init__
NeedsV... | <python><data-ingestion><mlops><feature-store><mlrun> | 2023-03-19 11:18:11 | 1 | 1,390 | JIST |
75,781,511 | 6,919,063 | How does discord's api get live data | <p>I am wondering how apis like discord.py get live data. Other than putting a request.get in a while True loop I am wondering how live data can be retrieved like a push server. Is there some magic in using a discord bot that allows us to receive push information or can it be done via requests or some custom websocket?... | <python><websocket><discord> | 2023-03-19 10:59:38 | 1 | 724 | Jacob B |
75,781,507 | 17,795,398 | sqlite: error when using another sqlite command inside a custom function (sqlite3.Connection.create_function) | <p>I'm learning to create custom <code>sqlite3</code> functions in Python. This is my code:</p>
<pre><code>import sqlite3
conn = sqlite3.connect("data.db")
c = conn.cursor()
query = "CREATE TABLE IF NOT EXISTS names (ID INTEGER UNIQUE PRIMARY KEY NOT NULL, name TEXT)"
c.execute(query)
query = &... | <python><sqlite> | 2023-03-19 10:58:46 | 1 | 472 | Abel Gutiérrez |
75,781,441 | 8,350,828 | Python binance websocket stream code for getting user data and coin price | <p>I am trying to get binance futures data from a websocket stream. I've gone through all the binance documentation tried several different python approaches, but don't seem to be successfull.</p>
<p>I am running my code on python-anywhere servers.</p>
<p>I would like to also know, how do you handle reconnections to th... | <python><websocket><binance><binance-api-client><python-binance> | 2023-03-19 10:46:18 | 2 | 813 | Jože Strožer |
75,781,328 | 17,884,397 | PyTorch + Skorch: Make the TensorBoard callbakc keep track on manual scores defined by `EpochScoring` | <p>I am using <a href="https://github.com/skorch-dev/skorch" rel="nofollow noreferrer">Skorch</a>.</p>
<p>I created a new score logging using the <a href="https://skorch.readthedocs.io/en/stable/callbacks.html#skorch.callbacks.EpochScoring" rel="nofollow noreferrer"><code>EpochScoring</code></a> callback.<br />
While i... | <python><pytorch><tensorboard><skorch> | 2023-03-19 10:22:46 | 1 | 736 | Eric Johnson |
75,781,261 | 2,708,519 | MacOS capture of still image from AVFoundation camera silently fails | <p><strong>Problem</strong>: I am trying to use a python function, <strong>capture_image(unique_id, dest_filename),</strong> for MacOS that is supposed to capture a still image from a video camera using the <em>AVFoundation</em> framework and the <em>pyobjc-framework-AVFoundation</em> framework.</p>
<p><strong>Expected... | <python><avfoundation> | 2023-03-19 10:07:02 | 0 | 1,529 | mcgregor94086 |
75,781,214 | 2,669,433 | Is there no-loop implementation of sparse dot-products of vectors in Python? | <p>Suppose <code>X</code> is a Numpy array of size <code>(N, d)</code>. I want to calculate an <code>N</code>-by-``N` matrix</p>
<pre><code>A[i,j] = S[i,j] * numpy.dot(X[i,:], X[j,:]),
</code></pre>
<p>where <code>S</code> is a sparse array with a few nonzero entries. Of course I can loop over all nonzero entries in <c... | <python><sparse-matrix><dot-product> | 2023-03-19 09:54:31 | 0 | 629 | rozyang |
75,781,093 | 12,214,867 | How do I put a label inside each bar with matplotlib or any other python visualization lib? | <p>I'm trying to draw a figure like the one below.</p>
<p><a href="https://i.sstatic.net/832GZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/832GZ.png" alt="enter image description here" /></a></p>
<p>here is the code</p>
<pre><code>x = [0, 1, 2]
y = [88909, 27155, 12897]
plt.bar(x, y, tick_label = ['P... | <python> | 2023-03-19 09:27:12 | 1 | 1,097 | JJJohn |
75,780,885 | 7,359,831 | Literal alternative in Python | <p>According to <a href="https://peps.python.org/pep-0585/#implementation" rel="nofollow noreferrer">this doc</a>,</p>
<blockquote>
<p>Importing those from typing is deprecated. Due to PEP 563 and the intention to minimize the runtime impact of typing, this deprecation will not generate DeprecationWarnings. Instead, ty... | <python> | 2023-03-19 08:36:53 | 1 | 1,786 | Pytan |
75,780,692 | 1,319,998 | How to show 100% for 0 iterations in tqdm? | <p>I have a "dynamic total" situation in tqdm, where sometimes the total number of iterations will be 0. And in this case, I would like to show 100% at the end, since all the iterations have been done.</p>
<p>I've tried this:</p>
<pre class="lang-py prettyprint-override"><code>from tqdm import tqdm
bar = tqd... | <python><tqdm> | 2023-03-19 07:50:30 | 1 | 27,302 | Michal Charemza |
75,780,678 | 19,186,611 | push to gateway function in prometheus client | <p>I want to push metrics to my Prometheus server via the push_to_gateway function but I set basic auth on the Prometheus server.
how can I send a username and password in the push_to_gateway function?</p>
| <python><nginx><prometheus> | 2023-03-19 07:47:23 | 1 | 433 | lornejad |
75,780,600 | 6,407,261 | How to raise exceptions in python asyncio background task | <h3>Problem</h3>
<p>I have a few tasks that run continuously, but one of them occasionally needs to restart so this one is run in the background. How can exceptions from this background task be raised immediately? In the following example, the exception is not raised until the next attempt to restart, which can be very... | <python><python-3.x><async-await><python-asyncio> | 2023-03-19 07:23:21 | 1 | 447 | Patrick Pei |
75,780,298 | 3,026,206 | set the Python version of a venv | <p>I have installed a specific version of Python and it shows when I run pyenv versions:</p>
<pre><code>% pyenv versions
system
* 3.10.4 (set by .python-version)
</code></pre>
<p>However, when I try to use Python (in a venv or without), it always uses the system version instead of the specific version I want to use.<... | <python><pyenv> | 2023-03-19 05:48:54 | 1 | 3,560 | beachCode |
75,780,285 | 6,144,691 | Passing Parameter from conf in Airflow PostgresOperator | <p>Want to access the config passed in the data in the API call</p>
<pre><code>curl --location 'http://localhost:8080/api/v1/dags/postgres_operator_dag/dagRuns' \
--header 'Content-Type: application/json' \
--data '{
"conf": {
"seller_id": "test_seller"
}
}'
</code></pre>
<... | <python><postgresql><airflow><directed-acyclic-graphs><airflow-webserver> | 2023-03-19 05:43:17 | 1 | 773 | Arjunsingh |
75,780,250 | 2,622,678 | ImportError: attempted relative import with no known parent package when python file imports file from parent dir | <p>The following simple import fails with error. The python file child.py throws error when it imports a file from the parent dir. I can make it work by adding the parent path in sys.path.append() and importing the file. But I prefer relative import. What is the reason for import error.</p>
<pre><code>(venv) cs@comp-MB... | <python><python-3.x><python-import> | 2023-03-19 05:29:16 | 0 | 443 | user2622678 |
75,780,103 | 7,520,419 | HuggingFace Transformers Trainer._maybe_log_save_evaluate IndexError: invalid index to scalar variable | <p>So, I'm working on fine tuning a BART model for question generation, and it seems to be going through training okay. Then all of a sudden, it stops at the end of the first validation with an <code>IndexError</code> which you can see below. The problem is occurring in the <code>Trainer._maybe_log_save_evaluate</code>... | <python><pytorch><nlp><huggingface-transformers><huggingface> | 2023-03-19 04:31:40 | 1 | 606 | Sintrias |
75,780,093 | 1,424,739 | How to deal with "=2E" in get_body()? | <pre><code>import email
import email.policy
import sys
msg = email.message_from_string(sys.stdin.read(), policy=email.policy.default)
print(msg.get_body('plain').get_payload())
</code></pre>
<p>input.eml</p>
<pre><code>MIME-Version: 1.0
From: my from
To: email@to.com
Subject: my subject
Content-Type: multipart/mixed;
... | <python><email><quoted-printable> | 2023-03-19 04:28:39 | 1 | 14,083 | user1424739 |
75,779,972 | 191,899 | Python: Is there a way to use sql against an array? | <p>I am new to python, but not new to programming. So there may be a lot of knowledge I have yet to master. Or learn the best way to solve a problem.</p>
<p>I have a project, that I have gotten to using fake data generated, to display in an html table.</p>
<p>But to manipulate for various reports I want to do on it. No... | <python><sql><arrays> | 2023-03-19 03:47:36 | 0 | 1,947 | crosenblum |
75,779,943 | 1,989,834 | numpy ndenumerate on 2D array with slicing gives incorrect indices | <p>Why I am getting incorrect indices while iterating over 2D array with slice using ndenumerate?</p>
<pre><code>arr = np.array([[1, 2, 3, 4], [5, 6, 7, 8]])
for idx, x in np.ndenumerate(arr[:, ::2]):
print(idx, x)
</code></pre>
<p>Output:</p>
<pre><code>(0, 0) 1
(0, 1) 3
(1, 0) 5
(1, 1) 7
</code></pre>
<p>I think ... | <python><python-3.x><numpy><numpy-ndarray> | 2023-03-19 03:36:39 | 1 | 657 | PatilUdayV |
75,779,796 | 145,504 | UnicodeDecodeError for invalid sequence beyond requested read | <p>Suppose I write a UTF-8 encoded string to a file, followed by a byte sequence that is invalid in UTF-8:</p>
<pre class="lang-py prettyprint-override"><code>with open('/tmp/foo.txt', 'wb') as f:
f.write('αβγ'.encode('utf-8'))
f.write(b'\x80') # will cause unicode parse error if read
</code></pre>
<p>If I rea... | <python><character-encoding> | 2023-03-19 02:42:01 | 1 | 4,458 | rgov |
75,779,700 | 926,319 | Retrieve a #[pyclass] from an attribute of an arbitrary PyAny | <p>Let us say I have the following Rust struct which becomes a Python class:</p>
<pre class="lang-rust prettyprint-override"><code>#[pyclass]
struct MyRustClass {
foo: i32
}
#[pymethods]
impl MyRustClass {
#[new]
fn new(foo: i32) {
MyRustClass { foo }
}
}
</code></pre>
<p>This class is made ava... | <python><rust><pyo3> | 2023-03-19 02:01:15 | 1 | 2,054 | Darren |
75,779,691 | 1,424,739 | How to extract text from the plain text part of multipart/alternative? | <pre><code># main.py
import email
from email.iterators import _structure
import sys
msg = email.message_from_string(sys.stdin.read())
_structure(msg)
</code></pre>
<pre><code>./main.py <<EOF
From: Nathaniel Borenstein <nsb@bellcore.com>
To: Ned Freed <ned@innosoft.com>
Subject: Formatted text mail
MI... | <python><email><multipart> | 2023-03-19 01:56:43 | 1 | 14,083 | user1424739 |
75,779,438 | 1,857,373 | Value Error single feature (y, y_train) needs 2D array in digit recognizer train, fit/prediction OneVsRest classifier for Logistic | <p><strong>Problem</strong>
To perform prediction multi-class on digit-recognizer, data based on Kaggle data set.</p>
<p>Setting up OneVsRest classifier for multi-class prediction on digits using Logistic Regression and using RandomizedSearchCV for
best estimate and params, all working so far good.</p>
<p>Fit my model ... | <python><arrays><machine-learning><prediction> | 2023-03-19 00:26:30 | 1 | 449 | Data Science Analytics Manager |
75,779,304 | 13,079,519 | How to implement this idea into objective fucntion with Gurobi PY | <p>I am working on an optimization project here and my objective is to come out with the optimal amount of each item to buy at certain vendors that can minimize the cost while meeting the demand(already figured out the demand constraints). Here is a little background for the case below, there are 2 Vendor, 2 distribut... | <python><optimization><gurobi> | 2023-03-18 23:42:08 | 2 | 323 | DJ-coding |
75,779,053 | 17,884,397 | Subclass a Python class with predefined parameters in one liner | <p>Given a simple class:</p>
<pre class="lang-py prettyprint-override"><code>class MyClassA():
def __init__(self, param_a, param_b):
self.param_a = param_a
self.param_b = param_b
def my_method(self, param_c):
return some_fun(self.param_a, self.param_b)
</code></pre>
<p>Now I wa... | <python><class><subclassing> | 2023-03-18 22:35:01 | 2 | 736 | Eric Johnson |
75,779,002 | 14,847,960 | Why can't I import config? | <p>I have a config.yml file with api keys in it, further, I have a .py file which greps for it.</p>
<p>I should theoretically be able to import config, and I can do so when I move the config.py file from the main directory into the correct subdirectory, but that doesn't quite work efficiently.</p>
<p>Forgive the poor a... | <python> | 2023-03-18 22:20:41 | 2 | 324 | jd_h2003 |
75,778,972 | 5,574,107 | Plotly choropleth with area labels | <p>I am trying to make a choropleth with this data (source links in code). The below does produce one, but it's hard to really get anything meaningful from it without knowing which area is which.</p>
<p>I have tried making an interactive choropleth with the second block of code. All this does is break my laptop - it ju... | <python><plotly><geopandas> | 2023-03-18 22:13:59 | 1 | 453 | user13948 |
75,778,919 | 3,507,584 | How to load Plotly graphs fast in a webpage? | <p>I am using Django to create my first website. I have some complex plots made with Plotly which get passed to the render function as html (saved using <code>to_html</code> function). For example:</p>
<pre><code>def sample_plot():
import numpy as np
import pandas as pd
import plotly.graph_objects as go
... | <python><html><django><plot><plotly> | 2023-03-18 22:02:43 | 2 | 3,689 | User981636 |
75,778,800 | 7,752,049 | Filter on json data with in_() sqlalchemy | <p>I want to filter features(Json field on database) with items = a or b, but here it returns 0, when I use other columns the filter works correctly. It returns correct data with ["a"] or ["b"] too, what is the reason? and what is the solution?</p>
<pre><code>data.filter(Data.id.in_([1,2])) #works
... | <python><sqlalchemy> | 2023-03-18 21:34:51 | 2 | 2,479 | parastoo |
75,778,685 | 2,512,443 | How to group each individual transaction from a buy and sell history | <p>Given a data frame that is sorted by symbol and date. I would like to add a new column that identifies each individual transaction. Each individual transaction means that the position is opened and closed after a set of buy and sell orders.</p>
<p>Input data</p>
<pre><code>time symbol side pric... | <python><pandas> | 2023-03-18 21:10:06 | 1 | 473 | user2512443 |
75,778,614 | 1,305,688 | Merging on DatetimeIndexes and on = '' | <p>I have two <a href="/questions/tagged/pandas" class="post-tag" title="show questions tagged 'pandas'" aria-label="show questions tagged 'pandas'" rel="tag" aria-labelledby="tag-pandas-tooltip-container">pandas</a> data frames, that I need to merge on both indexes and one other variables. Like this,<... | <python><pandas><datetime><merge> | 2023-03-18 20:54:42 | 1 | 8,018 | Eric Fail |
75,778,543 | 649,133 | Python telnetlib3 examples | <p>I would like to understand how to use telnetlib3 for a simple scenario.</p>
<p>The longstanding telnetlib (not 3) has a simple example at <a href="https://docs.python.org/3/library/telnetlib.html" rel="noreferrer">https://docs.python.org/3/library/telnetlib.html</a> where the python program connects to a telnet serv... | <python><python-asyncio><telnetlib><telnetlib3> | 2023-03-18 20:37:06 | 2 | 3,056 | gwideman |
75,778,369 | 19,349,670 | Defining python class method with multiple function signature | <p>How to allow multiple behaviour of the delta_ method within the class depending on the parameters list?</p>
<pre><code>class Greeks:
@staticmethod
def delta_(
X: Option
) -> float:
"""
Compute the delta of an option represented by an `Option` object.
The... | <python><class> | 2023-03-18 20:02:37 | 1 | 873 | solid |
75,778,242 | 11,665,178 | Signed Url is working after the expiration date Cloud Storage python | <p>I have found this <a href="https://stackoverflow.com/questions/56504545/signed-url-is-working-beyond-expiration-date">question</a> that seems dead so i will add more context.</p>
<p>i am using the python google-cloud-storage sdk to generate signed urls using <code>blob.generated_signed_url()</code>.</p>
<p>Here is t... | <python><google-cloud-platform><google-cloud-storage> | 2023-03-18 19:38:45 | 1 | 2,975 | Tom3652 |
75,778,228 | 5,212,614 | How can we loop through dates in a dataframe, and append strings to create a valid URL? | <p>I am trying to loop through dates in a dataframe (dates are formatted as string type) and get two rows at a time, for start and end. For each pair, I am trying to append to a string to create a URL and pass it to an API. Here is the code that I have so far.</p>
<pre><code>import pandas as pd
from datetime import dat... | <python><python-3.x><string><dataframe> | 2023-03-18 19:36:36 | 1 | 20,492 | ASH |
75,778,215 | 7,236,133 | build a list with different values in different indexes | <p>I have a <a href="https://datascience.stackexchange.com/questions/22762/understanding-predict-proba-from-multioutputclassifier">predictions probabilities</a> for multiclasses [0, 1], and I need to save the correct prediction probability for each row in my data set:</p>
<pre><code>probs = model.predict_proba(X_test)
... | <python> | 2023-03-18 19:33:29 | 1 | 679 | zbeedatm |
75,778,166 | 6,843,103 | DataprocCreateClusterOperator - in Composer2(Airflow), pip install specific versions | <p>I'm using DataprocCreateClusterOperator to create Dataproc cluster in the dag, using the following code (only relevant part of the dag shown below) :
I'm using init_actions_uris & passing script pip_install_versions.sh</p>
<p>This script installs 'specific' versions of the required software using 'pip install ==... | <python><google-cloud-platform><pip><airflow><google-cloud-composer-2> | 2023-03-18 19:25:05 | 2 | 1,101 | Karan Alang |
75,777,951 | 15,520,615 | How to access the latest version of Delta table as Integer? | <p>Can someone let me know to convert the following from a Dataframe to an InterType()</p>
<pre><code>df = DeltaTable.forPath(spark, '/mnt/lake/BASE/SQLClassification/cdcTest/dbo/cdcmergetest/1').history().select(max(col("version")).alias("version"))
</code></pre>
<p>I have tried the following</p>
<... | <python><pyspark><delta-lake> | 2023-03-18 18:44:22 | 3 | 3,011 | Patterson |
75,777,829 | 10,673,107 | Python - Translate vertices to a different axis | <p>I am struggling with the following. I have 2 surfaces with the following vertices:</p>
<pre><code># Triangle
[[ 50. 50. 100.]
[100. 0. 0.]
[100. 100. 0.]]
#Square
[[ 0. 100. 0.]
[ 0. 100. 100.]
[100. 100. 0.]
[100. 100. 100.]]
</code></pre>
<p>Now here is how they look in a 3D chart:
<a href="http... | <python> | 2023-03-18 18:19:44 | 1 | 994 | A. Vreeswijk |
75,777,664 | 8,497,979 | Install python 3.10 on Debian 11 WSL to replace default version | <p>I would like to install Python 3.10.10 on my WSL Debian System. In particular I want to install it in the root usr/bin. The idea is that Debian uses python 3.10 as default python. Right now it uses 3.9.</p>
<p>What I tried was:</p>
<ol>
<li><p>install the required dependencies to be able to build Python 3.10 from th... | <python><windows-subsystem-for-linux> | 2023-03-18 17:51:32 | 3 | 1,410 | aerioeus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.