Skip to content

Instantly share code, notes, and snippets.

View larrycai's full-sized avatar
💭
I may be slow to respond.

Larry Cai larrycai

💭
I may be slow to respond.
View GitHub Profile
#!/bin/env python
# https://towardsdatascience.com/stop-waiting-start-using-async-and-await-18fcd1c28fd0
# docker run -it -v $PWD:/src -w /src python:3.7-slim
# pip install aiohttp asyncio requests
import aiohttp
import asyncio
import time
from typing import Any, Iterable, List, Tuple, Callable
@larrycai
larrycai / README.mkd
Last active September 5, 2019 14:20
log sample dashing widget
@larrycai
larrycai / redmine2tuleap.py
Created October 16, 2012 07:18
covert the issues from redmine to tuleap
#!/usr/bin/env python
import csv
import sys
# read sample tuleap csv header to avoid some field changes
tuleapcsvfile = open('tuleap.csv', 'rb')
reader = csv.DictReader(tuleapcsvfile)
# open stdout for output
@larrycai
larrycai / Jenkinsfile
Created September 6, 2017 19:43 — forked from abayer/Jenkinsfile
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',
@larrycai
larrycai / complete.groovy
Last active June 24, 2017 00:09
CodingWithMe Learn JobDSL for Jenkins in 90 minutes
freeStyleJob("Hello3") {
logRotator(2, 30)
scm {
git('https://github.com/larrycai/docker-images.git')
}
triggers {
scm('H/15 * * * *')
}
wrappers {
preBuildCleanup()
@larrycai
larrycai / README.md
Created April 2, 2015 00:25
RabbitMQ + Python in docker
#!/usr/bin/env python
import sys
import urllib2
import ssl
import lxml
import lxml.html
CTX = ssl.create_default_context()
CTX.check_hostname = False
CTX.verify_mode = ssl.CERT_NONE
@larrycai
larrycai / ci.coffee
Created January 16, 2014 05:20
it is jenkins coffeescript used for hubot, it use jenkins-api nodejs module.
# Description:
# Interact with your Jenkins CI server
#
# Dependencies:
# None
#
# Configuration:
# HUBOT_JENKINS_HOST
# HUBOT_JENKINS_AUTH
#
@larrycai
larrycai / all-testcase.txt
Created August 20, 2013 00:47
sample files for parallel test executor plugin demo
testcase_0
testcase_1
testcase_2
testcase_3
testcase_4
testcase_5
testcase_6
testcase_7
testcase_8
testcase_9
@larrycai
larrycai / log.md
Created July 25, 2013 07:56
can't upgrade python package in ubuntu 12.10 using pip 1.3.1 and pip 1.4 has error in list

Try to use pip to install python packages like vcrpy in standard ubuntu 12.10

it seems there is problem to upgrade using pip 1.3.1

see log below

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.10

DISTRIB_CODENAME=quantal