Skip to content
Advertisement

Tag: unix

How to run a Python module from Linux console?

I am a beginner in Linux and I am trying to do something very basic (yet it does not seem to work). I have installed a python3 package. I wish to run this Python package on a specific folder from my linux machine. The idea is that this package should restructure all my files in a specific format (this is

Is pandas.read_spss misreading datetime into unix?

I have a sav file with a datetime column in %m/%d/%Y string format. When I read it in with pd.read_spss(), which doesn’t seem to have any datetime-related arguments, it ends up in what looks like unix time, except that the time would be a few centuries from now with unique values including 13778726400, 13841884800, etc. When I feed the read

How to display accented words JSON on bash script with Python

I’m trying to display arrays with accent in the result but only arrays that don’t have accent are showing. Complete themoviedb API: https://api.themoviedb.org/3/movie/566525?api_key=b2f8880475c888056b6207067fbaa197&language=pt-BR Shell code: result: Answer Here is a cleaner way to do this in jq. This solution also scales better (you don’t need to know the number of elements in your array)

xdg-open: no method available for opening ./directory

I try to open a directory using xdg-open in Ubuntu. It works if I run xdg-open ./dir in terminal. I have a Flask web app that opens directories using xdg-open in some situations. When I start the app from terminal in development mode (By running $ flask run ) it works and opens all directories without any problems. But when

How to split parallel corpora while keeping alignment?

I have two text files containing parallel text in two languages (potentially millions of lines). I am trying to generate random train/validate/test files from that single file, as train_test_split does in sklearn. However when I try to import it into pandas using read_csv I get errors from many of the lines because of erroneous data in there and it would

docker container increase listen queue size beyond 128

How can I increase the listen queue size beyond 128 on a docker image with a read only file system? When I run my container I get the following error: uWSGI: – Listen queue size is greater than the system max net.core.somaxconn (128). I have a Dockerfile with base image python:2.7. I am trying to increase system level limit on

Advertisement