View mstdnjp.py
#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 | |
''' |
View bmsext.ps1
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] | |
} |
View dee2.py
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 |
View unescape_charref.py
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: |
View 3rdln_grade_1.json
{ | |
"name" : "第3期LN段位認定#1", | |
"order" : [ | |
[7335, "◆01"], | |
[7334, "◆02"], | |
[7333, "◆03"], | |
[7332, "◆04"], | |
[7331, "◆05"], | |
[7330, "◆06"], | |
[7329, "◆07"], |