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
| class ROType(type): | |
| def __new__(mcl, classname, bases, classdict): | |
| class UniqueROType (mcl): | |
| pass | |
| def getAttrFromMetaclass(attr): | |
| return lambda cls: getattr(cls.__metaclass__, attr, None) | |
| for attr, value in classdict.items(): | |
| if not hasattr(value, '__call__') and attr.startswith('_') and not attr.startswith('__'): |
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 pulsar import arbiter, command | |
| names = ['john', 'luca', 'carl', 'jo', 'alex'] | |
| @command() | |
| def greetme(request, message): | |
| echo = 'Hello {}!'.format(message['name']) | |
| request.actor.logger.info(echo) | |
| return echo |
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 mesosphere.mesos.util.FrameworkInfo | |
| import org.apache.mesos.MesosSchedulerDriver | |
| /** | |
| * @author Tobi Knaup | |
| */ | |
| object Main extends App { |
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
| upstream backend { | |
| server 127.0.0.1:5000; | |
| } | |
| server { | |
| listen 80; | |
| server_name my_site.localhost.com; | |
| set $static /home/taar/git/MySite/my_site/admin/static; | |
| root $static; | |
| keepalive_timeout 60; |
NewerOlder