This file contains hidden or 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
from pysat.formula import * | |
from collections import namedtuple | |
P = namedtuple('P', ['x', 'y', 'z']) | |
boxes = {} | |
depth = 7 | |
width = 3 | |
height = 3 |
This file contains hidden or 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
def ELFHash(key): | |
h = 0 | |
x = 0 | |
for k in key: | |
h = (h << 4) + ord(k) | |
x = h & 0xF0000000 | |
if x != 0: | |
h ^= (x>>24) | |
h &= ~x | |
return hex(h & 0x7FFFFFFF)[2:].rjust(8, "0") |
This file contains hidden or 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
from collections.abc import Mapping | |
from itertools import chain | |
def _raise(ex): | |
raise ex | |
def empty(_ = None): | |
class __puredict(puredict): | |
__len__ = lambda _: 0 | |
__getitem__ = lambda _, __: _raise(KeyError()) |
This file contains hidden or 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
model = []; | |
delete_node = function(node, m) { | |
if (m === undefined) { m = model; } | |
for (var i = 0; i < m.length; i++) { | |
if (m[i] == node) { | |
m.splice(i, 1); | |
break; | |
} | |
else { |
This file contains hidden or 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 numpy as np | |
from matplotlib.figure import Figure | |
from matplotlib.backends.backend_gtk3cairo import FigureCanvasGTK3Cairo as FigureCanvas | |
from gi.repository import Gtk | |
import time | |
from gi.repository import GObject | |
class MyWindow(Gtk.ApplicationWindow): | |
def __init__(self): |
This file contains hidden or 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
{-# language GeneralizedNewtypeDeriving #-} | |
import qualified OBDD as O | |
import OBDD(OBDD) | |
import qualified Data.Array as A | |
import qualified Data.Set as S | |
import qualified Data.Maybe as M | |
import System.Environment |
This file contains hidden or 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
{-# language GeneralizedNewtypeDeriving #-} | |
import qualified OBDD as O | |
import OBDD(OBDD) | |
import qualified Data.Array as A | |
import qualified Data.Set as S | |
import qualified Data.Maybe as M | |
import System.Environment |
This file contains hidden or 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
-- Is canonical representation with regards to renaming | |
canonical_renaming :: Idx -> (Word, Word) -> OBDD Var | |
canonical_renaming (Idx sigma) (l,r) = if (sigma > 2) then (crn (Idx 0) (l++r)) else (head (head l)) | |
crn :: Idx -> Word -> OBDD Var | |
crn (Idx prog) w = case w of | |
[] -> O.constant True | |
l:ls -> ((O.or (take (prog) l)) O.&& (crn (Idx prog) ls)) | |
O.|| ((l !! (min (prog)(length l - 1))) O.&& (crn (Idx (prog+1)) ls)) |
This file contains hidden or 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
# -*- mode: python -*- | |
# | |
# jhbuildrc for building gnome-shell. Customizations shuld be done in | |
# ~/.jhbuildrc-custom | |
# | |
# Copyright (C) 2008 Red Hat, Inc. | |
# | |
# Some ideas and a bit of code taken from gtk-osx-build | |
# | |
# Copyright (C) 2006, 2007, 2008 Imendio AB |
This file contains hidden or 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
#include <stdio.h> | |
#include "mpi.h" | |
/* Funktion, welche integriert wird */ | |
double f(double x) | |
{ | |
return 4/(1.0+x*x); | |
} |
NewerOlder