text string | repo string | path string | language string | hash string | score float64 | stars int64 |
|---|---|---|---|---|---|---|
"""
Core processing pipeline — runs for every incoming PDF.
Called by both the file watcher (auto mode) and the CLI process command.
"""
import hashlib
import sqlite3
from pathlib import Path
from typing import Iterable
from .database import document_exists, document_exists_by_hash, insert_document, update_filing
from... | amitrke/docorganizer | docorg/processor.py | .py | 1ffb7fc16c29e999 | 7 | 0 |
from __future__ import annotations
from pathlib import Path
THUMBNAIL_WIDTH = 240
def thumbnail_path(doc_id: int, cfg: dict) -> Path:
return Path(cfg["paths"]["documents"]) / ".thumbnails" / f"{doc_id}.jpg"
def generate_thumbnail(pdf_path: str | Path, dest_path: str | Path, *, max_width: int = THUMBNAIL_WIDTH... | amitrke/docorganizer | docorg/thumbnail.py | .py | 054c81a2eb7e8352 | 7 | 0 |
from typing import List
from . import ZBConfidence, ZBApiException
from ._zb_response import ZBResponse
from .zb_guess_format_response import ZBDomainFormat
class ZBFindDomainResponse(ZBResponse):
"""This is the response for the find_domain request."""
domain: str = None
"""The domain that was used or f... | zerobounce/zero-bounce-python-sdk-setup | src/zerobouncesdk/zb_find_domain_response.py | .py | cbf9cd30ba507ee2 | 7.3 | 3 |
from . import ZBConfidence
from ._zb_response import ZBResponse
class ZBFindEmailFormatResponse(ZBResponse):
"""This is the response for the find_email_format request."""
email: str = None
"""The guessed email address."""
email_confidence: ZBConfidence = None
"""The confidence level for the gues... | zerobounce/zero-bounce-python-sdk-setup | src/zerobouncesdk/zb_find_email_format_response.py | .py | e43eace0bafcf724 | 7.3 | 3 |
from datetime import date, datetime
from ._zb_response import ZBResponse
class ZBGetApiUsageResponse(ZBResponse):
"""This is the response for the GET /apiusage request."""
total: int = 0
"""Total number of times the API has been called"""
status_valid: int = 0
"""Total valid email addresses ret... | zerobounce/zero-bounce-python-sdk-setup | src/zerobouncesdk/zb_get_api_usage_response.py | .py | 59984ff1507017e0 | 7.3 | 3 |
from typing import List
from . import (
ZBConfidence,
ZBApiException,
ZBValidateStatus,
ZBValidateSubStatus,
)
from ._zb_response import ZBResponse
from ._zb_utils import safe_enum_convert
class ZBDomainFormat(ZBResponse):
"""This represents how a domain may format its emails
(and how likely ... | zerobounce/zero-bounce-python-sdk-setup | src/zerobouncesdk/zb_guess_format_response.py | .py | 179cd43038dc2cf0 | 7.3 | 3 |
from typing import List
from ._zb_response import ZBResponse
from .zb_validate_response import ZBValidateResponse
class ZBValidateBatchEmail(ZBValidateResponse):
pass
class ZBValidateBatchError(ZBResponse):
error: str = None
email_address: str = None
class ZBValidateBatchResponse(ZBResponse):
""... | zerobounce/zero-bounce-python-sdk-setup | src/zerobouncesdk/zb_validate_batch_response.py | .py | df5a696b6e381a51 | 7.3 | 3 |
from datetime import datetime
from . import ZBValidateStatus, ZBValidateSubStatus
from ._zb_response import ZBResponse
from ._zb_utils import safe_enum_convert
class ZBValidateResponse(ZBResponse):
"""This is the response for the GET /validate request."""
address: str = None
"""The email address you are... | zerobounce/zero-bounce-python-sdk-setup | src/zerobouncesdk/zb_validate_response.py | .py | 598d6e4051c7b5a9 | 7.3 | 3 |
"""
Integration tests for ZeroBounce SDK.
These tests make real API calls and require a valid API key.
To run these tests, set the ZEROBOUNCE_API_KEY environment variable:
export ZEROBOUNCE_API_KEY="your-api-key-here"
python -m unittest tests.zero_bounce_integration_test
"""
import os
import unittest
from unit... | zerobounce/zero-bounce-python-sdk-setup | tests/zero_bounce_integration_test.py | .py | 06a7990e54db62c1 | 7.8 | 3 |
import re
from asyncio import StreamReader, StreamWriter
from . import get_logger
from typing import TYPE_CHECKING, Dict
from .auth import AuthStorage, AuthRequest
from .exceptions import CommandError, InvalidCommandError, UnknownCommandError
if TYPE_CHECKING:
from masterserver import MasterServer
from mast... | TheAssassin/python-masterserver | masterserver/client_handler.py | .py | 62a5b07a0519979a | 7.15 | 1 |
import asyncio
import itertools
import sys
from asyncio import StreamReader, StreamWriter, Lock, AbstractServer, Task
from ipaddress import IPv4Address, AddressValueError
from typing import List, Tuple, Union, Set
from . import get_logger
from .client_handler import ClientHandler
from .parsed_query_reply import Parsed... | TheAssassin/python-masterserver | masterserver/masterserver.py | .py | 0c156170cd213a9f | 7.15 | 1 |
"""Unit tests for functions used in Robot Framework Historic Parser parserargs"""
import sys
import unittest
from unittest.mock import patch
from robotframework_historic_parser.parserargs import parse_options, main
class TestRunner(unittest.TestCase):
"""Unit Tests for parserargs.py"""
def test_host(self):
... | Accruent/robotframework-historic-parser | test/parserargs_test.py | .py | 4018497de5f90ee5 | 7.5 | 0 |
# Copyright 2018 – present The UBC EOAS MOAD Group
# and The University of British Columbia
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
#... | UBC-MOAD/moad_tools | moad_tools/geo_tools.py | .py | 5a6b9fe9861b5a59 | 7.15 | 1 |
# Copyright 2018 – present The UBC EOAS MOAD Group
# and The University of British Columbia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
... | UBC-MOAD/moad_tools | moad_tools/midoss/geotiff_watermask.py | .py | 3d9dec2f2beaff45 | 7.15 | 1 |
# Copyright 2018 – present The UBC EOAS MOAD Group
# and The University of British Columbia
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
#... | UBC-MOAD/moad_tools | moad_tools/midoss/hdf5_to_netcdf4.py | .py | 4ab4bf0a747b2987 | 7.15 | 1 |
# Copyright 2018 – present The UBC EOAS MOAD Group
# and The University of British Columbia
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
#... | UBC-MOAD/moad_tools | tests/midoss/test_geotiff_watermask.py | .py | d7fccc6ea9b7d8c4 | 7.65 | 1 |
# Copyright 2018 – present The UBC EOAS MOAD Group
# and The University of British Columbia
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
#... | UBC-MOAD/moad_tools | tests/midoss/test_hdf5_to_netcdf4.py | .py | b6aa70699af09986 | 7.65 | 1 |
# Copyright 2018 – present The UBC EOAS MOAD Group
# and The University of British Columbia
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
#... | UBC-MOAD/moad_tools | tests/test_observations.py | .py | 3bb1956200f4017f | 7.65 | 1 |
import hashlib
import hmac
import json
import os
import re
import urllib.parse
from typing import Any, Dict
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
slack_signing_secret = bytes(os.environ["SLACK_SIGNING_SECRET"], "utf-8")
api_key = os.environ["I... | vote/i90bot | app/shorten.py | .py | 6e2e69c62987d6c8 | 7.15 | 1 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('ldfslp',)
tides= ('lateral',)
surface=('surface.ops',)
for run_id,tide_id,surfa... | SalishSeaCast/SS-run-sets | SalishSea/merge-tests/merge2015/runs_dec2012.py | .py | 5a13399a3c870e8b | 7.74 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('constant_diff_rivers',)
tides= ('lateral',)
surface=('surface.orcinus',)
dynami... | SalishSeaCast/SS-run-sets | SalishSea/merge-tests/merge2015/runs_dec2012_orcinus.py | .py | 485526588f73049e | 7.74 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['dwr_bbl', 'dw... | SalishSeaCast/SS-run-sets | SalishSea/nancy/dwr_bbl/runs.py | .py | 9a18b5e443169247 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['dwr_corrected... | SalishSeaCast/SS-run-sets | SalishSea/nancy/dwr_new_bcs/runs.py | .py | 9b1813f833b98669 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['dwr_base_apr'... | SalishSeaCast/SS-run-sets | SalishSea/nancy/dwr_new_bcs/runs_april.py | .py | 44fcdb54c5993560 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = [ 'dwr_base_apr... | SalishSeaCast/SS-run-sets | SalishSea/nancy/dwr_new_bcs/runs_april_restart.py | .py | ef4f8551edf2fd77 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['dwr_base_enst... | SalishSeaCast/SS-run-sets | SalishSea/nancy/dwr_new_bcs/runs_enstr.py | .py | 8c8a23e8ae61289b | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['test1d',]
laterals = ['namelist.lateral.live_ocean_1d',]
for run_id, lateral in zip(run_id... | SalishSeaCast/SS-run-sets | SalishSea/nancy/live_ocean/script_run_1d.py | .py | bf69d787cc56e4c2 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_ids = ['base',]# 'live_ocean_test',]
laterals = ['namelist.lateral',]#'namelist.lateral.live_ocean',]
for run_id, lateral in zip(run_ids,... | SalishSeaCast/SS-run-sets | SalishSea/nancy/live_ocean/script_run_restart.py | .py | 504ba6817ce57450 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['base',] #'live_ocean_test', 'base',]
laterals = ['namelist.lateral',]#namelist.lateral.live_oce... | SalishSeaCast/SS-run-sets | SalishSea/nancy/live_ocean/script_runs.py | .py | 4e357c5483e1dbf1 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['new_bcs_jun9', 'all_improve',]
dynamics = ['namelist.dynamics','namelist.dynamics.holl',]
f... | SalishSeaCast/SS-run-sets | SalishSea/nancy/mixing_paper/script_run_early.py | .py | ecc57ed778dcb5e4 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_ids = ['new_bcs_jun9', 'all_improve',]
dynamics = ['namelist.dynamics','namelist.dynamics.holl',]
for run_id, dynamic in zip(run_ids, dyn... | SalishSeaCast/SS-run-sets | SalishSea/nancy/mixing_paper/script_run_restart.py | .py | 4ee169c89f57d85f | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = [ 'kw', 'base_jul_10s',]
verticals = ['namelist.vertical.kw', 'namelist.vertical',]
for run_i... | SalishSeaCast/SS-run-sets | SalishSea/nancy/mixing_paper/script_run_vertical.py | .py | 9cb2e8e0090002e2 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['dwr_base_noTEOS3',]
for run_id in run_ids:
do_run(run_id, run_desc)
def do_run(run_id... | SalishSeaCast/SS-run-sets | SalishSea/nancy/mixing_paper/script_runs.py | .py | 94e4747ce7d21f98 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['base_jul9_30s',]
for run_id in run_ids:
do_run(run_id, run_desc)
def do_run(run_id, r... | SalishSeaCast/SS-run-sets | SalishSea/nancy/mixing_paper/script_runs_jul.py | .py | fc37e9fce340f206 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['enst', 'ubs',]
dynamics = ['namelist.dynamics.enst','namelist.dynamics.ubs',]
for run_id,... | SalishSeaCast/SS-run-sets | SalishSea/nancy/mixing_paper/script_runs_momentum.py | .py | 08d7bad091952e63 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['spinup_holl','spinup_base',]
verticals = ['namelist.vertical', 'namelist_vertical']
for r... | SalishSeaCast/SS-run-sets | SalishSea/nancy/mixing_paper/script_runs_spinup.py | .py | d912f513662b117d | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['holl_biharm',]
for run_id in run_ids:
do_run(run_id, run_desc)
def do_run(run_id, run... | SalishSeaCast/SS-run-sets | SalishSea/nancy/other_mixing/script_runs_jul.py | .py | 0bdc989683d70d7b | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['dwr_kw',]
... | SalishSeaCast/SS-run-sets | SalishSea/nancy/script_runs_dwr.py | .py | f6b6108293bddf57 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['bathy10', 'bathy2', 'bathy2_nowinds', 'bathy6', 'bathy9']
surfaces = ['mynamelist.surface.bath... | SalishSeaCast/SS-run-sets | SalishSea/nancy/tides/bathy_mods/script_runs_bathy_mods.py | .py | cac6b1b77bd72232 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_ids = ['visc1e-4', 'visc1e-5', 'visc1e-6']
dynamics= ['namelist.dynamics', 'namelist.dynamics.visc5', ... | SalishSeaCast/SS-run-sets | SalishSea/nancy/tides/script_runs_viscosity.py | .py | 2d2025040b83072e | 7.24 | 2 |
# Copyright 2017 – present by The Salish Sea NEMO Project and
# The University of British Columbia
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-... | SalishSeaCast/SS-run-sets | SalishSea/nemo3.6/hindcast/make_ss_hindcast.py | .py | e1066f546c152930 | 7.24 | 2 |
# Copyright 2017 – present by The Salish Sea NEMO Project and
# The University of British Columbia
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-... | SalishSeaCast/SS-run-sets | SalishSea/nemo3.6/hindcast/update_ss_hindcast.py | .py | b1d6aebe2db35ab8 | 7.24 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('all_forcing', 'ssh_only')
tides= ('lateral', 'lateral')
surface=('surface','surfac... | SalishSeaCast/SS-run-sets | SalishSea/storm-surges/new_config/runs_dec2006.py | .py | 27f2ec54d4b8c02f | 7.24 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_id = '30min'
iodefs= 'iodef_30min.xml'
run_desc = base_run_description(run_id)
do_run(run_id, run_desc, iodefs)
... | SalishSeaCast/SS-run-sets | SalishSea/storm-surges/new_config/runs_dec2006_freq.py | .py | b7267fa11750aa63 | 7.24 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
runs = ('all_forcing','ssh_only')
tides= ('lateral', 'lateral')
surface=('surface','surface.nosurge')
for run_id,tide_id,surfa... | SalishSeaCast/SS-run-sets | SalishSea/storm-surges/new_config/runs_dec2006_restart.py | .py | 6cd90d6db5bd92e3 | 7.24 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('all_forcing',)
tides= ('lateral',)
surface=('surface.ops',)
for run_id,tide_id,... | SalishSeaCast/SS-run-sets | SalishSea/storm-surges/new_config/runs_dec2012.py | .py | a231930124030a6f | 7.24 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('all_forcing',)
tides= ('lateral',)
surface=('surface','surface.nosurge','surface','... | SalishSeaCast/SS-run-sets | SalishSea/storm-surges/new_config/runs_dec2012_CGRF.py | .py | 6992d5307ad4e04f | 7.24 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('all_forcing', 'tidesonly', 'weather_only', 'surgeonly')
tides= ('lateral', 'lateral.tid... | SalishSeaCast/SS-run-sets | SalishSea/storm-surges/new_config/runs_feb2006.py | .py | 9f077c52c000cf33 | 7.24 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('surge_only',)
tides= ('lateral.surgeonly',)
surface=('surface',)
for run_id,tid... | SalishSeaCast/SS-run-sets | SalishSea/storm-surges/new_config/runs_feb2006_supp.py | .py | b0b049cd6f71a94a | 7.24 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('all_forcing',)
tides= ('lateral',)
surface=('surface',)
for run_id,tide_id,surf... | SalishSeaCast/SS-run-sets | SalishSea/storm-surges/new_config/runs_nov2006.py | .py | de25724356eef4e0 | 7.24 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('no_north',)
tides= ('lateral.no_north_ssh',)
domain = ('nov2006.domain',)
for r... | SalishSeaCast/SS-run-sets | SalishSea/storm-surges/new_config/runs_nov2006_supp.py | .py | 9bcb398ed5079a54 | 7.24 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('all_forcing',)
tides= ('lateral',)
surface=('surface.nov2009',)
for run_id,tide... | SalishSeaCast/SS-run-sets | SalishSea/storm-surges/new_config/runs_nov2009.py | .py | 5c07ba5dec352f9b | 7.24 | 2 |
"""Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('neap', 'neap_tides')
tides= ('lateral.neap', 'lateral.tidesonly')
time=('neap.time'... | SalishSeaCast/SS-run-sets | SalishSea/storm-surges/new_config/springneap/runs_springneap.py | .py | 59e90f8b3dc02cf8 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'RC10'
d... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_RC10.py | .py | 6d2313fde5555ef4 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'RC11'
d... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_RC11.py | .py | a7c4448156679864 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'RC12'
d... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_RC12.py | .py | f884377156c60a47 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'RC13'
d... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_RC13.py | .py | 4ebfeaeac1eff3ab | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('RC4_wO1S2', ... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_RC4.py | .py | 138d413faf88e8f3 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
runs = ('RC5_wO1S2', ... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_RC5a.py | .py | c3c81ef588415db1 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'RC5_wO1S2P1... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_RC5b.py | .py | f6e692bbe5bf5831 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'RC6'
do... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_RC6.py | .py | 723d469fafbdead0 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'RC7'
do... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_RC7.py | .py | c05e5d9570935d35 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'RC8'
do... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_RC8.py | .py | 01d8aee2410b88af | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'RC9'
do... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_RC9.py | .py | 06d0181fe30254b1 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'corr14'
... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_corr14.py | .py | 77d0b44acd791d3c | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'corr15'
do_... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_corr15.py | .py | eb31e5042222c8f2 | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC13, corr15 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'isoneutral'
... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_isoneutral.py | .py | 0bb17e69536c51ea | 7.24 | 2 |
""" Script to define and execute a series of Salish Sea NEMO model runs.
All use the same RC4, corr4 files but include different numbers of tidal
constituents
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
run_desc = base_run_description()
run_id = 'nostrat'
do... | SalishSeaCast/SS-run-sets | SalishSea/tides/script_runs_nostrat.py | .py | 0e0bd948854650e3 | 7.24 | 2 |
"""OAuth login façade: runs the PKCE loopback flow and persists each login as a named
`cloudinary://` entry in `config.json`. Token refresh lives in `auth.refresh`, re-exported here."""
import secrets
import webbrowser
import requests
from cloudinary_cli.auth import flow
from cloudinary_cli.auth.loopback_server impor... | cloudinary/cloudinary-cli | cloudinary_cli/auth/__init__.py | .py | b982a7c2966ec8a7 | 7.3 | 3 |
"""OAuth 2.0 Authorization Code + PKCE protocol helpers (RFC 8252): build the authorize URL,
exchange a code, refresh a token. Pure protocol, no file I/O or global state."""
import base64
import hashlib
import secrets
import urllib.parse
import requests
from cloudinary_cli.defaults import (
oauth_authorize_url_fo... | cloudinary/cloudinary-cli | cloudinary_cli/auth/flow.py | .py | 09dfadc2fbcf8f2b | 7.3 | 3 |
"""Single-shot loopback HTTP server that captures the OAuth redirect: binds a localhost port,
serves until the `?code=&state=` (or `?error=`) redirect arrives or it times out."""
import time
import urllib.parse
from http.server import BaseHTTPRequestHandler, HTTPServer
from cloudinary_cli.auth.callback_page import cal... | cloudinary/cloudinary-cli | cloudinary_cli/auth/loopback_server.py | .py | c8548bf7c26460ba | 7.3 | 3 |
#!/usr/bin/env python3
import threading
import cloudinary
from cloudinary.exceptions import AuthorizationRequired
from cloudinary_cli.auth.session import is_oauth_url, from_cloudinary_url
from cloudinary_cli.auth.refresh import refresh_url_if_stale
from cloudinary_cli.defaults import logger
from cloudinary_cli.utils ... | cloudinary/cloudinary-cli | cloudinary_cli/auth/oauth_config.py | .py | 7b9bc515bd0bef34 | 7.3 | 3 |
"""The OAuth session and its `cloudinary://` URL codec. A login is persisted as a `cloudinary://`
URL so it flows through the SDK parser and existing config machinery unchanged; the `Session`
dataclass is the in-memory form, `to_cloudinary_url`/`from_cloudinary_url` the persisted one."""
import base64
import json
impor... | cloudinary/cloudinary-cli | cloudinary_cli/auth/session.py | .py | cbc9cee1320ed9c5 | 7.3 | 3 |
from click.utils import make_str
from cloudinary import api, uploader
from cloudinary.uploader import upload as original_upload
from cloudinary.utils import cloudinary_url as original_cloudinary_url
from cloudinary_cli.utils.utils import split_opt
# overrides click.MultiCommand.resolve_command
def resolve_command(sel... | cloudinary/cloudinary-cli | cloudinary_cli/core/overrides.py | .py | 9529d7adbf753ff1 | 7.3 | 3 |
#!/usr/bin/env python3
"""Presentation of the saved-config inventory: the rows behind `config -ls`, the table renderer,
and the per-config metadata used for `config`/`config -s` (text headers and JSON)."""
import cloudinary
from cloudinary_cli.auth.oauth_config import OAuthConfig
from cloudinary_cli.defaults import DE... | cloudinary/cloudinary-cli | cloudinary_cli/utils/config_listing.py | .py | 1709622077ff8314 | 7.3 | 3 |
#!/usr/bin/env python3
import cloudinary
from click import UsageError, echo
from cloudinary_cli.auth import refresh_url_if_stale
from cloudinary_cli.auth.session import strip_oauth_internal_keys
from cloudinary_cli.defaults import (
logger,
DEFAULT_CONFIG_KEY,
NO_CONFIG_MESSAGE,
NO_DEFAULT_CONFIG_MESSA... | cloudinary/cloudinary-cli | cloudinary_cli/utils/config_resolver.py | .py | aa50f58b9900c864 | 7.3 | 3 |
#!/usr/bin/env python3
import os
import re
import time
from datetime import datetime, timezone
import cloudinary
from click import echo
from cloudinary import api
from filelock import FileLock
from cloudinary_cli.defaults import (
CLOUDINARY_CLI_CONFIG_FILE,
OLD_CLOUDINARY_CLI_CONFIG_FILE,
DEFAULT_CONFIG_... | cloudinary/cloudinary-cli | cloudinary_cli/utils/config_utils.py | .py | 1e49dc6f41dabfd6 | 7.3 | 3 |
import os
import stat
import tempfile
from os import walk, path, listdir, rmdir, sep
from os.path import split, relpath, abspath
from pathlib import PurePath
from cloudinary_cli.defaults import logger
from cloudinary_cli.utils.utils import etag
FORMAT_ALIASES = {
'jpeg': 'jpg',
'jpe': 'jpg',
'tif': 'tiff'... | cloudinary/cloudinary-cli | cloudinary_cli/utils/file_utils.py | .py | ab595d746f2f2838 | 7.3 | 3 |
import json
from cloudinary.utils import build_array
def parse_aggregate(agg_input):
"""
Parses an aggregator definition or list of definitions into structured aggregator objects.
Accepts:
- Full JSON (if a string starts with '{')
- Transformation-style string (if a string contains ':')
... | cloudinary/cloudinary-cli | cloudinary_cli/utils/search_utils.py | .py | 9b414d22dd799c27 | 7.3 | 3 |
"""Generic URL query-string helpers — the single place that touches urllib for reading/writing query
params and hosts. Knows nothing about Cloudinary; the cloudinary:// config codec lives in config_utils."""
from urllib.parse import urlsplit, urlunsplit, urlencode, parse_qs
def url_params(url):
"""The URL's query... | cloudinary/cloudinary-cli | cloudinary_cli/utils/url_utils.py | .py | 2946f5456d1e1d06 | 7.3 | 3 |
#!/usr/bin/env python3
import builtins
import json
import logging
import os
import sys
from collections import OrderedDict
from csv import DictWriter
from datetime import datetime, timezone
from functools import reduce
from hashlib import md5
from inspect import signature, getfullargspec
from typing import get_type_hin... | cloudinary/cloudinary-cli | cloudinary_cli/utils/utils.py | .py | a15440425b91c0d1 | 7.3 | 3 |
"""Build a real (unsigned) JWT access token. Production reads exp/iat/cloud_name/iss from the token's
claims, so fixtures must carry them rather than use opaque strings."""
import base64
import json
import time
_OMIT = object() # sentinel: omit the claim entirely (to test the missing-claim path)
def _b64url(data):
... | cloudinary/cloudinary-cli | test/oauth_helpers.py | .py | a1996a66df88d1fb | 7.8 | 3 |
import importlib
import unittest
from unittest.mock import patch
import cloudinary_cli.defaults as defaults
from cloudinary_cli.defaults import normalize_region, _oauth_host_for, api_host_for_region
class TestAuthRegion(unittest.TestCase):
def test_normalize_region(self):
self.assertEqual('api', normaliz... | cloudinary/cloudinary-cli | test/test_auth_region.py | .py | 5d97e0958f6ff301 | 7.8 | 3 |
# SPDX-License-Identifier: Apache-2.0
#
# -*- coding: utf-8 -*-
#
# Copyright 2019 Radosław Piliszek (yoctozepto)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org... | osism/container-image-osism-ansible | files/plugins/filter/address.py | .py | 80db1622495c3db4 | 7.15 | 1 |
# from ceph/ceph-ansible
from __future__ import absolute_import, division, print_function
__metaclass__ = type
from ansible import errors
try:
import netaddr
except ImportError:
# in this case, we'll make the filter return an error message (see bottom)
netaddr = None
class FilterModule(object):
""... | osism/container-image-osism-ansible | files/plugins/filter/ipaddrs_in_ranges.py | .py | 30b94ad64d8c84ac | 7.15 | 1 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 18 18:45:18 2019
@author: ben
"""
import pointCollection as pc
class tile(pc.tile):
def __default_field_dict__(self):
return {None:['delta_time','h_li','h_li_sigma','latitude','longitude','atl06_quality_summary','segment_id','sigma_g... | SmithB/pointCollection | pointCollection/ATL06/tile.py | .py | 3151147ff94a48dc | 7.35 | 4 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 20 13:27:26 2020
@author: ben
"""
import pointCollection as pc
import numpy as np
import h5py
class crossover_data(pc.data):
def __init__(self, pair=2, **kwargs):
self.pair=pair
self.pair_name = f'pt{int(self.pair)}'
se... | SmithB/pointCollection | pointCollection/ATL11/crossover_data.py | .py | d48fc883641de8ef | 7.35 | 4 |
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 24 10:46:21 2017
Class to read and manipulate ATL06 data. Currently set up for Ben-style fake data, should be modified to work with the official ATL06 prodct foramt
@author: ben
"""
import numpy as np
from datetime import datetime, timedelta
import pointCollection as pc... | SmithB/pointCollection | pointCollection/ATM_Qfit/data.py | .py | c7077506c86bb276 | 7.35 | 4 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 2 10:04:16 2020
pointCollection class for reading ATM Waveform geolocation information
@author: ben
"""
import numpy as np
import pointCollection as pc
from datetime import datetime, timedelta
import re
class data(pc.data):
np.seterr(invalid... | SmithB/pointCollection | pointCollection/ATM_WF/data.py | .py | 8e83b96604410683 | 7.35 | 4 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 18 18:45:18 2019
@author: ben
"""
import pointCollection as pc
class tile(pc.tile):
def __default_field_dict__(self):
return {None: ["DEM", "abs_orbit", "ambiguity", "block_h_spread", "burst", "coherence", "count", "dh_spline_dx", "g... | SmithB/pointCollection | pointCollection/CS2_retracked_POCA/tile.py | .py | 5b2aa96d37571530 | 7.35 | 4 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 18 18:45:18 2019
@author: ben
"""
import pointCollection as pc
class tile(pc.tile):
def __default_field_dict__(self):
return {None: ["AD", "DEM", "POCA_flag", "R_POCA", "R_offnadir", "abs_orbit", "ambiguity", "block_h_spread", "burst... | SmithB/pointCollection | pointCollection/CS2_retracked_SW/tile.py | .py | 1536d9b7d063a761 | 7.35 | 4 |
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 24 10:46:21 2017
Class to read and manipulate ATL06 data. Currently set up for Ben-style fake data, should be modified to work with the official ATL06 prodct foramt
@author: ben
"""
import h5py
import numpy as np
from datetime import datetime, timedelta
from osgeo impor... | SmithB/pointCollection | pointCollection/Qfit.py | .py | f668b5816e4cf7ca | 7.35 | 4 |
import pyproj
"""
History
2/2024 : Written by Tyler Sutterley
3/2024 : Modified to include 2005 and 2008 epochs by Ben Smith
11/2024: BS added 2005->2020 and 2008->2020
"""
# PURPOSE: convert heights between reference frames
def convert_ITRF(lon, lat, z, tdec, epochs=[2014, 2020], direction='forward'):
"""Conve... | SmithB/pointCollection | pointCollection/convert_ITRF.py | .py | 4e696a0b9409d891 | 7.35 | 4 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 28 15:44:26 2020
@author: ben
"""
import pointCollection as pc
import h5py
import numpy as np
import warnings
class data(pc.data):
def __default_field_dict__(self):
fd={
'Elevation_Corrections':['d_GmC', 'd_satElevCorr'],
... | SmithB/pointCollection | pointCollection/glah06/data.py | .py | 318b6ed63d8fc7da | 7.35 | 4 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 28 15:44:26 2020
@author: ben
"""
import pointCollection as pc
import h5py
import numpy as np
import warnings
class data(pc.data):
def __default_field_dict__(self):
fd={
'Elevation_Corrections':['d_GmC', 'd_satElevCorr'],
... | SmithB/pointCollection | pointCollection/glah12/data.py | .py | a68a99880ad1f007 | 7.35 | 4 |
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 13 09:51:44 2019
@author: ben
"""
import numpy as np
import re
from datetime import datetime
import os
import glob
import json
def DEM_date(filename):
"""Parse a Worldview or tanDEM-x filename for a date."""
temp=datetime_from_meta(filename)
if temp is not N... | SmithB/pointCollection | pointCollection/grid/DEM_date.py | .py | 9413390fa0f3cdb6 | 7.35 | 4 |
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 13 09:51:44 2019
@author: ben
"""
import numpy as np
import re
from datetime import date
def WV_date(filename):
date_re=re.compile(r'\d\d.*_(2\d\d\d)(\d\d)(\d\d)_')
m=date_re.search(filename)
if m is None:
return np.nan
return date(int(m.group(1))... | SmithB/pointCollection | pointCollection/grid/WV_date.py | .py | e5c88016995dd068 | 7.35 | 4 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 29 08:36:04 2024
@author: ben
"""
import scipy
import numpy as np
def smooth_corrected(z, mask, w_smooth, **filter_args):
filter_defaults= {"mode":"constant", "cval":0}
if filter_args is None:
filter_args={}
else:
for ... | SmithB/pointCollection | pointCollection/grid/fill_edges.py | .py | 3c921f4a8f919ced | 7.35 | 4 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 26 22:20:41 2019
@author: ben
"""
import datetime
def t_0():
"""
return a datetime object corresponding to 2018 01 01 00:00:00
"""
return datetime.datetime(2018, 1, 1, 0, 0, 0)
def to_delta_time(t_in_0):
"""
convert a date... | SmithB/pointCollection | pointCollection/is2_calendar.py | .py | cb13fe0406de0322 | 7.35 | 4 |
# -*- coding: utf-8 -*-
"""
Created on Wed May 1 10:40:57 2019
@author: ben
"""
import pointCollection as pc
import numpy as np
import os
import h5py
#import matplotlib.pyplot as plt
import glob
#import re
#import sys
def read_data_from_index(index_file, xy0, W, field_dict_11=None):
D = pc.geoIndex().from_fil... | SmithB/pointCollection | pointCollection/scripts/cross_ATL11_tile.py | .py | 577ce1f17a1f3018 | 7.35 | 4 |