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 / bibtexdoi.md
Last active September 20, 2022 14:18
Bibtex citation from DOI

This was discovered in the comments of a "not constructive" question on Stack Overflow. Further exploration got me to this page.

$ curl -LH "Accept: text/bibliography; style=bibtex" http://dx.doi.org/10.1136/bmj.313.7072.1659

Will return (whitespace liberally added):

@article{Craddock_1996,
  title={Introducing Selfcite 2.0--career enhancing software},
  volume={313},
@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
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 / CacheHierarchy.md
Last active March 5, 2020 06:21
CPUS Have a Hierarchical Cache System
@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 / NeutronXrayLocations.json
Last active November 16, 2017 16:57
Locations of Neutron and X-ray user facilities
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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):