Giter Site home page Giter Site logo

thegamershollow / wii-u-sd-card-setup-tool Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 67 KB

A Python based tool the can be used to Download/Update Wii U/vWii homebrew files and install them on you SD card.

Home Page: https://bit.ly/wiiusdtoolwiki

License: MIT License

Python 100.00%
app python wii wii-homebrew wiiu wiiu-homebrew wii-homebrew-tool wiiu-homebrew-tool program tool

wii-u-sd-card-setup-tool's Introduction

Wii U SD Card Setup Tool

The WIKI for this can be found HERE

wii-u-sd-card-setup-tool's People

Contributors

thegamershollow avatar

Stargazers

 avatar

Watchers

 avatar

wii-u-sd-card-setup-tool's Issues

Your choice of method with urllib is.. very inefficient.

as the title states, your use of urllib leaves a lot to be desired both speed and logic wise.

Here's a refactored version of your download() function which is not only MUCH faster, but also only uses the requests library for bolstered optimization and simplicity.

def download(url: str, fileName: str):
    response = requests.get(url, stream=True)
    response.raise_for_status()
    length = response.headers.get('content-length')
    block_size = 1000000  # default value
    if length:
        length = int(length)
        block_size = max(4096, length // 20)
    with open(fileName, 'wb') as f:
        size = 0
        for buffer in response.iter_content(block_size):
            if not buffer:
                break
            f.write(buffer)
            size += len(buffer)
            if length:
                percent = int((size / length) * 100)
                print(f"Downloading {fileName}: {percent}%", end='\r')
    print(f"\nDone Downloading: {fileName}")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.