Last active
July 1, 2020 14:24
-
-
Save yoki/08ef37b2f2035735d16b3583d060e897 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Variable, type and functions https://github.com/PacktPublishing/Julia-1.0-Programming-Cookbook/tree/master/Chapter05 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
println(code) | |
chr = 'C' | |
str = "A string" | |
for c in str | |
println(c) | |
end | |
str = "Learn" * " " * "Julia" | |
println("a * b = $(a*b)") # interpolation | |
# search | |
findfirst(isequal('i'), "Julia") == 4 | |
# replace | |
replace("Julia", "a" => "us") == "Julius" | |
# length | |
lastindex("Hello") == 5 | |
length("Hello") == 5 | |
#Beware of multi-byte Unicode encodings in UTF-8: | |
10 == lastindex("Ångström") != length("Ångström") == 8 | |
# regex | |
pattern = r"l[aeiou]" | |
# subexpressions | |
str = "+1 234 567 890" | |
pat = r"\+([0-9]) ([0-9]+)" | |
m = match(pat, str) | |
m.captures == ["1", "234"] | |
# all occurances | |
[m.match for m = eachmatch(pat, str)] | |
# Data engineering | |
#https://github.com/PacktPublishing/Julia-1.0-Programming-Cookbook/tree/master/Chapter03 | |
# Numerical computing https://github.com/PacktPublishing/Julia-1.0-Programming-Cookbook/tree/master/Chapter04 | |
# metaprograming and advanced typing https://github.com/PacktPublishing/Julia-1.0-Programming-Cookbook/tree/master/Chapter06 | |
# Analytical data (dataframe) https://github.com/PacktPublishing/Julia-1.0-Programming-Cookbook/tree/master/Chapter07 | |
# Benchmark/log/call other program https://github.com/PacktPublishing/Julia-1.0-Programming-Cookbook/tree/master/Chapter08 | |
# Data Science https://github.com/PacktPublishing/Julia-1.0-Programming-Cookbook/tree/master/Chapter09 | |
# Distributed Computing https://github.com/PacktPublishing/Julia-1.0-Programming-Cookbook/tree/master/Chapter10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment