Skip to content

Instantly share code, notes, and snippets.

Avatar

Takafumi Arakaki tkf

View GitHub Profile
View ParallelPrecompilation.jl
module ParallelPrecompilation
using Base: PkgId
using Pkg.Types: is_stdlib
using Pkg: TOML
using ProgressLogging: @logprogress, @withprogress
using UUIDs: UUID
function manifest_path(project)
manifest_names = ("JuliaManifest.toml", "Manifest.toml")
View return_type.md
Base.return_type(f, T::Type{<:Tuple})

Infer a possible return type of f with input argument types T.

!!! warning

Using `Base.return_type` without understanding the API is likely to cause
undefined behavior.

Base.return_type returns a type R such that every return value y of

View Manifest.toml
# This file is machine-generated - editing it directly is not advised
[[AWSCore]]
deps = ["Base64", "Dates", "HTTP", "IniFile", "JSON", "LazyJSON", "MbedTLS", "Mocking", "OrderedCollections", "Retry", "Sockets", "SymDict", "XMLDict"]
git-tree-sha1 = "579990e01caa68e0c1cdb62e617c4fee93732e8d"
uuid = "4f1ea46c-232b-54a6-9b17-cc2d0f3e6598"
version = "0.6.14"
[[AWSS3]]
deps = ["AWSCore", "Base64", "Dates", "EzXML", "FilePathsBase", "HTTP", "LinearAlgebra", "MbedTLS", "Retry", "SymDict", "UUIDs", "XMLDict"]
View _foldl_impl.d0b1c044f6.ir
│ ─ %-1 = invoke _foldl_impl(::Base.BottomRF{typeof(+)},::Base._InitialValue,::Base.Generator{Base.Iterators.Filter{var"#28#30",Array{Union{Missing, Float64},1}},var"#27#29"})::Union{Missing, Base._InitialValue, Float64}
Body::Union{Missing, Base._InitialValue, Float64}
@ reduce.jl:53 within `_foldl_impl'
┌ @ generator.jl:44 within `iterate'
│┌ @ Base.jl:33 within `getproperty'
1 ──││ %1 = Base.getfield(itr, :iter)::Base.Iterators.Filter{var"#28#30",Array{Union{Missing, Float64},1}}
│ │└
│ │ @ generator.jl:44 within `iterate' @ iterators.jl:429
│ │┌ @ Base.jl:33 within `getproperty'
│ ││ %2 = Base.getfield(%1, :itr)::Array{Union{Missing, Float64},1}
View transducers.py
from dataclasses import dataclass
from typing import Any
import trio
async def start_cancelable(nursery, async_fn, *args):
async def launcher(task_status):
with trio.CancelScope() as scope:
task_status.started(scope)
View transduction.jl
using Transducers
using Transducers: R_, wrap, Unseen, xform, inner, wrapping, wrap, unwrap
import Transducers: start, next, complete
struct TransductionBuffer
buffer::Vector{Any}
end
Base.iterate(itr::TransductionBuffer, ::Any = nothing) =
if isempty(itr.buffer)
View pr_project.jl
const USAGE = """
julia $PROGRAM_FILE PATH/TO/gen_project.jl REMOTE PROJECT [PROJECT...]
REMOTE
A Git remote repository to be pushed (e.g., origin). It is
assumed to be the same for all PROJECTs.
PROJECT
A path to the Git repository of a Julia package.
"""
View Makefile
JULIA ?= julia
JULIA_CMD = $(JULIA) --color=yes --startup-file=no
instantiate:
$(JULIA_CMD) --project=. -e "using Pkg; Pkg.instantiate()"
You can’t perform that action at this time.