- Create new user
adduser <username>
usermod -aG sudo <username> # enable sudo- Setup passwordless sudo
| alias fernetkey="python3 -c 'import secrets,base64;print(base64.urlsafe_b64encode(secrets.token_bytes(32)).decode())'" |
| .container-limited.limit-container-width { | |
| max-width: 1440px; | |
| } |
| import requests | |
| import re | |
| from bs4 import BeautifulSoup | |
| GEM_REWARDS_PAGE = "https://pathofexile.gamepedia.com/List_of_skill_gems_rewarded_from_quests" | |
| REWARD_TEXT_RE = re.compile("Act (\d{1}) after ([\w,\s]+) with (any character|[\w\,\s]+)") | |
| VENDOR_REWARD_TEXT_RE = re.compile( | |
| "Act (\d{1}) after ([\w,\s]+) from ([\w\s]+) with (any character|[\w\,\s]+)" |
| import logging | |
| import os | |
| from pathlib import Path | |
| from typing import Any, Dict, Optional, Union, Mapping | |
| from google.api_core.exceptions import GoogleAPIError | |
| from google.auth.exceptions import GoogleAuthError | |
| from google.cloud import secretmanager | |
| from pydantic import BaseSettings, Field |
| """ | |
| Usage: | |
| python3 poe_stash_download.py $accountname $POESESSID > tabs.json | |
| $POESESSID is value of cookie variable (with same name) | |
| after you login to the Path of exile website | |
| """ | |
| alias json2csv="python -c 'import json;b=json.loads(input());[print(f\"{k},{v}\") for k,v in b.items()]'" | |
| # use it like this | |
| cat file.json | json2csv |
| %load_ext autoreload | |
| %autoreload 2 | |
| import sys | |
| import logging | |
| import numpy as np | |
| import scipy as sp | |
| import sklearn | |
| import statsmodels.api as sm |
| #include <iostream> | |
| #include <string> | |
| #include "phonenumbers/phonenumberutil.h" | |
| using i18n::phonenumbers::PhoneNumber; | |
| using i18n::phonenumbers::PhoneNumberUtil; | |
| using namespace std; |