21:09, 16th January 2022
Numba is an open-source, just-in-time compiler that converts a subset of Python and NumPy code into fast machine code using the industry-standard LLVM compiler library, allowing numerical algorithms to reach speeds comparable to C or FORTRAN. It works by applying simple decorators to Python functions at runtime, requiring no separate compilation step or additional compilers. Designed with scientific computing in mind, it integrates well with NumPy arrays, Jupyter notebooks and distributed frameworks such as Dask and Spark. Numba supports parallelisation across multiple CPU cores, SIMD vectorisation for further speed gains and GPU acceleration via NVIDIA CUDA, all from within standard Python code. It is compatible with a broad range of hardware including Intel, AMD and ARM processors as well as NVIDIA GPUs, and runs across Windows, macOS and Linux, with precompiled binaries available through conda and pip.
21:09, 16th January 2022
Learn Julia For Beginners – The Future Programming Language of Data Science and Machine Learning Explained
Julia is a high-level, dynamic programming language designed to combine the speed of C/C++ with the ease of use associated with Python, making it particularly well-suited to computationally complex problems in fields such as chemistry, biology, machine learning and data science, though it is also capable of supporting web and game development. The language features a flexible variable system with dynamic typing, support for Unicode and emoji variable names, and straightforward conditional statements and loops that use an end keyword rather than brackets or braces.
One of its most powerful features is multiple dispatch, which allows functions of the same name to be defined with different argument types, enabling developers to write both generic and type-specific code without cramming every scenario into a single function. Julia also supports structs, which function similarly to classes in object-oriented languages, allowing developers to define custom objects and types with optional constructors and typed attributes.
Package management is handled through a built-in manager accessible directly from the read-evaluate-print loop, with commands to add, remove and inspect installed packages, and the language allows packages to be loaded using either the using or import keywords, with the key difference being how functions are brought into the current namespace. For those wishing to explore the language further, official documentation and guided learning resources are available through the Julia project's own platform.
14:15, 16th January 2022
JuliaAcademy is a free online learning platform dedicated to teaching the Julia programming language, offering a range of courses suited to different skill levels and interests. Available courses cover topics including the fundamentals of the language for those with prior programming experience, data science methods and visualisation, an introductory course aimed at hesitant beginners, computational modelling, machine learning foundations and a short guide to getting started with the platform itself. Each course is led by a named instructor, several of whom hold doctoral qualifications, and all courses are available at no cost to learners.
14:13, 16th January 2022
How to install NumPy package in Julia?
Installing NumPy in Julia involves verifying the presence of the language on a system and leveraging Python integration to access the library. Users first check for an existing Julia installation by executing commands in the terminal, then proceed to install the PyCall package through Julia's package manager, which acts as a bridge to Python's ecosystem.
Once PyCall is added, it enables the import of NumPy using a specific function, allowing Julia to utilise Python's numerical computing capabilities. This process highlights Julia's compatibility with Python libraries, facilitating tasks such as data analysis and machine learning within its environment.
The steps outlined focus on the technical workflow required to integrate external Python modules into Julia, ensuring that users can harness the functionalities of NumPy without relying on native Julia implementations. The approach underscores the interoperability between Julia and Python, offering a pathway for developers familiar with Python to extend their tool set within Julia's high-performance framework.
14:07, 16th January 2022
The Future of Machine Learning and why it looks a lot like Julia
The Julia programming language is increasingly being considered a strong candidate for the future of machine learning and deep learning, despite its ecosystem being less mature than Python's. Its core framework for deep learning, Flux.jl, is written entirely in Julia, making its internals far more accessible than those of TensorFlow or PyTorch, which rely heavily on C++ with Python wrappers.
Julia offers native support for multidimensional arrays, eliminating the need for additional libraries like NumPy, and its data handling tools such as CSV loading and DataFrames.jl are significantly faster than their Python counterparts. Flux is designed with simplicity and extensibility in mind, allowing developers to build custom functions that integrate seamlessly into the broader ecosystem, and unlike TensorFlow or PyTorch, it is not backed by a single large corporation, making it more genuinely open to community contribution.
The language also enables powerful combinations with scientific computing packages, such as DiffEqFlux.jl, which merges neural networks with differential equations to support physics-informed machine learning. Where Julia currently falls short is in community-generated learning resources and convenience utilities for data loading and image processing, areas where TensorFlow and PyTorch remain more user-friendly, though active development continues to close these gaps.
14:01, 16th January 2022
5 Julia Projects for Beginners — Easy Ideas to Get Started Coding in Julia
For those new to the Julia programming language, building small beginner projects is an effective way to develop a solid foundation before tackling more complex challenges such as machine learning and data science. Five such projects offer a practical introduction to core concepts: a Mad Libs game that teaches string interpolation and user input handling, a number guessing game in which the player attempts to identify a randomly generated number using while loops and conditional logic, a reverse version in which the computer does the guessing by shuffling an array of possible values and iterating through them, a Rock Paper Scissors game that introduces chained conditionals and timed delays, and a password generator that demonstrates the use of external packages, arrays and the push function. Together, these projects cover a broad range of foundational Julia concepts including functions, loops, conditionals, random number generation and package management, providing a well-rounded starting point for anyone beginning to learn the language.
13:58, 16th January 2022
6 Julia Frameworks to Create Desktop GUI’s and Web Apps
Julia is a programming language commonly associated with technical fields such as machine learning and data science, but its capabilities extend to building desktop graphical user interfaces and web applications. Genie.jl is a full web framework inspired by Django, offering features such as a routing engine, templating and authentication. Gtk.jl provides bindings to the GTK windowing toolkit, enabling the creation of native desktop interfaces. Makie.jl is a widely used visualisation package capable of producing interactive, GPU-accelerated graphics that can also run in a browser. Blink.jl wraps the Electron runtime to allow HTML-based desktop applications to be built entirely in Julia, while Dash.jl, part of the Plotly ecosystem, enables the development of analytic web dashboards without requiring any JavaScript knowledge. For distributing desktop applications to users who do not have Julia installed, PackageCompiler can bundle an entire project and its dependencies into a single executable file, though some code modifications may be necessary to ensure compatibility.
17:52, 14th January 2022
Handling Categorical Data in R - Part 3
Part 3 of the "Handling Categorical Data in R" series focuses on manipulating and reshaping categorical data using the forcats package in R, covering three key operations: changing the value of levels, adding or removing levels and changing the order of levels. To modify level values, functions such as fct_collapse() and fct_recode() can be used to combine or rename categories, while fct_lump_min(), fct_lump_n() and fct_lump_prop() allow less frequent levels to be grouped together based on count or proportion thresholds. The fct_other() function provides a straightforward way to retain or drop specified levels, merging the remainder into an "Other" category, and fct_anon() enables the anonymisation of level labels for data sharing purposes. For adding or removing levels, fct_expand() introduces new categories, fct_drop() removes unused ones and fct_explicit_na() converts missing values into a clearly labelled category. Finally, the ordering of levels can be adjusted manually using fct_relevel(), sorted by frequency with fct_infreq(), arranged by order of appearance with fct_inorder() or modified further using fct_rev() and fct_shuffle() to reverse or randomise the sequence respectively.
18:22, 13th January 2022
Handling Categorical Data in R - Part 2
Part 2 of the Rsquared Academy series on handling categorical data in R focuses on summarising categorical data using a variety of functions and packages. Unlike numeric data, categorical data are best summarised through counts, proportions, cumulative frequencies and cross tables, and R provides several tools to achieve this.
Key functions covered include nlevels() and levels() for identifying the number and names of categories, table() and fct_count() for frequency tabulation, and prop.table() or proportions() for calculating proportions and percentages. There also are two-way and multidimensional tables using table() and xtabs(), alongside supporting functions such as margin.table(), addmargins() and ftable() for computing marginal totals and formatting complex tables.
Handling of missing values within tables is addressed through the useNA argument, and subsetting tables using bracket notation is demonstrated. For more detailed cross-tabulation output similar to that produced by SAS or SPSS, the CrossTable() function from the gmodels package and ds_cross_table() from the descriptr package are presented as useful alternatives.
15:45, 12th January 2022
How To Connect R Shiny to Postgres Database
Connecting R and R Shiny to a PostgreSQL database is a straightforward process that requires only a few packages and the relevant connection parameters, such as the database name, host, port and user credentials. To demonstrate this, a publicly available earthquake dataset from Kaggle is first imported into a PostgreSQL table using a GUI management tool, after which R establishes a connection to the database and retrieves the data using standard query functions.
Building on this foundation, an interactive R Shiny dashboard can be constructed that renders a map of earthquake locations, filtered dynamically by magnitude using a slider input, with the database queried each time the input value changes and the connection closed once the data has been retrieved. While this approach prioritises demonstrating proper connection handling over performance, it is noted that loading the full dataset outside the server function and filtering it locally could improve responsiveness.