Skip to main content

通辽转换器!

Project description

通辽转换器!

什么是 "通辽"

”通辽“是 UP 主小约翰可汗来介绍国家使用的单位。因小约翰可汗过于出名变成了一个梗

[点击观看视频]
”通辽“简写 T, 为 59535 平方千米, 或者是 285.31 万人。

Usage

这里实现了一个通辽转换模块:

from tongliao import country2tongliao
import pprint
pprint.pprint(country2tongliao("中国"))
{'area': 9600012,
 'area_str': '9600012 平方千米(km²)',
 'name': '中国',
 'result': {'area': 161.25,
         'area_str': '161.25 通辽(T)',
         'people': 507.27,
         'people_str': '507.27 通辽(T)'},
 'people': 1447301400,
 'people_str': '1447301400 人'}
__all__ = [
    "TONGLIAO_AREA",    # 通辽面积,单位平方千米
    "TONGLIAO_CHINESE", # 通辽单位中文 "通辽"
    "TONGLIAO_ENGLISH", # 通辽单位英文 "T"
    "TONGLIAO_PEOPLE",  # 通辽人口
    "area2tongliao",    # 输入平方千米数,转换为通辽
    "country2tongliao", # 输入国家名,转换为通辽
    "people2tongliao",  # 输入人口数量,转换为通辽
]

同时还做了一个简陋的通辽转换 GUI

python3 tongliao.py

注意事项

  1. 运行模块时会在当前目录下写入各个国家的信息的 json 文件
  2. "通辽" 绝对不只是人口单位、面积单位! 如果有好像发的话发个 issues 吧!
  3. 给个赞吧!

脚注

世界各国国土数据来源: https://www.kylc.com/stats/global/yearly_overview/g_area_surface.html

世界各国人口数据来源: https://mip.phb123.com/city/renkou/rk.html

  • 国土数据共记录 214 个地区
  • 人口数据共记录 233 个地区
  • 最后有 197 个地区在两项数据中均有记录,其他一并过滤
  • 197 个地区中 没有科索沃科索沃永远是塞尔维亚的一部分
  • 国土数据中美国国土为 983 万平方千米,算上了领海面积。目前普遍为 937 万平方千米,已修正。
  • 收集的各国国土与人口数据难免会有遗漏,如有发现可以提出

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tongliao-0.0.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

tongliao-0.0.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file tongliao-0.0.1.tar.gz.

File metadata

  • Download URL: tongliao-0.0.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for tongliao-0.0.1.tar.gz
Algorithm Hash digest
SHA256 cbc2bef53683f99a163717d328eae5381dcfdd01bebcd148cf8ca2158ef5029f
MD5 bcbd18a07e0a25ed2a63a7ff91ee8e5b
BLAKE2b-256 5841ea52dd0b590350b9287d0e71297d3fc74ca6c20727451f7475dbaa33ed4c

See more details on using hashes here.

File details

Details for the file tongliao-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tongliao-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for tongliao-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c64ebc6b36340b94b7dacc7c7948c3dd1ce069e60a8cc1f03b21c87672bee2a
MD5 362e27291081915eba483b426d8f3f70
BLAKE2b-256 f9d2c040054dbf4ddea3ba43fd0ed8e652e57b6505d1b61b5eaa45b02a545a95

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page