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
swagger: "2.0" | |
info: | |
version: 1.0.0 | |
title: Mini API | |
host: example.com | |
basePath: /api | |
schemes: | |
- https | |
consumes: | |
- application/json |
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
swagger: !!python/object/apply:subprocess.check_output ['env'] |
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
# encoding: utf-8 | |
""" | |
Created on 25 feb. 2015. | |
@author: pupssman | |
""" | |
import math | |
import logging |
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
(pytest)pupssman@dirigible:/trash$ for n in 1 2 4 8; do g++ -Dswapfunc=swap$n -O0 test.cpp && ./a.out; done | |
Max size is18446744073709551615, will use 1073741824 bytes for test | |
Took 2541397 microsec for swap1 | |
Max size is18446744073709551615, will use 1073741824 bytes for test | |
Took 2391349 microsec for swap2 | |
Max size is18446744073709551615, will use 1073741824 bytes for test | |
Took 2280239 microsec for swap4 | |
Max size is18446744073709551615, will use 1073741824 bytes for test | |
Took 2297439 microsec for swap8 |
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 sys | |
import argparse | |
import pymysql | |
CONN_PROPS = {'host': '127.0.0.1', | |
'port': 3306, | |
'database': 'test', | |
'user': 'student', | |
'passwd': '123456'} |
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 networkx as nx | |
import matplotlib.pyplot as p | |
import random | |
N = 'num' | |
def route(G, a, b): | |
print 'seeking route from',a,'to',b | |
num = 0 | |
nodes = [a] |