Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Symbolica is a blazing fast computer algebra system for Python and Rust, born of a need to push the boundaries of computations in science and enterprise. Check out the live Jupyter Notebook demo!
For documentation and more, see symbolica.io.
Symbolica allows you to build and manipulate mathematical expressions, for example from a Jupyter Notebook:
You are able to perform these operations from the comfort of a programming language that you (probably) already know, by using Symbolica's bindings to Python and Rust:
Visit the Get Started page for detailed installation instructions.
Symbolica can be installed for Python >3.5 using pip
:
pip install symbolica
If you want to use Symbolica as a library in Rust, simply include it in the Cargo.toml
:
[dependencies]
symbolica = "0.13"
Below we list some examples of the features of Symbolica. Check the guide for a complete overview.
Variables ending with a _
are wildcards that match to any subexpression.
In the following example we try to match the pattern f(w1_,w2_)
:
from symbolica import *
x, y, w1_, w2_, f = S('x','y','w1_','w2_', 'f')
e = f(3,x)*y**2+5
r = e.replace_all(f(w1_,w2_), f(w1_ - 1, w2_**2))
print(r)
which yields y^2*f(2,x^2)+5
.
Solve a linear system in x
and y
with a parameter c
:
from symbolica import *
x, y, c, f = S('x', 'y', 'c', 'f')
x_r, y_r = Expression.solve_linear_system(
[f(c)*x + y + c, y + c**2], [x, y])
print('x =', x_r, ', y =', y_r)
which yields x = (-c+c^2)*f(c)^-1
and y = -c^2
.
Perform a series expansion in x
:
from symbolica import *
e = E('exp(5+x)/(1-x)').series(S('x'), 0, 3)
print(e)
which yields (exp(5))+(2*exp(5))*x+(5/2*exp(5))*x^2+(8/3*exp(5))*x^3+𝒪(x^4)
.
Symbolica is world-class in rational arithmetic, outperforming Mathematica, Maple, Form, Fermat, and other computer algebra packages. Simply convert an expression to a rational polynomial:
from symbolica import *
p = E('(x*y^2*5+5)^2/(2*x+5)+(x+4)/(6*x^2+1)').to_rational_polynomial()
print(p)
which yields (45+13*x+50*x*y^2+152*x^2+25*x^2*y^4+300*x^3*y^2+150*x^4*y^4)/(5+2*x+30*x^2+12*x^3)
.
Follow the development and discussions on Zulip!
FAQs
Symbolica is a blazing fast computer algebra system
We found that symbolica demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.