git diff --unified=0 origin/master | awk '
/^diff --git a\// { file=$3; sub(/^a\//, "", file); next }
/^@@ / {
split($2, a, ",");
old_start_line=a[1]; sub(/^-/, "", old_start_line);
old_num_lines=a[2];
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
# Stolen from: https://mlvin.xyz/django-single-file-project.html | |
import datetime | |
import inspect | |
import os | |
import sys |
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 io | |
import coverage | |
import json | |
from contextlib import redirect_stdout | |
def functions_execution_is_identical(func1, func2, file_to_compare): | |
""" | |
Compare the coverage of two functions to see if they're equivalent/same. |
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
# syntax=docker/dockerfile:experimental | |
ARG PYTHON_VERSION | |
FROM ${PYTHON_VERSION} | |
ENV TOX_WORK_DIR=/tmp/.tox | |
ENV MONGO_HOST=mongo | |
ENV POSTGRES_HOST=postgres |
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
# Could not find the oficial docker file for vala lang anywhere.. made my own. | |
FROM ubuntu:latest | |
RUN apt update && \ | |
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata | |
RUN apt install -y wget build-essential flex bison libglib2.0-dev graphviz-dev | |
RUN wget https://download.gnome.org/sources/vala/0.52/vala-0.52.4.tar.xz && \ | |
tar xvf vala-0.52.4.tar.xz && \ | |
cd vala-0.52.4 && \ |
This file has been truncated, but you can view the full file.
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
# Stolen from: https://mlvin.xyz/django-single-file-project.html | |
import datetime | |
import inspect | |
import os | |
import sys |
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
# Steps to running behave-django quickly to make a PR. | |
# 1. Fork behave-django on github: https://github.com/behave/behave-django | |
# 2. Make sure that you've setup your ssh keys for github: https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/ | |
# IMPORTANT: *** Please ignore if you've already done it *** | |
# 3. Copy and paste this directly into your terminal: | |
mkdir -p $(pwd)/behave-django | |
docker run -v ${pwd}/behave-django:/behave-django -v ~/.ssh:/root/.ssh -v ~/.gitconfig:/root/.gitconfig -it --rm python:3.9 bash -c "$(cat << 'EOF' | |
# update the machine | |
apt-get update && \ | |
# install dependencies |
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
# pip install libcst | |
python -c "$(cat <<EOF - | |
import libcst as cst | |
import os | |
import difflib | |
def build_arg(inline): | |
return cst.Arg( |
NewerOlder