Category : python-3.x

I’m still learning python, Can anyone please help me in getting this done?. I need to find all the .txt files in the system and gzip each file separately using the same (text) file name, then save the gzip file into another folder that is located in ~user/backup Any help would be greatly appreciated. #!/usr/bin/env ..

Read more

I wrote this below method to filter data for last 8 days *def method_one(query) -> Query: gte = (datetime.datetime.now() – datetime.timedelta(days=query)).date() lt = (datetime.datetime.now()).date() print(gte, lt) return Q(MultiMatch( query=filter("range", {"lastModifiedDate": {"gte": gte, "lt": lt}} ), fields=[‘lastModifiedDate’] ))* I want to filter data based on "lastModifiedDate" field by forming ElasticSearch Query in Python . For Example ..

Read more