# General Usage

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

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

**Page:** 269

---

## [Uncompress zst files](https://discourse.julialang.org/t/uncompress-zst-files/101632)

<div class="topic-metadata">

**Author:** [@vtomar](https://discourse.julialang.org/u/vtomar)\
**Replies:** 1\
**Last updated:** [July 14, 2023, 6:23pm UTC](https://discourse.julialang.org/t/uncompress-zst-files/101632 "2023-07-14T18:23:19Z")

</div>

Is there a package that can uncompress zst files?

---

## [UndefVarError: \`Point2f\` not defined](https://discourse.julialang.org/t/undefvarerror-point2f-not-defined/101579)

<div class="topic-metadata">

**Author:** [@Wulf](https://discourse.julialang.org/u/Wulf)\
**Replies:** 13\
**Last updated:** [July 14, 2023, 4:54pm UTC](https://discourse.julialang.org/t/undefvarerror-point2f-not-defined/101579 "2023-07-14T16:54:57Z")

</div>

Without apparent modifications after compiling / running in the terminal of VSCode/ VSCodium the message: ERROR: UndefVarError: Point2f not defined appears, referring to a line that attempts to declare an observable of…

---

## [Why so many allocations in the loop on partition](https://discourse.julialang.org/t/why-so-many-allocations-in-the-loop-on-partition/101606)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 7\
**Last updated:** [July 14, 2023, 5:39pm UTC](https://discourse.julialang.org/t/why-so-many-allocations-in-the-loop-on-partition/101606 "2023-07-14T17:39:47Z")

</div>

Maybe I do the measurements wrong, but I’m surprised that partition performs so badly in this case. using IterTools, BenchmarkTools a=rand(1:10,10^5) function looppart(a) res=zeros(Int,20) for (a1,a2) in partition(a,2,…

---

## [Deploying franklin site on my web server](https://discourse.julialang.org/t/deploying-franklin-site-on-my-web-server/101622)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 8\
**Last updated:** [July 14, 2023, 3:05pm UTC](https://discourse.julialang.org/t/deploying-franklin-site-on-my-web-server/101622 "2023-07-14T15:05:28Z")

</div>

I’m trying to deploy a little website I generated with Franklin.jl. It looks fine on my local computer. When deployed at Gideon Simpson, the menus don’t seem to be rendering properly.

---

## [Is Bard better at writing Julia than ChatGPT?](https://discourse.julialang.org/t/is-bard-better-at-writing-julia-than-chatgpt/101617)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 3\
**Last updated:** [July 14, 2023, 2:14pm UTC](https://discourse.julialang.org/t/is-bard-better-at-writing-julia-than-chatgpt/101617 "2023-07-14T14:14:33Z")

</div>

Tried to work on a Tetris playing bot in Julia using ChatGPT, but ran into the problem where every package’s API had changed since 2021. Has anyone had any better luck using Bard? Never fun to start the process and then…

---

## [Monte Carlo simulation of a second order ODE?](https://discourse.julialang.org/t/monte-carlo-simulation-of-a-second-order-ode/101607)

<div class="topic-metadata">

**Author:** [@David\_F](https://discourse.julialang.org/u/David_F)\
**Replies:** 2\
**Last updated:** [July 14, 2023, 1:46pm UTC](https://discourse.julialang.org/t/monte-carlo-simulation-of-a-second-order-ode/101607 "2023-07-14T13:46:04Z")

</div>

I’m interested in solving a second order ODE problem using a stochastic approach. My ODE contains several coefficients, which up to this point, have been constant parameters (µ, Y, η, and φ). Now, I’d like to see how fl…

---

## [How to make plot! work with new plot method](https://discourse.julialang.org/t/how-to-make-plot-work-with-new-plot-method/101621)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 1\
**Last updated:** [July 14, 2023, 1:09pm UTC](https://discourse.julialang.org/t/how-to-make-plot-work-with-new-plot-method/101621 "2023-07-14T13:09:22Z")

</div>

Hello, I added new methods for plot and histogram to work with a custom type. Both methods work in isolation, but I cannot combine them by calling plot and then histogram! for example. How can I allow plot! and histogra…

---

## [Can not solving the retrain model by neural\_adapter](https://discourse.julialang.org/t/can-not-solving-the-retrain-model-by-neural-adapter/101176)

<div class="topic-metadata">

**Author:** [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)\
**Replies:** 1\
**Last updated:** [July 14, 2023, 1:00pm UTC](https://discourse.julialang.org/t/can-not-solving-the-retrain-model-by-neural-adapter/101176 "2023-07-14T13:00:52Z")

</div>

I tried to run the tutorial of retrain by neural\_adapter as below: using NeuralPDE, Lux, ModelingToolkit, Optimization, OptimizationOptimJL, DiffEqBase import ModelingToolkit: Interval, infimum, supremum @parameters x …

---

## [Error when transfer learning with neural\_adapter](https://discourse.julialang.org/t/error-when-transfer-learning-with-neural-adapter/101145)

<div class="topic-metadata">

**Author:** [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)\
**Replies:** 1\
**Last updated:** [July 14, 2023, 1:00pm UTC](https://discourse.julialang.org/t/error-when-transfer-learning-with-neural-adapter/101145 "2023-07-14T13:00:34Z")

</div>

I tried to transfer the pre-trained weight from another model to retrain a new one by the code in the tutorial as follows: function loss(cord,θ) chain2(cord,θ) .- phi(cord,res.u) end strategy = NeuralPDE.GridTraini…

---

## [Format Dataframe](https://discourse.julialang.org/t/format-dataframe/101591)

<div class="topic-metadata">

**Author:** [@eweiss](https://discourse.julialang.org/u/eweiss)\
**Replies:** 3\
**Last updated:** [July 14, 2023, 12:50pm UTC](https://discourse.julialang.org/t/format-dataframe/101591 "2023-07-14T12:50:07Z")

</div>

I have a dataframe with columns of numbers and strings. I would like to format it like an Excel spreadsheet so the numbers have dollar signs, commas, and 2 decimals. df = DataFrame( StringColumn = \[“A”, “B”, “C”, “D”,…

---

## [Multithreaded memory usage](https://discourse.julialang.org/t/multithreaded-memory-usage/101492)

<div class="topic-metadata">

**Author:** [@maarten\_van\_damme](https://discourse.julialang.org/u/maarten_van_damme)\
**Replies:** 19\
**Last updated:** [July 14, 2023, 12:44pm UTC](https://discourse.julialang.org/t/multithreaded-memory-usage/101492 "2023-07-14T12:44:23Z")

</div>

I have a project where julia’s memory usage is at the moment too high, and we can not use it. I have attempted to replicate the behaviour in a minimal working example. The example is oversimplified, in that you could rew…

---

## [Create \`@raw\` blocks programmatically from Documenter.jl](https://discourse.julialang.org/t/create-raw-blocks-programmatically-from-documenter-jl/101522)

<div class="topic-metadata">

**Author:** [@disberd](https://discourse.julialang.org/u/disberd)\
**Replies:** 8\
**Last updated:** [July 14, 2023, 12:09pm UTC](https://discourse.julialang.org/t/create-raw-blocks-programmatically-from-documenter-jl/101522 "2023-07-14T12:09:18Z")

</div>

Is there a way to interpolate or more precisely create blocks of raw html programmaticaly from Julia during the building step of Documenter.jl I have been trying to make interactive plots from Plotly.js work by insertin…

---

## [AoG Barplot: How to match color of a single bar to theme?](https://discourse.julialang.org/t/aog-barplot-how-to-match-color-of-a-single-bar-to-theme/101586)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 4\
**Last updated:** [July 14, 2023, 11:25am UTC](https://discourse.julialang.org/t/aog-barplot-how-to-match-color-of-a-single-bar-to-theme/101586 "2023-07-14T11:25:59Z")

</div>

When I generate grouped barplots in AoG, the colors of the bars are determined by the theme. However, barplots with a single group produce grey bars. How can I set the bar colors to match the theme? MWE: using Algebra…

---

## [Question on Short Circuit And](https://discourse.julialang.org/t/question-on-short-circuit-and/101597)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 2\
**Last updated:** [July 14, 2023, 7:55am UTC](https://discourse.julialang.org/t/question-on-short-circuit-and/101597 "2023-07-14T07:55:53Z")

</div>

I was reviewing some source code recently for a package I am using and saw a function essentially defined like this (dumbed down to a MWE here). function func(n) (n \>= 5) && return "yes" return "no" end I was very conf…

---

## [Inline function returns tuple of mixed type, assigned to a tuple of variables in the caller](https://discourse.julialang.org/t/inline-function-returns-tuple-of-mixed-type-assigned-to-a-tuple-of-variables-in-the-caller/101598)

<div class="topic-metadata">

**Author:** [@Lian\_Yunlong](https://discourse.julialang.org/u/Lian_Yunlong)\
**Replies:** 2\
**Last updated:** [July 14, 2023, 6:30am UTC](https://discourse.julialang.org/t/inline-function-returns-tuple-of-mixed-type-assigned-to-a-tuple-of-variables-in-the-caller/101598 "2023-07-14T06:30:46Z")

</div>

Dear Julia community, I wish to learn the appropriate usage of Julia tuples. Consider the following scenario. One needs to make an inline function to separate a block of code inside a very complicated function. Natural…

---

## [In-place matrix operations slower?](https://discourse.julialang.org/t/in-place-matrix-operations-slower/101469)

<div class="topic-metadata">

**Author:** [@lzxnl](https://discourse.julialang.org/u/lzxnl)\
**Replies:** 9\
**Last updated:** [July 14, 2023, 3:23am UTC](https://discourse.julialang.org/t/in-place-matrix-operations-slower/101469 "2023-07-14T03:23:49Z")

</div>

I have the following two functions for linear regression. function ordinary\_least\_squares\_regression(x,y;lambda=0,weights=0) if weights == 0 X = x' \* x + lambda\*I return X\\(x'y) else w = …

---

## [Comparing Julia structs](https://discourse.julialang.org/t/comparing-julia-structs/101554)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 8\
**Last updated:** [July 13, 2023, 6:54pm UTC](https://discourse.julialang.org/t/comparing-julia-structs/101554 "2023-07-13T18:54:20Z")

</div>

How should I do comparison of data structures involving structs. For example: struct Type1 a::Vector{Int} b::Float64 end struct Type2 c::Vector{Type1} d::Dict{Tuple{Int, Int}, Int} end obj1\_type1 = Typ…

---

## [How to conditionally load code with package extensions](https://discourse.julialang.org/t/how-to-conditionally-load-code-with-package-extensions/101578)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 2\
**Last updated:** [July 13, 2023, 5:46pm UTC](https://discourse.julialang.org/t/how-to-conditionally-load-code-with-package-extensions/101578 "2023-07-13T17:46:20Z")

</div>

I have been going through documentation and examples on GitHub to learn how to conditionally load code. I keep running into issues. I think I would benefit from a MWE. I created a repo for this purpose here. I would like…

---

## [Different output when call Fortran from Julia](https://discourse.julialang.org/t/different-output-when-call-fortran-from-julia/97688)

<div class="topic-metadata">

**Author:** [@X\_Chen](https://discourse.julialang.org/u/X_Chen)\
**Replies:** 5\
**Last updated:** [July 13, 2023, 3:29pm UTC](https://discourse.julialang.org/t/different-output-when-call-fortran-from-julia/97688 "2023-07-13T15:29:40Z")

</div>

Hello! I am trying to use a package in Fortran, and I tested it in Julia - it works perfectly well. Now I am trying to write a function in Julia that I can use it as a normal Julia function. Here is the function code: f…

---

## [Performance Warning when Solving Parameterized ODE](https://discourse.julialang.org/t/performance-warning-when-solving-parameterized-ode/101541)

<div class="topic-metadata">

**Author:** [@wg030](https://discourse.julialang.org/u/wg030)\
**Replies:** 2\
**Last updated:** [July 13, 2023, 2:57pm UTC](https://discourse.julialang.org/t/performance-warning-when-solving-parameterized-ode/101541 "2023-07-13T14:57:02Z")

</div>

Hi! With one of the latest Julia updates I got the following warning while running my code: Warning: Using arrays or dicts to store parameters of different types can hurt performance. │ Consider using tuples instead. …

---

## [Convert a Python function with decorator to Julia](https://discourse.julialang.org/t/convert-a-python-function-with-decorator-to-julia/101575)

<div class="topic-metadata">

**Author:** [@FemtoTrader](https://discourse.julialang.org/u/FemtoTrader)\
**Replies:** 2\
**Last updated:** [July 13, 2023, 2:47pm UTC](https://discourse.julialang.org/t/convert-a-python-function-with-decorator-to-julia/101575 "2023-07-13T14:47:45Z")

</div>

Hello, I wonder what is the more Julia-nesque approach to convert a Python function with decorator such as @schedule(interval="5m", symbol="SYMBOL", window\_size=150) def run\_5m(state, data): print("I'm running once…

---

## [Broadcasting Heisen-allocations](https://discourse.julialang.org/t/broadcasting-heisen-allocations/101572)

<div class="topic-metadata">

**Author:** [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Replies:** 2\
**Last updated:** [July 13, 2023, 2:14pm UTC](https://discourse.julialang.org/t/broadcasting-heisen-allocations/101572 "2023-07-13T14:14:48Z")

</div>

I have a weird code snippet that was reduced from a real codebase that was mysteriously allocating where it shouldn’t, for all I could tell: using BenchmarkTools using StaticArrays test(z::SVector{N}) where {N} = prob…

---

## [Is there a way for Pluto to print the terminal output while it's running?](https://discourse.julialang.org/t/is-there-a-way-for-pluto-to-print-the-terminal-output-while-its-running/101576)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 1\
**Last updated:** [July 13, 2023, 1:59pm UTC](https://discourse.julialang.org/t/is-there-a-way-for-pluto-to-print-the-terminal-output-while-its-running/101576 "2023-07-13T13:59:02Z")

</div>

Hello everyone, I’m using Pluto notebook and would like it to show the progress print as it’s running. If I run the following code in the terminal: res = Optimization.solve(prob,BFGS(); callback = callback, maxiters=4…

---

## [Locally building docs complains that the parent package does not have a dependency](https://discourse.julialang.org/t/locally-building-docs-complains-that-the-parent-package-does-not-have-a-dependency/101468)

<div class="topic-metadata">

**Author:** [@kapple](https://discourse.julialang.org/u/kapple)\
**Replies:** 2\
**Last updated:** [July 13, 2023, 1:27pm UTC](https://discourse.julialang.org/t/locally-building-docs-complains-that-the-parent-package-does-not-have-a-dependency/101468 "2023-07-13T13:27:36Z")

</div>

I have a local MyPackage project, with a docs subdirectory. Both were initially created by PkgTemplates.jl. Before Pkg.adding dependencies to MyPackage, I tested the docs build process with Documenter.jl in Powershell w…

---

## [Flux sending model to gpu does not behave well](https://discourse.julialang.org/t/flux-sending-model-to-gpu-does-not-behave-well/101571)

<div class="topic-metadata">

**Author:** [@kadir-gunel](https://discourse.julialang.org/u/kadir-gunel)\
**Replies:** 2\
**Last updated:** [July 13, 2023, 1:21pm UTC](https://discourse.julialang.org/t/flux-sending-model-to-gpu-does-not-behave-well/101571 "2023-07-13T13:21:44Z")

</div>

Hello, I have a pretrained custom model which I use it as the input for a second model. I can send the first model to gpu without any issue and save the model parameters as expected. The second model just copies the pa…

---

## [FTP: how to download recursivelly a whole directory - or at least get the information if a certain element is a dir?](https://discourse.julialang.org/t/ftp-how-to-download-recursivelly-a-whole-directory-or-at-least-get-the-information-if-a-certain-element-is-a-dir/101524)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [July 13, 2023, 12:57pm UTC](https://discourse.julialang.org/t/ftp-how-to-download-recursivelly-a-whole-directory-or-at-least-get-the-information-if-a-certain-element-is-a-dir/101524 "2023-07-13T12:57:31Z")

</div>

Hello, I need to recursively download a directory from an anonymous FTP client: using FTPClient ftp\_init(); ftp = FTP(hostname = "palantir.boku.ac.at", username = "anonymous", password = "") cd(ftp, "Public/ImprovedFore…

---

## [What is that documenter+liveserver guide?](https://discourse.julialang.org/t/what-is-that-documenter-liveserver-guide/101564)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 1\
**Last updated:** [July 13, 2023, 11:35am UTC](https://discourse.julialang.org/t/what-is-that-documenter-liveserver-guide/101564 "2023-07-13T11:35:27Z")

</div>

I was reading a very complete guide to using Documenter and LiveServer and generating the docs on github so they are “the docs” associated with the repo … anyone know that link?

---

## [How to separate module environment from package environment](https://discourse.julialang.org/t/how-to-separate-module-environment-from-package-environment/101568)

<div class="topic-metadata">

**Author:** [@Titas22](https://discourse.julialang.org/u/Titas22)\
**Replies:** 1\
**Last updated:** [July 13, 2023, 9:13am UTC](https://discourse.julialang.org/t/how-to-separate-module-environment-from-package-environment/101568 "2023-07-13T09:13:10Z")

</div>

Hi, Is there a way to nicely and easily separate a development environment from the actual package one? Say I’m working on a small module and to test it I want to use it either in REPL or a scrip and I want to use Revi…

---

## [Library for sparse tensorized polynomials](https://discourse.julialang.org/t/library-for-sparse-tensorized-polynomials/101549)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 1\
**Last updated:** [July 13, 2023, 8:18am UTC](https://discourse.julialang.org/t/library-for-sparse-tensorized-polynomials/101549 "2023-07-13T08:18:13Z")

</div>

Hello, I am wondering if there is a library for sparse tensorized poynomials? For x \\in \\mathbb{R}^n, I am interested in functions f:\\mathbb{R}^n \\to \\mathbb{R} that can be decomposed as a sum of tensorized polynomials…

---

## [Inspect a Julia source code from an other Julia code](https://discourse.julialang.org/t/inspect-a-julia-source-code-from-an-other-julia-code/101547)

<div class="topic-metadata">

**Author:** [@FemtoTrader](https://discourse.julialang.org/u/FemtoTrader)\
**Replies:** 4\
**Last updated:** [July 12, 2023, 7:19pm UTC](https://discourse.julialang.org/t/inspect-a-julia-source-code-from-an-other-julia-code/101547 "2023-07-12T19:19:47Z")

</div>

Hello, I’m looking for a way to “inspect” a Julia source code from an other Julia code ie I would like to ensure that a code which is stored in a strat.jl file contains an init function from an Julia code named runner.j…

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

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