sudo apt-get install python3-pip
sudo pip3 install virtualenv
# swagger2markup output fed to asciidoctor-pdf - all via published docker images | |
# The following is a Makefile command in the root of a web service repo with the following assumptions: | |
# ./swagger/v1/swagger.json is the swagger definition (created by rswag in my case) | |
# ./_docs/ is where we want the PDF and intermediate ADOC to live | |
# The ADOC file is pretty useful, but if you just want the PDF, it's a byproduct you might want to clean up | |
api_pdf: | |
docker run --rm -v $(shell pwd):/opt swagger2markup/swagger2markup convert -i /opt/swagger/v1/swagger.json -f /opt/_docs/api-definition | |
docker run --rm -v $(shell pwd)/_docs:/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf api-definition.adoc |
import cv2 | |
# Read the images | |
foreground = cv2.imread("puppets.png") | |
background = cv2.imread("ocean.png") | |
alpha = cv2.imread("puppets_alpha.png") | |
# Convert uint8 to float | |
foreground = foreground.astype(float) | |
background = background.astype(float) |
# Add in ~/.bashrc or ~/.bash_profile | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
RED="\[\033[01;31m\]" | |
YELLOW="\[\033[01;33m\]" | |
GREEN="\[\033[01;32m\]" | |
BLUE="\[\033[01;34m\]" | |
NO_COLOR="\[\033[00m\]" |
# REF: http://www.quora.com/How-do-I-create-and-update-embedded-documents-with-MongoEngine | |
class Comment(EmbeddedDocument): | |
content = StringField() | |
name = StringField(max_length=120) | |
class Post(Document): | |
title = StringField(max_length=120, required=True) | |
author = StringField(required=True) |
People
![]() :bowtie: |
๐ :smile: |
๐ :laughing: |
---|---|---|
๐ :blush: |
๐ :smiley: |
:relaxed: |
๐ :smirk: |
๐ :heart_eyes: |
๐ :kissing_heart: |
๐ :kissing_closed_eyes: |
๐ณ :flushed: |
๐ :relieved: |
๐ :satisfied: |
๐ :grin: |
๐ :wink: |
๐ :stuck_out_tongue_winking_eye: |
๐ :stuck_out_tongue_closed_eyes: |
๐ :grinning: |
๐ :kissing: |
๐ :kissing_smiling_eyes: |
๐ :stuck_out_tongue: |
As configured in my dotfiles.
start new:
tmux
start new with session name:
:- class('MyMath'). | |
factorial(0,1). | |
factorial(N,F) :- N > 0, M is N - 1, factorial(M,Fm), F is N * Fm. | |
fib(0,1). | |
fib(1,1). | |
fib(N,F) :- N > 1, N1 is N - 1, N2 is N - 2, fib(N1,F1), fib(N2,F2), F is F1+F2 |