python_utils.git
2 years agoScale back warnings.warn and add stacklevels= where appropriate.
Scott [Wed, 12 Jan 2022 17:06:29 +0000 (09:06 -0800)]
Scale back warnings.warn and add stacklevels= where appropriate.

2 years agoFix a couple of bugs in executors. Use run_tests.sh as a pre commit
Scott [Tue, 11 Jan 2022 21:41:25 +0000 (13:41 -0800)]
Fix a couple of bugs in executors.  Use run_tests.sh as a pre commit
hook.

2 years agoStart using warnings from stdlib.
Scott [Tue, 11 Jan 2022 21:33:24 +0000 (13:33 -0800)]
Start using warnings from stdlib.

2 years agoFix requirements.txt
Scott [Tue, 11 Jan 2022 05:51:39 +0000 (21:51 -0800)]
Fix requirements.txt

2 years agoAdd multi replace.
Scott [Tue, 11 Jan 2022 05:51:30 +0000 (21:51 -0800)]
Add multi replace.

2 years agoFix a missing import bug.
Scott [Tue, 11 Jan 2022 02:34:19 +0000 (18:34 -0800)]
Fix a missing import bug.

2 years agoMake it work.
Scott [Tue, 11 Jan 2022 01:52:32 +0000 (17:52 -0800)]
Make it work.

2 years agoAdd requirements.txt
Scott [Tue, 11 Jan 2022 01:49:58 +0000 (17:49 -0800)]
Add requirements.txt

2 years agoAdd another doctest.
Scott [Tue, 11 Jan 2022 01:22:08 +0000 (17:22 -0800)]
Add another doctest.

2 years agoAdds some doctests to decorators.
Scott [Mon, 10 Jan 2022 23:31:11 +0000 (15:31 -0800)]
Adds some doctests to decorators.

2 years agoMake rate_limited work and add doctest.
Scott [Mon, 10 Jan 2022 22:57:17 +0000 (14:57 -0800)]
Make rate_limited work and add doctest.

2 years agoUpdate MAC address.
Scott [Mon, 10 Jan 2022 22:56:55 +0000 (14:56 -0800)]
Update MAC address.

2 years agoExperiment with audit events in bootstrap.
Scott [Mon, 10 Jan 2022 17:45:31 +0000 (09:45 -0800)]
Experiment with audit events in bootstrap.

2 years agoMake rate_limited use cvs.
Scott [Mon, 10 Jan 2022 06:15:45 +0000 (22:15 -0800)]
Make rate_limited use cvs.

2 years agoAdd rate limiter decorator.
Scott [Sat, 8 Jan 2022 23:21:25 +0000 (15:21 -0800)]
Add rate limiter decorator.

2 years agoCleanup logging module.
Scott [Sat, 8 Jan 2022 21:01:47 +0000 (13:01 -0800)]
Cleanup logging module.

2 years agoMake logging optionally remove global handlers added by (shitty) pip
Scott [Fri, 7 Jan 2022 19:14:29 +0000 (11:14 -0800)]
Make logging optionally remove global handlers added by (shitty) pip
modules.  Make config optionally halt on unrecognized arguments.
Make profanity filter smarter.

2 years agoA bunch of changes...
Scott [Thu, 6 Jan 2022 20:13:34 +0000 (12:13 -0800)]
A bunch of changes...

3 years agoMove stuff around.
Scott [Mon, 6 Dec 2021 23:43:17 +0000 (15:43 -0800)]
Move stuff around.

3 years agoMake PresenceDetection self-update periodically.
Scott [Mon, 6 Dec 2021 05:43:24 +0000 (21:43 -0800)]
Make PresenceDetection self-update periodically.

3 years agoMake presence detection work from cabin or house and deal with a
Scott [Mon, 6 Dec 2021 04:50:59 +0000 (20:50 -0800)]
Make presence detection work from cabin or house and deal with a
bad VPN link between them better.

3 years agoVarious changes.
Scott [Sun, 5 Dec 2021 05:23:11 +0000 (21:23 -0800)]
Various changes.

3 years agoMake smart futures avoid polling.
Scott Gasch [Fri, 19 Nov 2021 04:39:12 +0000 (20:39 -0800)]
Make smart futures avoid polling.
Much fucking around with the backup strategy in executors.
Tweaks to presence.

3 years agoWaitableState thingy and some stuff in the ML world.
Scott Gasch [Thu, 18 Nov 2021 06:14:37 +0000 (22:14 -0800)]
WaitableState thingy and some stuff in the ML world.

3 years agoBugfixes in executors.
Scott Gasch [Wed, 17 Nov 2021 23:26:43 +0000 (15:26 -0800)]
Bugfixes in executors.

3 years agoMake remote workers die if no longer needed; cleanups in executors.
Scott Gasch [Wed, 17 Nov 2021 22:40:34 +0000 (14:40 -0800)]
Make remote workers die if no longer needed; cleanups in executors.

3 years agoMaking remote training work better.
Scott Gasch [Tue, 16 Nov 2021 00:55:26 +0000 (16:55 -0800)]
Making remote training work better.

3 years agoTighten up the remote executor.
Scott Gasch [Mon, 15 Nov 2021 06:48:04 +0000 (22:48 -0800)]
Tighten up the remote executor.

3 years agoSmall changes to decorators.
Scott Gasch [Sun, 14 Nov 2021 23:46:39 +0000 (15:46 -0800)]
Small changes to decorators.

3 years agoSmall bugfixes; also, add a new machine to the remote executor pool.
Scott Gasch [Sat, 13 Nov 2021 15:06:31 +0000 (07:06 -0800)]
Small bugfixes; also, add a new machine to the remote executor pool.

3 years agoAdd device_utils.py
Scott Gasch [Tue, 2 Nov 2021 03:05:34 +0000 (20:05 -0700)]
Add device_utils.py

3 years agoOverrides + debugging modules / functions in logging.
Scott Gasch [Mon, 1 Nov 2021 21:10:02 +0000 (14:10 -0700)]
Overrides + debugging modules / functions in logging.

3 years agoUgh, a bunch of things. @overrides. --lmodule. Chromecasts. etc...
Scott Gasch [Sun, 31 Oct 2021 20:08:51 +0000 (13:08 -0700)]
Ugh, a bunch of things.  @overrides.  --lmodule.  Chromecasts.  etc...

3 years agoFix Arper, make IP address a property of device
Scott Gasch [Fri, 29 Oct 2021 18:26:45 +0000 (11:26 -0700)]
Fix Arper, make IP address a property of device

3 years agoAdds Arper, cleans up other stuff.
Scott Gasch [Fri, 29 Oct 2021 17:33:07 +0000 (10:33 -0700)]
Adds Arper, cleans up other stuff.

3 years agoTypo.
Scott Gasch [Fri, 29 Oct 2021 06:13:04 +0000 (23:13 -0700)]
Typo.

3 years agoAdd cameras, fix bugs
Scott Gasch [Fri, 29 Oct 2021 04:23:55 +0000 (21:23 -0700)]
Add cameras, fix bugs

3 years agoSmart outlets
Scott Gasch [Fri, 29 Oct 2021 03:50:36 +0000 (20:50 -0700)]
Smart outlets

3 years agoMoving smart lights into smart_home to prepare for adding
Scott Gasch [Thu, 28 Oct 2021 18:51:22 +0000 (11:51 -0700)]
Moving smart lights into smart_home to prepare for adding
outlets and cameras.

3 years agoMove cache location. Also, add doctests for exec_utils.
Scott Gasch [Mon, 25 Oct 2021 22:05:02 +0000 (15:05 -0700)]
Move cache location.  Also, add doctests for exec_utils.

3 years agoSome fixes to the datetime_utils.
Scott Gasch [Mon, 25 Oct 2021 01:06:20 +0000 (18:06 -0700)]
Some fixes to the datetime_utils.

3 years agoAdds site_config; adds Tuya lights. Bugfixes.
Scott Gasch [Sun, 24 Oct 2021 06:49:08 +0000 (23:49 -0700)]
Adds site_config; adds Tuya lights.  Bugfixes.

3 years agoBugfixes.
Scott Gasch [Tue, 19 Oct 2021 23:40:34 +0000 (16:40 -0700)]
Bugfixes.

3 years agoAdds logging in light stuff, minor changes in config/string.
Scott Gasch [Tue, 12 Oct 2021 02:21:19 +0000 (19:21 -0700)]
Adds logging in light stuff, minor changes in config/string.

3 years agoStarting to move towards python3.9
Scott Gasch [Thu, 7 Oct 2021 00:11:52 +0000 (17:11 -0700)]
Starting to move towards python3.9

3 years agoGroups of google lights (kinda hacky, needs a rework), import auditing.
Scott Gasch [Tue, 5 Oct 2021 14:48:09 +0000 (07:48 -0700)]
Groups of google lights (kinda hacky, needs a rework), import auditing.

3 years agochanges
Scott Gasch [Sat, 2 Oct 2021 16:03:31 +0000 (09:03 -0700)]
changes

3 years agoSome binary tree methods to support the unscramble progam's sparsefile
Scott Gasch [Thu, 30 Sep 2021 00:31:06 +0000 (17:31 -0700)]
Some binary tree methods to support the unscramble progam's sparsefile
population.

3 years agoStuff.
Scott Gasch [Wed, 29 Sep 2021 22:40:43 +0000 (15:40 -0700)]
Stuff.

3 years agoAdd tests on bidict. Fix bug in string_utils ngrams.
Scott Gasch [Wed, 29 Sep 2021 18:21:41 +0000 (11:21 -0700)]
Add tests on bidict.  Fix bug in string_utils ngrams.

3 years agoWorkaround likely client bug in letter_compress. Update tests in bst.
Scott Gasch [Wed, 29 Sep 2021 16:03:57 +0000 (09:03 -0700)]
Workaround likely client bug in letter_compress.  Update tests in bst.
Add pip_install.sh.

3 years agoVarious changes
Scott Gasch [Wed, 29 Sep 2021 06:27:51 +0000 (23:27 -0700)]
Various changes

3 years agoMove collections into collect space
Scott Gasch [Mon, 27 Sep 2021 16:06:50 +0000 (09:06 -0700)]
Move collections into collect space

3 years agoCompress small text messages by just restricting the alphabet. Adds bidict.
Scott Gasch [Mon, 27 Sep 2021 15:47:39 +0000 (08:47 -0700)]
Compress small text messages by just restricting the alphabet.  Adds bidict.

3 years agoCached weather data.
Scott Gasch [Sun, 26 Sep 2021 15:28:01 +0000 (08:28 -0700)]
Cached weather data.

3 years agoAdd some classes that use persistent to cache data about the weather
Scott Gasch [Sat, 25 Sep 2021 14:18:30 +0000 (07:18 -0700)]
Add some classes that use persistent to cache data about the weather
in Bellevue, WA.

3 years agoOh my god, I fucking hate pickle, dill, cloudpickle and all that
Scott Gasch [Sat, 25 Sep 2021 04:17:58 +0000 (21:17 -0700)]
Oh my god, I fucking hate pickle, dill, cloudpickle and all that
stuff.  What a total pain in the ass.  I kept getting pickle
complaining about class not really being class and refusing to write
if any other modules were imported between the creation and the save
that I gave up and moved save and load to user defined things.  Maybe
a better design anyway.

3 years agoMake smaller 'reset's
Scott Gasch [Sat, 25 Sep 2021 04:17:16 +0000 (21:17 -0700)]
Make smaller 'reset's

3 years agoTrie repr.
Scott Gasch [Fri, 24 Sep 2021 17:03:18 +0000 (10:03 -0700)]
Trie repr.

3 years agoAdds a trie class.
Scott Gasch [Fri, 24 Sep 2021 05:10:30 +0000 (22:10 -0700)]
Adds a trie class.

3 years agoFixup argparse_utils' doctest and tweak test runner.
Scott Gasch [Thu, 23 Sep 2021 16:40:48 +0000 (09:40 -0700)]
Fixup argparse_utils' doctest and tweak test runner.

3 years agoFixup test runner.
Scott Gasch [Thu, 23 Sep 2021 15:31:49 +0000 (08:31 -0700)]
Fixup test runner.

3 years agoVarious little changes. Naming. Durations as arguments.
Scott Gasch [Thu, 23 Sep 2021 00:37:17 +0000 (17:37 -0700)]
Various little changes.  Naming.  Durations as arguments.

3 years agoUpdated docs.
Scott Gasch [Wed, 22 Sep 2021 21:25:16 +0000 (14:25 -0700)]
Updated docs.

3 years agoImprove persistent after actually using it.
Scott Gasch [Wed, 22 Sep 2021 20:40:41 +0000 (13:40 -0700)]
Improve persistent after actually using it.

3 years agoPersistent state.
Scott Gasch [Wed, 22 Sep 2021 01:25:50 +0000 (18:25 -0700)]
Persistent state.

3 years agoDedup a list w/ a set.
Scott Gasch [Wed, 22 Sep 2021 01:25:17 +0000 (18:25 -0700)]
Dedup a list w/ a set.

3 years agoPersisted singleton
Scott Gasch [Mon, 20 Sep 2021 05:13:47 +0000 (22:13 -0700)]
Persisted singleton

3 years agoPersistent state
Scott Gasch [Mon, 20 Sep 2021 00:45:04 +0000 (17:45 -0700)]
Persistent state

3 years agoMost/least common item in a list.
Scott Gasch [Sun, 19 Sep 2021 01:12:26 +0000 (18:12 -0700)]
Most/least common item in a list.

3 years agoA very important change to docs.
Scott Gasch [Thu, 16 Sep 2021 15:48:06 +0000 (08:48 -0700)]
A very important change to docs.

3 years agoLogging + documentation.
Scott Gasch [Wed, 15 Sep 2021 23:08:50 +0000 (16:08 -0700)]
Logging + documentation.

3 years agoAdding doctests. Also added a logging filter.
Scott Gasch [Wed, 15 Sep 2021 16:32:08 +0000 (09:32 -0700)]
Adding doctests.  Also added a logging filter.

3 years agoAdding more tests, working on the test harness.
Scott Gasch [Fri, 10 Sep 2021 20:23:31 +0000 (13:23 -0700)]
Adding more tests, working on the test harness.

3 years agoUpdate tests / test harness.
Scott Gasch [Thu, 9 Sep 2021 23:42:13 +0000 (16:42 -0700)]
Update tests / test harness.

3 years agoAdd doctests to some of this stuff.
Scott Gasch [Thu, 9 Sep 2021 06:29:05 +0000 (23:29 -0700)]
Add doctests to some of this stuff.

3 years agoVarious changes.
Scott Gasch [Wed, 8 Sep 2021 05:20:40 +0000 (22:20 -0700)]
Various changes.

3 years agoMake config_loadfile augment cmdline instead of klobbering.
Scott Gasch [Fri, 6 Aug 2021 18:30:28 +0000 (11:30 -0700)]
Make config_loadfile augment cmdline instead of klobbering.

3 years agoGet rid of blacklist/whitelist; use blocklist/allowlist instead.
Scott Gasch [Fri, 6 Aug 2021 18:20:14 +0000 (11:20 -0700)]
Get rid of blacklist/whitelist; use blocklist/allowlist instead.

3 years agoMake loadfile work.
Scott Gasch [Fri, 6 Aug 2021 18:19:48 +0000 (11:19 -0700)]
Make loadfile work.

3 years agoAdds profanity filter, fixes bugs.
Scott Gasch [Thu, 5 Aug 2021 21:56:34 +0000 (14:56 -0700)]
Adds profanity filter, fixes bugs.

3 years agoLockfile custom command, fixup minor things.
Scott Gasch [Thu, 29 Jul 2021 16:11:05 +0000 (09:11 -0700)]
Lockfile custom command, fixup minor things.

3 years agoMoney, Rate, CentCount and a bunch of bugfixes.
Scott Gasch [Thu, 29 Jul 2021 05:13:43 +0000 (22:13 -0700)]
Money, Rate, CentCount and a bunch of bugfixes.

3 years agoRecord streams.
Scott Gasch [Sat, 17 Jul 2021 21:47:01 +0000 (14:47 -0700)]
Record streams.

3 years agoUpdate ignore
Scott Gasch [Sat, 17 Jul 2021 04:45:30 +0000 (21:45 -0700)]
Update ignore

3 years agoVarious
Scott Gasch [Sat, 17 Jul 2021 04:43:44 +0000 (21:43 -0700)]
Various

3 years agoRename timer; add a test for OutputContext.
Scott Gasch [Sat, 17 Jul 2021 04:43:11 +0000 (21:43 -0700)]
Rename timer; add a test for OutputContext.

3 years agoRandom changes.
Scott Gasch [Tue, 13 Jul 2021 03:52:49 +0000 (20:52 -0700)]
Random changes.

3 years agoRandom cleanups and type safety. Created ml subdir.
Scott Gasch [Sun, 11 Jul 2021 17:16:07 +0000 (10:16 -0700)]
Random cleanups and type safety.  Created ml subdir.

3 years agoScript to run tests.
Scott Gasch [Sat, 10 Jul 2021 01:31:37 +0000 (18:31 -0700)]
Script to run tests.

3 years agoACL uses enums, some more tests, other stuff.
Scott Gasch [Sat, 10 Jul 2021 01:31:02 +0000 (18:31 -0700)]
ACL uses enums, some more tests, other stuff.

3 years agoReduce import scopes, remove cycles.
Scott Gasch [Fri, 9 Jul 2021 05:25:12 +0000 (22:25 -0700)]
Reduce import scopes, remove cycles.

3 years agoRename simple_acl -> acl
Scott Gasch [Fri, 9 Jul 2021 03:08:22 +0000 (20:08 -0700)]
Rename simple_acl -> acl

3 years agoClean up ACLs
Scott Gasch [Fri, 9 Jul 2021 03:05:29 +0000 (20:05 -0700)]
Clean up ACLs

3 years agoLots of changes.
Scott Gasch [Fri, 9 Jul 2021 02:44:27 +0000 (19:44 -0700)]
Lots of changes.

3 years agoTeach python logging formatter to use %f in the format string.
Scott Gasch [Thu, 29 Apr 2021 17:34:32 +0000 (10:34 -0700)]
Teach python logging formatter to use %f in the format string.

3 years agoUse ValueError, not Exception.
Scott Gasch [Sat, 24 Apr 2021 00:17:37 +0000 (17:17 -0700)]
Use ValueError, not Exception.

3 years agoColumnify text.
Scott Gasch [Sat, 24 Apr 2021 00:17:14 +0000 (17:17 -0700)]
Columnify text.

3 years agoRename a flag.
Scott Gasch [Sat, 24 Apr 2021 00:17:02 +0000 (17:17 -0700)]
Rename a flag.

3 years agoMinor editing.
Scott Gasch [Sat, 24 Apr 2021 00:16:39 +0000 (17:16 -0700)]
Minor editing.