# General Usage

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

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

**Page:** 777

---

## [Geographic entities to country code (name)](https://discourse.julialang.org/t/geographic-entities-to-country-code-name/35765)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 1\
**Last updated:** [March 16, 2020, 3:41pm UTC](https://discourse.julialang.org/t/geographic-entities-to-country-code-name/35765 "2020-03-16T15:41:26Z")

</div>

Does anybody know packages (julia, python) to convert geographic entities (city,…) and nationalities to country code or name Thank you in advance.

---

## [A question about atom warning](https://discourse.julialang.org/t/a-question-about-atom-warning/36034)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 9\
**Last updated:** [March 16, 2020, 2:11pm UTC](https://discourse.julialang.org/t/a-question-about-atom-warning/36034 "2020-03-16T14:11:26Z")

</div>

julia\> ┌ Warning: Atom.jl: unrecognised message cacheCompletions. │ Please make sure your Atom and Julia packages are in sync. │ - Try using Pkg; Pkg.update() to update this package. │ - Check for julia-client upd…

---

## [CompatHelper help](https://discourse.julialang.org/t/compathelper-help/36022)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 4\
**Last updated:** [March 15, 2020, 10:52pm UTC](https://discourse.julialang.org/t/compathelper-help/36022 "2020-03-15T22:52:54Z")

</div>

I created a new package with PkgSkeleton.jl (thanks @Tamas\_Papp) and am trying to register it. However, I cannot for the life of me get CompatHelper to work. The CompatHelper.yml was there from the very beginning, but I …

---

## [ERROR: stat returned zero type for a valid path](https://discourse.julialang.org/t/error-stat-returned-zero-type-for-a-valid-path/33658)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 5\
**Last updated:** [March 15, 2020, 10:52pm UTC](https://discourse.julialang.org/t/error-stat-returned-zero-type-for-a-valid-path/33658 "2020-03-15T22:52:39Z")

</div>

I tried to upgrade from Julia 1.2.0 to 1.3.1 on my Andoid/userLAnd/Ubuntu installation - and encountered a new error message upon launching Julia 1.3.1. It probably has to do with some missing folder or writing rights, b…

---

## [Using artifacts to install python dependencies?](https://discourse.julialang.org/t/using-artifacts-to-install-python-dependencies/36006)

<div class="topic-metadata">

**Author:** [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Replies:** 2\
**Last updated:** [March 15, 2020, 8:11pm UTC](https://discourse.julialang.org/t/using-artifacts-to-install-python-dependencies/36006 "2020-03-15T20:11:41Z")

</div>

I used to install python dependencies with run(\`$(PyCall.python) $(proxy\_arg) -m pip install --user $(PACKAGES)\`) in a build script. Does it make sense to install them instead with artifacts? If yes, does somebody have a…

---

## [NLP Help needed. Probability two words to be next to each other](https://discourse.julialang.org/t/nlp-help-needed-probability-two-words-to-be-next-to-each-other/35993)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 7\
**Last updated:** [March 15, 2020, 4:31pm UTC](https://discourse.julialang.org/t/nlp-help-needed-probability-two-words-to-be-next-to-each-other/35993 "2020-03-15T16:31:35Z")

</div>

Would somebody help me with NLP? I am new on this topic. I have several words: s1,s2,s3. I need to find which of these words have a higher probability of staying after the root word. So I want to compare Probability(…

---

## [Shared environments](https://discourse.julialang.org/t/shared-environments/35999)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 7\
**Last updated:** [March 15, 2020, 1:17pm UTC](https://discourse.julialang.org/t/shared-environments/35999 "2020-03-15T13:17:36Z")

</div>

I recently learned about “shared environments”, aka the default v1.3 environment. It’s quite a revelation, but I don’t understand how it works. Suppose I have Package A which depends on B@v1.0.0, and is compatible with…

---

## [Base.return\_types function](https://discourse.julialang.org/t/base-return-types-function/35995)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 3\
**Last updated:** [March 15, 2020, 9:07am UTC](https://discourse.julialang.org/t/base-return-types-function/35995 "2020-03-15T09:07:20Z")

</div>

I have two questions about the following experiment: Why are there so many more possibilities with AbstractArray? Is it correct? Why doesn’t it return unique results? Maybe it should. julia\> Base.return\_types(iterat…

---

## [Unsafe\_wrap ownership with pointer returned by ccall](https://discourse.julialang.org/t/unsafe-wrap-ownership-with-pointer-returned-by-ccall/35998)

<div class="topic-metadata">

**Author:** [@kli6891](https://discourse.julialang.org/u/kli6891)\
**Replies:** 3\
**Last updated:** [March 15, 2020, 2:49am UTC](https://discourse.julialang.org/t/unsafe-wrap-ownership-with-pointer-returned-by-ccall/35998 "2020-03-15T02:49:18Z")

</div>

Suppose I use ccall to call into a piece of C code which returns a pointer (to an array) to a chunk of memory that was malloc’d by the C code. I want this array now to be owned by Julia’s GC. Should I call unsafe\_wrap(.…

---

## [Bincount of histogram](https://discourse.julialang.org/t/bincount-of-histogram/35991)

<div class="topic-metadata">

**Author:** [@1634](https://discourse.julialang.org/u/1634)\
**Replies:** 4\
**Last updated:** [March 15, 2020, 12:36am UTC](https://discourse.julialang.org/t/bincount-of-histogram/35991 "2020-03-15T00:36:22Z")

</div>

I’d like to adjust bin count. After using Gadfly, the plot() became undefined. using Distributions function a() jump=rand(TDist(1),10000)#12\>10 for j in 1:length(jump) while abs(jump\[j\])\<1 #…

---

## [Problem with \`cat\`](https://discourse.julialang.org/t/problem-with-cat/35964)

<div class="topic-metadata">

**Author:** [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)\
**Replies:** 9\
**Last updated:** [March 14, 2020, 8:37pm UTC](https://discourse.julialang.org/t/problem-with-cat/35964 "2020-03-14T20:37:23Z")

</div>

I have a problem with cat. I am using polynomials (my own package but this is not the problem) julia\> q=Pol(:q) Pol{Int64}: q julia\> (q+1)^3 Pol{Int64}: q³+3q²+3q+1 and I am all the time using cat to construct block-d…

---

## [Hessian on a parametric parametric spline](https://discourse.julialang.org/t/hessian-on-a-parametric-parametric-spline/35986)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 0\
**Last updated:** [March 14, 2020, 8:15pm UTC](https://discourse.julialang.org/t/hessian-on-a-parametric-parametric-spline/35986 "2020-03-14T20:15:07Z")

</div>

I’m not sure what the correct syntax is (got some StackOverflowErrors) for getting the hessian of a parametric spline in Interpolations.jl. So from the docs: using Interpolations t = 0:.1:1 x = sin.(2π\*t) y = cos.(2π\*…

---

## [Flux upgrade to v0.10 seems buggy](https://discourse.julialang.org/t/flux-upgrade-to-v0-10-seems-buggy/33665)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 20\
**Last updated:** [March 14, 2020, 5:54pm UTC](https://discourse.julialang.org/t/flux-upgrade-to-v0-10-seems-buggy/33665 "2020-03-14T17:54:43Z")

</div>

I have Flux code which worked fine until I (just) upgraded to the latest version, where the same code no longer works with the ‘upgraded’ version. I understand there has been innovation using Sparse Arrays, but that see…

---

## [Help debug 2 functions in my package](https://discourse.julialang.org/t/help-debug-2-functions-in-my-package/35977)

<div class="topic-metadata">

**Author:** [@PseudoCodeNerd](https://discourse.julialang.org/u/PseudoCodeNerd)\
**Replies:** 2\
**Last updated:** [March 14, 2020, 5:27pm UTC](https://discourse.julialang.org/t/help-debug-2-functions-in-my-package/35977 "2020-03-14T17:27:04Z")

</div>

I am working towards making a basic Julia wrapper for the Discourse API. I’m taking inspiration from pydiscourse (a python API wrapper) and am stuck with my code. I was trying to implement get\_user() API endpoint from he…

---

## [Distributions and Arpack fail to build](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 12\
**Last updated:** [March 14, 2020, 2:15pm UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437 "2020-03-14T14:15:56Z")

</div>

After updating my packages, I encountered a problem building/precompiling distributions and arpack. The issue seems to be Arpack. Does anyone know how to fix this? Thanks OS: Mac 10.11.6 Julia 1.0 julia\> using Distri…

---

## [Global sensitivity analysis Morris Method](https://discourse.julialang.org/t/global-sensitivity-analysis-morris-method/35967)

<div class="topic-metadata">

**Author:** [@vijaya](https://discourse.julialang.org/u/vijaya)\
**Replies:** 0\
**Last updated:** [March 14, 2020, 2:06pm UTC](https://discourse.julialang.org/t/global-sensitivity-analysis-morris-method/35967 "2020-03-14T14:06:04Z")

</div>

Hi In the global sensitvity analysis Morris method example (Lotka Volterra gsa), the input arguments are “total\_num\_trajectory=1000,num\_trajectory=150” The number of parameters in the equations are 4 so generally in t…

---

## [Disable TimerOutputs.jl timers selectively within function](https://discourse.julialang.org/t/disable-timeroutputs-jl-timers-selectively-within-function/35957)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 3\
**Last updated:** [March 14, 2020, 10:44am UTC](https://discourse.julialang.org/t/disable-timeroutputs-jl-timers-selectively-within-function/35957 "2020-03-14T10:44:43Z")

</div>

I have a function that internally uses TimerOutputs.jl to time some calls to other functions. Sometimes, however, I want to be able to call this function without having the timers record anything, e.g., when I call the f…

---

## [OutOfMemoryError()\_solved by sparse matrix](https://discourse.julialang.org/t/outofmemoryerror-solved-by-sparse-matrix/35955)

<div class="topic-metadata">

**Author:** [@1634](https://discourse.julialang.org/u/1634)\
**Replies:** 3\
**Last updated:** [March 14, 2020, 10:39am UTC](https://discourse.julialang.org/t/outofmemoryerror-solved-by-sparse-matrix/35955 "2020-03-14T10:39:41Z")

</div>

Hi community, julia\> @time legend, t\_avn\_mtx, t\_se\_mtx, eta\_avn\_mtx, eta\_se\_mtx, fix\_M\_mtx = onedim\_xdispersal\_yfix\_nDemesseries(N,nDemes\_vec,twoNmu,s0,twoNDememig\_vec,M,T,Gauss, nu) t\_fix\_vecArray{Any,1}(10,) …

---

## [Am I using DiffResults.jl correctly?](https://discourse.julialang.org/t/am-i-using-diffresults-jl-correctly/35894)

<div class="topic-metadata">

**Author:** [@jlchan](https://discourse.julialang.org/u/jlchan)\
**Replies:** 7\
**Last updated:** [March 14, 2020, 5:06am UTC](https://discourse.julialang.org/t/am-i-using-diffresults-jl-correctly/35894 "2020-03-14T05:06:41Z")

</div>

I’m trying to compute Jacobian and function values simultaneously using ForwardDiff.jl. A simple MWE example is using StaticArrays using ForwardDiff using DiffResults using BenchmarkTools f(x) = SVector((@. x\[1\]\*x\[2\])…

---

## [Convert Float to Integer](https://discourse.julialang.org/t/convert-float-to-integer/35948)

<div class="topic-metadata">

**Author:** [@Diger](https://discourse.julialang.org/u/Diger)\
**Replies:** 6\
**Last updated:** [March 13, 2020, 10:57pm UTC](https://discourse.julialang.org/t/convert-float-to-integer/35948 "2020-03-13T22:57:24Z")

</div>

I was wondering why converting floats to integers takes so much time? When I run this loop below it takes about 14ms. When I remove the Int() it takes only 1.9ns if I’m not mistaken. Any idea how to improve the speed? u…

---

## [Parsing strange CSV files](https://discourse.julialang.org/t/parsing-strange-csv-files/35907)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 5\
**Last updated:** [March 13, 2020, 10:58pm UTC](https://discourse.julialang.org/t/parsing-strange-csv-files/35907 "2020-03-13T22:58:42Z")

</div>

I am trying to parse some CSV files that have some extra stuff and actually include multiple different tables. About the only thing that is standardized is that the tables within the file always have the same number of c…

---

## [Julia buffer interface?](https://discourse.julialang.org/t/julia-buffer-interface/35922)

<div class="topic-metadata">

**Author:** [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Replies:** 9\
**Last updated:** [March 13, 2020, 4:16pm UTC](https://discourse.julialang.org/t/julia-buffer-interface/35922 "2020-03-13T16:16:08Z")

</div>

Does Julia have anything akin to Python’s buffer interface? That is, I’d like to be able to test whether an object is represented as a contiguous/strided mutable/immutable buffer of bytes/words/etc in memory, and if so, …

---

## [What to do ? ERROR: HTTP.ExceptionRequest.StatusError(405, "GET",](https://discourse.julialang.org/t/what-to-do-error-http-exceptionrequest-statuserror-405-get/35897)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 3\
**Last updated:** [March 13, 2020, 11:28am UTC](https://discourse.julialang.org/t/what-to-do-error-http-exceptionrequest-statuserror-405-get/35897 "2020-03-13T11:28:25Z")

</div>

julia\> usinh HTTP ERROR: syntax: extra token "HTTP" after end of expression julia\> using HTTP julia\> url="https://www.similarweb.com/website/pb.pl" "https://www.similarweb.com/website/pb.pl" julia\> r=HTTP.get(url); ER…

---

## [Source location of e.g. \`struct\` definition](https://discourse.julialang.org/t/source-location-of-e-g-struct-definition/35885)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 2\
**Last updated:** [March 13, 2020, 8:58am UTC](https://discourse.julialang.org/t/source-location-of-e-g-struct-definition/35885 "2020-03-13T08:58:21Z")

</div>

What’s a way to get the sourcecode location of a struct definition? julia\> which(Rational, (Int64, Int64)) (::Type{Rational})(n::T, d::T) where T\<:Integer in Base at rational.jl:21 julia\> which(Main, :Rational) Base

---

## [Achieving parallel web request handling with Julia (httpserver.jl or other)](https://discourse.julialang.org/t/achieving-parallel-web-request-handling-with-julia-httpserver-jl-or-other/10670)

<div class="topic-metadata">

**Author:** [@dbartow](https://discourse.julialang.org/u/dbartow)\
**Replies:** 15\
**Last updated:** [March 13, 2020, 7:02am UTC](https://discourse.julialang.org/t/achieving-parallel-web-request-handling-with-julia-httpserver-jl-or-other/10670 "2020-03-13T07:02:26Z")

</div>

I’ve written a web server in Julia using httpserver.jl. For simplicity, let’s say that I have one endpoint that runs a Julia function to crunch some numbers and then return them to the browser. Let’s also assume for sa…

---

## [Way to make custom transformer with ScikitLearn.jl](https://discourse.julialang.org/t/way-to-make-custom-transformer-with-scikitlearn-jl/35860)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 2\
**Last updated:** [March 13, 2020, 4:49am UTC](https://discourse.julialang.org/t/way-to-make-custom-transformer-with-scikitlearn-jl/35860 "2020-03-13T04:49:20Z")

</div>

Was trying to make an oversampler that fits in with the ScikitLearn.jl package, but it seems like only BaseRegressor is supported. Has anyone figured out a way to make custom transformers for ScikitLearn in Julia?

---

## [Assigning a function to unicode symbols](https://discourse.julialang.org/t/assigning-a-function-to-unicode-symbols/35909)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 1\
**Last updated:** [March 13, 2020, 2:00am UTC](https://discourse.julialang.org/t/assigning-a-function-to-unicode-symbols/35909 "2020-03-13T02:00:21Z")

</div>

I tried to assign a function to a unicode symbol and found out that while this works for most supported unicode symbols it fails for some. specifically, you can see that Julia seems to be picky regarding assignment of \\…

---

## [Installing H2o and XGBoost on Windows 10](https://discourse.julialang.org/t/installing-h2o-and-xgboost-on-windows-10/12373)

<div class="topic-metadata">

**Author:** [@Deb\_Midya](https://discourse.julialang.org/u/Deb_Midya)\
**Replies:** 3\
**Last updated:** [March 13, 2020, 12:06am UTC](https://discourse.julialang.org/t/installing-h2o-and-xgboost-on-windows-10/12373 "2020-03-13T00:06:45Z")

</div>

Hi all, Thanks in advance. I’m using JuliaPro-0.6.3.1 on Windows 10 64 bit. H2o: Is the any Julia package on Windows? XGBoost: I was trying to install it using Julia\>Pkg.add(“XGBoost”). But I’ve received the this er…

---

## [Why is python faster than Julia](https://discourse.julialang.org/t/why-is-python-faster-than-julia/35890)

<div class="topic-metadata">

**Author:** [@adangreen](https://discourse.julialang.org/u/adangreen)\
**Replies:** 14\
**Last updated:** [March 12, 2020, 11:34pm UTC](https://discourse.julialang.org/t/why-is-python-faster-than-julia/35890 "2020-03-12T23:34:27Z")

</div>

I wrote two absolutely identical pieces of code on python and Julia: from time import time start\_time = time() def euclidian\_algorithm\_division\_count(a, b): division\_count = 1 if b \> a: a, b = b, a …

---

## [Recoding variables and counting and removing duplicate rows in dataframes](https://discourse.julialang.org/t/recoding-variables-and-counting-and-removing-duplicate-rows-in-dataframes/35888)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 3\
**Last updated:** [March 12, 2020, 7:29pm UTC](https://discourse.julialang.org/t/recoding-variables-and-counting-and-removing-duplicate-rows-in-dataframes/35888 "2020-03-12T19:29:50Z")

</div>

Hi all- I seeking solutions for two problems I have encountered while manipulating dataframes. I’ve been struggling to think of a good solution. Although I can probably duct tape some solutions, I was wondering whether …

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

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