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 sys, os, re | |
from django import template | |
from django.template import loader | |
TURING_MACHINE = """ | |
{% if not current_state %} | |
{% with INITIAL_STATE as current_state %} | |
{% with INITIAL_HEAD|default:0|add:1 as pos %} | |
{% with "@"|add:TAPE as tape %} | |
{% with "TURING_MACHINE" as tm_tpl %} |
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
class Worker(object): | |
def __init__(self, tasks): | |
self.enabled = True | |
self.tasks = set(tasks) | |
def is_active(self): | |
return self.enabled and self.tasks | |
def run(self): | |
if self.enabled: |
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
### Keybase proof | |
I hereby claim: | |
* I am emulbreh on github. | |
* I am emulbreh (https://keybase.io/emulbreh) on keybase. | |
* I have a public key ASCOMlAGGEUChBcqzgGr7pm8Cq4ivqItmhmcLVNYBxSwfQo | |
To claim this, I am signing this object: |