Skip to content

Instantly share code, notes, and snippets.

@peterfpeterson
peterfpeterson / building-mantid.md
Last active June 1, 2023 12:41
Building mantid tutorial 2023-06-01

class: center, middle

Building mantid on the analysis cluster

... works on your ubuntu laptop too

??? to view python3 -m http.server then open a browser at http://0.0.0.0:8000/presentation.html

@peterfpeterson
peterfpeterson / README.md
Created February 17, 2022 15:19
Cleaning out secrets from git repos

Bare mirror the repository (using example urls)

$ git clone --mirror git://example.com/some-big-repo.git

Mess with the repo (this one removes big files)

$ java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git

Once you are done with cleanup it will gve a message about cleaning things up. This boils down to expiring the reflog and garbage collecting

@peterfpeterson
peterfpeterson / README.md
Last active May 12, 2020 20:13
SNSPowderReduction

Example 1

SNSPowderReduction is the workhorse algorithm in mantid that was built to reduce data from POWGEN. It is used inside the GUI used for reducing data as well as in autoreduction. The underlying algorithms were made both to aid in testability, but to promote reusability. The child algorithms listed are not by any extent all of the child algorithms that are used. Instead they are the ones that I was, at one point, a majority contributer to.

@peterfpeterson
peterfpeterson / README.md
Last active May 24, 2018 12:37
rhel7 and qt5-qtbase

On rhel7 (which is based on f19/f20), qt5-qtbase moved from 5.6.1 to 5.9.2. This broke upgrading Naively I tried to rebuild a bunch of things thinking it would be "easy."

Much of this information was determined from digging through https://rpms.remirepo.net/rpmphp/

Currently:

  • sip 4.18 from f24
  • python-qt5 5.6-6 from f24 (best guess)
  • PyQt4 4.11.4-14 from f24
  • python-ipython rebuilt from rhel7
@peterfpeterson
peterfpeterson / mantidplotnightly201712.md
Last active December 12, 2017 16:06
mantidplotnightly doesn't start
status version link build server notes
broken 3.11.20171205.2120 #592 isis-ndw1456
broken 3.11.20171204.1422 #591 ornl-pc95725 won't install b/c of newer qscintilla
works 3.11.20171201.1727 #590 ornl-pc95725
unknown 3.11.20171130.2016 #589 isis-ndw1456
package version orig date paraview
@peterfpeterson
peterfpeterson / IntegerExamples.py
Last active April 6, 2016 17:30
Convert integers to condensed list of strings and back
#!/usr/bin/env python
def getMachine():
"""Determine the name of the machine this process is running on."""
from socket import gethostname
return gethostname()
def splitArgs(optArgs, sysArgs, options=None):
@peterfpeterson
peterfpeterson / PULL_REQUEST_TEMPLATE.md
Last active February 22, 2016 14:44
Pull request template

Description of work.

To test: Instructions for testing.

Fixes #xxxx.

Either link to Release notes change-set or state "Does not need to be in the release notes."


@peterfpeterson
peterfpeterson / replacescript.py
Last active February 11, 2016 13:36
regexp golf
#!/usr/bin/env python
import os
import re
withargs_matchline = re.compile(r'.*boost::shared_ptr<(.+)>\(new\s+(\w+)\(.+\)\)')
withargs_expression = re.compile(r'(boost::shared_ptr<).+>.*\((.*new\s+\w+\().+(\)\))')
withoutargs_matchline = re.compile(r'.*boost::shared_ptr<(.+)>\(new (.+)\s*\)')
withoutargs_expression = re.compile(r'.*(boost::shared_ptr<).+>\((new .+)(\s*\)).*')
@peterfpeterson
peterfpeterson / README.md
Last active June 20, 2022 18:51
Configuring 3Dconnexion spacemouse for paraview

Configuring a space mouse was way harder than it should have been. Here is the way to reproduce a "working" version.

Step 1

Ignore the proprietary driver at 3dconnexion and the open source ones from spacenav. They are useful for custom programs, but useless for paraview which currently uses VRPN to lower their maintenance.

Warning: VRPN does not work if you have one of the drivers running at the same time.

@peterfpeterson
peterfpeterson / README.md
Last active February 26, 2016 21:06
Creating the mantid 3.5.1 patch release

The problem

This example explains how to merge 4f894cb54 into the release-v3.5.0 branch.

Normally patch releases are done via either merging the feature branch in to the release branch, or by cherry-picking the individual commits into the release branch. In this case the source files were moved by (in general terms) removing the Code/Mantid levels of the repository to be more consistent with other CMake based projects. The effect is that changes made based off of master cannot be simply cherry-picked into the release branch.

The hard way