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:
        pdate = dateutil.parser.parse(sys.argv[2])
        if not pdate.tzinfo:
            // interpret it locally by default
            pdate = pdate.astimezone()

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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

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: githubharald/SimpleHTR
Commit Name: 617e9e28a7c5ae3892043d79da55dfc86435f56b
Time: 2018-07-24
Author: harald_scheidl@hotmail.com
File Name: src/main.py
Class Name:
Method Name:


Project Name: LCAV/pyroomacoustics
Commit Name: f2e989565ab89af58dff63ab3cf89fe63af38327
Time: 2020-06-02
Author: fakufaku@gmail.com
File Name: examples/raytracing.py
Class Name:
Method Name: