Jython but portable?

2020-07-19 Thread vjp2 . at
How do you use Jython Standalone Jar?

Do you have to "Intall"?

I usually use most standalone jars directly without intalling.  And I want to
use this thing in Portable Apps, so I din't want to install anything.
Because it might end up in my Windows system and I won't know until I try it
at another computer (whish is hard during apandemic).  I've got a lot of java
jars in protable apps that work fine.

i'm trying to use RDKit thru a call like
Java RDKIT.jar;jython.jar -Djava.library.path=/lib/

I probably should post this here, but I've outstayed my welcome on the java ng
asking very stupid questions


- = -
 Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus
  blog: panix.com/~vjp2/ruminatn.htm - = - web:  panix.com/~vjp2/vasos.htm
   facebook.com/vasjpan2 - linkedin.com/in/vasjpan02 -  biostrategist.com
  ---{Nothing herein constitutes advice.  Everything fully disclaimed.}---




-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Seeking to convert a py timer app for my Moto E6

2020-07-19 Thread Steve
Interesting "Declaimed"? (-:

I am still trying to see how this system works.  I do not recall receiving
that comment nor do I recall receiving a copy of the original message as I
did with the second one.
Whatever...

That first message did have a suggestion.
I will check it out.
Thanks


FootNote:
If money does not grow on trees, then why do banks have branches?

-Original Message-
From: Python-list  On
Behalf Of Dennis Lee Bieber
Sent: Saturday, July 18, 2020 12:04 PM
To: [email protected]
Subject: Re: Seeking to convert a py timer app for my Moto E6

On Sat, 18 Jul 2020 00:32:12 -0400, "Steve"  declaimed
the following:



I have nothing new to add to your inquiry other than to confirm that
I distinctly saw the first time you posted it, about a week ago, and that
you did get a response at that time.

https://groups.google.com/forum/#!topic/comp.lang.python/lCJtqyg0tps


-- 
Wulfraed Dennis Lee Bieber AF6VN
[email protected]://wlfraed.microdiversity.freeddns.org/

--
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: A Python installation help doc much more friendly to newcomers? [Was Re: help]

2020-07-19 Thread Mats Wichmann
On 7/18/20 5:02 PM, dn via Python-list wrote:

> - most docs seem to try to be 'all things to all people', whereas the
> differences between platforms inevitably make the writing complicated
> and the reading difficult to follow. Thus, consider separating entries
> by OpSys and/or installation method.

Like https://docs.python.org/3/using/index.html ?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Confused about np.polyfit()

2020-07-19 Thread duncan smith
On 19/07/2020 11:19, Dino wrote:
> 
> Hi, I am looking at someone else's code trying to understand their use
> of numpy.polyfit.
> 
> My understanding was that you can use it to fit polynomials, but
> apparently, the original author has used it for logarithmic and
> exponential curves as well this way:
> 
> Logarithmic
> 
>     def fit_model(self):
>     self.coefficients = np.polyfit(np.log(self.x), self.y, 1)
> 
> Exponential
> 
>     def fit_model(self):
>     self.coefficients = np.polyfit(self.x, np.log(self.y), 1)
> 
> is this an ok use of np.polyfit? Will it yield the expected result.
> 
> Thanks

It depends on what you expect the result to be. There's nothing
inherently wrong with transforming variables before using least squares
fitting. Whether it gives you the "best" estimates for the coefficients
is a different issue.

Duncan
-- 
https://mail.python.org/mailman/listinfo/python-list


Request help w/pip install jq

2020-07-19 Thread Ed Walser
Hi all,

I've tried installing jq several times in my local environment, but it
fails, saying it can't find a file that pip downloads.  Here is the entire
pip output:

(base) C:\Users\edwal>pip install jq

Collecting jq

  Downloading jq-1.0.2.tar.gz (57 kB)

 || 57 kB 703 kB/s

  Installing build dependencies ... done

  Getting requirements to build wheel ... done

Preparing wheel metadata ... done

Building wheels for collected packages: jq

  Building wheel for jq (PEP 517) ... error

  ERROR: Command errored out with exit status 1:

   command: 'C:\Users\edwal\anaconda3\envs\planet1\python.exe'
'C:\Users\edwal\anaconda3\envs\planet1\lib\site-packages\pip\_vendor\pep517\_in_process.py'
build_wheel 'C:\Users\edwal\AppData\Local\Temp\tmpd0skcxv2'

   cwd: C:\Users\edwal\AppData\Local\Temp\pip-install-bwgrrs8c\jq

  Complete output (7 lines):

  running bdist_wheel

  running build

  running build_ext

  Downloading
https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz

  Downloaded
https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz

  Executing: ./configure CFLAGS=-fPIC
--prefix=C:\Users\edwal\AppData\Local\Temp\pip-install-bwgrrs8c\jq\_deps\onig-install-6.9.4

  error: [WinError 2] The system cannot find the file specified

  

  ERROR: Failed building wheel for jq

Failed to build jq

ERROR: Could not build wheels for jq which use PEP 517 and cannot be
installed directly

-- 
Ed Walser
[email protected]
571.364.9618
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Need a Dynamic vlookup using python

2020-07-19 Thread narenchunduri
Any solution possible for this. 
Please let me know
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Request help w/pip install jq

2020-07-19 Thread MRAB

On 2020-07-19 15:46, Ed Walser wrote:

Hi all,

I've tried installing jq several times in my local environment, but it
fails, saying it can't find a file that pip downloads.  Here is the entire
pip output:

(base) C:\Users\edwal>pip install jq

Collecting jq

   Downloading jq-1.0.2.tar.gz (57 kB)

  || 57 kB 703 kB/s

   Installing build dependencies ... done

   Getting requirements to build wheel ... done

 Preparing wheel metadata ... done

Building wheels for collected packages: jq

   Building wheel for jq (PEP 517) ... error

   ERROR: Command errored out with exit status 1:

command: 'C:\Users\edwal\anaconda3\envs\planet1\python.exe'
'C:\Users\edwal\anaconda3\envs\planet1\lib\site-packages\pip\_vendor\pep517\_in_process.py'
build_wheel 'C:\Users\edwal\AppData\Local\Temp\tmpd0skcxv2'

cwd: C:\Users\edwal\AppData\Local\Temp\pip-install-bwgrrs8c\jq

   Complete output (7 lines):

   running bdist_wheel

   running build

   running build_ext

   Downloading
https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz

   Downloaded
https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz

   Executing: ./configure CFLAGS=-fPIC
--prefix=C:\Users\edwal\AppData\Local\Temp\pip-install-bwgrrs8c\jq\_deps\onig-install-6.9.4

   error: [WinError 2] The system cannot find the file specified

   

   ERROR: Failed building wheel for jq

Failed to build jq

ERROR: Could not build wheels for jq which use PEP 517 and cannot be
installed directly

I notice a mention of Anaconda in the traceback. Are you using Anaconda 
instead of the standard Python from python.org?


If so, try using "conda" instead of "pip".
--
https://mail.python.org/mailman/listinfo/python-list


Re: Confused about np.polyfit()

2020-07-19 Thread Richard Damon
On 7/19/20 10:54 AM, duncan smith wrote:
> On 19/07/2020 11:19, Dino wrote:
>> Hi, I am looking at someone else's code trying to understand their use
>> of numpy.polyfit.
>>
>> My understanding was that you can use it to fit polynomials, but
>> apparently, the original author has used it for logarithmic and
>> exponential curves as well this way:
>>
>> Logarithmic
>>
>>     def fit_model(self):
>>     self.coefficients = np.polyfit(np.log(self.x), self.y, 1)
>>
>> Exponential
>>
>>     def fit_model(self):
>>     self.coefficients = np.polyfit(self.x, np.log(self.y), 1)
>>
>> is this an ok use of np.polyfit? Will it yield the expected result.
>>
>> Thanks
> It depends on what you expect the result to be. There's nothing
> inherently wrong with transforming variables before using least squares
> fitting. Whether it gives you the "best" estimates for the coefficients
> is a different issue.
>
> Duncan

Or, to state the results a bit more precisely, the 'Least Squres' fit is
defined as finding the values of the adjustable values that minimizes
the error between the provided 'measured' data, and the fitted curve,
where the error is defined as the (possbily weighted) sum of the square
of the difference between measured value and predicted value.

One very useful property of least squares fitting to a polynomial is
that you can get a closed form set of equations to solve to find the
'optimal' values.

The primary effect of transforming the data before doing the fit is the
error is now defined in terms of the difference of the transformed
values, not the original values. In many cases, this is actually a
reasonable way to define your error, so it works.

-- 
Richard Damon

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Request help w/pip install jq

2020-07-19 Thread Mats Wichmann
On 7/19/20 8:46 AM, Ed Walser wrote:
> Hi all,
> 
> I've tried installing jq several times in my local environment, but it
> fails, saying it can't find a file that pip downloads.  Here is the entire
> pip output:
> 
> (base) C:\Users\edwal>pip install jq

Don't install that way, do:

python -m pip install jq

or, since you seem to be on Windows, if you use the Python Launcher, do:

py -m pip install jq

That won't help your problem, though. Which is:

> Building wheels for collected packages: jq
> 
>   Building wheel for jq (PEP 517) ... error

pip tries to install a wheel first, if it didn't find a suitable one, it
gets the source package (generally called an sdist) and tried to build
it.  This usually fails on Windows, because Windows doesn't come with
compilers by default, and even if installed, often goes awry anyway
because the setups never seem to match.  If people want you to build for
Windows yourself, there will usually be a detailed description of how to
get it set up the right way.

That's the general story.

Now the bad news:

https://pypi.org/project/jq/#files

there are in fact no wheels for Windows here.

And on the main page

https://pypi.org/project/jq/

there is no mention of Windows at all, so the guess would be it's not
supported.

You might search if someone has gotten this working / packaged it for
Anaconda, since you seem to be using that.  If so, you'll want to
install it with the conda command, not pip.  See suitable instructions
within the Anaconda website.


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Confused about np.polyfit()

2020-07-19 Thread duncan smith
On 19/07/2020 16:11, Dino wrote:
> On 7/19/2020 4:54 PM, duncan smith wrote:
>>
>> It depends on what you expect the result to be. There's nothing
>> inherently wrong with transforming variables before using least squares
>> fitting. Whether it gives you the "best" estimates for the coefficients
>> is a different issue.
> 
> Thanks a lot for this, Duncan. I guess I have to follow-up questions at
> this point:
> 
> 1) in which ways is this approach sub-optimal?
> 
> 2) what's the "right" way to do it?
> 
> Thank you
> 

You'll have to read up a bit on ordinary least squares (e.g.
https://en.wikipedia.org/wiki/Ordinary_least_squares). It is based on
assumptions that might not necessarily hold for a given model / dataset.
Depending on which assumptions are violated the estimates can be
affected in different ways. It is usual to fit the model, then check the
residuals to see if the assumptions (approximately) hold. If not, it
might indicate a poor model fit or suggest fitting a transformed model
(to estimate the same coefficients while satisfying the assumptions).
e.g. For the latter case,

Y = a + bX

has the same coefficients as

Y/X = a * 1/X + b

but the latter regression might satisfy the assumption of constant
variance for the errors.

Regression analysis is a bit of an art, and it's a long time since I did
any. Ordinary least squares is optimal in a certain sense when the
assumptions hold. When they don't there's no single answer to what the
best alternative is (unless it's employ a good statistician).

Duncan
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Request help w/pip install jq

2020-07-19 Thread MRAB

On 2020-07-19 17:39, Mats Wichmann wrote:

On 7/19/20 8:46 AM, Ed Walser wrote:

Hi all,

I've tried installing jq several times in my local environment, but it
fails, saying it can't find a file that pip downloads.  Here is the entire
pip output:

(base) C:\Users\edwal>pip install jq


Don't install that way, do:

python -m pip install jq

or, since you seem to be on Windows, if you use the Python Launcher, do:

py -m pip install jq

That won't help your problem, though. Which is:


Building wheels for collected packages: jq

  Building wheel for jq (PEP 517) ... error


pip tries to install a wheel first, if it didn't find a suitable one, it
gets the source package (generally called an sdist) and tried to build
it.  This usually fails on Windows, because Windows doesn't come with
compilers by default, and even if installed, often goes awry anyway
because the setups never seem to match.  If people want you to build for
Windows yourself, there will usually be a detailed description of how to
get it set up the right way.

That's the general story.

Now the bad news:

https://pypi.org/project/jq/#files

there are in fact no wheels for Windows here.

And on the main page

https://pypi.org/project/jq/

there is no mention of Windows at all, so the guess would be it's not
supported.

You might search if someone has gotten this working / packaged it for
Anaconda, since you seem to be using that.  If so, you'll want to
install it with the conda command, not pip.  See suitable instructions
within the Anaconda website.


This page mentions Windows:

https://stedolan.github.io/jq/download/
--
https://mail.python.org/mailman/listinfo/python-list


Re: Request help w/pip install jq

2020-07-19 Thread Mats Wichmann
On 7/19/20 11:42 AM, Dennis Lee Bieber wrote:
> On Sun, 19 Jul 2020 10:39:09 -0600, Mats Wichmann 
> declaimed the following:
> 
>> there is no mention of Windows at all, so the guess would be it's not
>> supported.
>>
>   There is a whole open "issue" for that...
> 
> https://github.com/mwilliamson/jq.py/issues/20
> 
> and given that the last entry was two years ago, by someone asking if
> there'd been any progress... I wouldn't hold out much hope for a
> pre-packaged solution.
> 
>   I also have some problem believing that the install of a different
> package manager allowed an install/build, but it does show up on
> https://chocolatey.org/packages/jq and is a fairly recent version (last
> September).
> 

choco is a fine and useful tool, I use it lots.

but I think what's there is the base jq package, not the Python bindings
which would presumably the topic of interest in a Python mailing list.


-- 
https://mail.python.org/mailman/listinfo/python-list