Skip to content

Instantly share code, notes, and snippets.

View example.tex
\documentclass[a4paper]{article}
\usepackage{geometry}
\setlength{\topmargin}{-3cm}
\setlength{\oddsidemargin}{-2cm}
\usepackage{pdfpages}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{lipsum}
\renewcommand{\floatpagefraction}{.9}
View Schiaparelli.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View diffeq-uncertainties.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@giordano
giordano / artifact_download_debug.jl
Created Mar 10, 2020 — forked from staticfloat/artifact_download_debug.jl
Julia 1.3+ Artifact error debugging script
View artifact_download_debug.jl
# 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"
View fraction_floats.jl
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 / pin-all-packages-in-manifest.jl
Created Jun 9, 2020
Create a Julia Project file that pins all packages to the version in the manifest
View pin-all-packages-in-manifest.jl
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"], "\"")
You can’t perform that action at this time.