Skip to content

Instantly share code, notes, and snippets.

View scivision's full-sized avatar
💭
I will be slow to respond.

scivision

💭
I will be slow to respond.
View GitHub Profile
@scivision
scivision / Readme.md
Last active December 17, 2025 19:09 — forked from fopina/portquiz.py
portquiz.net concurrent Python asyncio port connectivity tester

Check outbound port connectivity using portquiz.net and Python

Demonstrates use of concurrent.futures.ThreadPoolExecutor and asyncio.Semaphore in separate examples to check outbound port connectivity.

In both examples, the maximum number of concurrent connections is limited to 5 (user option). This examples shows that Asyncio using

@scivision
scivision / sunriseSunset.py
Last active October 25, 2024 04:54 — forked from meresmclr/pyephem_sunrise_sunset.py
Python example of computing sunrise/sunset using PyEphem
import ephem
import datetime
Boston=ephem.Observer()
Boston.lat='42.3462'
Boston.lon='-71.0978'
Boston.date = datetime.datetime.now()
# %% these parameters are for super-precise estimates, not necessary.
Boston.elevation = 3 # meters
Boston.pressure = 1010 # millibar