Skip to content

Instantly share code, notes, and snippets.

View Gatsby-Lee's full-sized avatar
😆

Gatsby Lee Gatsby-Lee

😆
  • forethought.ai
  • SF Bay Area, United States
View GitHub Profile
* https://pages.github.com/
* https://github.com/jsonresume/resume-cli
@Gatsby-Lee
Gatsby-Lee / datasources
Last active June 7, 2018 18:13
data_sources.txt
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
__pycache__
dist
*.pyc
*.swp
*.coverage
*.egg-info
.DS_Store
.settings
.vscode
.pytest_cache
* get cursor in every line: alt+shift+I
@Gatsby-Lee
Gatsby-Lee / boto3_is_valid_enpoint_url.py
Last active September 27, 2020 23:11
boto3 validates the given endpoint_url by is_valid_endpoint_url
# @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.
>>> 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)])
### disabling pylint inline
# pylint: disable=protected-access
### typing example in function
qname: Optional[str] = None
ack_id: Union[int, str]
# https://github.com/hashicorp/terraform-provider-google/blob/main/CHANGELOG.md
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.22"
}
}
}