File tree 3 files changed +56
-0
lines changed
3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -16,3 +16,9 @@ __debug_bin
16
16
.idea /workspace.xml
17
17
18
18
dist /
19
+
20
+ venv /
21
+ iwolfram /
22
+ expreduce_for_jupyter
23
+ .ipynb_checkpoints /
24
+ * .ipynb
Original file line number Diff line number Diff line change @@ -122,6 +122,10 @@ func (es *EvalState) Init(loadAllDefs bool) {
122
122
es .MarkSeen ("System`TeXForm" )
123
123
es .MarkSeen ("System`OutputForm" )
124
124
es .MarkSeen ("System`FullForm" )
125
+ // Just a hack so that we can use
126
+ // https://github.com/mmatera/iwolfram/blob/76fae74c5f1d733f02be7d2cfe2617bc48c7111e/wolfram_kernel/init.m#L220
127
+ // easily. Not an actual symbol.
128
+ es .MarkSeen ("System`ShowForm" )
125
129
es .MarkSeen ("System`TraditionalForm" )
126
130
es .MarkSeen ("System`StandardForm" )
127
131
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ echo " Building Expreduce kernel..."
6
+ go build -o expreduce_for_jupyter
7
+
8
+ # Set the virtual environment directory
9
+ VENV_DIR=" venv"
10
+
11
+ # Check if the virtual environment exists
12
+ if [ ! -d " $VENV_DIR " ]; then
13
+ echo " Creating virtual environment..."
14
+ python3 -m venv " $VENV_DIR "
15
+ fi
16
+
17
+ # Activate the virtual environment
18
+ source " $VENV_DIR /bin/activate"
19
+
20
+ # Upgrade pip
21
+ echo " Upgrading pip..."
22
+ pip install --upgrade pip
23
+
24
+ pip install nbclassic
25
+
26
+ # Install Jupyter if not already installed
27
+ if ! pip show jupyter > /dev/null 2>&1 ; then
28
+ echo " Installing Jupyter..."
29
+ pip install notebook
30
+ fi
31
+
32
+ pip install setuptools
33
+
34
+ pip install metakernel --upgrade
35
+
36
+ # TODO(corywalker): Switch back to upstream once pull requests are merged.
37
+ [ -d " iwolfram" ] || git clone https://github.com/corywalker/iwolfram.git
38
+ cd iwolfram
39
+ python setup.py install --mma-exec ../expreduce_for_jupyter
40
+
41
+ # Run Jupyter Notebook
42
+ echo " Starting Jupyter Notebook..."
43
+ jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser
44
+
45
+ # Deactivate the virtual environment on exit
46
+ deactivate
You can’t perform that action at this time.
0 commit comments