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
Note (minor): could not create multicast responder for address FF31:113D:6FDD:2C17:A643:FFE2:1BD1:3CD2 (failed with: set_option: No such device) | |
Note (minor): could not create multicast responder for address FF02:113D:6FDD:2C17:A643:FFE2:1BD1:3CD2 (failed with: set_option: No such device) | |
Note (minor): could not create multicast responder for address FF05:113D:6FDD:2C17:A643:FFE2:1BD1:3CD2 (failed with: set_option: No such device) | |
INFO:pygatt.backends.bgapi.bgapi:Initialized new BGAPI backend | |
INFO:pygatt.backends.bgapi.bgapi:Auto-detecting serial port for BLED112 | |
DEBUG:pygatt.backends.bgapi.util:Found 2 serial USB devices | |
DEBUG:pygatt.backends.bgapi.util:Checking serial USB device: /dev/ttyS0 - ttyS0 | |
DEBUG:pygatt.backends.bgapi.util:Checking serial USB device: /dev/ttyACM0 - Low Energy Dongle - CDC control | |
DEBUG:pygatt.backends.bgapi.util:USB device: Low Energy Dongle - CDC control VID=0x2458 PID=0x0001 on /dev/ttyACM0 | |
INFO:pygatt.backends.bgapi.bgapi:Found BLED112 on serial port /dev/ttyACM0 |
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 itertools import product | |
phi = frozenset() | |
y = frozenset({''}) | |
syms = O, l = frozenset({'0'}), frozenset({'1'}) | |
AND, CONS, KSTAR, NOT, OR = 'and cons * not or'.split() |
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
/* | |
Via https://www.metalevel.at/prolog/puzzles | |
The "Zebra Puzzle" https://en.wikipedia.org/wiki/Zebra_Puzzle | |
- There are five houses. | |
- The Englishman lives in the red house. | |
- The Spaniard owns the dog. | |
- Coffee is drunk in the green house. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python | |
from string import letters, digits | |
from random import choice | |
# Get a list of unambiguous ASCII characters. (It must be a list as | |
# sets don't work with random.choice().) | |
chars = list(set(letters + digits) - set('oO0I1lB8S5b6')) | |
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
{ | |
"metadata": { | |
"name": "Solving Logic Puzzles with the Laws of Form Notation" | |
}, | |
"name": "Solving Logic Puzzles with the Laws of Form Notation", | |
"nbformat": 2, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
#!/usr/bin/env python | |
from omega import BaseParser | |
from logpy import run, eq, membero, var, conde | |
# Still TODO: membero and conde | |
#: Namespace for storing logic variable as they are defined. | |
variables = {} | |
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
#!/usr/bin/env python | |
''' | |
A simple demonstration of a deterministic and context-free "DOL-system" | |
"...used to simulate the development of a fragment of a multicellular | |
filament such as that found in the blue-green bacteria Anabaena catenula..." | |
- "The Algorithmic Beauty of Plants" http://algorithmicbotany.org/papers/#abop | |
Implemented by simple parsers in the Omega parser language (a variant of | |
Warth's OMeta language.) https://gitorious.org/python-omega | |
''' |
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 nlp import unconscious_connection | |
behavior = 'some behaviour you want to change' | |
urmind = unconscious_connection() | |
G = urmind.get_generative_part() | |
I = urmind.intention_of(behavior) |
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 pigeon.xerblin.world import ROOT | |
def trreee(node): | |
key, value, lower, higher = node | |
it = {'name': key} | |
children = [] | |
if lower: | |
children.append(trreee(lower)) | |
if higher: | |
children.append(trreee(higher)) |
NewerOlder