Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
?
lecture-code
Commits
aaa6c245
Commit
aaa6c245
authored
4 months ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
try now
parent
7ec62b7f
master
rkalahas-master-patch-39159
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
e1/cracker.py
+1
-1
e1/cracker.py
e1/driver.py
+21
-0
e1/driver.py
with
22 additions
and
1 deletion
+22
-1
e1/cracker.py
View file @
aaa6c245
import
time
import
checker
from
driver
import
checker
print
(
checker
.
check
(
"abcd"
))
This diff is collapsed.
Click to expand it.
e1/driver.py
0 → 100644
View file @
aaa6c245
import
requests
import
sys
import
importlib
version
=
''
.
join
(
sys
.
version
.
split
(
" "
)[
0
].
split
(
"."
)[:
-
1
])
result
=
requests
.
get
(
f
'https://gitlab.caltech.edu/cs1-24fa/lecture-code/-/raw/master/e1/checker/checker.cpython-
{
version
}
.pyc'
)
with
open
(
'checker.pyc'
,
'wb'
)
as
f
:
f
.
write
(
result
.
content
)
def
load
(
x
):
spec
=
importlib
.
util
.
spec_from_file_location
(
x
,
f
"checker.pyc"
)
mod
=
importlib
.
util
.
module_from_spec
(
spec
)
spec
.
loader
.
exec_module
(
mod
)
return
mod
checker
=
load
(
'checker'
)
check
=
checker
.
check
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help