# General Usage

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

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

**Page:** 150

---

## [I can't use intake package with PyCall](https://discourse.julialang.org/t/i-cant-use-intake-package-with-pycall/91435)

<div class="topic-metadata">

**Author:** [@Balinus](https://discourse.julialang.org/u/Balinus)\
**Replies:** 8\
**Last updated:** [July 16, 2024, 11:07pm UTC](https://discourse.julialang.org/t/i-cant-use-intake-package-with-pycall/91435 "2024-07-16T23:07:03Z")

</div>

Hello! I have the following code in Python that is working, but I can’t reproduce it with PyCall. # Python code import intake catalog\_url = 'https://raw.githubusercontent.com/hydrocloudservices/catalogs/main/catalogs/ma…

---

## [SIMD: Need some help to speed up sampling a code vector](https://discourse.julialang.org/t/simd-need-some-help-to-speed-up-sampling-a-code-vector/117075)

<div class="topic-metadata">

**Author:** [@zsoerenm](https://discourse.julialang.org/u/zsoerenm)\
**Replies:** 28\
**Last updated:** [July 16, 2024, 9:44pm UTC](https://discourse.julialang.org/t/simd-need-some-help-to-speed-up-sampling-a-code-vector/117075 "2024-07-16T21:44:15Z")

</div>

This is part of my work to implement a GNSS receiver in real time (see GNSSReceiver.jl). One crucial part is the code generation that functions as a matched filter. The code is binary and can be modeled as code = Int3…

---

## [Parallelization of long- and short running tasks](https://discourse.julialang.org/t/parallelization-of-long-and-short-running-tasks/99936)

<div class="topic-metadata">

**Author:** [@unis](https://discourse.julialang.org/u/unis)\
**Replies:** 8\
**Last updated:** [July 16, 2024, 6:21pm UTC](https://discourse.julialang.org/t/parallelization-of-long-and-short-running-tasks/99936 "2024-07-16T18:21:56Z")

</div>

Assume you have a long-running, “expensive” function, e.g., function longrun() dim = 20000 A = rand(dim,dim)/dim A^256 end which may take a few minutes to complete, and a function that is short-running a…

---

## [Activating environment on multiple SGE\_cluster nodes fails](https://discourse.julialang.org/t/activating-environment-on-multiple-sge-cluster-nodes-fails/117092)

<div class="topic-metadata">

**Author:** [@alequa](https://discourse.julialang.org/u/alequa)\
**Replies:** 1\
**Last updated:** [July 16, 2024, 10:01am UTC](https://discourse.julialang.org/t/activating-environment-on-multiple-sge-cluster-nodes-fails/117092 "2024-07-16T10:01:57Z")

</div>

Hello, I have this pipeline to run a simulation on a SGE cluster (see below). Basically I activate the same environment @everywhere and later load packages from the env. The problem is that now Julia fails in activati…

---

## [Error in building run time function by Lux.jl model with other equations](https://discourse.julialang.org/t/error-in-building-run-time-function-by-lux-jl-model-with-other-equations/116615)

<div class="topic-metadata">

**Author:** [@chooron](https://discourse.julialang.org/u/chooron)\
**Replies:** 4\
**Last updated:** [July 16, 2024, 1:50am UTC](https://discourse.julialang.org/t/error-in-building-run-time-function-by-lux-jl-model-with-other-equations/116615 "2024-07-16T01:50:37Z")

</div>

I want to build an Equation using a neural network (based on Lux.jl) as follows: using Lux using LuxCore using Symbolics using StableRNGs using ModelingToolkit using ModelingToolkitNeuralNets using ModelingToolkit:t\_nou…

---

## [\`@nospecialize\` on type parameter](https://discourse.julialang.org/t/nospecialize-on-type-parameter/117071)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 1\
**Last updated:** [July 15, 2024, 8:55pm UTC](https://discourse.julialang.org/t/nospecialize-on-type-parameter/117071 "2024-07-15T20:55:18Z")

</div>

This is mostly out of curiosity: Say that I have a struct with a lot of type parameters. One of those parameters changes each run, and I don’t want to specialize on it. Is there any way I can get something like the follo…

---

## [Distributions.jl: how to create a mixture of a scaled Beta distribution?](https://discourse.julialang.org/t/distributions-jl-how-to-create-a-mixture-of-a-scaled-beta-distribution/117062)

<div class="topic-metadata">

**Author:** [@DominiqueMakowski](https://discourse.julialang.org/u/DominiqueMakowski)\
**Replies:** 2\
**Last updated:** [July 15, 2024, 8:20pm UTC](https://discourse.julialang.org/t/distributions-jl-how-to-create-a-mixture-of-a-scaled-beta-distribution/117062 "2024-07-15T20:20:43Z")

</div>

Defining a mixture of 2 Beta distributions works as one would expect: using Distributions, GLMakie LocationScale(0.5, 1, Beta(1, 1)) d = MixtureModel( Beta\[ Beta(1, 1), Beta(2, 10)\], \[0.5, 0.5\]) xa…

---

## [Problem with \`replace\` function making too many replacements](https://discourse.julialang.org/t/problem-with-replace-function-making-too-many-replacements/117022)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 4\
**Last updated:** [July 15, 2024, 7:06pm UTC](https://discourse.julialang.org/t/problem-with-replace-function-making-too-many-replacements/117022 "2024-07-15T19:06:51Z")

</div>

I have a dataset where one of the columns provides the names of university departments, such as “economics department” and “statistics department”, etc. However there are cases where some rows list the name as “statistic…

---

## [Intersection of two dataframes based on columns](https://discourse.julialang.org/t/intersection-of-two-dataframes-based-on-columns/31421)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 4\
**Last updated:** [July 14, 2024, 10:01pm UTC](https://discourse.julialang.org/t/intersection-of-two-dataframes-based-on-columns/31421 "2024-07-14T22:01:17Z")

</div>

Hi all- I have two dataframes in which one is a subset of the other based on the values in some columns. For example, using DataFrames df1 = DataFrame(a=\[1,1,2,2,3,3\], b=\[1,2,1,2,1,2\], c=rand(6)) df2 = DataFrame(a=\[1,…

---

## [Is there a Julia package for using the Raspberry Pi camera?](https://discourse.julialang.org/t/is-there-a-julia-package-for-using-the-raspberry-pi-camera/117032)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 2\
**Last updated:** [July 15, 2024, 7:57am UTC](https://discourse.julialang.org/t/is-there-a-julia-package-for-using-the-raspberry-pi-camera/117032 "2024-07-15T07:57:19Z")

</div>

I want to do image processing in real time using the Raspberry Pi global shutter camera. Is there a Julia package that wraps the the Raspberry camera libraries?

---

## [Fast Exponential of a large matrix](https://discourse.julialang.org/t/fast-exponential-of-a-large-matrix/116998)

<div class="topic-metadata">

**Author:** [@devanshu](https://discourse.julialang.org/u/devanshu)\
**Replies:** 14\
**Last updated:** [July 15, 2024, 7:21am UTC](https://discourse.julialang.org/t/fast-exponential-of-a-large-matrix/116998 "2024-07-15T07:21:47Z")

</div>

I have to perform the exponential of a matrix. I have compared the built-in exp function to the exponential! function from the ExponentialUtilites package. The latter is supposed to be much faster than the built-in funct…

---

## [State of creating Executables for Julia code](https://discourse.julialang.org/t/state-of-creating-executables-for-julia-code/117045)

<div class="topic-metadata">

**Author:** [@Maddy](https://discourse.julialang.org/u/Maddy)\
**Replies:** 1\
**Last updated:** [July 15, 2024, 6:32am UTC](https://discourse.julialang.org/t/state-of-creating-executables-for-julia-code/117045 "2024-07-15T06:32:40Z")

</div>

How do we create an executable app for whatever code we’ve written in Julia? I am relatively new to the language. Creating my little project I felt like checking out how executables work in Julia. To my surprise, there…

---

## [Compare array (of String) with no regard to the order](https://discourse.julialang.org/t/compare-array-of-string-with-no-regard-to-the-order/62322)

<div class="topic-metadata">

**Author:** [@Laco\_Kovac](https://discourse.julialang.org/u/Laco_Kovac)\
**Replies:** 8\
**Last updated:** [July 15, 2024, 4:17am UTC](https://discourse.julialang.org/t/compare-array-of-string-with-no-regard-to-the-order/62322 "2024-07-15T04:17:04Z")

</div>

Le’t have 2 arrays (of String, but it doesn’t really matter). I need to compare them, but the order is irrelevant, just that they contain the same Strings/items (and are of the same length, obviously). i.e. comparison o…

---

## [C struct garbage collection not run frequently enough](https://discourse.julialang.org/t/c-struct-garbage-collection-not-run-frequently-enough/116919)

<div class="topic-metadata">

**Author:** [@mattsignorelli](https://discourse.julialang.org/u/mattsignorelli)\
**Replies:** 28\
**Last updated:** [July 14, 2024, 11:42pm UTC](https://discourse.julialang.org/t/c-struct-garbage-collection-not-run-frequently-enough/116919 "2024-07-14T23:42:04Z")

</div>

I have a Julia interface to a C library where each C struct represents a number. In Julia, the mutable struct just contains a Ptr to the C struct, and the finalizer calls the C destructor. These C structs can be very me…

---

## [Kalman Filters example translation from python](https://discourse.julialang.org/t/kalman-filters-example-translation-from-python/117039)

<div class="topic-metadata">

**Author:** [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Replies:** 3\
**Last updated:** [July 14, 2024, 9:41pm UTC](https://discourse.julialang.org/t/kalman-filters-example-translation-from-python/117039 "2024-07-14T21:41:36Z")

</div>

I want to implement this Kalman Filter from pykalman in julia kf = KalmanFilter( transition\_matrices = \[1\], observation\_matrices = \[1\], initial\_state\_mean = 0, initial\_state\_covariance = 1, observat…

---

## [Send email with Franklin.jl?](https://discourse.julialang.org/t/send-email-with-franklin-jl/117041)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [July 14, 2024, 9:40pm UTC](https://discourse.julialang.org/t/send-email-with-franklin-jl/117041 "2024-07-14T21:40:44Z")

</div>

Would it be possible to add a “Send email” button to a website created with Franklin.jl ? a. if deployed on Github b. if deployed on a web/email server? And if yes, how?

---

## [ERROR: LoadError: Python: IndexError: only integers, slices (\`:\`), ellipsis (\`...\`), numpy.newaxis (\`None\`) and integer or boolean arrays are valid indices](https://discourse.julialang.org/t/error-loaderror-python-indexerror-only-integers-slices-ellipsis-numpy-newaxis-none-and-integer-or-boolean-arrays-are-valid-indices/117028)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 4\
**Last updated:** [July 14, 2024, 6:48pm UTC](https://discourse.julialang.org/t/error-loaderror-python-indexerror-only-integers-slices-ellipsis-numpy-newaxis-none-and-integer-or-boolean-arrays-are-valid-indices/117028 "2024-07-14T18:48:38Z")

</div>

I am getting ERROR: LoadError: Python: IndexError: only integers, slices (:), ellipsis (…), numpy.newaxis (None) and integer or boolean arrays are valid indices Python stacktrace: none I am using julia script that calls…

---

## [Resizing an image with Franklin](https://discourse.julialang.org/t/resizing-an-image-with-franklin/117036)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [July 14, 2024, 4:46pm UTC](https://discourse.julialang.org/t/resizing-an-image-with-franklin/117036 "2024-07-14T16:46:38Z")

</div>

Is there a way to resize an image in Franklin.jl ? This is too small: Code: # The floods in Kenya in April 2024 \\fig{flood.jpeg} This image has 639x396 pixel, the original image was much bigger, so somewhere it m…

---

## [Franklin.jl and Github](https://discourse.julialang.org/t/franklin-jl-and-github/117008)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 20\
**Last updated:** [July 14, 2024, 10:48am UTC](https://discourse.julialang.org/t/franklin-jl-and-github/117008 "2024-07-14T10:48:34Z")

</div>

I installed Franklin.jl and created a website, which is in a subfolder. I know I can deploy the generated website to Github. But does this deploy just the generated code, or also the source code?

---

## [TOML parsing error](https://discourse.julialang.org/t/toml-parsing-error/116891)

<div class="topic-metadata">

**Author:** [@JianghuiDu](https://discourse.julialang.org/u/JianghuiDu)\
**Replies:** 4\
**Last updated:** [July 14, 2024, 8:48am UTC](https://discourse.julialang.org/t/toml-parsing-error/116891 "2024-07-14T08:48:21Z")

</div>

My julia keeps running into unknow problems and get killed when I install packages. And when I restart I always got error messages like this: (@v1.9) pkg\> up ERROR: TOML Parser error: C:\\Users\\pkudu\\.julia\\logs\\manifest…

---

## [Rust and Julia BoF at JuliaCon 2024](https://discourse.julialang.org/t/rust-and-julia-bof-at-juliacon-2024/116993)

<div class="topic-metadata">

**Author:** [@miguelraz](https://discourse.julialang.org/u/miguelraz)\
**Replies:** 5\
**Last updated:** [July 14, 2024, 4:20am UTC](https://discourse.julialang.org/t/rust-and-julia-bof-at-juliacon-2024/116993 "2024-07-14T04:20:18Z")

</div>

Welcome Julia and Rust friends! Our BoF was a friendly discussion mostly around what Rust can offer to Julia devs. Most of the attendees didn’t know Rust yet but were keen to learn what it offers. For those interested …

---

## [Is ClusterManagers.jl maintained? Or, how to do multi-node calculations in Julia?](https://discourse.julialang.org/t/is-clustermanagers-jl-maintained-or-how-to-do-multi-node-calculations-in-julia/110050)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 44\
**Last updated:** [July 13, 2024, 8:53pm UTC](https://discourse.julialang.org/t/is-clustermanagers-jl-maintained-or-how-to-do-multi-node-calculations-in-julia/110050 "2024-07-13T20:53:34Z")

</div>

Just wondering if anybody is maintaining ClusterManagers.jl? Major components of it have been broken for over two years now… (example). Now it seems that even the previously well-supported cluster managers are a bit ske…

---

## [Can I restrict access to module functions?](https://discourse.julialang.org/t/can-i-restrict-access-to-module-functions/115830)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 6\
**Last updated:** [July 13, 2024, 4:17pm UTC](https://discourse.julialang.org/t/can-i-restrict-access-to-module-functions/115830 "2024-07-13T16:17:27Z")

</div>

Hi, I am trying to develop a set of automated workshops for students to follow (similar to the ones you access in Coursera or similar). I was wondering if I can (by design, something similar to oop) mask or restrict acce…

---

## [Shell Command to make environmental variables](https://discourse.julialang.org/t/shell-command-to-make-environmental-variables/116997)

<div class="topic-metadata">

**Author:** [@s-baumann](https://discourse.julialang.org/u/s-baumann)\
**Replies:** 2\
**Last updated:** [July 13, 2024, 1:20pm UTC](https://discourse.julialang.org/t/shell-command-to-make-environmental-variables/116997 "2024-07-13T13:20:19Z")

</div>

I am on linux and trying to execute the following in a Julia REPL: run(export JULIA\_NUM\_THREADS=4) I get the error ERROR: IOError: could not spawn export JULIA\_NUM\_THREADS=4: no such file or directory (ENOENT) I can…

---

## [Vec vs Point what to use?](https://discourse.julialang.org/t/vec-vs-point-what-to-use/116972)

<div class="topic-metadata">

**Author:** [@Maddy](https://discourse.julialang.org/u/Maddy)\
**Replies:** 15\
**Last updated:** [July 13, 2024, 12:57pm UTC](https://discourse.julialang.org/t/vec-vs-point-what-to-use/116972 "2024-07-13T12:57:38Z")

</div>

All this time I had been using Point(…). I recently realised there is a Vec(…) function in the GeometryBasics.jl package. Is there a particular one that I should Use? julia\> Point(1,2) == Vec(1,2) == \[1,2\] true All Mak…

---

## [Testing error thrown by a macro](https://discourse.julialang.org/t/testing-error-thrown-by-a-macro/116983)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 2\
**Last updated:** [July 13, 2024, 2:14am UTC](https://discourse.julialang.org/t/testing-error-thrown-by-a-macro/116983 "2024-07-13T02:14:47Z")

</div>

Is there a standard way to test that a macro throws an error for certain inputs? Consider the following example: macro foo(x) x == :a || throw(ArgumentError("oops.")) 1 end If I use @test\_throws normally, it do…

---

## [Automatically load extension if available](https://discourse.julialang.org/t/automatically-load-extension-if-available/116980)

<div class="topic-metadata">

**Author:** [@bclyons12](https://discourse.julialang.org/u/bclyons12)\
**Replies:** 6\
**Last updated:** [July 13, 2024, 12:26am UTC](https://discourse.julialang.org/t/automatically-load-extension-if-available/116980 "2024-07-13T00:26:40Z")

</div>

Suppose I have MyPkg which has as an extension MyExt. I basically always want MyPkg to use MyExt if that package is available in the environment. Is there a way to automate it so that import MyPkg always does import MyPk…

---

## [How to join existing and new parametric types under a common abstract type?](https://discourse.julialang.org/t/how-to-join-existing-and-new-parametric-types-under-a-common-abstract-type/116714)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 9\
**Last updated:** [July 12, 2024, 8:22pm UTC](https://discourse.julialang.org/t/how-to-join-existing-and-new-parametric-types-under-a-common-abstract-type/116714 "2024-07-12T20:22:54Z")

</div>

I do not know how types work internally, so I’d like some advice on how to achieve high performance code. My script already takes into account the general performance tips: my helper functions \_my\_kernel\_function(...) on…

---

## [Delete all packages installed in an environment](https://discourse.julialang.org/t/delete-all-packages-installed-in-an-environment/116930)

<div class="topic-metadata">

**Author:** [@curious](https://discourse.julialang.org/u/curious)\
**Replies:** 5\
**Last updated:** [July 12, 2024, 3:08pm UTC](https://discourse.julialang.org/t/delete-all-packages-installed-in-an-environment/116930 "2024-07-12T15:08:45Z")

</div>

Suppose to try out a few things I create an environment as described here. I install some packages and test the things I want to. Now I want to delete all the packages that I installed in this environment. Is there a com…

---

## [Errors Encountered While Running Examples from FMIFlux.jl Documentation](https://discourse.julialang.org/t/errors-encountered-while-running-examples-from-fmiflux-jl-documentation/116905)

<div class="topic-metadata">

**Author:** [@CurioMath](https://discourse.julialang.org/u/CurioMath)\
**Replies:** 1\
**Last updated:** [July 12, 2024, 11:36am UTC](https://discourse.julialang.org/t/errors-encountered-while-running-examples-from-fmiflux-jl-documentation/116905 "2024-07-12T11:36:06Z")

</div>

I have been trying to run the examples provided in the documentation of FMIFlux.jl, loading models from FMIZoo.jl. However, I often face errors while executing the following lines of code from the documentation examples. …

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

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