id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/acorn-node/lib/static-class-features/index.js
"use strict" var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g var acorn = require("acorn") var tt = acorn.tokTypes function maybeParseFieldValue(field) { if (this.eat(tt.eq)) { var oldInFieldValue = this._inStaticFieldValue this._inStaticFieldValue = true field.value = this.parseExpression() t...
PypiClean
/NDETCStemmer_kaenova-1.4.3-py3-none-any.whl/NDETCStemmer/BestWordSelector.py
class BestWordSelector: def __init__(self,stemmer_input,model,root_word,rare_word,compound_word,weight,left_context,right_context,parent): self.stemmer_input=stemmer_input self.word_candidate={} self.model=model self.root_word=root_word self.rare_word=rare_word self.compound_word=compound_word self.weigh...
PypiClean
/ApiLeagueOfLegends-0.6.tar.gz/ApiLeagueOfLegends-0.6/README.md
# Simple League of Legends Wrapper in Python It creates a small sqlite Database where it can saves multiple Api-Keys. Every Request returns the response from the server and the Api-Key object. This makes it possible to save the Data like the encryptedAccountId with the right Api-Key-ID and for further request where you...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/gfx/fx.js.uncompressed.js
define("dojox/gfx/fx", ["dojo/_base/lang", "./_base", "./matrix", "dojo/_base/Color", "dojo/_base/array", "dojo/_base/fx", "dojo/_base/connect"], function(lang, g, m, Color, arr, fx, Hub){ var fxg = g.fx = {}; /*===== g = dojox.gfx; fxg = dojox.gfx.fx; =====*/ // Generic interpolators. Should they be moved to do...
PypiClean
/MapProxy-1.16.0.tar.gz/MapProxy-1.16.0/doc/caches.rst
Caches ###### .. versionadded:: 1.2.0 MapProxy supports multiple backends to store the internal tiles. The default backend is file based and does not require any further configuration. Configuration ============= You can configure a backend for each cache with the ``cache`` option. Each backend has a ``type`` and ...
PypiClean
/BenchML-0.3.4.tar.gz/BenchML-0.3.4/benchml/models/mod_bench_class.py
import numpy as np import benchml.transforms as btf from benchml.hyper import GridHyper, Hyper def compile_physchem_class(custom_fields=None, with_hyper=False, **kwargs): if custom_fields is None: custom_fields = [] models = [] for descriptor_set in ["basic", "core", "logp", "extended"]: ...
PypiClean
/MAmotif-1.1.0.tar.gz/MAmotif-1.1.0/mamotif/cli/run.py
import logging import os import manorm.cli as cli_manorm import motifscan.cli.main as cli_motifscan from mamotif.integration import run_integration logger = logging.getLogger(__name__) def run_manorm_from_mamotif(args): args.name1 = args.name1 or os.path.splitext( os.path.basename(args.peak_file1))[0] ...
PypiClean
/OctoBot-Trading-2.4.23.tar.gz/OctoBot-Trading-2.4.23/octobot_trading/api/orders.py
import octobot_commons.logging as logging import octobot_trading.personal_data as personal_data import octobot_trading.enums import octobot_trading.constants as constants LOGGER = logging.get_logger(constants.API_LOGGER_TAG) async def create_order(exchange_manager, order_type: octobot_trading...
PypiClean
/MogileLocal-0.9.0.tar.gz/MogileLocal-0.9.0/mogilelocal.py
import os, glob, md5, shutil, sys, urlparse from os import path as osp class MogileFSError(Exception): """ Exception class for all MogileFS errors. """ pass class Client: """ The main MogileFS client. This is the interface to the filestore. This implements most of the dictionary interfac...
PypiClean
/AztVeClient-1.0.0.post1.tar.gz/AztVeClient-1.0.0.post1/AztVe/common/qujam_socket.py
import socket import threading from .azt_errors import * from .qujam_buffer import * from .qujam_heart_beat import QujamHeartBeat class QujamSocket: def __init__(self, **kwargs): self.p_tcp_recv_buflen = kwargs.get("tcp_recv_buflen", 65536) self.p_udp_recv_buflen = kwargs.get("udp_recv_buflen", ...
PypiClean
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/codemirror/mode/powershell/powershell.js
(function(mod) { 'use strict'; 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(window.CodeMirror); })(functi...
PypiClean
/Hydrograph-py-1.0.1.tar.gz/Hydrograph-py-1.0.1/Hydrograph/extreme_analysis.py
#-Authorship information-######################################################################################################################## __author__ = 'Wilco Terink' __copyright__ = 'Wilco Terink' __version__ = '1.0.1' __email__ = 'wilco.terink@ecan.govt.nz' __date__ ='December 2019' ##########################...
PypiClean
/Emonic-1.0.1.tar.gz/Emonic-1.0.1/emonic/core/__init__.py
def access_denied(request): return f'''<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.7/dist/tailwind.min.css" rel="stylesheet"> <title>Access Denied</title...
PypiClean
/Cim2BusBranch-0.1.tar.gz/Cim2BusBranch-0.1/README.txt
============= Cim2BusBranch ============= Tansforms `PyCIM <http://pycim.org/>`_ CIM topologies to a generic bus/branch model that can be used to perform load flow analyses with `PYPOWER <http://pypower.org/>`_. Requirements ============ Cim2BusBranch runs on Python >= 2.6 and requires `PyCIM <http://pycim.org/>`_....
PypiClean
/ACME%20oneM2M%20CSE-0.3.0.tar.gz/ACME oneM2M CSE-0.3.0/README.md
# ![](webui/img/acme_sm.png) # ACME oneM2M CSE An open source CSE Middleware for Education. Version 0.3.0 ## Introduction This CSE implements a subset of the oneM2M standard specializations (see [http://www.onem2m.org](http://www.onem2m.org)). The intention is to provide an easy to install, extensible, and easy t...
PypiClean
/lektor-3.4.0b6-py3-none-any.whl/lektor/markdown/controller.py
import threading from abc import ABC from abc import abstractmethod from dataclasses import dataclass from typing import Any from typing import Callable from typing import Dict from typing import Hashable from typing import Mapping from typing import MutableMapping from typing import NamedTuple from typing import Optio...
PypiClean
/MarkDo-0.3.0.tar.gz/MarkDo-0.3.0/markdo/static/foundation/js/foundation/foundation.orbit.js
;(function ($, window, document, undefined) { 'use strict'; var noop = function() {}; var Orbit = function(el, settings) { // Don't reinitialize plugin if (el.hasClass(settings.slides_container_class)) { return this; } var self = this, container, slides_container = el, ...
PypiClean
/KPyGithub-1.32a1.tar.gz/KPyGithub-1.32a1/github/StatsCommitActivity.py
# ########################## Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # # ...
PypiClean
/ImageStack-0.1.24.tar.gz/ImageStack-0.1.24/imagestack/imageresolve.py
from . import * import copy import ast class ImageStackResolve: def __init__(self, creatable): self.untouched_creatable = creatable self.current_arg = None def _resolve_list(self, x): for value in x: self._resolve(value) def _resolve_dict(self, d): for key, va...
PypiClean
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/staticfiles/management/commands/collectstatic.py
import os from django.apps import apps from django.contrib.staticfiles.finders import get_finders from django.contrib.staticfiles.storage import staticfiles_storage from django.core.checks import Tags from django.core.files.storage import FileSystemStorage from django.core.management.base import BaseCommand, CommandEr...
PypiClean
/daxfi-1.1.tar.gz/daxfi-1.1/etc/daxfid/rules.d/udplisten.py
PERSISTENT = 5 def run_this(): EXCLUDED_PORTS = [] DEBUG = 1 import string try: udp_f = open('/proc/net/udp', 'r') content = udp_f.readlines() udp_f.close() except IOError: sl_print_error('udplisten: unable to open /proc/net/udp') return 0 blocked_p...
PypiClean
/FileOptimizerPy-1.1.1641.tar.gz/FileOptimizerPy-1.1.1641/README.md
# FileOptimizerPy --- Python module and utility for file compression with several optimization plugins. Based on utility [FileOptimiser](https://nikkhokkho.sourceforge.io/static.php?page=FileOptimizer) by Nikkho. License: **AGPLv3** Version: **1.1.1641** Python version: **>=3.6** Required plugins from original util...
PypiClean
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/admin/urlpatterns.py
from django.urls import include, path class URLPatterns: def __init__(self): self.namespace_patterns = None self._namespaces = [] self._patterns = [] self._urlpatterns = None def namespace(self, url_path, namespace, parent=None): self._namespaces.append( {"...
PypiClean
/Flask-SERVICE-0.1.4.tar.gz/Flask-SERVICE-0.1.4/README.rst
flask_service ============================ cmdb api client Installation ------------ Installing is simple with pip:: $ pip install flask-service Usage ----- Setting up the debug toolbar is simple:: # CMDB连接配置 CMDB_API_URL = "http://cmdb.dev.app.ofidc.com:8001" CMDB_API_VERSION = "v1" CMDB_S...
PypiClean
/LocalJudge-0.0.1.tar.gz/LocalJudge-0.0.1/lj/lj.py
import datetime import json import logging import platform import shutil import sys from sys import exit from pathlib import Path from string import Template import subprocess import argparse import colorful from lj.utils import get_now_ms handler = logging.StreamHandler(sys.stdout) handler.setLevel(logging.NOTSET) f...
PypiClean
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_en-cx.js
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function getVF(n, opt_pre...
PypiClean
/MapProxy-1.16.0.tar.gz/MapProxy-1.16.0/mapproxy/seed/config.py
from __future__ import print_function import os import sys import time import operator from functools import reduce from mapproxy.cache.dummy import DummyCache from mapproxy.compat import iteritems, itervalues, iterkeys from mapproxy.config import abspath from mapproxy.config.loader import ConfigurationError from ma...
PypiClean
/Grammaticomastix-0.0.1rc2-py3-none-any.whl/grammaticomastix/dchars/languages/san/transliterations/itrans/ucombinations.py
from dchars.dchars import new_dstring from dchars.languages.san.dcharacter import DCharacterSAN from dchars.languages.san.transliterations.itrans.itrans import dchar__get_translit_str import itertools #/////////////////////////////////////////////////////////////////////////// def get_usefull_combinations(): """ ...
PypiClean
/LTB-Symm-1.0.0.tar.gz/LTB-Symm-1.0.0/src/ltbsymm/symmetry.py
import matplotlib.pyplot as plt import numpy as np import scipy.sparse as sp from tqdm import tqdm import warnings class Symm: """ Defines an object usefull to investigate and diagonalize symmetry operation """ def __init__(self, tb): self.conf = tb.conf self.tb...
PypiClean
/GPy_ABCD-1.2.1-py3-none-any.whl/GPy_ABCD/Models/model.py
import warnings from copy import deepcopy from GPy.models import GPRegression from GPy.plotting import change_plotting_library from GPy_ABCD.KernelExpressions.all import SumKE from GPy_ABCD.KernelExpansion.kernelOperations import fit_ker_to_kex_with_params class GPModel(): def __init__(self, X, Y, kernel_express...
PypiClean
/AnkiServer-2.0.6.tar.gz/AnkiServer-2.0.6/anki-bundled/anki/sync.py
import urllib import sys import gzip import random from cStringIO import StringIO import httplib2 from anki.db import DB from anki.utils import ids2str, intTime, json, isWin, isMac, platDesc, checksum from anki.consts import * from hooks import runHook import anki from lang import ngettext # syncing vars HTTP_TIMEOU...
PypiClean
/BuildStream-2.0.1-cp39-cp39-manylinux_2_28_x86_64.whl/buildstream/_cas/casserver.py
from concurrent import futures from enum import Enum import contextlib import logging import os import sys import grpc import click from .._protos.build.bazel.remote.asset.v1 import remote_asset_pb2_grpc from .. import _signals from .._protos.build.bazel.remote.execution.v2 import ( remote_execution_pb2, rem...
PypiClean
/NNetEn-1.0.5.tar.gz/NNetEn-1.0.5/README.md
[![DOI](https://img.shields.io/badge/DOI-10.3390%2Fa16050255-blue)](https://www.mdpi.com/1999-4893/16/5/255) ![PyPI - Downloads](https://img.shields.io/pypi/dm/NNetEn?label=PyPI%20dowloads) ![PyPI](https://img.shields.io/pypi/v/NNetEn?color=informational&label=PyPI%20version) # Neural Network Entropy (NNetEn) Entropy...
PypiClean
/Bubot_CoAP-1.0.7-py3-none-any.whl/Bubot_CoAP/messages/request.py
from .. import defines from ..messages.message import Message from ..messages.option import Option __author__ = 'Giacomo Tanganelli' class Request(Message): """ Class to handle the Requests. """ def __init__(self): """ Initialize a Request message. """ super(Request, ...
PypiClean
/NESTML-5.3.0-py3-none-any.whl/pynestml/visitors/ast_data_type_visitor.py
from astropy import units from pynestml.meta_model.ast_unit_type import ASTUnitType from pynestml.symbols.error_type_symbol import ErrorTypeSymbol from pynestml.symbols.predefined_types import PredefinedTypes from pynestml.symbols.predefined_units import PredefinedUnits from pynestml.symbols.unit_type_symbol import U...
PypiClean
/DuHast-1.0.7-py3-none-any.whl/duHast/APISamples/RevitFamilyUtils.py
import clr import System clr.AddReference('System.Core') clr.ImportExtensions(System.Linq) clr.AddReference('System') from System.Collections.Generic import List # import common library # utility functions for most commonly used Revit API tasks import RevitCommonAPI as com # utilities import Utility as util # class...
PypiClean
/BitCash-1.0.0-py3-none-any.whl/bitcash/network/APIs/BitcoinDotComAPI.py
from bitcash.network.http import session from decimal import Decimal from bitcash.exceptions import InvalidEndpointURLProvided from bitcash.network import currency_to_satoshi from bitcash.network.APIs import BaseAPI from bitcash.network.meta import Unspent from bitcash.network.transaction import Transaction, TxPart fro...
PypiClean
/LeoX-0.6.1-py3-none-any.whl/lx/omega.py
import numpy as np import os import sys import subprocess import shutil import lx.tools ##GENERATES NEUTRAL INPUT###################################### def gera_optcom(atomos,G,base,nproc,mem,omega,op): header = "%nproc=JJJ\n%mem=MEM\n# BASE iop(3/108=MMMMM00000) iop(3/107=MMMMM00000) {}\n\nTITLE\n\n0 1\n".format(...
PypiClean
/Bytestag-0.2b1.tar.gz/Bytestag-0.2b1/src/py3/bytestag/tables.py
# This file is part of Bytestag. # Copyright © 2012 Christopher Foo <chris.foo@gmail.com>. # Licensed under GNU GPLv3. See COPYING.txt for details. from bytestag.events import Observer from bytestag.keys import KeyBytes import abc import collections import itertools import logging __docformat__ = 'restructuredtext en'...
PypiClean
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/core/management/commands/loaddata.py
from __future__ import unicode_literals import sys import os import gzip import zipfile from optparse import make_option import traceback from django.conf import settings from django.core import serializers from django.core.management.base import BaseCommand, CommandError from django.core.management.color import no_s...
PypiClean
/Gecco-0.3.0.tar.gz/Gecco-0.3.0/gecco/modules/lm.py
import sys import os import io import bz2 import gzip import time import datetime import itertools from collections import defaultdict import folia.main as folia from pynlpl.textprocessors import Windower from timbl import TimblClassifier #pylint: disable=import-error from gecco.gecco import Module from gecco.helpers....
PypiClean
/Hate-Tweet-Map-2.0-2.0.tar.gz/Hate-Tweet-Map-2.0-2.0/hate_tweet_map/users_searcher/SearchUsers.py
import concurrent import os from concurrent import futures import logging import math import time from concurrent.futures import Future from datetime import datetime, timezone import requests import yaml from tqdm import tqdm from hate_tweet_map import util from hate_tweet_map.database import DataBase class UserSea...
PypiClean
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/integrations/handlers/cloud_spanner_handler/cloud_spanner_handler.py
from collections import OrderedDict from google.cloud import spanner_dbapi from google.cloud.spanner_dbapi import Connection import pandas as pd from mindsdb_sql import parse_sql from mindsdb_sql.parser.ast.base import ASTNode from mindsdb.integrations.libs.base import DatabaseHandler from mindsdb.integrations.libs....
PypiClean
/FeinCMS-23.8.0.tar.gz/FeinCMS-23.8.0/feincms/module/medialibrary/zip.py
import json import os import time import zipfile from django.conf import settings as django_settings from django.core.files.base import ContentFile from django.template.defaultfilters import slugify from django.utils import timezone from .models import Category, MediaFile, MediaFileTranslation # -----------------...
PypiClean
/FNTPACKBOT2-2.3.5-py3-none-any.whl/FTNPACKBOT2/__init__.py
__name__ = "PartyBotPackage" __author__ = "xMistt" __version__ = "1.0.3" try: # System imports. from typing import Tuple, Any, Union, Optional import asyncio import sys import datetime import json import functools import os import random as py_random import logging import u...
PypiClean
/FuzzyClassificator-1.3.84-py3-none-any.whl/pybrain/supervised/trainers/backprop.py
__author__ = 'Daan Wierstra and Tom Schaul' from scipy import dot, argmax from random import shuffle from math import isnan from pybrain.supervised.trainers.trainer import Trainer from pybrain.utilities import fListToString from pybrain.auxiliary import GradientDescent from functools import reduce class BackpropTrai...
PypiClean
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/public/VAADIN/widgetsets/org.muntiacus.MuntjacWidgetSet/mode/php/php.js
(function() { function keywords(str) { var obj = {}, words = str.split(" "); for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } function heredoc(delim) { return function(stream, state) { if (stream.match(delim)) state.tokenize = null; else stream.skipToEnd(); ...
PypiClean
/DRSlib-DavidRodriguezSoaresCUI-0.8.0.tar.gz/DRSlib-DavidRodriguezSoaresCUI-0.8.0/src/DRSlib/utils.py
import collections import inspect import logging import pickle from pathlib import Path from typing import Any, Callable, Optional, Tuple, Union LOG = logging.getLogger(__file__) # Used to be: "[%(levelname)s:%(filename)s:%(lineno)d] %(message)s" LOG_FORMAT = "[%(levelname)s:%(funcName)s] %(message)s" def assertTr...
PypiClean
/DatabasePipe-2.2.1.tar.gz/DatabasePipe-2.2.1/ez_setup.py
import sys DEFAULT_VERSION = "0.6c11" DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] md5_data = { 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca', 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', 'setuptools-0.6b2-py2.3.egg': '565775...
PypiClean
/DPA-0.0.3-cp37-cp37m-macosx_10_15_x86_64.whl/Pipeline/PAk.py
import numpy as np from sklearn.base import BaseEstimator, DensityMixin, ClassifierMixin, TransformerMixin from sklearn.utils.validation import check_X_y, check_array, check_is_fitted from sklearn.utils.multiclass import unique_labels from sklearn.metrics import euclidean_distances from sklearn.neighbors import Neares...
PypiClean
/BotEXBotBase-3.1.3.tar.gz/BotEXBotBase-3.1.3/discord/client.py
import asyncio from collections import namedtuple import logging import re import signal import sys import traceback import aiohttp import websockets from .user import User, Profile from .invite import Invite from .object import Object from .guild import Guild from .errors import * from .enums import Status, VoiceReg...
PypiClean
/ChiantiPy-0.15.1.tar.gz/ChiantiPy-0.15.1/docs/source/api/ChiantiPy.core.rst
ChiantiPy\.core package ======================= Subpackages ----------- .. toctree:: ChiantiPy.core.tests Submodules ---------- ChiantiPy\.core\.Continuum module --------------------------------- .. automodule:: ChiantiPy.core.Continuum :members: :undoc-members: :show-inheritance: ChiantiPy\.core...
PypiClean
/Flask-AppBuilder-jwi078-2.1.13.tar.gz/Flask-AppBuilder-jwi078-2.1.13/flask_appbuilder/models/generic/__init__.py
__author__ = "dpgaspar" from datetime import date, datetime import operator import os from ..._compat import with_metaclass # -------------------------------------- # Exceptions # -------------------------------------- class PKMissingException(Exception): def __init__(self, model_name=""): messa...
PypiClean
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/doc/admin_doc/install_doc/config_reference.rst
.. _ConfigReference: Configuration reference ======================= .. HINT:: The best way to configure INGInious is to use :ref:`inginious-install`. See :ref:`config`. Configuring INGInious is done via a file named ``configuration.yaml``. To get started, a file named ``configuration.example.yaml`` is provided....
PypiClean
/IPweather-0.1.8.tar.gz/IPweather-0.1.8/README.md
<div align=center> # IPweather v0.1.6 **A python package to get the Ip of the user and current weather with an IP or other information** </div> ## +example: ![image](https://user-images.githubusercontent.com/81589649/178151640-464aa9a9-4993-4ca5-9805-3a2cfc7dd3a0.png) ## +Info and usage: go to the wiki on t...
PypiClean
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Model/Vocabulary/Domain/Parser/MessageParser.py
# +---------------------------------------------------------------------------+ # | 01001110 01100101 01110100 01111010 01101111 01100010 | # | | # | Netzob : Inferring communication protocols |...
PypiClean
/GSAS-II-WONDER_linux-1.0.1.tar.gz/GSAS-II-WONDER_linux-1.0.1/GSAS-II-WONDER/CifFile/YappsStarParser_1_1.py
from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from .StarFile import StarBlock,StarFile,StarList,StarDict from io import StringIO # An alternative specification for the Cif Parser, based on Yapps2 # by Amit Patel (htt...
PypiClean
/GraKeL-0.1.9-cp310-cp310-macosx_10_9_universal2.whl/grakel/kernels/weisfeiler_lehman.py
# Author: Ioannis Siglidis <y.siglidis@gmail.com> # License: BSD 3 clause import warnings import numpy as np import joblib from sklearn.exceptions import NotFittedError from sklearn.utils.validation import check_is_fitted from grakel.graph import Graph from grakel.kernels import Kernel from grakel.kernels.vertex_his...
PypiClean
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_asa-tz.js
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function getVF(n, opt_pre...
PypiClean
/CsuPMTD-1.0.27.tar.gz/CsuPMTD-1.0.27/PMTD/maskrcnn_benchmark/apex/apex/fp16_utils/loss_scaler.py
import torch # item() is a recent addition, so this helps with backward compatibility. def to_python_float(t): if hasattr(t, 'item'): return t.item() else: return t[0] class LossScaler: """ Class that manages a static loss scale. This class is intended to interact with :class:`FP1...
PypiClean
/Benker-0.5.4.tar.gz/Benker-0.5.4/docs/tutorials/grid.rst
.. _benker__grid: Grid ==== Description ----------- A :class:`~benker.grid.Grid` is a collection of :class:`~benker.cell.Cell` objects ordered in a grid of rows and columns. You can define a empty grid like this: .. doctest:: grid >>> from benker.grid import Grid >>> Grid() Grid([]) You can also def...
PypiClean
/FuzzyClassificator-1.3.84-py3-none-any.whl/pybrain/rl/experiments/tournament.py
__author__ = 'Tom Schaul, tom@idsia.ch' from pybrain.rl.environments.twoplayergames.twoplayergame import TwoPlayerGame from pybrain.utilities import Named class Tournament(Named): """ the tournament class is a specific kind of experiment, that takes a pool of agents and has them compete against each other in...
PypiClean
/AICloudSDK-1.0.7.tar.gz/AICloudSDK-1.0.7/aicloud/engine.py
import zipfile import time import os import tarfile import uuid from aicloud.cloudapi import AIPlatform import json import sys import io # sys.stdout = sys.__stdout__ = io.TextIOWrapper(sys.stdout.detach(), encoding='utf-8', line_buffering=True) # sys.stderr = sys.__stderr__ = io.TextIOWrapper(sys.stderr.detach(), e...
PypiClean
/MnemoPwd-1.2.1-py3-none-any.whl/mnemopwd/server/clients/protocol/StateS36.py
# Copyright (c) 2015-2016, Thierry Lemeunier <thierry at lemeunier dot net> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright n...
PypiClean
/BigchainDB-2.2.2.tar.gz/BigchainDB-2.2.2/bigchaindb/common/transaction.py
from collections import namedtuple from copy import deepcopy from functools import reduce, lru_cache import rapidjson import base58 from cryptoconditions import Fulfillment, ThresholdSha256, Ed25519Sha256 from cryptoconditions.exceptions import ( ParsingError, ASN1DecodeError, ASN1EncodeError, UnsupportedTypeError...
PypiClean
/Dist_Probs-0.3.tar.gz/Dist_Probs-0.3/Dist_Probs/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 std...
PypiClean
/CNFgen-0.9.2-py3-none-any.whl/cnfgen/formula/basecnf.py
from collections import OrderedDict from cnfgen.info import info from cnfgen.localtypes import non_negative_int class ClausesView: """Object that represents a lit of clauses Useful to provide some read only operations to the list of causes of a formula""" def __init__(self,F): """Create a view of the...
PypiClean
/F2python-1.5.0.tar.gz/F2python-1.5.0/F2/f2_attribute.py
from . import OFF, metadict from . import f2_object, f2_class F2_Object = f2_object.F2_Object F2_Class = f2_class.F2_Class theClass = f2_class.theClass class F2_Attribute(F2_Object): "an F2 object belonging to class ATTRIBUTE hierarchy" def __str__(self): return '<%s.%s>' % (OFF.className[self._klass...
PypiClean
/MetaGram-2.0.2.tar.gz/MetaGram-2.0.2/pyrogram/types/inline_mode/inline_query_result_video.py
from typing import Optional, List import pyrogram from pyrogram import raw, types, utils, enums from .inline_query_result import InlineQueryResult class InlineQueryResultVideo(InlineQueryResult): """Link to a page containing an embedded video player or a video file. By default, this video file will be sent...
PypiClean
/ECmean4-0.1.4.tar.gz/ECmean4-0.1.4/ecmean/libs/general.py
import os import logging import platform import multiprocessing import pandas as pd import numpy as np ################## # HELP FUNCTIONS # ################## # def is_number(s): # """Check if input is a float type""" # try: # float(s) # return True # except ValueError: # retur...
PypiClean
/CephQeSdk-1.0.0.tar.gz/CephQeSdk-1.0.0/src/RhcsQeSdk/core/cli/rbd/mirror/schedule.py
import logging from copy import deepcopy import RhcsQeSdk.core.cli.fabfile as fabfile from RhcsQeSdk.core.utilities import core_utils logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) formatter = logging.Formatter( "%(asctime)s - %(levelname)s - %(name)s:%(lineno)d - %(message)s" ) stream_hand...
PypiClean
/IdracRedfishSupport-0.0.8.tar.gz/IdracRedfishSupport-0.0.8/ImportSystemConfigurationPreviewLocalFilenameREDFISH.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 to preview the a local im...
PypiClean
/kiramibot-0.2.0.tar.gz/kiramibot-0.2.0/kirami/utils/request/__init__.py
from collections.abc import AsyncGenerator from contextlib import asynccontextmanager from typing import Any, Literal import httpx from httpx import Response from httpx._types import ( CookieTypes, HeaderTypes, ProxiesTypes, QueryParamTypes, RequestContent, RequestData, RequestFiles, Ti...
PypiClean
/NanoCap-1.0b12.tar.gz/NanoCap-1.0b12/nanocap/gui/structurelist.py
import os,time,platform,random,math,copy from nanocap.core.globals import * from nanocap.gui.settings import * from nanocap.gui.common import * from nanocap.gui.widgets import * from nanocap.gui.listitemdelegate import * from nanocap.core.util import * from nanocap.rendering import vtkqtrenderwidgets class StructureL...
PypiClean
/Carpenter-1.0.2.zip/Carpenter-1.0.2/README.md
# Carpenter A Python repository which repairs and analyzes tablular data ## Description This module provides the capability to extract and repair blocks of data from 2D tables. These blocks can then be individually processed, stitched together, or filtered as needed by a particular program. Autoconversions of cells a...
PypiClean
/DEME-0.2.8.tar.gz/DEME-0.2.8/thirdparty/pybind11/docs/benchmark.rst
Benchmark ========= The following is the result of a synthetic benchmark comparing both compilation time and module size of pybind11 against Boost.Python. A detailed report about a Boost.Python to pybind11 conversion of a real project is available here: [#f1]_. .. [#f1] http://graylab.jhu.edu/RosettaCon2016/PyRosetta...
PypiClean
/LibRecommender-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl/libreco/sampling/negatives.py
import math import random import numpy as np def _check_invalid_negatives(negatives, items_pos, items=None): if items is not None and len(items) > 0: invalid_indices = np.union1d( np.where(negatives == items_pos)[0], np.where(negatives == items)[0] ) else: invalid_indices ...
PypiClean
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/lib/js/plugins/tabfocus/plugin.js
(function (domGlobals) { 'use strict'; var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager'); var global$3 = tinymce.util.Tools.resolve('tinymce.Env')...
PypiClean
/Hikka_Pyro_New-2.0.103-py3-none-any.whl/hikkapyro/methods/invite_links/create_chat_invite_link.py
from datetime import datetime from typing import Union import hikkapyro from hikkapyro import raw, utils from hikkapyro import types class CreateChatInviteLink: async def create_chat_invite_link( self: "hikkapyro.Client", chat_id: Union[int, str], name: str = None, expire_date: d...
PypiClean
/LinOTP-2.11.1.tar.gz/LinOTP-2.11.1/linotp/lib/security/libfips/selfcheck.py
"""fips library self test""" import os from binascii import unhexlify from linotp.lib.security.libfips import FipsModule from linotp.lib.security.libfips import SSLError # assune the cryptolib is in the same directory as libfips Cryptolib_Location = os.path.dirname(os.path.abspath(__file__)) Cryptolib = os.path.joi...
PypiClean
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/bower_components/iron-a11y-announcer/.github/ISSUE_TEMPLATE.md
<!-- Instructions: https://github.com/PolymerElements/iron-a11y-announcer/CONTRIBUTING.md#filing-issues --> ### Description <!-- Example: The `paper-foo` element causes the page to turn pink when clicked. --> ### Expected outcome <!-- Example: The page stays the same color. --> ### Actual outcome <!-- Example: The ...
PypiClean
/EnigmaOPTest0.0.5-0.0.17.tar.gz/EnigmaOPTest0.0.5-0.0.17/src/EnigmaOP0/EnigmaOP.py
import random def Rotor(): lst=[] lst=({0: 31, 1: 110, 2: 113, 3: 46, 4: 50, 5: 115, 6: 29, 7: 69, 8: 111, 9: 58, 10: 33, 11: 24, 12: 60, 13: 23, 14: 51, 15: 86, 16: 22, 17: 8, 18: 112, 19: 67, 20: 52, 21: 47, 22: 9, 23: 126, 24: 81, 25: 75, 26: 96, 27: 45, 28: 17, 29: 18, 30: 49, 31: 11, 32: 73, 33: 25, 34:...
PypiClean
/MongoBit-2021.12.9.tar.gz/MongoBit-2021.12.9/mongobit/fields.py
import types import datetime import six from bson.objectid import ObjectId class BaseField(object): default = None def __init__(self, **kwargs): self.validators = {} self.default = kwargs.get("default", self.__class__.default) self.get_validators(kwargs) cls = self.__class__ ...
PypiClean
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/lib/agw/ribbon/page.py
import wx from .control import RibbonControl from .panel import RibbonPanel from .art import * # As scroll buttons need to be rendered on top of a page's child windows, the # buttons themselves have to be proper child windows (rather than just painted # onto the page). In order to get proper clipping of a page's chi...
PypiClean
/Flask-MDBootstrap-3.0.5.tar.gz/Flask-MDBootstrap-3.0.5/flask_mdbootstrap/static/MDB-Pro/js/addons/datatables-select.min.js
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d...
PypiClean
/FantasyBaseballTrends-0.1.2.tar.gz/FantasyBaseballTrends-0.1.2/LICENSE.md
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, ...
PypiClean
/Flask-TinyMCE-1.0.0.tar.gz/Flask-TinyMCE-1.0.0/flask_tinymce/static/plugins/media/plugin.min.js
!function(){"use strict";function e(n){return function(e){return r=typeof(t=e),(null===t?"null":"object"==r&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":r)===n;var t,r}}fun...
PypiClean
/DQR_Data-0.1.4.tar.gz/DQR_Data-0.1.4/README.md
# DQR Data Package A python library for cryptocurrency trading for Binance and Deribit > we currently work on uniswap and other decentralized exchange platform :blush: ## Method :smiley: ### :arrow_forward:Binance **Time format : `%d/%m/%Y %H:%M:%S`, eg: 01/02/2021 00:00:00** | method | parameter | explai...
PypiClean
/Abies-0.0.5.tar.gz/Abies-0.0.5/extern/pybind11/docs/index.rst
.. only:: latex Intro ===== .. include:: readme.rst .. only:: not latex Contents: .. toctree:: :maxdepth: 1 changelog upgrade .. toctree:: :caption: The Basics :maxdepth: 2 installing basics classes compiling .. toctree:: :caption: Advanced Topics :maxdepth: 2 adv...
PypiClean
/dipex-4.54.5.tar.gz/dipex-4.54.5/integrations/calculate_primary/calculate_primary.py
import logging import sys import click from integrations.calculate_primary.common import LOGGER_NAME # from click_option_group import RequiredMutuallyExclusiveOptionGroup, optgroup def setup_logging(): LOG_LEVEL = logging.DEBUG detail_logging = ("mora-helper", LOGGER_NAME) for name in logging.root.man...
PypiClean
/DTP_Emulator-1.8-py3-none-any.whl/simple_emulator/objects/sender.py
from config.constant import * from common import sender_obs from utils import check_solution_format, measure_time from objects.application import AppicationLayer from objects.packet import Packet from config import constant import heapq class Sender(): def __init__(self, path, dest, features, history_len=10, sol...
PypiClean
/DelugeWebBrowser-0.1.2.tar.gz/DelugeWebBrowser-0.1.2/CONTRIBUTING.md
# Contributing Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. ## Get Started! Ready to contribute? Here's how to set up `DelugeWebBrowser` for local development. * Fork the `DelugeWebBrowser` repo on GitHub. * Clone your fork locally: ``` $ git ...
PypiClean
/C-Telethon-1.28.5.tar.gz/C-Telethon-1.28.5/telethon/client/buttons.py
import typing from .. import utils, hints from ..tl import types, custom class ButtonMethods: @staticmethod def build_reply_markup( buttons: 'typing.Optional[hints.MarkupLike]', inline_only: bool = False) -> 'typing.Optional[types.TypeReplyMarkup]': """ Builds a :tl:`R...
PypiClean
/GReNaDIne-0.0.21.tar.gz/GReNaDIne-0.0.21/grenadine/Inference/regression_predictors.py
from sklearn.linear_model import BayesianRidge as _sklearn_BayesianRidge from sklearn.svm import SVR as _sklearn_SVR from sklearn.linear_model import Lasso as _sklearn_Lasso from sklearn.linear_model import LassoLars as _sklearn_LassoLars from sklearn.model_selection import train_test_split as _sklearn_train_test_split...
PypiClean
/Argonaut-0.3.4.tar.gz/Argonaut-0.3.4/argonaut/public/ckeditor/_source/plugins/resize/plugin.js
/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'resize', { init : function( editor ) { var config = editor.config; !config.resize_dir && ( config.resize_dir = 'both' ); ( config.resize_maxW...
PypiClean
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/custom_api/custom_api.py
from json import JSONDecodeError from typing import Callable from typing import Optional from aiohttp import web from aiohttp.web_request import BaseRequest from ..exceptions import TooManyCustomApiDecorators class CustomApi: """CustomAPI, the main means host the local http api server. Parameters: ...
PypiClean
/HATasmota-0.7.0.tar.gz/HATasmota-0.7.0/hatasmota/discovery.py
from __future__ import annotations from itertools import chain import json import logging import voluptuous as vol # type:ignore[import] from . import config_validation as cv from .button import TasmotaButtonTrigger, TasmotaButtonTriggerConfig from .const import ( CONF_BATTERY, CONF_BUTTON, CONF_DEVICEN...
PypiClean
/Lokai-0.3.tar.gz/Lokai-0.3/lokai/lk_worker/nodes/data_interface.py
#----------------------------------------------------------------------- """ Interfaces to create or update node details in the database: The interface uses a dictionary structure that is built up of all the elements that make up a complete node. The elements are: ['nd_node'] = {} for basic nod...
PypiClean
/MyoSuite-2.0.1-py3-none-any.whl/myosuite/envs/myo/myobase/pen_v0.py
import collections import numpy as np import gym from myosuite.envs.myo.base_v0 import BaseV0 from myosuite.utils.quat_math import euler2quat from myosuite.utils.vector_math import calculate_cosine class PenTwirlFixedEnvV0(BaseV0): DEFAULT_OBS_KEYS = ['hand_jnt', 'obj_pos', 'obj_vel', 'obj_rot', 'obj_des_rot', '...
PypiClean
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/tailwindcss/lib/lib/setupTrackingContext.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, // DISABLE_TOUCH = TRUE // Retrieve an existing context from cache if possible (since contexts are unique per // source path), or set up a new one (including setting up watchers and registering // plugins) th...
PypiClean