Skip to content

Instantly share code, notes, and snippets.

View neon-ninja's full-sized avatar
🌐
Temporary failure in name resolution (-3)

Nick Young neon-ninja

🌐
Temporary failure in name resolution (-3)
View GitHub Profile
@neon-ninja
neon-ninja / FB_login.py
Created March 5, 2025 06:24
Automating FB login with Selenium, and solving captcha with automatic transcription
#!/usr/bin/env python3
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
import time
import requests
import re
import os
import requests
import time
s = requests.Session()
def login(u,p):
r=s.post("https://secure.zenbu.net.nz/api/login.php", data={ "form_request":"login","form_submit":"login","username":u,"password":p})
print(r)
login("username","password")
@neon-ninja
neon-ninja / batch_download.py
Last active December 21, 2023 01:17
ESRI ImageServer downloader
#!/usr/bin/env python3
import os
from tqdm.auto import tqdm
from tqdm.contrib.concurrent import process_map, thread_map
import json
import requests
import time
url = "https://nrcsgeoservices.sc.egov.usda.gov/arcgis/rest/services/ortho_imagery/marshall_islands_vivid_2023_30cm/ImageServer"
@neon-ninja
neon-ninja / scrape-asa.ipynb
Created September 20, 2023 23:07
scrape ASA
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neon-ninja
neon-ninja / stonks.ipynb
Last active September 12, 2023 02:49
NZX50 close price prediction using RandomForestRegressor
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neon-ninja
neon-ninja / index.html
Created March 24, 2023 03:28
MQTT debug view
<html>
<head>
<title>MQTT debug view</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://unpkg.com/mqtt/dist/mqtt.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
</head>
<body>
@neon-ninja
neon-ninja / get_consistent_extents.ipynb
Created January 5, 2022 03:11
Find the common extent among GeoTIFFs, clip them all to the common extent, reproject to common transform
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neon-ninja
neon-ninja / 2075045235985932.json
Last active October 6, 2021 03:25
Sample facebook-scraper output with comments and reactions
{
"original_request_url": "2075045235985932",
"post_url": "https://facebook.com/story.php?story_fbid=2075045235985932&id=285708024919671",
"post_id": 2075045235985932,
"text": "Overnight at 1:00am AEDT, Super Smash Bros. Ultimate director Masahiro Sakurai will reveal the game's final fighter. The fighter's release date and final Mii Fighter costumes will also be revealed!\n\nWatch here: https://youtu.be/6sFVKXHkxP8",
"post_text": "Overnight at 1:00am AEDT, Super Smash Bros. Ultimate director Masahiro Sakurai will reveal the game's final fighter. The fighter's release date and final Mii Fighter costumes will also be revealed!\n\nWatch here: https://youtu.be/6sFVKXHkxP8",
"shared_text": "",
"time": "2021-10-05 21:22:08",
"timestamp": null,
"image": null,
@neon-ninja
neon-ninja / animated_lines.py
Created May 18, 2021 03:02
Python script to generate a gif animation of random lines
from matplotlib import pyplot as plt
from numpy.random import rand
from matplotlib.collections import LineCollection
from matplotlib import cm
import numpy as np
import imageio
from IPython.display import Image
ims = []
for frame in range(100):
@neon-ninja
neon-ninja / d3_circles.html
Created May 11, 2021 06:31
circle animation
<html>
<head>
<style>
html,
body,
svg {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;