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/DavidJourdan/shrink-morph
16 March 2024, 10:32:01 UTC
  • Code
  • Branches (2)
  • Releases (0)
  • Visits
Revision ea9ea62b31c191587fcb2665df6251bd1703d8c1 authored by David Jourdan on 23 October 2023, 09:50:20 UTC, committed by GitHub on 23 October 2023, 09:50:20 UTC
Update build.yml
1 parent f0fb7fb
  • Files
  • Changes
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/v0.1-alpha
    • ea9ea62b31c191587fcb2665df6251bd1703d8c1
    No releases to show
  • b867c76
  • /
  • data
  • /
  • plot-layer.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.

  • revision
  • directory
  • content
  • snapshot
origin badgerevision badge
swh:1:rev:ea9ea62b31c191587fcb2665df6251bd1703d8c1
origin badgedirectory badge Iframe embedding
swh:1:dir:c1712a23403813e73b65c2af030d537818e738b8
origin badgecontent badge Iframe embedding
swh:1:cnt:08975eda1e24bd9b89f69a7b9a3f7167e9ab76ce
origin badgesnapshot badge
swh:1:snp:1f9dd2f26729a5f24dde6590a096445c9bed730a

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.

  • revision
  • directory
  • content
  • 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: ea9ea62b31c191587fcb2665df6251bd1703d8c1 authored by David Jourdan on 23 October 2023, 09:50:20 UTC
Update build.yml
Tip revision: ea9ea62
plot-layer.py
import matplotlib.pyplot as plt
import numpy as np
import sys

plt.axis('equal')
plt.axis('off')

if len(sys.argv) > 1:
	n = int(sys.argv[1])
else:
	n = 1

# Open the file for reading
with open('hat.path', 'r') as file:
	# Read the first line
	line = file.readline()
	
	# Continue reading lines until the end of the file is reached
	while line:
		x = []
		y = []
		num_vertices = int(line)
		for i in range(num_vertices):
			line = file.readline()
			line_data = line.strip().split()
			x.append(float(line_data[0]))
			y.append(float(line_data[1]))
			z = float(line_data[2])
		if z == n * 0.08:
			plt.plot(x, y, color='#6699cc', linewidth=0.5)
		line = file.readline()
plt.savefig('Layer ' + str(n) + '.svg')

The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

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