Fred Callaway
Fred Callaway
When passing a callback function to a univariate optimization, I find that a little over half of the runtime is in the call to `trace!`, specifically the use of Dict....
Example: ``` best, = ga(x->-sum(x), 5, initPopulation=n->rand(Bool, n), iterations=10000, mutationRate = 0.2, selection = roulette ) ``` I think this is because you maximize the inverse of the provided objective...
I created an assignment entirely using the formgrader interface (in the browser). I successfully grade a handful of students by clicking on the lightning bolt icon under the "Autograde" column....
Hey there! A while ago, I implemented a feature to expand to the full containing block regardless of where in the block you are in (as opposed to current behavior...
Example: ``` julia> x = AxisArray(rand(3), foo=[1//2, 1//3, 1//4]) julia> x[foo=atvalue(1//2)] ERROR: BoundsError: attempt to access 3-element Array{Rational{Int64},1} at index [TolValue(1//2, tol=0//1)] ``` Seems to me that this should work...
Forgive me if I'm missing something obvious... ``` julia> using Memoize, LRUCache (@v1.4) pkg> status Memoize LRUCache Status `~/.julia/environments/v1.4/Project.toml` [8ac3fa9e] LRUCache v1.1.0 [c03570c3] Memoize v0.4.3 julia> @memoize LRU{Tuple{Any,Any},Any}(maxsize=2) function x(a,...
I'm using notedown 1.5.0 and jupyter 4.2.1 I have foo.md produced by `notedown foo.ipynb --to markdown > foo.md`. I open the file with `jupyter notebook foo.md` and it shows up...
This is basically what [pandas.pivot_table](https://pandas.pydata.org/docs/reference/api/pandas.pivot_table.html) does. Here's a naive implementation. I imagine this could be done more efficiently though. ```julia julia> function wrap_reduce(df, aggregator, val, keys...) grp = groupby(df, collect(keys))...
```julia df = DataFrame([ (x="a", y="a", z=1), (x="a", y="b", z=2), (x="b", y="b", z=3), ]) wrapdims(df, :z, :x, :y) ``` The result varies, but here's one example ``` ("a") ("b") ("a")...
e.g. ```julia x = KeyedArray(rand(10, 20), x=1:10, y=1:20) diff(x; dims=:x) ``` Currently, `diff(x; dims=1)` errors because diff changes the size of the array. There is some ambiguity about the correct...