This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<meta name="viewport" content="width=device-width,initial-scale=1"/> | |
<title>pflow.dev | metamodel editor</title> | |
<script defer="defer" src="https://cdn.jsdelivr.net/gh/pflow-dev/pflow-js@1.1.0/p/static/js/main.4602f11c.js"> </script> | |
<link href="https://cdn.jsdelivr.net/gh/pflow-dev/pflow-js@1.1.0/p/static/css/main.63d515f3.css" rel="stylesheet"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.18; | |
import "@openzeppelin/contracts/access/AccessControl.sol"; | |
// import "hardhat/console.sol"; | |
library Uint8Model { | |
event Action(uint256 indexed session, uint8 indexed sequence, uint8 actionId, uint8 role, uint256 when); | |
struct PetriNet { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See UML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// REVIEW visual model design in JS: | |
// https://pflow.dev/chainlink2023/tictactoe/ | |
contract TicTacToeModel is MetamodelUint8, Uint8ModelFactory { | |
enum Roles{ X, O, HALT } | |
enum Properties { | |
_00, _01, _02, | |
_10, _11, _12, | |
_20, _21, _22, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.18; | |
import "@openzeppelin/contracts/access/AccessControl.sol"; | |
contract MetamodelUint8 { | |
Place[] internal places; | |
Transition[] internal transitions; | |
struct PetriNet { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.18; | |
// Uncomment this line to use console.log | |
// import "hardhat/console.sol"; | |
// see also: bitwrap.io: where we are developing a generalized state channel for web3 | |
contract Metamodel { | |
address payable public owner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import random | |
import torchflow | |
import torch | |
import examples.tictactoe | |
win_moves = [ | |
["00", "01", "02"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# backup world in IPFS | |
cd "${BASH_SOURCE%/*}" || exit | |
ROOT='vevr.se' | |
WORLD="foo7" | |
TS=$(date +%s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding:utf-8 -*- | |
import sys | |
import os | |
picdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'pic') | |
libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib') | |
if os.path.exists(libdir): | |
sys.path.append(libdir) | |
import logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pubsub_test | |
import ( | |
"github.com/FactomProject/factomd/common/constants" | |
"github.com/FactomProject/factomd/common/interfaces" | |
"github.com/FactomProject/factomd/common/messages" | |
. "github.com/FactomProject/factomd/pubsub" | |
"testing" | |
"time" | |
) |
NewerOlder