Quantcast
Channel: First steps - JuliaLang
Browsing all 2795 articles
Browse latest View live

Filtering and Grouping DataFrame

@hasanOryx wrote: I’ve a csv file of the following: 1- Customer name 2- Customer location 3- Deliveries over last 60 months, so n in the table below is 60 sometimes more I read the data as: using CSV,...

View Article


Help required for drawing a chart

@hasanOryx wrote: I’ve the below table of data: 2×7 DataFrame │ Row │ Customer │ M0 │ M1 │ M2 │ M3 │ ... │ Mn │ │ │ String │ Int64 │ Int64 │ Int64 │ Int64 │ Int64 │ Int64 │...

View Article


Improving performance of a nested for loop

@jessecm wrote: Hi, sorry this is kind of a beginner/performance question. I want to generate a matrix of all of the pairwise differences among the rows of a matrix. The code below works, but gets...

View Article

JSON3: create json using Dict() with integer keys

@Elmer_Cusipuma wrote: I have found that when the following is run, JSON’s converts int dictionary keys to strings. julia> using JSON3 julia> a1 = Dict(1 => "one", 2 => "two", 3 =>...

View Article

Plot directly to file

@HenrikM wrote: I am preparing my Julia code as scripts that will run on a remote compute server. When I run the example locally, as julia --project test1.jl, it produces a file sine.pdf. When I run...

View Article


Help fo working with Iters

@hasanOryx wrote: I’ve the below Python code: def initial_trend(series, slen): sum = 0.0 for i in range(slen): sum += float(series[i+slen] - series[i]) / slen return sum / slen That is converted to...

View Article

Image may be NSFW.
Clik here to view.

How can I draw 2 series in the same chart

@hasanOryx wrote: I was able to plt the first series as: using Gadfly history = [30,21,29,31,40,48,53,47,37,39,31,29,17,9,20,24,27,35,41,38,...

View Article

How can I get the chunks of a given array

@hasanOryx wrote: I’ve a series of 60 elements: series = [30,21,29,31,40,48,53,47,37,39,31,29,17,9,20,24,27,35,41,38, 27,31,27,26,21,13,21,18,33,35,40,36,22,24,21,20,17,14,17,19,...

View Article


Using Plots.jl with pgfplots() backend

@thehalfspace wrote: I am using MacOS. I have been a long-time PyPlot user and I want to switch to Plots.jl My setup is using vim and julia REPL in a terminal side-by-side. I have the following set of...

View Article


Parametric Types with struct constructors

@sstadick wrote: Hello! I’m new to julia and trying to get a grasp on parametric types / use it like a geric type. Here’s the code: struct Interval{T} start::Int stop::Int val::T end struct...

View Article

Calling Julia from Fortran?

@joe_vallino wrote: I’m looking at moving some of my coding to Julia, and while calling Fortran from Julia seems straight forward, I haven’t found too much about calling Julia from Fortran. The reason...

View Article

Missing condition in "elseif" at none

@hasanOryx wrote: I got this error: syntax: missing condition in "elseif" at none:13 for this code, what the mistake I made? function triple_exponential_smoothing(series, slen, α, β, γ, n_preds)...

View Article

Results of Julia code different slightly than equivalent Python code

@hasanOryx wrote: I’m converting a Python code to Julia, I’m newbie to both in real, and got slight different in the output, which could be related to the indexes difference between the 2 languages...

View Article


Array of StaticArrays to 2D array

@aplavin wrote: StaticArrays documentation gives a way to convert a 2D array of values to a 1D array of StaticArrays: reinterpret(SVector{N,T}, vec(x)). However I cannot find it anywhere how to...

View Article

Directory Path -> URL Mining; output a Tree

@pontus wrote: Asking for help with a particular task (showing an XML Sitemap as an Abstract Tree), and also for direction as to how to approach this topic more broadly. General goal is to learn to...

View Article


Pkg.instantiate() for Flux model zoo

@chrisoei wrote: Hi everyone, I’m trying to get the examples in the Flux model zoo to run, but I’m having problems in the Pkg.instantiate() step mentioned in the README. I’ve tried it using both Julia...

View Article

Outer Consturctor with Parametric Types + Iterator Question

@sstadick wrote: When I try to create a Lapper, I get the following error. julia version 1.1.0  inputs = [Interval(3, 5, true), Interval(4, 10, false), Interval(7, 12, true), Interval(9, 15, true),...

View Article


Redefine Function as Variable

@duncanam wrote: Often I used my REPL for testing and scratch work. Thus, the variable x gets bound to quite a few things and I redefine it often. However, if I do: function x(y) return y+1 end and...

View Article

loadODESolvers() not working

@Nirvik wrote: I am using Windows 10 64 bit. I performed the following steps in Juno in Julia REPL: ] add ODEInterface build ODEInterface loadODESolvers() The ODEInterface package is added and built...

View Article

Startup.jl not loading

@mpf01 wrote: Running julia from the terminal (Mac), doesn’t seem to read startup.jl. Below I confirm that the startup file exists in the correct place, I think. Can someone spot what I’m doing wrong?...

View Article
Browsing all 2795 articles
Browse latest View live