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

https://github.com/ShikamaruZhang/MANN
31 March 2020, 09:32:12 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    No releases to show
  • a6e8e30
  • /
  • Utils.py
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

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
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:898f739354f3cc2d4e9e428ffea95dbb7fb55814
origin badgedirectory badge Iframe embedding
swh:1:dir:a6e8e30292b31e92ecf2a6e99a6a105d97f0bbb5
origin badgerevision badge
swh:1:rev:914f5ddb06a3853f2f60a09d156702154b084cb3
origin badgesnapshot badge
swh:1:snp:42a61ec11033680719ca94e3d4e866d9f7fc9d6f

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
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 914f5ddb06a3853f2f60a09d156702154b084cb3 authored by HE ZHANG on 27 July 2018, 20:03:31 UTC
change-index
Tip revision: 914f5dd
Utils.py
import os.path

def build_path(path):
    for i in path:
        if not os.path.exists(i):
            os.makedirs(i)
    

def Normalize(X, axis, savefile= None):
    Xmean, Xstd = X.mean(axis=axis), X.std(axis=axis)
    for i in range(Xstd.size):
        if (Xstd[i]==0):
            Xstd[i]=1
    X = (X - Xmean) / Xstd
    if savefile != None:
        Xmean.tofile(savefile+'mean.bin')
        Xstd.tofile(savefile+'std.bin')
    return X

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