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
#!/usr/bin/env python | |
""" | |
Find out where Mars is, in the sky at P'diddy Island, PEI, ON, Canada. | |
""" | |
import datetime | |
# ! pip install skyfield | |
from skyfield.api import load, Topos |
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 skyfield.api import Topos, load | |
import socket | |
from time import sleep | |
import re | |
import array as arr | |
#connecting to server | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.connect(('where.satellitesabove.me', 5021)) | |
print("connecting to where.satellitesabove.me:5021") |
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 tkinter import * | |
from skyfield.api import Topos, load | |
import motor | |
ts = load.timescale() | |
#Motor al laser | |
m1 = motor.Motor([18, 22, 24, 26], mode = 3) | |
m1.rpm = 10 | |
#Motor a la base | |
m2 = motor.Motor([17,25,12,16], mode = 3) |
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
# python 3.7 suggested | |
import datetime | |
import time | |
from skyfield.api import load, Topos, EarthSatellite | |
TLE_FILE = "https://celestrak.com/NORAD/elements/active.txt" | |
ISS_NAME = "ISS (ZARYA)" | |
LONGITUDE = -73.9940702 | |
LATITUDE = 40.7546283 |
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 skyfield.api import load | |
from jdutil import * | |
planets = load('de432s.bsp') | |
earth, jupiter = planets['EARTH'], planets['JUPITER BARYCENTER'] | |
ts = load.timescale() | |
t = ts.now() | |
timenow = jd_to_datetime(float(t.tt)) | |
astrometric = earth.at(t).observe(jupiter) | |
ra, dec, distance = astrometric.radec() |
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
#!/usr/bin/env python3 | |
from datetime import datetime, timezone | |
from math import atan, atan2, degrees, floor, pi, radians, sin, sqrt | |
from skyfield.api import earth, JulianDate, now, sun | |
def earth_latlon(x, y, z, time): | |
""" |
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
#!/usr/bin/env python3 | |
import sys | |
from skyfield.api import load, utc | |
from datetime import datetime | |
TS_ZERO = datetime(1970, 1, 1) | |
NAMES = ['朔', '上弦', '望', '下弦'] |
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
# Sentinel 1a position data taken from https://qc.sentinel1.eo.esa.int | |
# POD Precise Orbit Ephemerides AUX_POEORB (only last 366 days) | |
# | |
# S1A_OPER_AUX_POEORB_OPOD_20151028T122426_V20151007T225943_20151009T005943 | |
# | |
# !! Coordinate system unknow, indicates fixed but not which one assume ITRF | |
# | |
# <OSV> | |
# <TAI>TAI=2015-10-08T21:51:09.000000</TAI> | |
# <UTC>UTC=2015-10-08T21:50:33.000000</UTC> |
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
Takes a long time to load project folders running in a VM and the sublime console shows: | |
inotify_add_watch failed: No space left on device (path: /some/project/location/...) | |
https://github.com/google/cadvisor/issues/1581#issuecomment-367616070 | |
sudo cat /proc/sys/fs/inotify/max_user_watches # default is 8192 | |
sudo sysctl fs.inotify.max_user_watches=1048576 # increase to 1048576 | |
https://github.com/google/cadvisor/issues/1581#issuecomment-436405681 |