(Create a symlink pytest for py.test)
pytest [options] [file_or_dir] [file_or_dir] ...
Help:
# -- coding: utf-8 -- | |
from win32api import * | |
from win32gui import * | |
import win32con | |
import sys, os | |
import struct | |
import time | |
class WindowsBalloonTip: |
1. Install rst2pdf | |
- use your package manager (or) | |
- pip install rst2pdf (or) | |
- easy_install rst2pdf | |
2. Add rst2pdf to the list of extensions in conf.py | |
extensions = ['rst2pdf.pdfbuilder'] |
import dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
from urllib.parse import urlparse, parse_qsl, urlencode | |
from dash.dependencies import Input, Output | |
app = dash.Dash() | |
app.config.suppress_callback_exceptions = True |
""" | |
This module provides a simple WSGI profiler middleware for finding | |
bottlenecks in web application. It uses the profile or cProfile | |
module to do the profiling and writes the stats to the stream provided | |
To use, run `flask_profiler.py` instead of `app.py` | |
see: http://werkzeug.pocoo.org/docs/0.9/contrib/profiler/ | |
and: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvi-debugging-testing-and-profiling | |
""" |
git_current_branch () { | |
local ref | |
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null) | |
local ret=$? | |
if [[ $ret != 0 ]] | |
then | |
[[ $ret == 128 ]] && return | |
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return | |
fi | |
echo ${ref#refs/heads/} |
#!/bin/bash | |
iterations=10 | |
# ----------------------------------------------------------------------------- | |
# Create array of results | |
declare -a results | |
for i in $(seq 1 $iterations); |
#!/bin/bash | |
# Clean all exited containers | |
docker ps -qaf status=exited | xargs docker rm | |
# Remove all unused images | |
docker images -f dangling=true -q | xargs docker rmi |
Update: I created jq-zsh-plugin that does this.
One of my favourite tools of my trade is jq. It essentially enables you to process json streams with the same power that sed, awk and grep provide you with for editing line-based formats (csv, tsv, etc.).
Another one of my favourite tools is fzf.