Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge Iframe embedding
swh:1:cnt:6d70f2a29e834ed03f89acee4291236edfa7e35b

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
from os import path
import json
import argparse
import run_analysis
import csv
from collections import defaultdict
import matplotlib.pyplot as plt

'''''''''''
DCTCP = [0     0
10000 0.15
20000 0.2
30000 0.3
50000 0.4
80000 0.53
200000 0.6
1e+06 0.7
2e+06 0.8
5e+06 0.9
1e+07 0.97
3e+07 1]

VL2 = [0   0
180 0.1
216 0.2
560 0.3
900 0.4
1100 0.5
1870 0.6
3160 0.7
10000 0.8
400000 0.9
3.16e+06 0.95
1e+08 0.98
1e+09 1]

HULL = [0     0
5000 0.049940
10000 0.541151
20000 0.778391
40000 0.892970
80000 0.948308
160000 0.975034
320000 0.987942
640000 0.994177
1280000 0.997187
2560000 0.998642
5120000 0.999344
10240000 1
]
'''''''''''

def read_from_file(CDF_filename):
    X = []
    Y = []
    filename = str(CDF_filename)
    f = open(filename, 'r')
    
    for line in f.readlines():
        x, y = map(float, line.strip().split())
        X.append(x)
        Y.append(y)
    return X, Y


def prepare_for_plot(cdf_x, cdf_y):
    if cdf_y[0] == 0:
        cdf_x[0] = cdf_x[1] - 1
    
        

def main():
    
    DCTCP_X, DCTCP_Y = read_from_file("DCTCP_CDF")
    prepare_for_plot(DCTCP_X, DCTCP_Y)
    HULL_X, HULL_Y = read_from_file("HULL_CDF")
    prepare_for_plot(HULL_X, HULL_Y)
    VL2_X, VL2_Y = read_from_file("VL2_CDF")
    prepare_for_plot(VL2_X, VL2_Y)
    plt.plot(DCTCP_X, DCTCP_Y, label="pFabric")#, linestyle=":")
    plt.plot(HULL_X, HULL_Y , label="HULL")#, linestyle="_")
    plt.plot(VL2_X, VL2_Y, label="VL2")#, linestyle="-")
    plt.xlabel('Flow Size (bytes)')
    plt.ylabel('CDF')
    plt.legend()
    plt.xscale("log")
    plt.savefig("three distributions.pdf")
    plt.show()
    
if __name__ == "__main__":
    main()

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API