Skip to content

Instantly share code, notes, and snippets.

@giordano
giordano / a64fx
Created February 19, 2023 23:19
A64FX vs Apple M1
julia> versioninfo()
Julia Version 1.10.0-DEV.635
Commit 12d329b6e3d (2023-02-17 20:01 UTC)
Platform Info:
OS: Linux (aarch64-linux-gnu)
CPU: 50 × unknown
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, a64fx)
Threads: 1 on 50 virtual cores
@giordano
giordano / pin-all-packages-in-manifest.jl
Created June 9, 2020 18:04
Create a Julia Project file that pins all packages to the version in the manifest
using Pkg, Pkg.TOML
manifest = open(joinpath(dir, "Manifest.toml")) do io
TOML.parse(io)
end
open(joinpath(dir, "Project-tmp.toml"), "w") do io
println(io, "[deps]")
for pkg in keys(manifest)
println(io, pkg, " = \"", manifest[pkg][1]["uuid"], "\"")
function fraction_floats(float_type, int_type)
# Size in bits of the integer type
int_size = sizeof(int_type) * 8
# Number of bits of the mantissa of the floating point type
mantissa_size = Base.significand_bits(float_type)
s = BigInt(2) ^ (mantissa_size + 1)
# Make sure this is the maximum integer of type `int_type` representable
# with the floating point type
@assert s == maxintfloat(float_type, int_type)
for n in (mantissa_size + 2):int_size
@giordano
giordano / artifact_download_debug.jl
Created March 10, 2020 22:02 — forked from staticfloat/artifact_download_debug.jl
Julia 1.3+ Artifact error debugging script
# Adapt this script to debug why artifact installation might be failing
using Pkg, Pkg.Artifacts, Pkg.BinaryPlatforms, Pkg.PlatformEngines
# Initialize Pkg code
probe_platform_engines!(; verbose=true)
# Change these to whatever you need them to be, to debug your artifacts code
artifacts_toml_url = "https://raw.githubusercontent.com/JuliaBinaryWrappers/HELICS_jll.jl/master/Artifacts.toml"
artifact_name = "HELICS"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\documentclass[a4paper]{article}
\usepackage{geometry}
\setlength{\topmargin}{-3cm}
\setlength{\oddsidemargin}{-2cm}
\usepackage{pdfpages}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{lipsum}
\renewcommand{\floatpagefraction}{.9}