Content-Length: 467356 | pFad | http://github.com/akrherz/iem/commit/095cc7dd8476081c66d2f5cf05ac460f8a269ab3

F3 address lint · akrherz/iem@095cc7d · GitHub
Skip to content

Commit

Permalink
address lint
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Feb 7, 2023
1 parent fbe45bc commit 095cc7d
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 40 deletions.
2 changes: 1 addition & 1 deletion htdocs/nws/debug_latlon/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$("#thebutton").click(function(){
$("#thebutton").click(() => {
const text = $("#thetext").val();
const title = $("#thetitle").val();
$.post(
Expand Down
26 changes: 13 additions & 13 deletions htdocs/other/asi.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require_once "../../include/forms.php";
require_once "../../include/database.inc.php";
require_once "../../include/imagemaps.php";
require_once "../../include/myview.php";

function download_data($sts, $ets)
{
Expand All @@ -24,24 +25,24 @@ function download_data($sts, $ets)
for ($j = 1; $j < 13; $j++) {
echo sprintf(
"%s,%s,%s,%s,",
$row["ch${j}avg"],
$row["ch${j}sd"],
$row["ch${j}max"],
$row["ch${j}min"]
$row["ch{$j}avg"],
$row["ch{$j}sd"],
$row["ch{$j}max"],
$row["ch{$j}min"]
);
}
echo "\n";
}
} // End of download_data

$syear = isset($_GET["syear"]) ? intval($_GET["syear"]) : date("Y", time() - 86400);
$eyear = isset($_GET["eyear"]) ? intval($_GET["eyear"]) : date("Y", time() - 86400);
$emonth = isset($_GET["emonth"]) ? intval($_GET["emonth"]) : date("m", time());
$eday = isset($_GET["eday"]) ? intval($_GET["eday"]) : date("d", time());
$smonth = isset($_GET["smonth"]) ? intval($_GET["smonth"]) : date("m", time() - 86400);
$sday = isset($_GET["sday"]) ? intval($_GET["sday"]) : date("d", time() - 86400);
$ehour = isset($_GET["ehour"]) ? intval($_GET["ehour"]) : 0;
$shour = isset($_GET["shour"]) ? intval($_GET["shour"]) : 0;
$syear = get_int404("syear", date("Y", time() - 86400));
$eyear = get_int404("eyear", date("Y", time() - 86400));
$emonth = get_int404("emonth", date("m", time()));
$eday = get_int404("eday", date("d", time()));
$smonth = get_int404("smonth", date("m", time() - 86400));
$sday = get_int404("sday", date("d", time() - 86400));
$ehour = get_int404("ehour", 0);
$shour = get_int404("shour", 0);
$station = isset($_REQUEST['station']) ? xssafe($_REQUEST['station']) : 'ISU4003';

$imguri = sprintf(
Expand All @@ -68,7 +69,6 @@ function download_data($sts, $ets)
die();
}
}
include("../../include/myview.php");
$t = new MyView();

$t->title = "Atmospheric Structure Instrumentation";
Expand Down
12 changes: 4 additions & 8 deletions htdocs/plotting/auto/scripts100/p199.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""ISU Soil Moisture Network Daily Plots."""
"""This application generates maps of daily ISU
Soil Moisture Network Data."""
import datetime

import pandas as pd
Expand All @@ -25,12 +26,7 @@

def get_description():
"""Return a dict describing how to call this plotter"""
desc = {}
desc["data"] = True
desc[
"description"
] = """This application generates maps of daily ISU
Soil Moisture Network Data."""
desc = {"description": __doc__, "data": True}
ets = datetime.datetime.now().replace(minute=0)
sts = ets - datetime.timedelta(days=1)
desc["arguments"] = [
Expand Down Expand Up @@ -394,7 +390,7 @@ def plotter(fdict):
title = "ISU Soil Moisture Average Wind Speed [MPH]"
subtitle = "based on available daily summary data"
data, df = plot8(ctx)
elif ctx["opt"] == "9":
else: # 9
title = (
"ISU Soil Moisture Plant Available Soil Water (6-30 inch) [inch]"
)
Expand Down
18 changes: 6 additions & 12 deletions htdocs/plotting/auto/scripts200/p204.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"""Heatmap of daily data."""
"""This app generates a heatmap-like presentation of daily climate data
of your choice. In the case of 'Trailing XX Days', you will want to set
a trailing number of days to evaluate the metric for.
"""
import calendar
import datetime

Expand All @@ -18,16 +21,7 @@

def get_description():
"""Return a dict describing how to call this plotter"""
desc = {}
desc["data"] = True
desc["cache"] = 86400
desc[
"description"
] = """
This app generates a heatmap-like presentation of daily climate data
of your choice. In the case of 'Trailing XX Days', you will want to set
a trailing number of days to evaluate the metric for.
"""
desc = {"description": __doc__, "data": True, "cache": 86400}
today = datetime.date.today()
desc["arguments"] = [
dict(
Expand Down Expand Up @@ -94,7 +88,7 @@ def plotter(fdict):
)
levels = [0, 25, 50, 75, 100, 150, 200, 250, 300]
label = "Percent"
elif ctx["var"] == "daily_high_depart":
else: # daily_high_depart
climo = df[["high", "sday"]].groupby("sday").mean()
df["high_avg"] = df.merge(
climo, left_on="sday", right_index=True, suffixes=("", "_avg")
Expand Down
6 changes: 3 additions & 3 deletions include/network.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class NetworkTable
public array $table;
public $dbconn;

function __construct($a, $force3char = FALSE, $only_online = FALSE)
public function __construct($a, $force3char = FALSE, $only_online = FALSE)
{
$this->table = array();
$ol = ($only_online) ? " and online = 't' " : "";
Expand Down Expand Up @@ -70,7 +70,7 @@ public function loadStation($id)
return true;
}

function do_conversions($id)
public function do_conversions($id)
{
if (!is_null($this->table[$id]["archive_begin"])) {
// can't deal with ancient dates
Expand All @@ -90,7 +90,7 @@ function do_conversions($id)
}
}

function get($id)
public function get($id)
{
return $this->table[$id];
}
Expand Down
6 changes: 3 additions & 3 deletions include/station.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class StationData
public $table;
public $dbconn;

function __construct($a, $n = "")
public function __construct($a, $n = "")
{
$this->table = array();
$this->dbconn = iemdb("mesosite");
Expand Down Expand Up @@ -62,7 +62,7 @@ public function loadStation($id, $n = "")
return true;
}

function do_conversions($id)
public function do_conversions($id)
{
if (!is_null($this->table[$id]["archive_begin"])) {
$this->table[$id]["archive_begin"] = new DateTime($this->table[$id]["archive_begin"]);
Expand All @@ -76,7 +76,7 @@ function do_conversions($id)
}
}

function get($id)
public function get($id)
{
return $this->table[$id];
}
Expand Down

0 comments on commit 095cc7d

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/akrherz/iem/commit/095cc7dd8476081c66d2f5cf05ac460f8a269ab3

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy