code stringlengths 114 1.05M | path stringlengths 3 312 | quality_prob float64 0.5 0.99 | learning_prob float64 0.2 1 | filename stringlengths 3 168 | kind stringclasses 1
value |
|---|---|---|---|---|---|
from typing import *
from pymysql import ProgrammingError
class SqlSyntaxError(ProgrammingError):
def __init__(self, error_msg: str, line: int):
super(SqlSyntaxError, self).__init__(f"Syntax Error: \n {error_msg}"
f" at line {line}")
class EmptySqlError(SqlSy... | /rich-torndb-0.0.1.tar.gz/rich-torndb-0.0.1/rich_torndb/utils/sql_invalid_errors.py | 0.677581 | 0.207877 | sql_invalid_errors.py | pypi |
from typing import *
from rich_torndb.utils.sql_invalid_errors import MissingIfNoExistsSqlError
from rich_torndb.utils.sql_valid_checker import SqlValidChecker, CreateSqlValidChecker
class SqlFormatter(object):
def __init__(self, sql):
self.sql = sql if sql is not None else ""
self.formatted = Fa... | /rich-torndb-0.0.1.tar.gz/rich-torndb-0.0.1/rich_torndb/utils/sql_formatter.py | 0.53777 | 0.159971 | sql_formatter.py | pypi |
from __future__ import annotations
from typing import Any, Callable, Dict, List, Optional, Type, Union, Sequence, Tuple
import click
from click.core import Context, Parameter
from typer.core import TyperCommand, TyperGroup
from .formatting import RichHelpFormatter
def _rich_typer_format_banner(
self: click.cor... | /rich_typer-0.1.7.tar.gz/rich_typer-0.1.7/rich_typer/core.py | 0.859074 | 0.154631 | core.py | pypi |
from __future__ import annotations
import re
from contextlib import contextmanager
from typing import Iterator, List, Optional, Tuple, Dict
from click import HelpFormatter as ClickHelpFormatter
from rich.console import Console, JustifyMethod
from rich.highlighter import RegexHighlighter
from rich.panel import Panel
f... | /rich_typer-0.1.7.tar.gz/rich_typer-0.1.7/rich_typer/formatting.py | 0.709824 | 0.210442 | formatting.py | pypi |
from rich.progress import Progress, ProgressColumn, BarColumn, Text
def ema(x, mu=None, alpha=0.3):
"""
Exponential moving average: smoothing to give progressively lower
weights to older values.
Parameters
----------
x : float
New value to include in EMA.
mu : float, optional
... | /rich_utils-0.4.0-py3-none-any.whl/rich_utils/progress.py | 0.868465 | 0.410934 | progress.py | pypi |
from typing import List, Optional
from rich.segment import Segment
from rich.style import Style
def render_bar(
height: int = 25,
size: float = 100,
window_size: float = 25,
position: float = 0,
bar_style: Optional[Style] = None,
back_style: Optional[Style] = None,
ascii_only: bool = Fals... | /rich.tui-0.1.0-py3-none-any.whl/rich/tui/scrollbar.py | 0.804098 | 0.324155 | scrollbar.py | pypi |
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 ... | /richard_distributions-0.3.tar.gz/richard_distributions-0.3/richard_distributions/Gaussiandistribution.py | 0.688364 | 0.853058 | Gaussiandistribution.py | pypi |
import matplotlib as mpl
import palettable
def figsze(hscale,
vscale=0.618034,
fig_width_pt = 504.0):
"""Get the fig_width_pt by inserting the textwidth into LaTeX document.
hscale is fraction of text width you want.
vscale is fraction of hscale (defaults to golden ratio)
"""... | /richardsplot-1.1.tar.gz/richardsplot-1.1/richardsplot.py | 0.510985 | 0.417271 | richardsplot.py | pypi |
# richcontext.scholapi
[Rich Context](https://coleridgeinitiative.org/richcontext)
API integrations for federating discovery services and metadata
exchange across multiple scholarly infrastructure providers.
Development of the Rich Context knowledge graph uses this library to:
* identify dataset links to research ... | /richcontext-scholapi-1.2.0.tar.gz/richcontext-scholapi-1.2.0/README.md | 0.606032 | 0.876264 | README.md | pypi |
from .client import RichDaddyClient
import typing
from loguru import logger
class RichDaddyMethods:
def __init__(self, client: RichDaddyClient):
"""
Создание экземпляра
:param AsyncRichDaddyClient client: объект клиента AsyncRichDaddyClient
"""
self.client = client... | /richdaddy_sdk-1.0.0-py3-none-any.whl/richdaddy_sdk/syncrichdaddy/methods.py | 0.518059 | 0.234024 | methods.py | pypi |
from .client import AsyncRichDaddyClient
import asyncio
import typing
from loguru import logger
class ARichDaddyMethods:
def __init__(self, client: AsyncRichDaddyClient):
"""
Создание экземпляра
:param AsyncRichDaddyClient client: объект клиента AsyncRichDaddyClient
"""
... | /richdaddy_sdk-1.0.0-py3-none-any.whl/richdaddy_sdk/aiorichdaddy/methods.py | 0.52683 | 0.22251 | methods.py | pypi |
import hashlib
import hmac
import json
import logging
from typing import Dict
import requests
from celery import shared_task
from django.conf import settings
from opaque_keys.edx.keys import CourseKey
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
from common.djangoapps.student... | /richie_openedx_sync-1.2.0-py3-none-any.whl/richie_openedx_sync/tasks.py | 0.600188 | 0.265214 | tasks.py | pypi |
import logging
from typing import Dict
from django.core.management.base import BaseCommand
from six import text_type
from xmodule.modulestore.django import modulestore
from richie_openedx_sync.tasks import sync_course_run_information_to_richie
from opaque_keys.edx.keys import CourseKey
log = logging.getLogger(__name... | /richie_openedx_sync-1.2.0-py3-none-any.whl/richie_openedx_sync/management/commands/sync_courses_to_richie.py | 0.555797 | 0.173919 | sync_courses_to_richie.py | pypi |
import requests
import json
import logging
from richkit.retrieve.x509 import X509
from datetime import datetime
logger = logging.getLogger(__name__)
class DomainCertificates:
"""
This class provides the functions to get certificates of a given domain.
The website used to get them is crt.sh
"""
#... | /retrieve/cert_sh.py | 0.494141 | 0.201617 | cert_sh.py | pypi |
from richkit.analyse import tld, sld, sl_label, depth, length
import statistics
import requests
import logging
import time
logger = logging.getLogger(__name__)
class X509:
"""
This class provides functions to extract certificate features from crt.sh
The only needed parameter is the crt.sh ID of the certi... | /retrieve/x509.py | 0.61682 | 0.365372 | x509.py | pypi |
import logging
import sys
import types
from datetime import datetime
from logging import LogRecord
from types import TracebackType
from typing import Any, Callable, Dict, Iterable, List, Optional, Type, Union
from loguru import logger
from loguru._logger import Core
from rich.console import Console, ConsoleRenderable
... | /richuru-0.1.1-py3-none-any.whl/richuru.py | 0.592431 | 0.422743 | richuru.py | pypi |
from collections.abc import Mapping
from rick_db import Repository
from rick_db.sql import Select, Literal
class DbGrid:
SEARCH_NONE = 0
SEARCH_ANY = 1
SEARCH_START = 2
SEARCH_END = 3
search_map = {SEARCH_START: "{}%", SEARCH_ANY: "%{}%", SEARCH_END: "%{}"}
def __init__(
self,
... | /rick-db-1.2.0.tar.gz/rick-db-1.2.0/rick_db/dbgrid.py | 0.794066 | 0.199269 | dbgrid.py | pypi |
from functools import lru_cache
import inspect
# Record class attribute names
ATTR_RECORD_MAGIC = "__PatchedRecordClass__"
ATTR_FIELDS = "_fieldmap"
ATTR_TABLE = "_tablename"
ATTR_SCHEMA = "_schema"
ATTR_PRIMARY_KEY = "_pk"
ATTR_ROW = "_row"
class RecordError(Exception):
pass
class Record:
def load(self, *... | /rick-db-1.2.0.tar.gz/rick-db-1.2.0/rick_db/mapper.py | 0.64791 | 0.214218 | mapper.py | pypi |
from pathlib import Path
from typing import List
from rick_db.cli.command import BaseCommand
from rick_db.util import MigrationManager
from rick_db.util.metadata import FieldRecord
class Command(BaseCommand):
command = "dto"
description = (
"generate a python data transfer object (DTO) for a given dat... | /rick-db-1.2.0.tar.gz/rick-db-1.2.0/rick_db/cli/commands/dto.py | 0.638835 | 0.207114 | dto.py | pypi |
from rick_db.mapper import ATTR_TABLE, ATTR_SCHEMA
from rick_db.sql import (
SqlStatement,
SqlDialect,
SqlError,
Sql,
Literal,
DefaultSqlDialect,
Select,
)
class Delete(SqlStatement):
def __init__(self, dialect: SqlDialect = None):
"""
DELETE constructor
:param ... | /rick-db-1.2.0.tar.gz/rick-db-1.2.0/rick_db/sql/delete.py | 0.627723 | 0.28429 | delete.py | pypi |
from typing import Union
from rick_db.sql import (
SqlDialect,
DefaultSqlDialect,
SqlStatement,
Sql,
Literal,
)
class With(SqlStatement):
def __init__(self, dialect: SqlDialect = None):
"""
WITH constructor
"""
self._clauses = [] # each clause is (name, with_q... | /rick-db-1.2.0.tar.gz/rick-db-1.2.0/rick_db/sql/sql_with.py | 0.828592 | 0.301619 | sql_with.py | pypi |
from dataclasses import dataclass
from datetime import datetime
from typing import Optional, List
from rick_db import Repository, fieldmapper
from rick_db.conn import Connection
from rick_db.util import Metadata
MIGRATION_TABLE = "_migration"
@fieldmapper(tablename=MIGRATION_TABLE, pk="id_migration")
class Migratio... | /rick-db-1.2.0.tar.gz/rick-db-1.2.0/rick_db/util/migrations.py | 0.862178 | 0.220846 | migrations.py | pypi |
from typing import Optional
from typing import List
from rick_db import fieldmapper
from rick_db.conn import Connection
@fieldmapper
class FieldRecord:
field = "field"
type = "type"
primary = "primary"
@fieldmapper()
class UserRecord:
name = "name"
superuser = "superuser"
createdb = "create... | /rick-db-1.2.0.tar.gz/rick-db-1.2.0/rick_db/util/metadata.py | 0.922089 | 0.309989 | metadata.py | pypi |
from typing import Optional
from typing import List
from rick_db.sql import Sqlite3SqlDialect, Select
from rick_db.util import Metadata
from rick_db.util.metadata import FieldRecord, UserRecord
class Sqlite3Metadata(Metadata):
def tables(self, schema=None) -> List:
"""
List all available tables on... | /rick-db-1.2.0.tar.gz/rick-db-1.2.0/rick_db/util/sqlite/metadata.py | 0.90562 | 0.345464 | metadata.py | pypi |
from typing import Optional, List
from rick_db.conn import Connection
from rick_db.util import Metadata
from rick_db.sql import Select, Literal
from rick_db.util.metadata import FieldRecord, UserRecord
from .pginfo import PgInfo
class PgMetadata(Metadata):
SCHEMA_DEFAULT = "public"
def __init__(self, db: Co... | /rick-db-1.2.0.tar.gz/rick-db-1.2.0/rick_db/util/pg/metadata.py | 0.896825 | 0.258703 | metadata.py | pypi |
from typing import List, Optional
from rick_db.conn import Connection
from rick_db.sql import Select, PgSqlDialect, Literal
from rick_db.util.metadata import FieldRecord
from rick_db.util.pg.records import (
DatabaseRecord,
RoleRecord,
TableSpaceRecord,
SettingRecord,
NamespaceRecord,
TableReco... | /rick-db-1.2.0.tar.gz/rick-db-1.2.0/rick_db/util/pg/pginfo.py | 0.885117 | 0.32178 | pginfo.py | pypi |
import os
import shutil
from datetime import datetime, timedelta
from io import BytesIO, StringIO
from pathlib import PurePath, Path
from typing import Union, Any, List
import magic
from rick_vfs.utils import dict_extract
from rick_vfs.vfs import VfsObjectInfo, VfsVolume, VfsContainer, VfsError
class LocalObjectInf... | /rick_vfs-1.0.0.tar.gz/rick_vfs-1.0.0/rick_vfs/local/local.py | 0.74055 | 0.228974 | local.py | pypi |
from typing import Dict
from urllib.parse import quote_plus
import aiohttp
from jwcrypto import jwk
import python_jwt as jwt
from jwcrypto.jws import InvalidJWSObject, InvalidJWSSignature
ALLOWED_FLOWS = ["otp", "magic"]
class AuthClientError(Exception):
pass
class AppNotFound(AuthClientError):
pass
cla... | /ricks-auth-service-client-0.1.2.tar.gz/ricks-auth-service-client-0.1.2/ricks_auth_service_client.py | 0.83346 | 0.209915 | ricks_auth_service_client.py | pypi |
# rico: rich content to HTML as easy as Doc(df, plot)
**rico** is a Python package for creating HTML documents from rich content: dataframes, plots, images, markdown etc. It provides a high-level, easy-to-use API with reasonable defaults, as well as low-level access for better control.
[:
def __init__(self, first_name, last_name, email, scans_path):
self.first_name = first_name
self.last_name = last_name
if not email:
email = ""
self.email = email
self.scans_path = scans_path
@classmethod
def from_ldap_dict(cls, d, scan... | /ricoh-ldap-sync-0.1.1.tar.gz/ricoh-ldap-sync-0.1.1/ricoh_ldap_sync/user.py | 0.614741 | 0.245831 | user.py | pypi |
import os
import argparse
import sys
import logging
try:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
except ImportError:
import tensorflow as tf
from tensorflow.python.framework import graph_util
from tensorflow.python.framework import ops
logging.basicConfig(
format="%(asctime)s | %(le... | /rid_kit-0.6.2-py3-none-any.whl/rid/nn/freeze.py | 0.478285 | 0.204342 | freeze.py | pypi |
from rid.task.task import Task
from abc import ABC, abstractmethod
from typing import Dict, List, Optional, Union, Sequence
import numpy as np
from rid.constants import (
gmx_conf_name,
lmp_conf_name,
gmx_top_name,
lmp_input_name,
gmx_mdp_name,
plumed_input_name,
)
f... | /rid_kit-0.6.2-py3-none-any.whl/rid/task/builder.py | 0.881946 | 0.186706 | builder.py | pypi |
import os, sys
from typing import Union, List, Optional
import logging
import numpy as np
import sklearn.cluster as skcluster
from matplotlib import pyplot as plt
from rid.constants import cluster_fig
from pathlib import Path
logging.basicConfig(
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
... | /rid_kit-0.6.2-py3-none-any.whl/rid/select/cluster.py | 0.6705 | 0.352648 | cluster.py | pypi |
from typing import List, Optional, Dict
from pathlib import Path
import numpy as np
from dflow.python import (
OP,
OPIO,
OPIOSign,
Artifact,
Parameter,
BigParameter
)
from rid.utils import save_txt, set_directory
from rid.constants import sel_gro_name, sel_lmp_name, cv_init_label, model_devi_nam... | /rid_kit-0.6.2-py3-none-any.whl/rid/op/run_select.py | 0.816004 | 0.327883 | run_select.py | pypi |
from logging import raiseExceptions
from dflow.python import (
OP,
OPIO,
OPIOSign,
Artifact,
BigParameter
)
from typing import List, Dict, Union
from pathlib import Path
from rid.constants import (
plumed_output_name
)
from rid.task.builder import EnhcMDTaskBuilder
class PrepExplore(O... | /rid_kit-0.6.2-py3-none-any.whl/rid/op/prep_exploration.py | 0.909584 | 0.583856 | prep_exploration.py | pypi |
from typing import List, Optional, Dict
from pathlib import Path
import numpy as np
from dflow.python import (
OP,
OPIO,
OPIOSign,
Artifact,
Parameter,
BigParameter
)
from rid.utils import save_txt, set_directory
from rid.mcmc.walker import Walker, my_hist1d, my_hist2d, my_hist1d_path, my_hist2d... | /rid_kit-0.6.2-py3-none-any.whl/rid/op/mcmc_run.py | 0.80905 | 0.195172 | mcmc_run.py | pypi |
import os, sys, shutil, logging
from typing import List, Dict
from pathlib import Path
from copy import deepcopy
from dflow.python import (
OP,
OPIO,
OPIOSign,
Artifact,
BigParameter
)
from rid.utils import load_json
from rid.constants import model_tag_fmt, init_conf_gmx_name, init_conf_lmp_name,ini... | /rid_kit-0.6.2-py3-none-any.whl/rid/op/prep_rid.py | 0.620622 | 0.205795 | prep_rid.py | pypi |
from dflow.python import (
OP,
OPIO,
OPIOSign,
Artifact
)
import os
from typing import List
from pathlib import Path
from rid.constants import (
data_new,
data_raw
)
from rid.utils import load_txt
import numpy as np
class CollectData(OP):
r"""Gather data of different simulatio... | /rid_kit-0.6.2-py3-none-any.whl/rid/op/prep_data.py | 0.664867 | 0.306514 | prep_data.py | pypi |
import numpy as np
from typing import List, Dict
from pathlib import Path
from dflow.python import (
OP,
OPIO,
OPIOSign,
Artifact,
Parameter,
BigParameter
)
from rid.constants import tf_model_name, train_fig, train_log
from rid.nn.train_net import train
from rid.nn.freeze import freeze_model
fro... | /rid_kit-0.6.2-py3-none-any.whl/rid/op/run_train.py | 0.863636 | 0.435902 | run_train.py | pypi |
from dflow.python import (
OP,
OPIO,
OPIOSign
)
class AdjustTrustLevel(OP):
r"""AdjustTrustLeve OP adjust trust level according to the number of cluster (`numb_cluster`) and
the number of cluster threshold (`numb_cluster_threshold`). If numb_cluster < numb_cluster_threshold,
the trust le... | /rid_kit-0.6.2-py3-none-any.whl/rid/op/adjust_trust_level.py | 0.858051 | 0.446133 | adjust_trust_level.py | pypi |
from typing import List, Optional, Dict
from pathlib import Path
import numpy as np
from dflow.python import (
OP,
OPIO,
OPIOSign,
Artifact,
Parameter,
BigParameter
)
from rid.utils import save_txt, set_directory
from rid.constants import mcmc_1cv_dir_name, mcmc_1cv_name, mcmc_2cv_name,mcmc_1cv_... | /rid_kit-0.6.2-py3-none-any.whl/rid/op/mcmc_plot.py | 0.769817 | 0.259591 | mcmc_plot.py | pypi |
from dflow.python import (
OP,
OPIO,
OPIOSign,
Artifact,
Parameter,
BigParameter
)
import json
from typing import List, Dict
from pathlib import Path
from rid.constants import (
plumed_output_name
)
from rid.task.builder import RestrainedMDTaskBuilder, ConstrainedMDTaskBuilder
from ... | /rid_kit-0.6.2-py3-none-any.whl/rid/op/prep_label.py | 0.834272 | 0.271393 | prep_label.py | pypi |
from dflow.python import (
OP,
OPIO,
OPIOSign,
Artifact,
Parameter
)
from typing import List, Optional, Union
from pathlib import Path
from rid.select.cluster import Cluster
from rid.utils import save_txt, set_directory
from rid.constants import (
cluster_selection_data_name,
cluster_selec... | /rid_kit-0.6.2-py3-none-any.whl/rid/op/prep_select.py | 0.933393 | 0.696036 | prep_select.py | pypi |
from typing import Dict, List
from pathlib import Path
from dflow.python import (
OP,
OPIO,
OPIOSign,
Artifact,
Parameter,
BigParameter
)
import numpy as np
from rid.utils import set_directory
from matplotlib import pyplot as plt
from rid.constants import mf_std_fig
import os
class LabelStats(... | /rid_kit-0.6.2-py3-none-any.whl/rid/op/label_stats.py | 0.808294 | 0.416144 | label_stats.py | pypi |
from typing import Dict
from copy import deepcopy
from dflow import (
InputParameter,
Inputs,
InputArtifact,
Outputs,
OutputArtifact,
Step,
Steps
)
from dflow.python import(
PythonOPTemplate,
OP
)
from rid.utils import init_executor
class DataGenerator(Steps):
r""" Date ge... | /rid_kit-0.6.2-py3-none-any.whl/rid/superop/data.py | 0.835013 | 0.303769 | data.py | pypi |
from typing import Dict, List, Optional, Union
from copy import deepcopy
import numpy as np
from dflow import (
InputParameter,
OutputParameter,
Inputs,
InputArtifact,
Outputs,
OutputArtifact,
Step,
Steps,
argo_range,
argo_len,
)
from dflow.python import(
PythonOPTemplate,
... | /rid_kit-0.6.2-py3-none-any.whl/rid/superop/selector.py | 0.755817 | 0.354321 | selector.py | pypi |
from typing import Dict, List
from copy import deepcopy
from dflow import (
InputParameter,
Inputs,
InputArtifact,
Outputs,
OutputArtifact,
Step,
Steps,
argo_range,
argo_len,
)
from dflow.python import(
PythonOPTemplate,
OP,
Slices,
)
from rid.utils import init_executor
... | /rid_kit-0.6.2-py3-none-any.whl/rid/superop/label.py | 0.76947 | 0.318585 | label.py | pypi |
from typing import Dict, List, Optional, Union
from copy import deepcopy
import numpy as np
from dflow import (
InputParameter,
OutputParameter,
Inputs,
InputArtifact,
Outputs,
OutputArtifact,
Workflow,
Step,
Steps,
upload_artifact,
argo_range,
argo_len,
argo_sequence... | /rid_kit-0.6.2-py3-none-any.whl/rid/superop/blocks.py | 0.867976 | 0.331891 | blocks.py | pypi |
from typing import Dict, List
from copy import deepcopy
from dflow import (
InputParameter,
OutputParameter,
Inputs,
InputArtifact,
Outputs,
OutputArtifact,
Step,
Steps,
argo_range,
argo_len,
)
from dflow.python import(
PythonOPTemplate,
OP,
Slices
)
from rid.utils im... | /rid_kit-0.6.2-py3-none-any.whl/rid/superop/exploration.py | 0.726814 | 0.33012 | exploration.py | pypi |
from typing import Dict, List
from copy import deepcopy
from dflow import (
InputParameter,
OutputParameter,
Inputs,
InputArtifact,
Outputs,
OutputArtifact,
Step,
Steps,
argo_range,
argo_len,
)
from dflow.python import(
PythonOPTemplate,
OP,
Slices
)
from rid.utils im... | /rid_kit-0.6.2-py3-none-any.whl/rid/superop/mcmc.py | 0.742608 | 0.237222 | mcmc.py | pypi |
from dflow import (
InputParameter,
Inputs,
InputArtifact,
Outputs,
OutputArtifact,
Step,
Steps,
if_expression,
)
from dflow.python import(
PythonOPTemplate,
OP
)
from typing import List, Optional, Dict, Union
import numpy as np
from rid.utils import init_executor
from rid.op.pre... | /rid_kit-0.6.2-py3-none-any.whl/rid/flow/loop.py | 0.800536 | 0.366646 | loop.py | pypi |
from dflow.python import (
OP,
OPIO,
OPIOSign,
Artifact,
Parameter
)
from typing import List, Optional, Union, Dict
from pathlib import Path
import numpy as np
from rid.constants import (
cv_force_out
)
from rid.common.gromacs.trjconv import generate_coords, generate_forces
from rid.uti... | /rid_kit-0.6.2-py3-none-any.whl/rid/tools/estimator.py | 0.735547 | 0.376566 | estimator.py | pypi |
from distutils.command.config import dump_file
import json
from pathlib import Path
from typing import List, Union, Optional
from rid.utils import load_json
from copy import deepcopy
import os
from dflow import (
Workflow,
Step,
upload_artifact
)
from dflow.python import upload_packages
from rid import SR... | /rid_kit-0.6.2-py3-none-any.whl/rid/entrypoint/relabel.py | 0.615319 | 0.187021 | relabel.py | pypi |
from distutils.command.config import dump_file
import json
from pathlib import Path
from typing import List, Union, Optional
from rid.utils import load_json
from copy import deepcopy
import os
from dflow import (
Workflow,
Step,
upload_artifact
)
from dflow.python import(
PythonOPTemplate,
upload_... | /rid_kit-0.6.2-py3-none-any.whl/rid/entrypoint/explore.py | 0.586996 | 0.20832 | explore.py | pypi |
from distutils.command.config import dump_file
import json
from pathlib import Path
from typing import List, Union, Optional
from rid.utils import load_json
from copy import deepcopy
import os
from dflow import (
Workflow,
Step,
upload_artifact
)
from dflow.python import upload_packages
from rid import SR... | /rid_kit-0.6.2-py3-none-any.whl/rid/entrypoint/label.py | 0.633297 | 0.183685 | label.py | pypi |
from distutils.command.config import dump_file
import json
from pathlib import Path
from typing import List, Union, Optional
from rid.utils import load_json
import os
from dflow import (
Workflow,
Step,
upload_artifact
)
from dflow.python import upload_packages
from rid import SRC_ROOT
upload_packages.app... | /rid_kit-0.6.2-py3-none-any.whl/rid/entrypoint/submit.py | 0.670285 | 0.200969 | submit.py | pypi |
import json
from pathlib import Path
from typing import List, Union, Optional
from rid.utils import load_json
from copy import deepcopy
import os
from dflow import (
Workflow,
Step,
upload_artifact
)
from dflow.python import upload_packages
from rid import SRC_ROOT
upload_packages.append(SRC_ROOT)
from r... | /rid_kit-0.6.2-py3-none-any.whl/rid/entrypoint/redim.py | 0.578924 | 0.154344 | redim.py | pypi |
import json
from pathlib import Path
from typing import List, Union, Optional
from rid.utils import load_json
from copy import deepcopy
import os
from dflow import (
Workflow,
Step,
upload_artifact
)
from dflow.python import upload_packages
from rid import SRC_ROOT
upload_packages.append(SRC_ROOT)
from r... | /rid_kit-0.6.2-py3-none-any.whl/rid/entrypoint/reredim.py | 0.556761 | 0.17653 | reredim.py | pypi |
import os
import sys
from typing import List, Dict, Sequence, Union
import logging
import mdtraj as md
from mdtraj.geometry.dihedral import _atom_sequence, PHI_ATOMS, PSI_ATOMS
import numpy as np
from rid.constants import sel_gro_name_gmx, sel_gro_name
from rid.common.gromacs.trjconv import slice_trjconv
logging.basic... | /rid_kit-0.6.2-py3-none-any.whl/rid/common/mol.py | 0.488283 | 0.296782 | mol.py | pypi |
import json
import os
import sys
import logging
import numpy as np
from typing import List, Union, Tuple, Dict, Optional, Sequence
from rid.utils import list_to_string
from rid.common.mol import get_dihedral_from_resid, get_distance_from_atomid
from rid.common.plumed.plumed_constant import (
dihedral_name,
dist... | /rid_kit-0.6.2-py3-none-any.whl/rid/common/plumed/make_plumed.py | 0.642657 | 0.317016 | make_plumed.py | pypi |
from turtle import update
from rid.common.gromacs.gmx_constant import mdp_parameters
from typing import Optional, Dict, List, Union
def make_mdp_from_json(
task: str,
inputs:Optional[Dict] = None
) -> Dict:
assert task in mdp_parameters.keys()
mdp_json = mdp_parameters[task]
if in... | /rid_kit-0.6.2-py3-none-any.whl/rid/common/gromacs/mdp.py | 0.723895 | 0.326862 | mdp.py | pypi |
from ride import getLogger
from ride.core import AttributeDict, Configs, RideClassificationDataset
from ride.utils.env import DATASETS_PATH
logger = getLogger(__name__)
try:
import pl_bolts # noqa: F401
import torchvision # noqa: F401
except ImportError:
logger.error(
"To run the `mnist_dataset.... | /ride-0.7.2-py3-none-any.whl/examples/mnist_dataset.py | 0.872646 | 0.331715 | mnist_dataset.py | pypi |
I inserted the function called from the main:
-) displayContours
-)save_to_disk
Here I collected the following file:
-) Normal.java
-) Threshold.java
-) Offset.java
"""
from math import exp,sin,cos
from ridge_detection.basicGeometry import Region,Chord
from numpy import amax,amin,asarray
import logging
from os impor... | /ridge_detection-3.0.0-py3-none-any.whl/ridge_detection/helper.py | 0.611962 | 0.29026 | helper.py | pypi |
from tkinter import Tk, messagebox,Button, Label,scrolledtext,INSERT
from os import path, listdir
class gen_id(object):
"""
Generator, that returns the current row for the grid alignment
"""
def __init__(self):
self.row=0
def __next__(self):
return self.next()
def next(self):
... | /ridge_detection-3.0.0-py3-none-any.whl/ridge_detection/gui_helper.py | 0.61555 | 0.238961 | gui_helper.py | pypi |
Here I collected the following file:
-) Line.java --> Lines.java is treated as a python list of this object directly in the code that use it i.e. lineDetector obj
-) Chord.java
-) Region.java
-) Junction.java --> Junctions.java is treated as a python list of this object directly in the code that use i... | /ridge_detection-3.0.0-py3-none-any.whl/ridge_detection/basicGeometry.py | 0.66454 | 0.621139 | basicGeometry.py | pypi |
import logging
from json import load as json_load
from json import JSONDecodeError
from os import path
from math import sqrt,pi,exp
from ridge_detection.linesUtil import MODE_LIGHT,MODE_DARK
def load_json(config_path):
"""
Check if the config file exist and has a valid json format
:param config_path: path t... | /ridge_detection-3.0.0-py3-none-any.whl/ridge_detection/params.py | 0.594904 | 0.156717 | params.py | pypi |
from ridge_detection.helper import Offset,threshold
from math import pi,floor,atan2,sqrt, ceil, cos,sin
from ridge_detection import linesUtil
from ridge_detection.basicGeometry import Line, Junction, Region
from operator import attrgetter
import logging
from ridge_detection.helper import DEBUGGING
MAX_ANGLE_DIFFERENCE... | /ridge_detection-3.0.0-py3-none-any.whl/ridge_detection/link.py | 0.724383 | 0.62395 | link.py | pypi |
from math import ceil
""" list of constant present in LineUtils.java"""
DERIV_R = 1 # Derivative in row direction
DERIV_C = 2 # Derivative in column direction
DERIV_RR = 3 # Second derivative in row direction
DERIV_RC = 4 # Second derivative in row and column direction
DERIV_CC = 5 # Second derivative in column d... | /ridge_detection-3.0.0-py3-none-any.whl/ridge_detection/linesUtil.py | 0.82748 | 0.475484 | linesUtil.py | pypi |
from math import exp
from ridge_detection.helper import getNormal
from ridge_detection import linesUtil
import numpy as np
""" 1/sqrt(2*PI) """
SQRT_2_PI_INV = 0.398942280401432677939946059935
def phi0(x,sigma):
"""
Integral of the Gaussian function
:param x:
:param sigma:
:return:
"""
ret... | /ridge_detection-3.0.0-py3-none-any.whl/ridge_detection/convol.py | 0.80567 | 0.734072 | convol.py | pypi |
import logging
from math import sqrt
from ridge_detection.linesUtil import MODE_LIGHT
from ridge_detection.basicGeometry import Line, Junction
from ridge_detection.convol import convolve_gauss
from ridge_detection.link import compute_contours
from ridge_detection.helper import DEBUGGING
"""
The pixel boundaries need ... | /ridge_detection-3.0.0-py3-none-any.whl/ridge_detection/position.py | 0.71423 | 0.716476 | position.py | pypi |
import logging
from ridge_detection.helper import Offset
from numpy import sign
from math import ceil,sqrt,sin,cos,floor
from ridge_detection.basicGeometry import Line
from ridge_detection.linesUtil import COUNTOUR_DICT,MODE_LIGHT,lincoord,br,bc
from ridge_detection.correct import Correction,Correct,get_ctableh4Correct... | /ridge_detection-3.0.0-py3-none-any.whl/ridge_detection/width.py | 0.526099 | 0.433382 | width.py | pypi |
from urllib.request import urlopen
from tempfile import NamedTemporaryFile
from matplotlib.collections import LineCollection
import matplotlib.font_manager as fm
import matplotlib.pyplot as plt
import numpy as np
from skimage.filters import rank
from skimage.morphology import square
from skimage.util import img_as_uby... | /ridge_map-0.0.4-py3-none-any.whl/ridge_map/ridge_map.py | 0.884027 | 0.462473 | ridge_map.py | pypi |
from __future__ import annotations
from typing import Optional
import matplotlib.axes
import numpy as np
from more_itertools import first
from scipy.stats import gaussian_kde
from ridgeplot.stats import scaling
class RidgePlotError(Exception):
pass
def ridgeplot(
ax: matplotlib.axes,
data: dict[str, ... | /ridgeplot_py-0.2.1rc26-py3-none-any.whl/ridgeplot/ridge_plot.py | 0.948941 | 0.826467 | ridge_plot.py | pypi |
from collections import OrderedDict
from typing import Any, Dict, List
import matplotlib.axes
import matplotlib.patches as mpatches
from matplotlib import legend
ColorPalette: Dict[str, List[str]] = dict(
# 1. maximum
# modified from:
# https://sashat.me/2017/01/11/list-of-20-simple-distinct-colors/
m... | /ridgeplot_py-0.2.1rc26-py3-none-any.whl/ridgeplot/colors.py | 0.884639 | 0.706849 | colors.py | pypi |
# Release notes
This document outlines the list of changes to ridgeplot between each release. For full details, see
the [commit logs](https://github.com/tpvasconcelos/ridgeplot/commits/).
Unreleased changes
------------------
- ...
---
0.1.23
------
- Fix the references to the interactive Plotly IFrames
([#129]... | /ridgeplot-0.1.23.tar.gz/ridgeplot-0.1.23/CHANGES.md | 0.877922 | 0.704605 | CHANGES.md | pypi |
<p align="center">
<img src="docs/_static/img/logo-wide.png" alt="ridgeplot - beautiful ridgeline plots in Python">
</p>
<h1 id="ridgeplot" align="center">
ridgeplot: beautiful ridgeline plots in Python
</h1>
<p align="center">
<!-- TODO: https://bestpractices.coreinfrastructure.org/en -->
<!-- TODO: http... | /ridgeplot-0.1.23.tar.gz/ridgeplot-0.1.23/README.md | 0.873188 | 0.956104 | README.md | pypi |
# Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, educatio... | /ridgeplot-0.1.23.tar.gz/ridgeplot-0.1.23/CODE_OF_CONDUCT.md | 0.599368 | 0.68087 | CODE_OF_CONDUCT.md | pypi |
# Contributing
Thank you for your interest in contributing to ridgeplot! 🚀
The contribution process for ridgeplot should start with
[filing a GitHub issue](https://github.com/tpvasconcelos/ridgeplot/issues/new/choose). We define
three main categories of issues, and each category has its own GitHub issue template
- ... | /ridgeplot-0.1.23.tar.gz/ridgeplot-0.1.23/docs/development/contributing.md | 0.770335 | 0.855248 | contributing.md | pypi |
# Getting started
This page provides a quick introduction to the `ridgeplot` library, showcasing some of its features and providing a few practical examples. All examples use the {py:func}`ridgeplot.ridgeplot()` function, which is the main entry point to the library. For more information on the available options, take... | /ridgeplot-0.1.23.tar.gz/ridgeplot-0.1.23/docs/getting_started/getting_started.md | 0.910343 | 0.969928 | getting_started.md | pypi |
from __future__ import annotations
import platform
import subprocess
import sys
from dataclasses import dataclass, field
from importlib.abc import Loader
from importlib.machinery import ModuleSpec
from importlib.util import module_from_spec, spec_from_file_location
from pathlib import Path
from types import ModuleType... | /ridgeplot-0.1.23.tar.gz/ridgeplot-0.1.23/bin/utils.py | 0.719975 | 0.27671 | utils.py | pypi |
from typing import Dict, List
import requests
from requests import Response, HTTPError
from ridi_django_oauth2.config import RidiOAuth2Config
from ridi_django_oauth2_lib.decorators.retry import RetryFailException, retry
from ridi_oauth2.introspector.constants import JWKKeyType, JWKUse
from ridi_oauth2.introspector.dt... | /ridi-django-oauth2-1.0.7.tar.gz/ridi-django-oauth2-1.0.7/ridi_oauth2/introspector/key_handler.py | 0.662469 | 0.188697 | key_handler.py | pypi |
import typing
from base64 import urlsafe_b64decode
from datetime import datetime, timedelta
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePublicNumbers, SECP256R1
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicNumbers
... | /ridi-django-oauth2-1.0.7.tar.gz/ridi-django-oauth2-1.0.7/ridi_oauth2/introspector/dtos.py | 0.806929 | 0.185449 | dtos.py | pypi |
import shutil
from pathlib import Path
import numpy as np
from keras import datasets, utils, callbacks, optimizers, losses
from keras.preprocessing.image import ImageDataGenerator
import ridurre
from example.cifar_10_resnet import resnet
from ridurre import model_complexity
TRAIN_LOGS_FOLDER_PATH = Path("./train_log... | /ridurre-0.0.2.tar.gz/ridurre-0.0.2/example/model_pruning_example.py | 0.729809 | 0.336222 | model_pruning_example.py | pypi |
from keras import layers, models, regularizers
def _resnet_layer(inputs,
num_filters=16,
kernel_size=3,
strides=1,
activation='relu',
batch_normalization=True,
conv_first=True):
"""2D Convolution-Batch Norm... | /ridurre-0.0.2.tar.gz/ridurre-0.0.2/example/cifar_10_resnet/resnet.py | 0.946892 | 0.602997 | resnet.py | pypi |
import numpy as np
import pandas as pd
from numpy import linalg as LA
__author__ = 'José Antonio Duarte'
__credit__ = 'José Antonio Duarte'
__status__ = 'beta'
__version__ = '0.1.0'
__all__ = ['get_rie', 'returnsStandardization']
def returnsStandardization(returns):
returns_wth_mean = returns - np.mean(returns, ... | /rie_estimator-0.0.4b0-py3-none-any.whl/rie_estimator.py | 0.684475 | 0.411702 | rie_estimator.py | pypi |
from __future__ import absolute_import
import logging
try:
from logging import NullHandler
except ImportError:
# Create a NullHandler class in logging for python 2.6
class NullHandler(logging.Handler):
def emit(self, record):
pass
import socket
try:
from threading import RLock
... | /riemann-client-7.0.0rc1.tar.gz/riemann-client-7.0.0rc1/riemann_client/client.py | 0.877674 | 0.350032 | client.py | pypi |
from __future__ import absolute_import
import abc
import socket
import ssl
import struct
from . import riemann_pb2
# Default arguments
HOST = 'localhost'
PORT = 5555
TIMEOUT = None
def socket_recvall(socket, length, bufsize=4096):
"""A helper method to read of bytes from a socket to a maximum length"""
da... | /riemann-client-7.0.0rc1.tar.gz/riemann-client-7.0.0rc1/riemann_client/transport.py | 0.845081 | 0.220301 | transport.py | pypi |
from typing import List, Tuple, Union
LIST = False
BYTES = True
# defined by RLP standard
BYTES_OFFSET = 0x80
LONG_BYTES_OFFSET = BYTES_OFFSET + 55 # 0xb7
ARRAY_OFFSET = 0xc0
LONG_ARRAY_OFFSET = ARRAY_OFFSET + 55 # 0xf7
class RLPError(ValueError):
...
def i2be_rlp_padded(
number: int,
length... | /riemann-ether-6.0.6.tar.gz/riemann-ether-6.0.6/ether/rlp.py | 0.785802 | 0.389053 | rlp.py | pypi |
from Cryptodome.Hash import keccak
import warnings
from typing import Callable, cast
from ether.ether_types import EthSig
# suppress load warning
with warnings.catch_warnings():
warnings.simplefilter("ignore")
from eth_keys import datatypes as eth_ecdsa
def keccak256(msg: bytes) -> bytes:
'''
Does s... | /riemann-ether-6.0.6.tar.gz/riemann-ether-6.0.6/ether/crypto.py | 0.863938 | 0.395922 | crypto.py | pypi |
from ether import abi, crypto
from typing import Any, cast, Dict, List
from ether.ether_types import EthABI, ParsedEtherEvent, UnparsedEtherEvent
def _make_topic0(event: Dict[str, Any]) -> str:
'''
Calculates the event topic hash frrom the event ABI
Args:
event (dict): the event ABI
Returns:
... | /riemann-ether-6.0.6.tar.gz/riemann-ether-6.0.6/ether/events.py | 0.856857 | 0.421195 | events.py | pypi |
from riemann_keys import utils
BASE58_ALPHABET = b'123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
BASE58_BASE = len(BASE58_ALPHABET)
BASE58_LOOKUP = dict((c, i) for i, c in enumerate(BASE58_ALPHABET))
def encode(data: bytes, checksum: bool = True) -> str:
"""Convert binary to base58 using BASE58_ALP... | /riemann-keys-0.1.2.tar.gz/riemann-keys-0.1.2/riemann_keys/base58.py | 0.779406 | 0.382257 | base58.py | pypi |
from riemann import utils as rutils
from ledgerblue.comm import getDongle, Dongle
from ledgerblue.commException import CommException
from ledger import utils
from typing import Any, List
class LedgerException(Exception):
...
class Ledger:
'''
A simple wrapper around the ledgerblue Dongle object.
I... | /riemann-ledger-2.2.1.tar.gz/riemann-ledger-2.2.1/ledger/blue.py | 0.622 | 0.303826 | blue.py | pypi |
import asyncio
from functools import partial
from riemann import utils as rutils
from riemann.encoding import base58
from ledger.ledger_types import LedgerPubkey, LedgerXPub
from typing import Any, Awaitable, cast, Callable, List, Optional
BIP32_HARDEN = 0x80000000
# https://github.com/bitcoin/bips/blob/master/bip-... | /riemann-ledger-2.2.1.tar.gz/riemann-ledger-2.2.1/ledger/utils.py | 0.695028 | 0.313078 | utils.py | pypi |
## Riemann: bitcoin transactions for humans
[](https://travis-ci.org/summa-tx/riemann)
[](https://coveralls.io/github/summa-tx/riemann)
### Purpose
`$ pip install r... | /riemann-tx-2.1.0.tar.gz/riemann-tx-2.1.0/README.md | 0.461502 | 0.915242 | README.md | pypi |
from riemann import tx
from riemann import utils
from riemann.tx import decred
from riemann.tx import tx_builder as tb
from riemann.encoding import addresses as addr
from typing import overload
def output(value: int, address: str) -> tx.TxOut:
'''
int, str -> TxOut
accepts base58 or bech32 addresses
... | /riemann-tx-2.1.0.tar.gz/riemann-tx-2.1.0/riemann/simple.py | 0.855459 | 0.257835 | simple.py | pypi |
import hashlib
import riemann
from riemann import blake256 as b256
def i2le(number: int) -> bytes:
'''
Convert int to little endian (LE) bytes
Args:
number: int value to convert to bytes in LE format
Returns:
LE-encoded number
'''
if number == 0:
return b'\x00'
ret... | /riemann-tx-2.1.0.tar.gz/riemann-tx-2.1.0/riemann/utils.py | 0.788949 | 0.654315 | utils.py | pypi |
import riemann
from riemann import utils
from typing import Any, Optional, Union
Byteslike = Union[bytes, bytearray, 'ByteData']
SIGHASH_ALL = 0x01
SIGHASH_NONE = 0x02
SIGHASH_SINGLE = 0x03
SIGHASH_FORKID = 0x40
SIGHASH_ANYONECANPAY = 0x80
class ByteData():
'''
Wrapper class for byte-like data
Iterable ... | /riemann-tx-2.1.0.tar.gz/riemann-tx-2.1.0/riemann/tx/shared.py | 0.803598 | 0.353289 | shared.py | pypi |
import riemann
from riemann import utils
from riemann.script import serialization
from riemann.tx import tx, decred, overwinter, sapling, sprout, zcash_shared
from typing import cast, List, Optional, overload
def make_sh_script_pubkey(script_bytes: bytes, witness: bool = False) -> bytes:
'''
Make a P2SH or P... | /riemann-tx-2.1.0.tar.gz/riemann-tx-2.1.0/riemann/tx/tx_builder.py | 0.865608 | 0.202759 | tx_builder.py | pypi |
import riemann
from riemann import utils
from riemann.tx import shared
class ZcashByteData(shared.ByteData):
def __init__(self):
if 'zcash' not in riemann.get_current_network_name():
raise ValueError('Zcash classes not supported by network {}. '
'How did you get he... | /riemann-tx-2.1.0.tar.gz/riemann-tx-2.1.0/riemann/tx/zcash_shared.py | 0.756537 | 0.250431 | zcash_shared.py | pypi |
import riemann
from riemann import utils
from riemann.tx import shared
from typing import List, Optional
class DecredByteData(shared.ByteData):
def __init__(self):
if 'decred' not in riemann.get_current_network_name():
raise ValueError('Decred classes not supported by network {}. '
... | /riemann-tx-2.1.0.tar.gz/riemann-tx-2.1.0/riemann/tx/decred.py | 0.822653 | 0.329661 | decred.py | pypi |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.