automated terminal push

This commit is contained in:
Your Name
2025-02-06 22:21:31 -05:00
parent 4844e81841
commit ca3fe8afdc
13 changed files with 690 additions and 0 deletions

2
.trash/README.md Normal file
View File

@@ -0,0 +1,2 @@
# yankee-fire-control-code

View File

@@ -0,0 +1,37 @@
import requests
## https://www.nylas.com/blog/use-python-requests-module-rest-apis/#how-to-use-python-requests
def callGET(url):
print("enter -> callGET()")
print("param / url / ",url)
params = dict(
origin='Chicago,IL',
destination='Los+Angeles,CA',
waypoints='Joplin,MO|Oklahoma+City,OK',
sensor='false',
url2=url
)
headers = {'Accept': 'application/json'}
print("params", params)
response = requests.post("https://osiris.yankee.valorantdigital.com/channel/monthly/games/success/exists", headers=headers, data=params, params=params)
print("response2", response.json())
def callPOST():
print("enter -> callPOST()")
response = requests.post('https://httpbin.org/post', data = {'key':'value'})
print("response", response.json())
callGET("https://embanet.online")
#callPOST()

42
.trash/jmsclient.py Normal file
View File

@@ -0,0 +1,42 @@
import stomp
import time
import veneno
import fetcher
class MyListener(stomp.ConnectionListener):
def on_message(headers, message):
conn.ack(headers['message-id'])
print("** new message! **")
print(message)
fetcher.fetch(message.body)
def on_error(headers, message):
print('received an error "%s"' % message)
conn.ack(headers['message-id'])
conn = stomp.Connection([('osiris.yankee.valorantdigital.com', 61613)])
conn.set_listener('', MyListener())
conn.connect('admin', 'password', wait=True)
conn.subscribe('/queue/sully-gnome-urls', id=1, ack='client', headers={'activemq.prefetchSize': 10})
print("## notification > connected to JMS server")
while True:
pass
time.sleep(1)
conn.disconnect()

19
.trash/veneno.py Normal file
View File

@@ -0,0 +1,19 @@
# veneno.py
def fetch(x):
print(f"launch -> data fetcher -> url -> {x}")
def eat(x,y):
"""Consumes x and y (pretend eating!).
Args:
x: The first amount to be consumed.
y: The second amount to be consumed.
Returns:
None
"""
print(f"Eating {x} and {y}...")