Friday, June 21, 2019

Unable to import package in python calling from php


Disable ENABLE_USER_SITE and then re-install the package, it would be installed in machine level directory, and then it would be accessible via php also (www-data user)

How to disable ENABLE_USER_SITE
open:
/usr/lib/python2.7/site.py

and change ENABLE_USER_SITE = None
to ENABLE_USER_SITE = False

This url is also having good info about package import:


Sunday, May 12, 2019

How to install JSON Server

JSON Installation:

download json-server-master package
Extract, open package.json file and edit the first line as follows:
 "name": "json-server" -->  "name": "json-server-test"

apply command

 npm install json-server --save-dev

Got error: Linux 4.15.0-45-generic etc

Solution: upgrade to the latest version of npm using:
npm install -g npm@latest



Friday, May 25, 2018

How to find size of particular directory on linux

du -sh file_path

Explanation

  • du (disc usage) command estimates file_path space usage
  • The options -sh are (from man du):

      -s, --summarize           display only a total for each argument      -h, --human-readable           print sizes in human readable format (e.g., 1K 234M 2G)  

    To check more than one directory and see the total, use du -sch:

      -c, --total           produce a grand total  

Tuesday, April 24, 2018

TBT Error: ./raw_conversion.scr: /bin/tcsh: bad interpreter: No such file or directory

Command: make wav2raw

Error: ./raw_conversion.scr: /bin/tcsh: bad interpreter: No such file or directory

Solution:


    you are missing the C-Shell (csh). Install it by below command:

    sudo apt-get install tcsh