forked from abhishekkrthakur/colabcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolabcode
More file actions
36 lines (29 loc) · 979 Bytes
/
colabcode
File metadata and controls
36 lines (29 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /usr/bin/env python
import argparse
from colabcode import ColabCode
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="ColabCode: Run VS Code On Colab / Kaggle Notebooks"
)
parser._action_groups.pop()
required = parser.add_argument_group("required arguments")
optional = parser.add_argument_group("optional arguments")
required.add_argument(
"--port",
type=int,
help="the port you want to run code-server on",
required=True,
)
optional.add_argument(
"--password",
type=str,
help="password to protect your code-server from unauthorized access",
default=None,
)
optional.add_argument(
"--mount_drive",
action="store_true",
help="if you use --mount_drive, your google drive will be mounted",
)
args = parser.parse_args()
ColabCode(port=args.port, password=args.password, mount_drive=args.mount_drive)