E**(i*pi)=-1 or e**(j*pi)=-1, something I found out in Python using part of Eulers Identit equation.
Well guys and gals I have discovered after all these years that Python does complex numbers without the 'complex()' function or 'cmath' import.
It is well known that Euler's Identity E**(i*pi)+1=0 so I decided to experiment
As you can see within the limitations of the floating point accuracy e**(pi*1j)=-1.
We all live and learn and it also works for Python 1.4.0 for the AMIGA.
Last edited by wisecracker; 12-13-2019 at 03:02 PM..
Reason: Added last two lines.
These 2 Users Gave Thanks to wisecracker For This Post:
Hay, guys,
Any ideas how to calculate like this:
in first file, there're number of lines listing 2+3, 6*9 .......
Then, how to get the result and put them in another file in format:
2+3 5
6*9 54
......
sheerly by shell command, no scripts required. (4 Replies)
Hi,
Is there a way to evaluate an equation contained in a string within an AWK script?
For example:
A = "(5*2)-1" (this equation is read from a file and varies line by line)
In this example, I can't see any way to get an answer of 9 unless I do:
cmd = "awk 'BEGIN{print "A"}'"
cmd |... (3 Replies)
if input to the perl program is ' ( p * ((a+b) * (c+d))) + q ' it shuld give the output as ' pac + pad + pbc + pbd + q ' .can anyone suggest a way to do this ? (7 Replies)
I'm running a MPI program using a cluster of 4 machines(different machines of different processing power,cpu utilization etc.). I'm trying to balance the computation among the machine to get the minimum execution time for that. I tried to balance it by creating a threshold value by taking the load... (1 Reply)
HI All,
I have a script in bash that i want that script will perform action
When the size of a particular folder exceeds the 80%.
Here is an example of script that result is exactly 80% :
#!/bin/bash
CHECK=$(df -h /var/log/syslog | grep '80%' | xargs echo | cut -d' ' -f5)
if ];... (1 Reply)
Below is my code for comparing string for Exact Match found in python.
for word in jdbc_trgt.split(','):
global comp
comp=word.strip();
print "GloBAL:" + comp
fiIn = open('list.txt').readlines()
for lines in fiIn:
print "line1s:" +... (6 Replies)
Hello Forum,
We have two bootstraps of Chef in our environment which are identified by colour:
/var/chef/cache/cookbooks/bootstrap_cookbooks_version_green
and
/var/chef/cache/cookbooks/bootstrap_cookbooks_version_red
I'm attempting to identify which version is installed based on the name... (11 Replies)
Discussion started by: greavette
11 Replies
LEARN ABOUT DEBIAN
pycentral
PYCENTRAL() PYCENTRAL()
NAME
pycentral - register and build utility for Python packages
SYNOPSIS
pycentral [-h] [-v] <cmd> [<cmd options>] [<args>]
DESCRIPTION
pycentral
provides support for installing python modules independent
of the current installed Python version and handling
byte-compilation and -removal tasks in installation scripts.
OPTIONS -v, --version
Limit the output to the version numbers of the python versions.
-h, --help
Print a help text.
pycentral has the following sub commands. For fine grained help, call: pycentral <cmd>.
bccompile
Byte compile .py files in a package.
bcremove
Remove the byte compiled .py files.
list List all managed files.
pkginstall
Make a package available for all supported runtimes.
pkgprepare
Prepare a package for all supported runtimes.
pkgremove
Remove a package installed for all supported runtimes.
pkglist
List pycentral-managed files of a package for all supported runtimes.
rtinstall
Make installed packages available for this runtime.
rtremove
Remove packages installed for this runtime.
updatedefault
Update the default python version.
debhelper
move files to pycentral locaation, variable substitutions (called by dh_pycentral).
pycentraldir <package>
Show the installation directory used by pycentral for <package>.
showdefault
Show default python version number. Deprecated, use pyversions(1)
showsupported
Show the supported python versions. Deprecated, use pyversions(1)
showversions
Show version numbers of supported python versions. Deprecated, use pyversions(1) dh_pycentral, should not be called directly).
version
Show the pycentral version.
FILES
/etc/python/debian_config is searched for the attribute overwrite-local. If set to 1, or True, existing files in
/usr/lib/pythonX.Y/*-packages are overwritten with symbolic links to the pycentral install area. The default is to abort the installation
of a package, when files already exist. This behaviour may be useful, when python libraries were manually installed into this directory.
The attribute byte-compile can be set to a comma separated list of the values standard and optimze to indicate how files should be byte-
compiled.
SEE ALSO pyversions(1), Python policy.
AUTHOR
Matthias Klose
PYCENTRAL()