This file contains hidden or 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
| mkdir juptyer-practice | |
| cd juptyer-practice | |
| echo "create virtualenv step" | |
| python3 -m venv venv | |
| echo "activate virtualenv" | |
| source venv/bin/activate | |
| echo "install dependencies" |
This file contains hidden or 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
| def add1(x): | |
| return x+1 | |
| def double(x): | |
| return x+x | |
| def square(x): | |
| return x*x | |
| funs = [add1, double, square] |
This file contains hidden or 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
| %%%------------------------------------------------------------------- | |
| %%% @author Aaron Lelevier | |
| %%% @doc Practice with Lists in Erlang. It's been about a week since coding up some Erlang | |
| %%% These functions are all in the [lists](http://erlang.org/doc/man/lists.html) module | |
| %%% @end | |
| %%% Created : 27. Sep 2020 2:26 PM | |
| %%%------------------------------------------------------------------- | |
| -module(practice). | |
| -author("Aaron Lelevier"). | |
| -vsn(1.0). |
This file contains hidden or 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
| -------------------------------- MODULE RTOP -------------------------------- | |
| CONSTANT P, R | |
| VARIABLE ptor, rtop | |
| vars == <<ptor, rtop>> | |
| TypeOK == /\ ptor \in [P -> SUBSET R] | |
| /\ rtop \in [R -> SUBSET P] |
OlderNewer