You can bridge gitter in matrix. For that you need to conver gitter url to valid matrix address.
Bridge template #gitter_<server>=2F<channel>:matrix.org
e.g.
https://gitter.im/xonsh/xonsh
server/channel
| import requests | |
| from minds import Minds | |
| api = Minds() | |
| print(api) |
| # LICENSE GPLv3 | |
| def lazy_dict_merge(root, update): | |
| """ | |
| this function merges two dictionaries lazily and recursively (supports nested dicts) | |
| Lazy means only missing keys will be updated, | |
| i.e. update['foo'] will only be copied to root if it doesn't have 'foo' already | |
| >>> lazy_dict_merge({'foo': '1'}, {'bar': '2'}) |
| """ | |
| Delete xonsh shell history by matching patterns | |
| i.e. `python delete-history.py "^ping"` will delete every history command that starts with "ping" | |
| """ | |
| import json | |
| from json import JSONDecodeError | |
| from pathlib import Path | |
| import click | |
| import os |
| somedate = '2020-02-24 07:22' | |
| somedates = ['2020-02-24 07:22', '1995-12-01 22:00', '2001-01-01 11:54'] | |
| import dateinfer | |
| print(dateinfer.infer(somedate) | |
| #'%H' incorrect | |
| print(dateinfer.infer(somedates) | |
| #'%Y-%m-%d %H:%M' correct! |
| def object_hook(dict_, func: Callable, types: Union[Tuple[Type], Type] = dict): | |
| """ | |
| object hook for python dictionary - applies function to every object of type recursively | |
| note: dictionary keys are not considered to be objects and will be type matched, | |
| for processing dictionary keys you should process whole dict type. | |
| example: | |
| >>> object_hook({'foo': 'bar'}, str.upper, str) | |
| {'foo': 'BAR'} |
| import requests | |
| headers = { | |
| # when web scraping we always want to appear as | |
| # a web browser to prevent being blocked | |
| "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" | |
| } | |
| data = { | |
| # our recipe search term | |
| "searchTerm": "Toast", |
| { | |
| "contexts": [ | |
| "{\"name\":\"toast\",\"paths\":[\"/~asset/bread\"],\"type\":\"PRIMARY\",\"searchType\":\"NORMAL\",\"degreesSeparation\":0,\"cleanedName\":\"toast\",\"popularityFactor\":0,\"taggedContentCount\":2054,\"userToken\":true,\"searchGuess\":false,\"essenceContext\":false,\"matchingCandidate\":false}" | |
| ], | |
| "searchTerm": "toast", | |
| "pn": 14 | |
| } |
| import asyncio | |
| from aiohttp.client import ClientSession | |
| from parsel import Selector | |
| async def get_page(page: int, session: ClientSession): | |
| """This is a little shortcut function that requests specific page of our pagination""" | |
| url = f"https://www.avbuyer.com/aircraft/private-jets/page-{page}" | |
| print(f"requesting {url}") | |
| return await session.get(url) |
| Aggro - Refers to attention from in-game enemies, often relating to the distance at which an enemy will notice the player character and engage in combat, or - in a multiplayer setting - the player being targeted by an enemy. See also: 'Tanking' | |
| ARPG - An acronym for 'action role-playing game', ARPG is a sub-genre of RPG that focuses primarily on combat, exploration and character development. Typically involving lengthy dungeons and tough boss fights, ARPGs are popular with min-max playstyles. | |
| ADS - Short for 'Aim Down Sights', ADS is the action of raising a ranged weapon to eye-level and aiming along the sights. | |
| AoE - Short for 'Area of Effect', AoE refers to attacks which cover a certain area with a damaging effect. | |
| Bots - A bot is a computer-controlled character playing alongside regular players in a multiplayer setting. It may also refer to an inexperienced or poor player, whose ability is no greater than an AI bot. | |
| Backwards compatibilty - The ability of a games console to run software created for prior c |