forked from d2l-ai/d2l-zh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e29a357
commit f4188a0
Showing
8 changed files
with
63 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
dependencies: | ||
- python=3.7 | ||
- pip | ||
- pip: | ||
- .. # d2l | ||
- git+https://github.com/d2l-ai/d2l-book | ||
- mxnet-cu101==1.6.0 | ||
- torchvision | ||
- -f https://download.pytorch.org/whl/torch_stable.html | ||
- torch==1.5.1+cu101 | ||
- tensorflow | ||
- tensorflow-probability | ||
- cloudpickle==1.4.1 # due to https://github.com/tensorflow/probability/issues/991 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
rm -rf _build/rst _build/html | ||
d2lbook build rst --tab all | ||
# cp static/frontpage/frontpage.html _build/rst_all/ | ||
d2lbook build html --tab all | ||
# cp -r static/frontpage/_images/* _build/html/_images/ | ||
|
||
for fn in `find _build/html/_images/ -iname '*.svg' `; do | ||
if [[ $fn == *'qr_'* ]] ; then # || [[ $fn == *'output_'* ]] | ||
continue | ||
fi | ||
# rsvg-convert installed on ubuntu changes unit from px to pt, so evening no | ||
# change of the size makes the svg larger... | ||
rsvg-convert -z 1 -f svg -o tmp.svg $fn | ||
mv tmp.svg $fn | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -ne 2 ]; then | ||
echo "usage:" | ||
echo " $0 store dir" | ||
echo " $0 restore dir" | ||
exit -1 | ||
fi | ||
|
||
cmd=$1 | ||
dir=$2 | ||
saved_dir="${dir///data/_data}" | ||
|
||
if [ $cmd == "store" ]; then | ||
if [ -e $dir ]; then | ||
rm -rf $saved_dir | ||
mv $dir $saved_dir | ||
fi | ||
echo "Saved $dir to $saved_dir" | ||
elif [ $cmd == "restore" ]; then | ||
if [ -e $saved_dir ]; then | ||
rm -rf $dir | ||
mv $saved_dir $dir | ||
fi | ||
echo "Restored $dir from $saved_dir" | ||
else | ||
echo "unknown command $1, should be either store or restore" | ||
exit -1 | ||
fi |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.