Technology Tales

Notes drawn from experiences in consumer and enterprise technology

12:05, 29th September 2022

SAS Processing Restrictions in a Locked-Down State

LOCKDOWN is a security feature in SAS Viya that restricts access to specific system files and programming functionalities by default, ensuring controlled execution of sessions on SAS servers. Enabled by default, it is managed by administrators through system options, statements and a lockdown allowlist, which defines permitted resources and access methods.

When activated, certain SAS language elements such as PROC PYTHON, PROC LUA IO functions and the SOCKET access method are disabled, while others like EMAIL and FTP remain available. File access is governed by the allowlist, which includes predefined paths such as SASROOT, JAVA_HOME and mounted volume directories, with administrators able to add additional paths or features as needed. This mechanism aims to enhance security by limiting potentially risky operations while maintaining access to essential system components and data.

15:14, 28th September 2022

SAS_PACKAGES - a SAS Packages Framework and Repository

The SAS Packages Framework is a tool designed to simplify the creation and sharing of SAS packages, which are self-contained zip files containing structured code along with metadata, load, unload and help files. These packages aim to streamline code distribution by separating complex developer dependencies from user interaction and reducing challenges associated with remote deployment. The framework provides documentation, tutorials and example packages, with updates including new macros and features to enhance functionality. It is supported by a community and used in various locations, with resources available for both developers and users to facilitate adoption and implementation.

17:02, 27th September 2022

R for Clinical Study Reports and Submission is a practical guide authored by Yilong Zhang, Nan Xiao, Keaven Anderson and Yalin Zhu, aimed at helping both novice and experienced R programmers use the language to prepare clinical study reports (CSRs) and submit them to regulatory agencies. CSRs are integral to clinical trial development, serving as comprehensive scientific records of individual trials, and their preparation is guided by the ICH E3 framework. The book covers the creation of tables, listings and figures, project management and the regulatory submission process, and has been presented at a number of industry events including the R/Pharma Conference, the ASA Biopharmaceutical Section Regulatory-Industry Statistics Workshop and the PSI Webinar Series.

17:01, 27th September 2022

SAS Mirror Manager for SAS Viya 3.4

SAS Mirror Manager is a tool used to create and manage mirror repositories for deploying SAS Viya 3.4, supporting both Linux and Windows environments as well as containerised deployments. It can be run locally without needing to be installed on the deployment environment itself, and is available for download in versions compatible with Linux, Macintosh and Windows on x64 architecture, each at roughly 4 MB in size. Instructions for downloading and using the tool are included in the deployment guide linked within the user's Software Order Email.

17:00, 27th September 2022

SAS Mirror Manager for SAS Viya

SAS Mirror Manager is a tool used to create and manage mirror repositories for deploying SAS Viya, and it can be run locally without needing to be installed on the deployment environment itself. It is available for download in versions compatible with Linux, Macintosh and Windows operating systems, each at approximately 7 megabytes in size, with instructions provided through the relevant deployment guide. SAS also offers supporting resources for users, including training options spanning classroom, live web, e-learning and one-on-one mentoring formats, as well as a globally recognised certification programme and a dedicated user group for administrators and architects.

18:06, 24th August 2022

Hello Shiny Python

In July 2022, the alpha release of Shiny generated considerable excitement among Python practitioners, who had long sought an equivalent to the R Shiny framework for building bespoke web applications. Installed via PyPI like any other Python package, Shiny follows the same fundamental two-part structure familiar to R Shiny users, comprising a user interface layer that generates HTML, CSS and JavaScript rendered in the browser, and a server function containing the application logic.

The UI and server communicate through uniquely identified input and output bindings, with the server receiving user-driven values and returning rendered results such as plots. A practical demonstration of this involves building an interactive application using the plotnine library to display diamond price data filtered dynamically by colour selection, illustrating how relatively straightforward it is to produce a functional, interactive data application in Python using the framework.

18:05, 24th August 2022

Shiny for Python

This framework for creating reactive data and AI applications in Python offers a streamlined approach to building interactive dashboards and web interfaces. It minimises manual state management by automatically determining execution paths, reduces unnecessary re-rendering through a reactive engine and integrates with modern Python tools to support custom styling and complex applications. Users can begin by installing the package, selecting a template and customising layouts with data, enabling the development of scalable and visually appealing applications with minimal setup.

11:54, 20th August 2022

Using Pandas with Python Decimal for accurate currency arithmetic

When working with currency or other figures requiring precise decimal representation, Python's default float type and Pandas' NumPy float64 can introduce subtle inaccuracies due to their base 2 internal representation, meaning comparisons and calculations may produce unexpected results.

Two practical approaches exist for maintaining accuracy. The first involves integer arithmetic, where decimal separators are stripped and values are converted to integers before calculation, though this requires all values to share the same number of decimal places. The second, more flexible approach uses Python's Decimal module, which maintains a base 10 representation and produces exact results.

When using Decimal within Pandas, care is needed because standard aggregation methods such as sum() and mean() will silently convert Decimal objects back to float64. To preserve Decimal types, any sum operations should use apply() with a lambda function, and mean values should be calculated by combining apply() with a manual division by the length of the dataframe rather than relying on the built-in mean() method.

13:10, 18th August 2022

Julia 1.8 Highlights

This significant update to the Julia programming language brings several enhancements aimed at improving performance, usability and package management. The new version introduces a tool that provides detailed insights into how long dependencies take to load, helping developers identify bottlenecks in package initialisation. This is particularly useful for large projects where understanding load times can lead to optimisations.

The package manager now includes an indicator that shows whether a package is on its latest version and whether other packages are preventing it from updating. This helps users avoid confusion when encountering bugs or discrepancies between documentation and the code they are running. A new flag allows users to see which packages are outdated and what constraints are holding them back.

Support for creating sysimages with precompiled packages has been improved, allowing for faster load times. However, this comes with the caveat that versions of packages included in sysimages are fixed, meaning updates to those packages will not be automatically applied.

Pre-compilation has been enhanced to retain more type-inferred code, reducing the need for repeated inference during initial runs. This can significantly cut down on latency for workloads with predictable types. The changes also make pre-compilation more reliable, ensuring that methods linked to a package are cached effectively.

Apple Silicon is now a Tier 2 supported platform, with improvements to the linker reducing crashes that were common in earlier versions. This update ensures better stability on macOS devices using ARM processors. These changes collectively aim to make Julia more efficient, easier to manage and more compatible with modern hardware, addressing both developer and user needs in a rapidly evolving ecosystem.

12:56, 13th August 2022

Compiling a Custom Sysimage in Julia

Creating a custom sysimage in Julia can significantly reduce pre-compilation delays, particularly for frequently used packages like Plots, by precompiling essential functions and dependencies into a standalone file. This involves setting up a new project, defining a representative workflow in a script, compiling the sysimage using PackageCompiler.jl and then configuring Julia to load the custom image instead of the default one. The result is a faster startup time for Julia sessions, with minimal delay when accessing precompiled packages, though some steps still necessitate direct interaction with the terminal for full control over the compilation process. While this process can be initiated through terminal commands, support within VSCode remains experimental, requiring manual configuration to ensure the sysimage is recognised and used automatically when launching a REPL.

  • The content, images, and materials on this website are protected by copyright law and may not be reproduced, distributed, transmitted, displayed, or published in any form without the prior written permission of the copyright holder. All trademarks, logos, and brand names mentioned on this website are the property of their respective owners. Unauthorised use or duplication of these materials may violate copyright, trademark and other applicable laws, and could result in criminal or civil penalties.

  • All comments on this website are moderated and should contribute meaningfully to the discussion. We welcome diverse viewpoints expressed respectfully, but reserve the right to remove any comments containing hate speech, profanity, personal attacks, spam, promotional content or other inappropriate material without notice. Please note that comment moderation may take up to 24 hours, and that repeatedly violating these guidelines may result in being banned from future participation.

  • By submitting a comment, you grant us the right to publish and edit it as needed, whilst retaining your ownership of the content. Your email address will never be published or shared, though it is required for moderation purposes.