1665241921
YT
is a Julia interface to the Python-based yt
analysis toolkit. YT
exposes a number of functionalities from yt
. These include:
yt
datasetsyt
data objects, such as spheres, regions, covering grids, projections, slices, etc.load_uniform_grid
, load_amr_grids
, etc.)YT
version 0.4 can be installed in Julia version 0.5 or higher. To install it, just run:
Pkg.add("YT")
which will also install the following dependencies (if you don't already have them):
However, for YT
to work, yt
itself must be installed. YT
version 0.4 requires yt
version 3.3.1 or higher. The best ways to install yt
are via the install script or via the Anaconda Python Distribution.
Once YT
is installed, either
julia> import YT
to use it as a library, or
julia> using YT
to use it as an application, loading its methods into the current session's namespace.
For more documentation, please visit http://hea-www.cfa.harvard.edu/~jzuhone/yt_julia.
Author: jzuhone
Source Code: https://github.com/jzuhone/YT.jl
License: View license
1665241921
YT
is a Julia interface to the Python-based yt
analysis toolkit. YT
exposes a number of functionalities from yt
. These include:
yt
datasetsyt
data objects, such as spheres, regions, covering grids, projections, slices, etc.load_uniform_grid
, load_amr_grids
, etc.)YT
version 0.4 can be installed in Julia version 0.5 or higher. To install it, just run:
Pkg.add("YT")
which will also install the following dependencies (if you don't already have them):
However, for YT
to work, yt
itself must be installed. YT
version 0.4 requires yt
version 3.3.1 or higher. The best ways to install yt
are via the install script or via the Anaconda Python Distribution.
Once YT
is installed, either
julia> import YT
to use it as a library, or
julia> using YT
to use it as an application, loading its methods into the current session's namespace.
For more documentation, please visit http://hea-www.cfa.harvard.edu/~jzuhone/yt_julia.
Author: jzuhone
Source Code: https://github.com/jzuhone/YT.jl
License: View license
1656408660
Julia interface to word2vec
Word2Vec takes a text corpus as input and produces the word vectors as output. Training is done using the original C code, other functionalities are pure Julia.
Pkg.add("Word2Vec")
Note: Only linux and OS X are supported.
All exported functions are documented, i.e., we can type ? functionname
to get help. For a list of functions, see here.
We first download some text corpus, for example http://mattmahoney.net/dc/text8.zip.
Suppose the file text8
is stored in the current working directory. We can train the model with the function word2vec
.
julia> word2vec("text8", "text8-vec.txt", verbose = true)
Starting training using file text8
Vocab size: 71291
Words in train file: 16718843
Alpha: 0.000002 Progress: 100.04% Words/thread/sec: 350.44k
Now we can import the word vectors text8-vec.txt
to Julia.
julia> model = wordvectors("./text8-vec")
WordVectors 71291 words, 100-element Float64 vectors
The vector representation of a word can be obtained using get_vector
.
julia> get_vector(model, "book")'
100-element Array{Float64,1}:
-0.05446138539336186
0.001090934639284009
0.06498087707990222
⋮
-0.0024113040415322516
0.04755140828570571
0.039764719065723826
The cosine similarity of book
, for example, can be computed using cosine_similar_words
.
julia> cosine_similar_words(model, "book")
10-element Array{String,1}:
"book"
"books"
"diary"
"story"
"chapter"
"novel"
"preface"
"poem"
"tale"
"bible"
Word vectors have many interesting properties. For example, vector("king") - vector("man") + vector("woman")
is close to vector("queen")
.
5-element Array{String,1}:
"queen"
"empress"
"prince"
"princess"
"throne"
Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean, "Efficient Estimation of Word Representations in Vector Space", In Proceedings of Workshop at ICLR, 2013. [pdf]
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. "Distributed Representations of Words and Phrases and their Compositionality", In Proceedings of NIPS, 2013. [pdf]
Tomas Mikolov, Wen-tau Yih, and Geoffrey Zweig, "Linguistic Regularities in Continuous Space Word Representations", In Proceedings of NAACL HLT, 2013. [pdf]
The design of the package is inspired by Daniel Rodriguez (@danielfrg)'s Python word2vec interface.
Please file an issue to report a bug or request a feature.
See demo for more details.
Author: JuliaText
Source Code: https://github.com/JuliaText/Word2Vec.jl
License: View license
1668181980
OCCA is a cross platform single-instruction-multiple-data (SIMD) threading library that is retargetable to multiple backends such as pthreads, openmp, opencl, and cuda. OCCA.jl is a Julia interface into OCCA. The main OCCA repository can be found here.
Installation and testing.
Pkg.add("OCCA");
#This takes a minute because no precompiled OCCA binaries exist.
#OCCA will build with no parallel backends by default because
#reliable backend detection is under development.
#To rebuild with e.g. opencl and cuda you would run
using OCCA;
OCCA.rebuildwith!(opencl=true,cuda=true);
#To run tests for all compiled backends, run:
Pkg.test("OCCA");
#If a backend is not compiled, that test will simply pass without doing anything.
#OCCA will default to serial mode if no backend is installed, so the tests
#still provide some information about correctness of the test kernels (ignoring
#parallel issues such as race conditions and deadlocks)
An example script.
kernel void addVectors(const int entries,
const float *a,
const float *b,
float *ab){
for(int group = 0; group < ((entries + 15) / 16); ++group; outer0){
for(int item = 0; item < 16; ++item; inner0){
const int N = (item + (16 * group));
if(N < entries)
ab[N] = a[N] + b[N];
}
}
}
advectors.jl
infostring = "mode = OpenMP , schedule = compact, chunk = 10";
entries = 5
device = OCCA.Device(infostring);
a = Float32[1 - i for i in 1:entries]
b = Float32[i for i in 1:entries]
ab = Array(Float32,(length(a),));
correctvals = [1.0 for i in 1:entries];
o_a = OCCA.malloc(device, a);
o_b = OCCA.malloc(device, b);
o_ab = OCCA.malloc(device, ab);
addvectors = OCCA.buildkernel(device,"addVectors.okl","addVectors")
OCCA.runkernel!(addvectors,entries,o_a,o_b,o_ab)
OCCA.memcpy!(ab, o_ab)
Known issues
-The build script does not work for Windows, this is under development. -If OCCA kernel file uses shared memory and you target OpenCL+CPU, it will crash. This appears to be an OpenCL problem and not an OCCA problem.
Contributing
Contributing code Fork this repository on Github, make desired changes, and submit pull request.
Helping with tests and builds It would be enormously helpful if issues could be opened with any build or test failures, along with the specs of the machines on which the builds or tests failed.
Editor Issues .OKL files have a nearly-C grammar, and so most syntax highlighting modules designed for vanilla C will also do a decent job highlighting .OKL files.
Author: ReidAtcheson
Source Code: https://github.com/ReidAtcheson/OCCA.jl
License: MIT license
1668257400
A Julia interface to ZeroMQ
ZMQ.jl is a Julia interface to ZeroMQ, The Intelligent Transport Layer.
The package can be installed with the Julia package manager. From the Julia REPL, type ]
to enter the Pkg REPL mode and run:
pkg> add ZMQ
Or, equivalently, via the Pkg
API:
julia> import Pkg; Pkg.add("ZMQ")
(This installs its own copy of the ZMQ libraries from the ZMQBuilder repository.)
If you are using Windows and get an error Provider PackageManager failed to satisfy dependency zmq
, you may need to restart Julia and run Pkg.build("ZMQ")
again. See issue 69 for more details.
Usage questions can be posted on the Julia Discourse forum under the zmq
tag, in the #zmq channel of the Julia Slack and/or in the JuliaDocs Gitter chat room.
Contributions are very welcome, as are feature requests and suggestions. Please open an issue if you encounter any problems. The contributing page has a few guidelines that should be followed when opening pull requests and contributing code.
Author: JuliaInterop
Source Code: https://github.com/JuliaInterop/ZMQ.jl
License: View license
1659641700
The Tables.jl package provides simple, yet powerful interface functions for working with all kinds tabular data.
Installation: at the Julia REPL, import Pkg; Pkg.add("Tables")
Maintenance: Tables is maintained collectively by the JuliaData collaborators. Responsiveness to pull requests and issues can vary, depending on the availability of key collaborators.
List of packages which support Tables.jl interface can be found in INTEGRATIONS.md.
Please refer to TableOperations.jl for common table operations (select
, filter
, transform
, map
, etc.)
Author: JuliaData
Source Code: https://github.com/JuliaData/Tables.jl
License: MIT license