id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/HTTP-PyServer-0.1.4.3.2.tar.gz/HTTP-PyServer-0.1.4.3.2/src/server/request.py | from typing import Self
import urllib
import json
class Request:
'''Represents an HTTP request.'''
def __init__(self,
*,
address: tuple = (),
method: str = '',
path: str = '',
version: float = '',
headers: di... | PypiClean |
/HySpec-0.1.4.4.tar.gz/HySpec-0.1.4.4/spectralAdv/feature_build_plot_temp.py | from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
from matplotlib.backends.backend_qt4agg import FigureManagerQT
import numpy as np
class MyFigureCanvas(FigureCanvasQTAgg):
def __init__(self):
super(MyFigureCanvas, self).__init__(Figure())
# init class attributes:
self.backg... | PypiClean |
/parts/Clothing/Graphic/Pizza.py | def Pizza():
return (
'<path fill-rule="evenodd" clip-rule="evenodd" d="M65.9332 25.3911C61.8511 26.7713 57.3827 28.7147 55.0279 32.4649C53.1806 35.4073 53.0565 32.0097 50.4771 33.0579C47.9703 34.0767 48.6557 38.2811 47.7453 40.3594C47.0367 39.1679 46.702 37.8428 45.8097 36.7551C46.5034 36.3096 47.1459 35.7... | PypiClean |
/FEADRE_AI-1.0.7.tar.gz/FEADRE_AI-1.0.7/FEADRE_AI/ai/fmodels/model_look.py | import os
import sys
from collections import OrderedDict
import numpy as np
from FEADRE_AI.ai.calc.flops_counter import get_model_complexity_info
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(os.path.split(rootPath)[0])
import torch
import torchvision.model... | PypiClean |
/Mathics-1.0.tar.gz/Mathics-1.0/mathics/builtin/pymimesniffer/magic.py |
from __future__ import absolute_import
from __future__ import print_function
import sys
import os.path
import logging
import six
from six.moves import range
class MagicRule(object):
def __init__(
self, mimeType, parentType, extensions, allowsLeadingWhiteSpace,
magicNumbers, magicStrings):
... | PypiClean |
/netket-3.9.2.tar.gz/netket-3.9.2/netket/experimental/operator/_fermion_operator_2nd_utils.py | import re
from collections import defaultdict
import numpy as np
from typing import List, Union, Tuple, Dict
import copy
from netket.utils.types import DType, PyTree
OperatorTuple = Tuple[int, int]
r""" Creation and annihilation operators at mode i are encoded as
:math:`\hat{a}_i^\dagger`: (i, 1)
:math:`\hat{a}`: (i,... | PypiClean |
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas/files/gltf/gltf_mesh.py | from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import itertools
from compas.files.gltf.constants import VERTEX_COUNT_BY_MODE
from compas.files.gltf.data_classes import PrimitiveData
from compas.files.gltf.helpers import get_weighted_mesh_vertices
from comp... | PypiClean |
/HarvestingKit-0.6.24.tar.gz/HarvestingKit-0.6.24/harvestingkit/jats_package.py |
from __future__ import print_function
import sys
from datetime import date, datetime
from harvestingkit.utils import (fix_journal_name,
collapse_initials)
from harvestingkit.bibrecord import record_add_field
from harvestingkit.minidom_utils import (get_value_in_tag,
... | PypiClean |
/githubkit-0.10.7-py3-none-any.whl/githubkit/rest/codespaces.py | from typing import TYPE_CHECKING, Dict, List, Union, Literal, Optional, overload
from pydantic import BaseModel, parse_obj_as
from githubkit.utils import UNSET, Missing, exclude_unset
from .types import (
UserCodespacesPostBodyOneof0Type,
UserCodespacesPostBodyOneof1Type,
OrgsOrgCodespacesAccessPutBodyTy... | PypiClean |
/dyson-1.1.2.tar.gz/dyson-1.1.2/docs/actions.md | Actions
=======
There are multiple actions that can be taken on the application.
These "actions" are in the [core modules](https://github.com/dynamictivity/dyson-modules-core).
- [Goto URL](#goto-url)
- [Click](#click)
- [Check](#check)
- [Uncheck](#uncheck)
- [Set Text](#set-text)
- [Switch To...](#switch-to)
* [... | PypiClean |
/BlueWhale3_Geo-0.3.0-py3-none-any.whl/orangecontrib/geo/widgets/owgeocoding.py | import logging
from itertools import chain
import numpy as np
import pandas as pd
from collections import OrderedDict
from AnyQt.QtCore import Qt, QPersistentModelIndex
from AnyQt.QtWidgets import QComboBox, QItemDelegate, QLineEdit, \
QCompleter, QHeaderView
from Orange.data import Table, Domain, StringVariable... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/pkg_resources/extern/__init__.py | import sys
class VendorImporter:
"""
A PEP 302 meta path importer for finding optionally-vendored
or otherwise naturally-installed packages from root_name.
"""
def __init__(self, root_name, vendored_names=(), vendor_pkg=None):
self.root_name = root_name
self.vendored_names = set(v... | PypiClean |
/Annalist-0.5.18.tar.gz/Annalist-0.5.18/annalist_root/annalist_manager/am_initialize.py | from __future__ import unicode_literals
from __future__ import absolute_import, division, print_function
__author__ = "Graham Klyne (GK@ACM.ORG)"
__copyright__ = "Copyright 2014, G. Klyne"
__license__ = "MIT (http://opensource.org/licenses/MIT)"
import os
import sys
import logging
import importlib
import s... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/db/backends/postgresql/schema.py | from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.db.backends.ddl_references import IndexColumns
from django.db.backends.postgresql.psycopg_any import sql
from django.db.backends.utils import strip_quotes
class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
# Setting all constraints... | PypiClean |
/Brian2-2.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/brian2/core/magic.py | import gc
import inspect
import itertools
import weakref
from brian2.units.allunits import second
from brian2.units.fundamentalunits import check_units
from brian2.utils.logger import get_logger
from .base import BrianObject
from .network import Network
__all__ = [
"MagicNetwork",
"magic_network",
"Magic... | PypiClean |
/7Wonder-RL-Lib-0.1.1.tar.gz/7Wonder-RL-Lib-0.1.1/docs/_static/js/html5shiv-printshiv.min.js | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&... | PypiClean |
/EAST-0.3.8.tar.gz/EAST-0.3.8/east/asts/ast_linear.py |
from east.asts import ast
from east.asts import utils
from east import consts
class LinearAnnotatedSuffixTree(ast.AnnotatedSuffixTree):
__algorithm__ = "ast_linear"
def _construct(self, strings_collection):
"""
Generalized suffix tree construction algorithm based on the
Ukkonen's alg... | PypiClean |
/OOoPy-alt-1.11.tar.gz/OOoPy-alt-1.11/ooopy/Transformer.py |
from __future__ import absolute_import
import time
import re
try :
from xml.etree.ElementTree import dump, SubElement, Element, tostring
from xml.etree.ElementTree import _namespace_map
except ImportError :
from elementtree.ElementTree import dump, SubElement, Element, tostring
from e... | PypiClean |
/BaiduSpider-1.0.2.6.tar.gz/BaiduSpider-1.0.2.6/baiduspider/models/jingyan.py | from typing import Union
from baiduspider.models import convert_time
from baiduspider.models.typings.typings_jingyan import *
class JingyanPublisher(JingyanPublisher):
"""经验发布者模型
这是一个遵照BaiduSpider经验搜索经验发布者结果模型创建的返回模型类。
Attributes:
name (str): 经验上传者用户名
url (str): 经验上传者链接
plain (d... | PypiClean |
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/transactions.py | import math
from web3._utils.threads import (
Timeout,
)
from web3._utils.toolz import (
assoc,
curry,
merge,
)
VALID_TRANSACTION_PARAMS = [
'from',
'to',
'gas',
'gasPrice',
'value',
'data',
'nonce',
'chainId',
]
TRANSACTION_DEFAULTS = {
'value': 0,
'data': b''... | PypiClean |
/Adafruit_Blinka-8.20.1-py3-none-any.whl/adafruit_blinka/microcontroller/am65xx/pin.py | """TI AM65XX pin names"""
import mraa
# pylint: disable=too-many-branches,too-many-statements
# pylint: disable=pointless-string-statement
class Pin:
"""Pins don't exist in CPython so...lets make our own!"""
# pin modes
IN = 0
OUT = 1
ADC = 2
DAC = 3
PWM = 4
# pin values
LOW = 0... | PypiClean |
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/core/freezable_batch_norm.py |
"""A freezable batch norm layer that uses Keras batch normalization."""
import tensorflow.compat.v1 as tf
class FreezableBatchNorm(tf.keras.layers.BatchNormalization):
"""Batch normalization layer (Ioffe and Szegedy, 2014).
This is a `freezable` batch norm layer that supports setting the `training`
parameter ... | PypiClean |
/Benchmarker-4.0.1.tar.gz/Benchmarker-4.0.1/README.html | <?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="v... | PypiClean |
/Boning-0.0.1-py3-none-any.whl/boning/variable.py | import numpy as np
def add(a: "Variable", b: "Variable"):
"""
y = a + b
"""
if type(b) != Variable:
b = Variable(b)
return Variable(a.value + b.value, "add", (a, b), a.require_grad or b.require_grad)
def sub(a: "Variable", b: "Variable"):
"""
y = a - b
"""
if type(a) != V... | PypiClean |
/LibPrep-1.1.1.tar.gz/LibPrep-1.1.1/lib_prep/FragmentTools/tree_detector.py | import os
import shutil
import prody
from rdkit import Chem
import lib_prep.pdb_modifier as pdm
__author__ = "Carles Perez Lopez"
__version__ = "1.0.0"
__maintainer__ = "Carles Perez Lopez"
__email__ = "carlesperez94@gmail.com"
class Detector(pdm.PDB):
def __init__(self, in_pdb, bond_to_descend, chain="L", resnu... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_nso-za.js | 'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... | PypiClean |
/LEPL-5.1.3.zip/LEPL-5.1.3/src/lepl/support/context.py | from collections import deque
#from logging import getLogger
from threading import local
from lepl.support.lib import singleton, fmt
class ContextError(Exception):
'''
Exception raised on problems with context.
'''
pass
# pylint: disable-msg=R0903
class NamespaceMap(local):
'''
A store for ... | PypiClean |
/LyScriptTools64-1.0.5.tar.gz/LyScriptTools64-1.0.5/README.md | # x64dbg 自动化控制插件
<br>
<div align=center>
<img width="100" src="https://cdn.lyshark.com/archive/LyScript/bug_black.png"/><tr>
<img width="100" src="https://cdn.lyshark.com/archive/LyScript/python.png"/>
<br><br><br>
[简体中文](README.md) | [ENGLISH](README-EN.md) | [русский язык ](README-RU.md)
<br>
[![Bu... | PypiClean |
/BigJob2-0.54.post73.tar.gz/BigJob2-0.54.post73/bigjob_dynamic/many_job_affinity.py | import os
import sys
sys.path.append(os.path.dirname( __file__ ))
from many_job import *
class many_job_affinity_service(many_job_service):
def __init__(self, bigjob_list, advert_host):
""" accepts resource list as key/value pair:
( {"resource_url" : "gram://qb1.loni.org/jobmanager-pbs", "... | PypiClean |
/JumpScale-core-6.0.0.tar.gz/JumpScale-core-6.0.0/lib/JumpScale/baselib/cloudsystemfs/HttpFS.py | from JumpScale import j
import urllib2
import httplib
CHUNKSIZE=8192
# FIXME: HTTP basic authentication support
class HttpFS(object):
server = None
path = None
filename = None
local_file = None
end_type = None
local_file = None
http_socket = None
def __init__(self,end_type,server,path... | PypiClean |
/DeepPhysX-22.6.tar.gz/DeepPhysX-22.6/src/Pipelines/BasePipeline.py | from typing import Dict, Optional, Any, List, Union
from DeepPhysX.Core.Network.BaseNetworkConfig import BaseNetworkConfig
from DeepPhysX.Core.Dataset.BaseDatasetConfig import BaseDatasetConfig
from DeepPhysX.Core.Environment.BaseEnvironmentConfig import BaseEnvironmentConfig
from DeepPhysX.Core.Manager.Manager import... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Variables/ListVariable.py |
__revision__ = "src/engine/SCons/Variables/ListVariable.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
# Known Bug: This should behave like a Set-Type, but does not really,
# since elements can occur twice.
__all__ = ['ListVariable',]
import collections
import SCons.Util
class _ListVari... | PypiClean |
/Aspyct-3-0_beta_2.tar.gz/Aspyct-3-0_beta_2/_Aspyct/py2x.py |
import sys
from common import CallData, __init__
# Python 2.4 compat
if sys.version_info[1] < 5:
BaseException = Exception
def execFunction(w, *args, **kwargs):
# Spare time, save local ;)
func = w.__original__
# Create our CallData object
cd = CallData(w, func, # With the wrapper and the o... | PypiClean |
/CellPhoneDBu-1.1.1.7-py3-none-any.whl/cellphonedb/src/core/database/sqlalchemy_repository/ProteinRepository.py | import pandas as pd
from cellphonedb.src.core.database.Repository import Repository
from cellphonedb.src.core.database.sqlalchemy_models.db_model_multidata import Multidata
from cellphonedb.src.core.database.sqlalchemy_models.db_model_protein import Protein
class ProteinRepository(Repository):
name = 'protein'
... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/upload/upload_validators.py |
"""Tools for performing validation of uploaded spatial files."""
import re
import os.path
import logging
import zipfile
from collections import namedtuple
from django import forms
from django.utils.translation import ugettext as _
from ..geoserver.helpers import ogc_server_settings
from . import files
from .utils i... | PypiClean |
/InowasFlopyAdapter-1.5.0.tar.gz/InowasFlopyAdapter-1.5.0/FlopyAdapter/SwtPackages/VdfAdapter.py | import flopy.seawat as seawat
class VdfAdapter:
_data = None
def __init__(self, data):
self._data = data
def validate(self):
# should be implemented
# for key in content:
# do something
# return some hints
pass
def is_valid(self):
# should... | PypiClean |
/MAmotif-1.1.0.tar.gz/MAmotif-1.1.0/docs/source/intro.rst | .. _intro:
Introduction
------------
**MAmotif** is used to compare two ChIP-seq samples of the same protein from different cell types or conditions
(e.g. Mutant vs Wild-type) and **identify transcriptional factors (TFs) associated with the cell-type biased binding**
of this protein as its **co-factors**, by using TF... | PypiClean |
/Fregger-0.10.7.tar.gz/Fregger-0.10.7/fregger/__init__.py |
from flask_restful.reqparse import RequestParser
from flask_restful import Resource
from flask import request, Response, abort, current_app
from jinja2 import Template
import functools
import inspect
import re
import os
_root_path = os.path.dirname(os.path.abspath(__file__))
class _FreggerJSONResource(Resource):
... | PypiClean |
/Flask-Restler-1.19.5.tar.gz/Flask-Restler-1.19.5/flask_restler/peewee.py | from __future__ import absolute_import
from peewee import SQL, Field
from flask._compat import string_types
from .resource import ResourceOptions, Resource, APIError, logger
from .filters import Filter as VanilaFilter, Filters
try:
from marshmallow_peewee import ModelSchema
except ImportError:
import logging
... | PypiClean |
/AIPrompts-0.5.4.tar.gz/AIPrompts-0.5.4/prompts/dynamic.py | from typing import TYPE_CHECKING
from .exceptions import UndefinedVariableError
from .schemas import DynamicSchema, OpenAIModelSettings
from .utils import load_yaml
if TYPE_CHECKING:
from .turbo import TurboPrompt
class DynamicPrompt:
"""
DynamicPrompt.
>>> template = "this is a <dog>"
>>> temp... | PypiClean |
/DBussy-1.3-py35-none-any.whl/dbussy.py |
import os
import builtins
import operator
import array
import enum
import ctypes as ct
from weakref import \
ref as weak_ref, \
WeakValueDictionary
import threading
import io
import atexit
import asyncio
from xml.etree import \
ElementTree as XMLElementTree
from xml.sax.saxutils import \
quoteattr as q... | PypiClean |
/Altair%20Smartworks%20SDK-0.0.1.tar.gz/Altair Smartworks SDK-0.0.1/openapi_client/model/thing_create_response_credentials.py | import re # noqa: F401
import sys # noqa: F401
from openapi_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 |
/Monary-0.5.0.tar.gz/Monary-0.5.0/monary/monary.py |
import atexit
import copy
import ctypes
import os
import platform
import sys
PY3 = sys.version_info[0] >= 3
if PY3:
# Python 3.
bytes_type = bytes
string_type = str
from urllib.parse import urlencode
else:
# Python 2.6/2.7.
bytes_type = basestring
string_type = basestring
from urllib i... | PypiClean |
/CGATReport-0.9.1.tar.gz/CGATReport-0.9.1/doc/TestParameter.rst | Testing the roles
=================
PMID
====
The ``:pmid:`` role links to the pubmed database via a pubmed id.
For example, see :pmid:`12706730` on protein domains.
Parameter
=========
The ``:param:`` role displays field in classes. For example, to get
the parameter mWordSize: :param:`TestCases.LargeMatrix.mWordS... | PypiClean |
/Naftawayh-0.4.tar.gz/Naftawayh-0.4/naftawayh/create_verbstamp.py | import re
from arabic_const import *
from ar_ctype import *
STAMP_pat=re.compile(u"[%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s]"%(ALEF,YEH,HAMZA,ALEF_HAMZA_ABOVE,WAW_HAMZA,YEH_HAMZA, WAW, ALEF_MAKSURA,SHADDA,FATHA,DAMMA,KASRA,SUKUN,TEH,NOON),re.UNICODE)
def verb_stamp(word):
"""
generate a stamp for a verb,
remove all lette... | PypiClean |
/MuPhyN-0.1.1.post4-py3-none-any.whl/muphyn/packages/interface/base/shapes/basic_shape/shapes.py | from enum import Enum
from typing import Iterable, overload, Union
from PyQt6.QtCore import QLine, QLineF, QPointF, QRectF, QSize, QSizeF, Qt, pyqtSignal
from PyQt6.QtGui import QColor, QGradient, QFont, QFontMetricsF, QGradient, QPainter, QPainterPath
from PyQt6.QtWidgets import QStyleOptionGraphicsItem
from muphyn... | PypiClean |
/Kerko-1.0.0-py3-none-any.whl/kerko/sync/index.py |
import whoosh
from flask import current_app
from whoosh.query import Term
from kerko.shortcuts import composer, config
from kerko.storage import (SchemaError, SearchIndexError, load_object,
open_index, save_object)
from kerko.tags import TagGate
def sync_index(full=False):
"""
Bui... | PypiClean |
/Electrum-VTC-2.9.3.3.tar.gz/Electrum-VTC-2.9.3.3/packages/dns/rdtypes/IN/NAPTR.py |
import struct
import dns.exception
import dns.name
import dns.rdata
from dns._compat import xrange, text_type
def _write_string(file, s):
l = len(s)
assert l < 256
file.write(struct.pack('!B', l))
file.write(s)
def _sanitize(value):
if isinstance(value, text_type):
return value.encode(... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/lib/scons-4.4.0/SCons/Scanner/Dir.py |
import SCons.Node.FS
from . import ScannerBase
def only_dirs(nodes):
is_Dir = lambda n: isinstance(n.disambiguate(), SCons.Node.FS.Dir)
return [node for node in nodes if is_Dir(node)]
def DirScanner(**kwargs):
"""Return a prototype Scanner instance for scanning
directories for on-disk files"""
kw... | PypiClean |
/Hecuba-2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/hecuba/__init__.py | import logging
import os
import time
from cassandra.cluster import Cluster
from cassandra.policies import RetryPolicy, RoundRobinPolicy, TokenAwarePolicy
# Set default log.handler to avoid "No handler found" warnings.
stderrLogger = logging.StreamHandler()
f = '%(filename)s: %(levelname)s: %(funcName)s(): %(lineno)d... | PypiClean |
/DRAM_bio-1.4.6-py3-none-any.whl/mag_annotator/pull_sequences.py | import pandas as pd
from skbio import read as read_sequence
from skbio import write as write_sequence
from os import mkdir, path
import warnings
import logging
from mag_annotator.summarize_vgfs import filter_to_amgs
from mag_annotator.utils import setup_logger
from mag_annotator.summarize_genomes import get_ids_from_a... | PypiClean |
/IpfsML-1.0.2.tar.gz/IpfsML-1.0.2/nft_storage/api/nft_storage_api.py | import re # noqa: F401
import sys # noqa: F401
from nft_storage.api_client import ApiClient, Endpoint as _Endpoint
from nft_storage.model_utils import ( # noqa: F401
check_allowed_values,
check_validations,
date,
datetime,
file_type,
none_type,
validate_and_convert_types
)
from nft_stora... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dijit/tree/_dndSelector.js.uncompressed.js | define("dijit/tree/_dndSelector", [
"dojo/_base/array", // array.filter array.forEach array.map
"dojo/_base/connect", // connect.isCopyKey
"dojo/_base/declare", // declare
"dojo/_base/lang", // lang.hitch
"dojo/mouse", // mouse.isLeft
"dojo/on",
"dojo/touch",
"dojo/_base/window", // win.global
"./_dndContainer... | PypiClean |
/APIMaticSampleCalcPyPI-1.2-py3-none-any.whl/calculatormharis/configuration.py | from enum import Enum
from calculatormharis.http.requests_client import RequestsClient
class Environment(Enum):
"""An enum for SDK environments"""
PRODUCTION = 0
class Server(Enum):
"""An enum for API servers"""
DEFAULT = 0
class Configuration(object):
"""A class used for configuring the SDK b... | PypiClean |
/LZBEAT-0.13.1.tar.gz/LZBEAT-0.13.1/econml/inference/_bootstrap.py |
"""Bootstrap sampling."""
import numpy as np
from joblib import Parallel, delayed
from sklearn.base import clone
from scipy.stats import norm
from collections import OrderedDict
import pandas as pd
class BootstrapEstimator:
"""Estimator that uses bootstrap sampling to wrap an existing estimator.
This estima... | PypiClean |
/Colorings-1.0.2.tar.gz/Colorings-1.0.2/colorings/__init__.py | import re
class argumentError(Exception):
pass
class colorings:
"""
CONTAINS STATICS METHODS TO COLORS TEXT AND KNOWN COLORS CONSTANTS
"""
hex_letter = list("ABCDEF")
correspondance = {"A": 10, "B": 11, "C": 12, "D": 13, "E": 14, "F": 15}
# Basic colors
RED = "\033[38;2;255;0;0m"
... | PypiClean |
/Bottlechest-0.7.1-cp34-cp34m-macosx_10_9_x86_64.whl/bottlechest/src/template/func/partsort.py | "partsort template"
from copy import deepcopy
import bottlechest as bn
__all__ = ["partsort"]
FLOAT_DTYPES = [x for x in bn.dtypes if 'float' in x]
INT_DTYPES = [x for x in bn.dtypes if 'int' in x]
# loops ---------------------------------------------------------------------
loop = {}
loop[1] = """\
if nAXIS =... | PypiClean |
/CLOVER_GUI-1.0.0a1-py3-none-any.whl/clover_gui/load_location.py |
import os
import tkinter as tk
from typing import Callable
import ttkbootstrap as ttk
from clover import LOCATIONS_FOLDER_NAME
from ttkbootstrap.constants import *
from ttkbootstrap.scrolled import *
from .__utils__ import BaseScreen, LOAD_LOCATION_GEOMETRY
__all__ = ("LoadLocationWindow",)
class LoadLocationSc... | PypiClean |
/Neis_API-0.6.0-py3-none-any.whl/Neis_API/__init__.py | __all__ = ['mealInfo', 'schoolInfo', 'schoolschedule']
from .mealInfo import get_meal_data
from .schoolInfo import get_school_data
from .schoolschedule import get_schedule_data
class Region:
"""
SEOUL : B10\n
BUSAN : C10\n
DAEGU : D10\n
INCHEON : E10\n
GWANGJU : F10\n
DAEJEON : G10\n
... | PypiClean |
/FALCONN-1.3.1.tar.gz/FALCONN-1.3.1/external/pybind11/docs/advanced/functions.rst | Functions
#########
Before proceeding with this section, make sure that you are already familiar
with the basics of binding functions and classes, as explained in :doc:`/basics`
and :doc:`/classes`. The following guide is applicable to both free and member
functions, i.e. *methods* in Python.
.. _return_value_policie... | PypiClean |
/MnemoPwd-1.2.1-py3-none-any.whl/mnemopwd/pyelliptic/cipher.py |
# Copyright (c) 2014 Yann GUIBET <yannguibet@gmail.com>.
# 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... | PypiClean |
/EXtra_data-1.14.0-py3-none-any.whl/extra_data/keydata.py | from typing import List, Optional, Tuple
import numpy as np
from .exceptions import TrainIDError, NoDataError
from .file_access import FileAccess
from .read_machinery import (
contiguous_regions, DataChunk, select_train_ids, split_trains, roi_shape
)
class KeyData:
"""Data for one key in one source
Don'... | PypiClean |
/Elite-1.1.1.tar.gz/Elite-1.1.1/README.md | # Elite v1.1.1
A lightweight module for elliptic-curve security schemes.
*Repository: https://github.com/origamizyt/Elite*
---
## 1. Installation
This module is available on PyPI, which you can install by running the command below:
```
pip install Elite
```
The source code is also available on Github.
## 2. Usag... | PypiClean |
/KaTrain-1.14.0-py3-none-any.whl/katrain/gui/widgets/graph.py | import math
import threading
from kivy.lang import Builder
from kivy.metrics import dp
from kivy.properties import BooleanProperty, Clock, ListProperty, NumericProperty, StringProperty
from kivy.uix.widget import Widget
from kivymd.app import MDApp
from katrain.gui.theme import Theme
class Graph(Widget):
marker... | PypiClean |
/Djblets-3.3.tar.gz/Djblets-3.3/docs/releasenotes/0.6.26.rst | ============================
Djblets 0.6.26 Release Notes
============================
**Release date**: November 5, 2012
djblets.gravatars
=================
* Added a :py:func:`get_gravatar_url` function, which can be used to get
the URL for a user's gravatar without generating HTML.
* Made gravatar support sma... | PypiClean |
/hypr-0.8.4.tar.gz/hypr-0.8.4/hypr/ext/models.py | import inspect
from collections import defaultdict
class BaseModel:
"""Base class of all models."""
@classmethod
def _key(cls):
"""Get the key of a model.
The key is a set of properties used to determine the unique identifier
of a resource.
Returns:
a tuple.
... | PypiClean |
/Deeplodocus-0.3.0-py3-none-any.whl/deeplodocus/data/load/source.py | from typing import Any
from typing import Tuple
from typing import Optional
from typing import Union
# Deeplodocus imports
from deeplodocus.utils.notification import Notification
# Deeplodocus flags
from deeplodocus.flags import DEEP_NOTIF_ERROR, DEEP_NOTIF_WARNING
class Source(object):
"""
AUTHORS:
---... | PypiClean |
/ContactVis-0.1.6.tar.gz/ContactVis-0.1.6/contactvis/get_avg_contact_distance.py | import sys
import math
import parse_contacts
import parse_fasta
def get_min_dist(contact, contact_lst):
min_dist = float('inf')
x0 = contact[1]
y0 = contact[2]
for curr_contact in contact_lst:
x1 = curr_contact[1]
y1 = curr_contact[2]
if x0 == x1 and y0 == y1:
c... | PypiClean |
/Django_patch-2.2.19-py3-none-any.whl/django/contrib/contenttypes/management/commands/remove_stale_contenttypes.py | from django.apps import apps
from django.contrib.contenttypes.models import ContentType
from django.core.management import BaseCommand
from django.db import DEFAULT_DB_ALIAS, router
from django.db.models.deletion import Collector
from ...management import get_contenttypes_and_models
class Command(BaseCommand):
... | PypiClean |
/GQCMS-0.0.4-py3-none-any.whl/build/lib/build/lib/build/lib/build/lib/build/lib/gqcms/HartreeFock.py | from dataclasses import dataclass, field
from scipy import linalg
import numpy as np
import pandas as pd
from collections import deque
from gqcms import Hubbard
from .General import IterativeAlgorithm, DIIS
@dataclass
class HubbardEnvironment:
"""
Class that stores variables used during Hubbard Hartree-Fock ... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/meter_calendarized_use_vs_weather_response.py |
from msrest.serialization import Model
class MeterCalendarizedUseVsWeatherResponse(Model):
"""MeterCalendarizedUseVsWeatherResponse.
:param year: The year
:type year: int
:param is_heating_weather_sensitive: Is heating weather sensitive?
:type is_heating_weather_sensitive: bool
:param winter... | PypiClean |
/DStore-0.1.2.tar.gz/DStore-0.1.2/dstore/Error.py | class BaseError( Exception ): pass
class StoreError( BaseError ):
def __init__( self, store, *args, **kwargs ):
self.store = store
super( StoreError, self ).__init__( *args, **kwargs )
class ModelError( StoreError ):
def __init__( self, store, model, *args, **kwargs ):
self.model = m... | PypiClean |
/FuzzyClassificator-1.3.84-py3-none-any.whl/pybrain/rl/environments/twoplayergames/pente.py | __author__ = 'Tom Schaul, tom@idsia.ch'
from pybrain.rl.environments.twoplayergames.gomoku import GomokuGame
class PenteGame(GomokuGame):
""" The game of Pente.
The rules are similar to Go-Moku, except that it is now possible to capture
stones, in pairs, by putting stones at both ends of a pair of the o... | PypiClean |
/Flask-Discord-Interactions-2.1.2.tar.gz/Flask-Discord-Interactions-2.1.2/flask_discord_interactions/command.py | import re
import enum
import inspect
import itertools
from typing import Callable, List, Dict, TYPE_CHECKING
from flask import Flask
from flask_discord_interactions.context import Context, AsyncContext
from flask_discord_interactions.models import (
Message,
Modal,
CommandOptionType,
ApplicationComma... | PypiClean |
/ISRpy-0.0.22.tar.gz/ISRpy-0.0.22/README.md | # ISRpy
Utility and application modules for incoherent scatter radar (ISR) and coherent scatter radar (CSR)
data processing and modeling.
ISR's are radar systems with large power-aperture products being used in ionospheric probing to
detect weak returns scattered from thermal level fluctuations encountered in ionos... | PypiClean |
/LinOTP-2.11.1.tar.gz/LinOTP-2.11.1/linotp/public/js/tools.js | function create_tools_getserial_dialog() {
var $dialog = $('#dialog_get_serial').dialog({
autoOpen: false,
title: 'Get Serial by OTP value',
width: 600,
modal: true,
buttons: {
'Get Serial': { click: function(){
getSerialByOtp($('#tools_g... | PypiClean |
/KratosFluidDynamicsApplication-9.4-cp38-cp38-win_amd64.whl/KratosMultiphysics/FluidDynamicsApplication/navier_stokes_solver_vmsmonolithic.py | import KratosMultiphysics
# Import applications
import KratosMultiphysics.FluidDynamicsApplication as KratosCFD
# Import base class file
from KratosMultiphysics.FluidDynamicsApplication.fluid_solver import FluidSolver
class StabilizedFormulation(object):
"""Helper class to define stabilization-dependent paramete... | PypiClean |
/DJModels-0.0.6-py3-none-any.whl/djmodels/utils/timesince.py | import calendar
import datetime
from djmodels.utils.html import avoid_wrapping
from djmodels.utils.timezone import is_aware, utc
from djmodels.utils.translation import gettext, ngettext_lazy
TIME_STRINGS = {
'year': ngettext_lazy('%d year', '%d years'),
'month': ngettext_lazy('%d month', '%d months'),
'we... | PypiClean |
/Jalapeno-Lite-0.1.3.tar.gz/Jalapeno-Lite-0.1.3/Jalapeno_data/Sites/first/Pages/blog/20.md | title: Python爬虫之为BeautifulSoup添加索引查找
date: 2017-02-18
tag: Python爬虫
[TOC]
<!--Sidebar-->
最近在帮金融教授爬取优先股的数据,要求不能过滤掉部分信息缺失的数据并将缺失部分用"N/A"填充。这样一来必须要使用正则表达式将原始数据切成很小片,很不方便,好在有解析利器 BeautifulSoup,但是不知道什么原因BeautifulSoup只能索引到多个同类子节点的第一个节点。不能索引给我造成了极大困扰,有时候甚至还是需要使用纯正则来解析数据。思前想后我决定自己为其添加索引功能以备不时之需。
<!--More-->
下面我们通过例子来讲解如何... | PypiClean |
/Nitrous-0.9.3-py3-none-any.whl/turbogears/i18n/data/hr.py |
languages={'el': u'gr\u010dki', 'en': 'engleski', 'zh': 'kineski', 'it': 'talijanski', 'ar': 'arapski', 'cs': u'\u010de\u0161ki', 'et': 'estonijski', 'es': u'\u0161panjolski', 'ru': 'ruski', 'nl': 'nizozemski', 'pt': 'portugalski', 'no': u'norve\u0161ki', 'tr': 'turski', 'lv': 'latvijski', 'lt': 'litvanski', 'ro': 'ru... | PypiClean |
/Clorm-1.4.1-py3-none-any.whl/clorm/json.py | from collections.abc import Mapping
import clingo
import json
from .orm import *
__all__ = [
'symbol_encoder',
'symbol_decoder',
'FactBaseCoder'
]
def _raise(obj):
otype = type(obj)
raise TypeError("Object of type '{}' is not JSON serializable".format(otype))
#------------------------------------... | PypiClean |
/Interplanetary_Invaders-0.7-py3-none-any.whl/interplanetary_invaders/scripts/store_data.py | from interplanetary_invaders.scripts import items
from interplanetary_invaders.scripts.vehicles import Zapper as zapper, VenusCrawler as venuscrawler, JupiterHover as jupiterhover, Curiosity as curiosity
import random
from copy import copy
ITEM_AMOUNT = (3, 10)
LISENCE_AMOUNT = (1, 4)
VEHICLE_AMOUNT = (1, 1)
class St... | PypiClean |
/Flask-AppBuilder-redirect-2.1.13.tar.gz/Flask-AppBuilder-redirect-2.1.13/flask_appbuilder/const.py | from flask_babel import lazy_gettext
"""
All constants and messages definitions go here
Log messages obey the following rule:
LOGMSG_<SEV>_<MODULE>_<NAME>
<SEV> :- INF | DEB | WAR | ERR
<MODULE> :- SEC
Flash messages obey the following rule:
FLAMSG_<SEV>_<MODULE>... | PypiClean |
/FastNLP-1.0.1.tar.gz/FastNLP-1.0.1/fastNLP/core/drivers/choose_driver.py | from typing import Union, Optional, List
from .driver import Driver
from ..utils import is_torch_module, is_paddle_module, is_jittor_module, is_oneflow_module
__all__ = []
def choose_driver(model, driver: Union[str, Driver], device: Optional[Union[int, List[int], str]], **kwargs) -> Driver:
r"""
根据输入的参数 ``dr... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/codemirror/addon/search/matchesonscrollbar.js |
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("./searchcursor"), require("../scroll/annotatescrollbar"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror", "./searchcursor", "..... | PypiClean |
/NeXpy-1.0.4-py3-none-any.whl/nexpy/gui/mainwindow.py | # -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
import glob
import logging
import os
import re
import sys
import webbrowser
import xml.etree.ElementTree as ET
from operator import attrgetter
from pa... | PypiClean |
/LineDetect-0.12.tar.gz/LineDetect-0.12/README.md | [](https://opensource.org/licenses/LGPL-3.0)
# LineDetect:
LineDetect is an open-source program for identifying and fitting absorption lines in
quasar spectra.
# Installation
```
$ pip install LineDetect
```
# [Documentation](https://lin... | PypiClean |
/MetaGram-2.0.2.tar.gz/MetaGram-2.0.2/pyrogram/methods/messages/send_photo.py |
import os
import re
from datetime import datetime
from typing import Union, BinaryIO, List, Optional, Callable
import pyrogram
from pyrogram import raw, enums
from pyrogram import types
from pyrogram import utils
from pyrogram.errors import FilePartMissing
from pyrogram.file_id import FileType
class SendPhoto:
... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/utils/Yaml.py | import os
import pkgutil
from nuitka.containers.OrderedDicts import OrderedDict
from nuitka.Options import getUserProvidedYamlFiles
from nuitka.Tracing import general
from .FileOperations import getFileContents
from .Importing import importFromInlineCopy
class Yaml(object):
__slots__ = (
"name",
... | PypiClean |
/LiMiC-0.3.20.tar.gz/LiMiC-0.3.20/limic/render.py | GRAPH = (("file_name_in",),{'type':str,'help':"use graph file GRAPH",'metavar':'GRAPH'})
HTML = (("file_name_out",),{'type':str,'help':"render to file HTML",'metavar':'HTML'})
COMPONENTS = (("components",),{'type':int,'nargs':'*','help':"components to visualize (default: -1 for all)",'metavar':'COMPONENT'})
MARKERS = (... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/ats/model/available_actions.py | import re # noqa: F401
import sys # noqa: F401
from typing import (
Optional,
Union,
List,
Dict,
)
from MergePythonSDK.shared.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
OpenApiModel,
change_keys_js_to_python,... | PypiClean |
/Beetle-0.7.1.tar.gz/Beetle-0.7.1/beetle/base.py | import yaml
import os
from .utils import read_folder, remove_leading_folder
class Config:
def __init__(self, data):
self.folders = {
'content': 'content',
'output': 'output',
'templates': 'templates',
'include': 'include',
}
self.page_defaul... | PypiClean |
/Flask-RangeRequest-0.0.2.tar.gz/Flask-RangeRequest-0.0.2/README.md | # Flask-RangeRequest
[](https://pypi.python.org/pypi/Flask-RangeRequest) [](https://api.travis-ci.org/heartsucker/flask-rangerequest.svg?branch=develop) [![Documentation Stat... | PypiClean |
/JaqalPaw-1.2.0a1.tar.gz/JaqalPaw-1.2.0a1/src/jaqalpaw/bytecode/spline_mapping.py | import numpy as np
# ######################################################## #
# ------------ pdq Spline Coefficient Mapping ------------ #
# ######################################################## #
def cs_mapper_int(interp_table, nsteps=409625, shift_len=16):
"""Map spline coefficients into representation th... | PypiClean |
/Impression-CMS-0.2.0.tar.gz/Impression-CMS-0.2.0/impression/themes/admin/static/js/typeahead.js | !function(a){var b="0.9.3",c={isMsie:function(){var a=/(msie) ([\w.]+)/i.exec(navigator.userAgent);return a?parseInt(a[2],10):!1},isBlankString:function(a){return!a||/^\s*$/.test(a)},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(a){return"string"==typeof ... | PypiClean |
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/predictors/mask_rcnn_box_predictor.py |
"""Mask R-CNN Box Predictor."""
from object_detection.core import box_predictor
BOX_ENCODINGS = box_predictor.BOX_ENCODINGS
CLASS_PREDICTIONS_WITH_BACKGROUND = (
box_predictor.CLASS_PREDICTIONS_WITH_BACKGROUND)
MASK_PREDICTIONS = box_predictor.MASK_PREDICTIONS
class MaskRCNNBoxPredictor(box_predictor.BoxPredic... | PypiClean |
/BRAILS-3.0.1.tar.gz/BRAILS-3.0.1/brails/modules/ChimneyDetector/lib/utils/utils.py |
import os
import cv2
import numpy as np
import torch
from glob import glob
from torch import nn
from torchvision.ops import nms
from torchvision.ops.boxes import batched_nms
from typing import Union
import uuid
from lib.utils.sync_batchnorm import SynchronizedBatchNorm2d
from torch.nn.init import _calculate_fan_in_... | PypiClean |
/My-CountriesAPI-12345-1.0.tar.gz/My-CountriesAPI-12345-1.0/my_countries_api_12345/controllers/base_controller.py | from my_countries_api_12345.api_helper import APIHelper
from my_countries_api_12345.http.http_context import HttpContext
from my_countries_api_12345.http.requests_client import RequestsClient
from my_countries_api_12345.exceptions.api_exception import APIException
class BaseController(object):
"""All controllers ... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ace/ext-spellcheck.js | ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"], function(require, exports, module) {
"use strict";
var event = require("../lib/event");
exports.contextMenuHandler = function(e){
var host = e.target;
var text = host.textInput.getElement();
if (!host.... | PypiClean |
/LabExT_pkg-2.2.0.tar.gz/LabExT_pkg-2.2.0/docs/code_new_meas_example.md | # Example: Simple OSA Measurement
For this example on how to get started, we'll be looking at a simple measurement using an Optical
Spectrum Analyzer (OSA). We will need to do two things:
1. Implement the measurement in a new measurement class which we will call `ReadOSA`
2. and interface the OSA via the instrument ... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.