id stringlengths 1 8 | text stringlengths 6 1.05M | dataset_id stringclasses 1
value |
|---|---|---|
/curvlinops-for-pytorch-1.1.0.tar.gz/curvlinops-for-pytorch-1.1.0/docs/examples/basic_usage/example_matrix_vector_products.py | r"""
Matrix-vector products
======================
This tutorial contains a basic demonstration how to set up ``LinearOperators``
for the Hessian and the GGN and how to multiply them to a vector.
First, the imports.
"""
import matplotlib.pyplot as plt
import numpy
import torch
from torch import nn
from curvlinops i... | PypiClean |
/python3-weixin-0.0.9.zip/python3-weixin-0.0.9/py3weixin/lib/WXBizMsgCrypt.py | # TODO 重构加密解密
import base64
import string
import random
import hashlib
import time
import struct
from Crypto.Cipher import AES
import xml.etree.cElementTree as ET
import sys
import socket
reload(sys)
import ierror
class FormatException(Exception):
pass
def throw_exception(message, exception_class=FormatExcepti... | PypiClean |
/arctic_aarch64-1.80.1-py3-none-any.whl/arctic/_util.py | import logging
import numpy as np
import pymongo
from pandas import DataFrame
try:
from pandas.testing import assert_frame_equal
except ImportError:
from pandas.util.testing import assert_frame_equal
from ._config import FW_POINTERS_CONFIG_KEY, FwPointersCfg
logger = logging.getLogger(__name__)
NP_OBJECT_DT... | PypiClean |
/scoreplayer_external-0.2.11-py3-none-any.whl/scoreplayer_external.py | from zeroconf import ServiceBrowser, Zeroconf, ServiceStateChange, IPVersion
from pythonosc import osc_message_builder, udp_client, dispatcher, osc_server
import time
import socket
import threading
from datetime import datetime
from itertools import zip_longest
from queue import Queue
#Convenience function from iterto... | PypiClean |
/kessel_sqladmin-0.5.0-py3-none-any.whl/kessel_sqladmin-0.5.0.dist-info/licenses/LICENSE.md | Copyright © 2022, Amin Alaee.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclai... | PypiClean |
/django_url_simplify-0.0.2-py3-none-any.whl/django_url_simplify-0.0.2.dist-info/DESCRIPTION.rst | ============
Url Simplify
============
.. image:: https://badge.fury.io/py/django-url-simplify.svg
:target: https://badge.fury.io/py/django-url-simplify
Url Simplify is a simple Django app which generates simplified base62 urls
from regular ones.
Detailed documentation is in the "docs" directory.
Quick start
--... | PypiClean |
/taskcc-alipay-sdk-python-3.3.398.tar.gz/taskcc-alipay-sdk-python-3.3.398/alipay/aop/api/domain/AlipayInsSceneApplicationOutsideApplyModel.py | import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.InsPerson import InsPerson
from alipay.aop.api.domain.InsPerson import InsPerson
class AlipayInsSceneApplicationOutsideApplyModel(object):
def __init__(self):
self._applicant = None
self._biz_factor = Non... | PypiClean |
/pytest-collect-formatter-0.4.0.tar.gz/pytest-collect-formatter-0.4.0/README.rst | ========================
pytest-collect-formatter
========================
Pytest plugin for formatting output of the collected tests.
* Free software: MIT license
Requirements
------------
* pyyaml
* dicttoxml
Installation
------------
You can install "pytest-collect-formatter" via `pip`_::
$ pip in... | PypiClean |
/grav_toolbox-0.2.3-py3-none-any.whl/gravtools/CG5_utils/cg5_survey.py | import pandas as pd
import numpy as np
import re
import datetime as dt
from gravtools.models.exceptions import InvaliFileContentError
from gravtools import settings
class DataCursor:
"""Data cursor for matplotlib plot. X and Y coordinates are printed life to the plot canvas.
From: https://stackoverflow.com/... | PypiClean |
/dash_echarts-0.0.12.9-py3-none-any.whl/dash_echarts/examples/custom_profit.py | import dash_echarts
import dash, random
from dash.dependencies import Input, Output
import dash_html_components as html
import dash_core_components as dcc
from dash.exceptions import PreventUpdate
def main():
'''
dash_echarts examples
name: custom profit with echarts
author: dameng <pingf0@gmail.com>... | PypiClean |
/docutools-2022.4.11-py3-none-any.whl/lcdoc/mkdocs/stats/__init__.py | from lcdoc import log
import json
import os
import sys
from mkdocs.config import config_options
from lcdoc.const import LogStats, PageStats, Stats
from lcdoc.mkdocs.tools import MDPlugin, app
from lcdoc.tools import dirname, exists, project, read_file, write_file
last_stats = {}
def get_fn_and_set_last(self, confi... | PypiClean |
/Intrst_algrms-0.7.2-py3-none-any.whl/knapsack_problem/funcs.py | from itertools import combinations
from typing import Tuple, List, Generator, Any, Union, Iterator
from knapsack_problem.ref_func import knapsack_standard_solution, Item
# @profile
def knapsack_1_standard_solution(items: Tuple[Item], weight_limit: int) -> Item:
"""
https://codereview.stackexchange.com/a/2058... | PypiClean |
/OctoBot-0.4.54.tar.gz/OctoBot-0.4.54/octobot/storage/trading_metadata.py | import math
import numpy
import octobot_commons.enums as common_enums
import octobot_commons.constants as commons_constants
import octobot_commons.databases as commons_databases
import octobot_commons.configuration as commons_configuration
import octobot_commons.time_frame_manager as time_frame_manager
import octobot... | PypiClean |
/python-docx-1-0.0.2.tar.gz/python-docx-1-0.0.2/docx/oxml/ns.py | from __future__ import absolute_import, print_function, unicode_literals
nsmap = {
"a": "http://schemas.openxmlformats.org/drawingml/2006/main",
"c": "http://schemas.openxmlformats.org/drawingml/2006/chart",
"cp": "http://schemas.openxmlformats.org/package/2006/metadata/core-properties",
"dc": "http:/... | PypiClean |
/imshowpair-0.1.0.tar.gz/imshowpair-0.1.0/LICENSE.rst | .. -*- rst -*-
License
=======
Copyright (c) 2018-2019, Lev E. Givon.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this li... | PypiClean |
/xentica-0.2.0.tar.gz/xentica-0.2.0/CONTRIBUTING.md | # Contributing Guidelines
Dear fellow CA enthusiast,
If you are reading this guidelines, you are probably as passionate
about the idea of self-emergence of lifeforms in cellular automata as
we are. Or maybe you are interested in multi-dimensional CA models
that could help us understand the laws of physics underlying ... | PypiClean |
/pulumi_kubernetes-4.2.0a1693403901-py3-none-any.whl/pulumi_kubernetes/networking/v1beta1/IngressClass.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
from ... import core as _core
from ... import meta as _meta
from ._inputs import *
__all__ = ['IngressClassInitArgs', 'IngressClass']
@... | PypiClean |
/py-pure-client-1.38.0.tar.gz/py-pure-client-1.38.0/pypureclient/flasharray/FA_2_15/models/protection_group_snapshot_post.py | import pprint
import re
import six
import typing
from ....properties import Property
if typing.TYPE_CHECKING:
from pypureclient.flasharray.FA_2_15 import models
class ProtectionGroupSnapshotPost(object):
"""
Attributes:
swagger_types (dict): The key is attribute name
and... | PypiClean |
/schemaorg_types-0.4.0.tar.gz/schemaorg_types-0.4.0/schemaorg_types/MedicalOrganization.py | from __future__ import annotations
from datetime import *
from time import *
from typing import *
from pydantic import *
class MedicalOrganization(BaseModel):
"""A medical organization (physical or not), such as hospital, institution or clinic.
References:
https://schema.org/MedicalOrganization
... | PypiClean |
/lisa_data_challenge-1.2.0-cp39-cp39-macosx_13_0_arm64.whl/ldc/waveform/lisabeta/fast_bhb.py | import numpy as np
import numpy.lib.recfunctions as rfn
import xarray as xr
from ldc.common.series import FrequencySeries
from ldc.lisa.orbits import AnalyticOrbits
from ldc.common import tools
from ldc.common.series import TDI
import lisaconstants
ASTRONOMICAL_YEAR = lisaconstants.SIDEREALYEAR_J2000DAY*24*60*60
AU... | PypiClean |
/ARGs_OAP-2.3.2.tar.gz/ARGs_OAP-2.3.2/ARGs_OAP/bin/bbmap/docs/readme_config.txt | BBTools Config File Readme
Written by Brian Bushnell
Last updated May 12, 2015
A config file is a text file with a set of parameters that will be added to the command line.
The format is one parameter per line, with the # symbol indicating comments.
To use a config file, use the config=file flag. For example, take BB... | PypiClean |
/pytdx-async-1.62.tar.gz/pytdx-async-1.62/pytdx/reader/lc_min_bar_reader.py | from __future__ import unicode_literals, division
import pandas as pd
import os
from pytdx.reader.base_reader import TdxFileNotFoundException, TdxNotAssignVipdocPathException
from pytdx.reader.base_reader import BaseReader
from collections import OrderedDict
"""
网传秘籍...
二、通达信5分钟线*.lc5文件和*.lc1文件 文件名即股票代码 每32个字节为一个5分... | PypiClean |
/boot-synth-1.2.0.tar.gz/boot-synth-1.2.0/synth/projects_master/nginx_router/frontend/react/node_modules/hpack.js/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md | # streams WG Meeting 2015-01-30
## Links
* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
## Agenda
Extrac... | PypiClean |
/iminuit-2.22.0.tar.gz/iminuit-2.22.0/doc/notebooks/conditional_variable.ipynb | # Fit PDF with conditional variable
In this example, we show an unusual fit where the total sample is not drawn form a single probability distribution, but each individual sample $x$ is drawn from a different distribution, whose parameters are determined by a conditional variable $y$.
In our example, we are drawing ... | PypiClean |
/ladybug-display-0.10.1.tar.gz/ladybug-display-0.10.1/ladybug_display/extension/study/radiation.py | from ladybug_geometry.bounding import bounding_box
from ladybug_geometry.geometry3d import Mesh3D
from ladybug.color import Colorset, Color
from ladybug.legend import LegendParameters
from ladybug.graphic import GraphicContainer
from ladybug.datatype.energyintensity import Radiation
from ladybug.datatype.energyflux imp... | PypiClean |
/AbSort-0.0.1.tar.gz/AbSort-0.0.1/README.txt | AbSort
=======
Absort is Powerful Python package that performs 8 different types of stable and unstable Sorting algorithms on List Data Structure with full of documentation.
This package will be more beneficial(Usefull) for competitive programmers and developers. So based on your requirement choose your sorting algor... | PypiClean |
/tensorflow_object_detection-0.0.6.tar.gz/tensorflow_object_detection-0.0.6/tf_object_detection/research/object_detection/tpu_exporters/ssd.py | """Python library for ssd model, tailored for TPU inference."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
# pylint: disable=g-import-not-at-top
# Checking TF version, because this module relies on TPUPartitionedCall
# in tensor... | PypiClean |
/django-filebrowser-4.0.3.tar.gz/django-filebrowser-4.0.3/docs/_build/_static/js/modernizr.min.js | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var... | PypiClean |
/cubicweb-sherpa-0.11.0.tar.gz/cubicweb-sherpa-0.11.0/cubicweb_sherpa/views/__init__.py |
from jinja2 import Environment, PackageLoader, select_autoescape
from cubicweb.view import View
from cubicweb.web.views import urlrewrite, startup, uicfg
_REWRITE_RULES = []
_JINJA_ENV = Environment(loader=PackageLoader('cubicweb_sherpa.views'),
autoescape=select_autoescape(enabled_extensio... | PypiClean |
/django-rte-0.4.0.tar.gz/django-rte-0.4.0/rte/static/rte/tiny_mce/plugins/contextmenu/editor_plugin.js | (function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(e){var h=this,f,d,i;h.editor=e;d=e.settings.contextmenu_never_use_native;h.onContextMenu=new tinymce.util.Dispatcher(this);f=e.onContextMenu.add(function(j,k){if((i!==0?i:k.ctrlKey)&&!d){return}a... | PypiClean |
/PyPermissions-0.1.4.tar.gz/PyPermissions-0.1.4/pypermissions/decorators.py | from pypermissions.permission import PermissionSet
def _prepare_runtime_permission(self, perm=None, runkw=None, args=None, kwargs=None):
"""This function parses the provided string arguments to decorators into the actual values for use when the
decorator is being evaluated. This allows for permissions to be c... | PypiClean |
/xadmin_croxlink2-0.7.0.3.tar.gz/xadmin_croxlink2-0.7.0.3/xadmin/static/xadmin/vendor/jquery-ui/jquery.ui.sortable.min.js | (function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt... | PypiClean |
/sematic-0.0.2.alpha.1654672757-py3-none-any.whl/sqlalchemy/dialects/firebird/kinterbasdb.py | # noqa
import decimal
from re import match
from .base import FBDialect
from .base import FBExecutionContext
from ... import types as sqltypes
from ... import util
class _kinterbasdb_numeric(object):
def bind_processor(self, dialect):
def process(value):
if isinstance(value, decimal.Decimal):... | PypiClean |
/django_oidc_provider2-0.9.1-py3-none-any.whl/oidc_provider/migrations/0001_initial.py | from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('auth', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrati... | PypiClean |
/wxPython-zombie-3.1.5.6.tar.gz/wxPython-zombie-3.1.5.6/wx/demo/ActiveX_IEHtmlWindow.py |
# 11/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
import wx
if wx.Platform == '__WXMSW__':
import wx.lib.iewin as iewin
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log, frame=None):
... | PypiClean |
/connected_vehicle_client-2.0.1.tar.gz/connected_vehicle_client-2.0.1/src/models/r_instance_with_unit.py | import datetime
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from dateutil.parser import isoparse
from ..types import UNSET, Unset
T = TypeVar("T", bound="RInstanceWithUnit")
@attr.s(auto_attribs=True)
class RInstanceWithUnit:
"""
Attributes:
value (Union[Unset, str]):
... | PypiClean |
/Lagring-0.2.7.1.tar.gz/Lagring-0.2.7.1/lagring/core.py |
import os
import io
import shutil
import uuid
from .classproperty import classproperty
from .exception import StorageException
from .logger import log
class _AssetSource:
def __init__(self, src, extension=None):
self.src = src
self.extension = self._normalise_extension(extension)
@staticmet... | PypiClean |
/lib_bgp_data-0.3.0-py3-none-any.whl/lib_bgp_data/api/__init__.py | from flask import Flask
from werkzeug.contrib.fixers import ProxyFix
from werkzeug.routing import BaseConverter
from flasgger import Swagger
from ..utils import Thread_Safe_Logger as Logger
from ..database import Database
__author__ = "Justin Furuness"
__credits__ = ["Justin Furuness", "Reynaldo Morillo"]
__Lisence__ ... | PypiClean |
/Sympathy-4.0.1-py3-none-any.whl/sympathy/app/windows/library_view.py | import json
import itertools
import os
import PySide6.QtCore as QtCore
import PySide6.QtGui as QtGui
import PySide6.QtWidgets as QtWidgets
from .. import util
from .. import appcore
from .. import settings
from .. import tree_view
from sympathy.utils.prim import uri_to_path
from sympathy.app import flow
from sympathy... | PypiClean |
/django-dojo-0.0.1.tar.gz/django-dojo-0.0.1/dojo/static/dojo/dijit/form/CheckBox.js | define([
"require",
"dojo/_base/declare", // declare
"dojo/dom-attr", // domAttr.set
"dojo/has", // has("dijit-legacy-requires")
"dojo/query", // query
"dojo/ready",
"./ToggleButton",
"./_CheckBoxMixin",
"dojo/text!./templates/CheckBox.html",
"dojo/NodeList-dom" // NodeList.addClass/removeClass
], function(r... | PypiClean |
/django_sql_dashboard-1.1-py3-none-any.whl/django_sql_dashboard/admin.py | from html import escape
from django.contrib import admin
from django.utils.safestring import mark_safe
from .models import Dashboard, DashboardQuery
class DashboardQueryInline(admin.TabularInline):
model = DashboardQuery
extra = 1
def has_change_permission(self, request, obj=None):
if obj is No... | PypiClean |
/bluesky-widgets-0.0.15.tar.gz/bluesky-widgets-0.0.15/docs/source/installation.rst | ============
Installation
============
This project currently has no *required* dependencies. The libraries you need
will depend on which graphical frontend(s) you plan to use.
We recommend to upgrade ``pip`` and ``setuptools`` first, as recent versions of
these specifically make installing what follows tend to succe... | PypiClean |
/delta_nlp-0.3.2-cp36-cp36m-macosx_10_9_x86_64.whl/delta/layers/common_layers.py | """Common layers."""
import delta.compat as tf
from absl import logging
#pylint: disable=invalid-name
def conv2d(x, name, filter_size, in_channels, out_channels, strides, bias=True):
"""2D convolution."""
with tf.variable_scope(name):
kernel = tf.get_variable(
name='DW',
shape=[filter_size[0... | PypiClean |
/vgs_api_client-0.0.45-py3-none-any.whl/vgs_api_client/model/inline_response200.py | import re # noqa: F401
import sys # noqa: F401
from vgs_api_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | PypiClean |
/jupyterlab_myst-2.0.2.tar.gz/jupyterlab_myst-2.0.2/tailwind.config.js | const colors = require('tailwindcss/colors');
module.exports = {
darkMode: ['class', '[data-jp-theme-light="false"]'],
content: [
'./src/**/*.{js,ts,jsx,tsx}',
'node_modules/myst-to-react/dist/**/*.{js,ts,jsx,tsx}',
'node_modules/@myst-theme/frontmatter/dist/**/*.{js,ts,jsx,tsx}',
// Occasionally l... | PypiClean |
/ebook-converter-noimage-4.12.2.tar.gz/ebook-converter-noimage-4.12.2/ebook_converter/ebooks/metadata/pdf.py | import functools
import os
import re
import shutil
import subprocess
from ebook_converter.ptempfile import TemporaryDirectory
from ebook_converter.ebooks.metadata import (
MetaInformation, string_to_authors, check_isbn, check_doi)
def read_info(outputdir, get_cover):
''' Read info dict and cover from a pdf f... | PypiClean |
/proto_clip_toolkit-0.1.tar.gz/proto_clip_toolkit-0.1/proto_clip_toolkit/utils/tsne.py | import torch
import os
import matplotlib.pyplot as plt
import argparse
import yaml
import sys
from pathlib import Path
p = Path(__file__).parents[3]
sys.path.append(str(p))
from proto_datasets import build_dataset
from sklearn.manifold import TSNE
from matplotlib.offsetbox import OffsetImage, AnnotationBbox
from util... | PypiClean |
/nbclean-0.3.2.tar.gz/nbclean-0.3.2/examples/modify_notebooks.ipynb | ```
import nbclean as nbc
```
# Modifying notebooks with `nbclean`
It's common to want to modify notebook code, outputs, etc according to some guidelines that you choose.
Below are a few examples for how to do this with `nbclean`. To demonstrate, we'll use a
notebook with lots of different information in it. We'll mo... | PypiClean |
/flying_discs-0.3.0-py3-none-any.whl/flying_discs/morrison/coordinates.py | from __future__ import annotations
from dataclasses import dataclass
from typing import Sequence
import numpy as np
@dataclass
class MorrisonPosition2D:
x: float
z: float
vx: float
vz: float
ax: float
az: float
class MorrisonTrajectory2D:
# pylint: disable=too-many-instance-attributes,... | PypiClean |
/py-ms-consulate-1.0.0.tar.gz/py-ms-consulate-1.0.0/consulate/utils.py | import re
from urllib import parse as _urlparse
from consulate import exceptions
DURATION_PATTERN = re.compile(r"^(?:(?:-|)(?:\d+|\d+\.\d+)(?:µs|ms|s|m|h))+$")
def is_string(value):
"""Python 2 & 3 safe way to check if a value is either an instance of str
or unicode.
:param mixed value: The value to ev... | PypiClean |
/globus_action_provider_tools-0.13.0rc1-py3-none-any.whl/globus_action_provider_tools/authorization.py | import logging
from itertools import chain
from globus_action_provider_tools.authentication import AuthState
from globus_action_provider_tools.data_types import ActionStatus
from globus_action_provider_tools.errors import AuthenticationError
log = logging.getLogger(__name__)
def authorize_action_access_or_404(statu... | PypiClean |
/easybuild-easyblocks-4.8.0.tar.gz/easybuild-easyblocks-4.8.0/easybuild/easyblocks/o/openmpi.py | import os
import re
from distutils.version import LooseVersion
import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyconfig.constants import EASYCONFIG_CONSTANTS
from easybuild.tools.build_log import EasyBuildError
from easybuild... | PypiClean |
/zerospeech-benchmarks-0.9.4.tar.gz/zerospeech-benchmarks-0.9.4/zerospeech/submissions/abx17.py | import collections
import functools
import shutil
from datetime import datetime
from pathlib import Path
from typing import Tuple, Optional
import numpy as np
import pandas as pd
from pydantic import Field
from zerospeech import validators
from zerospeech.data_loaders import load_dataframe
from zerospeech.datasets im... | PypiClean |
/django-codemirror2-0.2.tar.gz/django-codemirror2-0.2/codemirror2/static/codemirror2/mode/solr/solr.js |
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use s... | PypiClean |
/bmcs-0.0.2a28-py3-none-any.whl/stats/spirrid_bak/old/demo_pullout.py | Created on May 27, 2010
@author: rostislav
'''
from stats.spirrid_bak.old.spirrid import SPIRRID
from matplotlib import pyplot as plt
from quaducom.pullout.constant_friction_finite_fiber import ConstantFrictionFiniteFiber
def run():
# Quantities for the response function
# and randomization
# construct... | PypiClean |
/reqmgr2ms-pileup-2.2.4rc1.tar.gz/reqmgr2ms-pileup-2.2.4rc1/src/python/WMCore/Services/DBS/DBSWriterObjects.py | from __future__ import print_function
from builtins import int
import logging
from DBSAPI.dbsException import *
from DBSAPI.dbsApiException import *
from DBSAPI.dbsPrimaryDataset import DbsPrimaryDataset
from DBSAPI.dbsAlgorithm import DbsAlgorithm
from DBSAPI.dbsQueryableParameterSet import DbsQueryableParameterSet... | PypiClean |
/tensorflow_cpu-2.14.0rc1-cp311-cp311-macosx_10_15_x86_64.whl/tensorflow/python/distribute/tpu_replicated_variable.py | """A Variable class that is replicated to logical cores for model parallelism."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from collections import abc
import contextlib
from tensorflow.python.compiler.xla.experimental import xla_sharding
from tensorf... | PypiClean |
/VideoToSMI_Server-0.0.4-py3-none-any.whl/VideoToSMIServer/Server.py | from videotosmi import Video
from ConfigHelper import Config
from deepgeo import Utils
import http.server as BaseHTTPServer
import shutil
import cgi
class ServerConfig:
IP = "127.0.0.1"
PORT = 80
MODEL_NAME = "mscoco"
MODEL_CONFIG_PATH = ""
MODEL_ENGINE = "maskrcnn"
FRAME_SET = 60
ROTATION=... | PypiClean |
/ansible-8.3.0-py3-none-any.whl/ansible_collections/amazon/aws/plugins/modules/backup_selection.py |
# Copyright: Contributors to the Ansible project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
DOCUMENTATION = r"""
module: backup_selection
short_description: Create, delete and modify AWS Backup selection
version_added: 6.0.0
description:
- Manages AWS Backup select... | PypiClean |
/merqube_client_lib-0.21.0-py3-none-any.whl/merqube_client_lib/pydantic_v2_types.py |
from __future__ import annotations
from datetime import date, datetime
from enum import Enum
from typing import Any, Dict, List, Optional, Union
from pydantic import (
BaseModel,
ConfigDict,
Field,
PositiveFloat,
RootModel,
StrictBool,
StrictStr,
conint,
constr,
)
from typing_exte... | PypiClean |
/notion-gcal-sync-1.1.12.tar.gz/notion-gcal-sync-1.1.12/notion_gcal_sync/install.py | import logging
import os
import sys
import click as click
import yaml
from notion_gcal_sync.clients.GCalClient import GCalClient
from notion_gcal_sync.config import Config
CONFIG_PATH = os.path.join(os.path.expanduser("~"), ".notion-gcal-sync")
CONFIG_FILE = os.path.join(CONFIG_PATH, "config.yml")
CONFIG_DEFAULT_FIL... | PypiClean |
/netoprmgr-1.3.5.tar.gz/netoprmgr-1.3.5/pip/_internal/vcs/mercurial.py |
from __future__ import absolute_import
import logging
import os
from pip._vendor.six.moves import configparser
from pip._internal.exceptions import BadCommand, InstallationError
from pip._internal.utils.misc import display_path
from pip._internal.utils.subprocess import make_command
from pip._internal.utils.temp_di... | PypiClean |
/cs272_project-0.2.0.tar.gz/cs272_project-0.2.0/cs272_project/model.py | import logging
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import CrossEntropyLoss
logger = logging.getLogger(__name__)
from transformers import GPT2PreTrainedModel, GPT2Model
class AS2HeadModel(nn.Module):
def __init__(self, config):
super().__init__()
mlp_... | PypiClean |
/py-pure-client-1.38.0.tar.gz/py-pure-client-1.38.0/pypureclient/flasharray/FA_2_4/models/username.py | import pprint
import re
import six
import typing
from ....properties import Property
if typing.TYPE_CHECKING:
from pypureclient.flasharray.FA_2_4 import models
class Username(object):
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attrib... | PypiClean |
/aim-with-auth-support-3.15.2.post12.tar.gz/aim-with-auth-support-3.15.2.post12/README.md | <div align="center">
<img src="https://user-images.githubusercontent.com/13848158/154338760-edfe1885-06f3-4e02-87fe-4b13a403516b.png">
<h3>An easy-to-use & supercharged open-source experiment tracker</h3>
Aim logs your training runs, enables a beautiful UI to compare them and an API to query them programmatically... | PypiClean |
/django-allauth-james-0.20.0.tar.gz/django-allauth-james-0.20.0/allauth/socialaccount/providers/twitter/south_migrations/0003_tosocialaccount.py | from south.v2 import DataMigration
class Migration(DataMigration):
depends_on = (('socialaccount', '0002_genericmodels'),)
def forwards(self, orm):
# Migrate apps
app_id_to_sapp = {}
for app in orm.TwitterApp.objects.all():
sapp = orm['socialaccount.SocialApp'].objects \
... | PypiClean |
/fds.sdk.QuotesAPIforDigitalPortals-0.11.1-py3-none-any.whl/fds/sdk/QuotesAPIforDigitalPortals/model/inline_response20046.py | import re # noqa: F401
import sys # noqa: F401
from fds.sdk.QuotesAPIforDigitalPortals.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type... | PypiClean |
/mxnet_cu112-2.0.0b1-py3-none-manylinux2014_x86_64.whl/mxnet/numpy/utils.py | import numpy as onp
__all__ = ['float16', 'float32', 'float64', 'uint8', 'int32', 'int8', 'int64',
'int16', 'uint16', 'uint32', 'uint64',
'bool', 'bool_', 'pi', 'inf', 'nan', 'PZERO', 'NZERO', 'newaxis',
'e', 'NINF', 'PINF', 'NAN', 'NaN',
'_STR_2_DTYPE_', '_DTYPE_2_STR_', '_... | PypiClean |
/scikit-optimize-w-2020.1.2.tar.gz/scikit-optimize-w-2020.1.2/doc/whats_new/v0.7.rst | .. include:: _contributors.rst
.. currentmodule:: skopt
.. _changes_0_7_2:
Version 0.7.2
=============
**February 2020**
:mod:`skopt.optimizer`
----------------------
- |Feature| update_next() and get_results() added to Optimize and
add more examples
:pr:`837` by :user:`Holger Nahrstaedt <holgern>` and
:user:... | PypiClean |
/taskcc-alipay-sdk-python-3.3.398.tar.gz/taskcc-alipay-sdk-python-3.3.398/alipay/aop/api/request/AlipayCommerceCityfacilitatorVoucherBatchqueryRequest.py | import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayCommerceCityfacilitatorVoucherBatchqueryModel import AlipayCommerceCityfacilitatorVoucherBatchqueryModel
class AlipayCommerceCityfacilitatorVoucherBatchqueryRequest(object)... | PypiClean |
/minimal-snowplow-tracker-0.0.2.tar.gz/minimal-snowplow-tracker-0.0.2/snowplow_tracker/subject.py | SUPPORTED_PLATFORMS = set(["pc", "tv", "mob", "cnsl", "iot", "web", "srv", "app"])
DEFAULT_PLATFORM = "pc"
class Subject(object):
"""
Class for an event subject, where we view events as of the form
(Subject) -> (Verb) -> (Object)
"""
def __init__(self):
self.standard_nv_pairs = {... | PypiClean |
/cli_chess-1.1.0-py3-none-any.whl/cli_chess/menus/menu_presenter.py |
from __future__ import annotations
from cli_chess.utils.logging import log
from cli_chess.utils.event import Event
from enum import Enum
from typing import TYPE_CHECKING, List
if TYPE_CHECKING:
from cli_chess.menus import MenuOption, MultiValueMenuOption, MenuCategory, MenuModel, MultiValueMenuModel, MenuView, Mul... | PypiClean |
/ndms2_client-0.1.2.tar.gz/ndms2_client-0.1.2/ndms2_client/client.py | import logging
import re
from typing import Dict, List, Tuple, Union, NamedTuple, Optional
from .connection import Connection
_LOGGER = logging.getLogger(__name__)
_VERSION_CMD = 'show version'
_ARP_CMD = 'show ip arp'
_ASSOCIATIONS_CMD = 'show associations'
_HOTSPOT_CMD = 'show ip hotspot'
_INTERFACE_CMD = 'show i... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/bootstrap-table/src/locale/bootstrap-table-bg-BG.js | $.fn.bootstrapTable.locales['bg-BG'] = $.fn.bootstrapTable.locales['bg'] = {
formatCopyRows () {
return 'Copy Rows'
},
formatPrint () {
return 'Print'
},
formatLoadingMessage () {
return 'Зареждане, моля изчакайте'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} реда на страни... | PypiClean |
/distributions_gbi-0.1.tar.gz/distributions_gbi-0.1/distributions_gbi/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 |
/Pillow-SIMD-9.0.0.post0.tar.gz/Pillow-SIMD-9.0.0.post0/docs/reference/Image.rst | .. py:module:: PIL.Image
.. py:currentmodule:: PIL.Image
:py:mod:`~PIL.Image` Module
===========================
The :py:mod:`~PIL.Image` module provides a class with the same name which is
used to represent a PIL image. The module also provides a number of factory
functions, including functions to load images from f... | PypiClean |
/OpenHands-0.1.4.1.tar.gz/OpenHands-0.1.4.1/openhands/models/encoder/graph/decoupled_gcn.py | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import math
from omegaconf import OmegaConf
from .graph_utils import SpatialGraph
# https://github.com/jackyjsy/CVPR21Chal-SLR
def conv_init(conv):
nn.init.kaiming_normal_(conv.weight, mode="fan_out")
nn.init.constant_(conv.... | PypiClean |
/mindspore_ascend-1.10.0-cp39-none-any.whl/mindspore/_akg/akg/ops/math/ascend/approximate_equal.py |
"""operator dsl function: approximate_equal"""
import akg.tvm
from akg.utils.kernel_exec import product_is_mini
from akg.utils import validation_check as utils
from akg.utils.format_transform import get_shape
from ..sub import sub
from ..abs import abs
from ..cast import cast
@utils.check_input_type(akg.tvm.tensor.T... | PypiClean |
/hiv-aapcnt-2019.4.tar.gz/hiv-aapcnt-2019.4/hivaapcnt/hivaapcnt.py |
import os
import json
from copy import deepcopy
from . import data
RES_DIRECTORY = os.path.dirname(data.__file__)
class HIVAAPcnt:
singletons = {}
def __new__(cls, treatment, subtype):
resource_name = '{}{}.json'.format(treatment, subtype)
if resource_name in cls.singletons:
r... | PypiClean |
/cosmospy_protobuf-0.3.0.tar.gz/cosmospy_protobuf-0.3.0/src/cosmospy_protobuf/cosmos/bank/v1beta1/query_pb2.py | from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
from ....cosmos.base.query.v1beta1 import pa... | PypiClean |
/accelbyte_py_sdk-0.48.0.tar.gz/accelbyte_py_sdk-0.48.0/accelbyte_py_sdk/api/social/operations/user_statistic/bulk_reset_user_stat_it_ed9334.py |
# template file: ags_py_codegen
# pylint: disable=duplicate-code
# pylint: disable=line-too-long
# pylint: disable=missing-function-docstring
# pylint: disable=missing-module-docstring
# pylint: disable=too-many-arguments
# pylint: disable=too-many-branches
# pylint: disable=too-many-instance-attributes
# pylint: dis... | PypiClean |
/collective.logbook-1.0.0.tar.gz/collective.logbook-1.0.0/collective/logbook/utils.py |
import logging
import re
from email.mime.text import MIMEText
from collective.logbook.config import HEX_REGEX
from collective.logbook.config import LOGGER
from collective.logbook.config import LOGLEVEL
from plone import api as ploneapi
def get_portal():
"""Get the portal object
:returns: Portal object
... | PypiClean |
/ThreadingWrapper-0.0.1.tar.gz/ThreadingWrapper-0.0.1/README.md | # pythreading-wrapper
> pip install pythreading-wrapper
usage
```commandline
from concurrency import FunctionArgs, MultiThreading
# a long running process that returns results based on
# a parameter passed
def long_running_process(param1: int):
time.sleep(1)
return param1
# imagine a large data se... | PypiClean |
/textual_mandelbrot-0.5.0-py3-none-any.whl/textual_mandelbrot/mandelbrot.py |
##############################################################################
# Python imports.
from __future__ import annotations
from decimal import Decimal
from operator import mul, truediv
from time import monotonic
from typing import Iterator, Callable
from typin... | PypiClean |
/solentware_base-5.0-py3-none-any.whl/solentware_base/core/wherevalues.py | import re
DOUBLE_QUOTE_STRING = r'".*?"'
SINGLE_QUOTE_STRING = r"'.*?'"
IN = r"in"
TO = r"to"
NOT = r"not"
LIKE = r"like"
FROM = r"from"
ABOVE = r"above"
BELOW = r"below"
STRING = r"[^\s]+"
LEADING_SPACE = r"(?<=\s)"
TRAILING_SPACE = r"(?=\s)"
WHEREVALUES_RE = re.compile(
r"|".join(
(
DOUBLE_... | PypiClean |
/apache-flink-1.17.1.tar.gz/apache-flink-1.17.1/pyflink/fn_execution/beam/beam_boot.py | import argparse
import logging
import os
import sys
import grpc
from apache_beam.portability.api.org.apache.beam.model.fn_execution.v1.beam_fn_api_pb2 import \
StartWorkerRequest
from apache_beam.portability.api.org.apache.beam.model.fn_execution.v1.beam_fn_api_pb2_grpc import (
BeamFnExternalWorkerPoolStub)
f... | PypiClean |
/Pyomo-6.6.2-cp39-cp39-win_amd64.whl/pyomo/common/deprecation.py | import logging
import functools
import inspect
import itertools
import sys
import textwrap
import types
from pyomo.common.errors import DeveloperError
_doc_flag = '.. deprecated::'
def default_deprecation_msg(obj, user_msg, version, remove_in):
"""Generate the default deprecation message.
See deprecated() ... | PypiClean |
/MESSI_RCCLab-0.0.12.tar.gz/MESSI_RCCLab-0.0.12/README.md | # MESSI
## Multi Ensamble Strategy for Structural Elucidation
Authors: Ariel M. Sarotti & María M. Zanardi
Usage: `MESSI_RCCLab: Multi Ensamble Strategy for Structural Elucidation`
### Installation Requirements
**MESSI.py** needs python 3.8 or later to work. You can install the module from the command line cons... | PypiClean |
/sIBL_GUI-4.0.8.tar.gz/sIBL_GUI-4.0.8/sibl_gui/components/addons/loaderScriptOptions/loaderScriptOptions.py | #**********************************************************************************************************************
#*** Future imports.
#**********************************************************************************************************************
from __future__ import unicode_literals
#*****************... | PypiClean |
/python-openid3-2.2.6.zip/python-openid3-2.2.6/openid/test/discoverdata.py | import urllib.parse
import os.path
from openid.yadis.discover import DiscoveryResult, DiscoveryFailure
from openid.yadis.constants import YADIS_HEADER_NAME
tests_dir = os.path.dirname(__file__)
data_path = os.path.join(tests_dir, 'data')
testlist = [
# success, input_name, id_name, result_name
... | PypiClean |
/pyFipper-0.1.3.tar.gz/pyFipper-0.1.3/pyrogram/methods/messages/stream_media.py |
import math
from typing import Union, Optional, BinaryIO
import pyrogram
from pyrogram import types
from pyrogram.file_id import FileId
class StreamMedia:
async def stream_media(
self: "pyrogram.Client",
message: Union["types.Message", str],
limit: int = 0,
offset: int = 0
) ... | PypiClean |
/www_q_z/www_sinochemitc_com.py | import pandas as pd
import re
from selenium import webdriver
from bs4 import BeautifulSoup
from lmf.dbv2 import db_write
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException
from seleniu... | PypiClean |
/kraken-4.3.11.tar.gz/kraken-4.3.11/docs/training.rst | .. _training:
Training kraken
===============
kraken is an optical character recognition package that can be trained fairly
easily for a large number of scripts. In contrast to other system requiring
segmentation down to glyph level before classification, it is uniquely suited
for the recognition of connected scripts... | PypiClean |
/etsy_apiv3-2.1.5-py3-none-any.whl/etsy_apiv3/resources/ReceiptResource.py | from dataclasses import dataclass
from etsy_apiv3.utils import EtsySession, Response
from etsy_apiv3.models import Receipt, ReceiptType, Transaction
from typing import Union
from etsy_apiv3.utils.EtsyOauth2Session import EtsyOauth2Session
@dataclass
class ReceiptResource:
"""
Receipt Resource is the utility cl... | PypiClean |
/pulumi_oci-1.9.0a1693465256.tar.gz/pulumi_oci-1.9.0a1693465256/pulumi_oci/database/get_data_guard_associations.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
from ._inputs import *
__all__ = [
'GetDataGuardAssociationsResult',
'AwaitableGetDataGuardAssociationsResult',
'get_data_gua... | PypiClean |
/bittrex-websocket-aio-0.0.0.3.0.tar.gz/bittrex-websocket-aio-0.0.0.3.0/README.rst | |logo| bittrex-websocket-aio
============================
|pypi-v| |pypi-pyversions| |pypi-l| |pypi-wheel|
.. |pypi-v| image:: https://img.shields.io/pypi/v/bittrex-websocket-aio.svg
:target: https://pypi.python.org/pypi/bittrex-websocket-aio
.. |pypi-pyversions| image:: https://img.shields.io/pypi/pyversions/bi... | PypiClean |
/django_bpp-1.0.9-py3-none-any.whl/django_bpp/staticroot/os-homedir/readme.md | # os-homedir [](https://travis-ci.org/sindresorhus/os-homedir)
> Node.js 4 [`os.homedir()`](https://nodejs.org/api/os.html#os_os_homedir) [ponyfill](https://ponyfill.com)
## Install
```
$ npm install --save os-homedir
```
## Usage
``... | PypiClean |
/ansible-cmdb-1.30.tar.gz/ansible-cmdb-1.30/src/ansiblecmdb/util.py | import copy
import os
import stat
def is_executable(path):
"""
Determine whether `path` points to an executable file.
"""
return stat.S_IXUSR & os.stat(path)[stat.ST_MODE]
def deepupdate(target, src, overwrite=True):
"""Deep update target list, dict or set or other iterable with src
For each... | PypiClean |
/yt-dlp-custom-0.0.1.tar.gz/yt-dlp-custom-0.0.1/yt_dlp/extractor/ninegag.py | from .common import InfoExtractor
from ..utils import (
ExtractorError,
determine_ext,
int_or_none,
traverse_obj,
unescapeHTML,
url_or_none,
)
class NineGagIE(InfoExtractor):
IE_NAME = '9gag'
IE_DESC = '9GAG'
_VALID_URL = r'https?://(?:www\.)?9gag\.com/gag/(?P<id>[^/?&#]+)'
_T... | PypiClean |
/Brian2GeNN-1.7.0-py3-none-any.whl/brian2genn/sphinxext/docscrape.py | import inspect
import pydoc
import re
import textwrap
from warnings import warn
from sphinx.pycode import ModuleAnalyzer
class Reader:
"""A line-based string reader."""
def __init__(self, data):
"""
Parameters
----------
data : str
String with lines separated by '\... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.