This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import os | |
import shutil | |
from xattr import xattr | |
top_folder = "." | |
CACHE_FOLDERS = {"__pycache__", ".pytest_cache", ".cache"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Inspired by http://flask.pocoo.org/snippets/40/ """ | |
app = Flask(__name__) | |
@app.url_defaults | |
def hashed_url_for_static_file(endpoint, values): | |
if 'static' == endpoint or endpoint.endswith('.static'): | |
filename = values.get('filename') | |
if filename: | |
if '.' in endpoint: # has higher priority |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
# @author: Dario Varotto | |
""" | |
Script for creating a complex mongodb shard for testing purpose on the local machine. | |
Wrote for the Mongodb 102 course (week6) to facilitate the setup. | |
Change the settings on the top of the script and run it. | |
All commands are passed to mongo via subprocess, no pyMongo required. | |
I keep it as mongo shell reference. |