This file contains hidden or 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
| iso3 | m49 | owid_name | other_name | reg1 | reg2 | continent | region_type | is_historical | defined_by | |
|---|---|---|---|---|---|---|---|---|---|---|
| ABW | 533 | Aruba | Aruba | Caribbean | Latin America and the Caribbean | North America | country | False | owid | |
| AFG | 4 | Afghanistan | Afghanistan | Southern Asia | Asia | country | False | owid | ||
| AGO | 24 | Angola | Angola | Middle Africa | Sub-Saharan Africa | Africa | country | False | owid | |
| AIA | 660 | Anguilla | Anguilla | Caribbean | Latin America and the Caribbean | North America | country | False | owid | |
| ALA | 248 | Åland Islands | Aland Islands | Northern Europe | Europe | country | False | owid | ||
| ALB | 8 | Albania | Albania | Southern Europe | Europe | country | False | owid | ||
| AND | 20 | Andorra | Andorra | Southern Europe | Europe | country | False | owid | ||
| ANT | Netherlands Antilles | country | True | owid | ||||||
| ARE | 784 | United Arab Emirates | United Arab Emirates | Western Asia | Asia | country | False | owid |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| # See this article for more explanations: | |
| # https://ckhung.medium.com/4-in-1-priority-first-search-in-python-bfs-dfs-prims-and-dijkstra-s-algorithms-4e9fe8ccba87 | |
| # pip3 install pqdict pydot networkx | |
| # python3 pfs.py -a dijk -0 E t02.dot | |
| # python3 pfs.py -a prim -0 G t02.dot | |
| # https://github.com/nvictus/priority-queue-dictionary |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| # https://medium.com/mycrypto/the-journey-from-mnemonic-phrase-to-address-6c5e86e11e14 | |
| # pip3 install bip_utils | |
| # python3 bip_demo.py | |
| # For the 1st example, private key and address of path0 | |
| # have been verified using exodus wallet. | |
| # For the 2nd example, the computed master key does not match the article...? | |
| # If you have a private key stored in a file named priv_key_file.txt | |
| # this program will also create a derived pair of keys from it | |
| # as a 3rd example. |
This file contains hidden or 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
| <?php | |
| // usage: | |
| // http://.../gecko.pgp??q=bitcoin,ethereum,solana,polkadot | |
| // or | |
| // http://.../gecko.pgp??q=mycrypto.csv | |
| // where mycrypto.csv contains the id of a coin on each line. | |
| // Find the exact id of your coin in this list: | |
| // https://api.coingecko.com/api/v3/coins/list | |
| // See this doc for more info: |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| # multicast netcat | |
| # https://newtoypia.blogspot.com/2021/09/netcat.html | |
| # 齊步走! 用 netcat 同步指揮教室裡的所有電腦 | |
| import argparse, sys, re, readline | |
| from warnings import warn | |
| from subprocess import Popen, PIPE |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| import argparse, os, re | |
| from warnings import warn | |
| import subprocess | |
| parser = argparse.ArgumentParser( | |
| description='invoke pocketsphinx and produce keystrokes', | |
| formatter_class=argparse.ArgumentDefaultsHelpFormatter) | |
| parser.add_argument('-k', '--kwokfn', type=str, default='', |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| # for f in *.xml ; do xq . $f > ${f/%xml/json} ; done | |
| # python3 prj2html.py *.json > new.html | |
| # 詳見 https://newtoypia.blogspot.com/2021/09/xml-js-jq-rss.html | |
| import argparse, json, re | |
| from warnings import warn |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| # https://github.com/pyexcel/pyexcel-ods/issues/41 | |
| # pyexcel-ods issue: use "<text:p>" instead of "<text:line-break/>" for newlines (line breaks) in cells | |
| import argparse, re, sys, json | |
| from pyexcel_ods3 import save_data | |
| from warnings import warn | |
| parser = argparse.ArgumentParser( | |
| description='read many text files into two columns of an ods file, with filenames as the key column and contents as the value column', |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| # https://newtoypia.blogspot.com/2021/05/android-app-size.html | |
| # 揪出手機上的腫脹軟體: android app 佔用空間大小散點圖 | |
| import argparse, fileinput, re, json | |
| parser = argparse.ArgumentParser( | |
| description='print android app size as .csv: adb shell dumpsys diskstats | aasize.py', | |
| formatter_class=argparse.ArgumentDefaultsHelpFormatter) | |
| parser.add_argument('files', nargs='*', help='files') |