On RHEL
sudo yum install rpmdevtools rpmbuild rpmlint mock
On Fedora
sudo dnf install rpmdevtools rpmbuild rpmlint mock
| from IPython.display import HTML | |
| HTML('''<script> | |
| code_show=true; | |
| function code_toggle() { | |
| if (code_show){ | |
| $('div.input').hide(); | |
| } else { |
| #! /bin/bash | |
| if [ -z "$BS_ENV" ]; then | |
| BS_ENV=collection-17Q2.0 | |
| fi | |
| source /opt/conda/bin/activate $BS_ENV && ipython --profile=collection |
| # This is basically my default RHEL7 one | |
| %_topdir %(echo $HOME)/rpmbuild | |
| %_smp_mflags %( \ | |
| [ -z "$RPM_BUILD_NCPUS" ] \\\ | |
| && RPM_BUILD_NCPUS="`/usr/bin/nproc 2>/dev/null || \\\ | |
| /usr/bin/getconf _NPROCESSORS_ONLN`"; \\\ | |
| if [ "$RPM_BUILD_NCPUS" -gt 16 ]; then \\\ | |
| echo "-j16"; \\\ |
| #!/bin/bash | |
| while read pkg; do | |
| mapfile -t files < <(pacman -Qlq $pkg | grep -v /$) | |
| grep -Fq libstdc++.so.6 "${files[@]}" <&- 2>/dev/null && echo $pkg | |
| done < <(pacman -Qmq) |
| # d-values for diamond | |
| diamond = PoldiCreatePeaksFromCell(SpaceGroup='F d -3 m', Atoms='C 0 0 0', a=3.567925, LatticeSpacingMin=0.4, OutputWorkspace='diamond') | |
| diamond = [float(item['d']) for item in diamond] # extract the d-values | |
| diamond.extend((.4093,.4327,.5379,.5947)) # add in peaks from Ashfia | |
| diamond = list(set(diamond)) # remove duplicates | |
| #diamond=[item for item in diamond if item > binning[0] and item < binning[-1]] | |
| diamond.sort() | |
| print diamond |
| // Check if a slave has < 10 GB of free space, wipe out workspaces if it does | |
| import hudson.model.*; | |
| import hudson.util.*; | |
| import jenkins.model.*; | |
| import hudson.FilePath.FileCallable; | |
| import hudson.slaves.OfflineCause; | |
| import hudson.node_monitors.*; | |
| for (node in Jenkins.instance.nodes) { |
| def get_milestones_from_github(): | |
| print('Getting list of all milestones from Github.') | |
| req = requests.get('https://api.github.com/repos/mantidproject/mantid/milestones', | |
| params={'state': 'all'}) | |
| # print(r) | |
| _milestones = {} | |
| for milestone in req.json(): | |
| # print(milestone) | |
| _milestones[milestone['title']] = milestone['number'] |
| import subprocess | |
| import itertools | |
| # execute some command | |
| since = "--since='{0}-{1}-1'".format(str(year), str(month)) | |
| until = "--before='{0}-{1}-{2}'".format(str(year), str(month), str(days_in_month[month-1])) | |
| args = ['git', 'log', '--pretty=format:"%ai %aE"', '--shortstat', since, until] | |
| sub = subprocess.Popen(args, stdout=subprocess.PIPE, close_fds=True, cwd='/path/to/git/repo/clone') | |
| for line1,line2,line3 in itertools.izip_longest(*[sub.stdout]*3): |
Auth as reporter if no key - authenticate as mantid-builder, then append either @ or "First Lastname" from trac
Use correct datetime
Append link to trac at end of description Append trac keywords .....
construct list of labels