Home Applications try_embedded_python

try_embedded_python

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
4.75
2 reviews
0
Awards
402
Views
28
IPM installs
0
2
Details
Releases
Reviews
Issues
Pull requests
Articles
An early attempt to use embedded Python in IRIS 2020.3

What's new in this version

clean docker

This is a first attempt to use Embedded Python in IRIS
The Python code is adapted from solutions for Advent of Code 2020 contest.
Test data are all input to my personal challenge.

Prerequisites

Make sure you have git and Docker desktop installed.

Installation

Clone/git pull this repo into any local directory

$ git clone https://github.com/rcemper/try_embedded_python  

Open the terminal in this directory and run:

$ docker-compose build

this may take some time to complete

Run the IRIS container with this project:

$ docker-compose up -d

How to Test it

Using IRIS terminal:

$ docker-compose exec iris iris session iris "##class(rccpy.AoC20).Run()"

Welcome to embedded Python Demo
select day as described on https://adventofcode.com/
day 0 to exit
day (1..25) [1]:
+++++ starting : day1 +++++++++
select part (1,2,=all,0=skip) [] :1
part 1: 181044
select part (1,2,=all,0=skip) [] :2
part 2: 82660352
select part (1,2,=all,0=skip) [] :0
+++++++++ done : day1 +++++++++
day (1..25) [2]:
+++++ starting : day2 +++++++++
select part (1,2,=all,0=skip) [] :*
part 1: 456
part 2: 308
+++++++++ done : day2 +++++++++
day (1..25) [3]:

Hints

Directory .stream/ contains all my input files and some public test data.
If you want to use your personal input you should replace them as 1 file by day.
e.g. input01.txt, input02.txt,…….. ,input25.txt exactly as downloaded from AOC2020.

%SYS.Python.html is a preliminary class docu to see available functions

run time: for most tests replies are pretty immediate.
But a few tests take quite long time for calculations before showing a reaction.
Don’t get nervous for day 11, 15!!, 17, 19, 22, 23.

Article in DC

Read more
Made with
Install
zpm install try_embedded_python download archive
Version
0.0.405 Nov, 2023
ObjectScript quality test
Category
Technology Example
Works with
InterSystems IRISInterSystems IRIS for Health
First published
19 Jan, 2021
Last checked by moderator
27 Jun, 2023Works