id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/Flask-Storage-Helpers-0.1.5.tar.gz/Flask-Storage-Helpers-0.1.5/flask_storage_helpers/cloudfiles.py
from __future__ import absolute_import import mimetypes import cloudfiles from cloudfiles.errors import NoSuchObject, ResponseError, NoSuchContainer from flask import current_app, request from werkzeug.utils import cached_property from .base import Storage, StorageFile, reraise __all__ = ('CloudFilesStorage',) cla...
PypiClean
/Circuitscape-4.0.5.tar.gz/Circuitscape-4.0.5/circuitscape/cfg.py
import ConfigParser, os, copy, ast, codecs class CSConfig: """Represents a Circuitscape configuration object""" FILE_PATH_PROPS = ['polygon_file', 'source_file', 'ground_file', 'mask_file', 'output_file', 'habitat_file', 'point_file', 'reclass_file'] DEFAULTS = { 'Version': { ...
PypiClean
/GB2260-v2-0.2.1.tar.gz/GB2260-v2-0.2.1/gb2260_v2/data/curated/revision_198512.py
from __future__ import unicode_literals name = '198512' division_schema = { '110000': '北京市', '110101': '东城区', '110102': '西城区', '110103': '崇文区', '110104': '宣武区', '110105': '朝阳区', '110106': '丰台区', '110107': '石景山区', '110108': '海淀区', '110109': '门头沟区', '110110': '燕山区', '11022...
PypiClean
/EasyDeL-0.0.29-py3-none-any.whl/examples/training/causal-lm/llama.py
from EasyDel import TrainArguments, CausalLMTrainer from datasets import load_dataset from huggingface_hub import HfApi from EasyDel import configs from jax import numpy as jnp import EasyDel from absl import flags, app from fjutils import get_float_dtype_by_name FLAGS = flags.FLAGS flags.DEFINE_string( name='dat...
PypiClean
/ELO_utils-1.3.1.tar.gz/ELO_utils-1.3.1/ELOutils/ELO.py
import random import math def approxRollingAverage(avg, new_sample): avg -= avg / 100 avg += new_sample / 100 return avg class Player(object): def __init__(self, name, rating): self.rating = int(rating) self.name = name self.verification = random.randint(0,10000) self.w...
PypiClean
/FEV_KEGG-1.1.4.tar.gz/FEV_KEGG-1.1.4/FEV_KEGG/Experiments/52.py
from FEV_KEGG.KEGG.File import cache from FEV_KEGG.Evolution.Clade import Clade from FEV_KEGG.Statistics import Percent from FEV_KEGG.Robustness.Topology.Redundancy import RedundancyType, Redundancy, RedundancyContribution from FEV_KEGG import settings from FEV_KEGG.Util.Util import dictToHtmlFile @cache(folder_path='...
PypiClean
/dragonflow-4.0.0.tar.gz/dragonflow-4.0.0/dragonflow/controller/common/cookies.py
import collections from oslo_log import log from dragonflow._i18n import _ from dragonflow.common import exceptions LOG = log.getLogger(__name__) GLOBAL_APP_NAME = 'global cookie namespace' """Dictionary to hold a map from a task name to its cookie info""" _cookies = {} # Maximum number of bits that can be enc...
PypiClean
/KolejkaJudge-0.1.202211021413-py3-none-any.whl/kolejka/judge/systems/local.py
import datetime import math import os import pathlib import pwd import resource import signal import tempfile import time import threading import traceback import kolejka.common.subprocess from kolejka.common.gpu import gpu_stats from kolejka.judge import config from kolejka.judge.result import Result from kolejka...
PypiClean
/Diofant-0.14.0a2.tar.gz/Diofant-0.14.0a2/diofant/polys/polyoptions.py
from __future__ import annotations import re import typing from ..core import Basic, I from ..core.sympify import sympify from ..utilities import has_dups, numbered_symbols, topological_sort from .polyerrors import FlagError, GeneratorsError, OptionError __all__ = 'Options', 'Order' class Option: """Base cla...
PypiClean
/AtomPy-0.5.1.1.zip/AtomPy-0.5.1.1/atompy/__init__.py
print 'Initializing AtomPy...' import DownloadAPI as API import pandas import os, sys import matplotlib.pyplot as plt import refs import xlrd from scipy import constants #Global Refs class for element, ion, isotope data Refs = refs.Refs() #Wrapper functions def element(Z): return Refs.element(Z) def elementaw(Z...
PypiClean
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/form/DateTextBox.js
if(!dojo._hasResource["dojox.form.DateTextBox"]){ dojo._hasResource["dojox.form.DateTextBox"]=true; dojo.provide("dojox.form.DateTextBox"); dojo.experimental("dojox.form.DateTextBox"); dojo.require("dojox.widget.Calendar"); dojo.require("dojox.widget.CalendarViews"); dojo.require("dijit.form._DateTimeTextBox"); dojo.de...
PypiClean
/Djaloha-0.4.2.tar.gz/Djaloha-0.4.2/djaloha/static/aloha.0.20/lib/util/dom.js
* Aloha Editor is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version.* * * Aloha Editor is distributed in the hope that it will be usef...
PypiClean
/MCRAMP-0.0.3-py3-none-any.whl/mcramp/scat/collimator_lin.py
from .sprim import SPrim import numpy as np import pyopencl as cl import pyopencl.array as clarr import os import re class SLinearCollimator(SPrim): """ Scattering kernel for Linear Collimator component. Recreates the functionality of the Collimator_linear component in McStas. Neutrons with divergence ...
PypiClean
/Flask-Cache-0.13.1.tar.gz/Flask-Cache-0.13.1/docs/_themes/flask_theme_support.py
from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal class FlaskyStyle(Style): background_color = "#f8f8f8" default_style = "" styles = { # No corresponding class for the follow...
PypiClean
/GeoNode-3.2.0-py3-none-any.whl/geonode/monitoring/frontend/monitoring/src/components/cels/geonode-status/index.js
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import SelectField from 'material-ui/SelectField'; import MenuItem from 'material-ui/MenuItem'; import AverageCPU from '../../molecules/average-cpu'; import AverageMemory from '../../molecules/average-memory'; import s...
PypiClean
/CoWIN_API_by_Kunal_Kumar_Sahoo-1.0.0-py3-none-any.whl/cowin_api/api.py
from typing import Union, List from cowin_api.base_api import BaseApi from cowin_api.constants import Constants from cowin_api.utils import today, filter_centers_by_age_limit class CoWinAPI(BaseApi): def get_states(self): url = Constants.states_list_url return self._call_api(url) def get_di...
PypiClean
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/lib/scons-4.4.0/SCons/Tool/PharLapCommon.py
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os import os.path import SCons.Errors import SCons.Util import re def getPharLapPath(): """Reads the registry to find the installed path of the Phar Lap ETS development kit. Raises UserError if no installed version of Phar Lap can ...
PypiClean
/models/MLP/flag_reader.py
import argparse import pickle import os # Libs # Own module from parameters import * # Torch def read_flag(): """ This function is to write the read the flags from a parameter file and put them in formats :return: flags: a struct where all the input params are stored """ parser = argparse.Argumen...
PypiClean
/Easykiwi-1.3-py3-none-any.whl/easykiwi/core.py
import logging import time import sys import kiwipy from ._singleton import Singleton class Kiwi(Singleton): def __init__(self): self.remote = '127.0.0.1' self._rpcs = list() self._tasks = list() self._broadcasts = list() def add_rpc(self, name=None): de...
PypiClean
/jpfreq-0.3.0.tar.gz/jpfreq-0.3.0/README.md
# JPFreq ![Tests](https://github.com/Marley-Mulvin-Broome/JapaneseFrequencyProcessor/actions/workflows/test.yaml/badge.svg) ![Docs](https://github.com/Marley-Mulvin-Broome/JapaneseFrequencyProcessor/actions/workflows/docs.yaml/badge.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://op...
PypiClean
/CubeLang-0.1.4-py3-none-any.whl/cubelang/scrambler.py
import random from argparse import ArgumentParser from typing import List from cubelang.actions import Turn from cubelang.cli.options import integer_type from cubelang.cube import Cube from cubelang.orientation import Orientation, Side # noinspection PyTypeChecker SIDES = tuple(Side) def main(): arg_parser = Ar...
PypiClean
/MacroPy-1.0.3.zip/MacroPy-1.0.3/macropy/core/walkers.py
from macropy.core import * from ast import * class Walker(object): def __init__(self, func): self.func = func def walk_children(self, tree, ctx=None): if isinstance(tree, AST): aggregates = [] for field, old_value in iter_fields(tree): old_value = get...
PypiClean
/Cubane-1.0.11.tar.gz/Cubane-1.0.11/cubane/backend/static/cubane/backend/tinymce/js/tinymce/plugins/importcss/plugin.min.js
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=tinymce.util.Tools.resolve("tinymce.EditorManager"),r=tinymce.util.Tools.resolve("tinymce.Env"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(e){return e.getParam("im...
PypiClean
/Flask-AuthOOB-0.0.34.tar.gz/Flask-AuthOOB-0.0.34/flask_authoob/routes.py
import datetime from uuid import uuid4 from flask import abort, jsonify, make_response, redirect, request from flask_security.core import current_user from flask_security.decorators import auth_token_required from flask_security.utils import logout_user from password_strength import PasswordPolicy from validate_email ...
PypiClean
/FlexGet-3.9.6-py3-none-any.whl/flexget/plugins/input/my_anime_list.py
from loguru import logger from flexget import plugin from flexget.config_schema import one_or_more from flexget.entry import Entry from flexget.event import event from flexget.utils.cached_input import cached from flexget.utils.requests import RequestException logger = logger.bind(name='my_anime_list') STATUS = {'wa...
PypiClean
/Electrum-VTC-2.9.3.3.tar.gz/Electrum-VTC-2.9.3.3/lib/websockets.py
import threading, Queue, os, json, time from collections import defaultdict try: from SimpleWebSocketServer import WebSocket, SimpleSSLWebSocketServer except ImportError: import sys sys.exit("install SimpleWebSocketServer") import util request_queue = Queue.Queue() class ElectrumWebSocket(WebSocket): ...
PypiClean
/Flask-KQMaps-0.4.2.tar.gz/Flask-KQMaps-0.4.2/flask_kqmaps/static/kqwebclient/leaflet/3rd_libs/leaflet.osmbuildings/OSMBuildings-Leaflet.js
(function(ca){function S(b,a){var c=b.x-a.x,d=b.y-a.y;return c*c+d*d}function va(b){var a=b.length;if(16>a)return!1;var c,d=Infinity,f=-Infinity,e=Infinity,g=-Infinity;for(c=0;c<a-1;c+=2)d=Math.min(d,b[c]),f=Math.max(f,b[c]),e=Math.min(e,b[c+1]),g=Math.max(g,b[c+1]);c=f-d;g-=e;f=c/g;if(0.85>f||1.15<f)return!1;d={x:d+c/...
PypiClean
/netket-3.9.2.tar.gz/netket-3.9.2/netket/experimental/hilbert/spin_orbital_fermions.py
from typing import Optional, List, Union from collections.abc import Iterable import numpy as np from fractions import Fraction from netket.hilbert.fock import Fock from netket.hilbert.tensor_hilbert_discrete import TensorDiscreteHilbert from netket.hilbert.homogeneous import HomogeneousHilbert class SpinOrbitalFer...
PypiClean
/CmdUtils-0.1.tar.gz/CmdUtils-0.1/cmdutils/__init__.py
import optparse import os import sys from cmdutils.log import Logger class CommandError(Exception): """ Raised whenever there's some user error, to show the error to the user. """ def __init__(self, msg, show_usage=True): Exception.__init__(self, msg) self.show_usage = show_usage ...
PypiClean
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/emoji-regex/README.md
# emoji-regex [![Build status](https://travis-ci.org/mathiasbynens/emoji-regex.svg?branch=master)](https://travis-ci.org/mathiasbynens/emoji-regex) _emoji-regex_ offers a regular expression to match all emoji symbols (including textual representations of emoji) as per the Unicode Standard. This repository contains a ...
PypiClean
/Geoarchpy-1.0.2.tar.gz/Geoarchpy-1.0.2/ArchPy/base.py
import numpy as np import matplotlib from matplotlib import colors import matplotlib.pyplot as plt import pyvista as pv import scipy from scipy.ndimage import uniform_filter import copy import time import shapely import shapely.geometry import sys #geone import geone import geone.covModel as gcm import geone.grf as gr...
PypiClean
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/electrum_chi/electrum/plugins/trezor/trezor.py
import traceback import sys from typing import NamedTuple, Any from electrum.util import bfh, bh2u, versiontuple, UserCancelled, UserFacingException from electrum.bitcoin import TYPE_ADDRESS, TYPE_SCRIPT from electrum.bip32 import BIP32Node, convert_bip32_path_to_list_of_uint32 as parse_path from electrum import const...
PypiClean
/JT_Techfield-0.0.11-py3-none-any.whl/JT/MakeSet.py
import numpy as np def Line(m, b, num = 50, noise_deviation = 1, span = (-10, 10)): """ Makes a set of x's and y's in the shape of a parabola following the equation: y = m * x + b Adds noise and returns both x and y Note: The returned values are sorted in ascending order by the x's """ x = np.random.rand(n...
PypiClean
/ApeMan-0.1.1.tar.gz/ApeMan-0.1.1/docs/34/import.rst
Import in 3.4 ============= During the migration from Python 3.3 to Python 3.4 a number of API calls were updated, deprecating most of ``imp`` library for ``importlib``. Inconveniently :func:`importlib.spec_from_module` (or :func:`importlib.spec_from_loader`, I can't remember) seems to have been excluded in this vers...
PypiClean
/Authlib-1.2.1.tar.gz/Authlib-1.2.1/authlib/oauth2/rfc6749/grants/client_credentials.py
import logging from .base import BaseGrant, TokenEndpointMixin from ..errors import UnauthorizedClientError log = logging.getLogger(__name__) class ClientCredentialsGrant(BaseGrant, TokenEndpointMixin): """The client can request an access token using only its client credentials (or other supported means of a...
PypiClean
/KavModule-0.0.1-py3-none-any.whl/science.py
from Read_CSV import atomic_mass, atomic_num, symbol, element class science: # Pass mass and volume as arguments # Returns density def density(mass, volume): return mass / volume # Pass distance and time as arguments # Returns speed def speed(distance, time): return distance...
PypiClean
/Abhilash1_optimizers-0.1.tar.gz/Abhilash1_optimizers-0.1/Abhilash1_optimizers/Adagrad.py
import math import numpy as np #import pandas as pd import Abhilash1_optimizers.Activation as Activation import Abhilash1_optimizers.hyperparameters as hyperparameters import Abhilash1_optimizers.Moment_Initializer as Moment_Initializer #Adagrad variation of ADAM with beta_1=0 and beta_2~ 1 with noise class ADAGRAD():...
PypiClean
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/Struct21.py
from genice2.cell import cellvectors import genice2.lattices desc = {"ref": {"SpaceFullerene": 'Sikiric 2010'}, "usage": "No options available.", "brief": "A space fullerene." } class Lattice(genice2.lattices.Lattice): def __init__(self): self.pairs = """ 155 80 106...
PypiClean
/OTLModel/Classes/Onderdeel/FiguratieMarkering.py
from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut from OTLMOW.OTLModel.Classes.Abstracten.FiguratieMarkeringToegang import FiguratieMarkeringToegang from OTLMOW.OTLModel.Datatypes.KlFiguratieCode import KlFiguratieCode from OTLMOW.OTLModel.Datatypes.KlFiguratieSoort import KlFiguratieSoort from OTLMOW.O...
PypiClean
/OctoBot-Commons-1.9.18.tar.gz/OctoBot-Commons-1.9.18/octobot_commons/tentacles_management/class_inspector.py
import inspect import octobot_commons.logging as logging_util def default_parent_inspection(element, parent): """ Check if the element bases has the specified parent :param element: the element to check :param parent: the expected parent :return: the check result """ return parent in elem...
PypiClean
/CsuPTMD-1.0.12.tar.gz/CsuPTMD-1.0.12/PTMD/maskrcnn_benchmark/modeling/roi_heads/box_head/roi_box_predictors.py
from PTMD.maskrcnn_benchmark.modeling import registry from torch import nn @registry.ROI_BOX_PREDICTOR.register("FastRCNNPredictor") class FastRCNNPredictor(nn.Module): def __init__(self, config, in_channels): super(FastRCNNPredictor, self).__init__() assert in_channels is not None num_in...
PypiClean
/Dash-ElectrumX-1.16.0.1.tar.gz/Dash-ElectrumX-1.16.0.1/electrumx/server/mempool.py
import itertools import time from abc import ABC, abstractmethod from asyncio import Lock from collections import defaultdict from typing import Sequence, Tuple, TYPE_CHECKING, Type, Dict import math import attr from aiorpcx import TaskGroup, run_in_thread, sleep from electrumx.lib.hash import hash_to_hex_str, hex_st...
PypiClean
/Hyperion_obf-1.0.0.tar.gz/Hyperion_obf-1.0.0/src/hyperion_obf/__init__.py
from zlib import compress from random import choice, shuffle, randint from re import findall from io import BytesIO from tokenize import tokenize, untokenize, TokenInfo from binascii import hexlify from builtins import * builtglob = list(globals().keys()) __title__: str = 'Hyperion_obf' __author__: str = 'BillyTheGoa...
PypiClean
/Camelot-13.04.13-gpl-pyqt.tar.gz/Camelot-13.04.13-gpl-pyqt/camelot/view/action_steps/select_file.py
from PyQt4 import QtGui, QtCore from camelot.admin.action import ActionStep from camelot.view.action_runner import hide_progress_dialog from camelot.core.exception import CancelRequest class SelectFile( ActionStep ): """Select one or more files to open or to process. :param file_name_filter: Filter on...
PypiClean
/Glances-3.4.0.3.tar.gz/Glances-3.4.0.3/glances/cpu_percent.py
from glances.logger import logger from glances.timer import Timer from glances.compat import FileNotFoundError, PermissionError import psutil class CpuPercent(object): """Get and store the CPU percent.""" def __init__(self, cached_timer_cpu=3): self.cpu_info = {'cpu_name': None, 'cpu_hz_current': N...
PypiClean
/Gbtestapi0.2-0.1a10.tar.gz/Gbtestapi0.2-0.1a10/src/gailbot/services/converter/converter.py
from typing import Dict, List, Union, Tuple from .payload import ( load_transcribed_dir_payload, load_audio_payload, load_conversation_dir_payload, PayLoadObject, ) from gailbot.core.utils.logger import makelogger from ..organizer.source import SourceObject from gailbot.workspace.manager import Workspa...
PypiClean
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/paper-spinner/README.md
[![Build status](https://travis-ci.org/PolymerElements/paper-spinner.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-spinner) ##&lt;paper-spinner&gt; Material design: [Progress & activity](https://www.google.com/design/spec/components/progress-activity.html) Element providing a multiple color materia...
PypiClean
/Lightbox-2.1.tar.bz2/Lightbox-2.1/lightbox/widgets.py
__all__ = [ 'default_config', 'Lightbox', 'LightboxConfig', 'lightbox_js', 'lightbox_css', ] import pkg_resources from scriptaculous import prototype_js, scriptaculous_js from turbogears import url from turbogears.widgets import CSSLink, JSLink, Widget, WidgetDescription, \ ...
PypiClean
/HalWeb-0.6.0.tar.gz/HalWeb-0.6.0/src/halicea/baseProject/static_data/jscripts/cleditor/jquery.cleditor.js
/** @preserve CLEditor WYSIWYG HTML Editor v1.3.0 http://premiumsoftware.net/cleditor requires jQuery v1.4.2 or later Copyright 2010, Chris Landowski, Premium Software, LLC Dual licensed under the MIT or GPL Version 2 licenses. */ // ==ClosureCompiler== // @compilation_level SIMPLE_OPTIMIZATIONS // @output_file...
PypiClean
/CNN4IE-0.1.9-py3-none-any.whl/cnn4ie/attention_augmented_cnn/predict.py
import torch import os from configparser import ConfigParser import pickle from cnn4ie.attention_augmented_cnn.train import Train from cnn4ie.util.crf_util import get_tags, format_result DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu') class Predict(): def __init__(self): self.model ...
PypiClean
/FinDates-0.2.zip/FinDates-0.2/findates/holidays.py
import collections import datetime import dateutils class OrderMapper: def __init__(self, items=None): self._map = dict() self._counter = 0 if items: self.add(items) def add(self, items): for k in items: self._map[k] = self._counter self._c...
PypiClean
/ChocoPY-0.1.6-py3-none-any.whl/chocopy/get_information.py
from flask import request def get_message() -> str: """ The get_message function is to receive message from request user_message = get_message() :return: The Message that is parsed request """ text = request.json['userRequest']['utterance'] return text def get_block() -> str: ""...
PypiClean
/Isomyr-0.1.tar.gz/Isomyr-0.1/examples/OpenGround/openground.py
import os from pygame import ( K_DOWN, K_LEFT, K_RETURN, K_RIGHT, K_SPACE, K_UP, K_l, K_x, K_z) from isomyr.config import Keys from isomyr.engine import Engine from isomyr.objects.portal import Portal from isomyr.skin import Skin, DirectedAnimatedSkin from isomyr.util import ImageLoader from isomyr.thing import P...
PypiClean
/DeepWon-0.5-py3-none-any.whl/utils/utils.py
__env__ = '''Envs] Python 3.9.7 64-bit(conda 4.11.0) macOS 12.1 ''' __version__ = '''Version] version 0.01(beta) ''' __doc__ = '''\ This module contains various utilities. '''+ __env__+__version__ # print tabular data def print_table(col_names, *cols, tab_width=50, just='right'): '''Make and print a ta...
PypiClean
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/tiny_mce/classes/firebug/firebug-lite.js
var firebug = { version:[1.23,20090309], el:{}, env:{ "cache":{}, "extConsole":null, "css":"http://getfirebug.com/releases/lite/1.2/firebug-lite.css", "debug":true, "detectFirebug":true, "dIndex":"console", "height":295, "hideDOMFunctions":false, "init":false, "isPopup...
PypiClean
/Apycula-0.9.0a1.tar.gz/Apycula-0.9.0a1/doc/alu.md
# ALU In Gowin FPGA logic tiles, it is possible to configure a CLS (slice of two LUTs) in ALU mode. In this mode a hard logic carry chain is used in combination with programmable logic to implement fast arithmetic. ALU mode is available on the 3 CLS in each tile that have a flip-flop, and configured with a single bit...
PypiClean
/Blogofile-0.8.3.tar.gz/Blogofile-0.8.3/blogofile/writer.py
__author__ = "Ryan McGuire (ryan@enigmacurry.com)" import logging import os import re import shutil import tempfile from . import util from . import config from . import cache from . import filter as _filter from . import controller from . import plugin from . import template logger = logging.getLogger("blogofile.w...
PypiClean
/EtherTDD-0.1.5.tar.gz/EtherTDD-0.1.5/ethertdd/__init__.py
from ethereum import abi, tester from ethereum.utils import is_string def set_gas_limit(new_limit): tester.gas_limit = new_limit class EvmContract(object): # Most of the code in this class was pulled from the _abi_contract class # defined in state.abi_contract in https://github.com/ethereum/pyethereum/blo...
PypiClean
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/ticketing/model/ticket.py
import re # noqa: F401 import sys # noqa: F401 from typing import ( Optional, Union, List, Dict, ) from MergePythonSDK.shared.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, OpenApiModel, change_keys_js_to_python,...
PypiClean
/Cantiz-PyChromecast-3.2.2.tar.gz/Cantiz-PyChromecast-3.2.2/pychromecast/controllers/__init__.py
import logging from ..error import UnsupportedNamespace, ControllerNotRegistered class BaseController(object): """ ABC for namespace controllers. """ def __init__(self, namespace, supporting_app_id=None, target_platform=False): """ Initialize the controller. namespa...
PypiClean
/Adafruit_seesaw-1.0.tar.gz/Adafruit_seesaw-1.0/Adafruit_Seesaw/seesaw.py
import logging from Adafruit_bitfield import Adafruit_bitfield import time SEESAW_STATUS_BASE = 0x00 SEESAW_GPIO_BASE = 0x01 SEESAW_SERCOM0_BASE = 0x02 SEESAW_TIMER_BASE = 0x08 SEESAW_ADC_BASE = 0x09 SEESAW_DAC_BASE = 0x0A SEESAW_INTERRUPT_BASE = 0x0B SEESAW_DAP_BASE = 0x0C SEESAW_EEPROM_BASE = 0x0D SEESAW_NEOPIXEL_...
PypiClean
/Gemi3-1.0-cp38-cp38-win_amd64.whl/Gemi3-1.0.dist-info/LICENSE.md
MIT License Copyright (c) 2022 Lukas Madenach Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, di...
PypiClean
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/code_generation/OperationCodes.py
from nuitka.nodes.shapes.StandardShapes import tshape_unknown from .BinaryOperationHelperDefinitions import ( getCodeNameForBinaryOperation, getNonSpecializedBinaryOperations, getSpecializedBinaryOperations, ) from .c_types.CTypeBooleans import CTypeBool from .c_types.CTypeNuitkaBooleans import CTypeNuitka...
PypiClean
/Beads-0.1.4-py3-none-any.whl/beads/modules/gui.py
from meta import * from modules.logic import process from modules.errors import ParsingError, ValidationError, UnsupportedLanguageError from modules import defaults, reader from typing import IO from distutils.util import strtobool import logging import eel import json browser_options: dict = { 'window_size': (120...
PypiClean
/CLAMServices-2.2.3.tar.gz/CLAMServices-2.2.3/clamservices/config/alpino.py
############################################################### # CLAM: Computational Linguistics Application Mediator # -- Service Configuration File (Template) -- # by Maarten van Gompel (proycon) # Centre for Language and Speech Technology / Language Machines # Radboud University Nijmegen # # ...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/grid/enhanced/plugins/IndirectSelection.js
define("dojox/grid/enhanced/plugins/IndirectSelection",["dojo/_base/declare","dojo/_base/array","dojo/_base/event","dojo/_base/lang","dojo/_base/html","dojo/_base/window","dojo/_base/connect","dojo/_base/sniff","dojo/query","dojo/keys","dojo/string","../_Plugin","../../EnhancedGrid","../../cells/dijit"],function(_1,_2,...
PypiClean
/Carillon-1.0.2.tar.gz/Carillon-1.0.2/PROJECT.rst
======================================== Carillon - ultra simple keyboard layouts ======================================== **Carillon** is a simple GTK3 application for switching your keyboard layout. If offers a basic systray icon and menu for switching between a set defined manually. I created this because there ar...
PypiClean
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas_plotters/artists/ellipseartist.py
from typing import Tuple from typing import List from typing import Any from typing_extensions import Literal from matplotlib.patches import Ellipse as EllipsePatch from compas.geometry import Ellipse from compas.artists import PrimitiveArtist from .artist import PlotterArtist Color = Tuple[float, float, float] cl...
PypiClean
/Biomatters-Azimuth-2-0.1.tar.gz/Biomatters-Azimuth-2-0.1/azimuth/predict.py
import numpy as np import sklearn from sklearn.metrics import roc_curve, auc import sklearn.metrics import sklearn.cross_validation import copy import util import time import metrics as ranking_metrics import azimuth.models.regression import azimuth.models.ensembles import azimuth.models.DNN import azimuth.models.basel...
PypiClean
/Firefly_III_API_Client-2.0.5.0-py3-none-any.whl/firefly_iii_client/paths/v1_transactions_id/put.py
from dataclasses import dataclass import typing_extensions import urllib3 from urllib3._collections import HTTPHeaderDict from firefly_iii_client import api_client, exceptions from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re...
PypiClean
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/XVI.py
import genice2.lattices from genice2.cell import cellvectors from genice2.valueparser import parse_cages desc = { "ref": { "ice 16": "Falenty 2014", "C15": "Sikiric 2010", "sII": "Jeffrey 1984", "CS2": "Kosyakov 1999", "MTN": "IZA Database", }, "usage": "No options ...
PypiClean
/Gbtestapi0.4-0.1a10.tar.gz/Gbtestapi0.4-0.1a10/src/gailbot/api.py
from typing import List, Dict, Union, Tuple, Callable from gailbot.services import ServiceController, SettingDict from gailbot.workspace import WorkspaceManager from .plugins.suite import PluginSuite from gailbot.core.utils.logger import makelogger logger = makelogger("gb_api") class GailBot: """ Class for ...
PypiClean
/Bookkeeper-0.0.2.tar.gz/Bookkeeper-0.0.2/bookkeeper/persist.py
import sqlite3 from bookkeeper.util import get_path DB_FILE = '~/.bookkeeper.db' class DB(object): """ Manages the sqlite connection. """ _instance = None @classmethod def get_instance(cls): """ Singleton instance. """ if DB._instance is None: DB._instance = cls() ...
PypiClean
/Kallithea-0.7.0.tar.gz/Kallithea-0.7.0/kallithea/model/validators.py
import logging import os import re from collections import defaultdict import formencode import ipaddr import sqlalchemy from formencode.validators import CIDR, Bool, Email, FancyValidator, Int, IPAddress, NotEmpty, Number, OneOf, Regex, Set, String, StringBoolean, UnicodeString from sqlalchemy import func from tg.i18...
PypiClean
/Authlib-1.2.1.tar.gz/Authlib-1.2.1/authlib/oauth1/client.py
from authlib.common.urls import ( url_decode, add_params_to_uri, urlparse, ) from authlib.common.encoding import json_loads from .rfc5849 import ( SIGNATURE_HMAC_SHA1, SIGNATURE_TYPE_HEADER, ClientAuth, ) class OAuth1Client(object): auth_class = ClientAuth def __init__(self, session, ...
PypiClean
/Django-Yummy-0.2.6.tar.gz/Django-Yummy-0.2.6/yummy/migrations/0012_auto__del_consumer.py
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'Consumer' db.delete_table('yummy_consumer') def backwards(self, orm): # Adding model 'Consumer' ...
PypiClean
/Gnotty-0.2.7.tar.gz/Gnotty-0.2.7/gnotty/server.py
from __future__ import with_statement from gevent import monkey, spawn, sleep monkey.patch_all() from Cookie import SimpleCookie from cgi import FieldStorage from logging import getLogger, StreamHandler from mimetypes import guess_type import os import sys from tempfile import gettempdir from traceback import format_...
PypiClean
/NNTools-0.1.0.tar.gz/NNTools-0.1.0/nntools/dataset/tools.py
class CacheBullet: def __call__(self, **kwargs): return kwargs class Composition: def __init__(self): self.ops = [] self.deactivated = [] self._index_bullet = 0 def add(self, *funcs): for f in funcs: self.ops.append(f) return self def deacti...
PypiClean
/Flask-Philo-3.7.1.tar.gz/Flask-Philo-3.7.1/flask_philo/cloud/aws/sqs.py
from .utils import run_action from prettytable import PrettyTable import argparse import boto3 import boto3.ec2 import json import uuid app = None def send_message(queue_url, message_body, region=None): client = boto3.client('sqs', region_name=region) return client.send_message(QueueUrl=queue_url, Message...
PypiClean
/JRPC-utils-0.2.1.tar.gz/JRPC-utils-0.2.1/jrpcutils.py
import json import inspect JSONRPC_VERSION = "2.0" PARSE_ERROR_CODE = -32700 INVALID_REQUEST_CODE = -32600 METHOD_NOT_FOUND_CODE = -32601 INVALID_PARAMS_CODE = 32602 INTERNAL_ERROR_CODE = 32603 SERVER_ERROR_CODE = -32000 class JsonRpcException(Exception): """ Common base class for all json rpc exceptions. ...
PypiClean
/IdracRedfishSupport-0.0.8.tar.gz/IdracRedfishSupport-0.0.8/SupportAssistCollectionNetworkShareREDFISH.py
import argparse import getpass import json import logging import re import requests import sys import time import warnings from datetime import datetime from pprint import pprint warnings.filterwarnings("ignore") parser = argparse.ArgumentParser(description="Python script using Redfish API with OEM extension to eit...
PypiClean
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/job/fr_FR/__init__.py
from .. import Provider as BaseProvider # Source: ONISEP # https://www.data.gouv.fr/fr/datasets/r/462f1a98-6f37-4414-9e08-016b78cc4d08 class Provider(BaseProvider): jobs = [ "BIM manager", "accessoiriste", "accompagnant éducatif et social éducative et sociale", "accompagnateur de ...
PypiClean
/Asymptotic%20Complexity%20Judge-0.0.1.tar.gz/Asymptotic Complexity Judge-0.0.1/ACJudge_Pkg/Client.py
import sys, Ice, os.path, time ,argparse, datetime from xtermcolor import colorize from prettytable import PrettyTable from random import randrange from dotenv import load_dotenv from ACJudge_Pkg import OJMod __name__ = 'Client' load_dotenv() def list_problems(problems): problem_table = PrettyTable(['ID', 'Title...
PypiClean
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/sphinx/ext/autosummary/templates/autosummary/class.rst
{{ fullname | escape | underline}} .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} {% block methods %} .. automethod:: __init__ {% if methods %} .. rubric:: {{ _('Methods') }} .. autosummary:: {% for item in methods %} ~{{ name }}.{{ item }} {%- endfor %} {% endif %} {...
PypiClean
/MutatorMath-3.0.1.zip/MutatorMath-3.0.1/Docs/old_designSpaceFileFormat.md
MutatorMath DesignSpace Format (old) ==================================== ![A MutatorMath Designspace Document Icon](designspaceDocumentIcon.png) Please refer to the [designSpaceDocument](https://github.com/LettError/designSpaceDocument) repository for an up to data specification of the file. The UFO support in Muta...
PypiClean
/FPL_wildcard_team_selector-1.1.1.tar.gz/FPL_wildcard_team_selector-1.1.1/FPL_wildcard_team_selector/FPL_data_visualization/team_selection_visualization.py
import turtle class visualize_team_selection: def __init__(self, list_of_goalies, list_of_defenders, list_of_midfielders, list_of_strikers, cash_left): self.list_of_goalies = list_of_goalies self.list_of_defenders = list_of_defenders self.list_of_midfielders = list_of_midfielders s...
PypiClean
/ATpy-0.9.7.tar.gz/ATpy-0.9.7/atpy/vo_conesearch.py
from __future__ import print_function, division from distutils import version import warnings import tempfile vo_minimum_version = version.LooseVersion('0.3') try: import vo.conesearch as vcone vo_installed = True except: vo_installed = False def _check_vo_installed(): if not vo_installed: r...
PypiClean
/Docassemble-Pattern-3.6.7.tar.gz/Docassemble-Pattern-3.6.7/docassemble_pattern/text/nl/__init__.py
#################################################################################################### # Dutch linguistical tools using fast regular expressions. from __future__ import unicode_literals from __future__ import division from builtins import str, bytes, dict, int from builtins import map, zip, filter from...
PypiClean
/Flask-Sillywalk-2.1.zip/Flask-Sillywalk-2.1/README.rst
flask-sillywalk =============== A Flask extension that implements Swagger support (http://swagger.wordnik.com/) What's Swagger? --------------- Swagger is a spec to help you document your APIs. It's flexible and produces beautiful API documentation that can then be used to build API-explorer-type sites, much like th...
PypiClean
/integer_partition/__init__.py
from CombinatorialProbability.combinatorics import CombinatorialSequence from CombinatorialProbability.combinatorics import CombinatorialStructure class IntegerPartition(CombinatorialSequence, CombinatorialStructure): """Generator for integer partitions. This class is meant as a generator for integer pa...
PypiClean
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/codemirror/mode/dtd/dtd.js
(function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env mod(CodeMirror); })(function(CodeMirror) { "use st...
PypiClean
/Essential_Probability_Functions-0.1.tar.gz/Essential_Probability_Functions-0.1/Essential_Probability_Functions/Binomialdistribution.py
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Binomial(Distribution): """ Binomial distribution class for calculating and visualizing a Binomial distribution. Attributes: mean (float) representing the mean value of the distribution st...
PypiClean
/Firmant-0.2.3a1.tar.gz/Firmant-0.2.3a1/firmant/writers/__init__.py
from firmant import chunks from firmant import decorators from firmant import utils from firmant.utils import workarounds class Writer(chunks.AbstractChunk): '''The base class of all writers. This class defines an abstract base class that all writers are required to adhere to. To use this class in the c...
PypiClean
/EQcorrscan-0.4.4.tar.gz/EQcorrscan-0.4.4/eqcorrscan/doc/tutorials/matched-filter.rst
Matched-filter detection ======================== This tutorial will cover using both the match-filter objects, and using the internal functions within match-filter. The match-filter objects are designed to simplify meta-data handling allowing for shorter code with fewer mistakes and therefore more consistent results...
PypiClean
/HTMLTestRunner-rv-1.1.2.tar.gz/HTMLTestRunner-rv-1.1.2/HTMLTestRunner/static/script.js
output_list = Array(); /* level - 0:Summary; 1:Failed; 2:All */ function showCase(level) { trs = document.getElementsByTagName("tr"); for (var i = 0; i < trs.length; i++) { tr = trs[i]; id = tr.id; if (level == 0) { if (id.substr(0,2) == 'ft' || id.substr(0,2) == 'pt'){ ...
PypiClean
/CustomIntents-1.0.0.tar.gz/CustomIntents-1.0.0/LICENSE.md
GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. ...
PypiClean
/NewTestPackage-0.0.2.tar.gz/NewTestPackage-0.0.2/README.md
# NewTestPackage [![image](https://img.shields.io/pypi/v/NewTestPackage.svg)](https://pypi.python.org/pypi/NewTestPackage) [![image](https://img.shields.io/conda/vn/conda-forge/NewTestPackage.svg)](https://anaconda.org/conda-forge/NewTestPackage) **to just test geo ** - Free software: MIT license - Documentat...
PypiClean
/Nano-Assault-1.0.tar.gz/Nano-Assault-1.0/nanoassault/run_level.py
# (C) 2017, Eike Jesinghaus # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope ...
PypiClean
/Genetic_Algorithm_VEDA-0.0.3.tar.gz/Genetic_Algorithm_VEDA-0.0.3/__init__.py
from multiprocessing.sharedctypes import copy import os from quopri import decodestring from random import * import random import datetime import bisect class Stack: def __init__(self): self.items = [] def isEmpty(self): return self.items == [] def push(self, item): self.ite...
PypiClean
/GraphQL_core_next-1.1.1-py3-none-any.whl/graphql/validation/specified_rules.py
from ..pyutils import FrozenList from .rules import RuleType # Spec Section: "Executable Definitions" from .rules.executable_definitions import ExecutableDefinitionsRule # Spec Section: "Operation Name Uniqueness" from .rules.unique_operation_names import UniqueOperationNamesRule # Spec Section: "Lone Anonymous Ope...
PypiClean