This file contains hidden or 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 rest_framework.views import APIView | |
from rest_framework.response import Response | |
from rest_framework.permissions import IsAuthenticated | |
from rest_framework_jwt.authentication import JSONWebTokenAuthentication | |
class RestrictedView(APIView): | |
permission_classes = (IsAuthenticated, ) | |
authentication_classes = (JSONWebTokenAuthentication, ) |
This file contains hidden or 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
eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9 |
This file contains hidden or 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
123box.net | |
150ml.com | |
123qwe.co.uk | |
163.com | |
1funplace.com | |
1internetdrive.com | |
1under.com | |
1webave.com | |
24horas.com | |
2bmail.co.uk |
This file contains hidden or 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
1033edge.com | |
11mail.com | |
123.com | |
123box.net | |
123india.com | |
123mail.cl | |
123qwe.co.uk | |
150ml.com | |
15meg4free.com | |
163.com |
This file contains hidden or 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 rest_framework.views import exception_handler | |
def custom_exception_handler(exc): | |
""" | |
Custom exception handler for Django Rest Framework that adds | |
the `status_code` to the response and renames the `detail` key to `error`. | |
""" | |
response = exception_handler(exc) |
This file contains hidden or 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
$ tree -I *.pyc | |
. | |
├── README.md | |
├── blimp2_api | |
│ ├── __init__.py | |
│ ├── __init__.pyc | |
│ ├── authentication.pyc | |
│ ├── permissions.py | |
│ ├── permissions.pyc | |
│ ├── renderers.pyc |
This file contains hidden or 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
(function () { | |
var COMPILED = !0, | |
goog = goog || {}; | |
goog.global = this; | |
goog.DEBUG = !0; | |
goog.LOCALE = "en"; | |
goog.provide = function (a) { | |
if (!COMPILED) { | |
if (goog.isProvided_(a)) throw Error('Namespace "' + a + '" already declared.'); | |
delete goog.implicitNamespaces_[a]; |
This file contains hidden or 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
New python executable in lift/bin/python | |
Installing setuptools, pip... | |
Complete output from command /home/ubuntu/.virtualenvs/lift/bin/python -c "import sys, pip; pip...ll\"] + sys.argv[1:])" setuptools pip: | |
Traceback (most recent call last): | |
File "<string>", line 1, in <module> | |
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5-py2.py3-none-any.whl/pip/__init__.py", line 11, in <module> | |
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5-py2.py3-none-any.whl/pip/vcs/subversion.py", line 4, in <module> | |
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5-py2.py3-none-any.whl/pip/index.py", line 16, in <module> | |
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5-py2.py3-none-any.whl/pip/wheel.py", line 23, in <module> | |
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5-py2.py3-none-any.whl/pip/_vendor/distlib/scripts.py", line 15, in <module> |
This file contains hidden or 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
echo "hello world" | |
echo "$1" |
This file contains hidden or 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 urllib | |
import requests | |
client_id = '...' | |
client_secret = '...' | |
site = 'https://sopr.herokuapp.com' | |
redirect_uri = '...' | |
oauth_params = { |