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
| #include <pthread.h> | |
| #include <fcntl.h> | |
| #include <unistd.h> | |
| #include <stdlib.h> | |
| void *cpu_burn(void *arg) { | |
| volatile double x = 1.000001; | |
| while (1) | |
| if ((x *= x) > 1e100) x = 1.000001; | |
| } |
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
| # pip install git+https://github.com/tuffnatty/django-rest-swagger.git@my-0.3.x | |
| # pip install backports.tempfile | |
| # pip install swagger-spec-validator | |
| # pip install pyyaml | |
| # And you should have swagger-tools executable (https://github.com/apigee-127/swagger-tools) on your PATH! | |
| from copy import deepcopy | |
| import json | |
| from django.http import HttpResponse | |
| from django.views import View |