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
| #coding: utf-8 | |
| ''' | |
| mstdnjp.py - subclass of mastodon.Mastodon for mstdn.jp | |
| original: Mastodon.py (MIT license) | |
| https://github.com/halcy/Mastodon.py | |
| license of this code: MIT license | |
| http://opensource.org/licenses/mit-license.php | |
| ''' |
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
| function Get-CommonDirectoryPath($paths){ | |
| # original: https://www.rosettacode.org/wiki/Find_common_directory_path#PowerShell | |
| switch($paths.Count){ | |
| 0{return $null} | |
| 1{ | |
| $s=$paths[0].TrimStart('/').Split('/') | |
| $v='' | |
| for($r = 0; $r -lt $s.Count-1; $r++) { | |
| $v+=$s[$r] | |
| } |
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
| from urllib import urlencode | |
| from urllib2 import urlopen,HTTPError,URLError | |
| import socket | |
| import re | |
| import json | |
| try: | |
| from unescape_charref import unescape_charref | |
| except ImportError: | |
| unescape_charref=None |
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
| import re | |
| import sys | |
| from htmlentitydefs import name2codepoint | |
| def unescape_charref(escaped): | |
| def uchr(c): | |
| if 0<c<=sys.maxunicode: | |
| # BMP(UCS-2) / whole(UCS-4) | |
| return unichr(c) | |
| elif sys.maxunicode<c<=0x10ffff: |
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
| { | |
| "name" : "第3期LN段位認定#1", | |
| "order" : [ | |
| [7335, "◆01"], | |
| [7334, "◆02"], | |
| [7333, "◆03"], | |
| [7332, "◆04"], | |
| [7331, "◆05"], | |
| [7330, "◆06"], | |
| [7329, "◆07"], |