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

Revision ff449f8805685122cd6192fd6e21eadae8d97a70 authored by David Jourdan on 26 February 2024, 19:02:51 UTC, committed by David Jourdan on 26 February 2024, 19:02:51 UTC
remove unused
1 parent 0d89cc9
  • Files
  • Changes
  • 929e0ee
  • /
  • data
  • /
  • plot-layer.py
Raw File Download
Permalinks

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
revision badge
swh:1:rev:ff449f8805685122cd6192fd6e21eadae8d97a70
directory badge Iframe embedding
swh:1:dir:c1712a23403813e73b65c2af030d537818e738b8
content badge Iframe embedding
swh:1:cnt:08975eda1e24bd9b89f69a7b9a3f7167e9ab76ce
Citations

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
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 ...
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— Contact— JavaScript license information— Web API