init
This commit is contained in:
commit
4dbb58a8f8
4
handin_1/look_up.py/.idea/encodings.xml
Normal file
4
handin_1/look_up.py/.idea/encodings.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||||
|
</project>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoredPackages">
|
||||||
|
<value>
|
||||||
|
<list size="9">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="pandas" />
|
||||||
|
<item index="1" class="java.lang.String" itemvalue="dumbeval" />
|
||||||
|
<item index="2" class="java.lang.String" itemvalue="scipy" />
|
||||||
|
<item index="3" class="java.lang.String" itemvalue="tensorflow" />
|
||||||
|
<item index="4" class="java.lang.String" itemvalue="scikit-learn" />
|
||||||
|
<item index="5" class="java.lang.String" itemvalue="PyYAML" />
|
||||||
|
<item index="6" class="java.lang.String" itemvalue="pyzmq" />
|
||||||
|
<item index="7" class="java.lang.String" itemvalue="numpy" />
|
||||||
|
<item index="8" class="java.lang.String" itemvalue="pubeval" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
11
handin_1/look_up.py/.idea/look_up.py.iml
Normal file
11
handin_1/look_up.py/.idea/look_up.py.iml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
<component name="TestRunnerService">
|
||||||
|
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
|
||||||
|
</component>
|
||||||
|
</module>
|
10
handin_1/look_up.py/.idea/misc.xml
Normal file
10
handin_1/look_up.py/.idea/misc.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JavaScriptSettings">
|
||||||
|
<option name="languageLevel" value="ES6" />
|
||||||
|
</component>
|
||||||
|
<component name="NodePackageJsonFileManager">
|
||||||
|
<packageJsonPaths />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
8
handin_1/look_up.py/.idea/modules.xml
Normal file
8
handin_1/look_up.py/.idea/modules.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/look_up.py.iml" filepath="$PROJECT_DIR$/.idea/look_up.py.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
169
handin_1/look_up.py/.idea/workspace.xml
Normal file
169
handin_1/look_up.py/.idea/workspace.xml
Normal file
|
@ -0,0 +1,169 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="f9135955-8de7-4fe3-8ad8-42bcb9ec775e" name="Default Changelist" comment="" />
|
||||||
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="CoverageDataManager">
|
||||||
|
<SUITE FILE_PATH="coverage/look_up_py$look_up.coverage" NAME="look_up Coverage Results" MODIFIED="1566901041469" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="FileEditorManager">
|
||||||
|
<leaf>
|
||||||
|
<file pinned="false" current-in-tab="true">
|
||||||
|
<entry file="file://$PROJECT_DIR$/look_up.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="397">
|
||||||
|
<caret line="89" column="26" lean-forward="true" selection-start-line="89" selection-start-column="26" selection-end-line="89" selection-end-column="26" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
</leaf>
|
||||||
|
</component>
|
||||||
|
<component name="FileTemplateManagerImpl">
|
||||||
|
<option name="RECENT_TEMPLATES">
|
||||||
|
<list>
|
||||||
|
<option value="Python Script" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="IdeDocumentHistory">
|
||||||
|
<option name="CHANGED_PATHS">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/look_up.py" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectFrameBounds">
|
||||||
|
<option name="x" value="715" />
|
||||||
|
<option name="y" value="91" />
|
||||||
|
<option name="width" value="895" />
|
||||||
|
<option name="height" value="911" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectView">
|
||||||
|
<navigator proportions="" version="1">
|
||||||
|
<foldersAlwaysOnTop value="true" />
|
||||||
|
</navigator>
|
||||||
|
<panes>
|
||||||
|
<pane id="ProjectPane">
|
||||||
|
<subPane>
|
||||||
|
<expand>
|
||||||
|
<path>
|
||||||
|
<item name="look_up.py" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="look_up.py" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
</expand>
|
||||||
|
<select />
|
||||||
|
</subPane>
|
||||||
|
</pane>
|
||||||
|
<pane id="Scope" />
|
||||||
|
</panes>
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent">
|
||||||
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||||
|
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
||||||
|
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
||||||
|
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
|
||||||
|
</component>
|
||||||
|
<component name="RunDashboard">
|
||||||
|
<option name="ruleStates">
|
||||||
|
<list>
|
||||||
|
<RuleState>
|
||||||
|
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||||
|
</RuleState>
|
||||||
|
<RuleState>
|
||||||
|
<option name="name" value="StatusDashboardGroupingRule" />
|
||||||
|
</RuleState>
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="RunManager">
|
||||||
|
<configuration name="look_up" type="PythonConfigurationType" factoryName="Python" temporary="true">
|
||||||
|
<module name="look_up.py" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/look_up.py" />
|
||||||
|
<option name="PARAMETERS" value="" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<recent_temporary>
|
||||||
|
<list>
|
||||||
|
<item itemvalue="Python.look_up" />
|
||||||
|
</list>
|
||||||
|
</recent_temporary>
|
||||||
|
</component>
|
||||||
|
<component name="SvnConfiguration">
|
||||||
|
<configuration />
|
||||||
|
</component>
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="f9135955-8de7-4fe3-8ad8-42bcb9ec775e" name="Default Changelist" comment="" />
|
||||||
|
<created>1566900410249</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1566900410249</updated>
|
||||||
|
<workItem from="1566900414128" duration="1343000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TimeTrackingManager">
|
||||||
|
<option name="totallyTimeSpent" value="1343000" />
|
||||||
|
</component>
|
||||||
|
<component name="ToolWindowManager">
|
||||||
|
<frame x="715" y="91" width="895" height="911" extended-state="0" />
|
||||||
|
<editor active="true" />
|
||||||
|
<layout>
|
||||||
|
<window_info id="Favorites" side_tool="true" />
|
||||||
|
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.09026964" />
|
||||||
|
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||||
|
<window_info anchor="bottom" id="Docker" show_stripe_button="false" />
|
||||||
|
<window_info anchor="bottom" id="Database Changes" />
|
||||||
|
<window_info anchor="bottom" id="Version Control" />
|
||||||
|
<window_info anchor="bottom" id="Python Console" />
|
||||||
|
<window_info anchor="bottom" id="Terminal" />
|
||||||
|
<window_info anchor="bottom" id="Event Log" side_tool="true" />
|
||||||
|
<window_info anchor="bottom" id="Message" order="0" />
|
||||||
|
<window_info anchor="bottom" id="Find" order="1" />
|
||||||
|
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.32967034" />
|
||||||
|
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
||||||
|
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||||
|
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||||
|
<window_info anchor="bottom" id="TODO" order="6" />
|
||||||
|
<window_info anchor="right" id="SciView" />
|
||||||
|
<window_info anchor="right" id="Database" />
|
||||||
|
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||||
|
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||||
|
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||||
|
</layout>
|
||||||
|
</component>
|
||||||
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
<option name="version" value="1" />
|
||||||
|
</component>
|
||||||
|
<component name="editorHistoryManager">
|
||||||
|
<entry file="file://$PROJECT_DIR$/look_up.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="397">
|
||||||
|
<caret line="89" column="26" lean-forward="true" selection-start-line="89" selection-start-column="26" selection-end-line="89" selection-end-column="26" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</component>
|
||||||
|
</project>
|
90
handin_1/look_up.py/look_up.py
Normal file
90
handin_1/look_up.py/look_up.py
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
table =\
|
||||||
|
{
|
||||||
|
'O-': {
|
||||||
|
'O-': True,
|
||||||
|
'O+': True,
|
||||||
|
'A-': True,
|
||||||
|
'A+': True,
|
||||||
|
'B-': True,
|
||||||
|
'B+': True,
|
||||||
|
'AB-': True,
|
||||||
|
'AB+': True
|
||||||
|
},
|
||||||
|
'O+': {
|
||||||
|
'O-': False,
|
||||||
|
'O+': True,
|
||||||
|
'A-': False,
|
||||||
|
'A+': True,
|
||||||
|
'B-': False,
|
||||||
|
'B+': True,
|
||||||
|
'AB-': False,
|
||||||
|
'AB+': True
|
||||||
|
},
|
||||||
|
'A-': {
|
||||||
|
'O-': False,
|
||||||
|
'O+': False,
|
||||||
|
'A-': True,
|
||||||
|
'A+': True,
|
||||||
|
'B-': False,
|
||||||
|
'B+': False,
|
||||||
|
'AB-': True,
|
||||||
|
'AB+': True
|
||||||
|
},
|
||||||
|
'A+': {
|
||||||
|
'O-': False,
|
||||||
|
'O+': False,
|
||||||
|
'A-': False,
|
||||||
|
'A+': True,
|
||||||
|
'B-': False,
|
||||||
|
'B+': False,
|
||||||
|
'AB-': False,
|
||||||
|
'AB+': True
|
||||||
|
},
|
||||||
|
'B-': {
|
||||||
|
'O-': False,
|
||||||
|
'O+': False,
|
||||||
|
'A-': False,
|
||||||
|
'A+': False,
|
||||||
|
'B-': True,
|
||||||
|
'B+': True,
|
||||||
|
'AB-': True,
|
||||||
|
'AB+': True
|
||||||
|
},
|
||||||
|
'B+': {
|
||||||
|
'O-': False,
|
||||||
|
'O+': False,
|
||||||
|
'A-': False,
|
||||||
|
'A+': False,
|
||||||
|
'B-': False,
|
||||||
|
'B+': True,
|
||||||
|
'AB-': False,
|
||||||
|
'AB+': True
|
||||||
|
},
|
||||||
|
'AB-': {
|
||||||
|
'O-': False,
|
||||||
|
'O+': False,
|
||||||
|
'A-': False,
|
||||||
|
'A+': False,
|
||||||
|
'B-': False,
|
||||||
|
'B+': False,
|
||||||
|
'AB-': True,
|
||||||
|
'AB+': True
|
||||||
|
},
|
||||||
|
'AB+': {
|
||||||
|
'O-': False,
|
||||||
|
'O+': False,
|
||||||
|
'A-': False,
|
||||||
|
'A+': False,
|
||||||
|
'B-': False,
|
||||||
|
'B+': False,
|
||||||
|
'AB-': False,
|
||||||
|
'AB+': True
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def look_up(donor, rec):
|
||||||
|
return table[donor][rec]
|
||||||
|
|
||||||
|
|
||||||
|
print(look_up('A-', 'O-'))
|
Loading…
Reference in New Issue
Block a user