58 questions
0
votes
0
answers
111
views
How to implement a callback using PyCall?
I would like to access a Python package in Ruby using PyCall.
The non-blocking function in the Python code below activates a callback.
Could you help me implement the callback?
#!/usr/bin/env python
# ...
-2
votes
1
answer
76
views
"sys:1: UserWarning: Pandas doesn't allow columns to be created via a new attribute name" in julia
im new in julia, and i try use PyCall in julia
the problem is i cant create new column or add new column. when i run it, i only got 6 columns(before i add new column).
This my code
using PyCall
using ...
1
vote
0
answers
128
views
Segementation fault error with gem Pycall
I have a rails project using pycall and pandas.
I use these gems in a dedicated service. It works on production (heroku) and in a local rails console, I can run some data calculations.
But in a local ...
1
vote
1
answer
130
views
Large data-structure overhead when using Julia from Python
I am working with a compute-intensive code in Python that manipulates very large data-structures (such as dictionaries of about half a million elements) for the purpose of numerical simulations. In ...
0
votes
1
answer
450
views
Local module not found with PyCall in ruby on rails
I'm trying to call a python function in a file in my ruby on rails application.
My python file is located at project_dir/lib/assets/python/the_file.py
I'm utilizing PyCall for ruby with the lines:
...
0
votes
1
answer
60
views
Post API in Julia when the input is a JSON
I'm trying to access the TexSmart HTTP API https://ai.tencent.com/ailab/nlp/texsmart/en/api.html , where the input text is a dictionary matching the following structure:
Dict("str" => &...
1
vote
2
answers
139
views
Syntax for `apply` pandas function in ruby
I need to convert a python script into ruby. I use for that the gems Pandas and Numpy which make the work quite simple.
For example I have these kind of lines:
# python
# DF is a dataframe from Pandas
...
5
votes
1
answer
482
views
Error while targeting a Julia function into multiprocessing.Process of Python
I am trying to parallelize a code in python by using multiprocessing.Process which targets a Julia function.
The function works fine when I call it directly, i.e. when I execute:
if __name__ == "...
1
vote
0
answers
342
views
Julia PyCall.pyfunction with wrapped julia objects from Python
For performance reasons I would like to wrap Julia functions I am using in Python with the PyCall.pyfunctionret and PyCall.pyfunction wrappers.
One of my Julia functions returns an object that is ...
0
votes
1
answer
113
views
Utilizing Scikit-learn with Python3.11 path in Julia
I'm trying to perform some benchmarking in clustering by various frameworks, But in the case of porting Scikit-learn from python to julia, I can't make it even work. Here is the code:
using PyCall
...
6
votes
2
answers
863
views
How to convert Pandas DataFrame to Julia DataFrame.jl
I have not been able to find a way to convert my 30,000 x 1,000 Pandas.jl String DataFrame into a DataFrames.jl DataFrame. I have attempted previous stackoverflow solutions but they have not worked. I ...
0
votes
1
answer
514
views
PyPlot problems when building with Julia
I am having problems building PyCall in Julia (I am using a Mac). I have the message:
julia> Pkg.build("PyCall")
Building Conda ─→ ~/.julia/packages/Conda/3rPhK/deps/build.log
Building ...
1
vote
1
answer
532
views
Julia multithreading from pycall
Say I have a jupyter notebook:
%%julia
using Pkg
Pkg.add("DecisionTree")
using DecisionTree
X = Vector([1.1,2.2,3.3])
Y = Vector([1.1,2.2,3.3])
X = reshape(X, size(X))
X = Float32.(X)
Y = ...
2
votes
0
answers
172
views
Connecting Julia to Weights & Biases over Python
I am trying to use weights&biases for my models written in Julia. I am using WeightsAndBiasLogger.jl and try to test their demo code:
using Logging, WeightsAndBiasLogger
args = (n_epochs=1_000, ...
2
votes
1
answer
414
views
Run a python code with arguments from Julia terminal
I would like to call a python script, which has one function and this function expects one argument. Could You please advice how to call this python script from Julia terminal with the argument from ...