Skip to content

Instantly share code, notes, and snippets.

gsemet / marathon_jupyter_config.json
Last active Jun 8, 2017
Jupyter Test Deployment Configuration on Marathon
View marathon_jupyter_config.json
"id": "/jupyter",
"cmd": " --NotebookApp.token=''",
"cpus": 25,
"mem": 70000,
"disk": 1000,
"instances": 1,
"acceptedResourceRoles": [
gsemet / etc_nut_notifycmd
Last active May 31, 2017
NUT notification to PushOver
View etc_nut_notifycmd
#!/usr/bin/env python
from __future__ import print_function
import os
import sys
from pushover import init
from pushover import Client
USER_KEY = "xxxxxxxxxxxxxxxx"
We couldn’t find that file to show.
def command(self):
# not the same signature than the renderable, but same name.
# it has the self so can change the state of the step directly even if it is not advises.
# it can add logs
a = self.getProperty('aproperty')
self.addLogStdio("I can describe what I will do since I have self").
self.some_variable = some_value
return the_actual_commands_to_add
# renderables ('Agreation' solution)
def commandRenderable1(prop):
# A renderable cannot access to the self of a step, since it is evaluated before the actual initialization. So it cannot change the "self" state, and cannot add step logs
a = prop.getProperty('aproperty')
return the_actual_commands_to_add
class TriggerSample(SimpleTriggerStep):
descriptionSkipped = "nothing configured"
def addRuntimeSchedulerNames(self):
a_list = ...
autoemr = ['triggerable-{}-mergerequest'.format(a) for a in a_list]
return autoemr
def postExecute(self, res):
import logging
import os
from twisted.internet import defer
from buildbot.schedulers.triggerable import Triggerable
from buildbot.status.results import EXCEPTION
from buildbot.status.results import FAILURE
from buildbot.status.results import SKIPPED
from buildbot.status.results import SUCCESS
gsemet / gist:7000717
Last active Dec 25, 2015 — forked from wcargen/gist:7000672
Schema Lab Problem 3
View gist:7000717
<?xml version="1.0" encoding="utf-8" ?>
<!-- SQL XML created by WWW SQL Designer, -->
<!-- Active URL: -->
<datatypes db="mysql">
<group label="Numeric" color="rgb(238,238,170)">
<type label="TINYINT" length="0" sql="TINYINT" quote=""/>
<type label="SMALLINT" length="0" sql="SMALLINT" quote=""/>
<type label="MEDIUMINT" length="0" sql="MEDIUMINT" quote=""/>
<type label="INT" length="0" sql="INT" quote=""/>