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
######### ZEROMQ ###################### | |
# Create ZMQ server: | |
# in __init__ or something: | |
from tattletale import tattletale | |
from tattletale_zmq import socket as we_just_need_to_load_this | |
server_port = "5556" | |
server_addr = "127.0.0.1" | |
server_host = "tcp://{}:{}".format(server_addr, server_port) |
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
#to use: | |
#print gen('john', 'smith', 'foo', 3, 8) | |
# requires fuzzy (https://pypi.python.org/pypi/Fuzzy) | |
# pip install fuzzy | |
import fuzzy | |
m_map = {'a':'027','aa':'028','ab':'029','ac':'030','ad':'031','ae':'032','af':'033','ag':'034','ah':'035','ai':'036','aj':'037','ak':'038','al':'039','ala':'040','alb':'041','alc':'042','ald':'043','ale':'044','alf':'045','alg':'046','alh':'047','ali':'048','alj':'049','alk':'050','all':'051','alm':'052','aln':'053','alo':'054','alp':'055','alq':'056','alr':'057','als':'058','alt':'059','alu':'060','alv':'061','alw':'062','alx':'063','aly':'064','alz':'065','am':'066','an':'067','ao':'068','ap':'069','aq':'070','ar':'071','as':'072','at':'073','au':'074','av':'075','aw':'076','ax':'077','ay':'078','az':'079','b':'080','ba':'081','bb':'082','bc':'083','bd':'084','be':'085','bf':'086','bg':'087','bh':'088','bi':'089','bj':'090','bk':'091','bl':'092','bm':'093','bn':'094','bo':'095','bp':'096','bq':'097','br':'098','bs':'099','bt':'100','bu':'101','bv':'102','bw':'103','bx': |
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
if 'Tab' in dir(M): | |
handlers.append(ModelHandler(M.Tab, M.Tab, 'tab', '/tab')) |
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 TabSchema(fes.Schema): | |
name = fev.UnicodeString(not_empty=True) | |
tabs = fev.Set(if_empty=[], if_missing=[]) | |
lifespan = fev.Int(if_missing=0) | |
class Tab(SimpleDoc, mongoengine.Document): | |
name = mongoengine.StringField(default='') | |
tabs = mongoengine.ListField(mongoengine.DictField()) | |
lifespan = mongoengine.IntField(default=0) |
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
- foreach <server.list_online_players> { | |
- flag server playercount:++ | |
} |
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
events: | |
on player damaged: | |
- narrate '<context.amount> dmg' |
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
diff --git a/favis/brunch_src/app/views/stats/inspection.coffee b/favis/brunch_src/app/views/stats/inspection.coffee | |
index 06d4e9a..373e9f2 100644 | |
--- a/favis/brunch_src/app/views/stats/inspection.coffee | |
+++ b/favis/brunch_src/app/views/stats/inspection.coffee | |
@@ -11,7 +11,8 @@ module.exports = class Inspection extends Dashboard | |
initialize: => | |
super() | |
@socketSubscribe("status/", @updateModal) | |
- @socketSubscribe("frame/", @receive) | |
+ @socketSubscribe("complete/", @loadByRecent) |
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
def run(self, audit=False): | |
audit_trail = [] | |
while True: | |
print self._cur_state | |
if self._cur_state is None: break | |
if audit: audit_trail.append(self._cur_state.name) | |
try: | |
self._cur_state = self._cur_state.run() | |
except self.Transition, t: | |
if isinstance(t.state, State): |
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
while True: | |
print self._cur_state | |
if self._cur_state is None: break | |
if audit: audit_trail.append(self._cur_state.name) | |
try: | |
self._cur_state = self._cur_state.run() | |
except self.Transition, t: | |
if isinstance(t.state, State): | |
self._cur_state = t.state | |
elif t.state is None: |
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
_issetstr = '_isset_' | |
for _crit in filters.get('criteria',[]): | |
_isset = _crit.get('isset',False) | |
if _isset != False: | |
_issetstr += '{}'.format(_isset) | |
if _issetstr != '_isset_': | |
#import pdb; pdb.set_trace() | |
originalOLAP.name += _issetstr |
NewerOlder