-
Notifications
You must be signed in to change notification settings - Fork 1
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
06ecc0f
commit e949c7b
Showing
3,650 changed files
with
281,109 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"entries":{"replit.nix":{"env":{"AR":"ar","AS":"as","CC":"gcc","CONFIG_SHELL":"/nix/store/bm7jr70d9ghn5cczb3q0w90apsm05p54-bash-5.1-p8/bin/bash","CXX":"g++","DETERMINISTIC_BUILD":"1","HOST_PATH":"/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/bin:/nix/store/jd1y449cf66yx5d1hwyjvc4562b1p1am-coreutils-9.0/bin:/nix/store/jjvw20r6pz3ff7pn91yhvfx8s7izsqan-findutils-4.8.0/bin:/nix/store/ndd6gh8zigjy0j68arj7nyrbcw4kcw01-diffutils-3.8/bin:/nix/store/bpg0ia8nkavzw7s66avi1f9nz72i1p3r-gnused-4.8/bin:/nix/store/df3ff57sbkgbdhc4ar19zs4y0hrhggii-gnugrep-3.7/bin:/nix/store/4fv981732jqzirah3h2y6ynmlsfbxb37-gawk-5.1.1/bin:/nix/store/k5ifa08z0qlkknnb8s1bdh2kdrx0qmd0-gnutar-1.34/bin:/nix/store/dcird3wn9xywy49w3qq1hpjwvjfn3lph-gzip-1.11/bin:/nix/store/s85iyc3p9nbinwvwx9rcqirf1m68zpmm-bzip2-1.0.6.0.2-bin/bin:/nix/store/msncxcf5lgy5by9cqjyxchxd26x47d64-gnumake-4.3/bin:/nix/store/bm7jr70d9ghn5cczb3q0w90apsm05p54-bash-5.1-p8/bin:/nix/store/gi3psbgxbf2fmvgi36pmw77nnh58vq3l-patch-2.7.6/bin:/nix/store/sqb20f4rk80lw21j4is85qwljlphmn3g-xz-5.2.5-bin/bin","LANG":"en_US.UTF-8","LD":"ld","LOCALE_ARCHIVE":"/usr/lib/locale/locale-archive","NIX_BINTOOLS":"/nix/store/spm7d6ncyx2k5w8yl6clzynv2s4wf1kp-binutils-wrapper-2.35.2","NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu":"1","NIX_BUILD_CORES":"8","NIX_BUILD_TOP":"/tmp","NIX_CC":"/nix/store/2qwnn6lizc9d119kp3zig3q19gbfm4n6-gcc-wrapper-10.3.0","NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu":"1","NIX_CFLAGS_COMPILE":" -frandom-seed=vsn87p41vb -isystem /nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/include -isystem /nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/include","NIX_ENFORCE_NO_NATIVE":"1","NIX_HARDENING_ENABLE":"fortify stackprotector pic strictoverflow format relro bindnow","NIX_INDENT_MAKE":"1","NIX_LDFLAGS":"-rpath /nix/store/vsn87p41vbrwkwg648b6phc665v5jzdw-nix-shell/lib64 -rpath /nix/store/vsn87p41vbrwkwg648b6phc665v5jzdw-nix-shell/lib -L/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib -L/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib","NIX_STORE":"/nix/store","NM":"nm","OBJCOPY":"objcopy","OBJDUMP":"objdump","PATH":"/nix/store/bccsypsvjskpzsgzww8bzjgqmck4bjbf-bash-interactive-5.1-p8/bin:/nix/store/bqmg7l0jn6nhgjlfc981g1imzb6ny8xl-patchelf-0.13/bin:/nix/store/2qwnn6lizc9d119kp3zig3q19gbfm4n6-gcc-wrapper-10.3.0/bin:/nix/store/6r5h4h7nqx73m87j5b9sjwy2x9kyri0k-gcc-10.3.0/bin:/nix/store/csz8v8xi2f644j26n84i20dnqmq43sih-glibc-2.33-117-bin/bin:/nix/store/jd1y449cf66yx5d1hwyjvc4562b1p1am-coreutils-9.0/bin:/nix/store/spm7d6ncyx2k5w8yl6clzynv2s4wf1kp-binutils-wrapper-2.35.2/bin:/nix/store/h19zwlkrp6b0hp3ypbqdcggnyarn3af6-binutils-2.35.2/bin:/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/bin:/nix/store/jd1y449cf66yx5d1hwyjvc4562b1p1am-coreutils-9.0/bin:/nix/store/jjvw20r6pz3ff7pn91yhvfx8s7izsqan-findutils-4.8.0/bin:/nix/store/ndd6gh8zigjy0j68arj7nyrbcw4kcw01-diffutils-3.8/bin:/nix/store/bpg0ia8nkavzw7s66avi1f9nz72i1p3r-gnused-4.8/bin:/nix/store/df3ff57sbkgbdhc4ar19zs4y0hrhggii-gnugrep-3.7/bin:/nix/store/4fv981732jqzirah3h2y6ynmlsfbxb37-gawk-5.1.1/bin:/nix/store/k5ifa08z0qlkknnb8s1bdh2kdrx0qmd0-gnutar-1.34/bin:/nix/store/dcird3wn9xywy49w3qq1hpjwvjfn3lph-gzip-1.11/bin:/nix/store/s85iyc3p9nbinwvwx9rcqirf1m68zpmm-bzip2-1.0.6.0.2-bin/bin:/nix/store/msncxcf5lgy5by9cqjyxchxd26x47d64-gnumake-4.3/bin:/nix/store/bm7jr70d9ghn5cczb3q0w90apsm05p54-bash-5.1-p8/bin:/nix/store/gi3psbgxbf2fmvgi36pmw77nnh58vq3l-patch-2.7.6/bin:/nix/store/sqb20f4rk80lw21j4is85qwljlphmn3g-xz-5.2.5-bin/bin","PYTHONBIN":"/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/bin/python3.8","PYTHONHASHSEED":"0","PYTHONNOUSERSITE":"1","PYTHONPATH":"/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/site-packages","PYTHON_LD_LIBRARY_PATH":"/nix/store/dd8swlwhpdhn6bv219562vyxhi8278hs-gcc-10.3.0-lib/lib:/nix/store/p54p1kb7iinbg1135ibcfqbyh6j4x986-zlib-1.2.11/lib:/nix/store/f5jhxrj5cxq2mnahwj4nba3sw4g5956c-glib-2.70.1/lib:/nix/store/qs736x773s604xk79r450ksibix6ca9p-libX11-1.7.2/lib","RANLIB":"ranlib","READELF":"readelf","SIZE":"size","SOURCE_DATE_EPOCH":"315532800","STRINGS":"strings","STRIP":"strip","XDG_DATA_DIRS":"/nix/store/bqmg7l0jn6nhgjlfc981g1imzb6ny8xl-patchelf-0.13/share","_":"/nix/store/jd1y449cf66yx5d1hwyjvc4562b1p1am-coreutils-9.0/bin/env","_PYTHON_HOST_PLATFORM":"linux-x86_64","_PYTHON_SYSCONFIGDATA_NAME":"_sysconfigdata__linux_x86_64-linux-gnu","__ETC_PROFILE_SOURCED":"1","buildInputs":"/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12","builder":"/nix/store/bm7jr70d9ghn5cczb3q0w90apsm05p54-bash-5.1-p8/bin/bash","configureFlags":"","depsBuildBuild":"","depsBuildBuildPropagated":"","depsBuildTarget":"","depsBuildTargetPropagated":"","depsHostHost":"","depsHostHostPropagated":"","depsTargetTarget":"","depsTargetTargetPropagated":"","doCheck":"","doInstallCheck":"","name":"nix-shell","nativeBuildInputs":"","nobuildPhase":"echo\necho \"This derivation is not meant to be built, aborting\";\necho\nexit 1\n","out":"/nix/store/vsn87p41vbrwkwg648b6phc665v5jzdw-nix-shell","outputs":"out","patches":"","phases":"nobuildPhase","propagatedBuildInputs":"","propagatedNativeBuildInputs":"","shell":"/nix/store/bm7jr70d9ghn5cczb3q0w90apsm05p54-bash-5.1-p8/bin/bash","shellHook":"","stdenv":"/nix/store/z7wz8q1i0j4jmfpn87wpakwma6q0k90n-stdenv-linux","strictDeps":"","system":"x86_64-linux"},"dependencies":[{"path":"replit.nix","mod_time":"2022-09-11T12:56:47Z"}],"channel":"stable-21_11","channel_nix_path":"/nix/store/ki2jvm59r70z94nhzxa1hqsn2amr5n62-nixpkgs-stable-21_11-21.11.tar.gz/nixpkgs-stable-21_11"}}} |
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,7 @@ | ||
[global] | ||
disable-pip-version-check = yes | ||
index-url = https://package-proxy.replit.com/pypi/simple/ | ||
|
||
[install] | ||
use-feature = content-addressable-pool | ||
content-addressable-pool-symlink = yes |
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,4 @@ | ||
[[tool.poetry.source]] | ||
name = "replit" | ||
url = "https://package-proxy.replit.com/pypi/simple/" | ||
default = true |
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,105 @@ | ||
# The command that runs the program. If the interpreter field is set, it will have priority and this run command will do nothing | ||
run = "python3 main.py" | ||
|
||
# The primary language of the repl. There can be others, though! | ||
language = "python3" | ||
entrypoint = "main.py" | ||
# A list of globs that specify which files and directories should | ||
# be hidden in the workspace. | ||
hidden = ["venv", ".config", "**/__pycache__", "**/.mypy_cache", "**/*.pyc"] | ||
|
||
# Specifies which nix channel to use when building the environment. | ||
[nix] | ||
channel = "stable-21_11" | ||
|
||
# The command to start the interpreter. | ||
[interpreter] | ||
[interpreter.command] | ||
args = [ | ||
"stderred", | ||
"--", | ||
"prybar-python3", | ||
"-q", | ||
"--ps1", | ||
"\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ", | ||
"-i", | ||
] | ||
env = { LD_LIBRARY_PATH = "$PYTHON_LD_LIBRARY_PATH" } | ||
|
||
[env] | ||
VIRTUAL_ENV = "/home/runner/${REPL_SLUG}/venv" | ||
PATH = "${VIRTUAL_ENV}/bin" | ||
PYTHONPATH = "${VIRTUAL_ENV}/lib/python3.10/site-packages" | ||
REPLIT_POETRY_PYPI_REPOSITORY = "https://package-proxy.replit.com/pypi/" | ||
MPLBACKEND = "TkAgg" | ||
POETRY_CACHE_DIR = "${HOME}/${REPL_SLUG}/.cache/pypoetry" | ||
|
||
# Enable unit tests. This is only supported for a few languages. | ||
[unitTest] | ||
language = "python3" | ||
|
||
# Add a debugger! | ||
[debugger] | ||
support = true | ||
|
||
# How to start the debugger. | ||
[debugger.interactive] | ||
transport = "localhost:0" | ||
startCommand = ["dap-python", "main.py"] | ||
|
||
# How to communicate with the debugger. | ||
[debugger.interactive.integratedAdapter] | ||
dapTcpAddress = "localhost:0" | ||
|
||
# How to tell the debugger to start a debugging session. | ||
[debugger.interactive.initializeMessage] | ||
command = "initialize" | ||
type = "request" | ||
|
||
[debugger.interactive.initializeMessage.arguments] | ||
adapterID = "debugpy" | ||
clientID = "replit" | ||
clientName = "replit.com" | ||
columnsStartAt1 = true | ||
linesStartAt1 = true | ||
locale = "en-us" | ||
pathFormat = "path" | ||
supportsInvalidatedEvent = true | ||
supportsProgressReporting = true | ||
supportsRunInTerminalRequest = true | ||
supportsVariablePaging = true | ||
supportsVariableType = true | ||
|
||
# How to tell the debugger to start the debuggee application. | ||
[debugger.interactive.launchMessage] | ||
command = "attach" | ||
type = "request" | ||
|
||
[debugger.interactive.launchMessage.arguments] | ||
logging = {} | ||
|
||
# Configures the packager. | ||
[packager] | ||
language = "python3" | ||
ignoredPackages = ["unit_tests"] | ||
|
||
[packager.features] | ||
enabledForHosting = false | ||
# Enable searching packages from the sidebar. | ||
packageSearch = true | ||
# Enable guessing what packages are needed from the code. | ||
guessImports = true | ||
|
||
# These are the files that need to be preserved when this | ||
# language template is used as the base language template | ||
# for Python repos imported from GitHub | ||
[gitHubImport] | ||
requiredFiles = [".replit", "replit.nix", ".config", "venv"] | ||
|
||
[languages] | ||
|
||
[languages.python3] | ||
pattern = "**/*.py" | ||
|
||
[languages.python3.languageServer] | ||
start = "pylsp" |
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 @@ | ||
{"version":2,"languages":{"python-python3-poetry":{}}} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,14 @@ | ||
question_data = [ | ||
{"question": "A slug's blood is green.", "answer": "True"}, | ||
{"question": "The loudest animal is the African Elephant.", "answer": "False"}, | ||
{"question": "Approximately one quarter of human bones are in the feet.", "answer": "True"}, | ||
{"question": "The total surface area of a human lungs is the size of a football pitch.", "answer": "True"}, | ||
{"question": "In West Virginia, USA, if you accidentally hit an animal with your car, you are free to take it home to eat.", "answer": "True"}, | ||
{"question": "In London, UK, if you happen to die in the House of Parliament, you are entitled to a state funeral.", "answer": "False"}, | ||
{"question": "It is illegal to pee in the Ocean in Portugal.", "answer": "True"}, | ||
{"question": "You can lead a cow down stairs but not up stairs.", "answer": "False"}, | ||
{"question": "Google was originally called 'Backrub'.", "answer": "True"}, | ||
{"question": "Buzz Aldrin's mother's maiden name was 'Moon'.", "answer": "True"}, | ||
{"question": "No piece of square dry paper can be folded in half more than 7 times.", "answer": "False"}, | ||
{"question": "A few ounces of chocolate can to kill a small dog.", "answer": "True"} | ||
] |
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,20 @@ | ||
from question_model import Question | ||
from data import question_data | ||
from quiz_brain import QuizBrain | ||
question_bank = [] | ||
|
||
for question in question_data: | ||
question_text = question["question"] | ||
question_answer = question["answer"] | ||
|
||
new_question = Question(question_text=question_text, question_answer=question_answer) | ||
|
||
question_bank.append(new_question) | ||
|
||
quiz = QuizBrain(question_bank) | ||
|
||
while quiz.still_has_questions(): | ||
quiz.next_question() | ||
|
||
print("You've completed the quiz") | ||
print(f"your final score was: {quiz.score}/{quiz.question_number}") |
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,11 @@ | ||
class Question: | ||
|
||
def __init__(self, question_text, question_answer): | ||
self.text = question_text | ||
self.answer = question_answer | ||
|
||
# new_question = Question("balablu", "True") | ||
# print(new_question.text) | ||
# print(new_question.answer) | ||
|
||
|
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 @@ | ||
class QuizBrain: | ||
|
||
def __init__(self, question_list): | ||
self.question_number = 0 | ||
self.score = 0 | ||
self.question_list = question_list | ||
|
||
def still_has_questions(self): | ||
return self.question_number < len(self.question_list) | ||
|
||
|
||
def next_question(self): | ||
current_question = self.question_list[self.question_number] | ||
self.question_number += 1 | ||
user_answer = input(f"Q.{self.question_number}: {current_question.text} (True/False): ") | ||
self.check_answer(user_answer, current_question.answer) | ||
|
||
|
||
def check_answer(self, user_answer, correct_answer): | ||
if user_answer.lower() == correct_answer.lower(): | ||
self.score += 1 | ||
print("correct!") | ||
else: | ||
print("false") | ||
print(f"the correct answer is {correct_answer}") | ||
print(f"your current score is {self.score}/{self.question_number}") | ||
print("\n") | ||
|
||
|
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,18 @@ | ||
{ pkgs }: { | ||
deps = [ | ||
pkgs.python38Full | ||
]; | ||
env = { | ||
PYTHON_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ | ||
# Needed for pandas / numpy | ||
pkgs.stdenv.cc.cc.lib | ||
pkgs.zlib | ||
# Needed for pygame | ||
pkgs.glib | ||
# Needed for matplotlib | ||
pkgs.xorg.libX11 | ||
]; | ||
PYTHONBIN = "${pkgs.python38Full}/bin/python3.8"; | ||
LANG = "en_US.UTF-8"; | ||
}; | ||
} |
Oops, something went wrong.