Skip to content

Instantly share code, notes, and snippets.

View kris7t's full-sized avatar

Kristóf Marussy kris7t

View GitHub Profile
#!/usr/bin/env python
import html
import json
import gi
import sys
gi.require_version('Playerctl', '2.0')
from gi.repository import Playerctl, GLib # noqa: E402
ARTIST = 'xesam:artist'
package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo
import java.util.Properties
import org.moeaframework.Executor
import org.moeaframework.Instrumenter
import org.moeaframework.algorithm.PeriodicAction
import org.moeaframework.core.TerminationCondition
import org.moeaframework.core.spi.AlgorithmFactory
import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run
import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.Optimisation
@kris7t
kris7t / PnmlImportTest.java
Last active November 9, 2018 17:16
Read PNML and NUPN from a plain Java (Gradle) project
package hu.bme.mit.theta.interchange.pnml;
import fr.lip6.move.pnml.framework.utils.*;
import fr.lip6.move.pnml.framework.utils.exception.*;
import fr.lip6.move.pnml.ptnet.*;
import fr.lip6.move.pnml.ptnet.hlapi.*;
import fr.lip6.nupn.*;
import fr.lip6.nupn.helper.*;
import org.junit.*;
{-# LANGUAGE RankNTypes, TupleSections #-}
module Main where
import Control.Arrow
import Data.Profunctor
type Optic p s t a b = p a b -> p s t
type An c s t a b = Optic (c a b) s t a b
mission DinnerParty(Table) with DiningPhilosophers {
initial phase start
phase arrived
phase waitForFinish
phase left
final phase finish
var Phil
start -> arrived [adjacentPhilosophers(Table, Left, Right)] after 10 weight (Left.eatingRate + Right.eatingRate) /
using NUnit.Framework;
using Pdn.LinearAlgebra;
using Pdn.LinearAlgebra.Concrete;
using Pdn.Workflows.TestFramework;
namespace Pdn.Stochastic.Tests.Steadystate
{
[TestFixture, WithWorkflow]
public class BicgstabTest : WorkflowTestFixture
{
[Test, WithWorkflow(@"
<Workflow xmlns='http://petridotnet.inf.mit.bme.hu/pdn/2016/xaml/analysis'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
xmlns:system='clr-namespace:System;assembly=mscorlib'
xmlns:test='clr-namespace:Pdn.Workflows.Test;assembly=Pdn.Workflows.Test'
xmlns:tfw='clr-namespace:Pdn.Workflows.TestFramework.Activities;assembly=Pdn.Workflows.TestFramework'>
<Workflow.Inputs>
<Input Name='UserName' Type='system:String' DefaultValue='from Source'/>
<Input Name='Expected' Type='system:String' />
</Workflow.Inputs>
using NUnit.Framework;
using Pdn.Workflows.TestFramework;
namespace Pdn.Workflows.Test
{
[TestFixture]
public class AutomaticWorkflowTest : WorkflowTestFixture
{
[Test, LoadWorkflow]
public void TestXaml()
% Szoftlab 5 LaTeX jzk sablon
%
% Keszitette: Dányi Bence, 2013.
%
% Windowson MiKTeX-szel lehet pdf-et létrehozni, XeLaTex kell
% hozzá a különböző betűtípusok miatt. (TeXworks-ben ez egy
% Typeset -> XeLaTex kiválasztását igényli csak)
%
% A sablon használata:
% 1. A fedlap adatainak kitöltése
#ifndef DISTANCES_H_
#define DISTANCES_H_
#include <map>
#include <typeindex>
#include <typeinfo>
#include <utility>
using Distance = double;