id stringlengths 1 8 | text stringlengths 6 1.05M | dataset_id stringclasses 1
value |
|---|---|---|
/hassmart_homeassistant-0.65.4.tar.gz/hassmart_homeassistant-0.65.4/homeassistant/components/config_entry_example.py |
import asyncio
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import ATTR_FRIENDLY_NAME
from homeassistant.util import slugify
DOMAIN = 'config_entry_example'
@asyncio.coroutine
def async_setup(hass, config):
"""Setup for our example component."""
return True
... | PypiClean |
/gw_lts-0.4.0-py3-none-any.whl/gw/lts/dags/__init__.py |
import os
import htcondor
import itertools
import yaml
from yaml.loader import SafeLoader
from gw.lts.utils import ONE_PER_HOUR, TWO_PER_DAY, ONE_PER_MONTH, TWO_PER_YEAR, FARSTRINGS_DICT
def add_job_opts(job, prefix):
opts = {'executable': os.path.join(prefix, f'bin/{job}'),
'error':f'logs/{job}-$(cluster)-$(pro... | PypiClean |
/neuron_morphology-1.1.7-py3-none-any.whl/neuron_morphology/snap_polygons/cortex_surfaces.py | from typing import Union, Tuple, Callable, Sequence
import copy as cp
import logging
from shapely.geometry import LineString, Point
from shapely.geometry.base import BaseGeometry
from neuron_morphology.snap_polygons.types import LineType, ensure_linestring
ConditionFn = Callable[[Point], bool]
def trim_to_close(
... | PypiClean |
/certora-cli-alpha-dudi-ci_dynamic-20230314.6.30.405610.tar.gz/certora-cli-alpha-dudi-ci_dynamic-20230314.6.30.405610/certora_cli/certoraRun.py |
import sys
import time
import logging
from typing import List, Optional
from pathlib import Path
scripts_dir_path = Path(__file__).parent.resolve() # containing directory
sys.path.insert(0, str(scripts_dir_path))
from Shared.certoraUtils import run_jar_cmd
from Shared.certoraUtils import check_results_from_file, is... | PypiClean |
/tensorflow_aarch64-2.14.0rc0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/tensorflow/compiler/mlir/tensorflow/gen_mlir_passthrough_op.py | import collections
from tensorflow.python import pywrap_tfe as pywrap_tfe
from tensorflow.python.eager import context as _context
from tensorflow.python.eager import core as _core
from tensorflow.python.eager import execute as _execute
from tensorflow.python.framework import dtypes as _dtypes
from tensorflow.security.... | PypiClean |
/yammh3-0.1.2.tar.gz/yammh3-0.1.2/docs/_build/singlehtml/_static/underscore-1.3.1.js |
(function() {
// Baseline setup
// --------------
// Establish the root object, `window` in the browser, or `global` on the server.
var root = this;
// Save the previous value of the `_` variable.
var previousUnderscore = root._;
// Establish the object that gets returned to break out of a loop itera... | PypiClean |
/paramiko-on-pypi-1.7.6.tar.gz/paramiko-on-pypi-1.7.6/paramiko/rng_win32.py |
class error(Exception):
pass
# Try to import the "winrandom" module
try:
from Crypto.Util import winrandom as _winrandom
except ImportError:
_winrandom = None
# Try to import the "urandom" module
try:
from os import urandom as _urandom
except ImportError:
_urandom = None
class _RNG(object):
... | PypiClean |
/infoblox-netmri-3.8.0.0.tar.gz/infoblox-netmri-3.8.0.0/infoblox_netmri/api/broker/v3_8_0/apic_setting_broker.py | from ..broker import Broker
class ApicSettingBroker(Broker):
controller = "apic_settings"
def index(self, **kwargs):
"""This method is no longer exists. Please use such method from SDN Settings
**Inputs**
**Outputs**
"""
return self.api_request(self._ge... | PypiClean |
/test_5_powerhouse_helper-1-py3-none-any.whl/test5_powerhouse_helper/OtherModules/Sort_Files.py | import os
import shutil
from prettytable import PrettyTable
#Dict for normalize()
transliterate_dict = {'а':'a','б':'b','в':'v','г':'g','д':'d','е':'e','ё':'e',
'ж':'zh','з':'z','и':'i','й':'i','к':'k','л':'l','м':'m','н':'n',
'о':'o','п':'p','р':'r','с':'s','т':'t','у':'u','ф':'f','х':'h',
'ц':'c','... | PypiClean |
/onnxruntime_azure-1.15.0-cp38-cp38-win32.whl/onnxruntime/transformers/models/t5/past_helper.py |
import logging
from typing import List, Tuple
import torch
logger = logging.getLogger(__name__)
class PastKeyValuesHelper:
"""Helper functions to process past key values for encoder-decoder model"""
@staticmethod
def get_past_names(num_layers, present: bool = False):
past_self_names = []
... | PypiClean |
/ldax-0.7.10.tar.gz/ldax-0.7.10/dax/dax_settings.py |
from future import standard_library
standard_library.install_aliases()
from builtins import object
from collections import OrderedDict
import configparser
from importlib import import_module
import os
import stat
from string import Template
import sys
import netrc
from .errors import DaxNetrcError
__copyright__ = ... | PypiClean |
/pulumi_alicloud-3.44.0a1693632188.tar.gz/pulumi_alicloud-3.44.0a1693632188/pulumi_alicloud/eci/get_zones.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'GetZonesResult',
'AwaitableGetZonesResult',
'get_zones',
'get_zones_output',
]
@pulumi.output_type
class Ge... | PypiClean |
/kicad-python-0.0.2.tar.gz/kicad-python-0.0.2/kicad/pcbnew/boarditem.py |
from kicad.pcbnew.layer import Layer, LayerSet
from kicad._native import _pcbnew
def from_board_item(board_item):
item = board_item.Cast()
item_type = type(item)
if item_type is _pcbnew.TEXTE_PCB:
from kicad.pcbnew.text import Text
return Text(item)
elif item_type is _pcbnew.BOARD:... | PypiClean |
/Sympathy-4.0.1-py3-none-any.whl/sylib/nodes/sympathy/reporting/node_report_template.py | import json
from sympathy.api import node as synode
from sympathy.api.nodeconfig import Ports, Port, Tag, Tags
from sympathy.api import report
from sylib.report.gui import MainWindow
from sylib.report import data_manager
from sylib.report import models
class DataType(object):
adaf = 'adafs'
table = 'tables'
... | PypiClean |
/gcbinspy-0.0.4-py3-none-any.whl/gcbinspy-0.0.4.dist-info/LICENSE.md | MIT License
Copyright (c) 2023 @poroping
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distrib... | PypiClean |
/php2json-0.2-cp36-cp36m-manylinux1_x86_64.whl/php2json-0.2.dist-info/DESCRIPTION.rst | php2json
========
.. image:: https://travis-ci.org/mbachry/php2json.svg?branch=master
:alt: Build status
:target: https://travis-ci.org/mbachry/php2json
A small library that aims to provide a fast way of decoding PHP
serialization format. Use it if you need to migrate large amount of
PHP data and performance ... | PypiClean |
/aws-sam-cli-without-docker-0.48.0.tar.gz/aws-sam-cli-without-docker-0.48.0/samcli/commands/deploy/exceptions.py | from samcli.commands.exceptions import UserException
class ChangeEmptyError(UserException):
def __init__(self, stack_name):
self.stack_name = stack_name
message_fmt = "No changes to deploy. Stack {stack_name} is up to date"
super(ChangeEmptyError, self).__init__(message=message_fmt.format(... | PypiClean |
/WebStar-0.1.3.tar.gz/WebStar-0.1.3/webstar/pattern.py | import hashlib
import re
from . import core
class Pattern(core.PatternInterface):
default_pattern = '[^/]+'
default_format = 's'
token_re = re.compile(r'''
{
([a-zA-Z_][a-zA-Z0-9_-]*) # group 1: name
(?:: # colon... | PypiClean |
/PlateTectonicTools-0.4.1.tar.gz/PlateTectonicTools-0.4.1/README.md | # PlateTectonicTools
Python tools for plate tectonic research.
This repository contains the Python package `ptt` (short for Plate Tectonic Tools) which provides a collection of common plate tectonic functionality that researchers can use in their workflows. It is primarily built on top of the [pyGPlates](http://gplat... | PypiClean |
/django-rte-0.4.0.tar.gz/django-rte-0.4.0/rte/static/rte/tiny_mce/themes/advanced/langs/pt_dlg.js | tinyMCE.addI18n('pt.advanced_dlg',{"link_list":"Lista de Links","link_is_external":"A URL digitada parece conduzir a um link externo. Deseja acrescentar o prefixo necess\u00e1rio http://?","link_is_email":"A URL digitada parece ser um endere\u00e7o de e-mail. Deseja acrescentar o prefixo necess\u00e1rio mailto:?","link... | PypiClean |
/DendroPy_calver-2023.330.2-py3-none-any.whl/dendropy/simulate/popgensim.py |
##############################################################################
## DendroPy Phylogenetic Computing Library.
##
## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder.
## All rights reserved.
##
## See "LICENSE.rst" for terms and conditions of usage.
##
## If you use this work or any portion there... | PypiClean |
/apache-airflow-2.7.0.tar.gz/apache-airflow-2.7.0/airflow/api_connexion/endpoints/user_endpoint.py | from __future__ import annotations
from http import HTTPStatus
from connexion import NoContent
from flask import request
from marshmallow import ValidationError
from sqlalchemy import asc, desc, func, select
from werkzeug.security import generate_password_hash
from airflow.api_connexion import security
from airflow.... | PypiClean |
/dog-optimizer-1.0.3.tar.gz/dog-optimizer-1.0.3/src/dog/averager.py | import logging
import torch
from torch import nn
from copy import deepcopy
logger = logging.getLogger(__name__)
class PolynomialDecayAverager:
"""
Averaging model weights using a polynomial decay, as described in Shamir & Zhang, 2013.
Given parameters x_t at iteration t, the averaged parameters are up... | PypiClean |
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/sphinx/util/parallel.py | import os
import platform
import sys
import time
import traceback
from math import sqrt
from typing import Any, Callable, Dict, List, Sequence
try:
import multiprocessing
except ImportError:
multiprocessing = None
from sphinx.errors import SphinxParallelError
from sphinx.util import logging
logger = logging.... | PypiClean |
/preprocessing_pgp-0.2.10-py3-none-any.whl/preprocessing_pgp/name/utils.py | import pandas as pd
from preprocessing_pgp.name.const import (
NICKNAME_REGEX,
WITH_ACCENT_ELEMENT_POPULARITY,
WITHOUT_ACCENT_ELEMENT_POPULARITY,
)
from unidecode import unidecode
def remove_nicknames(name_df: pd.DataFrame, name_col: str) -> pd.DataFrame:
"""
Remove nicknames in name column given ... | PypiClean |
/scikit-discovery-0.9.18.tar.gz/scikit-discovery-0.9.18/skdiscovery/data_structure/series/accumulators/plotter.py |
from skdiscovery.data_structure.framework import PipelineItem
import numpy as np
import matplotlib.pyplot as plt
import math
class Plotter(PipelineItem):
'''
Make a plot of series data
'''
def __init__(self, str_description, num_columns = 3, errorbars=False, width=13, height=4, **kwargs):
'''
... | PypiClean |
/jupyros-0.7.0a0.tar.gz/jupyros-0.7.0a0/js/node_modules/three/src/renderers/webgl/WebGLGeometries.js | import { Uint16BufferAttribute, Uint32BufferAttribute } from '../../core/BufferAttribute.js';
import { BufferGeometry } from '../../core/BufferGeometry.js';
import { arrayMax } from '../../utils.js';
function WebGLGeometries( gl, attributes, infoMemory ) {
var geometries = {};
var wireframeAttributes = {};
functi... | PypiClean |
/elastool-1.0.31-py3-none-any.whl/find_spg.py | from read_input import indict
def findspg(atoms):
spg0 = spglib.get_spacegroup(atoms, symprec=0.1)
if spg0:
spg1 = spg0.split()
spg = [str(spg1[0]), int(spg1[1][1:-1])]
else:
spg = []
# print spg0, spg
return spg
def find_crystal_system(pos_conv, dimensional,tubestrain_t... | PypiClean |
/msgraph-sdk-1.0.0a3.tar.gz/msgraph-sdk-1.0.0a3/msgraph/generated/education/users/item/assignments/item/resources/count/count_request_builder.py | from __future__ import annotations
from dataclasses import dataclass
from kiota_abstractions.get_path_parameters import get_path_parameters
from kiota_abstractions.method import Method
from kiota_abstractions.request_adapter import RequestAdapter
from kiota_abstractions.request_information import RequestInformation
fro... | PypiClean |
/kestrel_lang-1.7.4-py3-none-any.whl/kestrel_datasource_stixshifter/worker/translator.py | import json
import logging
from typing import Optional
from multiprocessing import Process, Queue, current_process
from typeguard import typechecked
from stix_shifter.stix_translation import stix_translation
from stix_shifter_utils.stix_translation.src.utils.transformer_utils import (
get_module_transformers,
)
im... | PypiClean |
/boletin-0.5.1.tar.gz/boletin-0.5.1/README | .. contents::
================================
Boletin, a Django newsletter app
================================
Boletin is a generic newsletter application for Django projects, which allows
for automatically generating and sending newsletters, with optional human
reviewing process if so desired.
Boletin means "bull... | PypiClean |
/checkov3-0.1.13.tar.gz/checkov3-0.1.13/checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py | from __future__ import annotations
from typing import Any
from checkov.common.models.enums import CheckResult, CheckCategories
from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
from checkov.common.util.type_forcers import force_list
from checkov.common.util.type_forcers import force_... | PypiClean |
/CherryPy-18.8.0.tar.gz/CherryPy-18.8.0/docs/contribute.rst | Contribute
----------
CherryPy is a community-maintained, open-source project hosted at Github.
The project actively encourages aspiring and experienced users to dive
in and add their best contribution to the project.
How can you contribute? Well, first search the `docs
<https://docs.cherrypy.dev>`_ and the `project ... | PypiClean |
/turkanime_cli-7.1.3.tar.gz/turkanime_cli-7.1.3/turkanime_api/dosyalar.py | from os import path,mkdir,replace,rename,remove,system,getcwd
from struct import calcsize
from configparser import ConfigParser
import json
from zipfile import ZipFile
from concurrent.futures import ThreadPoolExecutor
from urllib.request import urlopen
import signal
from shutil import rmtree
from functools import parti... | PypiClean |
/flask-peewee-swagger-1.1.5.tar.gz/flask-peewee-swagger-1.1.5/flask_peewee_swagger/static/swagger-ui-2.2.10/lib/backbone-min.js | !function(t,e){if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(i,n,s){t.Backbone=e(t,s,i,n)});else if("undefined"!=typeof exports){var i=require("underscore");e(t,exports,i)}else t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}(this,function(t,e,i,n){var s=t.Backbone,r=... | PypiClean |
/basic_probabilities-1.0.tar.gz/basic_probabilities-1.0/basic_probabilities/Gaussiandistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
class Gaussian(Distribution):
""" Gaussian distribution class for calculating and
visualizing a Gaussian distribution.
Attributes:
mean (float) representing the mean value of the distribution
stdev (float) representing ... | PypiClean |
/cli_code-28.1.0.tar.gz/cli_code-28.1.0/cli_code/template/jedi/inference/filters.py | from abc import abstractmethod
import weakref
from parso.tree import search_ancestor
from jedi._compatibility import use_metaclass
from jedi.inference import flow_analysis
from jedi.inference.base_value import ValueSet, Value, ValueWrapper, \
LazyValueWrapper
from jedi.parser_utils import get_cached_parent_scope
... | PypiClean |
/alipay_sdk_python-3.6.740-py3-none-any.whl/alipay/aop/api/request/AlipayMobilePublicMessageLabelSendRequest.py | import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
class AlipayMobilePublicMessageLabelSendRequest(object):
def __init__(self, biz_model=None):
self._biz_model = biz_model
self._biz_content = None
self._version = "1.0"
... | PypiClean |
/simpy.io-0.2.2.tar.gz/simpy.io-0.2.2/simpy/io/async.py | import socket
import ssl
import errno
import asyncore
from time import sleep
from simpy.io.base import (BaseIOEnvironment, BaseTCPSocket, BaseSSLSocket,
socket_error)
from simpy.io.platform import blocking_io_errors
from simpy.io._compat import PY2
if PY2:
from simpy.io._compat import BlockingIOError
cl... | PypiClean |
/datafest_archive-0.1.0.tar.gz/datafest_archive-0.1.0/datafest_archive/models/website/pages.py | from typing import List, Optional, Union
from dataclasses import dataclass
from datetime import datetime
@dataclass
class Image:
name: str
caption: str
focal_point: str
preview_only: bool
path: str
@dataclass
class Social:
icon: str
icon_pack: str
link: str
@dataclass
class Organi... | PypiClean |
/cryptofeed-werks-0.1.5.tar.gz/cryptofeed-werks-0.1.5/cryptofeed_werks/utils.py | import base64
import json
from typing import Optional
from decouple import config
from google.api_core import retry
from google.cloud import pubsub_v1
from google.protobuf.timestamp_pb2 import Timestamp
from .constants import CRYPTOFEED_WERKS, PROJECT_ID
def get_topic_path():
return pubsub_v1.PublisherClient().... | PypiClean |
/picsellia_tf2-0.11.10.tar.gz/picsellia_tf2-0.11.10/picsellia_tf2/object_detection/predictors/rfcn_keras_box_predictor.py |
"""RFCN Box Predictor."""
import tensorflow.compat.v1 as tf
from object_detection.core import box_predictor
from object_detection.utils import ops
BOX_ENCODINGS = box_predictor.BOX_ENCODINGS
CLASS_PREDICTIONS_WITH_BACKGROUND = (
box_predictor.CLASS_PREDICTIONS_WITH_BACKGROUND)
MASK_PREDICTIONS = box_predictor.MAS... | PypiClean |
/uliweb_ui-0.1.0-py3-none-any.whl/uliweb_ui/static/modules/ckeditor/4.6.2/lang/zh-cn.js | /*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.lang['zh-cn']={"editor":"所见即所得编辑器","editorPanel":"所见即所得编辑器面板","common":{"editorHelp":"按 ALT+0 获得帮助","browseServer":"浏览服务器","url":"URL","protocol":"协议","upload":"上传","u... | PypiClean |
/rHEALPixDGGS-0.5.3-py3-none-any.whl/rhealpixdggs/ellipsoids.py |
# Import third-party modules.
from numpy import pi, sqrt, sin, cos, arcsin, arctanh, deg2rad, rad2deg
# Import standard modules.
from random import uniform
# Import my modules.
from rhealpixdggs.utils import my_round, auth_lat, auth_rad
# Parameters of some common ellipsoids.
WGS84_A = 6378137.0
WGS84_F = 1 / 298.2... | PypiClean |
/pytest-cairo-0.1.0.tar.gz/pytest-cairo-0.1.0/pytest_cairo/function.py | import asyncio
import contextlib
import inspect
import re
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Any, Callable, Iterator, List, Optional
from pytest import fail
from starkware.cairo.lang.compiler.preprocessor.preprocessor import (
AttributeScope,
)
from starkware.s... | PypiClean |
/dgl_cu90-0.5.3-cp38-cp38-win_amd64.whl/dgl_cu90-0.5.3.data/purelib/dgl/distributed/graph_partition_book.py |
import numpy as np
from .. import backend as F
from ..base import NID, EID
from .. import utils
from .shared_mem_utils import _to_shared_mem, _get_ndata_path, _get_edata_path, DTYPE_DICT
from .._ffi.ndarray import empty_shared_mem
from ..ndarray import exist_shared_mem_array
def _move_metadata_to_shared_mem(graph_na... | PypiClean |
/pulumi_azure_nextgen-0.6.2a1613157620.tar.gz/pulumi_azure_nextgen-0.6.2a1613157620/pulumi_azure_nextgen/network/v20150501preview/get_express_route_circuit.py |
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from . import outputs
__all__ = [
'GetExpressRouteCircuitResult',
'AwaitableGetExpressRouteCircuitResult',
'get_express_route_circuit',
]
@pulumi.output_type
... | PypiClean |
/CHIP_IO-0.7.1.tar.gz/CHIP_IO-0.7.1/distribute_setup.py | import os
import shutil
import sys
import time
import fnmatch
import tempfile
import tarfile
import optparse
from distutils import log
try:
from site import USER_SITE
except ImportError:
USER_SITE = None
try:
import subprocess
def _python_cmd(*args):
args = (sys.executable,) + args
r... | PypiClean |
/PLoT_ME-0.9.1-cp38-cp38-manylinux2014_x86_64.whl/plot_me/classify.py | import argparse
import csv
from datetime import datetime as dt
from glob import glob
import logging
from multiprocessing import cpu_count
# from multiprocessing.pool import Pool
import os
from os import path as osp
import pandas as pd
import pickle
import shutil
import subprocess
from pathlib import Path
from time impo... | PypiClean |
/python-irodsclient-1.1.8.tar.gz/python-irodsclient-1.1.8/irods/query.py | from __future__ import absolute_import
from collections import OrderedDict
from irods import MAX_SQL_ROWS
from irods.models import Model
from irods.column import Column, Keyword
from irods.message import (
IntegerIntegerMap, IntegerStringMap, StringStringMap, _OrderedMultiMapping,
GenQueryRequest, GenQueryResp... | PypiClean |
/merlin-sok-1.2.0.tar.gz/merlin-sok-1.2.0/third_party/json/doc/mkdocs/docs/features/binary_values.md | # Binary Values
The library implements several [binary formats](binary_formats/index.md) that encode JSON in an efficient way. Most of these formats support binary values; that is, values that have semantics define outside the library and only define a sequence of bytes to be stored.
JSON itself does not have a binar... | PypiClean |
/django-je-0.0.1.tar.gz/django-je-0.0.1/django/core/validators.py | import ipaddress
import re
import warnings
from pathlib import Path
from urllib.parse import urlsplit, urlunsplit
from django.core.exceptions import ValidationError
from django.utils.deconstruct import deconstructible
from django.utils.deprecation import RemovedInDjango41Warning
from django.utils.encoding import punyc... | PypiClean |
/dash_archer-0.1.0.tar.gz/dash_archer-0.1.0/dash_archer/dash_archer.min.js | window.dash_archer=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Sym... | PypiClean |
/ctypeslib3-0.5.8.tar.gz/ctypeslib3-0.5.8/ctypeslib/codegen/gccxmlparser.py | try:
from xml.etree import cElementTree
except ImportError:
try:
import cElementTree
except ImportError:
cElementTree = None
if cElementTree:
base = object
else:
import xml.sax
base = xml.sax.ContentHandler
from . import typedesc
import sys
try:
set
except NameError:
fr... | PypiClean |
/meta-1.0.2.tar.gz/meta-1.0.2/license.rst | ==================
License
==================
Copyright © 2011 Enthought Inc. All Rights Reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, th... | PypiClean |
/weightless-core-0.9.4.tar.gz/weightless-core-0.9.4/weightless/core/_observable.py |
from sys import exc_info
from traceback import format_exception
from functools import partial
from weightless.core import is_generator, DeclineMessage, cextension
if cextension:
from weightless.core.ext import AllGenerator
from collections import defaultdict
class NoneOfTheObserversRespond(Exception):
"""... | PypiClean |
/compliance_checker-5.1.0-py3-none-any.whl/compliance_checker/cf/cf_1_7.py | import logging
import os
import sqlite3
from warnings import warn
import numpy as np
import pyproj
from compliance_checker import cfutil
from compliance_checker.base import BaseCheck, Result, TestCtx
from compliance_checker.cf.appendix_d import dimless_vertical_coordinates_1_7
from compliance_checker.cf.appendix_e im... | PypiClean |
/ReviewBoard-5.0.5-py3-none-any.whl/reviewboard/htdocs/static/lib/js/masonry-4.2.2.js | * Bridget makes jQuery widgets
* v2.0.1
* MIT license
*/
/* jshint browser: true, strict: true, undef: true, unused: true */
( function( window, factory ) {
// universal module definition
/*jshint strict: false */ /* globals define, module, require */
if ( typeof define == 'function' && define.amd ) {
/... | PypiClean |
/pypi-show-urls-2.1.1.tar.gz/pypi-show-urls-2.1.1/pypi_show_urls/__main__.py | import argparse
import itertools
import sys
import urlparse
import xmlrpclib
import html5lib
import requests
from pkg_resources import safe_name
from pip.req import parse_requirements
from setuptools.package_index import distros_for_url
def installable(project, url):
normalized = safe_name(project).lower()
... | PypiClean |
/json-lsp-0.2.0.tar.gz/json-lsp-0.2.0/json_lsp/node_modules/jsonc-parser/README.md | # jsonc-parser
Scanner and parser for JSON with comments.
[](https://www.npmjs.org/package/jsonc-parser)
[](https://npmjs.org/package/jsonc-parser)
[.
"""
new_handler = None
from_bytes_handler = None
as_bytes_handler = None
free_handler = None
... | PypiClean |
/hops-apache-beam-2.24.0.2.tar.gz/hops-apache-beam-2.24.0.2/apache_beam/runners/worker/worker_id_interceptor.py |
"""Client Interceptor to inject worker_id"""
# pytype: skip-file
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import os
from typing import Optional
import grpc
class _ClientCallDetails(collections.namedtuple(
'_ClientCallDetail... | PypiClean |
/pingsafe_cli-0.1.2.tar.gz/pingsafe_cli-0.1.2/src/pingsafe_cli/psgraph/common/runners/graph_builder/local_graph.py | from __future__ import annotations
import logging
from abc import abstractmethod
from pathlib import Path
from typing import Any
from pingsafe_cli.psgraph.common.graph.graph_builder import Edge
from pingsafe_cli.psgraph.common.graph.graph_builder.graph_components.blocks import Block
from pingsafe_cli.psgraph.common.g... | PypiClean |
/dallinger-9.10.0.tar.gz/dallinger-9.10.0/docs/source/networks.rst | Networks
========
Depending on an experiment's objectives, there are different ways that
experiment participants can interact with each other and with the
experiment's stimuli. For some experiments, participants may receive the
same initial stimuli and process it individually. For other experiments,
they may sequentia... | PypiClean |
/edu-airflow-1.10.5.tar.gz/edu-airflow-1.10.5/airflow/contrib/operators/pubsub_operator.py |
from airflow.contrib.hooks.gcp_pubsub_hook import PubSubHook
from airflow.models import BaseOperator
from airflow.utils.decorators import apply_defaults
class PubSubTopicCreateOperator(BaseOperator):
"""Create a PubSub topic.
By default, if the topic already exists, this operator will
not cause the DAG ... | PypiClean |
/context_python-0.3.1.tar.gz/context_python-0.3.1/getcontext/generated/models/_models.py |
import datetime
import sys
from typing import Any, List, Optional, TYPE_CHECKING, Union
from .. import _serialization
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
if TYPE_CHECKING:
#... | PypiClean |
/ePSproc-1.3.1.tar.gz/ePSproc-1.3.1/epsproc/classes/_plotters.py | from matplotlib import pyplot as plt # For plot legends with Xarray plotter
import numpy as np # Needed only for np.nan at the moment
from epsproc import matEleSelector, plotTypeSelector, multiDimXrToPD, mfpad, sphSumPlotX, sphFromBLMPlot
from epsproc import lmPlot as lmPlotCore # Hack rename here to prevent circula... | PypiClean |
/lightning-pose-0.0.4.tar.gz/lightning-pose-0.0.4/lightning_pose/utils/fiftyone.py | import os
from typing import Dict, List, Literal, Optional, Union
import fiftyone as fo
import numpy as np
import pandas as pd
from omegaconf import DictConfig
from tqdm import tqdm
from typeguard import typechecked
from lightning_pose.utils import pretty_print_str
from lightning_pose.utils.io import return_absolute_... | PypiClean |
/irl-benchmark-0.1.0.tar.gz/irl-benchmark-0.1.0/docs/extending.rst | Extending the benchmark
=======================
This guide provides information on how to extend the benchmark, e.g. to add a new IRL algorithm. We cover four possible extension: adding new environments, adding new IRL algorithms, adding new RL algorithms, and adding new metrics.
We are happy to add new extensions to... | PypiClean |
/pulumi_azure_native-2.5.1a1693590910.tar.gz/pulumi_azure_native-2.5.1a1693590910/pulumi_azure_native/security/v20190101preview/get_assessments_metadata_subscription.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__all__ = [
'GetAssessmentsMetadataSubscriptionResult',
'AwaitableGetAssessmentsMetadataSubscriptionResult',
'get_assessments_metadata_subscriptio... | PypiClean |
/rl-coach-1.0.1.tar.gz/rl-coach-1.0.1/rl_coach/environments/doom_environment.py |
try:
import vizdoom
except ImportError:
from rl_coach.logger import failed_imports
failed_imports.append("ViZDoom")
import os
from enum import Enum
from os import path, environ
from typing import Union, List
import numpy as np
from rl_coach.base_parameters import VisualizationParameters
from rl_coach.en... | PypiClean |
/crackmapexec-5.2.3.tar.gz/crackmapexec-5.2.3/cme/modules/nanodump.py |
from io import StringIO
import os
import sys
import re
import time
import base64
class CMEModule:
name = 'nanodump'
description = "Get lsass dump using nanodump and parse the result with pypykatz"
supported_protocols = ['smb']
opsec_safe = True # not really
multiple_hosts = True
def options(... | PypiClean |
/quadpy-gpl-0.16.10.tar.gz/quadpy-gpl-0.16.10/src/quadpy/t3/_stroud.py | import numpy as np
from ..c1 import gauss_legendre
from ..helpers import book
from ..tn._stroud import stroud_tn_5_1
from ._helpers import T3Scheme, register
source = book(
authors=["Arthur Stroud"],
title="Approximate Calculation of Multiple Integrals",
publisher="Prentice Hall",
year="1971",
)
def... | PypiClean |
/PyAstronomy-0.19.0.tar.gz/PyAstronomy-0.19.0/src/doc/pyaslDoc/aslDoc/cardinalPoint.rst | Convert azimuth into cardinal point
====================================
.. p23ready
The cardinal points or cardinal directions are
North, East, South, and West.
.. currentmodule:: PyAstronomy.pyasl
.. autofunction:: getCardinalPoint
Example
--------
::
from __future__ import print_function, division
from... | PypiClean |
/aide-core-6.1.10a3.tar.gz/aide-core-6.1.10a3/platformio/compat.py |
# pylint: disable=unused-import,no-name-in-module
import importlib.util
import inspect
import locale
import shlex
import sys
from platformio.exception import UserSideException
if sys.version_info >= (3, 7):
from asyncio import create_task as aio_create_task
from asyncio import get_running_loop as aio_get_ru... | PypiClean |
/django-mailto-0.1.0b.tar.gz/django-mailto-0.1.0b/mailto/static/mailto/js/lib/ckeditor/plugins/a11yhelp/dialogs/lang/it.js | /*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","it",{title:"Istruzioni di Accessibilità",contents:"Contenuti di Aiuto. Per chiudere questa finestra premi ESC.",legend:[{name:"Generale",... | PypiClean |
/tad_dftd4-0.0.4.tar.gz/tad_dftd4-0.0.4/doc/installation.rst | Installation
------------
pip
~~~
*tad-dftd4* can easily be installed with ``pip``.
.. code::
pip install tad-dftd4
From source
~~~~~~~~~~~
This project is hosted on GitHub at `dftd4/tad-dftd4 <https://github.com/dftd4/tad-dftd4>`__.
Obtain the source by cloning the repository with
.. code::
git clone ... | PypiClean |
/onegov.election_day-3.13.9-py3-none-any.whl/onegov/election_day/formats/vote/default.py | from onegov.ballot import BallotResult
from onegov.election_day import _
from onegov.election_day.formats.common import EXPATS
from onegov.election_day.formats.common import FileImportError
from onegov.election_day.formats.common import load_csv
from onegov.election_day.formats.common import BALLOT_TYPES
HEADERS = [
... | PypiClean |
/cdktf_cdktf_provider_mongodbatlas-5.0.0-py3-none-any.whl/cdktf_cdktf_provider_mongodbatlas/data_mongodbatlas_search_indexes/__init__.py | import abc
import builtins
import datetime
import enum
import typing
import jsii
import publication
import typing_extensions
from typeguard import check_type
from .._jsii import *
import cdktf as _cdktf_9a9027ec
import constructs as _constructs_77d1e7e8
class DataMongodbatlasSearchIndexes(
_cdktf_9a9027ec.Ter... | PypiClean |
/pylook-0.1.1.tar.gz/pylook-0.1.1/docs/_templates/autosummary/module.rst | {% if fullname in ['pylook.notyetimplemented'] %}
{% include 'overrides/' ~ fullname ~ '.rst' with context %}
{% else %}
{{ objname }}
{{ underline }}
.. automodule:: {{ fullname }}
{% block functions %}
{% if functions %}
.. rubric:: Functions
.. autosummary::
:toctree: ./
{% for item in fu... | PypiClean |
/cognite_sdk-6.17.0.tar.gz/cognite_sdk-6.17.0/cognite/client/data_classes/datapoints_subscriptions.py | from __future__ import annotations
import json
from dataclasses import dataclass
from enum import auto
from typing import TYPE_CHECKING, Any
from cognite.client.data_classes import Datapoints, filters
from cognite.client.data_classes._base import (
CogniteListUpdate,
CognitePrimitiveUpdate,
CogniteResourc... | PypiClean |
/OASYS1-ESRF-Extensions-0.0.69.tar.gz/OASYS1-ESRF-Extensions-0.0.69/orangecontrib/esrf/wofry/widgets/extension/ow_thin_object_1d.py | import numpy
from PyQt5.QtWidgets import QMessageBox, QLabel, QSizePolicy
from orangewidget.settings import Setting
from orangewidget import gui
from oasys.widgets import gui as oasysgui
from oasys.widgets import congruence
from oasys.util.oasys_util import TriggerIn, TriggerOut, EmittingStream
from oasys.util.oasys... | PypiClean |
/django-monaco-editor-1.0.9.tar.gz/django-monaco-editor-1.0.9/django_monaco_editor/static/external/monaco-editor/esm/vs/base/worker/defaultWorkerFactory.js | import { globals } from '../common/platform.js';
import { logOnceWebWorkerWarning } from '../common/worker/simpleWorker.js';
function getWorker(workerId, label) {
// Option for hosts to overwrite the worker script (used in the standalone editor)
if (globals.MonacoEnvironment) {
if (typeof globals.Monaco... | PypiClean |
/thickly-plugins-1.4.1.tar.gz/thickly-plugins-1.4.1/locust_plugins/users/resource.py | import logging
import re
from locust import HttpUser
from locust.contrib.fasthttp import FastHttpUser
from lxml import html, etree
class EmbeddedResourceManager:
"""
provides features for finding and managing resources embedded in html
"""
def __init__(
self,
user,
include_res... | PypiClean |
/quant-trading-tradingtools-0.1.18.tar.gz/quant-trading-tradingtools-0.1.18/tradingtools/exchange/ftx/ftx_response_mapper.py |
class FTXResponseMapper:
@staticmethod
def map_balance_response(balance: dict) -> dict:
return {
'asset': balance['coin'],
'available': balance['free'],
'total': balance['total'],
}
@staticmethod
def map_order_response(order: dict) -> dict:
... | PypiClean |
/Brian2-2.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/brian2/devices/cpp_standalone/codeobject.py | from brian2.codegen.codeobject import CodeObject, constant_or_scalar
from brian2.codegen.generators.cpp_generator import CPPCodeGenerator, c_data_type
from brian2.codegen.targets import codegen_targets
from brian2.codegen.templates import Templater
from brian2.core.functions import DEFAULT_FUNCTIONS
from brian2.core.pr... | PypiClean |
/nni-3.0rc1-py3-none-macosx_10_9_x86_64.whl/nni_node/node_modules/isstream/README.md | # isStream
[](http://travis-ci.org/rvagg/isstream)
**Test if an object is a `Stream`**
[](https://nodei.co/npm/isstream/)
The missing `Stream.isStream(obj)`: determine if an object is standard Node.js `Stream`. ... | PypiClean |
/ucode-cli-2.5.5.tar.gz/ucode-cli-2.5.5/ucode/oj/codeforces/codeforces.py | import codecs
import copy
import pickle
import requests
from bs4 import BeautifulSoup
from ucode.helpers.clog import CLog
from ucode.models.problem import Problem, TestCase
from ucode.oj.codeforces.aes import AESModeOfOperation
from ucode.oj.codeforces.codeforces_helper import to_markdown
from ucode.services.dsa.probl... | PypiClean |
/embedding_as_service-3.1.2-py3-none-any.whl/embedding_as_service/text/xlnet/models/run_squad.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl import flags
import absl.logging as _logging # pylint: disable=unused-import
import collections
import os
import math
import json
import six
import random
import gc
import numpy as np
if six.PY2:
... | PypiClean |
/jupyterhub_url_sharing-0.1.0.tar.gz/jupyterhub_url_sharing-0.1.0/node_modules/@blueprintjs/colors/src/colors.ts | const grayScale = {
BLACK: "#111418",
DARK_GRAY1: "#1C2127",
DARK_GRAY2: "#252A31",
DARK_GRAY3: "#2F343C",
DARK_GRAY4: "#383E47",
DARK_GRAY5: "#404854",
GRAY1: "#5F6B7C",
GRAY2: "#738091",
GRAY3: "#8F99A8",
GRAY4: "#ABB3BF",
GRAY5: "#C5CBD3",
LIGHT_GRAY1: "#D3D8DE",
... | PypiClean |
/GuangTestBeat-0.13.1-cp38-cp38-macosx_10_9_x86_64.whl/econml/_cate_estimator.py | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""Base classes for all CATE estimators."""
import abc
import numpy as np
from functools import wraps
from copy import deepcopy
from warnings import warn
from .inference import BootstrapInference
from .utilities import (ten... | PypiClean |
/pulumi_google_native-0.31.2a1689827148.tar.gz/pulumi_google_native-0.31.2a1689827148/pulumi_google_native/firebasehosting/v1beta1/get_release.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . import outputs
__all__ = [
'GetReleaseResult',
'AwaitableGetReleaseResult',
'get_release',
'get_release_output',
]
@pulumi.output_type... | PypiClean |
/py_redis_simple_queue-0.0.4.tar.gz/py_redis_simple_queue-0.0.4/README.md | # Redis simple queue
Very simple implementation from article : http://peter-hoffmann.com/2012/python-simple-queue-redis-queue.html
## usage
```shell
pip install py_redis_simple_queue
```
### The sender
```python
from redis import Redis
from redis_simple_queue import RedisQueue
connection = Redis() # see do... | PypiClean |
/m3_next-0.5.10-py3-none-any.whl/m3_next/static/js/require.js |
var requirejs, require, define;
(function (global) {
var req, s, head, baseElement, dataMain, src,
interactiveScript, currentlyAddingScript, mainScript, subPath,
version = '2.1.11',
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
cjsRequireRegExp = /[^.]\s*require\s*\(\s... | PypiClean |
/joern_lib-0.12.0.tar.gz/joern_lib-0.12.0/joern_lib/client.py | import asyncio
import json
import os
import platform
import tempfile
import httpx
import uvloop
import websockets
from joern_lib.utils import (
check_labels_list,
expand_search_str,
fix_json,
fix_query,
parse_error,
print_flows,
print_md,
print_table,
)
if platform.system() == "Window... | PypiClean |
/hf-streamlit-1.18.1.tar.gz/hf-streamlit-1.18.1/streamlit/type_util.py | from __future__ import annotations
import contextlib
import re
import types
from enum import Enum, auto
from typing import (
TYPE_CHECKING,
Any,
Dict,
Iterable,
List,
NamedTuple,
Optional,
Sequence,
Set,
Tuple,
TypeVar,
Union,
cast,
overload,
)
import numpy as n... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/dizoo/d4rl/config/walker2d_random_dt_config.py | from easydict import EasyDict
from copy import deepcopy
walker2d_dt_config = dict(
exp_name='walker2d_random_dt_seed0',
env=dict(
env_id='Walker2d-v3',
norm_obs=dict(use_norm=False, ),
norm_reward=dict(use_norm=False, ),
collector_env_num=1,
evaluator_env_num=8,
... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.