Installing Chocolatey Package Manager

Chocolatey

What is Chocolatey?

Chocolatey is a package manager for Windows 7+.  It allows you to install applications with simple command-line commands. For example:

choco install googlechrome

or

choco install skype

How do I install it?

  1. First, open an administrative Windows PowerShell prompt by doing the following:
    1. Copy the string “powershell start-process powershell -verb runas” to your clipboard.
    2. Press Windows+R
    3. Press Ctrl+V
    4. Press Enter.
  2. Now, copy the entire following block of text:
    Set-ExecutionPolicy Unrestricted
    iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

    Paste into the PowerShell prompt, then press enter.

(Note: it will prompt your permission to proceed. Type Y and press enter.)

How do I use it?

First, visit the Chocolatey Gallery to see the complete list of packages available, and to search for packages.

To install a package, simply type, as I’ve already shown above, something like:

choco install googlechrome
Advertisements

Proving equations with Sage

Recently, I was doing proof-by-induction exercises for a course I was taking.  As a practice problem, I found myself with the following equation:

pbieq.png

So…my next step was to determine whether this equation is true or false. This is easy enough: I could use use basic algebra to expand/factor both sides until they match.

The thing is, I’m lazy.  I’d rather have a program tell me whether or not an equation is true.

Enter Sage—an open-source math library that has a python-based command-line interface. To install it on Ubuntu Linux, I simply ran:

sudo apt install sage

Once installed, you I was able to run sage on the command line; e.g.,

~$ sage
┌─────────────────────────────────────────────────────────────┐
│ SageMath version 7.2, Release Date: 2016-05-15              │
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help.                                     │
└─────────────────────────────────────────────────────────────┘
sage:

I entered the following, to test my equation:

k=var('k')
bool( (k/2)*(3+5*k)+(5*(k+1)-1) == ((k+1)/2)*(3+5*(k+1)) )

The result was:

True