Re: itertools query

2019-09-27 Thread Pradeep Patra
I don't need other combination except 6,7 On Saturday, September 28, 2019, Piet van Oostrum wrote: > Pradeep Patra writes: > > > Hi all, > > > > I have written a small program to generate all the combinations of a and > b > > of the array. I want (6,7) tu

itertools query

2019-09-27 Thread Pradeep Patra
Hi all, I have written a small program to generate all the combinations of a and b of the array. I want (6,7) tuple also included. Can anybody suggest what change I should make to get 6,7 included in my output? Any suggestions Output: [(5,), (6,), (5, 6), (7,), (8,), (7, 8)] from itertools imp

Re: regular expressions help

2019-09-19 Thread Pradeep Patra
creating a list of probable combinations to search from the list. Anybody have better ideas? On Thu, Sep 19, 2019 at 3:46 PM David wrote: > On Thu, 19 Sep 2019 at 19:34, Pradeep Patra > wrote: > > > Thanks David for your quick help. Appreciate it. When I tried on python > 2.7.3 the

Re: regular expressions help

2019-09-19 Thread Pradeep Patra
as long as it works. On Thursday, September 19, 2019, David wrote: > On Thu, 19 Sep 2019 at 18:41, Pradeep Patra > wrote: > > On Thursday, September 19, 2019, Pradeep Patra > wrote: > >> On Thursday, September 19, 2019, David wrote: > >>> On Thu, 19 Sep 2019 at

Re: regular expressions help

2019-09-19 Thread Pradeep Patra
I am using python 2.7.6 but I also tried on python 3.7.3. On Thursday, September 19, 2019, Pradeep Patra wrote: > Beginning of the string. But I tried removing that as well and it still > could not find it. When I tested at www.regex101.com and it matched > successfully whereas I may

regular expressions help

2019-09-19 Thread Pradeep Patra
Hi all, I was playing around with regular expressions and testing the simple regular expression and its notworking for some reason. I want to search "my-dog" at any of the place in a string and return the index but its not working. I tried both in python 3.7.3 and 2.7.x. Can anyone please help? I

Re: numpy results in segmentation fault

2019-09-16 Thread Pradeep Patra
t 8:00 PM Thomas Jollans wrote: > On 12/09/2019 15.53, Pradeep Patra wrote: > > Hi , > > > > I was trying to solve the hackerrank and was using python 3.7.x. > > https://www.hackerrank.com/challenges/np-concatenate/problem > > > > While running the code so

numpy results in segmentation fault

2019-09-12 Thread Pradeep Patra
Hi , I was trying to solve the hackerrank and was using python 3.7.x. https://www.hackerrank.com/challenges/np-concatenate/problem While running the code sometimes I get success result and sometimes it fails with "Segmentation Fault" at Hacker rank UI. I dont have any clue why the code is crashin

How to pass username and password in the curl requests using requests python module

2019-05-02 Thread Pradeep Patra
Can anyone pls help in this regard? -- https://mail.python.org/mailman/listinfo/python-list

Search and Replace of string in a yaml file

2019-03-23 Thread Pradeep Patra
Hi all, I have several yaml files in a directory around 100s. I have some values and my script should search a string(reading from the JSON file) from the series of yaml files and run some validation like the key of the file that is updated in the yaml file and run some basic validation tests li

Backward compatible of Python 2 and Python 3

2017-06-05 Thread Pradeep Patra
Hi, I want to make a program which works in both python 2.7 and python 3. Is it possible? For example python 2.7 have raw_input() to accept the input from command line whereas python 3.x method is input(). So I want to make sure the same program works in both the python versions. https://stackov