This file contains hidden or 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 numpy as np | |
| import datetime | |
| import re | |
| from dataclasses import dataclass | |
| def point_to_str(point): | |
| hex = f"{point & 0xFFFFFF:06x}" | |
| hex = ("~" + hex) if (point & 0x1000000) else hex | |
| return hex |
This file contains hidden or 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 argparse | |
| import datetime | |
| import urllib3 | |
| import os | |
| from ratelimit import limits, sleep_and_retry | |
| from tqdm import tqdm | |
| import random | |
| import time | |
| domain = "globe.adsbexchange.com" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 pyaudio | |
| import audioop | |
| p = pyaudio.PyAudio() | |
| stream = p.open(format=pyaudio.paInt16, | |
| channels=1, | |
| rate=44100, | |
| input=True, | |
| frames_per_buffer=1024) |
This file contains hidden or 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 google.cloud import speech | |
| import argparse | |
| import time | |
| from daily import Daily, CallClient | |
| SAMPLE_RATE = 44100 | |
| CHUNK_COUNT = 10 | |
| FRAME_COUNT = CHUNK_COUNT * SAMPLE_RATE // 100 | |
This file contains hidden or 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
| const WebSocket = require("ws"); | |
| const express = require("express"); | |
| const app = express(); | |
| const server = require("http").createServer(app); | |
| const wss = new WebSocket.Server({ server }); | |
| const path = require("path"); | |
| const fs = require("fs"); | |
| require("dotenv").config(); |
This file contains hidden or 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 os | |
| import argparse | |
| import datetime | |
| import time | |
| parser = argparse.ArgumentParser( | |
| description='Download historical data from ADS-B Exchange.') | |
| parser.add_argument('-i', '--icao', default='icao.txt', type=str, | |
| help='Newline delimited text file of ICAO hex codes.') |
This file contains hidden or 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
| #!/bin/bash | |
| URL=$1 | |
| LAST_PAGE="cache.html" | |
| while true; do | |
| curl -s "$URL" > "$LAST_PAGE" | |
| echo -n "$(date) - $(stat -f "%z" "$LAST_PAGE") - " | |
| openssl md5 "$LAST_PAGE" | cut -d' ' -f2 | |
| if ! diff -q "$LAST_PAGE" "$LAST_PAGE.old" > /dev/null; then |
This file contains hidden or 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 pandas as pd | |
| from tqdm import tqdm | |
| from bs4 import BeautifulSoup | |
| import json | |
| import requests | |
| from itertools import count | |
| from joblib import Parallel, delayed | |
| metadata = [] |