This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ^~ /v02/contenz/ { | |
if ( $arg_callback ) { | |
add_header Content-Type application/javascript; | |
echo_before_body '$arg_callback('; | |
echo_after_body ');'; | |
} | |
proxy_pass http://192.168.124.37:8001/; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> class Fruit(object): | |
... pass | |
... | |
>>> class Apple(Fruit): | |
... color = None | |
... def __init__(self, color): | |
... self.color = color | |
... | |
>>> apple_in_my_fridge = Apple('green') | |
>>> isinstance(apple_in_my_fridge, Apple) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
s = str(1900630375204) | |
gender = int(s[0])==1 and 'M' or 'F' | |
born_date = date(1900+int(s[1:3]), int(s[3:5]), int(s[5:7])) | |
city_code = int(s[7:]) | |
print gender, borndate, city_code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"webapp_contents": { | |
"content": { | |
"dynamic_templates": [ | |
{ | |
"metadata_title": { | |
"mapping": { | |
"analyzer": "autocomplete" | |
}, |
NewerOlder