Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Julia

You're reading from   Mastering Julia Enhance your analytical and programming skills for data modeling and processing with Julia

Arrow left icon
Product type Paperback
Published in Jan 2024
Publisher Packt
ISBN-13 9781805129790
Length 506 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Malcolm Sherrington Malcolm Sherrington
Author Profile Icon Malcolm Sherrington
Malcolm Sherrington
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Chapter 1: The Julia Environment 2. Chapter 2: Developing in Julia FREE CHAPTER 3. Chapter 3: The Julia Type System 4. Chapter 4: The Three Ms 5. Chapter 5: Interoperability 6. Chapter 6: Working with Data 7. Chapter 7: Scientific Programming 8. Chapter 8: Visualization 9. Chapter 9: Database Access 10. Chapter 10: Networks and Multitasking 11. Chapter 11: Julia’s Back Pages 12. Index 13. Other Books You May Enjoy

Downloading the code accompanying the book.

Packt Publishing distributes the sources on their GitHub website, and for this book, the sources can be found at https://github.com/PacktPublishing/Mastering-Julia-Second-Edition

These can be viewed using a web browser and can be downloaded using the git clone <git-url> command which will create a copy of the sources named Mastering-Julia-Second Edition.

As this is somewhat unwieldy, I have renamed this as MJ2 on my computer(s), and this is used in the text throughout the book and in the Julia scripts.

To clone the sources may require using the built-in git command, although it is possible to use an editor such as Visual Studio Code of a GIT IDE. Whether git is available from the command line depends on which operating system is being used.

  • macOS doesn’t have a built-in version of Gi; however, it’s included as part of Xcode or else installed via using homebrew or by choosing an IDE such as GitHub Desktop.
  • Most Linux distros have the git command already built in.
  • For Windows binaries can be downloaded from the main git website using https://git-scm.com/download; in fact, this page includes sources for all three operating systems plus links to several popular git clients.

The source accompanying this book is arranged as a set of code folders, one per chapter denoted from Code01 through to Code11, containing all the Julia source code relating to the chapter. For example, the Code01 folder contains the relevant script named as: Chp02.jl. There may be additional sources and in particular those corresponding to Jupyter and Pluto notebooks. The sources in each folder are described in the markdown file(s) README.md or the equivalent README.txt file.

Additionally, there is a Project.TOML and a Manifest.TOML file for each chapter plus a script (setup.jl) which can be used to create these from scratch rather than using the ones provided.

These can be utilized by switching to the specific project via the package manager via

julia> import Pkg; Pkg.activate(".")

Possibly when first cloned it may be sensible to also include: Pkg.instantiate()

It will be found to be necessary to work with individual chapter projects rather than adding all Julia modules to the general registry, which otherwise will get extremely clogged, with probable conflicts arising. However, in addition to building up manifests, the reader may find setup.jl useful in getting started with some of the earlier code samples in the book, rather than just adding them individually in the REPL

Additionally, there are two other directories: Alice and DataSources

  • Alice has a set of files, from the Alice books and others of Lewis Carroll’s works, which are used in some text processing routines.
  • DataSources is split into subfolders containing datasets, such as those in CSV and TSV formats, and files necessary for the sections working with SQL-based and other databases.

As an example ENV["HOME"]*"/MJ2/DataSources" is used as a reference to the location of the data sources directory, since ENV["HOME"] is an alias to my user home directory and I have added the GitHub sources as a folder directly under it.

Note that on Windows this alias is now ENV["HOMEPATH"]. So the construct joinpath (ENV["HOMEPATH"],"MJ2","DataSources") may be preferred as it does not depend on the directory separator, though in my experience either “\\” or “/” can be used in Julia when on Windows.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image