Skip Navigation
Good foss app to run a simple http server from a directory?
  • could try a flask webapp

    
    from flask import Flask, send_from_directory
    import os
    
    app = Flask(__name__)
    
    # Specify the directory you want to share
    SHARED_DIRECTORY = 'shared_files'
    
    @app.route('/files/<path:filename>', methods=['GET'])
    def get_file(filename):
        """Serve a file from the shared directory."""
        try:
            return send_from_directory(SHARED_DIRECTORY, filename)
        except FileNotFoundError:
            return "File not found", 404
    
    @app.route('/')
    def list_files():
        """List files in the shared directory."""
        files = os.listdir(SHARED_DIRECTORY)
        files_list = '\n'.join(files)
        return f"<h1>Files in {SHARED_DIRECTORY}</h1><pre>{files_list}</pre>"
    
    if __name__ == '__main__':
        app.run(host='0.0.0.0', port=5000)
    
  • Ukraine destroyed columns of waiting Russian troops as soon as it was allowed to strike across the border, commander says
  • The language you are using reads like you're discussing an RTS.

    There's no requirement for any rigid posture except maintaining control over said nuclear arms. Most of NK saber rattling is done to aquire aid and material. Merely having Nuclear arms and demonstrating that control and willingness to use them as a defensive measure is all that's needed. Other countries and powers on the global stage will modify or attenuate their position based on the demonstration of said control

    I suggest reading these to better understand my position.

    https://oxfordre.com/politics/display/10.1093/acrefore/9780190228637.001.0001/acrefore-9780190228637-e-347

    https://apps.dtic.mil/sti/tr/pdf/ADA585975.pdf

  • The Supreme Court just lit a match and tossed it into dozens of federal agencies
  • Yes, to increase the number of justices we'll need a congressional and executive branch to push the appointments through.

    It won't matter who Alito or Thomas pick as their replacements if there's 5 new left leaning justices on the bench.

    It's sad to see the Supreme Court as such an overt political structure now. It's always been political but this is egregious.

  • Ukraine destroyed columns of waiting Russian troops as soon as it was allowed to strike across the border, commander says
  • You're speaking about the means of which to project military power on the ground with direct action, I'm talking about the nature of nuclear weapons as a deterrent and how that changes the way soft and hard power is applied.

    Nukes make it so that no direct combat need ever take place, look at NK or the inverse where we are applying sanctions against Iran for a current parallel.

  • Has anyone else noticed a large influx of Trolls lately?

    This isn't about immediately filtered content, like the disgusting DuffMan George Floyd meme, or Holocaust denial. That's pretty well kept in check by mod tools. I'm also not talking about cogent or even pointed political discussion.

    I'm not even talking about necessarily in this community directly, however in a lot of other spaces I've noticed a lot of accounts using divisive language and terms like "The ineffectual left" "single issue voters" "ignorant right wing morons". Lots of straw man arguments, lots of willful ignorance.

    I'm not a centrist, I'm very very very far left however I know well enough not to patently dismiss the talking points of others, outside of course calls to genocide. I know what dog whistles sound like, and I'm hearing a lot of them lately.

    Most egregiously I'm seeing very long form post replies that read very much like what is generated from LLMs.

    So I guess my question is, how're we all fairing with what might be the largest Turing test ever?

    150
    InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)AO
    aodhsishaj @lemmy.world
    Posts 1
    Comments 551