Toggle navigation
Toggle navigation
This project
Loading...
Sign in
graykode
/
commit-autosuggestions
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
graykode
2020-12-02 00:12:28 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
368b902c0c77300c2bb06a19fdeb605db46c789f
368b902c
1 parent
148d947d
(refactor) remove output in google colab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
41 deletions
commit_autosuggestions.ipynb
commit_autosuggestions.ipynb
View file @
368b902
...
...
@@ -3,7 +3,7 @@
"nbformat_minor"
:
0
,
"metadata"
:
{
"colab"
:
{
"name"
:
"commit-
autosuggestions.ipynb"
,
"name"
:
"commit_
autosuggestions.ipynb"
,
"provenance"
:
[],
"collapsed_sections"
:
[],
"toc_visible"
:
true
...
...
@@ -124,9 +124,9 @@
},
"source"
:
[
"# Paste your authtoken here in quotes
\n
"
,
"authtoken =
\"
21KfrFEW1BptdPPM4SS_7s1Z4HwozyXX9NP2fHC12
\"
"
"authtoken =
\"
1kskZgJ8KpCRvYnzSF63AcodvBr_4RMXxFo4Sa2qLrRaKjhJW
\"
"
],
"execution_count"
:
null
,
"execution_count"
:
5
,
"outputs"
:
[]
},
{
...
...
@@ -161,7 +161,7 @@
"local_in_port = 5000
\n
"
,
"local_out_port = 5000"
],
"execution_count"
:
null
,
"execution_count"
:
6
,
"outputs"
:
[]
},
{
...
...
@@ -187,26 +187,14 @@
"with open('ngrok.conf', 'w') as f:
\n
"
,
" f.write(config)"
],
"execution_count"
:
1
,
"outputs"
:
[
{
"output_type"
:
"error"
,
"ename"
:
"NameError"
,
"evalue"
:
"name 'authtoken' is not defined"
,
"traceback"
:
[
"
\u
001b[1;31m---------------------------------------------------------------------------
\u
001b[0m"
,
"
\u
001b[1;31mNameError
\u
001b[0m Traceback (most recent call last)"
,
"
\u
001b[1;32m<ipython-input-1-7305b3f78ded>
\u
001b[0m in
\u
001b[0;36m<module>
\u
001b[1;34m
\u
001b[0m
\n\u
001b[0;32m 1
\u
001b[0m
\u
001b[0mconfig
\u
001b[0m
\u
001b[1;33m=
\u
001b[0m
\u
001b[0;31m
\\\u
001b[0m
\u
001b[1;33m
\u
001b[0m
\u
001b[1;33m
\u
001b[0m
\u
001b[0m
\n\u
001b[0;32m 2
\u
001b[0m f
\"\"\"\n\u
001b[1;32m----> 3
\u
001b[1;33m
\u
001b[0mauthtoken
\u
001b[0m
\u
001b[1;33m:
\u
001b[0m
\u
001b[1;33m{
\u
001b[0m
\u
001b[0mauthtoken
\u
001b[0m
\u
001b[1;33m}
\u
001b[0m
\u
001b[1;33m
\u
001b[0m
\u
001b[1;33m
\u
001b[0m
\u
001b[0m
\n\u
001b[0m
\u
001b[0;32m 4
\u
001b[0m
\u
001b[0mregion
\u
001b[0m
\u
001b[1;33m:
\u
001b[0m
\u
001b[1;33m{
\u
001b[0m
\u
001b[0mregion
\u
001b[0m
\u
001b[1;33m}
\u
001b[0m
\u
001b[1;33m
\u
001b[0m
\u
001b[1;33m
\u
001b[0m
\u
001b[0m
\n\u
001b[0;32m 5
\u
001b[0m
\u
001b[0mconsole_ui
\u
001b[0m
\u
001b[1;33m:
\u
001b[0m
\u
001b[1;32mFalse
\u
001b[0m
\u
001b[1;33m
\u
001b[0m
\u
001b[1;33m
\u
001b[0m
\u
001b[0m
\n
"
,
"
\u
001b[1;31mNameError
\u
001b[0m: name 'authtoken' is not defined"
]
}
]
"execution_count"
:
7
,
"outputs"
:
[]
},
{
"cell_type"
:
"code"
,
"execution_count"
:
null
,
"metadata"
:
{},
"outputs"
:
[]
,
"metadata"
:
{
"id"
:
"5r252w0r0Z0o"
}
,
"source"
:
[
"from subprocess import Popen, PIPE
\n
"
,
"import shlex
\n
"
,
...
...
@@ -240,7 +228,9 @@
" print(f'unknown tunnel: {tunnel[
\"
name
\"
]}')
\n
"
,
"
\n
"
,
" return in_addr, out_addr"
]
],
"execution_count"
:
9
,
"outputs"
:
[]
},
{
"cell_type"
:
"code"
,
...
...
@@ -255,17 +245,13 @@
"ps = Popen('./scripts/open_tunnel_ngrok.sh', stdout=PIPE, stderr=PIPE)
\n
"
,
"time.sleep(3)"
],
"execution_count"
:
null
,
"execution_count"
:
10
,
"outputs"
:
[]
},
{
"cell_type"
:
"code"
,
"metadata"
:
{
"id"
:
"pJgdFr0Fdjoq"
,
"outputId"
:
"3948f70b-d4f3-4ed8-a864-fe5c6df50809"
,
"colab"
:
{
"base_uri"
:
"https://localhost:8080/"
}
"id"
:
"pJgdFr0Fdjoq"
},
"source"
:
[
"# Get tunnel addresses
\n
"
,
...
...
@@ -277,16 +263,7 @@
" print(
\"
Something went wrong, reopen the tunnel
\"
)"
],
"execution_count"
:
null
,
"outputs"
:
[
{
"output_type"
:
"stream"
,
"text"
:
[
"Opening tunnel
\n
"
,
"Something went wrong, reopen the tunnel
\n
"
],
"name"
:
"stdout"
}
]
"outputs"
:
[]
},
{
"cell_type"
:
"markdown"
,
...
...
@@ -319,7 +296,7 @@
"
\n
"
,
"MODEL_CLASSES = {'roberta': (RobertaConfig, RobertaModel, RobertaTokenizer)}"
],
"execution_count"
:
null
,
"execution_count"
:
12
,
"outputs"
:
[]
},
{
...
...
@@ -428,7 +405,7 @@
" p.append(text)
\n
"
,
" return p"
],
"execution_count"
:
null
,
"execution_count"
:
13
,
"outputs"
:
[]
},
{
...
...
@@ -460,7 +437,7 @@
" 'device' : torch.device(
\"
cuda
\"
if torch.cuda.is_available() else
\"
cpu
\"
)
\n
"
,
"})"
],
"execution_count"
:
null
,
"execution_count"
:
14
,
"outputs"
:
[]
},
{
...
...
Please
register
or
login
to post a comment