您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

degrees.py 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #
  2. # Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. TBL = {
  17. "94": "EMBA",
  18. "6": "MBA",
  19. "95": "MPA",
  20. "92": "专升本",
  21. "4": "专科",
  22. "90": "中专",
  23. "91": "中技",
  24. "86": "初中",
  25. "3": "博士",
  26. "10": "博士后",
  27. "1": "本科",
  28. "2": "硕士",
  29. "87": "职高",
  30. "89": "高中",
  31. }
  32. TBL_ = {v: k for k, v in TBL.items()}
  33. def get_name(id):
  34. return TBL.get(str(id), "")
  35. def get_id(nm):
  36. if not nm:
  37. return ""
  38. return TBL_.get(nm.upper().strip(), "")