This concept is very much like .jar
or .war
archives in Java.
NOTE: The built
.pyz
zipapp can run on both Python 2 & 3 but you can only build.pyz
zipapps with Python 3.5 or later.
FROM debian:10-slim | |
## Otherwise Java won't install | |
RUN mkdir -p /usr/share/man/man1 | |
RUN apt-get update \ | |
&& apt-get install -y gnupg2 | |
## This is to get openjdk-11-jre to install on -slim | |
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EA8CACC073C3DB2A |
{ | |
"builders": [ | |
{ | |
"type": "amazon-ebs", | |
"region": "us-west-2", | |
"instance_type": "t2.micro", | |
"source_ami_filter": { | |
"filters": { | |
"virtualization-type": "hvm", | |
"name": "CIS Microsoft Windows Server 2016 Benchmark v1.1.0.*Level 1*", |
This concept is very much like .jar
or .war
archives in Java.
NOTE: The built
.pyz
zipapp can run on both Python 2 & 3 but you can only build.pyz
zipapps with Python 3.5 or later.
# -*- coding: utf-8 -*- | |
import requests | |
from io import BytesIO, SEEK_SET, SEEK_END | |
class ResponseStream(object): | |
def __init__(self, request_iterator): | |
self._bytes = BytesIO() | |
self._iterator = request_iterator |
Suppose you want to inject a credential into a Pipeline script. The cloudbees note does not include Pipeline script examples. https://support.cloudbees.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs
The Jenkins Pipeline Docs' description of the git push
method doesn't have an example using injected credentials.
(https://jenkins.io/doc/pipeline/examples/#push-git-repo)
The Snippet generator is helpful, but not not if you try to follow the instructions at: https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Binding+Plugin
# best practice: linux | |
nano ~/.pgpass | |
*:5432:*:username:password | |
chmod 0600 ~/.pgpass | |
# best practice: windows | |
edit %APPDATA%\postgresql\pgpass.conf | |
*:5432:*:username:password | |
# linux |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
# Fire this using gunicorn falcon_gevent_streaming | |
# and head to 127.0.0.1:8000 in a browser. | |
# Requirements: | |
# pip install falcon gevent | |
import falcon | |
import gevent | |
from gevent.queue import Queue |
This sample is based on Mike Bostock's Box Plots. The box.js file has been modified in a number of ways besides making the box plots horizontal: the transitions have been removed, the 1.5 iqr function is included as the default to compute the whisker length, data objects are attached to the whisker ends and outlier dots (instead of just the values), and there are transparent q1-q2 and q2-q3 boxes that contain those respective data points for possible future use.
Hovering over outlier dots in the boxplot highlights them on the table and vice-versa. This also demonstrates a move-to-front functionality -- when an outlier circle is highlighted, it is moved to the end of the svg's elements so that it appears on top of the other outliers.
Also, the axis rounds its range to intervals that go into a power of 10 (see the cleanUpChartRange function).
The variable being plotted is a generated logNoraml distribution, to demonstrate outliers more prominently (sometimes there are so many, the table gets cut
curl -XDELETE 'localhost:9200/test' | |
curl -XPOST 'http://localhost:9200/test' -d '{ | |
"settings" : { | |
"index" : { | |
"analysis" : { | |
"filter": { | |
"skosfilter" : { | |
"type": "skos", | |
"path": "/var/tmp/indexpath/", |