Search is not available for this dataset
repo
stringlengths
2
152
file
stringlengths
15
239
code
stringlengths
0
58.4M
file_length
int64
0
58.4M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
364 values
symphony-mt
symphony-mt-master/mt/src/main/scala/org/platanios/symphony/mt/vocabulary/CodedVocabulary.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
5,380
45.387931
120
scala
symphony-mt
symphony-mt-master/docs/src/main/scala/LoadPairwiseDataset.scala
import org.platanios.symphony.mt.Language._ import org.platanios.symphony.mt.data._ import org.platanios.symphony.mt.data.loaders.IWSLT15Loader import org.platanios.symphony.mt.data.processors._ import org.platanios.symphony.mt.vocabulary._ import java.nio.file.Paths object LoadPairwiseDataset { // #load_pairwise_...
927
28
108
scala
symphony-mt
symphony-mt-master/docs/src/main/paradox/index.md
# Symphony Machine Translation @@@ index * [Getting Started](getting-started.md) * [Data](data.md) * [Models](models.md) * [Learning](learning.md) * [Experiments](experiments.md) @@@ Symphony MT is a modular and extensible machine translation library that supports both pairwise and multilingual translation, across...
1,881
33.851852
77
md
symphony-mt
symphony-mt-master/docs/src/main/paradox/models.md
# Models ## Encoders - **Uni-directional RNN:** This represents one of the simplest encoders; a uni-directional (i.e., left-to-right) RNN encoder. This encoder takes as input a source sequence in some language and produces a tensor containing the RNN outputs for each time step and a final state which i...
802
32.458333
60
md
symphony-mt
symphony-mt-master/docs/src/main/paradox/learning.md
# Learning
11
5
10
md
symphony-mt
symphony-mt-master/docs/src/main/paradox/data.md
# Data The simplest place to start for learning to work with the data pipeline is an example for how to load a parallel dataset between two languages: @@snip [LoadPairwiseDataset.scala](../scala/LoadPairwiseDataset.scala) { #load_pairwise_dataset_example } ## Downloading Depending on the data loader you choose to...
638
30.95
105
md
symphony-mt
symphony-mt-master/docs/src/main/paradox/google-cloud-instructions.md
# Running on Google Compute Engine ## Installation ```bash #!/bin/bash export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ### Install CUDA echo "Checking for CUDA and installing." # Check for CUDA and try to install. if ! dpkg-query -W cuda-9-2; then # The 16.04 installer works with 16.10. # Adds NVIDIA pa...
1,639
36.272727
150
md
symphony-mt
symphony-mt-master/docs/src/main/paradox/getting-started.md
# Getting Started The easiest way to start experimenting and playing around with the SMT codebase for research purposes is to clone the repository and start working with that. If you want to use SMT in production, the best way is to add a dependency to the published artifacts in your codebase. The following two s...
2,266
25.670588
140
md
symphony-mt
symphony-mt-master/docs/src/main/paradox/experiments.md
# Experiments
14
6.5
13
md
symphony-mt
symphony-mt-master/docs/src/main/paradox/experiments-cli.md
# Experiments Command-Line Interface (CLI)
45
10.5
42
md
symphony-mt
symphony-mt-master/docs/src/main/paradox/assets/custom.css
.md-typeset { font-family: "Roboto", "Libre Franklin", "Open Sans", sans-serif; font-size: 16px; font-weight: 300; } [data-md-color-primary="white"] .md-header { color: rgb(230, 230, 230); background-color: rgb(40, 40, 40); } .md-header-nav { color: rgb(230, 230, 230); } .md-nav__link:active,...
9,126
37.673729
192
css
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/ParameterExtractor.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
3,801
40.78022
235
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/Server.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
1,096
30.342857
80
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/Experiment.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
13,610
45.613014
119
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/package.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
1,536
34.744186
98
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/ResultsAggregator.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
8,836
68.582677
296
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/Metric.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
3,146
33.966667
128
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/ExperimentResult.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
2,298
34.921875
80
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/LogParser.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
2,398
36.484375
117
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/config/InferenceConfigParser.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
1,437
37.864865
116
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/config/ParametersParser.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
4,922
45.009346
116
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/config/package.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
2,266
35.564516
80
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/config/ConfigParser.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
937
31.344828
80
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/config/EnvironmentParser.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
1,929
32.859649
100
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/config/ModelParser.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
18,760
49.980978
126
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/config/DataConfigParser.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
4,475
47.129032
118
scala
symphony-mt
symphony-mt-master/experiments/src/main/scala/org/platanios/symphony/mt/experiments/config/TrainingConfigParser.scala
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
11,696
53.152778
139
scala
vgspectra
vgspectra-master/plot_exp02.py
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # AUTHOR: Delia Fano Yela # DATE: February 2019 # CONTACT: d.fanoyela@qmul.ac.uk # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import pandas as pd import seaborn as sns import matplotlib.pyplot as plt #...
2,075
34.793103
91
py
vgspectra
vgspectra-master/plot_representation.py
from librosa import load import librosa import numpy as np from visibility_algorithms import nvg_dc import librosa.display import matplotlib.pyplot as plt mix_path = "AUDIO/DSDTEST/Mixtures/Dev/051 - AM Contra - Heart Peripheral/mixture.wav" mixture, sr = load(mix_path, sr=44100, mono=True) M = abs(librosa.core.stft...
2,102
30.863636
158
py
vgspectra
vgspectra-master/README.md
# vgspectra : Spectral Visibility Graphs This code accompanies the [paper](http://eusipco2019.org/Proceedings/papers/1570533774.pdf) "Spectral Visibility Graphs: Application to Similarity of Harmonic Signals" by Delia Fano Yela, Dan Stowell and Mark Sandler (EUSIPCO 2019) where we introduce the visibility graph for au...
2,410
51.413043
638
md
vgspectra
vgspectra-master/visibility_algorithms.py
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # AUTHOR: Delia Fano Yela # DATE: December 2018 # CONTACT: d.fanoyela@qmul.ac.uk # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Different implementations for computing the natural visibility graph (NVG)...
7,960
31.230769
97
py
vgspectra
vgspectra-master/plot_exp01.py
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # AUTHOR: Delia Fano Yela # DATE: February 2019 # CONTACT: d.fanoyela@qmul.ac.uk # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import pandas as pd import seaborn as sns import matplotlib.pyplot as plt # ...
1,827
36.306122
111
py
vgspectra
vgspectra-master/experiment02.py
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # AUTHOR: Delia Fano Yela # DATE: February 2019 # CONTACT: d.fanoyela@qmul.ac.uk # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # WARNING: this script uses multiprocessing => CPU intensive # you can chang...
6,301
37.426829
162
py
vgspectra
vgspectra-master/experiment01.py
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # AUTHOR: Delia Fano Yela # DATE: February 2019 # CONTACT: d.fanoyela@qmul.ac.uk # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Import the libraries that help for this experiment, # however, none are st...
6,640
47.123188
162
py
prfmap
prfmap-master/README.md
# PRFMap v2.0 Pythonic version of PRFMap, also including several changes in the intimate structure of the code. The original PRFMap was developed by Andreas Faisst (afaisst@ipac.caltech.edu) and Peter Capak. The program creates a set of FITS files modelling the Spizter/IRAC Point Response Function (PRF) at different p...
9,635
74.28125
760
md
prfmap
prfmap-master/src/manip_prf.py
import os,sys,string import subprocess import numpy as np from astropy.io import fits,ascii from scipy import ndimage import multiprocessing as mp import utils as utl def rotate(fits_in,fits_out,angle): """To ratate a PRF model by a PA angle. This replaces pyraf/IRAF imlintran""" iin = fits.getdata(fits_in) ...
3,253
36.837209
99
py
prfmap
prfmap-master/src/rotate_list.py
# Script to fast rotate images # USAGE # # python rotate.py INPUTFILE # # where INPUTFILE is file name of file containing: # # img_in_1 img_out_1 pa_1 # img_in_2 img_out_2 pa_2 # img_in_3 img_out_3 pa_3 # # Jan 21, 2016 by AF (anfaisst@gmail.com) # # MODIFICATION HISTORY # Aug 17, 2016 by AF: changed dtype=...
1,262
24.26
89
py
prfmap
prfmap-master/src/utils.py
import numpy as np from astropy.io import ascii,fits from astropy import table def read_fits(filename,hdu=0): """extract a table from a FITS file""" hdul = fits.open(filename) dat = hdul[hdu].data hdul.close() return dat def read_fits_head(filename,hdu=0): """extract the header from a FITS fil...
4,002
37.12381
170
py
prfmap
prfmap-master/src/break_list.py
import sys,os,getopt from astropy.io import fits,ascii from read_par import read_par import numpy as np if __name__ == '__main__': ################################# ### GET OPTIONS from COMMAND LINE verbose = False #default value debug = False #default value prll = False #default value options...
2,331
36.612903
125
py
prfmap
prfmap-master/src/prfmap.py
import sys,os,getopt import numpy as np import subprocess from astropy.io import ascii import utils as utl from read_par import read_par from draw_grid import draw_grid from find_models import find_models from manip_prf import rotate_and_stack ############################################# if __name__ == '__main__':...
3,602
35.765306
125
py
prfmap
prfmap-master/src/find_models.py
import sys,os import subprocess import numpy as np from astropy import table from astropy.io import ascii import utils as utl import multiprocessing as mp from pathlib import Path #global # this are the column names of FILE_PRFS colnames = ['ID_GRIDPT','PRF_NUMBER','RA_CEN','DEC_CEN','PA','FRAME'] # need this becau...
5,529
45.470588
176
py
prfmap
prfmap-master/src/draw_grid.py
import numpy as np import subprocess import utils as utl def draw_grid(frame_list,opt={},verbose=False,debug=False): """ draw_grid(frame_list,opt={},verbose=False,debug=False) Read the mosaic properties from its FITS file and define a grid of points where the PRF will be estimated. Grid c...
2,368
49.404255
240
py
prfmap
prfmap-master/src/read_par.py
def read_par(paramfile,list_out=False): # These are the parameter names should be included in that file: keywords = ('PATH_OUTPUT','FILE_MOSAIC','FILE_PRFMOD','FILE_FRAMELIST','FILE_GRID','FILE_PRFS','PRF_RAD','GRID_SPACE','PRF_SAMP','RA_LIM','DEC_LIM') if list_out: return keywords optpar = 2...
1,591
44.485714
152
py
prfmap
prfmap-master/src/resample_prf.py
import sys,os,getopt import subprocess from scipy.ndimage import zoom from astropy.io import fits from read_par import read_par if __name__ == '__main__': ################################# ### GET OPTIONS from COMMAND LINE verbose = False #default value debug = False #default value prll = False #d...
4,298
46.766667
145
py
RepairThemAll_experiment
RepairThemAll_experiment-master/README.md
# RepairThemAll Experiment This repository contains the raw results of the execution of 11 repair tools on 5 bug benchmarks presented in the following paper: ```bibtex @inproceedings{RepairThemAll2019, author = {Thomas Durieux and Fernanda Madeiral and Matias Martinez and Rui Abreu}, title = {{Empirical Re...
6,014
39.1
163
md
RepairThemAll_experiment
RepairThemAll_experiment-master/docs/index.html
<!-- index.html --> <!DOCTYPE html> <html lang="en" ng-app="defects4j-website" ng-controller="mainController"> <head> <meta charset="UTF-8"> <title>Repair Them All</title> <!-- CSS --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dG...
6,926
42.29375
211
html
RepairThemAll_experiment
RepairThemAll_experiment-master/docs/style/style.css
h2 { margin-top: 5px; } a { color: #5A6B7D; } #wrapper { padding-left: 0; } #page-wrapper { width: 100%; padding: 0; background-color: #fff; margin-top: 40px; } @media(min-width:768px) { #wrapper { padding-left: 300px; } #page-wrapper { padding: 22px 10px; }...
2,136
13.944056
69
css
RepairThemAll_experiment
RepairThemAll_experiment-master/script/get_patched_bugs.py
import os import json import re import datetime benchmarks = ["Bears", "Bugs.jar", "Defects4J", "IntroClassJava", "QuixBugs"] tools = ["Arja", "GenProg", "Kali", "RSRepair", "Cardumen", "jGenProg", "jKali", "jMutRepair", "Nopol", "DynaMoth", "NPEFix"] def percent(value, total): return int(value * 10000 / total)/1...
19,051
42.3
196
py
RepairThemAll_experiment
RepairThemAll_experiment-master/script/compress_log.py
import os import gzip import shutil ROOT = os.path.join(os.path.dirname(__file__), "..") nb_patch = 0 patch_per_tool = {} patch_per_bench = {} for benchmark in (os.listdir(os.path.join(ROOT, "results"))): benchmark_path = os.path.join(ROOT, "results", benchmark) for project in sorted(os.listdir(benchmark_pat...
1,534
41.638889
127
py
cba-pipeline-public
cba-pipeline-public-master/README.md
# Introduction This is the evaluation software for "CBA: Context-based Adaptation" by Bastian Alt, Trevor Ballard, Ralf Steinmetz, Heinz Koeppl and Amr Rizk. It emulates an NDN network with clients, servers, and caches, in which clients stream video provided by the servers and stored by the caches. The streaming is he...
22,459
106.980769
1,115
md
cba-pipeline-public
cba-pipeline-public-master/util/generate_topology.py
from graph_tool.all import * import numpy as np import math NUM_CLIENTS = 7 NUM_CACHES = 5 NUM_SERVERS = 4 NUM_INTERNAL_CACHES = 0 # Create the graph g = Graph(directed=False) clients = [g.add_vertex() for _ in range(NUM_CLIENTS)] caches = [g.add_vertex() for _ in range(NUM_CACHES)] servers = [g.add_vertex() for _ in...
1,729
33.6
109
py
cba-pipeline-public
cba-pipeline-public-master/containernet/setup.py
#!/usr/bin/env python "Setuptools params" from setuptools import setup, find_packages from os.path import join # Get version number from source tree import sys sys.path.append('.') from mininet.net import VERSION scripts = [join('bin', filename) for filename in ['mn']] modname = distname = 'mininet' setup( na...
1,323
26.020408
66
py
cba-pipeline-public
cba-pipeline-public-master/containernet/mnexec.c
/* mnexec: execution utility for mininet * * Starts up programs and does things that are slow or * difficult in Python, including: * * - closing all file descriptors except stdin/out/error * - detaching from a controlling tty using setsid * - running in network and mount namespaces * - printing out the pid ...
6,024
26.764977
78
c
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-experiment/trafficControl.py
import time import re import pandas as pd import re from dynamicLinkChange import * import locks TRACE = 'client1' # TODO remove, simply due to trace filenames def traffic_control(to_host, switch, epoch=-1): print('=======================================') print('Starting trace playback') print(epoch) ...
858
32.038462
80
py
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-experiment/topology.py
""" FROM https://raw.githubusercontent.com/icarus-sim/icarus/master/icarus/scenarios/topology.py Modified by Denny Stohr Functions for creating or importing topologies for experiments. To create a custom topology, create a function returning an instance of the `IcnTopology` class. An IcnTopology is simply a subclass ...
30,191
36.182266
111
py
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-experiment/start.sh
#!/bin/bash # Useful functions buildPlayer() { echo "Build Player" cd /home/ubuntu/containernet/ndn-containers/ndn_headless-player/ docker-compose build ndn-player } buildRepo() { echo "Build Repo" cd /home/ubuntu/containernet/ndn-containers/ndn_repo/ docker-compose build --build-arg STORAGE_TYPE=repon...
2,365
32.8
157
sh
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-experiment/locks.py
global STOP_TC
15
7
14
py
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-experiment/dynamicLinkChange.py
def reconfigureConnection(host, switch, bandwidth = None, delay = None, loss = None): opts = {} if bandwidth is not None: opts['bw'] = bandwidth if delay is not None: opts['delay'] = str(delay) + 'ms' if loss is not None: opts['loss'] = loss if opts: setLinkOptions(host, switch, opts) d...
1,066
23.813953
101
py
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-experiment/docker_ndn.py
#!/usr/bin/python from mininet.net import Containernet from mininet.node import Docker, OVSSwitch from mininet.log import setLogLevel, info from mininet.link import TCLink from mininet.topo import Topo from mininet.util import dumpNodeConnections import time from lxml import etree from subprocess import call from thre...
16,422
42.678191
118
py
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-experiment/bandwidth_traces/generate_random_traces.py
# Note, skip epoch 1 because that one used trevor_trace import csv import numpy as np for i in range(2, 21): np.random.seed(i) bws = [np.random.normal(7, 3) for _ in range(10000)] bws = [bw if bw > 0.5 else 0.5 for bw in bws] periods = [np.random.normal(5) for _ in range(10000)] periods = [per if p...
489
34
59
py
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-experiment/bandwidth_traces/generate_traces.py
import numpy as np import csv for client in range(1, 2): for epoch in range(1, 6): #bws = [np.random.gamma(6, 0.5) for _ in range(1000)] #pds = [np.random.gamma(2, 0.5) for _ in range(1000)] bws = [3.7, 3.2, 2.3, 1.7, 1.2, 1.2, 1.7, 2.3, 3.2, 3.7] bws = [bw - (epoch-1) * 0.1 for bw ...
701
38
103
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/miniedit.py
#!/usr/bin/python """ MiniEdit: a simple network editor for Mininet This is a simple demonstration of how one might build a GUI application using Mininet as the network model. Bob Lantz, April 2010 Gregory Gee, July 2013 Controller icon from http://semlabs.co.uk/ OpenFlow icon from https://www.opennetworking.org/ "...
154,479
42.090656
254
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/tree1024.py
#!/usr/bin/python """ Create a 1024-host network, and run the CLI on it. If this fails because of kernel limits, you may have to adjust them, e.g. by adding entries to /etc/sysctl.conf and running sysctl -p. Check util/sysctl_addon. """ from mininet.cli import CLI from mininet.log import setLogLevel from mininet.node...
522
26.526316
61
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/natnet.py
#!/usr/bin/python """ natnet.py: Example network with NATs h0 | s0 | ---------------- | | nat1 nat2 | | s1 s2 | | h1 h2 """ from mininet.topo import Topo from mininet.net ...
1,948
26.842857
77
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/linearbandwidth.py
#!/usr/bin/python """ Test bandwidth (using iperf) on linear networks of varying size, using both kernel and user datapaths. We construct a network of N hosts and N-1 switches, connected as follows: h1 <-> s1 <-> s2 .. sN-1 | | | h2 h3 hN WARNING: by default, the reference controller o...
3,988
30.409449
73
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/intfoptions.py
#!/usr/bin/python ''' example of using various TCIntf options. reconfigures a single interface using intf.config() to use different traffic control commands to test bandwidth, loss, and delay ''' from mininet.net import Mininet from mininet.log import setLogLevel, info from mininet.link import TCLink def intfOptions...
1,320
25.959184
65
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/sshd.py
#!/usr/bin/python """ Create a network and start sshd(8) on each host. While something like rshd(8) would be lighter and faster, (and perfectly adequate on an in-machine network) the advantage of running sshd is that scripts can work unchanged on mininet and hardware. In addition to providing ssh access to hosts, th...
3,040
34.360465
73
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/controlnet.py
#!/usr/bin/python """ controlnet.py: Mininet with a custom control network We create two Mininet() networks, a control network and a data network, running four DataControllers on the control network to control the data network. Since we're using UserSwitch on the data network, it should correctly fail over to a back...
4,967
30.245283
76
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/cluster.py
#!/usr/bin/python """ cluster.py: prototyping/experimentation for distributed Mininet, aka Mininet: Cluster Edition Author: Bob Lantz Core classes: RemoteNode: a Node() running on a remote server RemoteOVSSwitch(): an OVSSwitch() running on a remote server RemoteLink: a Link() on a remote se...
33,412
35.51694
79
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/popenpoll.py
#!/usr/bin/python "Monitor multiple hosts using popen()/pmonitor()" from mininet.net import Mininet from mininet.topo import SingleSwitchTopo from mininet.util import pmonitor from time import time from signal import SIGINT def pmonitorTest( N=3, seconds=10 ): "Run pings and monitor multiple hosts using pmonitor...
932
26.441176
57
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/consoles.py
#!/usr/bin/python """ consoles.py: bring up a bunch of miniature consoles on a virtual network This demo shows how to monitor a set of nodes by using Node's monitor() and Tkinter's createfilehandler(). We monitor nodes in a couple of ways: - First, each individual node is monitored, and its output is added to its...
15,612
32.432548
79
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/nat.py
#!/usr/bin/python """ Example to create a Mininet topology and connect it to the internet via NAT """ from mininet.cli import CLI from mininet.log import lg from mininet.topolib import TreeNet if __name__ == '__main__': lg.setLogLevel( 'info') net = TreeNet( depth=1, fanout=4 ) # Add NAT connectivity ...
550
24.045455
75
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/mobility.py
#!/usr/bin/python """ Simple example of Mobility with Mininet (aka enough rope to hang yourself.) We move a host from s1 to s2, s2 to s3, and then back to s1. Gotchas: The reference controller doesn't support mobility, so we need to manually flush the switch flow tables! Good luck! to-do: - think about wifi/hub ...
4,198
30.103704
71
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/multilink.py
#!/usr/bin/python """ This is a simple example that demonstrates multiple links between nodes. """ from mininet.cli import CLI from mininet.log import setLogLevel from mininet.net import Mininet from mininet.topo import Topo def runMultiLink(): "Create and run multiple link network" topo = simpleMultiLinkTop...
834
21.567568
59
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/scratchnetuser.py
#!/usr/bin/python """ Build a simple network from scratch, using mininet primitives. This is more complicated than using the higher-level classes, but it exposes the configuration details and allows customization. For most tasks, the higher-level API will be preferable. This version uses the user datapath and an exp...
2,455
32.189189
74
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/simpleperf.py
#!/usr/bin/python """ Simple example of setting network and CPU parameters NOTE: link params limit BW, add latency, and loss. There is a high chance that pings WILL fail and that iperf will hang indefinitely if the TCP handshake fails to complete. """ from mininet.topo import Topo from mininet.net import Mininet fro...
1,888
31.568966
71
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/vlanhost.py
#!/usr/bin/env python """ vlanhost.py: Host subclass that uses a VLAN tag for the default interface. Dependencies: This class depends on the "vlan" package $ sudo apt-get install vlan Usage (example uses VLAN ID=1000): From the command line: sudo mn --custom vlanhost.py --host vlan,vlan=1000 ...
3,679
28.44
75
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/treeping64.py
#!/usr/bin/python "Create a 64-node tree network, and test connectivity using ping." from mininet.log import setLogLevel from mininet.node import UserSwitch, OVSKernelSwitch # , KernelSwitch from mininet.topolib import TreeNet def treePing64(): "Run ping test on 64-node tree networks." results = {} swi...
950
27.818182
70
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/numberedports.py
#!/usr/bin/python """ Create a network with 5 hosts, numbered 1-4 and 9. Validate that the port numbers match to the interface name, and that the ovs ports match the mininet ports. """ from mininet.net import Mininet from mininet.node import Controller from mininet.log import setLogLevel, info, warn def validatePort...
2,330
28.1375
72
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/controllers2.py
#!/usr/bin/python """ This example creates a multi-controller network from semi-scratch by using the net.add*() API and manually starting the switches and controllers. This is the "mid-level" API, which is an alternative to the "high-level" Topo() API which supports parametrized topology classes. Note that one could...
1,612
25.016129
76
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/bind.py
#!/usr/bin/python """ bind.py: Bind mount example This creates hosts with private directories that the user specifies. These hosts may have persistent directories that will be available across multiple mininet session, or temporary directories that will only last for one mininet session. To specify a persistent direc...
2,310
32.985294
69
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/clustercli.py
#!/usr/bin/python "CLI for Mininet Cluster Edition prototype demo" from mininet.cli import CLI from mininet.log import output, error # pylint: disable=global-statement nx, graphviz_layout, plt = None, None, None # Will be imported on demand class ClusterCLI( CLI ): "CLI with additional commands for Cluster Ed...
3,875
37.376238
77
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/README.md
Mininet Examples ======================================================== These examples are intended to help you get started using Mininet's Python API. ======================================================== #### baresshd.py: This example uses Mininet's medium-level API to create an sshd process running in a nam...
4,965
26.588889
82
md
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/baresshd.py
#!/usr/bin/python "This example doesn't use OpenFlow, but attempts to run sshd in a namespace." import sys from mininet.node import Host from mininet.util import ensureRoot, waitListening ensureRoot() timeout = 5 print "*** Creating nodes" h1 = Host( 'h1' ) root = Host( 'root', inNamespace=False ) print "*** Crea...
1,074
23.431818
77
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/scratchnet.py
#!/usr/bin/python """ Build a simple network from scratch, using mininet primitives. This is more complicated than using the higher-level classes, but it exposes the configuration details and allows customization. For most tasks, the higher-level API will be preferable. """ from mininet.net import Mininet from minin...
2,032
28.463768
67
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/linuxrouter.py
#!/usr/bin/python """ linuxrouter.py: Example network with Linux IP router This example converts a Node into a router using IP forwarding already built into Linux. The example topology creates a router and three IP subnets: - 192.168.1.0/24 (r0-eth1, IP: 192.168.1.1) - 172.16.0.0/12 (r0-eth2, IP: 172.16.0.1...
2,826
30.411111
70
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/controllers.py
#!/usr/bin/python """ Create a network where different switches are connected to different controllers, by creating a custom Switch() subclass. """ from mininet.net import Mininet from mininet.node import OVSSwitch, Controller, RemoteController from mininet.topolib import TreeTopo from mininet.log import setLogLevel ...
1,061
27.702703
69
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/__init__.py
""" Mininet Examples See README for details """
48
8.8
22
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/limit.py
#!/usr/bin/python """ limit.py: example of using link and CPU limits """ from mininet.net import Mininet from mininet.link import TCIntf from mininet.node import CPULimitedHost from mininet.topolib import TreeTopo from mininet.util import custom, quietRun from mininet.log import setLogLevel, info def testLinkLimit(...
2,034
32.360656
75
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/popen.py
#!/usr/bin/python """ This example monitors a number of hosts using host.popen() and pmonitor() """ from mininet.net import Mininet from mininet.node import CPULimitedHost from mininet.topo import SingleSwitchTopo from mininet.log import setLogLevel from mininet.util import custom, pmonitor def monitorhosts( hosts=5...
1,023
26.675676
64
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/emptynet.py
#!/usr/bin/python """ This example shows how to create an empty Mininet object (without a topology object) and add nodes to it manually. """ from mininet.net import Mininet from mininet.node import Controller from mininet.cli import CLI from mininet.log import setLogLevel, info def emptyNet(): "Create an empty ...
960
20.355556
57
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/cpu.py
#!/usr/bin/python """ cpu.py: test iperf bandwidth for varying cpu limits """ from mininet.net import Mininet from mininet.node import CPULimitedHost from mininet.topolib import TreeTopo from mininet.util import custom, waitListening from mininet.log import setLogLevel, info def bwtest( cpuLimits, period_us=100000,...
2,119
27.648649
68
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/docker_ndn.py
#!/usr/bin/python """ """ from mininet.net import Containernet from mininet.node import Controller, Docker, OVSSwitch from mininet.cli import CLI from mininet.log import setLogLevel, info from mininet.link import TCLink, Link from mininet.util import dumpNodeConnections import fnss import time import re from IPython...
7,197
32.170507
192
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/hwintf.py
#!/usr/bin/python """ This example shows how to add an interface (for example a real hardware interface) to a network after the network is created. """ import re import sys from mininet.cli import CLI from mininet.log import setLogLevel, info, error from mininet.net import Mininet from mininet.link import Intf from ...
1,549
27.703704
69
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/dockerhosts.py
#!/usr/bin/python """ This example shows how to create a simple network and how to create docker containers (based on existing images) to it. """ from mininet.net import Containernet from mininet.node import Controller, Docker, OVSSwitch from mininet.cli import CLI from mininet.log import setLogLevel, info from minin...
2,290
27.6375
104
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/multitest.py
#!/usr/bin/python """ This example shows how to create a network and run multiple tests. For a more complicated test example, see udpbwtest.py. """ from mininet.cli import CLI from mininet.log import lg, info from mininet.net import Mininet from mininet.node import OVSKernelSwitch from mininet.topolib import TreeTopo...
1,049
28.166667
78
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/clusterdemo.py
#!/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 def demo(): "Simple Demo of Cluster...
639
26.826087
68
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/multipoll.py
#!/usr/bin/python """ Simple example of sending output to multiple files and monitoring them """ from mininet.topo import SingleSwitchTopo from mininet.net import Mininet from mininet.log import setLogLevel from time import time from select import poll, POLLIN from subprocess import Popen, PIPE def monitorFiles( ou...
2,469
29.121951
68
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/multiping.py
#!/usr/bin/python """ multiping.py: monitor multiple sets of hosts using ping This demonstrates how one may send a simple shell script to multiple hosts and monitor their output interactively for a period= of time. """ from mininet.net import Mininet from mininet.node import Node from mininet.topo import SingleSwitc...
2,235
25.619048
67
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/clusterSanity.py
#!/usr/bin/env python ''' A sanity check for cluster edition ''' from mininet.examples.cluster import MininetCluster from mininet.log import setLogLevel from mininet.examples.clustercli import ClusterCLI as CLI from mininet.topo import SingleSwitchTopo def clusterSanity(): "Sanity check for cluster mode" top...
501
20.826087
57
py