Skip to content

Commit

Permalink
Merge pull request #15 from dwave-examples/add-devcontainer-json
Browse files Browse the repository at this point in the history
Add devcontainer.json
  • Loading branch information
randomir authored Oct 31, 2023
2 parents 3f73460 + ea395d2 commit c2ce3c0
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 5 deletions.
51 changes: 51 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Ocean Development Environment",

// python 3.11 on debian, with latest Ocean and optional packages
// source repo: https://github.com/dwavesystems/ocean-dev-docker
"image": "docker.io/dwavesys/ocean-dev:latest",

// install repo requirements on create and content update
"updateContentCommand": "pip install -r requirements.txt",

// forward/expose container services (relevant only when run locally)
"forwardPorts": [
// dwave-inspector web app
18000, 18001, 18002, 18003, 18004,
// OAuth connect redirect URIs
36000, 36001, 36002, 36003, 36004
],

"portsAttributes": {
"18000-18004": {
"label": "D-Wave Problem Inspector",
"requireLocalPort": true
},
"36000-36004": {
"label": "OAuth 2.0 authorization code redirect URI",
"requireLocalPort": true
}
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"workbench": {
"editorAssociations": {
"*.md": "vscode.markdown.preview.editor"
},
"startupEditor": "readme"
}
},
"extensions": [
"ms-python.python",
"ms-toolsai.jupyter"
]
}
}
}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Open in Leap IDE](
https://cdn-assets.cloud.dwavesys.com/shared/latest/badges/leapide.svg)](
https://ide.dwavesys.io/#https://github.com/dwave-examples/cryptarithmetic)
[![Open in GitHub Codespaces](
https://img.shields.io/badge/Open%20in%20GitHub%20Codespaces-333?logo=github)](
https://codespaces.new/dwave-examples/cryptarithmetic?quickstart=1)
[![Linux/Mac/Windows build status](
https://circleci.com/gh/dwave-examples/cryptarithmetic.svg?style=shield)](
https://circleci.com/gh/dwave-examples/cryptarithmetic)
Expand All @@ -13,15 +13,15 @@ This demo only runs with addition puzzles.
# Usage
To run this demo, execute:
```
python cryptarithm.py path/to/your/file.txt
python cryptarithm.py --filename path/to/your/file.txt
```

For simplicity and to establish convention, ensure all letters are capitalized,
that the puzzle be written on the first line of the file, and that no more than 10 unique letters are used in total.

For example:
```
python cryptarithm.py puzzle_files/example1.txt
python cryptarithm.py --filename puzzle_files/example1.txt
```

Could produce:
Expand Down

0 comments on commit c2ce3c0

Please sign in to comment.