View AAInflight.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import time | |
from geopy.distance import geodesic | |
last_coords = None | |
speed = None | |
time_btwn_change = 1 | |
check_freq = 10 | |
#https://server.ad.logic-prod.viasat.io/afr.php?zoneid=95¶meters=%7B%22origin%22:%22KMCO%22,%22destination%22:%22KDFW%22%7D&fid=N132AN-KMCO-KDFW-2022-03-05T01:56:12Z&fleetType=&isUSDomestic=true&guid=6f3003e9-9c27-11ec-927e-06df78a0305b&subtag=&source=https:%2F%2Fwww.aainflight.com%2F&origin=https:%2F%2Fwww.aainflight.com&li=0 | |
#https://www.aainflight.com/iptv/channelList | |
#https://www.aainflight.com/iptv/programGuide/grid?channelId=12%2C13%2C14%2C15%2C16%2C17%2C19%2C24%2C26%2C27%2C34%2C35&startDateTime=20220305T0300Z&endDateTime=20220305T0700Z |
View nostr_relays.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL | FAILS | |
---|---|---|
wss://nostr.mutinywallet.com | 0 | |
wss://relay.snort.social | 0 | |
wss://nostr.wine | 0 | |
wss://nos.lol | 0 | |
wss://relay.damus.io | 0 |
View aircraft_type_fuel_consumption_rate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"EA50": { | |
"name": "Eclipse 550", | |
"galph": 76, | |
"category": "VLJ" | |
}, | |
"LJ31": { | |
"name": "Learjet 31", | |
"galph": 202, | |
"category": "Light" |
View VirginAtlanticIFELogger.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests, json, time | |
from datetime import datetime | |
l_flight = {'info': {}, 'updates': []} | |
log_keys = ['groundSpeedKnots', | |
'headWindSpeedKnots', | |
'mach', | |
'pitch', | |
'roll', | |
'airSpeedKnots', | |
'altitudeFeet', |
View VIR136.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"departBaggageId": "MCO", | |
"departureId": "KMCO", | |
"departureLat": 28.429443359375, | |
"departureLon": -81.3088912963867, | |
"destBaggageId": "LHR", | |
"destinationId": "EGLL", | |
"destinationLat": 51.4667015075684, | |
"destinationLon": -0.449999988079071, |
View nostr_post.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import ssl | |
import time | |
from nostr.event import Event | |
from nostr.relay_manager import RelayManager | |
from nostr.message_type import ClientMessageType | |
from nostr.key import PrivateKey | |
def nostr_post(note, private_key, image_url=None): | |
if image_url: |
View s3_upload.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
def upload(file_name, bucket, aws_access_key, aws_access_key_sec): | |
s3 = boto3.client('s3', aws_access_key_id=aws_access_key, aws_secret_access_key=aws_access_key_sec) | |
s3.upload_file(file_name, bucket, file_name) | |
url = f"https://{bucket}.s3.amazonaws.com/{file_name}" | |
return url |
View nostr_upload_file.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def nostr_build_upload(file_name): | |
"""Uploads an image/video to nostr build and returns the URL of it.""" | |
import requests | |
url = 'https://nostr.build/api/upload/ios.php' | |
with open(file_name, 'rb') as f: | |
files = {'fileToUpload': f} | |
data = {'submit': 'Upload'} | |
response = requests.post(url, files=files, data=data) |
View flask_files.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, send_from_directory | |
from werkzeug.utils import secure_filename | |
import os | |
import time | |
import threading | |
app = Flask(__name__) | |
# Set the upload folder and allowed extensions | |
app.config['UPLOAD_FOLDER'] = 'uploads' |
View GoogleMapNearestAirport.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Scraped this for airports.dat from https://openflights.org/data.html use haversine formula to calculate distance from each airport, lowest is closest. | |
#Or use https://rapidapi.com/sujayvsarma/api/ourairport-data-search?endpoint=apiendpoint_157e1886-2798-46cf-83e6-b71c2cb76273 from https://ourairports.com/data/ | |
import googlemaps | |
import json | |
import configparser | |
config = configparser.ConfigParser() | |
config.read('config.ini') | |
def getAirport(rank_by, latitude, longitude): | |
nrby_key = config.get('GOOGLE', 'NEARBYSEARCHKEY') |
NewerOlder