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
# Getting Started ## Using samson samson has three means of use: as a library, the REPL UI, and the CLI. Using samson as a library is as easy as importing it (e.g. `from samson.all import *`).To use the REPL, run the `samson` command with no arguments. The CLI is invoked using the `samson` command with arguments (e.g...
/samson-crypto-0.3.0.tar.gz/samson-crypto-0.3.0/notebooks/getting_started.ipynb
0.436982
0.768842
getting_started.ipynb
pypi
# Computer Algebra System samson comes with a purpose-built computer algebra system (CAS) focusing on cryptographic applications. Like all of samson, the CAS was built to be transparent, easy to understand, and makes generous use of operator overloading. The goal was to make mathematical code as close as possible to ma...
/samson-crypto-0.3.0.tar.gz/samson-crypto-0.3.0/notebooks/computer_algebra_system.ipynb
0.892867
0.941654
computer_algebra_system.ipynb
pypi
## Trend Micro 2018 Crypto 400 - Cracking a Feistel Network <br/> ### _Feistel Networks_ A Feistel network (https://en.wikipedia.org/wiki/Feistel_cipher) is a construction used in block ciphers. Given a round function $F$ and a key schedule that produces sub-keys $K_0,...,K_n$, the algorithm is as follows: <br/> <br/...
/samson-crypto-0.3.0.tar.gz/samson-crypto-0.3.0/notebooks/trend_micro_2018_crypto_400_cracking_a_feistel_network.ipynb
0.506347
0.950915
trend_micro_2018_crypto_400_cracking_a_feistel_network.ipynb
pypi
import numpy as np from scipy.special import i1 import matplotlib.pyplot as plt def chbevl(x,array,n): """ Compute chebeyshev approximation to a function. Stolen from cephes C library (chbevl.c). Evaluates the series y = \sum_{i=0}^{n-1} array[i] T_i (x/2) of Chebyshev polynomials T_i at argument...
/samspecialfuncs-0.0.15.tar.gz/samspecialfuncs-0.0.15/src/bristol/generate_coeffs/chebyshev.py
0.727492
0.792304
chebyshev.py
pypi
from rest_framework.filters import SearchFilter, OrderingFilter, BaseFilterBackend class UserFilterForgiving(BaseFilterBackend): """ A filter backend that limits results to those where they are the foreign key 'user' """ def filter_queryset(self, request, queryset, view): try: retu...
/samsteady_django_utils-1.0.27-py3-none-any.whl/django_utils/filters.py
0.613815
0.158369
filters.py
pypi
import json from django.core import validators from django.core.exceptions import ValidationError from django.core.validators import MinValueValidator, MaxValueValidator # When the _meta object was formalized, this exception was moved to # django.core.exceptions. It is retained here for backwards compatibility # purp...
/samsteady_django_utils-1.0.27-py3-none-any.whl/django_utils/fields.py
0.61855
0.197832
fields.py
pypi
# Samsung Galaxy Store Python module to scrape application data from the Samsung Galaxy Store. # Installation ``` pip install samsung-galaxy-store ``` # Usage Available methods: - `get_categories(...)`: Retrieves the list of store games or apps categories. - `get_category_apps(...)`: Retrieves a list of apps for a sp...
/samsung-galaxy-store-0.1.10.tar.gz/samsung-galaxy-store-0.1.10/README.md
0.427038
0.819641
README.md
pypi
from dataclasses import dataclass from datetime import datetime from typing import Any, Dict, List def minimize_dict(maximized: Dict[Any, Any]) -> Dict[Any, Any]: return { key: value for key, value in maximized.items() if value is not None and value != "" } def serialize_datetimes(di...
/samsung-galaxy-store-0.1.10.tar.gz/samsung-galaxy-store-0.1.10/samsung_galaxy_store/models.py
0.831485
0.21595
models.py
pypi
import argparse from typing import Iterable from samsung_galaxy_store import SamsungGalaxyStore, Category, AppSummary, App, Review def main() -> None: parser = argparse.ArgumentParser( description="Lookup Samsung Galaxy Store information." ) subparsers = parser.add_subparsers(dest="command") ...
/samsung-galaxy-store-0.1.10.tar.gz/samsung-galaxy-store-0.1.10/samsung_galaxy_store/cli.py
0.716119
0.181862
cli.py
pypi
import socket from . import exceptions class Mdc(): """Implement the MDC protocol.""" def __init__(self, ip=None, port=1515, mdc_id=0xFE): """Initialize class with ip, port and mdc ID. By default, MDC protocol listen on port 1515. We can use MDC ID 0xFE for globing. """ ...
/samsung-mdc-0.1.0.tar.gz/samsung-mdc-0.1.0/mdc/mdc.py
0.647241
0.21211
mdc.py
pypi
from .base import SpeakerBase from .group import SpeakerGroup class Speaker(SpeakerBase): """Entry control for speaker operation.""" def __init__(self, api, event_loop, clock, equalizer, player_operator, service_registry): """ Initialise the speaker. :param api: SamsungMultiroomApi i...
/samsung_multiroom-0.0.9.tar.gz/samsung_multiroom-0.0.9/samsung_multiroom/speaker.py
0.894698
0.273665
speaker.py
pypi
import abc class SpeakerBase(metaclass=abc.ABCMeta): """Speaker interface to control speaker operation.""" @property def ip_address(self): """ :returns: Speaker's ip address """ raise NotImplementedError() @property def mac_address(self): """ :retu...
/samsung_multiroom-0.0.9.tar.gz/samsung_multiroom-0.0.9/samsung_multiroom/base.py
0.890229
0.395018
base.py
pypi
from .base import SpeakerBase from .clock import ClockGroup from .equalizer import EqualizerGroup class SpeakerGroup(SpeakerBase): """ Speaker group. Use Speaker.group() to initiate grouping. """ def __init__(self, api, name, speakers): """ The first speaker should be the main sp...
/samsung_multiroom-0.0.9.tar.gz/samsung_multiroom-0.0.9/samsung_multiroom/group.py
0.918804
0.370994
group.py
pypi
import abc class EqualizerBase(metaclass=abc.ABCMeta): """ Abstract base class for equalizers. """ @abc.abstractmethod def get_presets_names(self): """ :returns: List of preset names """ raise NotImplementedError() @abc.abstractmethod def set(self, *args):...
/samsung_multiroom-0.0.9.tar.gz/samsung_multiroom-0.0.9/samsung_multiroom/equalizer/equalizer.py
0.816589
0.304843
equalizer.py
pypi
import fnmatch class EventLoop: """ Listen to speaker events. Use add_listener to subscribe to events of particular type. """ def __init__(self, api_stream): """ :param api_stream: ApiStream instance """ self._api_stream = api_stream self._listeners = [] ...
/samsung_multiroom-0.0.9.tar.gz/samsung_multiroom-0.0.9/samsung_multiroom/event/event_loop.py
0.577734
0.227598
event_loop.py
pypi
import datetime class Alarm: """ Control alarm functions of the speaker to wake speaker at specific time. """ def __init__(self, api): """ :param api: SamsungMultiroomApi instance """ self._api = api self._slots = [None, None, None] def __getitem__(self, i...
/samsung_multiroom-0.0.9.tar.gz/samsung_multiroom-0.0.9/samsung_multiroom/clock/alarm.py
0.863046
0.329419
alarm.py
pypi
import abc import re # repeat mode constants REPEAT_ONE = 'one' REPEAT_ALL = 'all' REPEAT_OFF = 'off' class Player(metaclass=abc.ABCMeta): """Player interface to control playback functions.""" @abc.abstractmethod def play(self, playlist): """ Enqueue and play a playlist. Player ...
/samsung_multiroom-0.0.9.tar.gz/samsung_multiroom-0.0.9/samsung_multiroom/service/player.py
0.842944
0.231354
player.py
pypi
import abc class Browser(metaclass=abc.ABCMeta): """ Abstract media browser. Implementations should be immutable. """ def __init__(self, path=None, items=None): """ :param path: Path used to list items :param items: Items listed """ self._path = path ...
/samsung_multiroom-0.0.9.tar.gz/samsung_multiroom-0.0.9/samsung_multiroom/service/browser.py
0.746139
0.210644
browser.py
pypi
from .player import REPEAT_OFF from .player import Player from .player import get_is_supported_function_name from .player import unsupported class PlayerOperator(Player): """Select the right player for the current source.""" def __init__(self, api, players=None): """ Initialise player operato...
/samsung_multiroom-0.0.9.tar.gz/samsung_multiroom-0.0.9/samsung_multiroom/service/player_operator.py
0.877017
0.226634
player_operator.py
pypi
import numpy as np import os import joblib import logging class Perceptron: def __init__(self, eta: float=None, epochs: int=None): self.weights = np.random.randn(3) * 1e-4 # small random weights training = (eta is not None) and (epochs is not None) if training: logging.info(f"in...
/samutils_pkg_Samm_G-0.0.1-py3-none-any.whl/samutils/perceptron.py
0.68616
0.278107
perceptron.py
pypi
import numpy as np import os import joblib import logging class Perceptron: def __init__(self, eta: float=None, epochs: int=None): self.weights = np.random.randn(3) * 1e-4 # small random weights training = (eta is not None) and (epochs is not None) if training: logging.info(f"in...
/samutils_pkg-0.0.1.tar.gz/samutils_pkg-0.0.1/src/samutils/perceptron.py
0.68616
0.278107
perceptron.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 ...
/samy_distributions-0.1.tar.gz/samy_distributions-0.1/samy_distributions/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
import logging from datetime import timedelta from datetime import datetime from opcua import Subscription from opcua import ua from opcua.common import utils class UaNodeAlreadyHistorizedError(ua.UaError): pass class HistoryStorageInterface(object): """ Interface of a history backend. Must be imp...
/samyplugin-0.1-py3-none-any.whl/opcua/server/history.py
0.68742
0.339992
history.py
pypi
import logging from datetime import datetime import time import uuid import sys from opcua import ua from opcua import Node from opcua.common import events from opcua.common import event_objects class EventGenerator(object): """ Create an event based on an event type. Per default is BaseEventType used. ...
/samyplugin-0.1-py3-none-any.whl/opcua/server/event_generator.py
0.448668
0.155399
event_generator.py
pypi
from opcua import ua from opcua.ua import NodeId, QualifiedName, NumericNodeId, StringNodeId, GuidNodeId from opcua.ua import NodeClass, LocalizedText def create_standard_address_space_Part4(server): node = ua.AddNodesItem() node.RequestedNewNodeId = NumericNodeId(18, 0) node.BrowseName = Qualified...
/samyplugin-0.1-py3-none-any.whl/opcua/server/standard_address_space/standard_address_space_part4.py
0.513181
0.325346
standard_address_space_part4.py
pypi
from opcua import ua from opcua.ua import NodeId, QualifiedName, NumericNodeId, StringNodeId, GuidNodeId from opcua.ua import NodeClass, LocalizedText def create_standard_address_space_Part5(server): node = ua.AddNodesItem() node.RequestedNewNodeId = NumericNodeId(51, 0) node.BrowseName = Qualified...
/samyplugin-0.1-py3-none-any.whl/opcua/server/standard_address_space/standard_address_space_part5.py
0.475605
0.385143
standard_address_space_part5.py
pypi
import os.path import opcua from opcua.server.standard_address_space.standard_address_space_part3 import create_standard_address_space_Part3 from opcua.server.standard_address_space.standard_address_space_part4 import create_standard_address_space_Part4 from opcua.server.standard_address_space.standard_address_space_...
/samyplugin-0.1-py3-none-any.whl/opcua/server/standard_address_space/standard_address_space.py
0.494873
0.23793
standard_address_space.py
pypi
from opcua import ua from opcua.ua import NodeId, QualifiedName, NumericNodeId, StringNodeId, GuidNodeId from opcua.ua import NodeClass, LocalizedText def create_standard_address_space_Part3(server): node = ua.AddNodesItem() node.RequestedNewNodeId = NumericNodeId(3062, 0) node.BrowseName = Qualifi...
/samyplugin-0.1-py3-none-any.whl/opcua/server/standard_address_space/standard_address_space_part3.py
0.45641
0.349339
standard_address_space_part3.py
pypi
from opcua import ua from opcua.ua import NodeId, QualifiedName, NumericNodeId, StringNodeId, GuidNodeId from opcua.ua import NodeClass, LocalizedText def create_standard_address_space_Part9(server): node = ua.AddNodesItem() node.RequestedNewNodeId = NumericNodeId(8995, 0) node.BrowseName = Qualifi...
/samyplugin-0.1-py3-none-any.whl/opcua/server/standard_address_space/standard_address_space_part9.py
0.401101
0.329432
standard_address_space_part9.py
pypi
from opcua import ua from opcua.ua import NodeId, QualifiedName, NumericNodeId, StringNodeId, GuidNodeId from opcua.ua import NodeClass, LocalizedText def create_standard_address_space_Part8(server): node = ua.AddNodesItem() node.RequestedNewNodeId = NumericNodeId(2365, 0) node.BrowseName = Qualifi...
/samyplugin-0.1-py3-none-any.whl/opcua/server/standard_address_space/standard_address_space_part8.py
0.474631
0.387661
standard_address_space_part8.py
pypi
from enum import IntEnum class ObjectIds(object): Null = 0 Boolean = 1 SByte = 2 Byte = 3 Int16 = 4 UInt16 = 5 Int32 = 6 UInt32 = 7 Int64 = 8 UInt64 = 9 Float = 10 Double = 11 String = 12 DateTime = 13 Guid = 14 ByteString = 15 XmlElement = 16 No...
/samyplugin-0.1-py3-none-any.whl/opcua/ua/object_ids.py
0.649912
0.259679
object_ids.py
pypi
from datetime import datetime from enum import IntEnum from opcua.ua.uatypes import * from opcua.ua.object_ids import ObjectIds class NamingRuleType(IntEnum): ''' :ivar Mandatory: :vartype Mandatory: 1 :ivar Optional: :vartype Optional: 2 :ivar Constraint: :vartype Constraint: 3 ''' ...
/samyplugin-0.1-py3-none-any.whl/opcua/ua/uaprotocol_auto.py
0.757705
0.266596
uaprotocol_auto.py
pypi
import logging from enum import Enum, IntEnum from calendar import timegm import sys import os import uuid import re import itertools from datetime import datetime, timedelta, MAXYEAR, tzinfo from opcua.ua import status_codes from opcua.ua import ObjectIds from opcua.ua.uaerrors import UaError from opcua.ua.uaerrors i...
/samyplugin-0.1-py3-none-any.whl/opcua/ua/uatypes.py
0.460046
0.219965
uatypes.py
pypi
import logging import struct from abc import ABCMeta, abstractmethod from opcua.ua import CryptographyNone, SecurityPolicy from opcua.ua import MessageSecurityMode from opcua.ua import UaError try: from opcua.crypto import uacrypto CRYPTOGRAPHY_AVAILABLE = True except ImportError: CRYPTOGRAPHY_AVAILABLE = ...
/samyplugin-0.1-py3-none-any.whl/opcua/crypto/security_policies.py
0.737347
0.2778
security_policies.py
pypi
import os from cryptography import x509 from cryptography.exceptions import InvalidSignature from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives import hmac from cryptogra...
/samyplugin-0.1-py3-none-any.whl/opcua/crypto/uacrypto.py
0.446012
0.291712
uacrypto.py
pypi
from dateutil import parser from datetime import datetime from enum import Enum, IntEnum import uuid from opcua import ua from opcua.ua.uaerrors import UaError def value_to_datavalue(val, varianttype=None): """ convert anyting to a DataValue using varianttype """ datavalue = None if isinstance(va...
/samyplugin-0.1-py3-none-any.whl/opcua/common/ua_utils.py
0.474144
0.282464
ua_utils.py
pypi
import hashlib from datetime import datetime, timedelta import logging import copy from opcua.ua.ua_binary import struct_from_binary, struct_to_binary, header_from_binary, header_to_binary from opcua import ua logger = logging.getLogger('opcua.uaprotocol') class MessageChunk(ua.FrozenClass): """ Message Ch...
/samyplugin-0.1-py3-none-any.whl/opcua/common/connection.py
0.634656
0.218742
connection.py
pypi
import logging import os from concurrent.futures import Future import functools import threading from socket import error as SocketError try: import asyncio except ImportError: import trollius as asyncio from opcua.ua.uaerrors import UaError class ServiceError(UaError): def __init__(self, code): ...
/samyplugin-0.1-py3-none-any.whl/opcua/common/utils_orig.py
0.49585
0.248238
utils_orig.py
pypi
from opcua import ua from opcua.common import node from opcua.common.instantiate import instantiate def _parse_nodeid_qname(*args): try: if isinstance(args[0], int): nodeid = ua.NodeId(0, int(args[0])) qname = ua.QualifiedName(args[1], int(args[0])) return nodeid, qname...
/samyplugin-0.1-py3-none-any.whl/opcua/common/manage_nodes.py
0.484868
0.263244
manage_nodes.py
pypi
from opcua import ua from opcua.common import node def call_method(parent, methodid, *args): """ Call an OPC-UA method. methodid is browse name of child method or the nodeid of method as a NodeId object arguments are variants or python object convertible to variants. which may be of different type...
/samyplugin-0.1-py3-none-any.whl/opcua/common/methods.py
0.627381
0.387053
methods.py
pypi
import copy from opcua import ua import opcua from opcua.ua.uaerrors import UaError from opcua.common import ua_utils class Event(object): """ OPC UA Event object. This is class in inherited by the common event objects such as BaseEvent, other auto standard events and custom events Events are use...
/samyplugin-0.1-py3-none-any.whl/opcua/common/events.py
0.577853
0.183411
events.py
pypi
# SanatanTime Python module for converting the currently used Christian System Time to historic and vedic Sanatan System Time. For explanation of the Sanatan Time System, its linkage with the Current Time System, and explanation of the time system conversion process, you can read the documentation cum explanation of t...
/sanatantime-1.0.tar.gz/sanatantime-1.0/readme.md
0.534127
0.988928
readme.md
pypi
![SandB|ox](https://image.ibb.co/bRbfGc/SandBlox.png) === ***Disclaimer**: Sandblox is a work in progress, and so, we describe not only what SandBlox is currently capable of, but also some of it's eventual objectives.* **What** is it? --- A software technology framework, library, platform and movement for Machine Le...
/sandblox-0.1.1.tar.gz/sandblox-0.1.1/README.md
0.700075
0.97024
README.md
pypi
from typing import Callable, Iterable, Union import numpy as np from sandboxai.genetic.genome.base import BaseGenome GenomeMutatorFunc = Union[str, Callable[[BaseGenome, bool], BaseException]] GenomeMutatorSelection = Union[float, Iterable[int], Callable[[float], float]] def mutate(genome: BaseGenome, method: Genome...
/sandboxai-0.0.1-py3-none-any.whl/easyneuron/genetic/genome/mutate.py
0.922844
0.417984
mutate.py
pypi
from io import StringIO from typing import Optional import requests from sandboxai.types.types import BufferedWriter, WritableFile from numpy import array, loadtxt, ndarray def get_cloud_data(url: str, *, encoding: str = "utf-8") -> str: """Returns a string of the request from the specified url. Parameters ...
/sandboxai-0.0.1-py3-none-any.whl/easyneuron/data/load.py
0.912731
0.286539
load.py
pypi
from dataclasses import dataclass from typing import Any, Callable, Optional, Sequence from warnings import warn from sandboxai._classes import Model from sandboxai.exceptions.exceptions import UntrainedModelError from sandboxai.math.distance.distance import distance_functions from sandboxai.neighbours._classes import...
/sandboxai-0.0.1-py3-none-any.whl/easyneuron/neighbours/knearest.py
0.939768
0.608361
knearest.py
pypi
from math import log1p from sandboxai.exceptions.exceptions import DimensionsError from numpy import array, sqrt from sandboxai.types.types import ArrayLike def _check_loss_params(x, y): x = array(x).reshape(1, -1)[0] y = array(y).reshape(1, -1)[0] if x.shape != y.shape: raise DimensionsError( f"x and y m...
/sandboxai-0.0.1-py3-none-any.whl/easyneuron/metrics/loss/meanerrors.py
0.947174
0.771887
meanerrors.py
pypi
from abc import ABC, abstractmethod from typing import Any, Sequence, Union class Environment(ABC): """Base class for RL environments.""" def __init__(self, *args, **kwargs) -> None: """Create an instance of the environment.""" self.reset(*args, **kwargs) def reset(self, *args, **kwargs...
/sandboxai-0.0.1-py3-none-any.whl/easyneuron/agents/envs/_classes.py
0.962883
0.495239
_classes.py
pypi
from dataclasses import dataclass from typing import Any, List, Sequence from sandboxai.agents.envs._classes import Environment @dataclass(init=False, eq=True, order=True, unsafe_hash=True, repr=True) class SimpleLateralMover(Environment): """This is an environment that is for initial debugging of new agents, j...
/sandboxai-0.0.1-py3-none-any.whl/easyneuron/agents/envs/examples.py
0.939109
0.614654
examples.py
pypi
from typing import Callable, Iterable, Union import numpy as np from easyneuron.genetic.genome.base import BaseGenome GenomeMutatorFunc = Union[str, Callable[[BaseGenome, bool], BaseException]] GenomeMutatorSelection = Union[float, Iterable[int], Callable[[float], float]] def mutate(genome: BaseGenome, method: Genom...
/sandboxai-0.0.1-py3-none-any.whl/sandbox/genetic/genome/mutate.py
0.922752
0.429728
mutate.py
pypi
from io import StringIO from typing import Optional import requests from easyneuron.types.types import BufferedWriter, WritableFile from numpy import array, loadtxt, ndarray def get_cloud_data(url: str, *, encoding: str = "utf-8") -> str: """Returns a string of the request from the specified url. Parameters...
/sandboxai-0.0.1-py3-none-any.whl/sandbox/data/load.py
0.912859
0.293987
load.py
pypi
from dataclasses import dataclass from typing import Any, Callable, Optional, Sequence from warnings import warn from easyneuron._classes import Model from easyneuron.exceptions.exceptions import UntrainedModelError from easyneuron.math.distance.distance import distance_functions from easyneuron.neighbours._classes im...
/sandboxai-0.0.1-py3-none-any.whl/sandbox/neighbours/knearest.py
0.939679
0.646097
knearest.py
pypi
from math import log1p from easyneuron.exceptions.exceptions import DimensionsError from numpy import array, sqrt from easyneuron.types.types import ArrayLike def _check_loss_params(x, y): x = array(x).reshape(1, -1)[0] y = array(y).reshape(1, -1)[0] if x.shape != y.shape: raise DimensionsError( f"x and y...
/sandboxai-0.0.1-py3-none-any.whl/sandbox/metrics/loss/meanerrors.py
0.947515
0.789721
meanerrors.py
pypi
from abc import ABC, abstractmethod from typing import Any, Sequence, Union class Environment(ABC): """Base class for RL environments.""" def __init__(self, *args, **kwargs) -> None: """Create an instance of the environment.""" self.reset(*args, **kwargs) def reset(self, *args, **kwargs...
/sandboxai-0.0.1-py3-none-any.whl/sandbox/agents/envs/_classes.py
0.962883
0.495239
_classes.py
pypi
from dataclasses import dataclass from typing import Any, List, Sequence from easyneuron.agents.envs._classes import Environment @dataclass(init=False, eq=True, order=True, unsafe_hash=True, repr=True) class SimpleLateralMover(Environment): """This is an environment that is for initial debugging of new agents, ...
/sandboxai-0.0.1-py3-none-any.whl/sandbox/agents/envs/examples.py
0.939478
0.625524
examples.py
pypi
import random import pygame from .particle import Particle from . import particle_data class Gas(Particle): def __init__( self, col, row, vel_x, vel_y, acc_x, acc_y, temp, temp_freeze, temp_boil, density, color, name, ...
/sandcraft-anthonyvkane47-1.0.tar.gz/sandcraft-anthonyvkane47-1.0/src/gas.py
0.420243
0.299412
gas.py
pypi
from .particle import Particle from . import particle_data class Solid(Particle): def __init__( self, col, row, vel_x, vel_y, acc_x, acc_y, temp, temp_freeze, temp_boil, density, color, name, flammability, ...
/sandcraft-anthonyvkane47-1.0.tar.gz/sandcraft-anthonyvkane47-1.0/src/solid.py
0.558327
0.294545
solid.py
pypi
from .config import * from .particle import Particle """ px_to_cell converts pixel coordinates into column or row coordinates, depending on whether you pass an x or a y value. This is useful in cases such as converting the mouse's x and y positions to their respective column and row counterparts in the...
/sandcraft-anthonyvkane47-1.0.tar.gz/sandcraft-anthonyvkane47-1.0/src/grid.py
0.828766
0.705748
grid.py
pypi
import random from .particle import Particle from . import particle_data class Liquid(Particle): def __init__( self, col, row, vel_x, vel_y, acc_x, acc_y, temp, temp_freeze, temp_boil, density, color, name, ...
/sandcraft-anthonyvkane47-1.0.tar.gz/sandcraft-anthonyvkane47-1.0/src/liquid.py
0.461988
0.299822
liquid.py
pypi
from .solid_body import SolidBody class BasicSolidBody(SolidBody): def __init__( self, id_color_dict, id_2d_list, width, height, col, row, vel_x, vel_y, acc_x, acc_y, temp, temp_freeze, temp_boil, density, ...
/sandcraft-anthonyvkane47-1.0.tar.gz/sandcraft-anthonyvkane47-1.0/src/basic_solid_body.py
0.551332
0.198219
basic_solid_body.py
pypi
import abc import pygame from .config import PARTICLE_SIZE from .grid_object import GridObject class Particle(GridObject, metaclass=abc.ABCMeta): def __init__( self, col, row, vel_x, vel_y, acc_x, acc_y, temp, temp_freeze, temp_boil, density,...
/sandcraft-anthonyvkane47-1.0.tar.gz/sandcraft-anthonyvkane47-1.0/src/particle.py
0.700485
0.35056
particle.py
pypi
from .particle import Particle from . import particle_data from random import * class Fixed(Particle): def __init__( self, col, row, vel_x, vel_y, acc_x, acc_y, temp, temp_freeze, temp_boil, density, color, name, ...
/sandcraft-anthonyvkane47-1.0.tar.gz/sandcraft-anthonyvkane47-1.0/src/fixed.py
0.464416
0.231538
fixed.py
pypi
import abc import math from .grid_object import GridObject from .solid_body_particle import SolidBodyParticle class SolidBody(GridObject): def __init__( self, id_color_dict, id_2d_list, width, height, col, row, vel_x, vel_y, acc_...
/sandcraft-anthonyvkane47-1.0.tar.gz/sandcraft-anthonyvkane47-1.0/src/solid_body.py
0.441432
0.173568
solid_body.py
pypi
from . import solid from . import liquid from . import gas from . import fixed from . import basic_solid_body from . import ufo_solid_body """ Template particles that can be used for the Painter, or elsewhere. """ template_sand = solid.Solid( 0, 0, # position ...
/sandcraft-anthonyvkane47-1.0.tar.gz/sandcraft-anthonyvkane47-1.0/src/particle_data.py
0.530723
0.159741
particle_data.py
pypi
from functools import partial from typing import Any, Optional from docutils.parsers.rst.states import Inliner from docutils import nodes from sphinx.application import Sphinx from sphinx.util import logging, nodes as nodesutil def make_link(name: str, rawtext: str, text: str, lineno: int, inliner: Inliner, ...
/sanderthedragon_sphinxext-1.0.1-py3-none-any.whl/sanderthedragon/mappedlinkrole/__init__.py
0.766818
0.232953
__init__.py
pypi
import numpy as np import nibabel as nib from scipy.ndimage import gaussian_filter import matplotlib.pyplot as plt import time # Calculate the direction-average of the data # Original Author: # Dr. Marco Palombo # Cardiff University Brain Research Imaging Centre (CUBRIC) # Cardiff University, UK # 8th December 2021 # ...
/sandi_python_toolbox-0.1.2-py3-none-any.whl/SANDI_python_toolbox/workflow/scripts/make_direction_average_SNR.py
0.531939
0.407274
make_direction_average_SNR.py
pypi
import numpy as np import nibabel as nib from scipy.ndimage import gaussian_filter import matplotlib.pyplot as plt import time from SphericalMeanFromSH import SphericalMeanFromSH from normalize_noisemap import normalize_noisemap # Calculate the direction-average of the data # Original Author: # Dr. Marco Palombo # Ca...
/sandi_python_toolbox-0.1.2-py3-none-any.whl/SANDI_python_toolbox/workflow/scripts/make_direction_average_noisemap.py
0.623377
0.376308
make_direction_average_noisemap.py
pypi
import numpy as np import time from sklearn.linear_model import LinearRegression from sklearn.neural_network import MLPRegressor def train_MLP_python(database_train, params_train, n_layers, n_neurons, n_MLPs, method, log): # Train a Multi Layer Perceptron regressor for SANDI fitting # Author: # Dr. Marco...
/sandi_python_toolbox-0.1.2-py3-none-any.whl/SANDI_python_toolbox/workflow/scripts/train_MLP_python.py
0.606265
0.487185
train_MLP_python.py
pypi
import numpy as np from sklearn.ensemble import BaggingRegressor from sklearn.linear_model import LinearRegression from sklearn.tree import DecisionTreeRegressor import time def train_RF_python(database_train, params_train, n_trees, log): # Train a Random Forest regressor for SANDI fitting # Author: ...
/sandi_python_toolbox-0.1.2-py3-none-any.whl/SANDI_python_toolbox/workflow/scripts/train_RF_python.py
0.521471
0.392948
train_RF_python.py
pypi
from plone.app.standardtiles import PloneMessageFactory as _ from plone.app.uuid.utils import uuidToObject from plone.app.vocabularies.catalog import CatalogSource as CatalogSourceBase from plone.memoize.view import memoize from plone.supermodel import model from plone.tiles import Tile from plone.uuid.interfaces impor...
/sandia.conferencepolicy-1.0a3.tar.gz/sandia.conferencepolicy-1.0a3/src/sandia/conferencepolicy/tiles/presentation.py
0.729809
0.260545
presentation.py
pypi
sandman ======= |Build Status| |Coverage Status| |Gitter chat| |Analytics| |PyPI| Homepage -------- Visit the home of ``sandman`` on the web: `sandman.io <http://www.sandman.io>`__ Discuss ------- Looking for a place to ask questions about sandman? Check out the sandman-discuss and sandman-users forums! Docum...
/sandman-0.9.8.tar.gz/sandman-0.9.8/README.rst
0.815967
0.654315
README.rst
pypi
sandman2 ======== |Build Status| |Coverage Status| `sandman2 documentation <http://sandman2.readthedocs.io/en/latest/>`__ ``sandman2`` automagically generates a RESTful API service from your existing database, without requiring you to write a line of code. Simply point ``sandman2`` to your database, add salt for sea...
/sandman2-1.2.3.tar.gz/sandman2-1.2.3/README.rst
0.893173
0.868548
README.rst
pypi
[![image](https://img.shields.io/pypi/v/sandpyper.svg)](https://pypi.python.org/pypi/sandpyper) [![Contributors][contributors-shield]][contributors-url] [![image](https://github.com/npucino/sandpyper/workflows/build/badge.svg)](https://github.com/npucino/sandpyper/actions/workflows/build.yml/badge.svg) [![image](https:...
/sandpyper-1.3.3.tar.gz/sandpyper-1.3.3/README.md
0.847905
0.954605
README.md
pypi
def read_parquet_by_path(path, columns=None, reset_index=True): """this function will read in all files given if the path variable is a list of pathlib objects or will read in the file if the path is one pathlib object Args: path (pathlib object): this must be a full path string or a pathlib object...
/SandsPythonFunctions-0.1.0-py3-none-any.whl/SandsPythonFunctions/ParquetFunctions.py
0.54359
0.605333
ParquetFunctions.py
pypi
''' def multiprocessing_pool( input_function, iterable_list=list, process_number=2, extra_arg="" ): """this function processes a function over a list of objects concurrently using the multiprocessing.Pool module Arguments: input_function {function} -- the function that you want to process concu...
/SandsPythonFunctions-0.1.0-py3-none-any.whl/SandsPythonFunctions/MultiprocessingFunctions.py
0.581541
0.336672
MultiprocessingFunctions.py
pypi
import os import subprocess APP_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) APP_SPECIFICATION = { 'APP_DESCRIPTION': { 'name': 'Slurm Assist', 'link': '/#/slurm', 'description': 'An assistive interface for scheduling jobs with Slurm.', }, 'NG_MODULE_NAME': 'slurm', '...
/sandstone-slurm-assist-0.12.0.tar.gz/sandstone-slurm-assist-0.12.0/sandstone_slurm/settings.py
0.462473
0.276434
settings.py
pypi
var baseCallback = require('../internal/baseCallback'), baseWhile = require('../internal/baseWhile'); /** * Creates a slice of `array` with elements taken from the end. Elements are * taken until `predicate` returns falsey. The predicate is bound to `thisArg` * and invoked with three arguments: (value, index, a...
/sandstone-slurm-assist-0.12.0.tar.gz/sandstone-slurm-assist-0.12.0/sandstone_slurm/node_modules/bower/lib/node_modules/inquirer/node_modules/lodash/array/takeRightWhile.js
0.864511
0.538559
takeRightWhile.js
pypi
var createAggregator = require('../internal/createAggregator'); /** * Creates an array of elements split into two groups, the first of which * contains elements `predicate` returns truthy for, while the second of which * contains elements `predicate` returns falsey for. The predicate is bound * to `thisArg` and in...
/sandstone-slurm-assist-0.12.0.tar.gz/sandstone-slurm-assist-0.12.0/sandstone_slurm/node_modules/bower/lib/node_modules/inquirer/node_modules/lodash/collection/partition.js
0.822617
0.669056
partition.js
pypi
var arrayMap = require('../internal/arrayMap'), baseCallback = require('../internal/baseCallback'), baseMap = require('../internal/baseMap'), isArray = require('../lang/isArray'); /** * Creates an array of values by running each element in `collection` through * `iteratee`. The `iteratee` is bound to `th...
/sandstone-slurm-assist-0.12.0.tar.gz/sandstone-slurm-assist-0.12.0/sandstone_slurm/node_modules/bower/lib/node_modules/inquirer/node_modules/lodash/collection/map.js
0.763836
0.514705
map.js
pypi
# sandu ![](https://img.shields.io/pypi/v/sandu) ![](https://img.shields.io/badge/python-%3E%3D3.6-blue) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) *High Level Sensitivity and Uncertainty (SandU) analysis tools for python.* ## *Sandu aims to provide high...
/sandu-0.1.2.tar.gz/sandu-0.1.2/README.md
0.488527
0.99207
README.md
pypi
SYSTEM_PERMISSIONS = [ # Roles { "name": "roles:system:create", "description": "Ability to create a system role" }, { "name": "roles:system:get", "description": "Ability to get a system role", }, { "name": "roles:system:list", "description": "Abili...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/counter/auth/permission.py
0.684897
0.444505
permission.py
pypi
from apispec import Path from apispec.utils import load_operations_from_docstring from ingredients_http.schematics.types import KubeName, ArrowType, IPv4AddressType, IPv4NetworkType, EnumType, \ KubeString from schematics.models import FieldDescriptor from schematics.types import IntType, StringType, BooleanType, U...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/counter/http/spec/plugins/docstring.py
0.569134
0.206194
docstring.py
pypi
import uuid import cherrypy from ingredients_http.request_methods import RequestMethods from ingredients_http.route import Route from deli.counter.http.mounts.root.routes.compute.v1.validation_models.images import RequestCreateImage, \ ResponseImage, ParamsImage, ParamsListImage from deli.counter.http.router impo...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/counter/http/mounts/root/routes/compute/v1/images.py
0.42322
0.15131
images.py
pypi
import ipaddress from ingredients_http.schematics.types import KubeName, IPv4NetworkType, IPv4AddressType, EnumType, ArrowType from schematics import Model from schematics.exceptions import ValidationError from schematics.types import UUIDType, IntType, StringType, ListType from deli.kubernetes.resources.model import...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/counter/http/mounts/root/routes/compute/v1/validation_models/networks.py
0.637482
0.351061
networks.py
pypi
from ingredients_http.schematics.types import KubeName, KubeString, EnumType, ArrowType from schematics import Model from schematics.types import UUIDType, IntType, DictType, ListType, BooleanType, StringType, ModelType from deli.kubernetes.resources.model import ResourceState from deli.kubernetes.resources.v1alpha1.i...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/counter/http/mounts/root/routes/compute/v1/validation_models/instances.py
0.606615
0.247016
instances.py
pypi
from ingredients_http.schematics.types import KubeName, EnumType, ArrowType from schematics import Model from schematics.types import IntType, UUIDType, StringType, BooleanType from deli.kubernetes.resources.model import ResourceState from deli.kubernetes.resources.v1alpha1.zone.model import Zone class RequestCreate...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/counter/http/mounts/root/routes/location/v1/validation_models/zones.py
0.673084
0.25205
zones.py
pypi
import re from ingredients_http.schematics.types import ArrowType from schematics import Model from schematics.exceptions import ValidationError from schematics.types import UUIDType, IntType, StringType from deli.kubernetes.resources.project import Project from deli.kubernetes.resources.v1alpha1.project_quota.model ...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/counter/http/mounts/root/routes/iam/v1/validation_models/projects.py
0.654453
0.212722
projects.py
pypi
import re from ingredients_http.schematics.types import KubeName, ArrowType from schematics import Model from schematics.exceptions import ValidationError from schematics.types import ListType, ModelType, StringType from deli.kubernetes.resources.v1alpha1.iam_policy.model import IAMPolicy class BindingMemberType(St...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/counter/http/mounts/root/routes/iam/v1/validation_models/policy.py
0.522202
0.221414
policy.py
pypi
from deli.kubernetes.controller import ModelController from deli.kubernetes.resources.model import ResourceState from deli.kubernetes.resources.project import Project from deli.kubernetes.resources.v1alpha1.instance.model import Instance from deli.kubernetes.resources.v1alpha1.project_quota.model import ProjectQuota fr...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/kubernetes/resources/v1alpha1/project_quota/controller.py
0.556159
0.186891
controller.py
pypi
from threading import RLock from go_defer import with_defer, defer from deli.kubernetes.controller import ModelController from deli.kubernetes.resources.const import NETWORK_LABEL, NETWORK_PORT_LABEL from deli.kubernetes.resources.model import ResourceState from deli.kubernetes.resources.v1alpha1.instance.model impor...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/kubernetes/resources/v1alpha1/network/controller.py
0.728459
0.227791
controller.py
pypi
from go_defer import with_defer, defer from deli.kubernetes.controller import ModelController from deli.kubernetes.resources.model import ResourceState from deli.kubernetes.resources.v1alpha1.image.model import Image, ImageTask from deli.kubernetes.resources.v1alpha1.instance.model import Instance class ImageControl...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/kubernetes/resources/v1alpha1/image/controller.py
0.538255
0.199464
controller.py
pypi
from go_defer import with_defer, defer from deli.kubernetes.controller import ModelController from deli.kubernetes.resources.const import ZONE_LABEL from deli.kubernetes.resources.model import ResourceState from deli.kubernetes.resources.v1alpha1.instance.model import Instance from deli.kubernetes.resources.v1alpha1.v...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/kubernetes/resources/v1alpha1/zone/controller.py
0.640074
0.170042
controller.py
pypi
from deli.counter.auth.permission import SYSTEM_PERMISSIONS, PROJECT_PERMISSIONS from deli.kubernetes.controller import ModelController from deli.kubernetes.resources.model import ResourceState from deli.kubernetes.resources.v1alpha1.iam_role.model import IAMProjectRole, IAMSystemRole class IAMSystemRoleController(Mo...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/kubernetes/resources/v1alpha1/iam_role/controller.py
0.471953
0.228673
controller.py
pypi
import arrow from deli.kubernetes.controller import ModelController from deli.kubernetes.resources.model import ResourceState from deli.kubernetes.resources.v1alpha1.iam_service_account.model import ProjectServiceAccount, SystemServiceAccount class SystemServiceAccountController(ModelController): def __init__(se...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/kubernetes/resources/v1alpha1/iam_service_account/controller.py
0.541651
0.216715
controller.py
pypi
from go_defer import with_defer, defer from deli.kubernetes.controller import ModelController from deli.kubernetes.resources.model import ResourceState from deli.kubernetes.resources.v1alpha1.instance.model import Instance from deli.kubernetes.resources.v1alpha1.region.model import Region from deli.kubernetes.resource...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/kubernetes/resources/v1alpha1/volume/controller.py
0.570212
0.158793
controller.py
pypi
from go_defer import with_defer, defer from deli.kubernetes.controller import ModelController from deli.kubernetes.resources.const import REGION_LABEL from deli.kubernetes.resources.model import ResourceState from deli.kubernetes.resources.v1alpha1.image.model import Image from deli.kubernetes.resources.v1alpha1.insta...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/kubernetes/resources/v1alpha1/region/controller.py
0.594669
0.167525
controller.py
pypi
from deli.kubernetes.controller import ModelController from deli.kubernetes.resources.model import ResourceState from deli.kubernetes.resources.project import Project from deli.kubernetes.resources.v1alpha1.iam_policy.model import IAMPolicy from deli.kubernetes.resources.v1alpha1.iam_role.model import IAMProjectRole, I...
/sandwichcloud_deli-0.0.39-py3-none-any.whl/deli/kubernetes/resources/v1alpha1/iam_policy/controller.py
0.4206
0.15444
controller.py
pypi
<p align="center"> <img src="./badges/python.svg" alt="Python version"> <a href="https://travis-ci.org/luca-fiorito-11/sandy"> <img src="https://travis-ci.org/luca-fiorito-11/sandy.svg?branch=master" alt="Build status"> </a> <a href="https://opensource.org/licenses/MIT"> <img src="https://img.shields.io...
/sandy-1.0.40.tar.gz/sandy-1.0.40/README.md
0.830078
0.784443
README.md
pypi
#!/usr/bin/python # -*- coding: utf-8 -*- """ Simplified utility for retry strategy with exponential backoff. """ import logging import time import typing logging.getLogger().addHandler(logging.NullHandler()) def wait_and_retry(action: typing.Callable[[], typing.Any], transient_validator: typin...
/sane_finances-2.0-py3-none-any.whl/sane_finances/retry_policy.py
0.496826
0.293848
retry_policy.py
pypi
import sys import operator import collections.abc import logging import typing logging.getLogger().addHandler(logging.NullHandler()) T = typing.TypeVar('T') # pylint: disable=invalid-name @typing.runtime_checkable class SupportsDescription(typing.Protocol): """ An ABC with description attribute of type string....
/sane_finances-2.0-py3-none-any.whl/sane_finances/annotations.py
0.761272
0.387864
annotations.py
pypi