'con' . 'cat'; # concat
strlen('jimi'); # 4
count([1, 2]); # 2
'jimi'[0]; # j
substr('jimi', 0, 2); # ji
str_replace('u', 'o', 'fuu'); # foo
This file contains hidden or 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
| import os | |
| from http import HTTPMethod | |
| from typing import Any | |
| from urllib.parse import ParseResult, urlparse | |
| import requests | |
| from aws_lambda_powertools import Logger | |
| from aws_lambda_powertools.event_handler.exceptions import BadRequestError | |
| from glom import glom | |
| from requests import request |
This file contains hidden or 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
| filetype plugin on | |
| filetype indent on | |
| syntax on | |
| set encoding=utf8 | |
| set relativenumber | |
| set number | |
| set mouse=a | |
| set smarttab |
This file contains hidden or 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 aws_lambda_powertools.event_handler.api_gateway import Response, content_types | |
| import decimal | |
| import json | |
| from datetime import date, datetime | |
| class DecimalEncoder(json.JSONEncoder): | |
| def default(self, o): | |
| if isinstance(o, decimal.Decimal): |
This file contains hidden or 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
| def should_i_wear_this_hat(self, hat): | |
| if not isinstance(hat, Hat): | |
| return False | |
| current_fashion = get_fashion() | |
| weather_outside = self.look_out_of_window() | |
| is_stylish = self.evaluate_style(hat, current_fashion) | |
| if weather_outside.is_raining: | |
| print("Damn.") | |
| return True |
This file contains hidden or 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
| import re | |
| """ | |
| Head=1 | |
| | | |
| | __________Tail=[2,3,4,5] | |
| || | |
| [1,2,3,4,5] | |
| [1,2,3,4]=Init________|| | |
| | |
This file contains hidden or 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
Show hidden characters
| { | |
| "auto_format_on_save": true | |
| } |
NewerOlder