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 Tuple, List from pddl.pddl import Domain, Problem from sam_learner.sam_models.comparable_predicate import ComparablePredicate from sam_learner.sam_models.parameter_binding import ParameterBinding class StateLiteral: """Represent the connection between a lifted and a grounded predicate.""" fact...
/sam_learner-2.1.9-py3-none-any.whl/sam_learner/sam_models/state.py
0.921468
0.540742
state.py
pypi
import csv import logging import sys from pathlib import Path from typing import NoReturn, List, Dict, Any, Union from pddl.parser import Parser from pddl.pddl import Domain, Action from sam_learner import SAMLearner, ESAMLearner from sam_learner.core import DomainExporter from sam_learner.core.trajectories_manager i...
/sam_learner-2.1.9-py3-none-any.whl/sam_learner/model_validation/action_model_statistics_extractor.py
0.677794
0.447883
action_model_statistics_extractor.py
pypi
import csv import logging import os import re import sys from pathlib import Path from typing import Optional, NoReturn, Dict, List, Any from task import Operator from sam_learner.core import TrajectoryGenerator from sam_learner.sam_models import Trajectory from .fast_downward_solver import FastDownwardSolver PLAN_S...
/sam_learner-2.1.9-py3-none-any.whl/sam_learner/model_validation/learned_domain_validator.py
0.770724
0.305141
learned_domain_validator.py
pypi
import csv import logging from pathlib import Path from typing import List, Set, NoReturn from pddl.parser import Parser from pddl.pddl import Domain, Action from sam_learner.sam_models import ComparablePredicate STATISTICS_COLUMNS_NAMES = ["domain_name", "domain_path", "action_name", "number_consistent_models"] d...
/sam_learner-2.1.9-py3-none-any.whl/sam_learner/model_validation/consistent_models_calculator.py
0.756537
0.324971
consistent_models_calculator.py
pypi
import logging from typing import List, Any, Dict, NoReturn from pddl.pddl import Domain from sam_learner.sam_models import Trajectory, ComparablePredicate def calculate_true_positive_value( learned_predicates: List[ComparablePredicate], expected_predicates: List[ComparablePredicate]) -> int: """ :param learne...
/sam_learner-2.1.9-py3-none-any.whl/sam_learner/model_validation/action_precision_recall_calculator.py
0.821331
0.650883
action_precision_recall_calculator.py
pypi
import os import numpy as np import cv2 import math from skimage.feature import peak_local_max from scipy.cluster.vq import kmeans def find_max_subarray(array: np.ndarray, window_w: int, threshold: float) -> tuple: assert len(array.shape) == 1 best_sum = -1 start_idx = None array_cum = np.pad(np.cum...
/sam_lstm-1.0.1.tar.gz/sam_lstm-1.0.1/sam_lstm/cropping.py
0.587352
0.424054
cropping.py
pypi
import keras.backend as K from keras.layers import ( add, Input, Activation, Conv2D, MaxPooling2D, ZeroPadding2D, BatchNormalization, ) from keras.models import Model from keras.utils import get_file from sam_lstm.config import TH_WEIGHTS_PATH_NO_TOP def identity_block(input_tensor, kernel...
/sam_lstm-1.0.1.tar.gz/sam_lstm-1.0.1/sam_lstm/dcn_resnet.py
0.875282
0.436442
dcn_resnet.py
pypi
import tensorflow as tf import keras.backend as K from keras.layers import Layer, InputSpec from keras import initializers class AttentiveConvLSTM(Layer): """ att_convlstm = AttentiveConvLSTM( nb_filters_in=512, nb_filters_out=512, nb_filters_att=512, nb_cols=3, nb_rows=3 )(att_convlstm) """ ...
/sam_lstm-1.0.1.tar.gz/sam_lstm-1.0.1/sam_lstm/attentive_convlstm.py
0.858615
0.492798
attentive_convlstm.py
pypi
import cv2 import numpy as np import scipy.io import scipy.ndimage from sam_lstm.config import gaussina_sigma def padding(img, shape_r=240, shape_c=320, channels=3): img_padded = np.zeros((shape_r, shape_c, channels), dtype=np.uint8) if channels == 1: img_padded = np.zeros((shape_r, shape_c), dtype=np...
/sam_lstm-1.0.1.tar.gz/sam_lstm-1.0.1/sam_lstm/utilities.py
0.453262
0.358241
utilities.py
pypi
import tensorflow as tf import numpy as np import keras.backend as K from keras.layers import Layer, InputSpec from keras import initializers, regularizers, constraints floatX = K.floatx() class LearningPrior(Layer): def __init__( self, nb_gaussian, init="normal", weights=None, ...
/sam_lstm-1.0.1.tar.gz/sam_lstm-1.0.1/sam_lstm/gaussian_prior.py
0.865636
0.422326
gaussian_prior.py
pypi
import keras.backend as K import numpy as np from sam_lstm.config import * from sam_lstm.dcn_resnet import dcn_resnet from sam_lstm.gaussian_prior import LearningPrior from sam_lstm.attentive_convlstm import AttentiveConvLSTM from keras.layers import Lambda, concatenate, Conv2D, UpSampling2D def repeat(x): retu...
/sam_lstm-1.0.1.tar.gz/sam_lstm-1.0.1/sam_lstm/models.py
0.816882
0.390708
models.py
pypi
import os import sys import time import warnings from datetime import timedelta import numpy as np import pandas as pd # to deactivate pygame promt os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1' import pygame from pkg_resources import resource_filename from tqdm.auto import tqdm from sam_ml.config import ( get...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/ClassifierTest.py
0.417509
0.168754
ClassifierTest.py
pypi
from ConfigSpace import ConfigurationSpace, Float, Integer, Normal from xgboost import XGBClassifier from sam_ml.config import get_n_jobs from .main_classifier import Classifier class XGBC(Classifier): """ SupportVectorClassifier Wrapper class """ def __init__( self, model_name: str = "XGBC...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/XGBoostClassifier.py
0.697197
0.232779
XGBoostClassifier.py
pypi
from ConfigSpace import Beta, Categorical, ConfigurationSpace, Float, Integer from sklearn.base import ClassifierMixin from sklearn.ensemble import AdaBoostClassifier, RandomForestClassifier from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier from .main_classifier import...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/AdaBoostClassifier.py
0.807043
0.263289
AdaBoostClassifier.py
pypi
import warnings from ConfigSpace import Beta, Categorical, ConfigurationSpace, Float, Integer from sklearn.base import ClassifierMixin from sklearn.ensemble import BaggingClassifier, RandomForestClassifier from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier from sam_ml....
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/BaggingClassifier.py
0.760651
0.248067
BaggingClassifier.py
pypi
import pickle import time from copy import deepcopy from datetime import timedelta import pandas as pd from sam_ml.config import setup_logger logger = setup_logger(__name__) class Model: """ Model parent class """ def __init__(self, model_object = None, model_name: str = "model", model_type: str = "Model")...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/main_model.py
0.723016
0.254416
main_model.py
pypi
from ConfigSpace import Categorical, ConfigurationSpace, Float, Integer, Normal from sklearn.ensemble import GradientBoostingClassifier from .main_classifier import Classifier class GBM(Classifier): """ GradientBoostingMachine Wrapper class """ def __init__( self, model_name: str = "Gradient...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/GradientBoostingMachine.py
0.923463
0.560132
GradientBoostingMachine.py
pypi
from ConfigSpace import Categorical, ConfigurationSpace, Integer, Normal from sklearn.ensemble import RandomForestClassifier from sam_ml.config import get_n_jobs from .main_classifier import Classifier class RFC(Classifier): """ RandomForestClassifier Wrapper class """ def __init__( self, m...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/RandomForestClassifier.py
0.87464
0.329257
RandomForestClassifier.py
pypi
from ConfigSpace import Categorical, ConfigurationSpace, Float from sklearn.neural_network import MLPClassifier from .main_classifier import Classifier class MLPC(Classifier): """ MLP Classifier Wrapper class """ def __init__( self, model_name: str = "MLP Classifier", random_state: i...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/MLPClassifier.py
0.898204
0.387864
MLPClassifier.py
pypi
import math from sklearn.metrics import precision_score, recall_score def samuel_function(x: float) -> float: return math.sqrt(1/(1 + math.e**(12*(0.5-x)))) def lewis_function(x: float) -> float: return 1-(0.5-0.5*math.cos((x-1)*math.pi))**4 def s_scoring(y_true: list, y_pred: list, scoring: str = None, p...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/scorer.py
0.71123
0.558568
scorer.py
pypi
import inspect import os import sys import warnings from datetime import timedelta from statistics import mean import numpy as np import pandas as pd from ConfigSpace import Configuration, ConfigurationSpace from matplotlib import pyplot as plt from sklearn.exceptions import NotFittedError from sklearn.metrics import ...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/main_classifier.py
0.516352
0.194578
main_classifier.py
pypi
from ConfigSpace import Categorical, ConfigurationSpace, Integer, Normal from sklearn.ensemble import ExtraTreesClassifier from sam_ml.config import get_n_jobs from .main_classifier import Classifier class ETC(Classifier): """ ExtraTreesClassifier Wrapper class """ def __init__( self, model...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/ExtraTreesClassifier.py
0.869119
0.325306
ExtraTreesClassifier.py
pypi
import copy import pandas as pd from sam_ml.config import setup_logger from sam_ml.data.preprocessing import ( Embeddings_builder, Sampler, SamplerPipeline, Scaler, Selector, ) from .main_classifier import Classifier from .RandomForestClassifier import RFC logger = setup_logger(__name__) class...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/main_pipeline.py
0.727298
0.265202
main_pipeline.py
pypi
from ConfigSpace import ( Categorical, ConfigurationSpace, EqualsCondition, Float, ForbiddenAndConjunction, ForbiddenEqualsClause, ForbiddenInClause, ) from sklearn.linear_model import LogisticRegression from .main_classifier import Classifier class LR(Classifier): """ LogisticRegress...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/models/LogisticRegression.py
0.884962
0.340485
LogisticRegression.py
pypi
import pandas as pd from sklearn.preprocessing import ( MaxAbsScaler, MinMaxScaler, Normalizer, PowerTransformer, QuantileTransformer, RobustScaler, StandardScaler, ) from sam_ml.config import setup_logger from .main_data import DATA logger = setup_logger(__name__) class Scaler(DATA): ...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/data/preprocessing/scaler.py
0.797833
0.312422
scaler.py
pypi
import concurrent.futures import numpy as np import pandas as pd from sentence_transformers import SentenceTransformer from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer from tqdm.auto import tqdm from sam_ml.config import setup_logger from .main_data import DATA logger = setup_logger(__na...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/data/preprocessing/embeddings.py
0.76882
0.341116
embeddings.py
pypi
import pandas as pd from imblearn.over_sampling import SMOTE, BorderlineSMOTE, RandomOverSampler from imblearn.under_sampling import ( ClusterCentroids, NearMiss, OneSidedSelection, RandomUnderSampler, TomekLinks, ) from sam_ml.config import setup_logger from .main_data import DATA logger = setup...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/data/preprocessing/sampling.py
0.794185
0.428652
sampling.py
pypi
import pandas as pd import statsmodels.api as sm from sklearn.decomposition import PCA from sklearn.ensemble import ExtraTreesClassifier from sklearn.feature_selection import ( RFE, RFECV, SelectFromModel, SelectKBest, SequentialFeatureSelector, chi2, ) from sklearn.linear_model import LogisticR...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/data/preprocessing/feature_selection.py
0.762998
0.45538
feature_selection.py
pypi
import pandas as pd from sam_ml.config import setup_logger from .sampling import Sampler logger = setup_logger(__name__) class SamplerPipeline: def __init__(self, algorithm: str | list[Sampler] = "SMOTE_rus_20_50"): """ Class uses multplie up- and down-sampling algorithms instead of only one ...
/sam_ml_py-0.13.0-py3-none-any.whl/sam_ml/data/preprocessing/sampling_pipeline.py
0.77928
0.566798
sampling_pipeline.py
pypi
# Overview If you author an [AWS Serverless Application Model (SAM)](https://aws.amazon.com/serverless/sam/) template you may wish to publish this as an [AWS CloudFormation](https://docs.aws.amazon.com/cloudformation/index.html) template to allow the user to deploy the solution from the console and remove the need for ...
/sam-publish-0.2.1.tar.gz/sam-publish-0.2.1/README.md
0.828211
0.986442
README.md
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 ...
/sam_s_distributions-0.1.tar.gz/sam_s_distributions-0.1/distributions/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
from abc import ABC, abstractmethod from typing import Any, Optional, Set class BaseArgType(ABC): help: Optional[str] = None @abstractmethod def parse(self, value) -> Any: pass @abstractmethod def help_repr(self) -> str: pass @abstractmethod def global_help_repr(self, na...
/sam_slash_slack-0.1.2-py3-none-any.whl/sam_slash_slack/arg_types.py
0.912592
0.221793
arg_types.py
pypi
import logging from typing import Any, Callable, List, Optional, Set, Tuple, Union import aiohttp from sam_slash_slack.arg_types import ( BaseArgType, FlagType, StringType, UnknownLengthListType, ) from sam_slash_slack.blocks import _make_block_message from sam_slash_slack.slash_slack_request import S...
/sam_slash_slack-0.1.2-py3-none-any.whl/sam_slash_slack/slash_slack_command.py
0.793146
0.207014
slash_slack_command.py
pypi
import hashlib import hmac from time import time from typing import Dict, Optional, Union class Clock: def now(self) -> float: return time() class SignatureVerifier: def __init__(self, signing_secret: str, clock: Clock = Clock()): """Slack request signature verifier Slack signs its r...
/sam_slash_slack-0.1.2-py3-none-any.whl/sam_slash_slack/signature_verifier.py
0.931058
0.266947
signature_verifier.py
pypi
# sam_subseq - Extract GFF Features From Aligned Reads `sam_subseq` takes two inputs: 1. SAM file with reads (or sequences in general) aligned to one or more references 2. GFF file defining features for the reference(s) `sam_subseq` will project the GFF coordinates (which refer to the reference) onto the reads, extr...
/sam_subseq-0.1.0.tar.gz/sam_subseq-0.1.0/README.md
0.68215
0.870212
README.md
pypi
import re class IndexMap: """ Build an index map, mapping reference coordinates to query coordinates. This allows retrieval of mapped read segments using reference positions. The index map is a list of tuples. Each list element corresponds to a reference position. The tuple at this list element co...
/sam_subseq-0.1.0.tar.gz/sam_subseq-0.1.0/src/sam_subseq/IndexMap.py
0.873498
0.652546
IndexMap.py
pypi
import sys import argparse import textwrap from sam_subseq import io from sam_subseq.SamRefAlignment import SamRefAlignment def parse_args(): argparser = argparse.ArgumentParser( formatter_class = argparse.RawTextHelpFormatter, description = textwrap.dedent(""" Extract features (subsequen...
/sam_subseq-0.1.0.tar.gz/sam_subseq-0.1.0/src/sam_subseq/main.py
0.486088
0.475423
main.py
pypi
import sys import io def stdin_or_fh(f): """ Read a line from stdin or a file on disk. """ if f is sys.stdin: for line in f: yield line elif isinstance(f, str): with open(f, "r") as fh: for line in fh: yield line elif isinstance(f, io.Tex...
/sam_subseq-0.1.0.tar.gz/sam_subseq-0.1.0/src/sam_subseq/io.py
0.433022
0.452838
io.py
pypi
from typing import List from template_creator.util.constants import EVENT_TYPES def create_lambda_function(name: str, handler: str, uri: str, variables, events, api) -> dict: generic = { 'Type': 'AWS::Serverless::Function', 'Properties': { 'CodeUri': uri, 'Handler': handle...
/sam-template-creator-0.1.3.tar.gz/sam-template-creator-0.1.3/template_creator/writer/lambda_writer.py
0.80456
0.371308
lambda_writer.py
pypi
import logging import sys from types import FrameType from typing import List, cast from loguru import logger from pydantic import AnyHttpUrl, BaseSettings class LoggingSettings(BaseSettings): LOGGING_LEVEL: int = logging.INFO # logging levels are type int class Settings(BaseSettings): API_V1_STR: str = "...
/sam_tid_regression_model-0.0.6-py3-none-any.whl/api/app/config.py
0.535827
0.163646
config.py
pypi
from typing import Any, List, Optional from pydantic import BaseModel from regression_model.processing.validation import SalesDataInputSchema class PredictionResults(BaseModel): errors: Optional[Any] version: str predictions: Optional[List[float]] class MultipleSalesDataInputs(BaseModel): inputs: L...
/sam_tid_regression_model-0.0.6-py3-none-any.whl/api/app/schemas/predict.py
0.783947
0.27492
predict.py
pypi
from pathlib import Path from typing import Dict, List, Sequence from pydantic import BaseModel from strictyaml import YAML, load import regression_model # Project Directories PACKAGE_ROOT = Path(regression_model.__file__).resolve().parent ROOT = PACKAGE_ROOT.parent CONFIG_FILE_PATH = PACKAGE_ROOT / "config.yml" DAT...
/sam_tid_regression_model-0.0.6-py3-none-any.whl/regression_model/config/core.py
0.816736
0.282116
core.py
pypi
from typing import List, Optional, Tuple import numpy as np import pandas as pd from pydantic import BaseModel, ValidationError from regression_model.config.core import config def drop_na_inputs(*, input_data: pd.DataFrame) -> pd.DataFrame: """Check model inputs for na values and filter.""" validated_data =...
/sam_tid_regression_model-0.0.6-py3-none-any.whl/regression_model/processing/validation.py
0.831964
0.474936
validation.py
pypi
tsfresh ========= tsfresh is a package that can be used to calculate many timeseries-related features used for analysing time series, especially based on physics, and use them as features in your models. It's pretty straightforward to use, because it has built-in functions that calculate all these features, and select...
/sam-3.1.9.tar.gz/sam-3.1.9/docs/source/general_documents/tsfresh.md
0.638497
0.991032
tsfresh.md
pypi
Project approach ================== In this document we describe the typical steps to take in a sensor analysis project. ## Before the project Use the SAM package as much as possible. If relevant functionality is missing, let us add that and extend the package. Tip: read the tips! ### General notes, tips and trick...
/sam-3.1.9.tar.gz/sam-3.1.9/docs/source/general_documents/project_approach.md
0.949623
0.981058
project_approach.md
pypi
Weather data ============ Often, weather features are important predictors. For training the model, historic data might be relevant, but when making predictions, weather forecast can also be useful. However, there is a big difference in the availability of historic weather data vs forecasts, the resolution and frequen...
/sam-3.1.9.tar.gz/sam-3.1.9/docs/source/general_documents/weather_features.md
0.953972
0.970352
weather_features.md
pypi
Feature Extraction ================== This is the start of the documentation on which features to use when. ## Transforms Best practices on types of transforms that you can apply. ### Summarizing Summarizing a window prior to the prediction moment with some basic functions is always a good starting point: - Basic: m...
/sam-3.1.9.tar.gz/sam-3.1.9/docs/source/general_documents/feature_extraction.md
0.962081
0.988525
feature_extraction.md
pypi
# Feature engineering examples This notebook contains some examples of feature engineering using SAM. We use the following example dataset: ``` import pandas as pd from sam.datasets import load_rainbow_beach data = load_rainbow_beach() ``` ## Simple feature engineering for timeseries data The class `sam.feature_...
/sam-3.1.9.tar.gz/sam-3.1.9/examples/feature_engineering.ipynb
0.465873
0.989879
feature_engineering.ipynb
pypi
# sam4onnx A very simple tool to rewrite parameters such as attributes and constants for OPs in ONNX models. **S**imple **A**ttribute and Constant **M**odifier for **ONNX**. https://github.com/PINTO0309/simple-onnx-processing-tools [![Downloads](https://static.pepy.tech/personalized-badge/sam4onnx?period=total&units=...
/sam4onnx-1.0.14.tar.gz/sam4onnx-1.0.14/README.md
0.645902
0.81468
README.md
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 ...
/sama_probability-0.1.tar.gz/sama_probability-0.1/sama_probability/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.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 ...
/saman_distributions-0.1.tar.gz/saman_distributions-0.1/saman_distributions/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
describe("map_events.js file", function () { describe("deselectText", function () {}); describe("distanceSquared", function () { it("is accurate", function () { expect(distanceSquared(0, 0, 0, 10)).toEqual(100); expect(distanceSquared(0, 0, 10, 0)).toEqual(100); expect(distanceSquared(0, 10...
/samapper-0.3.2.tar.gz/samapper-0.3.2/spec/javascripts/map_events_spec.js
0.895222
0.925432
map_events_spec.js
pypi
describe("table_filters.js file", function () { beforeEach(function () { g_known_tags = ["tag1", "tag2"]; g_known_envs = ["production", "dev", "inherit"]; }); describe("members", function () { it("has filter types", function () { expect(Object.keys(filters.private.types)).toContain("connections...
/samapper-0.3.2.tar.gz/samapper-0.3.2/spec/javascripts/table_filters_spec.js
0.818664
0.778944
table_filters_spec.js
pypi
describe("map_render.js file", function () { describe("fadeFont", function () { it("works", function () { expect(fadeFont("#FFFFFF", 1.0)).toEqual("rgba(255,255,255,1)"); expect(fadeFont("#706050", 0.25)).toEqual("rgba(112,96,80,0.25)"); }); }); describe("color_links", function () { it("wo...
/samapper-0.3.2.tar.gz/samapper-0.3.2/spec/javascripts/map_render_spec.js
0.764452
0.862352
map_render_spec.js
pypi
describe("metadata.js file", function () { describe("normalizeIP", function () { it("works with short IPs", function () { expect(normalizeIP("110")).toEqual("110.0.0.0/8"); expect(normalizeIP("110.23")).toEqual("110.23.0.0/16"); expect(normalizeIP("110.23.45")).toEqual("110.23.45.0/24"); e...
/samapper-0.3.2.tar.gz/samapper-0.3.2/spec/javascripts/metadata_spec.js
0.82994
0.784567
metadata_spec.js
pypi
describe("map_node.js file", function () { describe("Node", function () { beforeEach(function () { n1 = new Node("bob", "192.168", 168, 24, 1, 1, 1, 10); }); it("prepares details member", function () { expect(n1.hasOwnProperty("details")).toEqual(true); expect(n1.details.hasOwnProperty("...
/samapper-0.3.2.tar.gz/samapper-0.3.2/spec/javascripts/map_node_spec.js
0.880463
0.74704
map_node_spec.js
pypi
describe("map.js file", function () { describe("zoom levels", function() { it("defined", function () { expect(zNodes16).toBeDefined(); expect(zNodes24).toBeDefined(); expect(zNodes32).toBeDefined(); expect(zLinks16).toBeDefined(); expect(zLinks24).toBeDefined(); expect(zLinks...
/samapper-0.3.2.tar.gz/samapper-0.3.2/spec/javascripts/map_spec.js
0.854171
0.822332
map_spec.js
pypi
describe("map_links file", function () { describe("link_request_add", function () { it("adds to the queue", function () { m_link_requests = []; link_request_add("1.2.3.4"); link_request_add("2.3.4.5"); link_request_add("3.4.5.6"); link_request_add("4.5.6.7"); let expected = ...
/samapper-0.3.2.tar.gz/samapper-0.3.2/spec/javascripts/map_links_spec.js
0.859826
0.712401
map_links_spec.js
pypi
describe("map_ports.js file", function () { describe("ports.loaded", function () { beforeEach(function () { get_mock_m_ports(); }); it("exists", function () { expect(ports.loaded(443)).toEqual(true) }); it("doesn't exist", function () { expect(ports.loaded(444)).toEqual(false) ...
/samapper-0.3.2.tar.gz/samapper-0.3.2/spec/javascripts/map_ports_spec.js
0.782455
0.743075
map_ports_spec.js
pypi
from sam import common, integrity class DBPlugin(object): @staticmethod def checkIntegrity(db): """ Checks if the database is correct and returns the equivalent to false if db is consistent. if db is healthy, return False, examples: False, 0, [] or {} if db is unhe...
/samapper-0.3.2.tar.gz/samapper-0.3.2/sam/models/base.py
0.69946
0.284843
base.py
pypi
import web from sam import common from sam.models.links import Links class Nodes(object): default_environments = {'production', 'dev', 'inherit'} def __init__(self, db, subscription): """ :type db: web.DB :type subscription: int :param db: :param subscription: ...
/samapper-0.3.2.tar.gz/samapper-0.3.2/sam/models/nodes.py
0.679072
0.262605
nodes.py
pypi
import os import cPickle import web from sam.models.security import rule_template, rule class Rules(): TABLE_FORMAT = "s{}_Rules" def __init__(self, db, sub_id): """ :param db: database connection :type db: web.DB :param sub_id: subscription id :type sub_id: int ...
/samapper-0.3.2.tar.gz/samapper-0.3.2/sam/models/security/rules.py
0.442637
0.151216
rules.py
pypi
from sam import common import re from sam import errors import base import sam.models.details import sam.models.nodes import sam.models.links # This class is for getting the main selection details, such as ins, outs, and ports. def nice_protocol(strings, p_in, p_out): """ :param p_in: comma-seperated p...
/samapper-0.3.2.tar.gz/samapper-0.3.2/sam/pages/details.py
0.621426
0.314169
details.py
pypi
import base import sam.models.ports from sam import errors from sam import common # This class is for getting the aliases for a port number class Portinfo(base.headless_post): """ The expected GET data includes: 'port': comma-seperated list of port numbers A request for ports 80, 443, and...
/samapper-0.3.2.tar.gz/samapper-0.3.2/sam/pages/portinfo.py
0.615435
0.375477
portinfo.py
pypi
from sam import errors import re import base64 import base import sam.models.settings import sam.models.datasources import sam.models.livekeys import sam.models.nodes import sam.models.links import sam.models.upload from sam import common def nice_name(s): s = re.sub("([a-z])([A-Z]+)", lambda x: "{0} {1}".format(...
/samapper-0.3.2.tar.gz/samapper-0.3.2/sam/pages/settings.py
0.503906
0.156201
settings.py
pypi
import re import base import sam.models.nodes from sam import errors from sam import common # This class is for getting the child nodes of all nodes in a node list, for the map class Nodes(base.headless_post): """ The expected GET data includes: 'address': comma-seperated list of dotted-decimal IP ad...
/samapper-0.3.2.tar.gz/samapper-0.3.2/sam/pages/nodes.py
0.555797
0.423696
nodes.py
pypi
import math import re from datetime import datetime from sam import errors, common from sam.pages import base from sam.models.security import alerts def time_to_seconds(tstring): """ Converts a period of time (expressed as a string) to seconds. :param tstring: string time period. use # of (years/weeks/da...
/samapper-0.3.2.tar.gz/samapper-0.3.2/sam/pages/alerts.py
0.608594
0.368491
alerts.py
pypi
from importlib import import_module import inspect # Republishing for easy serialization from pickle import load, loads, dump, dumps # noqa def import_string(dotted_path): """ Import a dotted module path or a element from it if a `:` separator is provided :arg dotted_path: path to import (e.g. 'my_m...
/samarche-0.0.1.tar.gz/samarche-0.0.1/samarche.py
0.708918
0.185892
samarche.py
pypi
import os import pandas as pd import numpy as np from scipy.spatial.distance import cdist from sewar.full_ref import mse, sam def load_img(folder_path, tag=None): """ Reads all the images saved in a certain folder path and in the tag file :param folder_path: Path of the folder where the images from micro...
/samba_metric-0.0.8.tar.gz/samba_metric-0.0.8/src/samba/SAMBA_metric.py
0.731155
0.66238
SAMBA_metric.py
pypi
from collections import defaultdict from pathlib import Path from typing import List, Tuple, Union, Optional, Sequence import array import bz2 import csv import functools import itertools import logging import math import pickle import re # Import local modules from .newick import Node # Define the path to the 'etc' ...
/samba_sampler-0.3.tar.gz/samba_sampler-0.3/src/samba_sampler/common.py
0.941506
0.640854
common.py
pypi
# Import Python standard libraries import argparse import sys # Import our library to leverage functions and classes import samba_sampler as samba # Define a dictionary for models and their parameters models = { "tiago1": { "algorithm": "standard", "freq_weight": 1.0, "matrices": "gled.ma...
/samba_sampler-0.3.tar.gz/samba_sampler-0.3/src/samba_sampler/__main__.py
0.550849
0.553083
__main__.py
pypi
# Samba An extremly tiny PaaS (platform as a s service) to deploy multiple apps on a single servers with git, similar to Heroku or Dokku. It is simple and compatible with current infrastucture. It supports Python (Flask/Django), Nodejs, PHP and Static HTML. ### Features - Easy command line setup - Instant de...
/samba-0.0.0.tar.gz/samba-0.0.0/README.md
0.572484
0.808275
README.md
pypi
from cobra.flux_analysis import flux_variability_analysis import logging import time log = logging.getLogger(__name__) def run_fva(model, rxnsOfInterest, proc, fraction_opt): log.info("Starting FVA...") start_time = time.time() s = flux_variability_analysis(model, reaction_list=rxnsOfInterest, fraction_of...
/sambaflux-0.1.8-py3-none-any.whl/samba/fva/fva_functions.py
0.73678
0.463687
fva_functions.py
pypi
from scipy.interpolate import interp1d import numpy as np class CorrelationIntegrands(): """ Class to compute different integrands of correlation functions for a specified x. In particular, the integrands: B2(x,f) = w(x)*x**2*f(x)*g2(x), (1) B3(x,f) = x*f(x)*\int dv v**2*...
/sambristol_ssabp_w-0.0.15.tar.gz/sambristol_ssabp_w-0.0.15/sambristol_ssabp_w/correlationintegrands.py
0.825379
0.780077
correlationintegrands.py
pypi
import numpy as np def meshODE(t,sol): """ Given a 2D meshgrid array input and an OdeSolution object, output the ODE solution held in OdeSolution as a meshgrid compatible with the input. Parameters ---------- t : 2D np.array Form of the array should be like either XX or YY...
/sambristol_ssabp_w-0.0.15.tar.gz/sambristol_ssabp_w-0.0.15/sambristol_ssabp_w/meshode.py
0.681939
0.739834
meshode.py
pypi
import numpy as np import scipy.special as special from .effectivepotential import twobody_value, twobody_derivative from .effectivepotential import threebody_value, threebody_derivative_u class wLowDt(): """ Evaluate the w(r) function when D_t goes to 0 (is much smaller than D_r*sigma**2) Attri...
/sambristol_ssabp_w-0.0.15.tar.gz/sambristol_ssabp_w-0.0.15/sambristol_ssabp_w/wlowDt.py
0.891832
0.732687
wlowDt.py
pypi
import numpy as np """ Calculate effective potentials for ABP system, given a specific w-function. Methods ------- twobody_value(r) twobody_derivative(r) threebody_value(u,v) threebody_derivative_u(u,v) """ def twobody_value(r,fp,w,V_value): """ Compute effective two-body potential. Para...
/sambristol_ssabp_w-0.0.15.tar.gz/sambristol_ssabp_w-0.0.15/sambristol_ssabp_w/effectivepotential.py
0.917307
0.740667
effectivepotential.py
pypi
import numpy as np import scipy.special as special from scipy.integrate import solve_ivp, solve_bvp from scipy.interpolate import interp1d from .trimerbc import shiftedLJ from .effectivepotential import twobody_value,twobody_derivative from .meshode import meshODE from .whardsphere import wHardSphere class wXi(shifted...
/sambristol_ssabp_w-0.0.15.tar.gz/sambristol_ssabp_w-0.0.15/sambristol_ssabp_w/wxi.py
0.836521
0.727044
wxi.py
pypi
class shiftedLJ(): """ Simple class which allows for evaluation of Lennard-Jones (LJ) potential with value of 0 at 2**(1./6.). For r<2**(1./6.), this potential is equivalent to the Weeks-Chandler-Anderson potential. Note that length is measured in units of sigma. The explicit form of the po...
/sambristol_ssabp_w-0.0.15.tar.gz/sambristol_ssabp_w-0.0.15/sambristol_ssabp_w/trimerbc.py
0.942784
0.852045
trimerbc.py
pypi
import numpy as np import scipy.special as special from scipy.integrate import solve_ivp, solve_bvp from .trimerbc import expPot from .effectivepotential import twobody_value,twobody_derivative from .meshode import meshODE class wdiffPot(expPot): """ Evaluate the w(r) function which satisfies the differ...
/sambristol_ssabp_w-0.0.15.tar.gz/sambristol_ssabp_w-0.0.15/sambristol_ssabp_w/wdiffpot.py
0.829734
0.575021
wdiffpot.py
pypi
import numpy as np import scipy.special as special from scipy.integrate import solve_ivp, solve_bvp from .trimerbc import shiftedLJ from .effectivepotential import twobody_value,twobody_derivative from .meshode import meshODE class wPerturb(shiftedLJ): """ Evaluate the w(r) function which satisfies the ...
/sambristol_ssabp_w-0.0.15.tar.gz/sambristol_ssabp_w-0.0.15/sambristol_ssabp_w/wperturb.py
0.81309
0.714827
wperturb.py
pypi
import numpy as np import scipy.special as special from .trimerbc import shiftedLJ from .effectivepotential import twobody_value, twobody_derivative from .effectivepotential import threebody_value, threebody_derivative_u class wHardSphere(shiftedLJ): """ Evaluate the w(r) function which satisfies the d...
/sambristol_ssabp_w-0.0.15.tar.gz/sambristol_ssabp_w-0.0.15/sambristol_ssabp_w/whardsphere.py
0.893626
0.697648
whardsphere.py
pypi
import numpy as np import math from scipy.integrate import romb class MayerInt(): """ This class is focused on computing the integral of the first correction in density to the radial distribution function for the 2D active brownian particle system with effective two-body potential V(r). The r...
/sambristol_ssabp_w-0.0.15.tar.gz/sambristol_ssabp_w-0.0.15/sambristol_ssabp_w/mayerint.py
0.722625
0.751101
mayerint.py
pypi
import networkx as nx import itertools import numpy as np from math import factorial def gen_expected_crick_angles(P, rep_len, start_ph1, ap=False): step = 360 / P if ap: sign=-1 else: sign=1 return [adj(start_ph1+(sign * i * float(step))) for i in range(rep_len)] def adj2(ang): ang = adj(ang) if ang < -...
/samcc-turbo-0.0.2.tar.gz/samcc-turbo-0.0.2/samcc/helper_functions.py
0.505859
0.593315
helper_functions.py
pypi
import itertools import heapq import numpy as np import scipy.spatial.distance as distance import scipy.optimize import functools from operator import attrgetter from Bio import PDB from .bundle import get_local_axis def create_pymol_selection_from_socket_results(indices): """create pymol-readable selection from soc...
/samcc-turbo-0.0.2.tar.gz/samcc-turbo-0.0.2/samcc/layer_detection.py
0.510252
0.5047
layer_detection.py
pypi
import argparse import os import json from random import shuffle from pathlib import Path from flattenKern import flatten_gpos_kerning from typing import Union from fontTools.ttLib import TTFont from defcon import Font __all__ = ["SameWidther", "TTFont", "Font"] class SameWidther: def __init__(self, font: Union[...
/sameWidther-0.0.5.tar.gz/sameWidther-0.0.5/Lib/sameWidther.py
0.762336
0.291321
sameWidther.py
pypi
import dash from dash import dcc, html, Input, Output import dash_bootstrap_components as dbc import plotly.express as px import pandas as pd import matplotlib.font_manager as fm def get_system_fonts(): font_list = fm.findSystemFonts(fontpaths=None, fontext='ttf') font_names = [fm.FontProperties(fname=font_fil...
/sameh-stirling-0.0.6.tar.gz/sameh-stirling-0.0.6/sameh_stirling/stacked_bar.py
0.68616
0.253476
stacked_bar.py
pypi
import dash from dash import dcc, html, Input, Output import dash_bootstrap_components as dbc import plotly.express as px import pandas as pd import matplotlib.font_manager as fm def get_system_fonts(): font_list = fm.findSystemFonts(fontpaths=None, fontext='ttf') font_names = [fm.FontProperties(fname=font_fil...
/sameh-stirling-0.0.6.tar.gz/sameh-stirling-0.0.6/sameh_stirling/bubble_chart.py
0.646349
0.301683
bubble_chart.py
pypi
# Check clients that are known to be incompatible with `SameSite=None`. import re def should_send_same_site_none(useragent): return useragent is None or not is_same_site_none_incompatible(useragent) # _classes of browsers known to be incompatible. def is_same_site_none_incompatible(useragent): return ha...
/samesite-compat-check-0.2.0.tar.gz/samesite-compat-check-0.2.0/samesite_compat_check/check.py
0.767864
0.416856
check.py
pypi
import sys import subprocess import argparse import re from collections import defaultdict parser = argparse.ArgumentParser( description='This script is for parsing the BAM file and look for reads overlapping with the target genes and report the pileup.') parser.add_argument('sample_id', help='sample ID') parser.a...
/samestr-1.2023.4-py3-none-any.whl/samestr-1.2023.4.data/scripts/kpileup.py
0.640636
0.37777
kpileup.py
pypi
import argparse import numpy as np from os.path import isdir, basename from os import makedirs # Input arguments # --------------- parser = argparse.ArgumentParser() parser.add_argument('--kp', help='Kpileup alignments (.kp.txt)') parser.add_argument('--map', help='Map of genomes to contigs (tab-delimited)') parser.a...
/samestr-1.2023.4-py3-none-any.whl/samestr-1.2023.4.data/scripts/kp2np.py
0.488527
0.307969
kp2np.py
pypi
# Samil Power inverter tool [![PyPI](https://img.shields.io/pypi/v/samil)](https://pypi.org/project/samil/) Get model and status data from Samil Power inverters over the network. If you just need PVOutput.org uploading, you can also try the [old version](https://github.com/mhvis/solar/tree/v1). ## Supported inverte...
/samil-2.2.1.tar.gz/samil-2.2.1/README.md
0.435661
0.943504
README.md
pypi
<div align="center"> <img src="https://github.com/sepandhaghighi/samila/raw/master/otherfiles/logo.png" width=400 height=400> <br/> <h1>Samila</h1> <br/> <a href="https://www.python.org/"><img src="https://img.shields.io/badge/built%20with-Python3-green.svg" alt="built with Python3" /></a> <a href="https://codecov.io/g...
/samila-1.1.tar.gz/samila-1.1/README.md
0.523177
0.900836
README.md
pypi
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'DonationSuggestion' db.create_table('samklang_payment_donationsuggestion', ( ('id', self.gf('dja...
/samklang-payment-0.6.0.tar.gz/samklang-payment-0.6.0/samklang_payment/migrations/0003_auto__add_donationsuggestion__add_field_donationcampaign_default_amoun.py
0.400867
0.150559
0003_auto__add_donationsuggestion__add_field_donationcampaign_default_amoun.py
pypi
# SAML Reader ## **IMPORTANT** Please **DO NOT** add any personally identifiable information (PII) when reporting an issue. This means **DO NOT** upload any SAML data, even if it is yours. I don't want to be responsible for it. :) ## Table of Contents - [SAML Reader](#saml-reader) - [**IMPORTANT**](#important) ...
/saml_reader-0.0.6.tar.gz/saml_reader-0.0.6/README.md
0.494385
0.754146
README.md
pypi
import json from urllib.parse import unquote import haralyzer class HarParsingError(Exception): """ Custom exception raised when we get any error from the HAR parser """ pass class NoSAMLResponseFound(Exception): """ Custom exception if we don't find a SAML response """ pass class...
/saml_reader-0.0.6.tar.gz/saml_reader-0.0.6/saml_reader/har.py
0.450359
0.330924
har.py
pypi
from itertools import zip_longest from cryptography import x509 from cryptography.hazmat.backends import default_backend class Certificate(object): """ Wrapper around cryptography's x509 parser for PEM certificates with helper functions to retrieve relevant data from the certificate """ def __ini...
/saml_reader-0.0.6.tar.gz/saml_reader-0.0.6/saml_reader/cert.py
0.841565
0.249979
cert.py
pypi
import sys import pyperclip from saml_reader.cert import Certificate from saml_reader.saml.parser import RegexSamlParser, StandardSamlParser from saml_reader.saml.errors import SamlParsingError, SamlResponseEncryptedError, IsASamlRequest, DataTypeInvalid from saml_reader.har import HarParser, HarParsingError, NoSAMLR...
/saml_reader-0.0.6.tar.gz/saml_reader-0.0.6/saml_reader/text_reader.py
0.575588
0.239061
text_reader.py
pypi
from abc import ABC, abstractmethod class BaseSamlParser(ABC): """ Generalized SAML response parser """ def __init__(self): """ Parses SAML response from base64 input. Args: response (basestring): SAML response as a base64-encoded string Raises: ...
/saml_reader-0.0.6.tar.gz/saml_reader-0.0.6/saml_reader/saml/base.py
0.92297
0.535584
base.py
pypi
from collections import defaultdict import re from onelogin.saml2.utils import OneLogin_Saml2_Utils as utils from urllib.parse import unquote from lxml import etree from saml_reader.saml.base import BaseSamlParser from saml_reader.saml.oli import OLISamlParser from saml_reader.saml.errors import SamlResponseEncrypted...
/saml_reader-0.0.6.tar.gz/saml_reader-0.0.6/saml_reader/saml/parser.py
0.817502
0.362715
parser.py
pypi