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
$ radon cc -sn C dials | |
dials/libtbx_refresh.py | |
F 34:0 _install_dials_autocompletion - C (17) | |
dials/algorithms/indexing/compare_orientation_matrices.py | |
F 8:0 difference_rotation_matrix_axis_angle - C (11) | |
dials/algorithms/indexing/fft3d.py | |
M 313:2 indexer_fft3d.find_basis_vector_combinations_cluster_analysis - E (38) | |
M 210:2 indexer_fft3d.find_candidate_basis_vectors - D (25) | |
dials/algorithms/indexing/indexer.py | |
M 746:2 indexer_base.index - F (53) |
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
xia2/conftest.py | |
F 25:0 ccp4 - B (7) | |
F 46:0 xds - B (6) | |
xia2/XIA2Version.py | |
F 14:0 get_git_revision - C (15) | |
xia2/Applications/xia2_helpers.py | |
F 9:0 process_one_sweep - B (10) | |
xia2/Applications/xia2_main.py | |
F 69:0 get_command_line - B (10) | |
F 25:0 check_environment - B (6) |
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
# Start a monitor thread | |
( | |
wc=0 | |
while true | |
do | |
sleep 5 | |
## Attempt at being clever with qstat - but problem with | |
## normal "job x finished" output bumping the offset. Ideally | |
## I'd also capture those and use them as a refresh signal | |
# if [[ $wc -gt 0 ]]; then |
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 python3 | |
""" | |
Finds classes with a show() but no __str__, and adds the method. | |
Requires the 'bowler' python library. | |
Usage: | |
$ bowler run fix_show.py [-- [--do] [--silent]] |
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
Running fix_show.py over cctbx https://gist.github.com/ndevenish/47813efb6f94576686495edec94cb0ac. | |
188 Unique show() functions | |
79 show() functions didn't qualify | |
68 Because of non-object bases | |
9 Already had __str__ | |
2 No str, but already had __repr__ | |
109 show() functions DID qualify |
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
#!/bin/bash | |
cat <<EOF | |
Rewriting current branch to master, by applying black. | |
This is only tested for simple, linear branches and results should | |
be checked thoroughly before abandoning the old history. | |
EOF | |
# Find out the combined base commit |
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
# Work out if we're Redhat | |
if [ -f /etc/redhat-release ] ; then | |
DIST='RH' | |
OS_MAJOR=$(lsb_release -r | awk '{print $2;}' | cut -d. -f1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' ) | |
OS_SHORT=$DIST$OS_MAJOR | |
PS1_OS="\[\e[35m\]RH${OS_MAJOR}\[\e[0m\] " | |
fi | |
# This adds 'PHI' to the PS1 if on a Xeon Phi box | |
if cat /proc/cpuinfo | grep 'name'| uniq | grep Phi > /dev/null; then |
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
<--"" | |
Level WARNING | |
| | |
o<--"dials" | |
| Level DEBUG | |
| Handler Stream <open file '<stdout>', mode 'w' at 0x1075fa150> | |
| Level INFO | |
| Formatter fmt='%(message)s' datefmt=None | |
| Handler File '/Users/nickd/dials/analysis/betalactamase/dials.refine.log' | |
| Level INFO |
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
#!/bin/bash | |
# The commit on the current cctbx_project/dxtbx equivalent to dxtbx master | |
BASE_COMMIT=cbf101d68265777cee933a203ccb683ab54ddf13 | |
set -e | |
set -x | |
# Make sure repo exists and we're inside it | |
if [[ "$(basename $(pwd))" != "cctbx_project" ]]; then |
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/include/stdc-predef.h | |
/dls/science/users/mep23677/dist/build/include/scitbx/array_family/boost_python/flex_fwd.h | |
/dls/science/users/mep23677/dist/modules/boost/boost/python/detail/prefix.hpp | |
/dls/science/users/mep23677/dist/modules/boost/boost/python/detail/wrap_python.hpp | |
/dls/science/users/mep23677/dist/base/include/python2.7/pyconfig.h | |
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/limits.h | |
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/syslimits.h | |
/usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h | |
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h | |
/usr/include/gnu/stubs-64.h /usr/include/bits/posix1_lim.h |