Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wolfram

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wolfram

  • 0.3.0
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

Description

Explore the vast world of computational knowledge available for free via Wolfram's v2 API.

Install

To install this gem:

gem install wolfram

Ruby 2.7 and later are supported; earlier versions may work, but are not supported.

Setup

You'll need a Wolfram Appid (api key) by creating an account here and then clicking on the 'Get an APPID' button.

Once you have your own appid, set it in your shell, preferably in your ~/.bashrc:

export WOLFRAM_APPID='YOURKEY'

If you want to explicitly set your appid in a script:

Wolfram.appid = "YOURKEY"

Usage

Query away on the commandline!

# Calculate distance and travel time between places
wolfram from boston to new york

# Solve an equation
wolfram x^3 - 4x^2 + 6x - 24 = 0

# Find words ending with able
wolfram words ending with able

Regular ruby usage:

query = 'boston population'
result = Wolfram.fetch(query)
# to see the result as a hash of pods and assumptions:
hash = Wolfram::HashPresenter.new(result).to_hash

For many more examples, see here.

Credits

  • Ian White is the original author of this gem.
  • @spaghetticode for HashPresenter
  • @bdigital, @emilesilvis for bug fixes

Todo

  • More tests!
  • A better inspect
  • Handle more api options including format

FAQs

Package last updated on 06 Aug 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc