mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
15 lines
287 B
Python
15 lines
287 B
Python
import urllib.request
|
|
import gzip
|
|
import json
|
|
import re
|
|
import io
|
|
|
|
|
|
def to_snake_case(name):
|
|
s = re.sub('([A-Z])', r'_\1', name)
|
|
return s.lower().strip('_')
|
|
|
|
|
|
def to_camel_case(name):
|
|
s = re.sub('_([a-z])', lambda m: m.group(1).upper(), name)
|
|
return s[0].upper() + s[1:]
|