def download_from_github(fname, path):
base_url = '<STR_LIT>'<EOL>f = fname + '<STR_LIT>'<EOL>url = base_url + f<EOL>block_size = <NUM_LIT><EOL>req = urlopen(url)<EOL>if sys.version_info[<NUM_LIT:0>] < <NUM_LIT:3>:<EOL><INDENT>file_size = int(req.info().getheaders('<STR_LIT>')[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>file_size = req.length<EOL><DEDENT>if os.path.exists(fname):<EOL><INDENT>if os.path.getsize(fname) == file_size:<EOL><INDENT>print("<STR_LIT>".format(fname))<EOL><DEDENT>else:<EOL><INDENT>overwrite = input("<STR_LIT>".format(fname))<EOL>if overwrite.lower().startswith('<STR_LIT:n>'):<EOL><INDENT>print("<STR_LIT>".format(fname))<EOL><DEDENT><DEDENT><DEDENT>print("<STR_LIT>".format(fname))<EOL>with open(fname, '<STR_LIT:wb>') as fh:<EOL><INDENT>while True:<EOL><INDENT>chunk = req.read(block_size)<EOL>if not chunk:<EOL><INDENT>break<EOL><DEDENT>fh.write(chunk)<EOL><DEDENT>print('<STR_LIT>')<EOL><DEDENT>print('<STR_LIT>')<EOL>print("<STR_LIT>".format(fname))<EOL>_database_zip = zipfile.ZipFile(fname)<EOL>_database_zip.extractall(path=path)<EOL>print("<STR_LIT>".format(fname, fname.replace('<STR_LIT>', '<STR_LIT>')))<EOL>os.remove(fname)<EOL>print("<STR_LIT>".format(fname))<EOL>
Download database from GitHub

:param fname: file name with extension ('.zip') of the target item
:type fname: str
:param path: path to save unzipped files
:type path: str

:return: database folder
:rtype: folder