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:
#!/bin/bash | |
# This bash script configures the bash history to include timestamps in a human-readable format. | |
# It first checks if the user's .bashrc file exists and contains the HISTTIMEFORMAT configuration. | |
# If the .bashrc file doesn't exist, it creates it and adds the HISTTIMEFORMAT configuration. | |
# If the .bashrc file exists but doesn't contain the HISTTIMEFORMAT configuration, it adds the configuration. | |
# It then applies the changes immediately by sourcing the .bashrc file. | |
# Define the time format for ease of modification and reuse | |
TIME_FORMAT="%y-%m-%d %T | " |
from dataclasses import dataclass, field | |
from typing import Optional | |
from urllib.parse import urljoin | |
import httpx | |
@dataclass | |
class Swarmpit: | |
""" |
#!/bin/bash | |
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### | |
### Generated with the help of ChatGPT ### | |
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### | |
# Usage: | |
# ./do.sh dc ps | |
# ./do.sh dc down | |
# ./do.sh dc up -d service |
from dataclasses import dataclass, fields as datafields | |
from ujson import dumps, loads | |
# Note: ujson seamlessly serializes dataclasses, unlike stdlib's json | |
@dataclass | |
class Point: | |
x: float | |
y: float | |
# Shallow dataclass can be rebuilt from dict/json: |
""" | |
https://developers.google.com/identity/sign-in/android/backend-auth#verify-the-integrity-of-the-id-token | |
""" | |
import json | |
from typing import Optional, List | |
import yarl | |
from google.oauth2 import id_token | |
from google.auth.transport import requests as google_requests |
import typing | |
import asyncio | |
class Layer: | |
class STATES: | |
IDLE = 1 | |
RUNNING = 2 | |
GOING_TO_STOP = 3 | |
STOPPED = 4 |
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] |