Skip to content

Instantly share code, notes, and snippets.

View amitbhadra's full-sized avatar

Amit Bhadra amitbhadra

View GitHub Profile
@amitbhadra
amitbhadra / Execution
Created October 28, 2022 01:06
lazy evaluation
$ python test1.py
{'id': 3}
{'id': 3}
$ python test2.py
{'id': 2}
{'id': 3}
why different??
@amitbhadra
amitbhadra / XMLParse.groovy
Created February 22, 2018 08:32
Parse a XML string in groovy using XmlSlurper
books = '''
<response version-api="2.0">
<value>
<books>
<book available="20" id="1">
<title>Don Xijote</title>
<author id="1">Manuel De Cervantes</author>
</book>
<book available="14" id="2">
<title>Catcher in the Rye</title>