Julia
Julia is a programming language designed for fast performance while also aiming for ease of coding, with ambitious goals to replace languages such as Fortran, MATLAB, Python, and R. As the mentioned languages suggest, Julia is gaining traction in the scientific computing domain, and the “Fresh Shrimp Sushi” community is also aiming to popularize Julia in Korea.
Marker | Classification |
---|---|
Features derived from Python | |
Features derived from MATLAB | |
Features derived from R | |
Features unique to Julia |
The term “features unique to Julia” means that these features differentiate Julia from MATLAB, Python, and R, though they might be common in other programming languages. If you are already familiar with these languages, the notion of “learning Julia” might seem odd, as many functions and expressions are similar across these languages, making Julia intuitively understandable. Refer to the post on Equivalent Codes in Julia, MATLAB, Python, R.
For content on machine learning with Julia, see the Machine Learning category.
Tutorials
Installation and Packages
- Julia Programming Language
- How to Install the Latest Version of Julia on Windows
- How to Install the Latest Version of Julia on Linux
- Installing and Using Packages with
Pkg.jl
- Using Functions Defined in Other Files with
include("file.jl")
- Clearing the Console with Ctrl + L,
print("\033c")
I/O
- Reading and Writing *.mat Files with
MAT.jl
- Loading *.npy Files with
PyCall.jl
- Reading *.csv Files with
CSV.read()
- Exporting 2D Arrays to *.csv Files with
CSV.write()
- Reading *.shp Files with
Shapefile.Table()
- Selecting Files with a Dialog Box like
file.choose()
withopen_dialog()
- Importing Built-in Datasets from R with
RDatasets.jl
- How to use clipboard
clipboard()
,clipboard(x)
Basic Syntax
- Random Sampling with
rand()
- Essential Julia Syntax: Broadcasting
f.(x)
- Powerful Convenience in Julia, Macros
@
- Using Greek Letters and Subscripts in Variable Names
\alpha
→α
- Elegant Use of Loops with
while
,for
,zip()
- Symbols
:foo
- Exclamation Mark Convention
foo!()
- Comprehensions
Advanced Syntax
- The Difference Between
==
and===
- Lambda Expressions
foo -> bar
- Using the Pipe Operator
|>
- Ternary Operator
? :
- Printing Without Data Truncation
show(stdout, "text/plain", foo)
- Meta-Programming with
Meta.parse()
,eval()
- Executing External Programs with
run()
- Using Progress Bars with
ProgressMeter.jl
,ProgressBars.jl
- Sending Emails via Naver with
SMTPClient.jl
Splat Operator ...
- The Splat Operator
...
- Defining Variadic Functions with
function f(x...)
- Converting Between 2D Arrays and Matrices with
[eachrow(M)...]
,hcat(A...)
- Passing Optional Arguments with Splat Operator in Julia
foo(; args...)
Data Structures
- Array Slicing and Indexing
x[1:end]
,x[[1,3,4]]
- Checking Properties of Structures with
propertynames()
- Dictionaries and Pairs
Dict()
,x => y
- Set Data Types and Operators
Set
- Differences Between Vectors and Tuples
- Named Tuples
(; x, y)
- Changing Base Data Types with
@changeprecision
- Converting Strings to Numbers with
parse(type, str)
- Removing Duplicates in Collections with
unique()
,allunique()
Arrays
- Creating Empty Arrays
- Defining an Array by Specifying Its Type
- Various Ways to Create Vectors
- Defining Higher Dimensional Vectors Directly
- Calculating Arrays Column-wise
- Shifting Arrays with
circshift()
- Multi-Dimensional Indexing
CatesianIndex
- Function to access the element of a singleton
only
- Sorting permutation function and its applications
sortperm
- Categorical Arrays
CategoricalArrays.jl
- Named Arrays
NamedArrays.jl
Strings
- Concatenating Strings with
*
,string()
,join()
,^
- Conveniently Printing Variable Values with Interpolation
$string
- Handling Strings like Python with
replace(, "a" => "A"), join(), split()
- Finding Specific Patterns in Strings with
findfirst(), findnext(), findlast()
- Styling Text Output with Built-in Function
printstyled()
DataFrame DataFrames.jl
Converting Between DataFrames and 2D Arrays with
Array(df)
,DataFrame(array, :auto)
Creating DataFrames with Variable Names as Column Names
DataFrame(; x, y)
Changing Specific Values in DataFrames with
replace!(df, A=>B)
Dividing and Calculating DataFrames by Groups with
groupby()
,combine()
Viewing DataFrames Neatly in VSCode with
Main.VSCodeServer.vscodedisplay(df)
Images Images.jl
- Rotating Image Arrays with
imrotate()
- Changing Image Sizes with
imresize()
- Loading Images and Saving as Matrices with
convert(Array{Float64},)
- How to flip an image upside down, mirror it
rotr90(img')
Visualization
- Properties List for Plots
- Setting the Size and Resolution of Figures with
size=(w,h)
,dpi=
- Creating GIFs with
@animate
- Creating Plot Recipes with
RecipesBase.jl
- Changing Default Settings of Figures with
default()
- Printing Simple Figures in the Console with
UnicodePlots.jl
- 3D 描画のカメラ角度の調整方法
camera=(方位角, 高度)
Rendering
- Adding Line Segments to Figures with
plot!(xs, ys)
- Making Figure Backgrounds Transparent with
background_color = :transparent
- Adjusting the Aspect Ratio of Figures with
ratio = :equal
- Filling Areas in Curves, Between Curves, and Inside Closed Curves with
fill=()
- Drawing Vector Fields with
quiver(, quiver=)
Text
- Adding Text to Figures with
annotate!()
- Using $\TeX$ in Figures with
LaTexStrings.jl
,L"$f(x)$"
- Including Korean Text in Figures with
default(fontfamily = "")
,Plots.plotly()
- Adjusting the Position of Legends in Figures with
legend = :topbottom
Style
- Sharing Axes with Differently Scaled Data with
twinx()
,twiny()
- Decorating the Grid Background of Figures
- Changing the Style of Axes in Figures with
framestyle
- List of Marker and Line Styles
plot(shape=, linesytle=)
- Drawing Regression Lines in Scatter Plots with
scatter(smooth = true)
Color
- Using Colors
- Using Palettes
- Using Color Gradients
- Packages for Color Handling
Colors.jl
- Specifying Colors for Graph Elements
- Specifying Colors for Axes, Axis Titles, Ticks, Tick Labels
- Specifying Background Colors
Layout
- Assigning Layouts and Drawing Subplots with
layout = (n,m)
- Adding a Main Title to Subplots with
plot_title = ""
Heatmaps
- Specifying Color Range for Heatmaps with
clim = (,)
- Saving Arrays as Heatmap Images
- Overlaying Plots on Heatmaps
StatsPlots.jl
- Drawing Dendrograms
- Omitting DataFrame Names with Macro
@df
- Drawing Box Plots with
boxplot(data, labels="label")
Mathematics
Packages related to graphs (networks) like Graphs.jl
can be found in the Graph Theory category.
Computation
- Random Sampling with Weights
sample(, Weights())
- Rounding to a Specific Number of Decimal Places
round(digits=)
- Inverting Bit Arrays with
.!(foo)
- Calculating Frequencies with
freqtable()
- Using Date and Time Related Functions with
Dates
- Using Composite Functions with
∘
- Using Infinity
∞
- Checking for Approximate Equality
≈
- Using Complex Numbers
im
- Calculating the Mean Excluding Zeros and Missing Values
mean(!iszero,)
- The Difference Between
Inf
andNaN
When Dividing by Zero - Comparing
NaN
in Julia - 🔒 Distributed Computing with
@distributed
Libraries
- Linear Algebra Module
LinearAlgebra
- Polynomial Functions Package
Polynomial.jl
- Number Theory Package
Primes.jl
- Derivatives Package
Calculus.jl
- Calculating Distance Matrices with
Distances.jl
- Symbolic Operations with
SymEngine.jl
- Performing Regression Analysis with
GLM.jl
- Fourier Transform Package
FFTW.jl
- Using Infinite Arrays with
InfiniteArrays.jl
- Numerical Interpolation with
Interpolations.jl
- Using Finite Differences with
FiniteDifferences.jl
- Clustering Package
Clustering.jl
- Using Decision Trees with
DecisionTree.jl
Code Optimization Techniques
- Comparing Speed of Equality Operators
==
for Characters and Integers - Optimizing Distance Matrix Calculation with
pairwise()
- Converting to Integer Type by Truncating Decimal Points with
trunc()
- Quickly Referencing Subarrays with
@views
- Short Circuiting with
&&
,||
Looking for Something Else?
Although not published as posts due to being considered not substantial enough, the following list might contain what you’re looking for.
- Textbooks
- First Semester in Numerical Analysis with Julia: Basics of numerical analysis and their implementation in Julia. PDF available for download.
- Julia Data Science: An online book published in November 2021, available in English, Portuguese, and Chinese. Focuses mainly on
DataFrames.jl
and the visualization packageMakie.jl
. PDF download available. - Algorithm for Optimization: Covers various methods for solving optimization problems and their implementation in Julia. Original work and chapter-wise PDFs available for download. A Korean translation titled Practical Optimization Algorithms (Understanding Optimization Algorithms with Julia) is available in Korea.
- Packages
- JuliaDB.jl: A data processing library known for its speed and memory management.
- Metatheory.jl: A library for metaprogramming and symbolic computation.
- Cairo.jl: A package for powerful image creation capabilities.
- Miscellaneous
- Profiler: Offers profiling similar to MATLAB to show performance metrics.
- The Fast Track to Julia: A cheat sheet summarizing Julia syntax.
- Julia?: Appears to be a personal blog sharing advanced tips for using Julia.
All posts
- Numerical Interpolation in Julia
- How to Use Finite Difference in Julia
- How to Remove Axis Values in Julia Plots
- How to Add a Main Title in Julia Subplots
- How to Call a DataFrame without String7, String15 in Julia
- How to Normalize Matrices Column-wise in Julia
- How to Import Packages from Julia to R
- Referencing Specific Positions in an Array with Functions in Julia
- How to Draw Vector Fields in Julia
- Referencing Struct Properties as Functions in Julia
- Julia's Automatic Differentiation Package Zygote.jl
- How to Use Clustering Packages in Julia
- How to Remove Duplicates from a Collection in Julia
- How to Use Decision Trees in Julia
- Functions for accessing elements of a singleton set in Julia
- Application for sortperm in julia
- How to Assess Code Performance, Benchmark in julia
- How to Use Clipboard in Julia
- How to Flip Images Vertically and Horizontally in Julia
- Introduction to Julia's Symbolic Computing Package Symbolics.jl
- Introduction to the Julia Natural Language Processing Package TextAnalysis.jl
- Obtaining Colors with Values from 0 to 1 in the Julia Color Scheme
- Decorating Text Output with Built-in Functions in Julia
- How to Use Colors in Julia Plots
- Package for Color Processing in Julia
- How to Use RGB Color Codes in Julia
- Specifying the Color of Graph Elements in Julia Plots
- How to Specify Graph Colors for Each Subplot in Julia Plots
- Specifying Background Color in Julia Plots
- Decorating the Background Grid in Julia Plots
- List of Plot Properties in Julia Plots
- How to Plot Two Data Axes of Different Scales in Julia Plots
- How to Use Palettes in Julia Plots
- How to Use Color Gradients in Julia Plots
- Comparing NaN in Julia
- Differences Between Vectors and Tuples in Julia
- Methods for Calculating Arrays Column-wise in Julia
- Comprehensions in Julia
- How to Define an Array by Specifying Its Type in Julia
- NamedArrays.jl Package in Julia
- Julia Programming Language
- 줄리아의 타입과 애노테이션
- Installing and Using Packages in Julia
- Translating Arrays in Julia
- Various Methods of Creating Vectors in Julia
- Slicing and Indexing of Arrays in Julia
- Sets and Operators in Julia
- Functions for 2D Array Operations in Julia
- How to output and save arrays as heatmap images in Julia
- How to Rotate Image Arrays in Julia
- How to Change Image Size in Julia
- How to Load Images in Julia and Save Them as Matrices
- Lambda Expressions in Julia
- How to Use Pipe Operators in Julia
- Julia's Powerful Convenience Features, Macros
- How to Parallel Process in Julia
- Installing the Latest Version of Julia on Linux
- How to Create an Empty Array in Julia
- How to Compute Distance Matrices in Julia
- Making GIFs in Julia
- How to Use Composite Functions in Julia
- Changing the Number of Threads for parallel Computing in Julia on Linux
- How to Determine the Location of Code Files Executed in Julia
- Changing the Number of Threads for parallel Computing in Julia on Windows
- How to Read *.csv Files in Julia
- Converting Between DataFrames and 2D Arrays in Julia
- How to Use Hexadecimal RGB Codes (HEX) in Julia
- How to Install the Latest Version of Julia on Windows
- Solving \General\Registry.toml: No such file or directory when Installing Julia Packages
- Comparison of the Speed of the Equality Operator == for Characters and Integers in Julia
- How to Weight and Random Sample in Julia
- Optimizing Distance Matrix Calculations in Julia
- How to Flatten an Array in Julia
- Metaprogramming in Julia
- Using Julia in Windows CMD and PowerShell
- How to Conveniently Print Variable Values in Julia, Interpolation
- Writing Greek Characters and Subscripts in Julia Variable Names
- How to Output a 2D Array to a CSV File in Julia
- How to Calculate Distance using NearstNeibors.jl in julia
- Renaming Column Names of a DataFrame in Julia
- How to truncate decimal points and convert to an integer in Julia
- How to Read SHP Files in Julia
- How to Create an Array Filled with a Specific Value in Julia
- How to Find Derivatives in Julia
- Checking Struct Properties in Julia
- How to Use zfill() in Julia
- How to Specify Heatmap Color Ranges in Julia
- How to Round to a Specific Decimal Place in Julia
- How to Open a Dialog Box and Select a File Like file.choose() in Julia
- How to Invert a Bit Array in Julia
- The Difference Between == and === in Julia
- Methods for Coloring Up to a Certain Value from Curves in Julia / Between Two Curves / Inside a Closed Curve
- How to Make a Transparent Background in Graphics with Julia
- Performing Operations on Vectors of Different Sizes Component-wise in Julia
- Using TeX in Plots in Julia
- Overlaying Plots on Heatmaps in Julia
- How to load a npy file in Julia
- List of Available Commands in Julia Package Management Mode
- How to Use Elegant Loops in Julia
- How to Directly Define Multidimensional Arrays in Julia
- How to Check if Elements of an Array Belong to a List in Julia
- Symbols in Julia
- How to Refer to Both Index and Value in Julia's Loops
- How to Store Data like .mat in Julia
- From Julia: Dictionaries and Pairs
- How to Check Approximate Values in Julia
- Handling Strings in Julia like in Python
- Inserting Korean Text into Julia Plots
- How to Insert Text into a Julia Plot
- Hiding Specific Data Labels in Julia Plots
- Concatenating Strings in Julia
- How to Use Polynomials in Julia
- How to Use Factorization and Prime Number Functions in Julia
- How to Check if a Specific String is Contained in Julia
- How to Draw a Dendrogram in Julia
- How to Find a Specific Pattern Location in Julia Strings
- How to Perform Hierarchical Clustering in Julia
- How to Make Empty DataFrame in julia
- How to Install a Specific Version of a Package in Julia
- Using Infinity in Julia
- Inserting a New Row into a DataFrame in Julia
- How to Sort Dataframe in julia
- Inserting a Line into a Julia Set Image
- Adding a New Column to a DataFrame in Julia
- - Text Formatting Package in Julia
- Solving Broken Characters when Exporting CSV in Julia
- How to Adjust the Aspect Ratio of a Julia Set Picture
- Adjusting the Position of the Legend in Julia Plots
- Drawing Subplots with a Layout in Julia
- How to Delete Duplicate Rows in DataFrames in Julia
- grouping and Calculating DataFrames in Julia
- How to Create Art Styles in Julia
- How to Insert Vertical and Horizontal Lines in Figures in Julia
- How to Remove Specific Rows from a DataFrame in Julia
- How to Change the Basic Settings of a Julia Plot
- How to Check the Element Type Inside a Julia Container
- How to Define Variadic Functions in Julia
- Converting String to Number in Julia
- Executing External Programs in Julia
- Methods for Symbolic Computation in Julia
- How to Insert Command Line Arguments in Julia
- Differences in Array Dimensions in Julia, Python (NumPy, PyTorch)
- Julia's Named Tuples
- How to Create a DataFrame with Variable Names as Column Names in Julia
- How to Check DataFrame Size in Julia
- How to Handle Exceptions in Julia
- How to Check if an Array is Empty in Julia
- How to Check Package Versions in Julia
- How to Load a Built-in Dataset in R Used in Julia
- Julia's Categorical Array
- How to View Data Frame Summaries in Julia
- Reading Only Columns from a CSV File in Julia
- How to Calculate Frequency in Julia
- How to Change a Specific Value in a DataFrame in Julia
- Julia's Ternary Operator ? :
- How to Replace NaN with 0 in Julia DataFrames
- How to Write Conditional Statements Concisely in Julia
- How to Change Axis Style in Julia Plots `framestyle`e`
- How to Use Complex Numbers in Julia
- Creating Dictionaries from Arrays in Julia
- Julia's Broadcasting Syntax
- How to Quickly Reference Subarrays in Julia
- Julia's Exclamation Point Convention
- Julia's find functions
- Julia's Short Circuit
- Julia's Multidimensional Indices
- Distributed Computing in Julia
- How to Change Basic Data Types in Julia
- How to Use Fast Fourier Transform (FFT) in Julia
- Using Date and Time Functions in Julia
- How to Use the Linear Algebra Package in Julia
- How to Print Without Omitting Data in Julia
- Sampling Randomly in Julia
- Sampling Randomly from a Given Distribution in Julia
- How to Send an Email via Naver in Julia
- How to Convert between 2D Arrays and Matrices in Julia
- Specifying the Color of Axes, Axis Names, Ticks, and Tick Values in Julia Plots
- How to Calculate the Difference Between Two Times in Seconds in Julia
- Broadcasting of Multivariable Functions in Julia
- How to Create a Meshgrid in Julia
- How to Neatly Print without Axes, Scales, etc. in Julia
- How to Perform Regression Analysis in Julia
- Calculating the Mean Excluding 0 or Missing Values in Julia
- How to use progress bars in Julia
- How to Reference Environment Variables in Julia
- Removing Missing Values in DataFrames in Julia
- How to Initialize the Console in Julia
- How to Output Simple Graphics in the Julia Console
- Reading and Writing mat Files in Julia
- How to Use Infinite Arrays in Julia
- How to Draw a Box Plot in Julia
- How to Fix the Random Seed in Julia
- Drawing Arrows in Graphics with Julia
- How to Adjust the Size and Resolution of an Image in Julia
- How to Color Markers in a Julia Fractal
- How to k-means cluster in Julia
- How to Use Functions Defined in Other Files in Julia
- Omitting DataFrame Names in Julia StatsPlots with Macro @df
- Slicing Only a Part of Unicode Strings in Julia
- Julia's Splat Operator
- Tips for passing Optional Arguments through the Julia Splatt Operator
- The Difference Between Inf and NaN When Dividing by Zero in Julia
- Drawing a Regression Line on a Julia Plot
- List of Markers and Line Styles in Julia
- How to Use Circular Arrangements in Julia
- Calculating the Difference of Arrays in Julia