Using PkgTemplates.jl to create new github repository
Hi, I’m fairly new to Julia and I’m trying to make use of the PkgTemplates.jl package. When I generate a new package I expect a new repository to be created on github however this doesn’t seem to be...
View ArticleIs there a way to apply constant folding with `nameof` for a simple `UnionAll`?
nameof(::UnionAll) does not perform constant folding. julia> @code_typed nameof(Complex{Float32}) CodeInfo( 1 ─ return :Complex ) => Symbol julia> @code_typed nameof(Complex) CodeInfo( 1 ─...
View ArticleNeed help with very basic plotting
Hello, I am trying to learn Julia. When I type in the basic plotting example given at Tutorial · Plots, namely the code below copied directly from the link given above. import Pkg; Pkg.add(“Plots”)...
View ArticleCreating NamedTuple from exisiting NamedTuples using their keys and values?
I’m looking to combine two NamedTuples in Julia in the following way - I start with p = (a = 1, b = 2) and q = (c = 3, d = 4). What I want is to create a new NamedTuple with the keys of p and the...
View ArticleRsvg question
I cut and paste below code from the web. I am trying to convert a svg file to png. The problem is the output file has only a size of 137 bytes. The Mac finder displays an empty content. I expect the...
View ArticleSeek help on displaying svg file content onto screen using Rsvg and Cairo/Gtk
In a custom draw function, I have this snippet: when the draw function is called, I can see the println messages printed on the REPL. But the Gtk window did not show the image from the svg file. { I...
View ArticleError in Regression but I don't think there is collinearity:...
“PosDefException: matrix is not positive definite; Cholesky factorization failed.” I am getting the above error when I try to do certain regressions such as the one below involving interaction terms...
View ArticleSeek advice on displaying clickable N by N images
I would like to build an N by N squares laid out in a grid form. Each square has a background color and an image at the center. No distance between two squares. If one of the images is clicked, an...
View ArticleRunning counterfactuals on a regression with interactions
Let’s say I have a data frame with columns c1,c2,…,cn and I run a regression of c1 on c2, c3, c4 and c2.*c4: sm = GLM.lm( @formula(c1 ~ c2 + c3 +c4 +c2&c4), df) If I were in Python, I could then...
View ArticleTips for fast parsing of "ad-hoc" protocol
I’m in the process of trying to implement a fast-ish protocol parser/reader/whatever for a (from what I can tell) ad-hoc:ish protocol. Use case for context is to speed up a ‘let’s start this before...
View ArticleIs it possible to use an event driven architecture in Julia?
Hello everyone! I’m an equities and options trader with a basic understanding of Python and JavaScript. The little I’ve seen of Julia so far has been amazing and I’m hoping to explore working with...
View ArticleTips on integrals using DiffEqOperators
I’m trying to use DiffEqOperators to define the Kermack-McKendrick model, which is basically a PDE generalization of the simple SIR epidemiological model: en.wikipedia.org Kermack–McKendrick theory...
View ArticleCallback at every 3 integrator steps in DIfferential equations.jl
Hi there, This is a pretty basic question. I wanted to create a callback function which works after every 3 integrator steps. Since the time-steps are adaptive and hence unknown, is there any...
View ArticleDo Julia resources improve in background?
Code I wrote in December has not undergone significant modification, I’m still using Julia 1.0, and I’ve added no new packages. However, I executed the code over the last few days on the same machine...
View ArticleLatest OpenBSD status?
Hi!, I have been trying to compile julia on openbsd, and it’s not working. Before I dig into debugging I figured I’d ask if anyone has gotten recent julia to work on OpenBSD? Thanks!, 1 post - 1...
View ArticleDefining a rank-N tensor
TL;DR: I have three main questions: How do I define a struct type such that it is limited to one of a few select options? How do I define a struct type such that it can only take integer values? How...
View ArticleDo I need to specify what kind of weights I am providing?
I found helpful instructions on using weights and its source code (here, here, here) but I am still not sure I understand how to use it correctly. Maybe I am just confusing/misunderstanding something...
View ArticleHow to assign Matrix with dimensions (1,1) to a scalar
Hello I’m quite new to Julia and coming from MATLAB and Python and I have some trouble with operations that should be quite common but I haven’t found any workaround/solution in the usual places...
View ArticleFunction definition throwing UndefVarError
Hello, I have a function which follows the condensed, simplified format shown below. using Statistics: std, mean, median, var function foo(a,b,c) """ Do some stuff """ if a > 0 if a == 1 bar(x) =...
View ArticlePlot doesn't show up when calling `x=`, `y=` explicitly
Am I wrong for being surprised by this behavior? julia> using Plots julia> a = rand(10); b = rand(10); julia> plot(a, b) # Works julia> plot(x=a, y=b) # Plots a blank canvas 7 posts - 3...
View Article