<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Python</title>
    <description>Dicas de Linguagem Python</description>
    <pubDate>Tue, 21 Apr 2026 16:29:22 +0000</pubDate>
    <lastBuildDate>Tue, 21 Apr 2026 16:29:22 +0000</lastBuildDate>
    <generator>4Each - Forum Progress</generator>
    <link>http://www.4each.com.br/forums/Python/</link>
    <atom:link rel="self" type="application/rss+xml" href="http://www.4each.com.br/forums/Python/index.rss"/>
    <item>
      <title>[Python] Recurrent Neural Networks for Drawing Classification tutorial code doesn't run on...</title>
      <pubDate>Mon, 01 Dec 2025 19:32:28 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-recurrent-neural-networks-for-drawing-classification-tutorial-code-doesnt-run-on.165900/</link>
      <guid>http://www.4each.com.br/threads/python-recurrent-neural-networks-for-drawing-classification-tutorial-code-doesnt-run-on.165900/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[I&#039;m a beginner in deep leaerning and Tensorflow.<br />
<br />
I tried to run the tutorial code for <a href="https://github.com/tensorflow/docs/blob/master/site/en/r1/tutorials/sequences/recurrent_quickdraw.md" target="_blank" class="externalLink" rel="nofollow">Recurrent Neural Networks for Drawing Classification</a> on my computer following the directions written there. But the provided tutorial code file didn&#039;t run on Tensorflow 2.8.0, apparently due to Tensorflow version difference. I upgraded the code using tf_upgrade_v2 to make it compatible with Tensorflow 2. But the updated code still had &#039;tf.contrib&#039; codes, which are not compatible with Tensorflow 2 and have to be mannualy updated. I have no idea how to do it.<br />
<br />
I would appreciate if I could get some advice here on how to update &#039;tf.contrib&#039; parts of the tutorial code manually to run it on Tensorflow 2.<br />
<br />
Here&#039;s the details of what I did. (System: Windows 10 Pro 64-bit, python 3.8.12, Jupyter...<br />
<br />
<a href="http://www.4each.com.br/threads/python-recurrent-neural-networks-for-drawing-classification-tutorial-code-doesnt-run-on.165900/" target="_blank" class="externalLink" rel="nofollow">[Python] Recurrent Neural Networks for Drawing Classification tutorial code doesn&#039;t run on...</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] Pipenv install is not adding dependencies to Pipfile.lock</title>
      <pubDate>Mon, 01 Dec 2025 19:32:28 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-pipenv-install-is-not-adding-dependencies-to-pipfile-lock.165899/</link>
      <guid>http://www.4each.com.br/threads/python-pipenv-install-is-not-adding-dependencies-to-pipfile-lock.165899/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[In the process of converting some projects which are currently managed by requirements.txt files to Pipenv. First, I make a Pipenv environment with the following:<br />
<br />
pipenv --python 3.8<br />
<br />
<br />
Activate the environment with:<br />
<br />
pipenv shell<br />
<br />
<br />
Install an editable package:<br />
<br />
pipenv install -e [package]<br />
<br />
<br />
The issue is that the Pipfile.lock is populated as follows:<br />
<br />
&quot;default&quot;: {<br />
        &quot;package_name&quot;: {<br />
            &quot;editable&quot;: true,<br />
            &quot;path&quot;: &quot;./path/to/package&quot;<br />
        }<br />
    },<br />
<br />
<br />
The Pipfile.lock is meant to contain the information for <b>all</b> dependencies and subdependencies, such that once it is pushed to VCS, another person can replicate the environment, but this does not allow this to happen. I have tried using pipenv lock but it yields the same Pipfile.lock. All the dependencies show up on pip list and the constraints are visible in pipenv freeze. I have upgraded pip to the latest...<br />
<br />
<a href="http://www.4each.com.br/threads/python-pipenv-install-is-not-adding-dependencies-to-pipfile-lock.165899/" target="_blank" class="externalLink" rel="nofollow">[Python] Pipenv install is not adding dependencies to Pipfile.lock</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] How to convert exe back to Python script</title>
      <pubDate>Mon, 01 Dec 2025 19:32:28 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-how-to-convert-exe-back-to-python-script.165898/</link>
      <guid>http://www.4each.com.br/threads/python-how-to-convert-exe-back-to-python-script.165898/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[Recently I converted a .py file to a .exe file.<br />
<br />
I lost the original .py file and I&#039;m left with the exe file. I converted it with pyinstaller.<br />
<br />
Is there any way to reverse this to get my original .py file back?<br />
<br />
<a href="https://stackoverflow.com/questions/51227091/how-to-convert-exe-back-to-python-script" target="_blank" class="externalLink" rel="nofollow">Continue reading...</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] Numpy importing error in mod_wsgi app on Fedora 43</title>
      <pubDate>Mon, 01 Dec 2025 19:32:28 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-numpy-importing-error-in-mod_wsgi-app-on-fedora-43.165897/</link>
      <guid>http://www.4each.com.br/threads/python-numpy-importing-error-in-mod_wsgi-app-on-fedora-43.165897/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[I&#039;m getting an error when importing numpy from an Apache mod_wsgi application on Fedora 43. It does not happen in Rocky Linux 9, the production server.<br />
<br />
app.wsgi:<br />
<br />
import sys<br />
sys.path.insert(0, &#039;/var/www/html/test/&#039;)<br />
from test import application<br />
<br />
<br />
test.py:<br />
<br />
import numpy<br />
<br />
def application(environ, start_response):<br />
    status = &#039;200 OK&#039;<br />
    output = b&#039;Hello World!&#039;<br />
<br />
    response_headers = [(&#039;Content-type&#039;, &#039;text/plain&#039;),<br />
                            (&#039;Content-Length&#039;, str(len(output)))]<br />
    start_response(status, response_headers)<br />
<br />
    return [output]<br />
<br />
<br />
Error log:<br />
<br />
mod_wsgi (pid=187553): Failed to exec Python script file &#039;/var/www/html/test/app.wsgi&#039;.<br />
mod_wsgi (pid=187553): Exception occurred processing WSGI script &#039;/var/www/html/test/app.wsgi&#039;.<br />
Traceback (most recent call last):<br />
  File &quot;/var/www/html/test/venv/lib64/python3.14/site-packages/numpy/_core/__init__.py&quot;, line 22, in &lt;module&gt;...<br />
<br />
<a href="http://www.4each.com.br/threads/python-numpy-importing-error-in-mod_wsgi-app-on-fedora-43.165897/" target="_blank" class="externalLink" rel="nofollow">[Python] Numpy importing error in mod_wsgi app on Fedora 43</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] trinket.io TypeError "unexpected keyword argument 'shape'"</title>
      <pubDate>Mon, 01 Dec 2025 19:32:28 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-trinket-io-typeerror-unexpected-keyword-argument-shape.165896/</link>
      <guid>http://www.4each.com.br/threads/python-trinket-io-typeerror-unexpected-keyword-argument-shape.165896/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[I&#039;m trying to move pieces of a high school comp sci project to trinket and I keep getting the following error:<br />
<br />
TypeError: &lt;native JS&gt;() got an unexpected keyword argument &#039;shape&#039; on line __ in main.py<br />
<br />
<br />
Here&#039;s the link to the full code: <a href="https://trinket.io/python/cd9569bd2760" target="_blank" class="externalLink" rel="nofollow">https://trinket.io/python/cd9569bd2760</a><br />
<br />
Example error:<br />
<br />
TypeError: &lt;native JS&gt;() got an unexpected keyword argument &#039;shape&#039; on line 98 in main.py<br />
<br />
<br />
The block below includes lines 95 to 101. The shape keyword keeps giving me trouble.<br />
<br />
elif rand_index == 2:<br />
    wn.addshape(turtle_image)<br />
    print(&quot;Your new friend is a turtle!&quot;)<br />
    animal = trtl.Turtle(shape = turtle_image)<br />
    animal.penup()<br />
    favorite_food = &quot;fruit.gif&quot;<br />
    wn.update()  # Show the graphics<br />
<br />
<br />
I&#039;ve defined turtle_image in the following block:<br />
<br />
#---image initialization---<br />
axolotl_image = &quot;axolotl2.gif&quot; <br />
blobfish_image = &quot;blobfish.gif&quot;<br />
dolphin_image = &quot;dolphin.gif&quot;...<br />
<br />
<a href="http://www.4each.com.br/threads/python-trinket-io-typeerror-unexpected-keyword-argument-shape.165896/" target="_blank" class="externalLink" rel="nofollow">[Python] trinket.io TypeError &quot;unexpected keyword argument &#039;shape&#039;&quot;</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] OCaml mod function returns different result compared with %</title>
      <pubDate>Mon, 01 Dec 2025 17:12:27 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-ocaml-mod-function-returns-different-result-compared-with.165876/</link>
      <guid>http://www.4each.com.br/threads/python-ocaml-mod-function-returns-different-result-compared-with.165876/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[The modulo function in <b>OCaml</b> mod return results different when compared with the modulo operator in <b>python</b>.<br />
<br />
<b>OCaml:</b><br />
<br />
# -1 mod 4<br />
- : int = -1<br />
<br />
<br />
<b>Python:</b><br />
<br />
&gt;&gt;&gt; -1 % 4<br />
3<br />
<br />
<br />
Why are the result different?.<br />
<br />
Is there any standard module function that operate as % in OCaml?.<br />
<br />
<a href="https://stackoverflow.com/questions/46758683/ocaml-mod-function-returns-different-result-compared-with" target="_blank" class="externalLink" rel="nofollow">Continue reading...</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] How do I check if a string represents a number (float or int)?</title>
      <pubDate>Mon, 01 Dec 2025 17:12:27 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-how-do-i-check-if-a-string-represents-a-number-float-or-int.165875/</link>
      <guid>http://www.4each.com.br/threads/python-how-do-i-check-if-a-string-represents-a-number-float-or-int.165875/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[How do I check if a string represents a numeric value in Python?<br />
<br />
def is_number(s):<br />
    try:<br />
        float(s)<br />
        return True<br />
    except ValueError:<br />
        return False<br />
<br />
<br />
The above works, but it seems clunky.<br />
<br />
<br />
<b>Editor&#039;s note:</b> If what you are testing comes from user input, it is <i>still</i> a string even if it <i>represents</i> an int or a float. For converting the input, see <a href="https://stackoverflow.com/questions/20449427/" target="_blank" class="externalLink" rel="nofollow">How can I read inputs as numbers?</a> For ensuring that the input represents an int or float (or other requirements) before proceeding, see <a href="https://stackoverflow.com/questions/23294658/" target="_blank" class="externalLink" rel="nofollow">Asking the user for input until they give a valid response</a><br />
<br />
<a href="https://stackoverflow.com/questions/354038/how-do-i-check-if-a-string-represents-a-number-float-or-int" target="_blank" class="externalLink" rel="nofollow">Continue reading...</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] How do I efficiently check if any value in a list of dictionaries matches a given...</title>
      <pubDate>Mon, 01 Dec 2025 17:12:27 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-how-do-i-efficiently-check-if-any-value-in-a-list-of-dictionaries-matches-a-given.165874/</link>
      <guid>http://www.4each.com.br/threads/python-how-do-i-efficiently-check-if-any-value-in-a-list-of-dictionaries-matches-a-given.165874/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[data = [<br />
    {&quot;id&quot;: 1, &quot;name&quot;: &quot;Alice&quot;, &quot;active&quot;: True},<br />
    {&quot;id&quot;: 2, &quot;name&quot;: &quot;Bob&quot;, &quot;active&quot;: False},<br />
    {&quot;id&quot;: 3, &quot;name&quot;: &quot;Charlie&quot;, &quot;active&quot;: True},<br />
]<br />
<br />
<br />
I want to check if any dictionary in the list has &quot;active&quot;: True without looping manually using for.<br />
<br />
Is there a more Pythonic or efficient way to do this?<br />
<br />
<a href="https://stackoverflow.com/questions/79834959/how-do-i-efficiently-check-if-any-value-in-a-list-of-dictionaries-matches-a-give" target="_blank" class="externalLink" rel="nofollow">Continue reading...</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] Strange Output in VSCode with Python 3.12.3: Unusual Characters and File Paths</title>
      <pubDate>Mon, 01 Dec 2025 17:12:27 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-strange-output-in-vscode-with-python-3-12-3-unusual-characters-and-file-paths.165873/</link>
      <guid>http://www.4each.com.br/threads/python-strange-output-in-vscode-with-python-3-12-3-unusual-characters-and-file-paths.165873/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[I&#039;m encountering a peculiar issue while running Python code in Visual Studio Code (VSCode) with Python 3.12.3. When I execute a simple print(&quot;Hello&quot;) statement, the output in the VSCode terminal includes strange characters and file paths that seem to be mangled. Here&#039;s an example of the output I&#039;m seeing:<br />
<br />
<div style="padding-left: 30px"><br />
PS C:\Users\DELL&gt; c:; cd &#039;c:\Users\DELL&#039;; &amp; &#039;c:\Users\DELL\AppData\Local\Programs\Python\Python312\python.exe&#039; &#039;c:\Users\DELL.vscode\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher&#039; &#039;60081&#039; &#039;--&#039; &#039;C:\Users\DELL\Untitled-1.py&#039; cadapter/../..\x5cdebugpy\x5clauncher&#039; &#039;60081&#039; &#039;--&#039; &#039;C:\x5cUsers\x5cDELL\x5cUntitled-1.py&#039; ;c75f735e-9e3e-45a8-b2bb-65c86727b88bLOL<br />
&#8203;</div><br />
I&#039;ve tried checking for escape characters in my code, ensuring correct file path handling, and updating both VSCode and Python to their latest versions. However,...<br />
<br />
<a href="http://www.4each.com.br/threads/python-strange-output-in-vscode-with-python-3-12-3-unusual-characters-and-file-paths.165873/" target="_blank" class="externalLink" rel="nofollow">[Python] Strange Output in VSCode with Python 3.12.3: Unusual Characters and File Paths</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] Filter a pandas df: per group, keep only non-null rows if we have them, else keep a...</title>
      <pubDate>Mon, 01 Dec 2025 17:12:27 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-filter-a-pandas-df-per-group-keep-only-non-null-rows-if-we-have-them-else-keep-a.165872/</link>
      <guid>http://www.4each.com.br/threads/python-filter-a-pandas-df-per-group-keep-only-non-null-rows-if-we-have-them-else-keep-a.165872/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[Hopefully the title is reasonably intuitive, edits welcome. Say I have this dataframe:<br />
<br />
df = pd.DataFrame({&#039;x&#039;: [&#039;A&#039;, &#039;B&#039;, &#039;B&#039;, &#039;C&#039;, &#039;C&#039;, &#039;C&#039;, &#039;D&#039;, &#039;D&#039;],<br />
                   &#039;y&#039;: [None, None, 1, 2, 3, 4, None, None]})<br />
<br />
    x   y<br />
0   A   NaN<br />
1   B   NaN<br />
2   B   1.0<br />
3   C   2.0<br />
4   C   3.0<br />
5   C   4.0<br />
6   D   NaN<br />
7   D   NaN<br />
<br />
<br />
Per grouping variable, x in this case, I want to keep:<br />
<br />
<ul>
<li>only the rows where y is not None if any non-null values exist</li>
<li>a single row to represent x in the case that all y is None</li>
</ul><br />
That is: keep A (only one null row), only non-null B, all of C, and one row for D<br />
<br />
Here is one approach:<br />
<br />
pd.concat([<br />
    df.groupby(&#039;x&#039;).filter(lambda x: any(x[&#039;y&#039;].notna())).dropna(),<br />
    df.groupby(&#039;x&#039;).filter(lambda x: all(x[&#039;y&#039;].isna())).drop_duplicates()<br />
])<br />
<br />
    x   y<br />
2   B   1.0<br />
3   C   2.0<br />
4   C   3.0<br />
5   C   4.0<br />
0   A   NaN<br />
6   D   NaN<br />
<br />
<br />
I could also drop NAs...<br />
<br />
<a href="http://www.4each.com.br/threads/python-filter-a-pandas-df-per-group-keep-only-non-null-rows-if-we-have-them-else-keep-a.165872/" target="_blank" class="externalLink" rel="nofollow">[Python] Filter a pandas df: per group, keep only non-null rows if we have them, else keep a...</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] Snowflake SPCS Multi Model Training - 403 Errors After some time</title>
      <pubDate>Mon, 01 Dec 2025 16:22:22 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-snowflake-spcs-multi-model-training-403-errors-after-some-time.165867/</link>
      <guid>http://www.4each.com.br/threads/python-snowflake-spcs-multi-model-training-403-errors-after-some-time.165867/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[I am attempting to run a long running training job leveraging snowflakes distributed multi model training functionality. Using a sample of my training data (~100k rows) this process completes with no issues. However when expanding to the entire training set (~150M rows) I start to run into 403 errors across the later processed partitions in my dataset. These errors occur around the 6hr mark of training, partitions that were trained earlier have no issues.<br />
<br />
The following exceptions are thrown which are the same for every failed partition<br />
<br />
An exception was raised from a task of operator &quot;ReadResultSetDataSource-&gt;SplitBlocks(2)&quot;. Dataset execution will now abort. To ignore this exception and continue, set DataContext.max_errored_blocks.<br />
Traceback (most recent call last):<br />
  File...<br />
<br />
<a href="http://www.4each.com.br/threads/python-snowflake-spcs-multi-model-training-403-errors-after-some-time.165867/" target="_blank" class="externalLink" rel="nofollow">[Python] Snowflake SPCS Multi Model Training - 403 Errors After some time</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] Finding first and last index of some value in a list in Python</title>
      <pubDate>Mon, 01 Dec 2025 16:22:22 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-finding-first-and-last-index-of-some-value-in-a-list-in-python.165866/</link>
      <guid>http://www.4each.com.br/threads/python-finding-first-and-last-index-of-some-value-in-a-list-in-python.165866/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[Is there any built-in methods that are part of lists that would give me the first and last index of some value, like:<br />
<br />
verts.IndexOf(12.345)<br />
verts.LastIndexOf(12.345)<br />
<br />
<a href="https://stackoverflow.com/questions/522372/finding-first-and-last-index-of-some-value-in-a-list-in-python" target="_blank" class="externalLink" rel="nofollow">Continue reading...</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] Can't show Cv2 frame in pyqt6 QLabel pixmap</title>
      <pubDate>Mon, 01 Dec 2025 16:22:22 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-cant-show-cv2-frame-in-pyqt6-qlabel-pixmap.165865/</link>
      <guid>http://www.4each.com.br/threads/python-cant-show-cv2-frame-in-pyqt6-qlabel-pixmap.165865/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[I am trying to show a video feed from a camera captured using cv2 in a PyQt6 window. I have done some experimenting and followed a few guides to create the code included below. It creates the window in question and includes the camera text label but nothing shows up in the label with the pixmap applied.<br />
<br />
import cv2<br />
import numpy as np<br />
from PyQt6.QtCore import Qt, QThread, pyqtSignal, pyqtSlot<br />
from PyQt6.QtGui import QImage, QPixmap<br />
from PyQt6.QtWidgets import QGridLayout, QLabel, QWidget<br />
<br />
<br />
#Creates Thread to hold video updating to ensure other GUI operations can still run<br />
class VideoThread(QThread):<br />
    #Declares Signal linked to ndarray<br />
    update_frame_signal = pyqtSignal(np.ndarray)<br />
<br />
    def __init__(self, index:int = 0):<br />
        #Adds Camera Index for use in later steps<br />
        super().__init__()<br />
        self.index = index<br />
<br />
    #When Thread is run loads a video feed from specified...<br />
<br />
<a href="http://www.4each.com.br/threads/python-cant-show-cv2-frame-in-pyqt6-qlabel-pixmap.165865/" target="_blank" class="externalLink" rel="nofollow">[Python] Can&#039;t show Cv2 frame in pyqt6 QLabel pixmap</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] How to delete items from a dictionary while iterating over it?</title>
      <pubDate>Mon, 01 Dec 2025 16:22:22 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-how-to-delete-items-from-a-dictionary-while-iterating-over-it.165864/</link>
      <guid>http://www.4each.com.br/threads/python-how-to-delete-items-from-a-dictionary-while-iterating-over-it.165864/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[Can I delete items from a dictionary in Python while iterating over it?<br />
<br />
I want to remove elements that don&#039;t meet a certain condition from the dictionary, instead of creating an entirely new dictionary. Is the following a good solution, or are there better ways?<br />
<br />
for k, v in mydict.items():<br />
    if k == val:<br />
        del mydict[k]<br />
<br />
<a href="https://stackoverflow.com/questions/5384914/how-to-delete-items-from-a-dictionary-while-iterating-over-it" target="_blank" class="externalLink" rel="nofollow">Continue reading...</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] Polars lazyframe update() silently failing in a serverless Cloud Function (OOM error)</title>
      <pubDate>Mon, 01 Dec 2025 16:22:22 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-polars-lazyframe-update-silently-failing-in-a-serverless-cloud-function-oom-error.165863/</link>
      <guid>http://www.4each.com.br/threads/python-polars-lazyframe-update-silently-failing-in-a-serverless-cloud-function-oom-error.165863/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[I am trying to apply changes from one dataframe (source file is a 7 MB .CSV) to a larger dataframe (source file approx. 3GB .CSV), e.g. update existing rows with matching IDs, while at the same time adding new rows with no pre-existing ID in the larger dataframe. I believe the correct way to do this is to use the Polars <a href="https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.update.html#polars-dataframe-update" target="_blank" class="externalLink" rel="nofollow">update() method with the &quot;how&quot; strategy set to &quot;full&quot;</a>.<br />
<br />
Unfortunately, this works fine testing on my local machine but silently fails in a Cloud Function environment even with the container configured for 8G RAM.<br />
<br />
I am using <a href="https://docs.pola.rs/api/python/dev/reference/api/polars.scan_csv.html" target="_blank" class="externalLink" rel="nofollow">scan_csv()</a> with infer_schema=False to get LazyFrames (with only strings) of the two datasets before calling update(), and tried logging...<br />
<br />
<a href="http://www.4each.com.br/threads/python-polars-lazyframe-update-silently-failing-in-a-serverless-cloud-function-oom-error.165863/" target="_blank" class="externalLink" rel="nofollow">[Python] Polars lazyframe update() silently failing in a serverless Cloud Function (OOM error)</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] I need to validate a word is infact an english word [closed]</title>
      <pubDate>Mon, 01 Dec 2025 13:52:15 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-i-need-to-validate-a-word-is-infact-an-english-word-closed.165849/</link>
      <guid>http://www.4each.com.br/threads/python-i-need-to-validate-a-word-is-infact-an-english-word-closed.165849/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[hello i am trying to make some sort of scrabble like game on python and i was wondering is there prebuilt programs that can already validate if a word is a proper word on python I&#039;ve heard of enchant but that is apparently no longer working?<br />
<br />
<a href="https://stackoverflow.com/questions/79834804/i-need-to-validate-a-word-is-infact-an-english-word" target="_blank" class="externalLink" rel="nofollow">Continue reading...</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] How to run Odoo 8 along with Odoo 9?</title>
      <pubDate>Mon, 01 Dec 2025 13:52:15 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-how-to-run-odoo-8-along-with-odoo-9.165848/</link>
      <guid>http://www.4each.com.br/threads/python-how-to-run-odoo-8-along-with-odoo-9.165848/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[I have installed both Odoo 8.0 and 9.0. I have the Odoo 8.0 working fine on port 8069 but when I installed Odoo 9.0 and got it working on port 8070, Odoo 8.0 now throws 500 server error.<br />
<br />
I tried to reinstall Odoo 8.0 from start, but this time using virtualenv so it does not conflict with the dependencies of Odoo 9.0, but running it using:<br />
<br />
(Odoo8venv)user@domain:~/Odoo8venv/bin/python ~/odoo-8.0/odoo.py -c ~/odoo-dev/custom.conf<br />
<br />
<br />
Still throws error:<br />
<br />
2015-11-20 01:32:50,660 6772 ERROR test openerp.modules.graph: module website_partner: Unmet dependencies: website<br />
2015-11-20 01:32:50,660 6772 ERROR test openerp.modules.graph: module portal: Unmet dependencies: share, auth_signup<br />
2015-11-20 01:32:50,660 6772 WARNING test openerp.modules.graph: Some modules were not loaded.<br />
<br />
<br />
I think it is because Odoo 8.0 sees the databases created using Odoo 9.0. Should I create a new postgresql server...<br />
<br />
<a href="http://www.4each.com.br/threads/python-how-to-run-odoo-8-along-with-odoo-9.165848/" target="_blank" class="externalLink" rel="nofollow">[Python] How to run Odoo 8 along with Odoo 9?</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] Why LoRA Shows 1.4B Trainable Params Instead of 38M When Fine-Tuning Gemma 3 4B?...</title>
      <pubDate>Mon, 01 Dec 2025 13:52:15 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-why-lora-shows-1-4b-trainable-params-instead-of-38m-when-fine-tuning-gemma-3-4b.165847/</link>
      <guid>http://www.4each.com.br/threads/python-why-lora-shows-1-4b-trainable-params-instead-of-38m-when-fine-tuning-gemma-3-4b.165847/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[I found a code snippet for fine-tuning the Gemma-3 4B model on an OCR dataset that converts handwritten math formulas into LaTeX. The original author shared their results showing about **38 million trainable parameters** when using LoRA.<br />
<br />
I copied the code exactly — without modifying even a single line — and ran it on Google Colab using the Unsloth library for LoRA fine-tuning. However, during training, it reports **1.4 billion trainable parameters** instead of 38 million.<br />
<br />
I’m not sure why this huge difference is happening, especially since the code is identical to the original. Does anyone know what might be causing this mismatch?<br />
<br />
<a href="https://stackoverflow.com/questions/79834675/why-lora-shows-1-4b-trainable-params-instead-of-38m-when-fine-tuning-gemma-3-4b" target="_blank" class="externalLink" rel="nofollow">Continue reading...</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] Why different files produce same GNSS plots in my Python code?</title>
      <pubDate>Mon, 01 Dec 2025 13:52:15 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-why-different-files-produce-same-gnss-plots-in-my-python-code.165846/</link>
      <guid>http://www.4each.com.br/threads/python-why-different-files-produce-same-gnss-plots-in-my-python-code.165846/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[I wrote a piece of Python code to read different GPS observation files (.24o) and navigation files (.24p), and generate polar plots of satellite trajectories. It is hoped that the RINEX file can be parsed and the sky plot of GNSS satellite positions can be drawn.<br />
<br />
However, in actual operation, even when completely different .24o and .24p files are input, the final output satellite position sky maps are almost exactly the same.<br />
<br />
Python version: 3.11.9<br />
<br />
Dependency library: numpy2.2.6; matplotlib: 3.10.7; cssrlib: 2021.08.21<br />
<br />
Operating system: Windows11<br />
<br />
I have tried to print the file_seed value to confirm that the filE_seeds generated by different files are indeed different (for example, the seed of file A is 0.123456, and the seed of file B is 0.789012),also check the track parameters by printing the a/e/i0 values of the same PRN in different files, and find that the differences are...<br />
<br />
<a href="http://www.4each.com.br/threads/python-why-different-files-produce-same-gnss-plots-in-my-python-code.165846/" target="_blank" class="externalLink" rel="nofollow">[Python] Why different files produce same GNSS plots in my Python code?</a>]]></content:encoded>
    </item>
    <item>
      <title>[Python] How to install pywinrm</title>
      <pubDate>Mon, 01 Dec 2025 13:52:15 +0000</pubDate>
      <link>http://www.4each.com.br/threads/python-how-to-install-pywinrm.165845/</link>
      <guid>http://www.4each.com.br/threads/python-how-to-install-pywinrm.165845/</guid>
      <author>Stack</author>
      <dc:creator>Stack</dc:creator>
      <content:encoded><![CDATA[I am running centos6 Python 2.6 and am trying to install pywinrm but not am not successful. I have also tried:<br />
<br />
pip install <a href="http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm" target="_blank" class="externalLink" rel="nofollow">http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm</a><br />
<br />
<br />
but the link is broken (archive folder removed)<br />
<br />
Installed Packages<br />
<br />
python.x86_64       2.6.6-64.el6        @anaconda-CentOS-201508042137.x86_64/6.7<br />
<br />
<br />
The pip install shows the following:<br />
<br />
[root@linux-s3-vm1 ~]# pip install pywinrm<br />
Collecting pywinrm<br />
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by &#039;ProtocolError(&#039;Connection aborted.&#039;, gaierror(-3, &#039;Temporary failure in name resolution&#039;))&#039;: /simple/pywinrm/<br />
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by &#039;ProtocolError(&#039;Connection aborted.&#039;, gaierror(-3, &#039;Temporary failure in name resolution&#039;))&#039;: /simple/pywinrm/...<br />
<br />
<a href="http://www.4each.com.br/threads/python-how-to-install-pywinrm.165845/" target="_blank" class="externalLink" rel="nofollow">[Python] How to install pywinrm</a>]]></content:encoded>
    </item>
  </channel>
</rss>
