Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ramsesoriginal on github.
  • I am ramsesoriginal (https://keybase.io/ramsesoriginal) on keybase.
  • I have a public key ASB8Fg0ZSuMmbJ4BXHSNsp6uL7ZcVyBFHDVljMKbxE1W2Qo

To claim this, I am signing this object:

@ramsesoriginal
ramsesoriginal / PA07_test.py
Created July 3, 2018 08:20
The Final Problem
seeds = [\
[],
[[]],
[[],[]],
[[0]],
[[1]],
[[0],[0]],
[[1],[0]],
[[0],[0],[0]],
def computeAndPrint(type, start, nodes, edges):
G = type(nodes, edges)
ford(G, nodes[start])
print("Ford von " + nodes[start].name + " mit " + type.__name__)
print([n.name + " y:" + str(n.y) for n in nodes])
print([(n.p.name if n.p is not None else "None") + "->" + n.name for n in nodes])
print('')
def test():
def test():
class Node(object):
def __init__(self, name, *successors):
self.successors = list(successors)
self.name = name
self.color = "white"
def __repr__(self):
@ramsesoriginal
ramsesoriginal / PSP
Created January 30, 2018 12:24
Matnatfat
MatNatFat
name: MatNatFat
Cont
name: Controlling
parent: MatNatFat
Rec
name: Recherche
parent: MatNatFat
Ent
@ramsesoriginal
ramsesoriginal / pa10test.py
Last active January 21, 2018 04:29
PA10 Test Functions
import sys
class ListStream:
def __init__(self):
self.data = []
def write(self, s):
@ramsesoriginal
ramsesoriginal / tests.py
Last active January 15, 2018 15:03
PA09 Test
import time
outputBuffer = ""
output = ""
def out(s = False, l = False, trimList=True):
global outputBuffer
if s:
@ramsesoriginal
ramsesoriginal / debugtest.py
Created January 2, 2018 21:26
PA08 Testfunktion
def test(title="Test", expression="x0", expectedResult=(True, 0), expectedException = False, arguments=[True], hideOK = False):
out = "\n" + title + "\n"
out = out + '\tauswertung ("' + expression + '", ' + str(arguments) + ')'
reraise = False
if expectedException:
out = out + "\n" + "\tResult should be an exception"
else:
out = out + "\n" + "\tResult should be: " + str(expectedResult)
try:
'''testStart
testCategory Tests aus der Angabe
testName Weg Findbar
maxtime 3
expectedResult 11
call abstand((0, 9), (2, 2))
testName Weg Nicht Findbar
'''testStart
testCategory Tests aus der Angabe
testName Weg Findbar
maxtime 3
expectedResult 11
call abstand((0, 9), (2, 2))
testName Weg Nicht Findbar