# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=319

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 320

---

## [Approach for using codecov with subpackages](https://discourse.julialang.org/t/approach-for-using-codecov-with-subpackages/95438)

<div class="topic-metadata">

**Author:** [@beorostica](https://discourse.julialang.org/u/beorostica)\
**Replies:** 3\
**Last updated:** [March 6, 2023, 5:12pm UTC](https://discourse.julialang.org/t/approach-for-using-codecov-with-subpackages/95438 "2023-03-06T17:12:09Z")

</div>

I want to know how to use codecov when there are subpackages in a github repo. Initially, I was working in a repo with codecov configured in the CI workflow and everything worked as expected. However, once we started to…

---

## [Difference between Type.parameters and Type.types](https://discourse.julialang.org/t/difference-between-type-parameters-and-type-types/95622)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 4\
**Last updated:** [March 6, 2023, 4:12pm UTC](https://discourse.julialang.org/t/difference-between-type-parameters-and-type-types/95622 "2023-03-06T16:12:10Z")

</div>

I am trying to retrieve the parameters of a parametric type, and find that both parameters and types fields of Type provide what I want: julia\> VERSION v"1.9.0-beta4" julia\> struct MyType{S,T} a::S …

---

## [PyPlot Scatter-Plot Performance](https://discourse.julialang.org/t/pyplot-scatter-plot-performance/94129)

<div class="topic-metadata">

**Author:** [@ratwolf](https://discourse.julialang.org/u/ratwolf)\
**Replies:** 12\
**Last updated:** [March 6, 2023, 1:27pm UTC](https://discourse.julialang.org/t/pyplot-scatter-plot-performance/94129 "2023-03-06T13:27:38Z")

</div>

I wrote a small program to display the “Hopalong Attractor”. The calculations themselves are relatively fast, as is the scatter plot if you only use a single color. Coloring the scatterplot as a function of the distance…

---

## [Glitch with readline() in VSCode?](https://discourse.julialang.org/t/glitch-with-readline-in-vscode/95550)

<div class="topic-metadata">

**Author:** [@Maddy](https://discourse.julialang.org/u/Maddy)\
**Replies:** 8\
**Last updated:** [March 6, 2023, 1:08pm UTC](https://discourse.julialang.org/t/glitch-with-readline-in-vscode/95550 "2023-03-06T13:08:41Z")

</div>

(Ignore the code I wrote… the glitch is about the REPL) The first time I input something for readline(), nothing happens. I have to enter my input again. And after the code is done running, a weird input not define…

---

## [Help to select a Raspberry Pi for embedding Julia application](https://discourse.julialang.org/t/help-to-select-a-raspberry-pi-for-embedding-julia-application/39848)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 83\
**Last updated:** [March 6, 2023, 1:06pm UTC](https://discourse.julialang.org/t/help-to-select-a-raspberry-pi-for-embedding-julia-application/39848 "2023-03-06T13:06:27Z")

</div>

Hi! I would like to buy a Raspberry Pi to do some experiments about embedded applications using Julia. Basically, I want to test thinks like latency, real-time performance, etc. Thus, I need to install Julia and a lot o…

---

## [Is there a list of Pkg servers available?](https://discourse.julialang.org/t/is-there-a-list-of-pkg-servers-available/95598)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [March 6, 2023, 11:31am UTC](https://discourse.julialang.org/t/is-there-a-list-of-pkg-servers-available/95598 "2023-03-06T11:31:03Z")

</div>

Currently, the Indian package server doesn’t seem to be up: pkg\> add FFTW ┌ Warning: could not download https://pkg.julialang.org/registries │ exception = RequestError: HTTP/2 301 (Could not resolve host: in.pkg.julia…

---

## [Makie:When should we use @lift macro?](https://discourse.julialang.org/t/makie-when-should-we-use-lift-macro/95597)

<div class="topic-metadata">

**Author:** [@jack\_lee](https://discourse.julialang.org/u/jack_lee)\
**Replies:** 1\
**Last updated:** [March 6, 2023, 10:54am UTC](https://discourse.julialang.org/t/makie-when-should-we-use-lift-macro/95597 "2023-03-06T10:54:48Z")

</div>

if we want to change the line’s shape based on time,we can use @lift to track the time, like this: time = Observable(0.0) xs = range(0, 7, length=40) ys\_1 = @lift(sin.(xs .- $time)) # if I change this to \`ys\_1 …

---

## [Deploying versioned documentation on GitLab with Documenter.jl](https://discourse.julialang.org/t/deploying-versioned-documentation-on-gitlab-with-documenter-jl/95533)

<div class="topic-metadata">

**Author:** [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Replies:** 4\
**Last updated:** [March 6, 2023, 10:50am UTC](https://discourse.julialang.org/t/deploying-versioned-documentation-on-gitlab-with-documenter-jl/95533 "2023-03-06T10:50:23Z")

</div>

One of the things I start to use more and more are private Julia registries, which are really easy to set up and make it much easier to deploy packages which are very experiment specific and not worth to pollute the gene…

---

## [Makie: How to save images as CMYK?](https://discourse.julialang.org/t/makie-how-to-save-images-as-cmyk/95424)

<div class="topic-metadata">

**Author:** [@Katamari](https://discourse.julialang.org/u/Katamari)\
**Replies:** 3\
**Last updated:** [March 6, 2023, 9:56am UTC](https://discourse.julialang.org/t/makie-how-to-save-images-as-cmyk/95424 "2023-03-06T09:56:46Z")

</div>

I make images using Makie and save them as follows: save(“myimage.pdf”, fig) I don’t know whether this line saves the image as RGB or CMYK. I want to save as CMYK. How to do it?

---

## [Help me process this data in parallel](https://discourse.julialang.org/t/help-me-process-this-data-in-parallel/95562)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 6\
**Last updated:** [March 6, 2023, 9:27am UTC](https://discourse.julialang.org/t/help-me-process-this-data-in-parallel/95562 "2023-03-06T09:27:01Z")

</div>

Hi everyone. I have a simple function that turns each row of a matrix into a seismic trace (Seis.jl format) and filter it. Can you guys help me turn this into a parallel function? Like several cores filtering one trace…

---

## [Cannot use the persistent julia session in vscode](https://discourse.julialang.org/t/cannot-use-the-persistent-julia-session-in-vscode/95594)

<div class="topic-metadata">

**Author:** [@chisei\_minamoto](https://discourse.julialang.org/u/chisei_minamoto)\
**Replies:** 0\
**Last updated:** [March 6, 2023, 7:40am UTC](https://discourse.julialang.org/t/cannot-use-the-persistent-julia-session-in-vscode/95594 "2023-03-06T07:40:41Z")

</div>

Hi everyone, I cannot seem to use the persistent julia session in vscode extension through ssh server. Per this Remote Development · Julia in VS Code (julia-vscode.org), I’d like to open a persistent julia session in v…

---

## [How to Return the Roots from IntervalRootFinding.jl in pi terms?](https://discourse.julialang.org/t/how-to-return-the-roots-from-intervalrootfinding-jl-in-pi-terms/95566)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 4\
**Last updated:** [March 6, 2023, 5:00am UTC](https://discourse.julialang.org/t/how-to-return-the-roots-from-intervalrootfinding-jl-in-pi-terms/95566 "2023-03-06T05:00:40Z")

</div>

Hi all, I want to know how to make the roots computed by IntervalRootFinding returned in \\pi terms instead of decimals / float value / numeric term ? using SymPy, IntervalArithmetic, IntervalRootFinding @syms x v1(x) …

---

## [Bayesian Optimization - package issues](https://discourse.julialang.org/t/bayesian-optimization-package-issues/95586)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [March 5, 2023, 11:00pm UTC](https://discourse.julialang.org/t/bayesian-optimization-package-issues/95586 "2023-03-05T23:00:52Z")

</div>

I am trying to use bayesian optimization for the parameter tuning of a PID controller. One simulation that gives me a performance measurement of the settings takes about 8s. The following code works: using BayesOpt con…

---

## [Artifact issue while containerising application on Google cloud build](https://discourse.julialang.org/t/artifact-issue-while-containerising-application-on-google-cloud-build/83503)

<div class="topic-metadata">

**Author:** [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Replies:** 4\
**Last updated:** [March 5, 2023, 8:10pm UTC](https://discourse.julialang.org/t/artifact-issue-while-containerising-application-on-google-cloud-build/83503 "2023-03-05T20:10:55Z")

</div>

Hi, I have been facing Julia artifacts error while trying to deploy a Julia application on google cloud build. The application works fine normally and even after dockerizing locally. But for some reason on GCP, it fails …

---

## [StaticArrayInterface does not have LinearAlgebra in its dependencies](https://discourse.julialang.org/t/staticarrayinterface-does-not-have-linearalgebra-in-its-dependencies/95548)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 9\
**Last updated:** [March 5, 2023, 7:22pm UTC](https://discourse.julialang.org/t/staticarrayinterface-does-not-have-linearalgebra-in-its-dependencies/95548 "2023-03-05T19:22:52Z")

</div>

When running the script bin/create\_sys\_image from the package GitHub - aenarete/KiteControllers.jl: Controllers for airborne wind energy systems I get the following error: ✔ \[07m:06s\] PackageCompiler: compiling incremen…

---

## [When to Use An Interface ("Base-like") Package](https://discourse.julialang.org/t/when-to-use-an-interface-base-like-package/95580)

<div class="topic-metadata">

**Author:** [@astrobc1](https://discourse.julialang.org/u/astrobc1)\
**Replies:** 1\
**Last updated:** [March 5, 2023, 6:49pm UTC](https://discourse.julialang.org/t/when-to-use-an-interface-base-like-package/95580 "2023-03-05T18:49:35Z")

</div>

I’m uncertain as to at what point when developing a package it’s worth splitting things up into a “base” package containing the interface(s)/api + abstract types, and a “primary” package containing concrete types and imp…

---

## [Construct already completed task](https://discourse.julialang.org/t/construct-already-completed-task/95577)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 0\
**Last updated:** [March 5, 2023, 3:03pm UTC](https://discourse.julialang.org/t/construct-already-completed-task/95577 "2023-03-05T15:03:35Z")

</div>

What’s the best way to construct a Task which has already completed? My current best shot is t = @async nothing wait(t) but this feels both clumsy and inefficient. The use case is that I would like to have a backgroun…

---

## [Build a Hybrid Neural Network using Flux](https://discourse.julialang.org/t/build-a-hybrid-neural-network-using-flux/94349)

<div class="topic-metadata">

**Author:** [@Xuekui\_wang](https://discourse.julialang.org/u/Xuekui_wang)\
**Replies:** 15\
**Last updated:** [March 5, 2023, 12:41pm UTC](https://discourse.julialang.org/t/build-a-hybrid-neural-network-using-flux/94349 "2023-03-05T12:41:01Z")

</div>

When using Flux.jl to build neural network, I want to build a hybrid NN. I found \[Flux.PairwiseFusion\] (Built-in Layers · Flux) can meet my need. But when I train the NN: using Flux using Statistics using Flux: train!…

---

## [Convert Date Values to Dates.DateTime](https://discourse.julialang.org/t/convert-date-values-to-dates-datetime/95541)

<div class="topic-metadata">

**Author:** [@lukas\_r](https://discourse.julialang.org/u/lukas_r)\
**Replies:** 2\
**Last updated:** [March 5, 2023, 7:12am UTC](https://discourse.julialang.org/t/convert-date-values-to-dates-datetime/95541 "2023-03-05T07:12:04Z")

</div>

I have date information coming from a sensor thats formatted as i = 8304.621828703705. Is there a way to easily convert this to a DateTime? I can get a Date (yy-mm-dd) out of it using Date(Dates.UTD(round(i))), however I…

---

## [Agents.jl Predator-prey dynamic : LoadError: UndefVarError: randomwalk! not defined](https://discourse.julialang.org/t/agents-jl-predator-prey-dynamic-loaderror-undefvarerror-randomwalk-not-defined/95515)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 5\
**Last updated:** [March 5, 2023, 6:27am UTC](https://discourse.julialang.org/t/agents-jl-predator-prey-dynamic-loaderror-undefvarerror-randomwalk-not-defined/95515 "2023-03-05T06:27:29Z")

</div>

Hi all, I am trying the Predator-prey dynamic and it returns: LoadError: UndefVarError: randomwalk! not defined I can run Zombie Outbreak fine. Why there is no randomwalk function defined in the tutorial? I use Julia…

---

## [Learning (a)synchronous parallelization on a simple graph problem](https://discourse.julialang.org/t/learning-a-synchronous-parallelization-on-a-simple-graph-problem/92670)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 8\
**Last updated:** [March 5, 2023, 2:09am UTC](https://discourse.julialang.org/t/learning-a-synchronous-parallelization-on-a-simple-graph-problem/92670 "2023-03-05T02:09:58Z")

</div>

I’m starting to learn about concurrent / parallel / distributed computing on a simple graph problem and would really appreciate any help. I am trying to squeeze every drop of performance out of Julia, so comments on how …

---

## [Building a Patient Level Prediction Package within Julia](https://discourse.julialang.org/t/building-a-patient-level-prediction-package-within-julia/94749)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 12\
**Last updated:** [March 5, 2023, 12:48am UTC](https://discourse.julialang.org/t/building-a-patient-level-prediction-package-within-julia/94749 "2023-03-05T00:48:45Z")

</div>

Hey folks, :wave: I have been considering developing a new package within JuliaHealth that focuses on Patient Level Prediction (PLP). In brief, PLP is the notion of defining a patient population that you are interested …

---

## [Continuous Callback - terminate on second zero crossing?](https://discourse.julialang.org/t/continuous-callback-terminate-on-second-zero-crossing/95561)

<div class="topic-metadata">

**Author:** [@pluie](https://discourse.julialang.org/u/pluie)\
**Replies:** 1\
**Last updated:** [March 5, 2023, 12:31am UTC](https://discourse.julialang.org/t/continuous-callback-terminate-on-second-zero-crossing/95561 "2023-03-05T00:31:26Z")

</div>

How do I set up the condition and affect functions such that ODE solver terminates on second zero crossing? Currently, I have the following setup for terminating on the first zero crossing. function condition(z,t,integ…

---

## [Why not call it a Plot instead of an Axis?](https://discourse.julialang.org/t/why-not-call-it-a-plot-instead-of-an-axis/95557)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 2\
**Last updated:** [March 4, 2023, 11:10pm UTC](https://discourse.julialang.org/t/why-not-call-it-a-plot-instead-of-an-axis/95557 "2023-03-04T23:10:29Z")

</div>

In Makie, a figure can have multiple plots. But for some reason each plot is called an “Axis” instead of a “Plot”. I normally think of a 2d plot having two axes – I don’t think of the whole plot being one axis. Is this a…

---

## [Macro Expansion Error in basic @testset](https://discourse.julialang.org/t/macro-expansion-error-in-basic-testset/95555)

<div class="topic-metadata">

**Author:** [@JacobC](https://discourse.julialang.org/u/JacobC)\
**Replies:** 2\
**Last updated:** [March 4, 2023, 9:41pm UTC](https://discourse.julialang.org/t/macro-expansion-error-in-basic-testset/95555 "2023-03-04T21:41:25Z")

</div>

Anytime I get something that evaluates false inside of a testset I get a macro expansion error. The testset runs as expected and gives a summary as expected, but throws the macro expansion error first, and I am a bit uns…

---

## [Is it possible to overload \`:=\`?](https://discourse.julialang.org/t/is-it-possible-to-overload/95547)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 5\
**Last updated:** [March 4, 2023, 9:06pm UTC](https://discourse.julialang.org/t/is-it-possible-to-overload/95547 "2023-03-04T21:06:44Z")

</div>

This was my first attempt to overload the := operator: julia\> (:=)(x, y) = x + y ERROR: syntax: invalid identifier name ":=" This was my second attempt: julia\> var":="(x, y) = x + y := (generic function with 1 method)…

---

## [Autocomplete kwargs in vscode](https://discourse.julialang.org/t/autocomplete-kwargs-in-vscode/88417)

<div class="topic-metadata">

**Author:** [@qwerty](https://discourse.julialang.org/u/qwerty)\
**Replies:** 2\
**Last updated:** [March 4, 2023, 8:53pm UTC](https://discourse.julialang.org/t/autocomplete-kwargs-in-vscode/88417 "2023-03-04T20:53:52Z")

</div>

If I have a function with kwargs like this: my\_f(a, asdfg=4; zxcvbn=5) = println(a, asdfg, zxcvbn) how can i get in vscode the autocomplete of kwargs when i call it? my\_f(3, ?... # no autocomplete

---

## [Pasting into Julia REPL in Windows 10](https://discourse.julialang.org/t/pasting-into-julia-repl-in-windows-10/8515)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 12\
**Last updated:** [March 4, 2023, 3:53pm UTC](https://discourse.julialang.org/t/pasting-into-julia-repl-in-windows-10/8515 "2023-03-04T15:53:06Z")

</div>

Hi all, Is it possible to paste text into the Julia REPL when OS=Windows 10? As of Windows 10, we can paste into the command line using Ctrl+v (can’t believe it took this long?!?), but that doesn’t seem to work for the…

---

## [Nested async testsets](https://discourse.julialang.org/t/nested-async-testsets/95367)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 4\
**Last updated:** [March 4, 2023, 1:38pm UTC](https://discourse.julialang.org/t/nested-async-testsets/95367 "2023-03-04T13:38:04Z")

</div>

Documenting this mostly for myself, but may be useful for others as well. Julia currently does not handle nested asynchronous test sets correctly. julia\> @testset verbose=true "foo" begin @sync @async @test…

---

## [Imshow in Makie](https://discourse.julialang.org/t/imshow-in-makie/95460)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 3\
**Last updated:** [March 4, 2023, 1:27pm UTC](https://discourse.julialang.org/t/imshow-in-makie/95460 "2023-03-04T13:27:05Z")

</div>

Is there some convenience function to show an image in Makie? I have to transpose and reverse the y-axis everytime. And I often forget…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=318)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=320)
