Which files changed on my feature branch?:
hg status --rev .:develop
Which commits belong to a named branch?:
hg log -r "branch(<branchname>) and 0:"
What heads exist on the current repository that have not been merged into the develop branch?:
| import sys | |
| def doit(): | |
| packed_flow_dir = int(sys.argv[1]) | |
| weights = [(packed_flow_dir >> 4*i) & 0xF for i in range(8)] | |
| weights = [str(w).rjust(2, ' ') for w in weights] | |
| print(weights) |
| import os | |
| import logging | |
| logging.basicConfig(level=logging.DEBUG) | |
| import pygeoprocessing | |
| from osgeo import gdal | |
| import numpy | |
| def doit(): |
| diff --git a/setup.py b/setup.py | |
| index 46be1b36..67b5a1df 100644 | |
| --- a/setup.py | |
| +++ b/setup.py | |
| @@ -96,6 +96,8 @@ setup( | |
| Extension( | |
| name="natcap.invest.sdr.sdr_core", | |
| sources=['src/natcap/invest/sdr/sdr_core.pyx'], | |
| + define_macros=[('CYTHON_TRACE', '1')], | |
| + compiler_directives={'linetrace': True}, |
| # A wrapper around the powershell equivalent of zipping functionality. | |
| # This script takes 3 parameters: | |
| # --> whether to recurse (this is ignored, but we have to take it anyways for compatibility) | |
| # --> The target archive path | |
| # --> The folder to zip. | |
| # | |
| param ( | |
| [Parameter(Mandatory=$false, ValueFromPipeline=$false, ParameterSetName='r')] | |
| [switch] | |
| $recurse, |
| name: Run InVEST Autotest | |
| steps: | |
| windows-invest-autotest: | |
| name: Run InVEST-autotest (windows) | |
| needs: build-windows-binaries | |
| runs-on: windows-latest | |
| env: | |
| PYTHON_VERSION: 3.7 | |
| PYTHON_ARCH: x64 | |
| steps: |
| #!/bin/bash | |
| # NOTE: This version of this script was adapted from | |
| # https://gist.github.com/FernFerret/3178035, with a few minor revisions | |
| # for efficiency and clarity of output. | |
| # This simple script will look at all named branches in a given repository | |
| # and print out any branch that contains multiple open heads. This is useful | |
| # to see if your repository is clean or if someone has pushed multiple | |
| # anonymous branches. |
Which files changed on my feature branch?:
hg status --rev .:develop
Which commits belong to a named branch?:
hg log -r "branch(<branchname>) and 0:"
What heads exist on the current repository that have not been merged into the develop branch?:
| #!/bin/bash | |
| # | |
| # Convert a program's manpage to PDF. | |
| # Assumes that the program has a manpage for it and that ps2pdf14 is installed (part of a latex package). | |
| # | |
| # Example usage: | |
| # $ ./man2pdf bash | |
| ${1?"Usage: $0 PROGRAMNAME"} | |
| man -t $1 | ps2pdf14 - $1_manpage.pdf |
| In the latest version of watershed delineation, a single watershed | |
| seed may be associated with many features of interest. For this reason, | |
| we need to be able to associate the attributes of the features of interest | |
| with each of the seeds derived from the features. | |
| The GeoPackage driver (https://www.gdal.org/drv_geopackage.html) supports | |
| 'aspatial' tables in GDAL>2.0, and 'attribute' data types in GDAL>2.2. | |
| The two prototypes needed are: | |
| * How do we make an aspatial table in GDAL 2? |
| #! /bin/bash | |
| diff <(gdalinfo $1) <(gdalinfo $2) |