Class Checks
- java.lang.Object
-
- org.lwjgl.system.Checks
-
public final class Checks extends java.lang.Object
A class to check buffer boundaries in general. If there is insufficient space in the buffer when the call is made then a buffer overflow would otherwise occur and cause unexpected behaviour, a crash, or worse, a security risk.Internal class, don't use.
-
-
Field Summary
Fields Modifier and Type Field and Description static boolean
CHECKS
Runtime checks flag.static boolean
DEBUG
Debug mode flag.static boolean
DEBUG_FUNCTIONS
Debug functions flag.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static void
checkArray(java.lang.Object[] array, int size)
static void
checkBuffer(java.nio.Buffer buf, int size)
Helper method to ensure a buffer has enough capacity.static void
checkBuffer(java.nio.Buffer buf, long size)
static void
checkBuffer(java.lang.CharSequence text, int size)
Helper method to ensure a CharSequence has enough characters.static void
checkBuffer(double[] buf, int size)
Helper method to ensure a array has enough capacity.static void
checkBuffer(float[] buf, int size)
Helper method to ensure a array has enough capacity.static void
checkBuffer(int[] buf, int size)
Helper method to ensure a array has enough capacity.static void
checkBuffer(long[] buf, int size)
Helper method to ensure a array has enough capacity.static void
checkBuffer(PointerBuffer buf, int size)
Helper method to ensure aPointerBuffer
has enough capacity.static void
checkBuffer(PointerBuffer buf, long size)
static void
checkBuffer(short[] buf, int size)
Helper method to ensure a array has enough capacity.static void
checkBuffer(StructBuffer<?,?> buf, int size)
Helper method to ensure aStructBuffer
has enough capacity.static void
checkBuffer(StructBuffer<?,?> buf, long size)
static void
checkBufferGT(java.nio.Buffer buf, int size)
static void
checkBufferGT(PointerBuffer buf, int size)
static void
checkBufferGT(StructBuffer<?,?> buf, int size)
static long
checkFunctionAddress(long pointer)
Ensures that the specified function pointer is not-null (0L).static boolean
checkFunctions(long... functions)
Checks if any of the specified functions pointers isNULL
.static float[]
checkNT(float[] buf)
Ensures that the specified array is null-terminated.static java.nio.FloatBuffer
checkNT(java.nio.FloatBuffer buf)
Ensures that the specified FloatBuffer is null-terminated.static int[]
checkNT(int[] buf)
Ensures that the specified array is null-terminated.static int[]
checkNT(int[] buf, int terminator)
Ensures that the specified array is terminated with the specified terminator.static java.nio.IntBuffer
checkNT(java.nio.IntBuffer buf)
Ensures that the specified IntBuffer is null-terminated.static java.nio.IntBuffer
checkNT(java.nio.IntBuffer buf, int terminator)
Ensures that the specified IntBuffer is terminated with the specified terminator.static long[]
checkNT(long[] buf)
Ensures that the specified array is null-terminated.static java.nio.LongBuffer
checkNT(java.nio.LongBuffer buf)
Ensures that the specified LongBuffer is null-terminated.static PointerBuffer
checkNT(PointerBuffer buf)
Ensures that the specified PointerBuffer is null-terminated.static PointerBuffer
checkNT(PointerBuffer buf, long terminator)
Ensures that the specified PointerBuffer is terminated with the specified terminator.static java.nio.ByteBuffer
checkNT1(java.nio.ByteBuffer buf)
Ensures that the specified ByteBuffer is null-terminated (last byte equal to 0).static java.nio.ByteBuffer
checkNT2(java.nio.ByteBuffer buf)
Ensures that the specified ByteBuffer is null-terminated (last 2 bytes equal to 0).static java.nio.ByteBuffer
checkNT4(java.nio.ByteBuffer buf)
Ensures that the specified ByteBuffer is null-terminated (last 4 bytes equal to 0).static java.nio.ByteBuffer
checkNT4(java.nio.ByteBuffer buf, int terminator)
Ensures that the specified ByteBuffer is terminated with the specified terminator (last 4 bytes equal toterminator
).static java.nio.ByteBuffer
checkNT8(java.nio.ByteBuffer buf)
Ensures that the specified ByteBuffer is null-terminated (last 8 bytes equal to 0).static java.nio.ByteBuffer
checkNTP(java.nio.ByteBuffer buf)
Ensures that the specified ByteBuffer is null-terminated (last 4 or 8 bytes equal to 0).static java.nio.ByteBuffer
checkNTP(java.nio.ByteBuffer buf, long terminator)
Ensures that the specified ByteBuffer is terminated with the specified terminator (last 4 or 8 bytes equal toterminator
).static long
checkPointer(long pointer)
Ensures that the specified pointer is not-null (0L).
-
-
-
Field Detail
-
CHECKS
public static final boolean CHECKS
Runtime checks flag.When enabled, LWJGL will perform basic checks during its operation, mainly to avoid crashes in native code. Examples of such checks are: context-specific function address validation, buffer capacity checks, null-termination checks, etc. These checks are generally low-overhead and should not have a measurable effect on performance, so its recommended to have them enabled both during development and in production releases.
If maximum performance is required, they can be disabled by setting
Configuration.DISABLE_CHECKS
to true.
-
DEBUG
public static final boolean DEBUG
Debug mode flag.When enabled, LWJGL will perform additional checks during its operation. These checks are more expensive than the ones enabled with
Checks.CHECKS
and will have a noticeable effect on performance, so they are disabled by default. Examples of such checks are: buffer object binding state check (GL), buffer capacity checks for texture images (GL & CL), etc. LWJGL will also print additional information, mainly during start-up.Can be enabled by setting
Configuration.DEBUG
to true.
-
DEBUG_FUNCTIONS
public static final boolean DEBUG_FUNCTIONS
Debug functions flag.When enabled, capabilities classes will print an error message when they fail to retrieve a function pointer.
Can be enabled by setting
Configuration.DEBUG_FUNCTIONS
to true.
-
-
Method Detail
-
checkFunctions
public static boolean checkFunctions(long... functions)
Checks if any of the specified functions pointers isNULL
.- Parameters:
functions
- the function pointers to check- Returns:
- true if all function pointers are valid, false otherwise.
-
checkFunctionAddress
public static long checkFunctionAddress(long pointer)
Ensures that the specified function pointer is not-null (0L).- Parameters:
pointer
- the pointer to check- Throws:
java.lang.IllegalStateException
-
checkPointer
public static long checkPointer(long pointer)
Ensures that the specified pointer is not-null (0L).- Parameters:
pointer
- the pointer to check- Throws:
java.lang.NullPointerException
-
checkNT1
public static java.nio.ByteBuffer checkNT1(java.nio.ByteBuffer buf)
Ensures that the specified ByteBuffer is null-terminated (last byte equal to 0).
-
checkNT2
public static java.nio.ByteBuffer checkNT2(java.nio.ByteBuffer buf)
Ensures that the specified ByteBuffer is null-terminated (last 2 bytes equal to 0).
-
checkNT4
public static java.nio.ByteBuffer checkNT4(java.nio.ByteBuffer buf)
Ensures that the specified ByteBuffer is null-terminated (last 4 bytes equal to 0).
-
checkNT4
public static java.nio.ByteBuffer checkNT4(java.nio.ByteBuffer buf, int terminator)
Ensures that the specified ByteBuffer is terminated with the specified terminator (last 4 bytes equal toterminator
).
-
checkNT8
public static java.nio.ByteBuffer checkNT8(java.nio.ByteBuffer buf)
Ensures that the specified ByteBuffer is null-terminated (last 8 bytes equal to 0).
-
checkNTP
public static java.nio.ByteBuffer checkNTP(java.nio.ByteBuffer buf)
Ensures that the specified ByteBuffer is null-terminated (last 4 or 8 bytes equal to 0).
-
checkNTP
public static java.nio.ByteBuffer checkNTP(java.nio.ByteBuffer buf, long terminator)
Ensures that the specified ByteBuffer is terminated with the specified terminator (last 4 or 8 bytes equal toterminator
).
-
checkNT
public static java.nio.IntBuffer checkNT(java.nio.IntBuffer buf)
Ensures that the specified IntBuffer is null-terminated.
-
checkNT
public static int[] checkNT(int[] buf)
Ensures that the specified array is null-terminated.
-
checkNT
public static java.nio.IntBuffer checkNT(java.nio.IntBuffer buf, int terminator)
Ensures that the specified IntBuffer is terminated with the specified terminator.
-
checkNT
public static int[] checkNT(int[] buf, int terminator)
Ensures that the specified array is terminated with the specified terminator.
-
checkNT
public static java.nio.LongBuffer checkNT(java.nio.LongBuffer buf)
Ensures that the specified LongBuffer is null-terminated.
-
checkNT
public static long[] checkNT(long[] buf)
Ensures that the specified array is null-terminated.
-
checkNT
public static java.nio.FloatBuffer checkNT(java.nio.FloatBuffer buf)
Ensures that the specified FloatBuffer is null-terminated.
-
checkNT
public static float[] checkNT(float[] buf)
Ensures that the specified array is null-terminated.
-
checkNT
public static PointerBuffer checkNT(PointerBuffer buf)
Ensures that the specified PointerBuffer is null-terminated.
-
checkNT
public static PointerBuffer checkNT(PointerBuffer buf, long terminator)
Ensures that the specified PointerBuffer is terminated with the specified terminator.
-
checkBuffer
public static void checkBuffer(short[] buf, int size)
Helper method to ensure a array has enough capacity.- Parameters:
buf
- the array to checksize
- the minimum array capacity- Throws:
java.lang.IllegalArgumentException
-
checkBuffer
public static void checkBuffer(int[] buf, int size)
Helper method to ensure a array has enough capacity.- Parameters:
buf
- the array to checksize
- the minimum array capacity- Throws:
java.lang.IllegalArgumentException
-
checkBuffer
public static void checkBuffer(long[] buf, int size)
Helper method to ensure a array has enough capacity.- Parameters:
buf
- the array to checksize
- the minimum array capacity- Throws:
java.lang.IllegalArgumentException
-
checkBuffer
public static void checkBuffer(float[] buf, int size)
Helper method to ensure a array has enough capacity.- Parameters:
buf
- the array to checksize
- the minimum array capacity- Throws:
java.lang.IllegalArgumentException
-
checkBuffer
public static void checkBuffer(double[] buf, int size)
Helper method to ensure a array has enough capacity.- Parameters:
buf
- the array to checksize
- the minimum array capacity- Throws:
java.lang.IllegalArgumentException
-
checkBuffer
public static void checkBuffer(java.lang.CharSequence text, int size)
Helper method to ensure a CharSequence has enough characters.- Parameters:
text
- the text to checksize
- the minimum number of characters
-
checkBuffer
public static void checkBuffer(java.nio.Buffer buf, int size)
Helper method to ensure a buffer has enough capacity.- Parameters:
buf
- the buffer to checksize
- the minimum buffer capacity- Throws:
java.lang.IllegalArgumentException
-
checkBuffer
public static void checkBuffer(java.nio.Buffer buf, long size)
- See Also:
Checks.checkBuffer(Buffer, int)
-
checkBuffer
public static void checkBuffer(PointerBuffer buf, int size)
Helper method to ensure aPointerBuffer
has enough capacity.- Parameters:
buf
- the buffer to checksize
- the minimum buffer capacity- Throws:
java.lang.IllegalArgumentException
-
checkBuffer
public static void checkBuffer(PointerBuffer buf, long size)
- See Also:
Checks.checkBuffer(PointerBuffer, int)
-
checkBuffer
public static void checkBuffer(StructBuffer<?,?> buf, int size)
Helper method to ensure aStructBuffer
has enough capacity.- Parameters:
buf
- the buffer to checksize
- the minimum buffer capacity- Throws:
java.lang.IllegalArgumentException
-
checkBuffer
public static void checkBuffer(StructBuffer<?,?> buf, long size)
- See Also:
Checks.checkBuffer(StructBuffer, int)
-
checkArray
public static void checkArray(java.lang.Object[] array, int size)
-
checkBufferGT
public static void checkBufferGT(java.nio.Buffer buf, int size)
-
checkBufferGT
public static void checkBufferGT(PointerBuffer buf, int size)
-
checkBufferGT
public static void checkBufferGT(StructBuffer<?,?> buf, int size)
-
-


Welcome to Nevow
This page contains examples of how to build web applications
on top of Nevow, in order of increasing complexity. To get a
feel of how to structure your Python code while using Nevow,
the source of all examples is linked for easy reference. In
order to run each example, you will need Zope Interface,
Twisted, and Nevow installed, and then you will need to run the
example server.
Under windows: you need to run the Twisted
Shell from Start-->Applications-->Twisted menu. Under a
unix like operating system, make sure that the twistd binary is
on your PATH. Installing Twisted will do this for you.
To run the example server, go to the Nevow examples
directory (eg: C:\Nevow\examples or /usr/src/Nevow/examples)
and run the following command:
twistd -noy examples.tac
Then, to view the running examples, point your web browser
at: http://localhost:8080/
Once you are viewing this page as served by the example
server, all of the "live" links below will work.
Table of Contents
- Test Suite
- Examples
- Tag Library Examples
- Demo Applications
Examples Listing
-
A Nevow example that doesn't use any of Nevow
automations
-
Hello world in Nevow
-
How to get Session and Request objects from the
context
-
Render tables in Nevow
-
How to use xmlfile directives
-
How to handles page children with Nevow, and how to
use the <nevow:attr> tag
-
Use Fragments to divide a page in logical
components
-
Use Macro directive to compose pages by transforming
the docFactory at precompile time
-
Allow data= directives to look inside application
objects
-
Use nested sequences to render an attribute of type
list of an object
-
Manual form example
-
Advanced manual form example
-
Formless example
-
Another formless example, but a little bit more
complex
-
[0.5]Using formless to create multi-step
wizards by returning Page instances from
autocallables
-
[0.5]Using formless, return a URL instance
from an autocallable to redirect to it
-
Example of interacting with a database
-
An example of using HTTP Basic Auth for simple
authentication
-
Various examples of how to integrate twisted.guard
with Nevow for authentication
-
Examples of how to access the session when a user
logs out of guarded sites
-
Use Configurables to render a form with Formless in a
customized template
-
Dynamically build your forms
-
Adapting an object to the IRenderer interface in
order to make it render itself
-
More complex example of adapting objects to IRenderer
and to different interfaces
-
Handling and building a Tree structure dynamically on
yor site
-
Simple example of text localisation
-
Localisation of disk templates
LivePage/Canvas/XUL
-
TypeAhead: Using asynchronous remote method invocation from
JavaScript to complete what the user is typing.
-
Calculator: A simple server-side calculator. All button presses and calculations
are processed at the server.
-
Widgets: An example of using Athena Widgets to define custom
methods for manipulating particular sections of a page's DOM, as
well as communicating in both directions between the client and
server.
Tag Library Examples
-
How to use the Calendar tag from the
taglibrary
-
How to use the Progressbar tag from the
taglibrary
Demo Applications
-
Extremely basic library, made with axiom (redesigned atop)
-
Handling users in a web site
-
Pastebin example with nevow
-
Blog engine
-
Link storage webservice (uses Twisted's
XML-RPC)
-
Todo list with rails like file structure (requires
pgasync 1.3b and postgres)
-
Image uploader that uses axiom


If this email wasn't requested by you, we are deeply sorry for the inconvenience, your old password will still be the same. Kind regards, your WAI team!
WAI
Leopold Franzens Universität Innsbruck
write us back at<EMAIL_ADDRESS>Website: www.whereamiplay.com


Grand Master Schule:
Anyone wishing to become an Elven Knight must have achieved at least level 20 and passed the appropriate test.
You've passed the test but your level isn't high enough. Come back when you've raised your level.


Processing Data¶
We have downloaded most of the small dataset in the repository.
Drug-Target Binding Benchmark Dataset¶
We list public Drug-Target Binding Benchmark Dataset that is supported by DeepPurpose and corresponding downloading and processing function.
Dataset |
downloading and processing Function |
|---|---|
BindingDB |
download_BindingDB() to download the data and process_BindingDB() to process the data |
DAVIS |
load_process_DAVIS() to download and process the data |
KIBA |
load_process_KIBA() to download and process the data |
Download Link
Repurposing Dataset¶
We list public Repurposing Dataset that is supported by DeepPurpose and corresponding downloading and processing function.
Dataset |
downloading and processing Function |
|---|---|
Curated Antiviral Drugs Library |
load_antiviral_drugs() to load and process the data |
Broad Repurposing Hub |
load_broad_repurposing_hub() downloads and process the data |
Download Link
Bioassay Data for COVID-19¶
Dataset |
downloading and processing Function |
|---|---|
AID1706 |
load_AID1706_SARS_CoV_3CL() to load and process |
Download Link
COVID-19 Targets¶
Dataset |
downloading and processing Function |
|---|---|
SARS-CoV 3CL Protease |
load_SARS_CoV_Protease_3CL() |
SARS-CoV2 3CL Protease |
load_SARS_CoV2_Protease_3CL() |
SARS_CoV2 RNA Polymerase |
load_SARS_CoV2_RNA_polymerase() |
SARS-CoV2 Helicase |
load_SARS_CoV2_Helicase() |
SARS-CoV2 3to5_exonuclease |
load_SARS_CoV2_3to5_exonuclease() |
SARS-CoV2 endoRNAse |
load_SARS_CoV2_endoRNAse() |
- read_file_training_dataset_bioassay
- read_file_training_dataset_drug_target_pairs
- read_file_virtual_screening_drug_target_pairs
- load bioarray dataset (read_file_training_dataset_bioassay)
- read_file_target_sequence
- download_DrugTargetCommons
- process_BindingDB
- load_process_DAVIS
- load_process_KIBA
- load_AID1706_txt_file
- load_AID1706_SARS_CoV_3CL
- load_antiviral_drugs
- load_broad_repurposing_hub


--- layout: post date: 2012-08-16 time: "09:00:00" authors: ["Greg Wilson"] title: Alpha Test of Driver's License Exam tags: ["Community", "Education"] ---
As we announced back in June, we're working with the Software Sustainability Institute to create a "driver's license" exam for the DiRAC supercomputing facility. Mike Jackson at the SSI alpha tested our exam on four people last week; the exam itself, and his comments, are below. We would be very grateful for feedback from the community on the scope and level of the questions.
You have been given the URL of a version control repository, along with a username and a password for it. You have one hour to complete the following tasks. If at any point you would like clarification, please do not hesitate to ask. If at any point you are unable to complete a task, you may also ask for help so that you can proceed to the next task, but doing so will be considered equivalent to not completing that task.
Check out a working copy of the version control repository. You will do all of your work in this working copy, and use version control to commit your solutions as you go.
Solution:
svn checkout $URL
Once you have a working copy, use the cd command to go into it. Use a single shell command to create a list of all files with names ending in .dat in or below this directory in a file called all-dat-files.txt.
Solution:
find . -name '*.dat' -print > all-dat-files.txt
The analyze.py program takes exactly two arguments: the name of its input file and the name of its output file, in that order. For example, if inputs/a.dat changes, running make will execute the command:
./analyze.py inputs/a.dat outputs/a.out
Edit the file Makefile in the root directory of the working copy so that if any .dat file in the inputs directory changes, the program analyze.py is run to create a file named .out in the outputs directory.
Solution:
outputs/%.out : inputs/%.dat ./analyze.py $< $@
Commit your changes to Makefile to the version control repository.
Solution:
svn commit -m "Building .out files for .dat files" Makefile
Note: examinees may use an editor instead of -m to provide a log comment.
The analyze.py program contains a function called running_total, which is supposed to calculate the total of each increasing sequence of numbers in a list:
running_total([1, 2, 1, 8, 9, 2]) == [3, 18, 2] running_total([1, 3, 4, 2, 5, 4, 6, 9]) == [8, 7, 19]
In the file test_analyze.py, write the four (4) unit tests that you think are most important to run to test this function. Do not test for cases of invalid input (i.e., inputs that are strings, lists of lists, or anything else that isn't a flat list of numbers).
Solution:
def test_empty(): assert running_total([]) == [] def test_equal(): assert running_total([1, 1]) == [1, 1] def test_negative(): assert running_total([1, 5, -5, -3]) == [6, -8] def test_float(): assert running_total([1.0, 5.0, 2.0]) == [6.0, 2.0]
Submit your work by committing your changes to version control.
Solution:
Edit a file called answer.txt in the root directory of your working copy and write a brief explanation of one situation in which running_total would produce an incorrect answer. Submit your answer by committing the file answer.txt to version control.
Solution: running_total will produce the wrong answer if a sequence includes consecutive floating-point values with very small and very large magnitudes.
and:
svn commit -m "Answer to numerical programming question" answer.txt
Note: While the examinee is working on previous questions, the examiner will edit answer.txt, and will check in changes so that the examinee must resolve a conflict before being able to commit.
The program power2.py takes a single non-negative integer as a command line argument and produces the powers of two that total to that number. For example:
./power2.py 27
produces:
16 8 2 1
Edit this program to improve its structure and readability without changing its behavior.
The file test_power2.py has tests for power2.py. You can check that your changes have not changed power2.py's behaviour by running:
nosetests test_power2.py
Solution: This one requires subjective judgment by the examiner, but the starting code is awful enough to leave lots of room for improvement.
Write a shell script called do-many.sh that runs power2.py for many different numbers. For example:
./do-many.sh 27 9 35
must produce:
16 8 2 1 8 1 32 2 1
as its output. You do not need to do error-checking on the command-line parameters, i.e., you may assume that they are all non-negative integers.
Solution:
for number in $* do ./power2.py $number done
A dry-run a test for a "driver's licence" for researchers wishing to use the DiRAC integrated supercomputing facility was done on Thursday 9th and Friday 10th August 2012. 4 participants (P1..4) took part. P1 and P2 are members of EPCC and have backgrounds in software development, HPC and project management. P1 is a DiRAC project leader. P3 and P4 are members of the SSI with backgrounds in software development. P3 could be viewed as equivalent to a "professor", P4 as a software development and sustainability consultant. It was expected that all 4 would be able to complete the test in an hour.
Each participant was given 1 hour followed by up to 30 minutes for discussions on how they did, the nature of the test and suggestions as to how it could be improved.
The participants logged into an account with all the tools available. The exam text and Subversion URL/username/password were in text files. Each participant had their own Subversion URL.
After P2 and P3 did their check-out I committed an update to power2.py. I forgot to do this for P1.
P4 didn't use Subversion due to account access issues so was given a ZIP file with the exam and source code.
P1 and P2 asked if they could use the web/whether it was an "open book" test. I said it was since the test assesses working practices, not recall. P1-4 all used the web.
P2,3 used Subversion without problems.
P1 ran commit commands but forgot the add commands. They put this down to unfamiliarity with Subversion. P2 commented that they hadn't used Subversion for a long time but it was sufficiently straightforward.
P1 asked if alternatives to Subversion would be offered to examinees e.g. Mercurial. I said Git would be offered. They also suggested CVS and warned that some won't know what version control or any of these tools are. P2 also said it would be better if there was a choice of tools.
Everyone completed this with no problem or comment.
No-one managed the expected solution.
P1-4 all did solutions for hard coded file paths. The wild-card was the problem. P3 had looked up the syntax, since they only ever use others' directory-based patterns, but it wasn't clear what to do.
P1 and P4 assumed that once they'd implemented their target, a "make" with no file would call it to apply it to all the matching files. When shown that it had to be invoked as "make outputs/run1.out" P1 commented that they'd never seen make used that way before.
P1 commented that Make is so complex that everyone knows it in a different way, and that it is a very hard tool to set questions on. P4 said they'd moved on from Make, it was a tool they'd come back and learn if/when needed but was too arcane to retain. P3 questioned whether it was reasonable to expect an HPC user to know this. They'd be more likely to modify Make files/targets than create from scratch.
P1,2,3 all committed their updates to the repository with a commit message.
P1 asked whether examinees would know Python. I explained that C/C++, FORTRAN and MATLAB would also be offered. P2 said examinees should be able to choose their tools. P3 also said that examinees need to know the libraries and tools used.
P1 commented that some examinees won't know what a "unit test" is.
P1 had never written Python unit tests and asked if there was something like JUnit. I described how to run "nosetests". They admitted to searching the web a lot and also copying the test format from test_power2.py.
P1 missed a test for [1,1] but argued that their test for [0] was a test for a non-increasing sequence.
P2 asked whether "increasing" meant "strictly increasing". Related to this, P3 defined a test where [0,0,0,0,0] == [0]. This test fails, but P3 said if they had time they would then have investigated the failure.
P2 wrote 7 tests including the 2 expected tests but as stand-alone asserts and not in functions, due to unfamiliarity with writing Python unit tests. They committed a version that had 4 of their tests, including the expected ones.
P4 omitted the test for [].
P3 commented that the nosetests doc wasn't useful but the code on Software Carpentry was.
P3 ran into problems due to a typo ("sssert" not "assert") which took me a while to spot too though the tests included those expected.
P1 answered "The case where you use real numbers rather than integer values." and elaborated that it would give a read error for any floating point number.
P2 commented that this question has a different context from the others and that the heading "numerical programming" is a bit cryptic. They commented that the examples plus description of the previous question implies a focus on integers only. Examinees may be more likely to answer if it's explicitly stated that the function can handle floating point numbers. Similarly, P4 said it was "kind of a trick question".
When informed of the answer, P3 did say they'd expect such accumulation errors.
P1 made few changes e.g. added a header comment, added other meaningful comments, removed bit shifts, started to remove prints and reverse the range. When discussing the test, P1 listed numerous other refactorings e.g. changing variables (but they said that FORTRANers like/expect/traditionally use short variable names), removing the prints (but they argued that printing as you go is more optimal). P1 also said they wouldn't touch the loops as that's the compilers job.
P1 felt the example was too "computer science-y" and most examinees won't be. They suggested an example based on linear algebra or a matrix vector multiply.
P2 only added a redundant comment and removed the shift but not the associated comment, which was now incorrect. They felt it was not immediately obvious what to do and suggested quantifying the number of possible improvements to give examinees a goal to aim for. They get their "aha" moment only when seeing an example solution or having possible refactorings suggested. They commented that they most likely would have rewritten the function from scratch if the question proposed that as an option.
P2 did not commit their updates to-date so did not encounter the conflict in the repository.
P3 did not get to this question in time.
P4 made changes such as renaming variables. Intended changes included separating logically-grouped code fragments; using function names as comments; adding more comments including a header comment on what it does, how it runs and what's expected (with the intent to add more on valid inputs); a code analysis to see if some code is irrelevant; adding a Subversion pragma; adding a debug mode.
P4 commented that some examinees might optimise the code first and others clarify it, it would depend on the individual.
P2 wrote a shell script that worked but this had not been added to the repository.
P1, 3 and 4 didn't do this as they were aiming to complete the test in an hour.
P3 and P4 said they'd've done a loop, shift, while, $* or a web search.
The marking criteria is:
Under a strict interpretation all the participants Failed since they each failed more than one exercise:
Being more lenient and taking into account that non-optimal solutions for Make were given, possible code refactorings were enumerated and that all participants understood solutions when given, this would be a Pass with condition for each.
P1 felt the test was too difficult because there were too many assumptions e.g. language, test framework and version control.
P3 felt the test was difficult in the time available. P3 felt that if an examinee knows these things then they're fairly competent, but cautioned that if the examinees must get all the answers exactly right (e.g. for Make) then it would be very hard. P4 added that if the test was "closed book" then the number of passes would be very small.
P3 and 4 felt the basic mix of shell, maintainable code, version control, build and test was good. P2 felt the test was quite well balanced.
P2 and P4 felt that more detail in the questions would avoid blind alleys.
P1 thought it would be useful as a self-assessment for (particularly early-stage) researchers to identify their training needs. P2-4 also thought it was a good idea in principle.
P1's view was it would not be reasonable to expect someone to sit this before getting access due to the diversity of researchers in both their background and intended use. They commented that a lot of users would be package users and more concerned with how to submit jobs.
P1 commented that the criteria should be are they doing good science, not how good/bad their code is and they would be very wary about making it a condition of access since there are already a number of hoops researchers must go through to get access (e.g. a detailed Technical Assessment).
P1 also raised the question of what happens if a researcher has their Technical Assessment accepted but refuses to sit the test, or fails it and is denied access?
P2-4 felt that it was reasonable to expect the test to be sat. P2 said it could annoy some people but if one decides that only skilled users can access a facility then there needs to be some way to ensure that. P3 and P4 agreed.
P3 commented that if the users objective is research then they may not want to bother and that if what they do and how they do it works for them then they're only wasting their own time if they're inefficient.
P3 and P4 felt the pass/conditional pass/fail marking scheme was harsh. P3 commented that attending a bootcamp might not be enough e.g. P3 had attended a bootcamp but the shell content was skipped and Make wasn't covered at all.
P4 said that if DiRAC has capacity for everyone who ever may be given access then the barrier could be reduced. The barrier could be increased as more use DiRAC.
P3 questioned whether those applying for access (e.g. a PI) would be the same as those who actually use it (e.g. an RA). They made the distinction between someone buying a car and someone actually driving it.


Target
(1) Rating
(2) Reviews/month
(3) Compound
(1-2-3) Multi-target
Target
(1) Rating
(2) Reviews/month
(3) Compound
(1-2-3) Multi-target


Orange Theory |
Workout Minutes by Heart Rate Zone |
Choose Heart Rate Zone | |
| 90%+ of HR | |
| 84-90% of HR | |
| 71-83% of HR | |
| 61-70% of HR | |
| Under 60% of HR | |
| All HR Zones |
| Top chart tracks heart rate zones during OrangeTheory workouts over last month. |
| Lower chart plots calories burned vs. splat points for each workout during same period.Mouse-over either chart to see which days tie to calories/splat points. Splat Points represent total minutes in Orange and Red heart rate zones. |
| OrangeTheory is a 1 hour, full body workout, focused on training Endurance, Strength and Power. Workoutsare designed to produce 12 minutes or more of intensities at 84% or higher of maximum heart rate (orange and red zones). This program design produces workout “after burn” effect, which is an increased metabolic rate for up to 36 hours after the workout. The physiological theory behind the Orangetheory workout is known as “Excess Post-Exercise Oxygen Consumption,” or EPOC. |


After a long while of searching, I finally got a car! An 07 ES350 in Royal Ruby Metallic. It was a donated car. One owner, immaculate condition, came with every original document from the day of purchase. It was a long wait but I'm glad I waited. "Drives like a dream!" (Of course, it's a Toyota). Been having fun with it. From the history I dug up on the car, it seems the owner around 2013 stopped using it as a daily driver, the reason being unknown. The info of the owner was in the car, so I could always try to find out. But an adventure for another day! The stories I have from car searching I could write a small book on, but for now I'm glad it's over and I got my car!
Below is a picture of the car at it's debut at the Chicago Auto Show, 2006.
August 2020->Sept 2020
I have wanted a car for a while now and finally am going for it. But it's been quite a pain. I would say I'm probably more knowledgeable in looking at cars than the average person, so I'm much more thorough in my searches. In my searches, the majority of them have been scams so far or people lying.
For example, one of the first ones was a Golden Beach Camry with 91k miles. Long story short, after some digging I found out the car was actually near 200k miles. I confronted the owner and he disappeared after trying to say oh that's impossible, even though I had proof.
Another common one is dealers pretending to be private owners of cars. I word my questions carefully to check for this, and had a guy asking me "Where did I see the ad?", and "What price is it? My friend is selling my car for me". Your friend sells your car for you and you don't know what price he's selling it for? Yeah, sure.
After about almost 10 people pulling my leg, I finally got someone who was honest and serious. Unfortunately I was too slow to the ball, and the car was sold when I went to go see the car! Pic of it below, I really liked it!
So now, after a month, my search continues, although I may be taking more of a break from it, since it gets tedious dealing with the scammers, liars, etc.