• 0 Posts
  • 100 Comments
Joined 9 months ago
cake
Cake day: September 25th, 2023

help-circle

  • 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)
    

















  • In capitalism as inventory goes down prices go up. As we descend upon that small town and rent or buy what’s there, prices go up.We need to instead lobby for legislation that heavily taxes investment properties. That will free the hundreds of thousands of homes that’re empty. Also local housing initiatives where tax dollars go to subsidize the building of more houses. Look at the G.I. Bill after WW2 for a great example of this. But instead of veterans, anyone with income 90k or below gets a check to help with their first home. Of course we’d keep the GI Bill for veterans as well. This isn’t a zero sum game.