I hereby claim:
- I am iananich on github.
- I am iananich (https://keybase.io/iananich) on keybase.
- I have a public key ASBYPJtCfPWT52GR3ljVWuOcyiqu2KubKlaUvofCPiJ2zAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
This is a quick guide to install PostgreSQL 10 - tested on Ubuntu 16.04 but likely can be used for Ubuntu 14.04 and 17.04 as well, with one minor modification detailed below.
To make life simple, remove all other versions of Postgres. Obviously not required, but again, makes life simple.
dpkg -l | grep postgres
import asyncio | |
import aiofiles | |
import aiohttp | |
import logging | |
import re | |
import sys | |
import os | |
import lxml.html |
# put it with settings.py and spiders folder | |
from urllib.parse import urlparse, urlencode, urlunparse | |
def update_query(url: str, query_dict: dict) -> str: | |
QUERY_INDEX = 4 | |
components = urlparse(url) | |
query = components[QUERY_INDEX] |
This gist presents part of my Scrapy NTK library: scraping_hub
package.
Especialy this one might help you to communicate with ScrapingHub API. It provides set of classes build for fetching items from cloud.
Note: some of the imported modules are not included, but you can find them in my library on ni list of my gists.
import typing | |
TypeOrNone = typing.Union[type, None] | |
def has_wrong_type(obj, expected_obj_type: TypeOrNone) -> bool: | |
""" | |
Checks if given `obj` object has not given `expected_obj_type` type. If | |
`expected_obj_type` is `None` than it will return `True` |
import typing | |
TypeOrNone = typing.Union[type, None] | |
def has_wrong_type(obj, expected_obj_type: TypeOrNone) -> bool: | |
""" | |
Checks if given `obj` object has not given `expected_obj_type` type. If | |
`expected_obj_type` is `None` than it will return `True` |
import typing | |
ThresholdBasis = typing.Union[int, None] | |
class Threshold: | |
def __init__(self, val: ThresholdBasis=None): | |
if val is None or val is 0: |
import typing | |
TypeOrNone = typing.Union[type, None] | |
def has_wrong_type(obj, expected_obj_type: TypeOrNone) -> bool: | |
""" | |
Checks if given `obj` object has not given `expected_obj_type` type. If | |
`expected_obj_type` is `None` than it will return `True` |