Skip to content

Instantly share code, notes, and snippets.

View feiyuw's full-sized avatar

feiyuw feiyuw

View GitHub Profile
FROM python:3-stretch
ENV TZ=Asia/Shanghai
RUN pip install --no-cache-dir -i https://pypi.douban.com/simple requests
COPY cleanup-docker-registry.py /cleanup-docker-registry.py
VOLUME ["/registry"]
ENTRYPOINT ["python", "/cleanup-docker-registry.py", "--storage", "/registry"]

title: 聊聊任务分发 speaker: Zhang Yu transition: zoomin theme: moon usemathjax: no date: 2016年10月18日

[slide]

聊聊任务分发

如何实现可靠的任务分发

@feiyuw
feiyuw / rfexplain.py
Last active May 6, 2019 03:17
do static analysis for robotframework suites
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
A lint tool for robotframework cases.
Robotframework best practices:
TODO
Supported checking points:
@feiyuw
feiyuw / client.js
Created November 2, 2015 02:30 — forked from steinwaywhw/client.js
A minimal term.js server/client demo. To be used with node.js
var client = {};
client.run = function (options) {
options = options || {};
var socket = io.connect(options.remote || "http://localhost:8080");
socket.on('connect', function() {
var term = new Terminal({
import signal
from robot.running import EXECUTION_CONTEXTS
from robot.running import Keyword
import thread
import os
def stop_after_5_seconds():
def _stop_execution(signum, frame):
Keyword('fatal error', ()).run(EXECUTION_CONTEXTS.current)
def _after_5_seconds():
def generate_prime_factors(n):
primes = []
factor = 2
while factor <= n:
while n % factor == 0:
primes.append(factor)
n /= factor
factor += 1
return primes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# lib.py
import signal
from robot.running import EXECUTION_CONTEXTS
from robot.running.keywords import Keyword
import thread
import os
def do_error_log_monitoring():
def _stop_execution(signum, frame):
Keyword('fatal error', ()).run(EXECUTION_CONTEXTS.current)