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/python | |
"clusterdemo.py: demo of Mininet Cluster Edition prototype" | |
from mininet.examples.cluster import MininetCluster, SwitchBinPlacer | |
from mininet.topolib import TreeTopo | |
from mininet.log import setLogLevel | |
from mininet.examples.clustercli import ClusterCLI as CLI | |
from mininet.node import Controller, RemoteController | |
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/python | |
from mininet.examples.cluster import MininetCluster, SwitchBinPlacer | |
from mininet.topolib import TreeTopo | |
from mininet.topo import LinearTopo | |
from mininet.log import setLogLevel, info | |
from mininet.examples.clustercli import ClusterCLI as CLI | |
from mininet.net import Mininet | |
from mininet.node import Controller, RemoteController | |
from mininet.util import dumpNodeConnections |
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 | |
''' | |
Research yield | |
http://www.ibm.com/developerworks/cn/opensource/os-cn-python-yield/ | |
''' | |
import time | |
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
#!/usr/bin/env python3 | |
''' | |
Research counter | |
''' | |
''' | |
Use dict() | |
''' | |
data = ['a', '2', 2, 4, 5, '2', 'b', 4, 7, 'a', 5, 'd', 'a', 'z'] | |
count_freq = dict() |
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/python | |
""" | |
vxlan_mininet.py | |
mininet1 mininet2 | |
-------- -------- | |
| | | | | |
| s1=========s2 | | |
| | | | | | |
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/python | |
""" | |
gre_mininet.py | |
mininet1 mininet2 | |
-------- -------- | |
| | | | | |
| s1=========s2 | | |
| | | | | | |
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/sh | |
APP_PATH=~/ryuInstallHelper/ryu/ryu/tests/switch | |
TEST_TARGET_SWITCH="0000000000000001" | |
AUXILIARY_SWITCH="0000000000000002" | |
TEST_PATTERN="of13" | |
ryu-manager --test-switch-target $TEST_TARGET_SWITCH \ | |
--test-switch-tester $AUXILIARY_SWITCH \ | |
--test-switch-dir $APP_PATH/$TEST_PATTERN \ | |
$APP_PATH/tester.py |
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
<?php | |
$arr = array(0=>1,"aa"=>2, 3, 4); | |
foreach($arr as $key=>$val){ | |
print($key == "aa" ? 5 : $val); | |
} | |
?> |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
hostname bgp1 | |
password sdnip | |
! | |
router bgp 65000 | |
bgp router-id 192.168.10.101 | |
timers bgp 3 9 | |
! | |
neighbor 192.168.10.1 remote-as 65001 | |
neighbor 192.168.10.1 ebgp-multihop | |
neighbor 192.168.10.1 timers connect 5 |