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
mac_groups: | |
- name: Test | |
policy: Default | |
priority: 9 | |
macs: | |
- 5c:b9:01:0e:26:a8 |
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
import argparse | |
from flask import Flask, Response, request | |
from termcolor import colored | |
from werkzeug.serving import WSGIRequestHandler | |
app = Flask(__name__) | |
ALLOWED_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'] | |
@app.route('/', defaults={'path': ''}, methods=ALLOWED_METHODS) |
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
from django.contrib.auth.models import User | |
from django.core.urlresolvers import resolve | |
from django.test import RequestFactory | |
def profile_request(url='/', username='gschmit'): | |
# perform a GET for the profiler | |
u = User.objects.get(username=username) | |
rf = RequestFactory() | |
request = rf.get(url) | |
request.user = u |
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
""" | |
This module provides versioning hooks for a Python package in a Git repository. | |
Verbiage: MAJOR.MINOR.PATCH | |
To start versioning at 0.1.x, just do ``git tag -a v0.1 -m 'version 0.1'``. Each | |
commit will increment the PATCH level by 1 according to this module's | |
``get_version()``. When you want to increment the MINOR, just do ``git tag -a | |
v0.2 -m 'version 0.2'``. |