Skip to content

Instantly share code, notes, and snippets.

View r-priyam's full-sized avatar
🐌
As fast as snail

Priyam r-priyam

🐌
As fast as snail
  • India
  • 13:06 (UTC +05:30)
View GitHub Profile
python -c "import urllib.request, json, ssl; ctx = ssl.create_default_context(); ctx.check_hostname = False; ctx.verify_mode = ssl.CERT_NONE; print(urllib.request.urlopen(urllib.request.Request('https://non-prod.alert.ing.net/api/alert', verify=False, data=json.dumps({'alertMessage': 'ALERT TRIGGERED: Test Watch', 'applicationName': '1ec3c30f-5f84-415b1-a635-8c3a83b91ddd', 'itProductId': '1ec3c30f-5f84-415b1-a635-8c3a83b91ddd', 'details': {'emailSubject': 'ALERT TRIGGERED: TestWatch', 'alertname': 'ALERT TRIGGERED: TestWatch'}, 'triggerTime': '2025-01-09T12:00:00Z', 'watchId': 'test-watch-123'}).encode(), headers={'Content-Type': 'application/json'}, method='POST'), context=ctx).read().decode())"
Invoke-RestMethod -Method Post `
-Uri "https://<YOUR_CLUSTER>/api/workflow/35831168-50da-11f0-bb6c-9aabfb2793e8/retry?resumeSubworkflowTasks=true" `
-Headers @{ "Content-Type" = "application/json" }
python -c "import urllib.request,json; print(urllib.request.urlopen(urllib.request.Request('https://alert.ing.net/api/alert/1ec3c30f-5f84-45b1-a635-8c3a83b91ddd',data=json.dumps({'alertMessage':'ALERT TRIGGERED: TestWatch','applicationName':'1ec3c30f-5f84-45b1-a635-8c3a83b91ddd','itProductId':'1ec3c30f-5f84-45b1-a635-8c3a83b91ddd','details':{'emailSubject':'ALERT TRIGGERED: TestWatch','alertname':'ALERT TRIGGERED: TestWatch','recordCount':'10 records','triggerTime':'2025-01-09T12:00:00Z','watchID':'test-watch-123'}}).encode(),headers={'Content-Type':'application/json'},method='POST')).read().decode())"
2025-11-05T05:54:54.2824298Z pex: Executing: PYTHONPATH=/tmp/pants-sandbox-mJ6TZa/.tmp/tmp978iplyk/isolated/0/43f3112a877b0795b184c967ee78002213cf0bb0 /github/home/.cache/pants/named_caches/period_30/python_build_standalone/3.11.13/bin/python3.11 -s -c from __future__ import absolute_import
2025-11-05T05:54:54.2840839Z pex: Executing: PYTHONPATH=/tmp/pants-sandbox-mJ6TZa/.tmp/tmp978iplyk/isolated/0/43f3112a877b0795b184c967ee78002213cf0bb0 /github/home/.cache/nce/4dd2c710a828c8cfff384e0549141016a563a5e153d2819a7225ccc05a1a17c7/cpython-3.11.13+20250612-x86_64-unknown-linux-gnu-install_only.tar.gz/python/bin/python3.11 -s -c from __future__ import absolute_import
2025-11-05T05:54:54.2892447Z pex: Executing: /github/home/.cache/nce/4dd2c710a828c8cfff384e0549141016a563a5e153d2819a7225ccc05a1a17c7/cpython-3.11.13+20250612-x86_64-unknown-linux-gnu-install_only.tar.gz/python/bin/python3.11 -s -E /tmp/pants-sandbox-mJ6TZa/.tmp/tmpwkb19yzb
2025-11-05T05:54:54.2893830Z pex: Executing: /github/home/.cache/pants/named_cac
pex: Searching dependency cache: /github/home/.cache/pants/named_caches/period_30/pex_root/unzipped_pexes/3/dacd8bfb0e00358d1d308386ca6bf95d3c8245ec/.deps: 0.0ms
pex: Vendoring colors from VendorSpec(key='ansicolors', requirement='ansicolors==1.1.8', import_path='ansicolors', rewrite=True, constrain=True, constraints=()) @ /github/home/.cache/pants/named_caches/period_30/pex_root/installed_wheels/2/d32b82be0c0bf312b44d51dac67952dcd17a32f3dac056c99b1b367f9e07fda7/pex-2.68.2-py2.py3-none-any.whl/pex/vendor/_vendored/ansicolors
pex: Vendoring appdirs from VendorSpec(key='appdirs', requirement='appdirs==1.4.4', import_path='appdirs', rewrite=True, constrain=True, constraints=()) @ /github/home/.cache/pants/named_caches/period_30/pex_root/installed_wheels/2/d32b82be0c0bf312b44d51dac67952dcd17a32f3dac056c99b1b367f9e07fda7/pex-2.68.2-py2.py3-none-any.whl/pex/vendor/_vendored/appdirs
pex: Vendoring attr from VendorSpec(key='attrs', requirement='attrs @ git+https://github.com/python-attrs/attrs@947bfb542104209a58728
["/app/.venv/bin/uvicorn", "--host", "0.0.0.0", "--port", "5000", "app.main:app"]

Keybase proof

I hereby claim:

  • I am r-priyam on github.
  • I am priyam (https://keybase.io/priyam) on keybase.
  • I have a public key ASBFd42MVUH0HRoP2JNFzkED-6OKtnsGJKJ48CbN1LD5qgo

To claim this, I am signing this object:

@r-priyam
r-priyam / image.py
Created November 30, 2020 07:49 — forked from scarletcafe/image.py
discord.py rewrite image processing cog example
# basic dependencies
import discord
from discord.ext import commands
# aiohttp should be installed if discord.py is
import aiohttp
# PIL can be installed through
# `pip install -U Pillow`
from PIL import Image, ImageDraw