Skip to content
Advertisement

Tag: linux

why matplotlib is not operating?

I want to use matplotlib. I have installed it as: and in terminal I have: now I want to use it. so in pycharm terminal I have: What is the problem please? can you help me solve it? Thank you very much for your help. Answer You are in shell not in python executing environment.

Shell script doesn’t work when I export a variable inside it

I have a script called installscript which needs a change to the PATH variable. BuildScript file has the following code: Running ./BuildScript or source BuildScript fails with an error in installscript I have made a NewScript and call BuildScript from it after exporting the PATH variable running source NewScript works. I don’t understand why running BuildScript alone won’t work. Answer

linux kernel: is vfs_write thread safe?

In my program, I need to write file in kernel space due to some special reason although I know it’s not recommended. I’m using vfs_write to write files in kernel space and it works fine. In one case, there are two threads need to write to the same file. From the internet, it seems that user-space write is thread safe,

Undersired echo truncate in sh Linux

I want to send two variables as input to another command in shell script. I have tried many methods to send the two variables but I am getting unexpected problems with echo command. the above string gives unexpected truncated output.i am getting the Variables after reading from a file.(ex : HOURS1=cat time_now |cut -d ‘.’ -f 1 ) I have

How to achieve a mirror copy in Linux?

I want to make two directories synchronized. I know there is a robocopy /MIR command in Windows that can achieve this. Ex: When there is a file updated or deleted, the backup directory can keep synchronization. I have tried in Linux through the rsync command like this: but when I delete a file under /usr/test and then run this command,

unable to install puppetserver on ec2 ubuntu instance error: Some packages could not be installed

I am trying to install Puppet server on an EC2 Ubuntu instance: If I try to install puppet-common: I tried purging puppet-common and reinstalling it. I have also tried sudo apt-get upgrade. Any help will be appreciated. Thanks. Answer Have you enabled the PuppetLabs package repositories? Depending on the version of Ubuntu your on, you should do something like this:

Change datetime format in mariadb

Database : Mariadb Platform : CentOS Need to do Import data from a text file to table. Problem with DATETIME format. After importing the values are showing NULL. Answer Assuming your example of ‘mmddYYYYHHiissmmm’ is correct, change ‘%m-%d-%Y %H:%i:%s:%f’ to ‘%m%d%Y%H%i%s%f’. Here’s a test: You cannot change the internal representation of DATETIME or TIMESTAMP.

Creating Macros With Python interfacing with Libinput

I’m running Fedora 22; and I’m trying to create a very simple keyboard macro script with uinput that will work across display servers (and in console). Following this post I figured out how to do this successfully in console and with evdev; However I also want to be able to do this through libinput (for wayland, mir and X11); does

Advertisement