Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: p[0] mysteriouly set to 0
Post: RE: p[0] mysteriouly set to 0

I think I found it. I should initialize p=[1.0,1.0[ so it thinks p is an array of float values.
pnachtwey General Coding Help 2 268 Feb-21-2024, 04:18 AM
  Bug Thread: p[0] mysteriouly set to 0
Post: p[0] mysteriouly set to 0

import numpy as np alpha = 0.1 h=0.000001 ftol = 1e-12 def f(p): _sum = 0 # simple sum of x and y squared for i in range(len(p)): _sum += p[i]**2 retur...
pnachtwey General Coding Help 2 268 Feb-21-2024, 03:39 AM
    Thread: PowerShell script file for updating packages
Post: RE: PowerShell script file for updating packages

Everything had to change because now the outdated files must be exported as a .json file. The good part is that there is a file name, old version, new version and sdist/wheel entry for each --outdate...
pnachtwey Code sharing 8 3,284 Feb-18-2024, 10:26 PM
    Thread: PowerShell script file for updating packages
Post: RE: PowerShell script file for updating packages

I ran into a problem. Some how I have a new package that shouldn't be updated. I need to add --exclude charset_normalized. This caused an error so req0.txt was blank and nothing got updated. Any id...
pnachtwey Code sharing 8 3,284 Jun-21-2022, 04:02 AM
    Thread: PowerShell script file for updating packages
Post: RE: PowerShell script file for updating packages

(Jun-19-2022, 02:50 AM)pnachtwey Wrote: [quote="Gribouillis" pid='158393' dateline='1655357364'] If you mean in the pip command line, you could replace it by something like from pathlib import Path ...
pnachtwey Code sharing 8 3,284 Jun-20-2022, 05:53 PM
    Thread: PowerShell script file for updating packages
Post: RE: PowerShell script file for updating packages

(Jun-19-2022, 02:50 AM)pnachtwey Wrote: (Jun-16-2022, 05:29 AM)Gribouillis Wrote: If you mean in the pip command line, you could replace it by something like from pathlib import Path import subpro...
pnachtwey Code sharing 8 3,284 Jun-20-2022, 05:51 PM
    Thread: PowerShell script file for updating packages
Post: RE: PowerShell script file for updating packages

(Jun-16-2022, 05:29 AM)Gribouillis Wrote: (Jun-16-2022, 03:47 AM)pnachtwey Wrote: I will need to have an easy way of excluding the problem packagesIf you mean in the pip command line, you could re...
pnachtwey Code sharing 8 3,284 Jun-19-2022, 02:50 AM
    Thread: PowerShell script file for updating packages
Post: RE: PowerShell script file for updating packages

(Jun-10-2022, 04:32 AM)Gribouillis Wrote: Why not turn this into a Python script? It could become multiplatform. Also a few comments to explain why it does what it does would be welcome.Good idea. ...
pnachtwey Code sharing 8 3,284 Jun-16-2022, 03:47 AM
    Thread: PowerShell script file for updating packages
Post: PowerShell script file for updating packages

I have excluded some problem packages. pip list --outdated --exclude idna --exclude mistune --exclude tomli --format=freeze --user > req0.txt $content = Get-Content -Path 'req0.txt' $newC...
pnachtwey Code sharing 8 3,284 Jun-10-2022, 03:21 AM
    Thread: Passing on values
Post: RE: Passing on values

Use the particl() function. here is an example from my code helpmenu.add_command(label="About...", command=partial(show_about, root)) show_about() is a function like your callback() function. root is ...
pnachtwey GUI 4 3,556 Oct-25-2020, 05:26 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020