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 .baseorder import BaseOrder from .helper import direction_from_amount, order_duration_spec import saxo_openapi.definitions.orders as OD from .mixin import OnFillHnd class StopOrder(BaseOrder, OnFillHnd): """create a StopOrder. StopOrder is used to build the body for a StopOrder. The body can be use...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/contrib/orders/stoporder.py
0.869687
0.284954
stoporder.py
pypi
def dyndoc_insert(src): """docstring_insert - a decorator to insert API-docparts dynamically.""" # manipulating docstrings this way is tricky due to indentation # the JSON needs leading whitespace to be interpreted correctly import json import re def mkblock(d, flag=0): # response, pret...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/decorators.py
0.689933
0.281356
decorators.py
pypi
from .base import Charts from ..decorators import dyndoc_insert, endpoint from .responses.charts import responses @endpoint("openapi/chart/v1/charts") class GetChartData(Charts): """Return chart data as specified by request parameters.""" @dyndoc_insert(responses) def __init__(self, params): """I...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/chart/charts.py
0.754101
0.206514
charts.py
pypi
responses = { "_v3_AccountPerformance": { "url": "/openapi/hist/v3/perf/{ClientKey}", "params": { 'FromDate': '2019-03-01', 'ToDate': '2019-03-10' }, "response": { "AccountSummary": { "AverageTradeDurationInMinutes": 34260, ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/accounthistory/responses/performance.py
0.611266
0.337913
performance.py
pypi
responses = { "_v3_HistoricalPositions": { "url": "/openapi/hist/v3/positions/{ClientKey}", "params": { 'FromDate': '2019-03-01', 'ToDate': '2019-03-10' }, "response": { "Data": [ { "AccountId": "112209INET", ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/accounthistory/responses/historicalpositions.py
0.503418
0.303532
historicalpositions.py
pypi
from .base import ValueAdd from ..decorators import dyndoc_insert, endpoint from .responses.pricealerts import responses @endpoint("openapi/vas/v1/pricealerts/definitions/") class GetAllAlerts(ValueAdd): """Get an unsorted list of all the price alert definitions belonging to the current user where the state m...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/valueadd/pricealerts.py
0.657538
0.183447
pricealerts.py
pypi
from ..decorators import dyndoc_insert, endpoint from .base import ReferenceData from .responses.instruments import responses @endpoint("openapi/ref/v1/instruments/") class Instruments(ReferenceData): """Get a list of summary information for all instruments and options on the Saxo Trading platform restricted ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/referencedata/instruments.py
0.67822
0.160365
instruments.py
pypi
from ..decorators import dyndoc_insert, endpoint from .base import ReferenceData from .responses.standarddates import responses @endpoint("openapi/ref/v1/standarddates/forwardtenor/{Uic}") class ForwardTenorDates(ReferenceData): """Get a list of forward tenor dates for an UIC.""" @dyndoc_insert(responses) ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/referencedata/standarddates.py
0.760384
0.192805
standarddates.py
pypi
from ..decorators import dyndoc_insert, endpoint from .base import ReferenceData from .responses.algostrategies import responses @endpoint("openapi/ref/v1/algostrategies/") class AlgoStrategies(ReferenceData): """Retrieve a list of strategies with detailed information about each strategy. The response also co...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/referencedata/algostrategies.py
0.672332
0.192767
algostrategies.py
pypi
responses = { "_v3_ExchangeList": { "url": "/openapi/ref/v1/exchanges", "response": { "__count": 181, "Data": [ { "AllDay": False, "CountryCode": "US", "Currency": "USD", "ExchangeId": "NYSE_ARCA", ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/referencedata/responses/exchanges.py
0.519521
0.356559
exchanges.py
pypi
responses = { "_v3_Instruments": { "url": "/openapi/ref/v1/instruments", "params": {'AccountKey': 'Cf4xZWiYL6W1nMKpygBLLA==', 'Uics': '12,22,23'}, "response": { "Data": [ { "AssetType": "FxSpot", "CurrencyCode": "AU...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/referencedata/responses/instruments.py
0.499512
0.342379
instruments.py
pypi
responses = { "_v3_Currencies": { "url": "/openapi/ref/v1/currencies", "response": { "Data": [ { "CurrencyCode": "USD", "Decimals": 2, "Name": "US Dollar", "Symbol": "$" }, ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/referencedata/responses/currencies.py
0.551332
0.316647
currencies.py
pypi
responses = { "_v3_ForwardTenorDates": { "url": "/openapi/ref/v1/standarddates/forwardtenor/{Uic}", "params": {'AccountKey': 'Cf4xZWiYL6W1nMKpygBLLA=='}, "response": { "Data": [ { "Date": "2019-03-06", "Unit": "Days", ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/referencedata/responses/standarddates.py
0.490236
0.368122
standarddates.py
pypi
responses = { "_v3_AlgoStrategies": { "url": "/openapi/ref/v1/algostrategies", "params": {'$top': '...', '$skip': '...'}, "response": { "__count": 4, "Data": [ { "Description": "Group of VWAP", "MinAmountUSD": 0, ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/referencedata/responses/algostrategies.py
0.538983
0.354712
algostrategies.py
pypi
from .base import Trading from ..decorators import dyndoc_insert, endpoint from .responses.optionschain import responses @endpoint("openapi/trade/v1/optionschain/subscriptions", "POST", 201) class OptionsChainSubscriptionCreate(Trading): """Create an active options chain subscription.""" @dyndoc_insert(respo...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/trading/optionschain.py
0.733643
0.160463
optionschain.py
pypi
from .base import Trading from ..decorators import dyndoc_insert, endpoint from .responses.positions import responses @endpoint("openapi/trade/v1/positions", "POST", 201) class PositionByQuote(Trading): """Creates a new position by accepting a quote. The quote must be the most recent one and it must be trada...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/trading/positions.py
0.682574
0.311535
positions.py
pypi
from .base import Trading from ..decorators import dyndoc_insert, endpoint from .responses.orders import responses @endpoint("openapi/trade/v2/orders", "POST") class Order(Trading): """Place a new order.""" @dyndoc_insert(responses) def __init__(self, data): """Instantiate an Order request. ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/trading/orders.py
0.732592
0.219588
orders.py
pypi
from .base import Trading from ..decorators import dyndoc_insert, endpoint from .responses.infoprices import responses @endpoint("openapi/trade/v1/infoprices") class InfoPrice(Trading): """Gets an info price for an instrument using the specified parameters. """ @dyndoc_insert(responses) def __ini...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/trading/infoprices.py
0.778102
0.257497
infoprices.py
pypi
from .base import Trading from ..decorators import dyndoc_insert, endpoint from .responses.prices import responses @endpoint("openapi/trade/v1/prices/subscriptions", "POST", 201) class CreatePriceSubscription(Trading): """Sets up an active price subscription on an instrument and returns an initial snapshot of...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/trading/prices.py
0.698432
0.218461
prices.py
pypi
responses = { "_v3_InfoPrice": { "url": "openapi/trade/v1/infoprices", "params": { 'Uic': 22, 'AccountKey': '81ef1924-c25f-43fe-90ff-028e3fe249f2', 'AssetType': '...', '<other-parms>': '...', }, "response": { "AssetType": "F...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/trading/responses/infoprices.py
0.522933
0.420124
infoprices.py
pypi
responses = { "_v3_GetTradeMessages": { "url": "openapi/trade/v1/messages", "response": { "Data": [ { "DateTime": "2014-12-12T09:17:12Z", "DisplayName": "Price Alert", "DisplayType": "Default", "IsDiscardable": False, ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/trading/responses/messages.py
0.412294
0.245057
messages.py
pypi
from ..decorators import dyndoc_insert, endpoint from .base import Portfolio from .responses.closedpositions import responses @endpoint("openapi/port/v1/closedpositions/") class ClosedPositionList(Portfolio): """Returns a list of closed positions fulfilling the criteria specified by the query string parameter...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/portfolio/closedpositions.py
0.768168
0.247282
closedpositions.py
pypi
from ..decorators import dyndoc_insert, endpoint from .base import Portfolio from .responses.balances import responses @endpoint("openapi/port/v1/balances/me") class AccountBalancesMe(Portfolio): """Get balance data for a client or an account. Defaults to logged-in client. """ @dyndoc_insert(response...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/portfolio/balances.py
0.762247
0.154185
balances.py
pypi
responses = { "_v3_ClosedPositionList": { "url": "/openapi/port/v1/closedpositions/", "params": {}, "response": { "__count": 5, "Data": [ { "ClosedPosition": { "AccountId": "9226397", "Amount": 80000, ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/portfolio/responses/closedpositions.py
0.477554
0.343672
closedpositions.py
pypi
responses = { "_v3_AccountBalancesMe": { "url": "/port/v1/balances/me", "response": { "CalculationReliability": "Ok", "CashBalance": 999956.74, "ChangesScheduled": False, "ClosedPositionsCount": 0, "CollateralCreditValue": { "...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/portfolio/responses/balances.py
0.522933
0.410343
balances.py
pypi
responses = { "_v3_SinglePosition": { "url": "/openapi/port/v1/positions/{PositionId}", "params": {'ClientKey': 'Cf4xZWiYL6W1nMKpygBLLA=='}, "response": { "NetPositionId": "EURUSD__FxSpot", "PositionBase": { "AccountId": "9226397", "Amount"...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/portfolio/responses/positions.py
0.423339
0.378229
positions.py
pypi
responses = { "_v3_SingleNetPosition": { "url": "/openapi/port/v1/netpositions/{NetPositionId}", "params": {'ClientKey': 'Cf4xZWiYL6W1nMKpygBLLA=='}, "response": { "NetPositionBase": { "AccountId": "9226397", "Amount": 100000, "AssetType": "F...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/portfolio/responses/netpositions.py
0.515864
0.4081
netpositions.py
pypi
responses = { "_v3_NetInstrumentsExposureMe": { "url": "/openapi/port/v1/exposure/instruments/me", "response": [ { "Amount": 60000, "AssetType": "FxSpot", "AverageOpenPrice": 1.13071, "CalculationReliability": "Ok", "C...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/endpoints/portfolio/responses/exposure.py
0.544559
0.400749
exposure.py
pypi
"""AccountHistory Definitions.""" definitions = { "InlineCountValue": { "AllPages": "The results will contain a total count of items in the " "queried dataset.", "None": "The results will not contain an inline count.", }, "AccountPerformanceStandardPeriod": { "Al...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/definitions/accounthistory.py
0.591133
0.494568
accounthistory.py
pypi
definitions = { 'AmountType': { 'CashAmount': 'Order amount is specified as a monetary value', 'Quantity': 'Order Amount is specified as an amount of ' 'lots/shares/contracts' }, 'AssetType': { 'Bond': 'Bond', 'CfdIndexOption': 'Cfd Index Option', ...
/saxo_openapi-0.6.0.tar.gz/saxo_openapi-0.6.0/saxo_openapi/definitions/orders.py
0.590071
0.283041
orders.py
pypi
import saxs_single_bead.form_factors import numpy as np def scattering_curve( residue_codes, residue_locations, minimal_q=0.0, maximal_q=0.5, points=20 ): """ Computes scattering curve from `residue_codes` and `residue_locations` `N` by `3` array. Parameters ---------- residue_codes: list(st...
/saxs_single_bead-0.0.3.tar.gz/saxs_single_bead-0.0.3/saxs_single_bead/scattering_curve.py
0.915837
0.70791
scattering_curve.py
pypi
import numpy as np def _get_spherical(): """ Return vector distributed uniformly on a sphere """ x = 2.0 * np.random.uniform() - 1.0 phi = 2.0 * np.random.uniform() - 1.0 scale = np.sqrt(1.0 - x * x) y = scale * np.sin(np.pi * phi) z = scale * np.cos(np.pi * phi) return np.array([x...
/saxs_single_bead-0.0.3.tar.gz/saxs_single_bead-0.0.3/saxs_single_bead/replace_bead.py
0.878555
0.773281
replace_bead.py
pypi
Change Log ========== **1.6.5** (January 17, 2018) Added new ``f`` aliast to ``fmt`` as compatibility shim / polyfill for users moving toward Python 3.6+ f-strings, but who have to support prior versions. **1.6.4** (May 27, 2017) Now uses the latest version of ``ansicolors``, extending to the ...
/say-1.6.5.zip/say-1.6.5/docs/CHANGES.rst
0.843283
0.679285
CHANGES.rst
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 ...
/sayan_distributions-1.0.tar.gz/sayan_distributions-1.0/sayan_distributions/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
# Database objects The most common task found in SAYN projects is the `autosql` task. This is a type of tasks where you write a `SELECT` statement and SAYN handles the database object creation. When you run the project you would want a task selecting from a table to run after the task that creates said table. In order...
/sayn-0.6.11-py3-none-any.whl/docs/database_objects.md
0.901161
0.986662
database_objects.md
pypi
# `python` Task ## About The `python` task allows you to run python scripts. Therefore, those tasks can do anything Python can do. They are extremely useful for data extraction or data science models. There are two models for specifying python tasks in SAYN: a simple way through using decorators and a more advanced ...
/sayn-0.6.11-py3-none-any.whl/docs/tasks/python.md
0.949728
0.971618
python.md
pypi
# `autosql` Task **[SUNSETTED]** ## About The `autosql` task lets you write a `SELECT` statement and SAYN then automates the data processing (i.e. table or view creation, incremental load, etc.) for you. ## Defining `autosql` Tasks An `autosql` task group is defined as follows: !!! example "project.yaml" ``` ...
/sayn-0.6.11-py3-none-any.whl/docs/tasks/autosql.md
0.927552
0.955693
autosql.md
pypi
# Tasks ## About A SAYN project is split into units of execution called tasks. The order of execution of these tasks is given based on the dependencies between them which you specify when writing your tasks. SAYN then takes this information and generates a DAG (Direct Acyclic Graph) automatically. !!! info A Dir...
/sayn-0.6.11-py3-none-any.whl/docs/tasks/overview.md
0.896473
0.986598
overview.md
pypi
# `copy` Task ## About The `copy` task copies tables from one database to another. It can be used to automatically ingest data from operational databases (e.g. PostgreSQL) to your analytics warehouse. !!! attention Copy tasks can only be defined in YAML groups in the tasks folder, not directly in `project.yaml`....
/sayn-0.6.11-py3-none-any.whl/docs/tasks/copy.md
0.904673
0.939748
copy.md
pypi
# `sql` Task ## About The `sql` task provides you with different options for working with SQL queries. It lets you execute a SQL script with one or many statements. This is useful for executing `UPDATE` statements for example. It also lets you write a `SELECT` statement and SAYN then automates the data processing (i....
/sayn-0.6.11-py3-none-any.whl/docs/tasks/sql.md
0.937117
0.962813
sql.md
pypi
# SAYN Project Example: Reddit News NLP ## Project Description #### Overview This is an example SAYN project which shows how to use SAYN for data modelling and processing. You can find the GitHub repository [here](https://github.com/173TECH/sayn_project_example_nlp_news_scraping){target="\_blank"}. This project doe...
/sayn-0.6.11-py3-none-any.whl/docs/project_examples/reddit_news_nlp.md
0.896399
0.987338
reddit_news_nlp.md
pypi
# SAYN Project Example: BBC News NLP ## Project Description #### Overview This is an example SAYN project which shows how to use SAYN for data modelling and processing. You can find the GitHub repository [here](https://github.com/173TECH/sayn_project_example_nlp_news_scraping){target="\_blank"}. This project does t...
/sayn-0.6.11-py3-none-any.whl/docs/project_examples/bbc_news_nlp.md
0.92361
0.985909
bbc_news_nlp.md
pypi
# Tutorial Part 3: Using Python With SAYN The [previous section of this tutorial](tutorial_part2.md) showed you how to use SAYN for data modelling purposes. We will now show you how to use Python with SAYN. This will therefore enable you to write end-to-end ELT processes and data science tasks with SAYN. Let's dive in...
/sayn-0.6.11-py3-none-any.whl/docs/tutorials/tutorial_part3.md
0.928611
0.951097
tutorial_part3.md
pypi
# Tutorial Part 2: Data Modelling With SAYN In the [first part of the tutorial](tutorial_part1.md), we executed our first SAYN run and went through the core components of a SAYN project. We will now see how to use SAYN for data modelling, a major process of analytics warehousing. ## SQL Tasks With SAYN SAYN can exec...
/sayn-0.6.11-py3-none-any.whl/docs/tutorials/tutorial_part2.md
0.887418
0.980034
tutorial_part2.md
pypi
# Redshift The Redshift driver depends on [psycopg2](https://www.psycopg.org){target="\_blank"} and can be installed with: ```bash pip install "sayn[redshift]" ``` The [Redshift](https://aws.amazon.com/redshift/){target="\_blank"} connector looks for the following parameters: Parameter | Description ...
/sayn-0.6.11-py3-none-any.whl/docs/databases/redshift.md
0.61555
0.891764
redshift.md
pypi
# SaysWho **SaysWho** is a Python package for identifying and attributing quotes in text. It uses a combination of logic and grammer to find quotes and their speakers, then uses a [coreferencing model](https://explosion.ai/blog/coref) to better clarify who is speaking. It's built on [Textacy](https://textacy.readthedoc...
/sayswho-0.1.4.tar.gz/sayswho-0.1.4/README.md
0.437944
0.9699
README.md
pypi
<center> <a href="/"><img src="/assets/img/logo-color.png" width="100%"></img></a> <p class="logo-caption"> <span class="red">Make</span> <span class="orange"> music</span> <span class="yellow"> with </span> <span class="green"> Mac's</span> <code><span class="blue">say</span></code></span> <span class="pur...
/saysynth-1.0.8.tar.gz/saysynth-1.0.8/README.md
0.764892
0.892516
README.md
pypi
import itertools import numpy as np import pandas as pd from typing import * from cached_property import cached_property from pymoo.core.variable import Variable, Real, Integer, Binary, Choice __all__ = ['ArchDesignSpace', 'ImplicitArchDesignSpace'] class ArchDesignSpace: """ Base class for a hierarchical ar...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/design_space.py
0.895893
0.619356
design_space.py
pypi
import os import re import pickle import hashlib import numpy as np from typing import * import concurrent.futures import matplotlib.pyplot as plt from pymoo.optimize import minimize from pymoo.core.variable import Real from pymoo.core.problem import Problem from pymoo.core.evaluator import Evaluator from pymoo.visual...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/pareto_front.py
0.784154
0.310681
pareto_front.py
pypi
import logging import warnings import numpy as np from typing import Optional, Tuple, List from scipy.stats.qmc import Sobol from scipy.spatial import distance from pymoo.core.repair import Repair from pymoo.core.variable import Real from pymoo.core.problem import Problem from pymoo.core.sampling import Sampling from ...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/sampling.py
0.898905
0.452475
sampling.py
pypi
import logging import numpy as np import pandas as pd from typing import * import pymoo.core.variable as var from pymoo.core.population import Population from sb_arch_opt.problem import ArchOptProblemBase try: from hebo.design_space.param import Parameter from hebo.design_space.design_space import DesignSpace ...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/hebo_interface/algo.py
0.819641
0.181444
algo.py
pypi
import numpy as np import pymoo.core.variable as var from pymoo.core.population import Population from sb_arch_opt.problem import ArchOptProblemBase try: from ax import ParameterType, RangeParameter, ChoiceParameter, SearchSpace, Experiment, OptimizationConfig, \ Objective, MultiObjective, OutcomeConstrain...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/botorch_interface/algo.py
0.715523
0.306268
algo.py
pypi
import os import logging import pathlib import numpy as np from typing import * import pymoo.core.variable as var from sb_arch_opt.util import capture_log from pymoo.core.population import Population from sb_arch_opt.problem import ArchOptProblemBase # https://github.com/explosion/spaCy/issues/7664#issuecomment-825501...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/trieste_interface/algo.py
0.882231
0.276794
algo.py
pypi
import timeit import numpy as np from typing import * from enum import Enum from scipy.stats import norm from scipy.special import ndtr from sb_arch_opt.problem import ArchOptProblemBase from sb_arch_opt.algo.arch_sbo.hc_strategy import HiddenConstraintStrategy from pymoo.core.problem import Problem from pymoo.core.po...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/arch_sbo/infill.py
0.885328
0.422803
infill.py
pypi
from pymoo.core.indicator import Indicator from pymoo.indicators.hv import Hypervolume from pymoo.util.display.column import Column from pymoo.core.termination import TerminateIfAny from pymoo.termination.max_gen import MaximumGenerationTermination from sb_arch_opt.algo.pymoo_interface.metrics import * __all__ = ['Est...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/arch_sbo/metrics.py
0.790449
0.326432
metrics.py
pypi
import numpy as np from typing import * from sb_arch_opt.problem import * from sb_arch_opt.algo.arch_sbo.models import * from pymoo.util.normalization import Normalization, SimpleZeroToOneNormalization try: from smt.surrogate_models.surrogate_model import SurrogateModel assert HAS_ARCH_SBO except ImportError: ...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/arch_sbo/hc_strategy.py
0.900086
0.533276
hc_strategy.py
pypi
from sb_arch_opt.problem import * from sb_arch_opt.algo.arch_sbo.models import * from sb_arch_opt.algo.arch_sbo.algo import * from sb_arch_opt.algo.arch_sbo.infill import * from sb_arch_opt.algo.arch_sbo.metrics import * from sb_arch_opt.algo.arch_sbo.hc_strategy import * if not HAS_ARCH_SBO: get_sbo_termination =...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/arch_sbo/api.py
0.855187
0.263771
api.py
pypi
import os import copy import numpy as np from typing import * from dataclasses import dataclass import pymoo.core.variable as var from pymoo.core.problem import Problem from sb_arch_opt.problem import ArchOptProblemBase from sb_arch_opt.design_space import ArchDesignSpace from sb_arch_opt.sampling import HierarchicalSa...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/arch_sbo/models.py
0.82485
0.307611
models.py
pypi
import logging import numpy as np from pymoo.core.population import Population from sb_arch_opt.problem import ArchOptProblemBase try: from smarty.problem.optimizationProblem import CustomOptProb from smarty.optimize.sbo import SBO from smarty.optimize import convergenceCriteria as CC from smarty impor...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/smarty_interface/algo.py
0.820037
0.168139
algo.py
pypi
import logging import numpy as np from typing import Optional from sb_arch_opt.problem import * from sb_arch_opt.util import capture_log from sb_arch_opt.algo.pymoo_interface.api import ResultsStorageCallback, ArchOptEvaluator from sb_arch_opt.algo.pymoo_interface.storage_restart import initialize_from_previous_results...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/tpe_interface/api.py
0.870239
0.301748
api.py
pypi
import math import numpy as np from pymoo.core.individual import Individual from pymoo.core.infill import InfillCriterion from pymoo.core.population import Population from pymoo.core.problem import Problem from pymoo.core.variable import Choice, Real, Integer, Binary from pymoo.operators.crossover.sbx import SBX from ...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/pymoo_interface/md_mating.py
0.773858
0.441131
md_mating.py
pypi
import os import pickle import logging import numpy as np import pandas as pd from typing import Optional from pymoo.core.result import Result from pymoo.core.callback import Callback from pymoo.core.algorithm import Algorithm from pymoo.core.evaluator import Evaluator from pymoo.core.population import Population, Ind...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/pymoo_interface/storage_restart.py
0.865665
0.328395
storage_restart.py
pypi
import logging from pymoo.core.algorithm import Algorithm from pymoo.algorithms.moo.nsga2 import NSGA2, RankAndCrowdingSurvival from pymoo.termination.max_eval import MaximumFunctionCallTermination from sb_arch_opt.sampling import * from sb_arch_opt.util import capture_log from sb_arch_opt.problem import ArchOptRepair...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/pymoo_interface/api.py
0.820685
0.258124
api.py
pypi
import os import logging import numpy as np from typing import Tuple from sb_arch_opt.sampling import * from sb_arch_opt.util import capture_log from pymoo.core.population import Population from sb_arch_opt.problem import ArchOptProblemBase from pymoo.util.nds.non_dominated_sorting import NonDominatedSorting try: ...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/algo/segomoe_interface/algo.py
0.809238
0.223568
algo.py
pypi
import numpy as np from pymoo.core.variable import Real from pymoo.problems.single.himmelblau import Himmelblau as HB from pymoo.problems.single.rosenbrock import Rosenbrock as RB from pymoo.problems.single.griewank import Griewank as GW from sb_arch_opt.problems.problems_base import * __all__ = ['Himmelblau', 'Rosenb...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/problems/continuous.py
0.782205
0.482734
continuous.py
pypi
import numpy as np from pymoo.core.variable import Real from pymoo.problems.multi.zdt import ZDT1 from pymoo.problems.single.himmelblau import Himmelblau as HB from sb_arch_opt.problems.continuous import * from sb_arch_opt.problems.problems_base import * __all__ = ['MOHimmelblau', 'MDMOHimmelblau', 'DMOHimmelblau', 'M...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/problems/md_mo.py
0.712432
0.339472
md_mo.py
pypi
import itertools import numpy as np from typing import Optional, Tuple from pymoo.core.problem import Problem from pymoo.core.variable import Real, Integer from sb_arch_opt.problem import ArchOptProblemBase from sb_arch_opt.pareto_front import CachedParetoFrontMixin from sb_arch_opt.sampling import HierarchicalExhausti...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/problems/problems_base.py
0.870583
0.408454
problems_base.py
pypi
import numpy as np from pymoo.core.variable import Real from pymoo.problems.multi.osy import OSY from pymoo.problems.multi.carside import Carside from pymoo.problems.multi.welded_beam import WeldedBeam from pymoo.problems.multi.dascmop import DASCMOP7, DIFFICULTIES from pymoo.problems.single.cantilevered_beam import Ca...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/problems/constrained.py
0.823257
0.380989
constrained.py
pypi
import numpy as np import matplotlib.pyplot as plt from pymoo.core.population import Population from pymoo.core.variable import Real, Choice, Integer from sb_arch_opt.problems.continuous import Branin from sb_arch_opt.problems.problems_base import * __all__ = ['MDBranin', 'AugmentedMDBranin', 'MDGoldstein', 'MunozZuni...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/problems/discrete.py
0.778986
0.65159
discrete.py
pypi
import itertools import numpy as np from typing import List from pymoo.core.variable import Integer, Choice from sb_arch_opt.problems.hierarchical import HierarchyProblemBase __all__ = ['GNCProblemBase', 'GNCNoActNrType', 'GNCNoActType', 'GNCNoActNr', 'GNCNoAct', 'GNCNoNrType', 'GNCNoType', 'GNCNoNr', 'GNC'...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/problems/gnc.py
0.847779
0.507507
gnc.py
pypi
import numpy as np from deprecated import deprecated from scipy.spatial import distance from pymoo.core.variable import Real from sb_arch_opt.problems.constrained import * from sb_arch_opt.problems.hierarchical import * from sb_arch_opt.problems.problems_base import * from sb_arch_opt.problems.continuous import Branin,...
/sb_arch_opt-1.1.5-py3-none-any.whl/sb_arch_opt/problems/hidden_constraints.py
0.783823
0.336004
hidden_constraints.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 ...
/sb_distributions-0.1.tar.gz/sb_distributions-0.1/sb_distributions/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
from datetime import datetime import json import requests from finance.models import Granularity from finance.providers.provider import AssetValueProvider class Yahoo(AssetValueProvider): """Fetches and parses financial data from Yahoo Finance.""" name = 'yahoo' def __init__(self): pass d...
/sb-finance-0.4.1.tar.gz/sb-finance-0.4.1/finance/providers/yahoo.py
0.800146
0.408159
yahoo.py
pypi
import codecs from datetime import timedelta from finance.providers.provider import Provider from finance.providers.record import DateTime, Decimal, Integer, List, String DATE_INPUT_FORMAT = '%Y/%m/%d' DATE_OUTPUT_FORMAT = '%Y-%m-%d' # NOTE: This doesn't seem like a good idea... name_code_mappings = { '애플': 'AA...
/sb-finance-0.4.1.tar.gz/sb-finance-0.4.1/finance/providers/miraeasset.py
0.482185
0.36923
miraeasset.py
pypi
from typing import Optional, Union, Sequence, Dict from logging import getLogger from threading import Lock from statsd import StatsdClient from opentelemetry.metrics import ( MeterProvider, Meter, NoOpMeter, CallbackT, Counter, Histogram, ObservableCounter, ObservableGauge, Observa...
/sb-opentelemetry-sdk-extension-statsd-0.8.2.tar.gz/sb-opentelemetry-sdk-extension-statsd-0.8.2/src/opentelemetry/sdk/extension/statsd/metrics/__init__.py
0.94252
0.217151
__init__.py
pypi
from typing import Any, Dict, List, Optional, Type import torch as th from gymnasium import spaces from stable_baselines3.common.policies import BasePolicy from stable_baselines3.common.torch_layers import ( BaseFeaturesExtractor, CombinedExtractor, FlattenExtractor, NatureCNN, create_mlp, ) from s...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/qrdqn/policies.py
0.964313
0.565419
policies.py
pypi
import warnings from typing import Any, ClassVar, Dict, List, Optional, Tuple, Type, TypeVar, Union import numpy as np import torch as th from gymnasium import spaces from stable_baselines3.common.buffers import ReplayBuffer from stable_baselines3.common.off_policy_algorithm import OffPolicyAlgorithm from stable_basel...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/qrdqn/qrdqn.py
0.950457
0.547646
qrdqn.py
pypi
from typing import Any, Dict, List, Optional, Type import torch as th from gymnasium import spaces from stable_baselines3.common.policies import BasePolicy from stable_baselines3.common.preprocessing import get_action_dim from stable_baselines3.common.torch_layers import BaseFeaturesExtractor, create_mlp from torch im...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/ars/policies.py
0.968351
0.649078
policies.py
pypi
import sys import time from collections import deque from typing import Any, ClassVar, Dict, Optional, Tuple, Type, TypeVar, Union import numpy as np import torch as th from gymnasium import spaces from stable_baselines3.common import utils from stable_baselines3.common.buffers import RolloutBuffer from stable_baselin...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/ppo_mask/ppo_mask.py
0.838415
0.409988
ppo_mask.py
pypi
import sys import time from copy import deepcopy from typing import Any, ClassVar, Dict, Optional, Type, TypeVar, Union import numpy as np import torch as th from gymnasium import spaces from stable_baselines3.common.buffers import RolloutBuffer from stable_baselines3.common.callbacks import BaseCallback from stable_b...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/ppo_recurrent/ppo_recurrent.py
0.807195
0.389605
ppo_recurrent.py
pypi
from typing import Callable, Optional, Sequence import torch as th from torch import nn def quantile_huber_loss( current_quantiles: th.Tensor, target_quantiles: th.Tensor, cum_prob: Optional[th.Tensor] = None, sum_over_quantiles: bool = True, ) -> th.Tensor: """ The quantile-regression loss, ...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/common/utils.py
0.972323
0.819965
utils.py
pypi
import multiprocessing as mp from collections import defaultdict from typing import Callable, List, Optional, Tuple, Union import numpy as np import torch as th from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.policies import BasePolicy from stable_baselines3.common.running...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/common/vec_env/async_eval.py
0.90425
0.355859
async_eval.py
pypi
from typing import Generator, NamedTuple, Optional, Union import numpy as np import torch as th from gymnasium import spaces from stable_baselines3.common.buffers import DictRolloutBuffer, RolloutBuffer from stable_baselines3.common.type_aliases import TensorDict from stable_baselines3.common.vec_env import VecNormali...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/common/maskable/buffers.py
0.960166
0.539044
buffers.py
pypi
import os import numpy as np from stable_baselines3.common.callbacks import EvalCallback from stable_baselines3.common.vec_env import sync_envs_normalization from sb3_contrib.common.maskable.evaluation import evaluate_policy class MaskableEvalCallback(EvalCallback): """ Callback for evaluating an agent. Sup...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/common/maskable/callbacks.py
0.802826
0.433382
callbacks.py
pypi
import warnings from typing import Any, Callable, Dict, List, Optional, Tuple, Union import gymnasium as gym import numpy as np from stable_baselines3.common.monitor import Monitor from stable_baselines3.common.vec_env import DummyVecEnv, VecEnv, VecMonitor, is_vecenv_wrapped from sb3_contrib.common.maskable.utils im...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/common/maskable/evaluation.py
0.897555
0.58255
evaluation.py
pypi
from functools import partial from typing import Callable, Generator, Optional, Tuple, Union import numpy as np import torch as th from gymnasium import spaces from stable_baselines3.common.buffers import DictRolloutBuffer, RolloutBuffer from stable_baselines3.common.vec_env import VecNormalize from sb3_contrib.commo...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/common/recurrent/buffers.py
0.964288
0.517388
buffers.py
pypi
from typing import Any, Dict, List, Optional, Tuple, Type, Union import numpy as np import torch as th from gymnasium import spaces from stable_baselines3.common.distributions import Distribution from stable_baselines3.common.policies import ActorCriticPolicy from stable_baselines3.common.torch_layers import ( Bas...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/common/recurrent/policies.py
0.964153
0.599397
policies.py
pypi
from typing import List, Optional import numpy as np from gymnasium import spaces from stable_baselines3.common.envs import IdentityEnv class InvalidActionEnvDiscrete(IdentityEnv[int]): """ Identity env with a discrete action space. Supports action masking. """ def __init__( self, di...
/sb3_contrib-2.1.0.tar.gz/sb3_contrib-2.1.0/sb3_contrib/common/envs/invalid_actions_env.py
0.895657
0.516595
invalid_actions_env.py
pypi
# SbNative An extention to python for debugging and such. Things that, well `Should Be Native` ## SbNative may be used for - private projects. - public projects (The SbNative repo must be referenced in a Readme in case the source code is available.) DO NOT DISTRIBUTE. ALL NON MENTIONED RIGHTS RESERVED. ## Cha...
/sbNative-0.0.15.tar.gz/sbNative-0.0.15/README.md
0.85341
0.853608
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 ...
/sbad_distributions-0.1.tar.gz/sbad_distributions-0.1/sbad_distributions/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
Sideband <img align="right" src="https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg"/> ========= Sideband is an LXMF client for Android, Linux and macOS. It allows you to communicate with other people or LXMF-compatible systems over Reticulum networks using LoRa, Packet Radio, WiFi, I2P, Encrypte...
/sbapp-0.5.2.tar.gz/sbapp-0.5.2/README.md
0.499756
0.866472
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 ...
/sbbbxl_distrib-0.1.tar.gz/sbbbxl_distrib-0.1/sbbbxl_distrib/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
sbbst (Self Balancing Binary Search Tree) ----------------------------------------- A Python implementation of a self balancing binary search tree (AVL Tree). Useful to practice, study and see how a SBBST works. Introduction ============ A **self-balancing binary search tree** is a data structure, a kind advanced one...
/sbbst-1.0.tar.gz/sbbst-1.0/README.rst
0.66769
0.676887
README.rst
pypi
import numpy as np import pandas as pd from sbc import util import matplotlib.pyplot as plt class Result: def __init__(self, p, v, model_use): self.p = p self.v = v self.model_use = model_use def getDemandInterval(self): return self.p def getCVSquared(self): r...
/sbc_classification-0.0.4-py3-none-any.whl/sbc/sbc_class.py
0.468547
0.423756
sbc_class.py
pypi
import logging import uuid from django.contrib.auth.models import BaseUserManager, AbstractBaseUser, PermissionsMixin from django.db import models from django.db.models import Q from django.db.models import QuerySet from django.utils import timezone from django.utils.translation import ugettext as _ from faker import ...
/sbc_drf_user-1.0.3.tar.gz/sbc_drf_user-1.0.3/src/sbc_drf_user/models.py
0.547706
0.151247
models.py
pypi
import logging from rest_framework import permissions as rf_permissions L = logging.getLogger(__name__) class DjangoModelPermissions(rf_permissions.DjangoModelPermissions): """ Extends to add view permission """ perms_map = { 'GET': ['%(app_label)s.view_%(model_name)s'], 'OPTIONS': [...
/sbc_drf-1.1.6.tar.gz/sbc_drf-1.1.6/src/sbc_drf/permissions.py
0.77535
0.170439
permissions.py
pypi
__all__ = ['DynamicFieldsSerializerMixin', 'ExcludeOnUpdateSerializerMixin', 'InjectReqUserSerializerMixin'] from django.http import QueryDict class DynamicFieldsSerializerMixin: """ Returns only attributes passed in `query_params['fields']` Eg: /myendpoint?fields=name,email,id ""...
/sbc_drf-1.1.6.tar.gz/sbc_drf-1.1.6/src/sbc_drf/mixins/serializer.py
0.830147
0.27269
serializer.py
pypi
import logging class OverlayParam: ''' Represent a parameter in an overlay ''' def __init__(self, name:str, param_type:str, number_as_str=False, param_help='No additional help available', values=None, default_value=None, set_value=None): self.name = name if param_type in ['str', 'string']: ...
/sbc_gpio-1.0.3-py3-none-any.whl/sbc_gpio/dynamic_dts.py
0.665084
0.262877
dynamic_dts.py
pypi
import collections import datetime import logging import ntpath import re import pytz L = logging.getLogger('app.' + __name__) first_cap_re = re.compile('(.)([A-Z][a-z]+)') all_cap_re = re.compile('([a-z0-9])([A-Z])') def str2bool(v): """ Converts string to bool. True for any term from "yes", "true", "t", ...
/sbc_utils-1.0.2-py3-none-any.whl/sbc_utils/__init__.py
0.63375
0.275142
__init__.py
pypi
import csv import io from typing import List class Output: TEXT = 'text' CSV = 'csv' TABLE = 'table' CHOICES = ['text', 'csv', 'table'] def __init__(self, *headers: List[str]): if not isinstance(headers, tuple) or not headers: raise ValueError('expected list of strings for hea...
/sbcli_furlan-0.0.7-py3-none-any.whl/src/tools/output.py
0.708717
0.186891
output.py
pypi