This file contains 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
I understand why the above gist doesn't work. bash cells are created as sub-processes in a python2 kernel notebook. But is there a way to get persistence between %%bash cells so the output of the second would be foo? |
This file contains 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
# Based on https://github.com/takluyver/bash_kernel/blob/master/bash_kernel/kernel.py | |
# But whereas bash_kernel interits BashKernel(Kernel), we must inject the kernel in the constructor | |
# BashKernel(object) and __init__(self, kernel, **kwargs) | |
from IPython.kernel.zmq.kernelbase import Kernel | |
from pexpect import replwrap, EOF | |
from subprocess import check_output | |
from os import unlink |
This file contains 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
Jenkinsfile (Pipeline with credentials management) | |
pipeline { | |
environment { | |
credentials = credentials('jenkins-gcp-service-account') | |
} | |
stages { | |
stage('Example stage 1') { | |
steps { | |
// use the credentials to upload to a Storage Bucket or | |
// push to gcr.io owned by company |
This file contains 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
denice | |
denita | |
dennis | |
derick | |
desirae | |
dev | |
developer | |
devicefarm | |
dewey | |
dick |
This file contains 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 json | |
import logging | |
import os | |
from slack_sdk import WebClient | |
from slack_sdk.errors import SlackApiError | |
from slack_bolt import App, Ack | |
# WebClient instantiates a client that can call API methods | |
client = WebClient(token=os.environ.get("SLACK_BOT_TOKEN")) | |
logger = logging.getLogger(__name__) |