code
stringlengths
3
6.57k
BeautifulSoup(resp, "html5lib")
html.find("pre")
re.findall(r'([+-][0-9]+)
int(point[0])
int(point[0])
int(point[0])
int(point[0])
int(point[1])
int(point[1])
int(point[1])
int(point[1])
return (maxRa - minRa, maxDec - minDec)
Planet()
altiude (otherwise we can't observe the planet)
object (below can't be seen due to horizon or clouds)
motion (speed = "/min)
discarded (if at all)
__init__(self, info)
R.A. (J2000)
self.line.split()
time.mktime(datetime.datetime.strptime(self.date, "%Y %m %d %H%M")
timetuple()
float(parts[14])
object (above horizon)
float(parts[15])
float(parts[16])
float(parts[18])
float(parts[11])
to (low)
self.getEffectiveMagnitude()
float(parts[12])
needed (in minutes)
self.getObservationTime()
pdb.set_trace()
logging.warning('Magnitude vs Effective Magnitude: ' + str(self.magnitude)
str(self.effMagnitude)
isValid(self)
getEffectiveMagnitude(self)
getObservationTime(self)
round(10 + (self.effMagnitude - 18)
secondsFromNowPlus600(self)
from (Now + 600 seconds)
time.mktime(datetime.datetime.utcnow()
timetuple()
math.fabs(self.dateUnix - currentTimePlus600)
updateLineFromData(self)
self.line.split(' ')
datetime.datetime.fromtimestamp(self.dateUnix)
strftime("%Y")
datetime.datetime.fromtimestamp(self.dateUnix)
strftime("%m")
datetime.datetime.fromtimestamp(self.dateUnix)
strftime("%d")
datetime.datetime.fromtimestamp(self.dateUnix)
strftime("%H%M")
str(round(self.azimuth)
zfill(3)
str(round(self.alt)
else ('+' + str(round(self.alt)
join(line)
__init__(self, planets)
pdb.set_trace()
math.radians(planet.currentInterpolatedEphemeride.azimuth + 180)
append(-(1000 * radius * math.sin(angle)
append(-(1000 * radius * math.cos(angle)
renderPlanets.append(renderDict)
Environment(loader=FileSystemLoader('.')
env.get_template('skymap.template')
template.render({"params": renderPlanets})
open('skymap.html', 'w')
f.write(output)
datetime.datetime.utcnow()
datetime.timedelta(hours=11)
time.mktime((observationDate.replace(hour=0, minute=0, second=0, microsecond=0)
datetime.timedelta(hours=35)
timetuple()
__init__(self)
requests_cache.install_cache('reqeusts-cache', allowable_methods=('GET', 'POST')
self.setInitParams()
self.getData()
self.writeToFile()
Map(self.planets)
print('\nFirst run completed successfully! Now go, play! Make something big!')
pdb.set_trace()
print("\n=============================================================")
self.getData()
self.writeToFile()
Map(self.planets)
time.sleep(300)
setInitParams(self)
input('Continuous observation True/False (' + str(self.repeatMode)
re.fullmatch(r'(True)
print('Continuous observation: ' + str(self.repeatMode)
input('Minimum score (' + str(Planet.minScore)
minScore.isdigit()
int(minScore)
print('Minimum score: ' + str(Planet.minScore)
input('Minimum efective magnitude (' + str(Planet.minMagnitude)
re.fullmatch(r'[+-]?[0-9]+\.?[0-9]*', minMagnitude)
float(minMagnitude)