Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added daily_speedtest #120

Merged
merged 3 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ The Application Developers Guide is the best document to read first.
- Robust Site Survey app with cloud aggregating and reporting via 5g-ready.io
- **app_template_csclient**
- A template for the creation of a new application utilizing the csclient library.
- **cp_shell**
- Web interface for running linux shell commands.
- **cli_sample**
- Includes csterm module that enables access to local CLI to send commands and return output.
- **ipverify_custom_action**
- Create a custom action in a function to be called when an IPverify test status changes.
- **dynamic_app**
- Downloads apps from a self hosted url and install into app_holder app. Overcome limitates with dev_mode and app size limits.
- **cp_shell**
- Web interface for running linux shell commands.
- **cpu_usage**
- Gets cpu and memory usage information from the router every 30 seconds and writes a csv file to a usb stick formatted in fat32.
- **dynamic_app**
- Downloads apps from a self hosted url and install into app_holder app. Overcome limitates with dev_mode and app size limits.
- **daily_speedtest**
- Runs an ookla speedtest daily at configured hours and put results to user defined field (asset_id).
- **ftp_client**
- Creates a file and uploads it to an FTP server.
- **ftp_server**
Expand All @@ -71,6 +71,8 @@ The Application Developers Guide is the best document to read first.
- Demonstrates how to access the gyroscope and accelerometer data on the IBR1700
- **ibr1700_obdII**
- Demonstrates how to access OBD-II PIDs on the IBR1700
- **ipverify_custom_action**
- Create a custom action in a function to be called when an IPverify test status changes.
- **logfile**
- Writes router logs to flash available for download via HTTP/LAN Manager.
- **mosquitto**
Expand Down
208 changes: 208 additions & 0 deletions daily_speedtest/_csv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
# encoding: utf-8
# module _csv
# from (pre-generated)
# by generator 1.147
"""
CSV parsing and writing.

This module provides classes that assist in the reading and writing
of Comma Separated Value (CSV) files, and implements the interface
described by PEP 305. Although many CSV files are simple to parse,
the format is not formally defined by a stable specification and
is subtle enough that parsing lines of a CSV file with something
like line.split(",") is bound to fail. The module supports three
basic APIs: reading, writing, and registration of dialects.


DIALECT REGISTRATION:

Readers and writers support a dialect argument, which is a convenient
handle on a group of settings. When the dialect argument is a string,
it identifies one of the dialects previously registered with the module.
If it is a class or instance, the attributes of the argument are used as
the settings for the reader or writer:

class excel:
delimiter = ','
quotechar = '"'
escapechar = None
doublequote = True
skipinitialspace = False
lineterminator = '\r\n'
quoting = QUOTE_MINIMAL

SETTINGS:

* quotechar - specifies a one-character string to use as the
quoting character. It defaults to '"'.
* delimiter - specifies a one-character string to use as the
field separator. It defaults to ','.
* skipinitialspace - specifies how to interpret whitespace which
immediately follows a delimiter. It defaults to False, which
means that whitespace immediately following a delimiter is part
of the following field.
* lineterminator - specifies the character sequence which should
terminate rows.
* quoting - controls when quotes should be generated by the writer.
It can take on any of the following module constants:

csv.QUOTE_MINIMAL means only when required, for example, when a
field contains either the quotechar or the delimiter
csv.QUOTE_ALL means that quotes are always placed around fields.
csv.QUOTE_NONNUMERIC means that quotes are always placed around
fields which do not parse as integers or floating point
numbers.
csv.QUOTE_NONE means that quotes are never placed around fields.
* escapechar - specifies a one-character string used to escape
the delimiter when quoting is set to QUOTE_NONE.
* doublequote - controls the handling of quotes inside fields. When
True, two consecutive quotes are interpreted as one during read,
and when writing, each quote character embedded in the data is
written as two quotes
"""
# no imports

# Variables with simple values

QUOTE_ALL = 1
QUOTE_MINIMAL = 0
QUOTE_NONE = 3
QUOTE_NONNUMERIC = 2

__version__ = '1.0'


# functions

def field_size_limit(limit=None): # real signature unknown; restored from __doc__
"""
Sets an upper limit on parsed fields.
csv.field_size_limit([limit])

Returns old limit. If limit is not given, no new limit is set and
the old limit is returned
"""
pass


def get_dialect(name): # real signature unknown; restored from __doc__
"""
Return the dialect instance associated with name.
dialect = csv.get_dialect(name)
"""
pass


def list_dialects(): # real signature unknown; restored from __doc__
"""
Return a list of all know dialect names.
names = csv.list_dialects()
"""
pass


def reader(iterable, dialect='excel', *args, **kwargs): # real signature unknown; NOTE: unreliably restored from __doc__
"""
csv_reader = reader(iterable [, dialect='excel']
[optional keyword args])
for row in csv_reader:
process(row)

The "iterable" argument can be any object that returns a line
of input for each iteration, such as a file object or a list. The
optional "dialect" parameter is discussed below. The function
also accepts optional keyword arguments which override settings
provided by the dialect.

The returned object is an iterator. Each iteration returns a row
of the CSV file (which can span multiple input lines).
"""
pass


def register_dialect(name, dialect=None, **fmtparams): # real signature unknown; restored from __doc__
"""
Create a mapping from a string name to a dialect class.
dialect = csv.register_dialect(name[, dialect[, **fmtparams]])
"""
pass


def unregister_dialect(name): # real signature unknown; restored from __doc__
"""
Delete the name/dialect mapping associated with a string name.
csv.unregister_dialect(name)
"""
pass


def writer(fileobj, dialect='excel', *args,
**kwargs): # real signature unknown; NOTE: unreliably restored from __doc__
"""
csv_writer = csv.writer(fileobj [, dialect='excel']
[optional keyword args])
for row in sequence:
csv_writer.writerow(row)

[or]

csv_writer = csv.writer(fileobj [, dialect='excel']
[optional keyword args])
csv_writer.writerows(rows)

The "fileobj" argument can be any object that supports the file API.
"""
pass


# classes

class Dialect(object):
"""
CSV dialect

The Dialect type records CSV parsing and generation options.
"""

def __init__(self, *args, **kwargs): # real signature unknown
pass

@staticmethod # known case of __new__
def __new__(*args, **kwargs): # real signature unknown
""" Create and return a new object. See help(type) for accurate signature. """
pass

delimiter = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

doublequote = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

escapechar = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

lineterminator = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

quotechar = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

quoting = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

skipinitialspace = property(lambda self: object(), lambda self, v: None, lambda self: None) # default

strict = property(lambda self: object(), lambda self, v: None, lambda self: None) # default


class Error(Exception):
# no doc
def __init__(self, *args, **kwargs): # real signature unknown
pass

__weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""list of weak references to the object (if defined)"""


# variables with complex values

_dialects = {}

__loader__ = None # (!) real value is '<_frozen_importlib_external.ExtensionFileLoader object at 0x101941a20>'

__spec__ = None # (!) real value is "ModuleSpec(name='_csv', loader=<_frozen_importlib_external.ExtensionFileLoader object at 0x101941a20>, origin='/opt/buildAgent/system/.persistent_cache/pycharm/pythons4skeletons/python36/lib/python3.6/lib-dynload/_csv.cpython-36m-darwin.so')"

Loading
Loading