Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace %env magic with os.environ #284

Merged
merged 1 commit into from
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion week1_intro/crossentropy_method.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"import os\n",
"if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n",
" !bash ../xvfb start\n",
" %env DISPLAY = : 1"
" os.environ['DISPLAY'] = ':1'"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion week1_intro/deep_crossentropy_method.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"import os\n",
"if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n",
" !bash ../xvfb start\n",
" %env DISPLAY = : 1"
" os.environ['DISPLAY'] = ':1'"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion week1_intro/gym_interface.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"import os\n",
"if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\"))==0:\n",
" !bash ../xvfb start\n",
" %env DISPLAY=:1"
" os.environ['DISPLAY'] = ':1'"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion week3_model_free/experience_replay.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"import os\n",
"if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\"))==0:\n",
" !bash ../xvfb start\n",
" %env DISPLAY=:1"
" os.environ['DISPLAY'] = ':1'"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion week3_model_free/qlearning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"import os\n",
"if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\"))==0:\n",
" !bash ../xvfb start\n",
" %env DISPLAY=:1\n",
" os.environ['DISPLAY'] = ':1'\n",
" \n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
Expand Down
2 changes: 1 addition & 1 deletion week3_model_free/sarsa.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"import os\n",
"if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\"))==0:\n",
" !bash ../xvfb start\n",
" %env DISPLAY=:1\n",
" os.environ['DISPLAY'] = ':1'\n",
" \n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
Expand Down
2 changes: 1 addition & 1 deletion week4_approx/dqn_atari.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"import os\n",
"if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\"))==0:\n",
" !bash ../xvfb start\n",
" %env DISPLAY=:1"
" os.environ['DISPLAY'] = ':1'"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion week4_approx/practice_approx_qlearning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"import os\n",
"if os.environ.get(\"DISPLAY\") is not str or len(os.environ.get(\"DISPLAY\"))==0:\n",
" !bash ../xvfb start\n",
" %env DISPLAY=:1"
" os.environ['DISPLAY'] = ':1'"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion week5_policy_based/practice_a3c.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"import os\n",
"if os.environ.get(\"DISPLAY\") is str and len(os.environ.get(\"DISPLAY\"))!=0:\n",
" !bash ../xvfb start\n",
" %env DISPLAY=:1"
" os.environ['DISPLAY'] = ':1'"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion week5_policy_based/practice_reinforce.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"import os\n",
"if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n",
" !bash ../xvfb start\n",
" %env DISPLAY = : 1"
" os.environ['DISPLAY'] = ':1'"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion week6_outro/practice_mcts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"import os\n",
"if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\"))==0:\n",
" !bash ../xvfb start\n",
" %env DISPLAY=:1"
" os.environ['DISPLAY'] = ':1'"
]
},
{
Expand Down