Notes on how to set up an interactive GPU session for computation on the Leeds System.
qrsh -l h_rt=2:0:0,coproc_v100=1,h_vmem=8G -pty y bash
A single V100 card, 10 CPU cores and 48GB system memory (one quarter of the available resource on a V100 node)
qrsh -l h_rt=2:0:0,coproc_k80=1 -pty y bash
A single K80 card, 12 CPU cores and 64GB system memory (half the available resource on a K80 node)
qrsh -l h_rt=2:0:0,coproc_p_100=1 -pty y bash
A single P100 card, 6 CPU cores and 64GB system memory (one quarter of the available resource on a P100 node)
module load cudanvidia-smi…
Sometimes we require multiple modules all of which communicate using the I2C channel. In this post, we discuss how to do exactly that using available GPIO pins.
We begin with installing the required libraries,
sudo apt-get install -y python-smbus i2c-tools
followed by enabling I2C using the advanced tab within
raspi config. I this does not make sense, have google ‘using I2C on Raspberry Pi’ and the device you are trying to connect. Make sure you can connect this successfully before continuing.
Generally, to set up we use pins 3 and 4 (see the diagram below) to connect a device. In my case, it is a simple ‘plug-and-play’ real-time clock (RTC). …
You have a suite you wish to run, but need to constrain it such that it can run on your allocated queues — this guide explains how to break it into segments which allow you to do so.
The run I am using is
u-ca218 . First, you need to open the rose editor and navigate to
suite conf → run initialisation and cycling using the menu on the left.
Here you will have a set of options including an initialisation file, calendar and other information.
Various two-factor authentication sites now require the use of an RSA key. For me, it is needed to log into the MONSooN supercomputer. Although this is often on my desk, it is still difficult to read when flat. For this reason, I created a stand and will detail the process here.
We begin by measuring our key. This is done in mm and the use of calipers can produce much more accurate results than a simple rule.
The main dimensions of my RSA key are approximately 20mm x 10mm with the screen being 5mm from the top and bottom.
Since we are not creating a sleave for the entire key the length measurement is not that important. …
Say you have branches for different aspects of the same project and you want to merge only a single file (e.g. the configuration file). Short of copy-pasting all the changes by hand, how might you approach this problem?
So we have a branch. This branch contains an update, bug-fix or enchantment and we wish to pass that on to all our other branches. This can be for reasons that you want to keep a testing copy or share information between code that no longer has the same function between different parts of the same repository.
Here merging the entire body of code is impractical and overwriting the chosen file (e.g. with
git checkout <branchname> <file> ) is counter-productive. So how else can we achieve such a feat? Well, the answer is simple and comes in the form of a
--patch within git’s checkout function. …
In our latest Raspberry Pi sensor project, we wanted to have a no-network approach to getting data automatically off it. The solution for this came through the running of a Python script on insertion of an “authorised” USB storage device.
In this article, I will explain how such a feat may be achieved.
The simplest part lies in providing a set of rules on what to do upon insertion. These consist of a script for when we insert a USB and one for when we remove it:
ACTION=="add", SUBSYSTEM=="usb", PROGRAM="<full_path_here>/on_usb_in.sh"
ACTION=="remove", SUBSYSTEM=="usb", PROGRAM="<full_path_here>/on_usb_out.sh"
These two lines go into the
etc/udev/rules.d directory. …
In most scripts, you as the author are interested in knowing the progress of the code. This is particularly true when something inevitably goes wrong — and it will, no matter how good of a coder you are. This is where the Logging Module comes into its own.
When debugging a script we have two available channels, the standard output (
stdout ) and the standard error (
stderr ). Conventionally user outputs should be given within
sdout as per the
The reason we don’t use
dragControls functions for object or scene manipulation, but what if we want a more personalised response on
drag events? — this is what we shall cover here.
The code discussed within the article can apply to any HTML element, although the emphasis, in this case, is placed upon THREEjs. The only difference falls upon what goes into the
dragAction function at the end.
For the purpose of this article, I wish to create web page summarising all my Medium articles. I start with a list of Titles, Subtitles and URLs and convert them into a static HTML page for viewing on my personal GitHub.io site.
This can be done in one of three ways:
Side Note: It is possible to accomplish the same task using Flask, however
render_template already uses Jinja2 under the hood and we do not want the additional requirement of needing a webserver — so we ignore this solution. …
When building a webserver we often wish to present an idea or topic. In the case of a static website, this can be done by including the relevant information within the source files. In more dynamic examples, an API (application programming interface) can be used to pre-process information before returning it to the user.
In this example, we design a simple flask app which only requires a user key and a web browser to work. The idea behind this is that anyone can use it, and it is a device (and operating system), independent.
As usual, we start by installing the relevant libraries for the server. The simplest way to do this is through the use of pip (pythons package manager). …