SciRuby not plotting the bars - sciruby

I don't see output for my SciRuby code. I expected to see output
but I am getting output like the one in below screenshot
Code:
require 'nyaplot'
include Nyaplot
plot = Plot.new
bar = plot.add(:bar, [:a, :b, :c], [3,4,5])
plot
Logs:
➜ Ruby iruby notebook
[TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook`... continue in 5 sec. Press Ctrl-C to quit now.
[I 17:41:40.578 NotebookApp] Serving notebooks from local directory: /home/abhimanyuaryan/Public/RoR/Ruby
[I 17:41:40.578 NotebookApp] 0 active kernels
[I 17:41:40.578 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 17:41:40.578 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Gtk-Message: Failed to load module "pantheon-filechooser-module"
(firefox:19417): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(firefox:19417): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(firefox:19417): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(firefox:19417): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(firefox:19417): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
Gtk-Message: Failed to load module "canberra-gtk-module"
[I 17:41:55.360 NotebookApp] 302 GET / (127.0.0.1) 0.57ms
[I 17:42:00.302 NotebookApp] Creating new notebook in
[I 17:42:02.225 NotebookApp] Kernel started: b4ef1b18-a8ac-40ea-a833-fb520b24d52f
[I 17:44:02.269 NotebookApp] Saving file at /Untitled1.ipynb
[I 17:46:02.257 NotebookApp] Saving file at /Untitled1.ipynb
[I 17:48:02.257 NotebookApp] Saving file at /Untitled1.ipynb

$ gem install nyaplot
$ gem install gnuplotrb
fixed the issue for me. Thanks to John Wood for the reply

Related

vagrant kubernetes oracle virtual box VERR_INTNET_FLT_IF_NOT_FOUND error

while running vagrant up command on win machine I am getting the below error:
==> kubemaster: Booting VM...
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "29046172-fba4-4516-9e28-64ece907dcb7", "--type", "headless"]
Stderr: VBoxManage.exe: error: Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #3' (VERR_INTNET_FLT_IF_NOT_FOUND).
VBoxManage.exe: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
I resolved problem by installing latest virtualbox version.

Use notebook with slurm

I want to be able to connect to our institution's cluster using VS Code Remote SSH without the server running on a compute node instead of the login node. The preferred workflow is to SSH into the login node and then use a command to allocate a job and spin up an interactive shell on a compute node, and then run the jupyter notebook kernel on those node.
I launch jupyter-lab through this bash script
#!/bin/bash
#SBATCH -J jupyterTest
#SBATCH -N 1
#SBATCH --mem=16GB
#SBATCH --time=5:00:00
#SBATCH --output=/home/adufour/work/jupyter.log
#Load necessary modules
module purge
source /home/adufour/.bashrc
conda activate singlecell
#Go to the folder you wanna run jupyter in
cd ~/work
#Start the notebook
jupyter lab --ip=0.0.0.0 --port=8888
Which give me the following log :
[I 2021-02-16 16:14:29.363 ServerApp] jupyterlab | extension was successfully linked.
[I 2021-02-16 16:14:31.551 ServerApp] nbclassic | extension was successfully linked.
[I 2021-02-16 16:14:31.690 LabApp] JupyterLab extension loaded from /work/adufour/anaconda3/envs/singlecell/lib/python3.9/site-packages/jupyterlab
[I 2021-02-16 16:14:31.691 LabApp] JupyterLab application directory is /work/adufour/anaconda3/envs/singlecell/share/jupyter/lab
[I 2021-02-16 16:14:31.698 ServerApp] jupyterlab | extension was successfully loaded.
[I 2021-02-16 16:14:31.714 ServerApp] nbclassic | extension was successfully loaded.
[I 2021-02-16 16:14:31.719 ServerApp] Serving notebooks from local directory: /work/adufour
[I 2021-02-16 16:14:31.719 ServerApp] Jupyter Server 1.3.0 is running at:
[I 2021-02-16 16:14:31.719 ServerApp] http://node126:8888/lab?token=6a1178ff82901e42559423100b13ba12105935432fb0efdd
[I 2021-02-16 16:14:31.719 ServerApp] or http://127.0.0.1:8888/lab?token=6a1178ff82901e42559423100b13ba12105935432fb0efdd
[I 2021-02-16 16:14:31.719 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2021-02-16 16:14:31.744 ServerApp]
To access the server, open this file in a browser:
file:///home/adufour/.local/share/jupyter/runtime/jpserver-108627-open.html
Or copy and paste one of these URLs:
http://node126:8888/lab?token=6a1178ff82901e42559423100b13ba12105935432fb0efdd
or http://127.0.0.1:8888/lab?token=6a1178ff82901e42559423100b13ba12105935432fb0efdd
Unable to connect to VS Code server.
Error in request

cannot create directory ‘/proc/sys/net/bridge’: No such file or directory

I want to install kubernetes on centos 7. I have installed kubeadm and use kubeadm to install kubernetes. kubeadm init
error:
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
[ERROR SystemVerification]: failed to parse kernel config: unable to load kernel module: "configs", output: "", err: exit status 1
[ERROR SystemVerification]: unsupported graph driver: vfs
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
then I run the command mkdir /proc/sys/net/bridge and get error mkdir: cannot create directory ‘/proc/sys/net/bridge’: No such file or directory.
How to fix it?

Pyspark kernel doesnt start on Jupyterhub

The Jupyterhub Pyspark kernel used to work very well but now will not start or will have Kernel connected status (doesnt go to idle) but will not run any code in cells. It is using localprocess spawner with PAM auth on Centos.In the jupyterhub logs we see these messages:
[I 2020-03-10 15:13:08.644 SingleUserNotebookApp restarter:110] KernelRestarter: restarting kernel (4/5), new random ports
Assertion failed: rc == 0 (src/socket_poller.cpp:41)
[W 2020-03-10 15:13:11.666 SingleUserNotebookApp restarter:100] KernelRestarter: restart failed
[W 2020-03-10 15:13:11.666 SingleUserNotebookApp kernelmanager:127] Kernel 0148c77d-143a-4721-90e7-0d9a41a878c4 died, removing from map.
Any thoughts?
This was resolved by reinstalling sparkmagic in the base conda environment:
(base) [root#]# pip install sparkmagic

Cannot launch emulator on Linux (Ubuntu 15.10)

I try to launch emulator but it outputs into log:
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 47
Current serial number in output stream: 46
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 47
Current serial number in output stream: 46
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 33
Current serial number in output stream: 34
QObject::~QObject: Timers cannot be stopped from another thread emulator: WARNING: Increasing RAM size to 1GB
How to fix it? I read topics with similar errors but it doesn't help me.
Using the libstdc++.so.6 that is available in your system instead of the one bundled with the android sdk solves this issue.
The emulator has a switch -use-system-libs to do this.
~/Android/Sdk/tools/emulator -avd Nexus_5_API_23 -use-system-libs
Alternatively you can set the ANDROID_EMULATOR_USE_SYSTEM_LIBS environment variable to 1 for your user/system. This has the benefit of making sure that the emulator will work even if you launched it from within Android Studio.
More details: https://code.google.com/p/android/issues/detail?id=197254#c15
$ cd Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6
it's worked for me
Take a look at
https://code.google.com/p/android/issues/detail?id=197254
in particular items #3 and #19. This is a workaround rather than a true solution, but it got me moving again. You will have to adjust the command for:
the location of the libstdc++.so.6 file on your system - I used locate libstdc++.so.6 to find this
the path to the emulator executable
the name of your emulator
so my command was
LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libstdc++.so.6' ~/Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5_API_21
This then launches the emulator, and you can select it in the 'Device Chooser' dialogue when you run your app.
I have a similar error in Ubuntu 16.04 64-bit.
For me the answer #23 solution works great
https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=197254
$ cd $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6 $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++
Use "Software" in the Emulated Performance Graphics option, in the AVD settings. Very simple solution.
i do this and it's working
cd ~/Android/Sdk/emulator/lib64/libstdc++
mv libstdc++.so.6 libstdc++.so.6.bak
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6
better locate your system default libstdc++.so.6 using the command
locate libstdc++.so.6
And Then Take a back up of the android sdk version of the file in ~/Android/Sdk/tools/lib64/libstdc++/
And create a soft link for libstdc++.so.6 with the same name in the above path replacing the existing one pointing to the default file in the system
This way we do not need restart the emulator every time from command line.
Try to change graphics option in Emulator settings:
I was also having a lot of problems to launch AVD on my machine. Struggled with using system libs, creating symlinks to local libraries, etc...
What really made it work for me was to install the nvidia drivers with
sudo apt install nvidia-340
My distro (note I'm not using Ubuntu 15.10):
$ uname -a
Linux ruapehu 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/issue
Ubuntu 16.04.1 LTS \n \l
Make sure you check the nvidia package suitable for you, as Ubuntu offers different flavors. For instance:
$ sudo apt list "nvidia-[0-9][0-9][0-9]"
Listing... Done
nvidia-304/xenial 304.131-0ubuntu3 amd64
nvidia-331/xenial 340.96-0ubuntu3 amd64
nvidia-340/xenial,now 340.96-0ubuntu3 amd64 [installed]
nvidia-346/xenial 352.63-0ubuntu3 amd64
nvidia-352/xenial 361.42-0ubuntu2 amd64
nvidia-361/xenial,now 361.42-0ubuntu2 amd64
I tested the list in a bottom-up strategy, from 361 until I found one that worked (340, in my case).
Hope that helps.
In my case (Ubuntu 16.10 64-bit, Android Studio 2.3) libs were located in another place. So commands are:
/home/myusername/Android/Sdk/emulator/lib64/libstdc++
➜ libstdc++ ll
total 9,3M
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.0.18
➜ libstdc++ mv libstdc++.so.6 libstdc++.so.6.bak
➜ libstdc++ mv libstdc++.so.6.0.18 libstdc++.so.6.0.18.bak
➜ libstdc++ ln -s /usr/lib32/libstdc++.so.6 /home/myusername/Android/Sdk/emulator/lib64/libstdc++
➜ libstdc++ ln -s /usr/lib32/libstdc++.so.6.0.22 /home/myusername/Android/Sdk/emulator/lib64/libstdc++
➜ libstdc++ ll
total 9,3M
lrwxrwxrwx 1 myusername myusername 25 мар 29 13:18 libstdc++.so.6 -> /usr/lib32/libstdc++.so.6
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.0.18.bak
lrwxrwxrwx 1 myusername myusername 30 мар 29 13:19 libstdc++.so.6.0.22 -> /usr/lib32/libstdc++.so.6.0.22
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.bak
And now emulator is launched from AVD manager normally.
I had the similar problems with using i965_dri.so and swrast_dri.so, I wasn't able to change to software graphics in the GUI.
So I went to the emulator's folder (Show on Disk link in AVDM) and found the config.ini
Here I just changed the following line to stop it from using GPU:
hw.gpu.enabled=no
This is fixed in Android Emulator 27.2.9. See the first fix listed here:
https://developer.android.com/studio/releases/emulator#fixes
$ cd ~/Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6