Skip to content

Instantly share code, notes, and snippets.

View napo's full-sized avatar
💭
guru meditation

Maurizio Napolitano napo

💭
guru meditation
View GitHub Profile
@napo
napo / pacman.bas
Last active January 9, 2025 20:57
pacman msx2 prototype
10 SCREEN 2: COLOR 15,0,0: CLS
20 DIM LAB(15,15): REM MATRICE LABIRINTO
30 SPRITE$(0)="0008183C7EFFFF7E3C180000": REM SPRITE PACMAN
40 SPRITE$(1)="0000000000183C7EFFFF0000": REM SPRITE FANTASMA
50 SPRITE$(2)="003C7E7E7E3C0000000000": REM SPRITE PILLOLE
60 REM INIZIALIZZAZIONE LABIRINTO
70 FOR X=1 TO 15: FOR Y=1 TO 15
80 IF X=1 OR X=15 OR Y=1 OR Y=15 THEN LAB(X,Y)=1
90 NEXT Y: NEXT X
100 FOR I=2 TO 14: LAB(I,INT(RND(1)*13)+2)=1: NEXT I
@napo
napo / adventure_penguin.svg
Created November 29, 2024 13:59
MSX Adeventure Penguin
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@napo
napo / config_trento.yml
Created October 10, 2024 15:02
config_trento.yml for grapphoper
graphhopper:
datareader.file: "022205_Trento.osm.pbf"
graph.location: graph-cache
profiles:
- name: car
custom_model_files: [car.json]
- name: foot
custom_model_files: [foot.json] #, foot_elevation.json]
- name: bike
custom_model_files: [bike.json] #, bike_elevation.json]
@napo
napo / journey_trento_downtown.gpx
Created October 10, 2024 14:48
journey_trento_downtown.gpx
<?xml version="1.0"?>
<gpx xmlns:wptx1="http://www.garmin.com/xmlschemas/WaypointExtension/v1" xmlns:gpxedw="http://www.gpxeditor.co.uk/xmlschemas/WaypointExtension/v1" xmlns:gpxedts="http://www.gpxeditor.co.uk/xmlschemas/TrackSegExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" creator="GPXEditor" version="1.1" xmlns="http://www.topografix.com/GPX/1/1">
<trk>
<name>Journey</name>
<trkseg>
<trkpt lat="46.06676" lon="11.11954" />
<trkpt lat="46.06677" lon="11.12024" />
</trkseg>
<trkseg>
<trkpt lat="46.06677" lon="11.12024" />
@napo
napo / points_verona.geojson
Created October 3, 2024 14:36
points_verona.geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@napo
napo / esercizio di ascolto.md
Created May 17, 2024 09:42
esercizio di ascolto.md

Nome: ___

PROVA DA EFFETTUARE IN UN MASSIMO DI 3 MINUTI

Istruzioni:

  1. Prima di fare qualsiasi altra cosa, leggi solo attentamente le seguenti istruzioni da 1 a 21
  2. Digita il tuo nome nell’angolo a destra in alto di questo foglio
  3. Metti in grassetto la parola “nome” della seconda istruzione
  4. Con la funzione “inserisci casella di testo”, aggiungi 5 piccoli quadrati nell’angolo a sinistra in alto di questo foglio
  5. Scrivi una “X” dentro ognuna di queste caselle di testo
import urllib
import json
file_url = 'https://api.datawrapper.de/v3/basemaps/rome-zip'
file_json = "rome.json"
file_output = "rome.topojson"
urllib.request.urlretrieve(file_url ,file_json)
with open(file_json, 'r') as f:
json_data = json.load(f)
topojson = dict(json_data["content"])
with open(file_output, 'w') as f:
{
"vehicles": [
{
"id": 1,
"description": "Vehicle 1",
"profile": "driving-car",
"capacity": [
250
],
"start": [
{
"vehicles": [
{
"id": 1,
"description": "Vehicle 1",
"profile": "driving-car",
"capacity": [
250
],
"start": [