Skip to content

Instantly share code, notes, and snippets.

Avatar
😆

Gatsby Lee Gatsby-Lee

😆
  • forethought.ai
  • SF Bay Area, United States
View GitHub Profile
View Python: linter | formatter | typing
### disabling pylint inline
# pylint: disable=protected-access
### typing example in function
qname: Optional[str] = None
ack_id: Union[int, str]
View Python: Data Structure
>>> import collections
>>> import json
>>> d = collections.namedtuple("A", "a b c")
>>> d(a=1,b=2,c=3)
A(a=1, b=2, c=3)
>>> f = d(a=1,b=2,c=3)
>>> f
A(a=1, b=2, c=3)
>>> f._asdict()
OrderedDict([('a', 1), ('b', 2), ('c', 3)])
@Gatsby-Lee
Gatsby-Lee / boto3_is_valid_enpoint_url.py
Last active Sep 27, 2020
boto3 validates the given endpoint_url by is_valid_endpoint_url
View boto3_is_valid_enpoint_url.py
# @ref: https://github.com/boto/botocore/blob/develop/botocore/utils.py#L897
import re
import sys
from botocore.compat import urlsplit
def is_valid_endpoint_url(endpoint_url):
"""Verify the endpoint_url is valid.
:type endpoint_url: string
:param endpoint_url: An endpoint_url. Must have at least a scheme
and a hostname.
View gitignore
__pycache__
dist
*.pyc
*.swp
*.coverage
*.egg-info
.DS_Store
.settings
.vscode
.pytest_cache
@Gatsby-Lee
Gatsby-Lee / datasources
Last active Jun 7, 2018
data_sources.txt
View datasources
Data Sources
============
* https://archive.org/about/
* http://www.botsol.com/Products/GoogleMapsCrawler
* https://www.octoparse.com/blog/top-30-free-web-scraping-software/
* https://www.blackhat.com/docs/asia-16/materials/asia-16-Sivakorn-Im-Not-a-Human-Breaking-the-Google-reCAPTCHA-wp.pdf
View resume_idea.txt
* https://pages.github.com/
* https://github.com/jsonresume/resume-cli
View rst-ref-link.txt