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
Tag: unix
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)
I am unable to check the files available in the directory
I am trying to read the csv files in the current directory. In-order to do that, I want to check all the files present in my current directory. I have tried doing it with check_output function. However, i received this error and I’m unable to figure out how to deal with it. This is the code I have tried: this
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
Trouble running Python script CRON: Import Error: No Module Named Tweepy
Background: I am following Crontab not running my python script in an attempt to debug and run my python script using CRON. Per SO suggestions, I tried /usr/bin/python /Users/eer/Desktop/myscript.py on the terminal. Problem: However, I get a an error: ImportError: No module named tweepy. So, I tried to pip install tweepy and I get the following:Requirement already satisfied: tweepy in
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