df00aa16a20b8502a9b4b2ec7783316370f53e18,comet.py,,,#,68
Before Change
if __name__ == "__main__":
if len(sys.argv) < 2:
Usage()
if sys.argv[1] == "-h" or sys.argv[1] == "--help":
Usage()
if len(sys.argv) > 2:
After Change
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Look up a comet and compute its position.")
parser.add_argument("-t", action="store", dest="time",
help="Time (any format dateutil.parser handles)")
parser.add_argument("-c", action="store", dest="coords",
nargs=2, type=float,
help="Observer"s Latitude and longitude (degrees)")
parser.add_argument("-e", action="store", dest="elev", type=float,
help="Observer"s elevation (meters)")
parser.add_argument("cometname",
help="Name (full or partial) of a comet")
args = parser.parse_args(sys.argv[1:])
// print(args)
if args.time:
pdate = dateutil.parser.parse(args.time)
if not pdate.tzinfo:
// interpret it locally by default
pdate = pdate.astimezone()
// skyfield Time seems to handle aware datetimes okay,
// so even though this says utc it will handle the given tzinfo.
t = ts.utc(pdate)
else:
t = ts.now()
if args.coords and args.elev:
args.coords.append(args.elev)
comet_df = comet_by_name(args.cometname)
if comet_df is not None:
print(comet_df["designation"], " ", t.utc_iso())
calc_comet(comet_df, t, args.coords)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances Project Name: akkana/scripts
Commit Name: df00aa16a20b8502a9b4b2ec7783316370f53e18
Time: 2020-07-10
Author: akkana@shallowsky.com
File Name: comet.py
Class Name:
Method Name:
Project Name: akkana/scripts
Commit Name: df00aa16a20b8502a9b4b2ec7783316370f53e18
Time: 2020-07-10
Author: akkana@shallowsky.com
File Name: comet.py
Class Name:
Method Name:
Project Name: RaRe-Technologies/gensim
Commit Name: 6a289fefd72f038c8cc14826f63624950f5de1f8
Time: 2016-07-13
Author: menshikh.iv@gmail.com
File Name: gensim/models/lda_dispatcher.py
Class Name:
Method Name: main
Project Name: pyinstaller/pyinstaller
Commit Name: 2bb844445fc39ea4062164df027280516cd281a2
Time: 2015-10-20
Author: h.goebel@crazy-compilers.com
File Name: PyInstaller/utils/cliutils/grab_version.py
Class Name:
Method Name: run